├── .gitignore ├── LICENSE ├── README.md ├── __test__ └── endpoints.js ├── figma2css-app.js ├── package-lock.json ├── package.json ├── public ├── build │ ├── bundle.css │ ├── bundle.css.map │ ├── bundle.js │ └── bundle.js.map ├── favicon.png ├── global.css └── index.html ├── rollup.config.js └── src ├── App.svelte ├── CSSGenerator.svelte ├── Input.svelte ├── Node.svelte ├── TreeView.svelte ├── base-url.js └── main.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .idea 3 | data 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Figma2css 2 | 3 | # Extract figma styles to your code 4 | 5 | ![figma2css](https://marcell-assets.s3-sa-east-1.amazonaws.com/figma2css-gif.gif) 6 | 7 | # Watch Mode 8 | 9 | ![figma2css](https://marcell-assets.s3-sa-east-1.amazonaws.com/figma2css-watch.gif) 10 | 11 | # Warning 12 | > this project is in a very early stage, a lot of things need to be improved, issues are welcome :D 13 | 14 | # Use cases 15 | 16 | This is very usefull for components or pages that babely change between projects, so you don't have to change the styles everytime 17 | you just need to map them and generate the css 18 | 19 | We found that a mixture of generating automacally and also including your own css is the best approach in most cases 20 | 21 | We're currently working in the css transformation itself to make it more efficient and accurate 22 | 23 | # How to use it 24 | 25 | Assuming you have node and npm installed 26 | 27 | ``` 28 | git clone git@github.com:figmatools/figma2css-app.git 29 | cd figma2css-app 30 | npm i 31 | npm run figma2css 32 | ``` 33 | 34 | open you browser http://localhost:4200/ 35 | 36 | # Figma Access token: 37 | how to get an access token: 38 | https://www.figma.com/developers/api#access-tokens 39 | 40 | # File id* 41 | you can get it in the file url e.g: 42 | https://www.figma.com/file/acuAbVNviSzackLyfNNBaM/<......> 43 | 44 | acuAbVNviSzackLyfNNBaM is the fileId of this url 45 | 46 | # Full Output Path 47 | you can put the output path of the generated css file e.g: 48 | ``` 49 | /home/mmc/my-project/css/figma-generated-css.css 50 | ``` 51 | 52 | The name of the elements that you want to transform need to be a css class or a id, e.g in your figma file .button or #button, 53 | we're planing to change that in the future, maybe do a transformation of the name to match the css class that you want, but for now, this is 54 | how is working. 55 | 56 | you can see an example file here https://www.figma.com/file/SGzkSxkP3pnZQrh9pzn6mf/FigmaTools?node-id=0%3A1 57 | 58 | any question just hit me up 0000marcell@gmail.com 59 | 60 | # Watch mode 61 | 62 | if you're running watch mode everytime that the figma file change this file will be changed too :smile: 63 | 64 | Click load Data to load the treeview with all the figma elements 65 | 66 | Choose the elements that you want to extract the css from, you should also change the name of the element in the design to 67 | the name of your css class, we plan to change this in the future so you've more freedom to choose the name of the class, but 68 | for now this is the best approach 69 | 70 | Then click **generate css** to generate the css once 71 | or **Watch** to watch the figma file and generate the css everytime the figma file changes 72 | 73 | and that's it enjoy 74 | 75 | # figma2react 76 | 77 | https://github.com/0000marcell/figma2react 78 | 79 | 80 | # Development 81 | 82 | For development run 83 | ``` 84 | npm run frontend 85 | npm run backend 86 | ``` 87 | 88 | go to localhost:5000 89 | 90 | # TODO 91 | 92 | - [ ] Create electron desktop app for mac, linux and windows 93 | - [ ] Change the name of the selected element in figma to a class e.g: Button to .button 94 | - [ ] Increase the size of the inputs 95 | - [ ] Better error handling 96 | - [ ] Authentication with oauth2 97 | -------------------------------------------------------------------------------- /__test__/endpoints.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | const figmaToken = '46436-c6600cfa-6adf-4031-9e2a-ba1449a6dd6c', 3 | fileId = 'SGzkSxkP3pnZQrh9pzn6mf', 4 | http = require('http') 5 | 6 | const fs = require('fs') 7 | 8 | const tests = { 9 | getFile: async () => { 10 | const testUrl = `http://localhost:4200/data?figmaToken=${figmaToken}&fileId=${fileId}` 11 | http.get(testUrl, (resp) => { 12 | let data = '' 13 | resp.on('data', (chunk) => { 14 | data += chunk; 15 | }) 16 | resp.on('end', () => { 17 | try { 18 | assert.equal(JSON.parse(data).document.id, '0:0', 'get whole file data') 19 | }catch(err) { console.error(err) } 20 | }) 21 | }).on("error", (err) => { 22 | console.error("Error: " + err.message) 23 | }) 24 | }, 25 | getNodes: async () => { 26 | const testUrl = `http://localhost:4200/data?figmaToken=${figmaToken}&fileId=${fileId}&nodeIds=1:14,1:15`; 27 | return new Promise((resolve, reject) => { 28 | http.get(testUrl, (resp) => { 29 | let data = '' 30 | resp.on('data', (chunk) => { 31 | data += chunk; 32 | }) 33 | resp.on('end', () => { 34 | try { 35 | assert.ok(JSON.parse(data).nodes['1:14'], 'get node 1:14') 36 | assert.ok(JSON.parse(data).nodes['1:15'], 'get node 1:15') 37 | }catch(err) { console.error(err) } 38 | resolve() 39 | }) 40 | }).on("error", (err) => { 41 | console.error("Error: " + err.message) 42 | reject() 43 | }) 44 | }); 45 | }, 46 | getFileDepth: async () => { 47 | const testUrl = `http://localhost:4200/data?figmaToken=${figmaToken}&fileId=${fileId}&depth=1` 48 | http.get(testUrl, (resp) => { 49 | let data = '' 50 | resp.on('data', (chunk) => { 51 | data += chunk; 52 | }) 53 | resp.on('end', () => { 54 | try { 55 | assert.equal(JSON.parse(data).document.children[0].children, 0, 'get file with depth 1') 56 | }catch(err) { console.error(err) } 57 | }) 58 | }).on("error", (err) => { 59 | console.error("Error: " + err.message) 60 | }) 61 | }, 62 | generateCss: async () => { 63 | await tests.getNodes() 64 | const testUrl = `http://localhost:4200/css?figmaToken=${figmaToken}&fileId=${fileId}&nodeIds=1:14,1:15&filePath=test.css` 65 | http.get(testUrl, (resp) => { 66 | let data = '' 67 | resp.on('data', (chunk) => { 68 | data += chunk; 69 | }) 70 | resp.on('end', () => { 71 | try { 72 | assert.ok(data.match(/\.button/), 'generate some css') 73 | }catch(err) { console.error(err) } 74 | }) 75 | }).on("error", (err) => { 76 | console.error("Error: " + err.message) 77 | }) 78 | } 79 | } 80 | 81 | const runTest = async () => { 82 | if(process.argv[2]) 83 | tests[process.argv[2]]() 84 | else 85 | Object.keys(tests).forEach((key) => tests[key]()) 86 | } 87 | 88 | runTest() 89 | -------------------------------------------------------------------------------- /figma2css-app.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const express = require('express'), 4 | app = express(), 5 | cors = require('cors'), 6 | bodyParser = require('body-parser'), 7 | open = require('open'), 8 | path = require('path'), 9 | fs = require('fs'), 10 | transformCss = require('figma2css-module'), 11 | reload = require('reload'); 12 | 13 | 14 | const fetchProject = require('figmafetch-module'); 15 | 16 | const runServer = () => { 17 | app.use(express.json()) 18 | .use(cors({ credentials: true, origin: ['http://localhost:5000']})) 19 | .use(bodyParser.json()) 20 | .use(express.static('public')); 21 | 22 | app.get('/', function (req, res) { 23 | res.sendFile(path.join(__dirname+'/public/index.html')); 24 | }); 25 | 26 | const extractFileId = (fileURL) => { 27 | let result = fileURL.match(/file\/(.*?)\//) 28 | if(result[1]) 29 | return result[1] 30 | else 31 | return false 32 | } 33 | 34 | app.get('/data', async function (req, res) { 35 | // ?figmaToken=[token]&fileURL=[fileURL]&nodeIds=1:36,1:24&depth=1 36 | let { fileURL, figmaToken, writeData } = req.query; 37 | let nodeIds = 38 | req.query.nodeIds ? req.query.nodeIds.split(',') : []; 39 | let depth = req.query.depth 40 | let fileId = extractFileId(fileURL); 41 | if(!fileId || !figmaToken) { 42 | res.status(500).send("user token and fileId needed!!!"); 43 | } else { 44 | let figmaData = await fetchProject(fileId, figmaToken, nodeIds, depth); 45 | if(writeData === 'true') { 46 | fs.writeFileSync('./data', JSON.stringify(figmaData, null, 2), 'utf-8'); 47 | } 48 | res.send(figmaData); 49 | } 50 | }); 51 | 52 | const readFileData = () => { 53 | try { 54 | let data = JSON.parse(fs.readFileSync('./data')); 55 | return data; 56 | } catch (e) { 57 | console.error('error when reading file data!: ', e); 58 | return {}; 59 | } 60 | } 61 | 62 | const findNodes = (ids, data) => { 63 | let nodes = []; 64 | for(let child of data.children) { 65 | if(ids.includes(child.id)) { 66 | nodes.push(child); 67 | } 68 | 69 | if(child.children && child.children.length) { 70 | nodes = nodes.concat(findNodes(ids, child)); 71 | } 72 | } 73 | return nodes; 74 | } 75 | 76 | app.post('/css', async function (req, res) { 77 | // ?filePath=/home/mmc/docs/test.css 78 | const resultFilePath = req.query.filePath 79 | const ids = req.body.ids 80 | 81 | if(!ids) { 82 | res.status(400).send('No ids were selected!') 83 | return 84 | } 85 | let data = readFileData(); 86 | let nodes = findNodes(ids, data.document); 87 | let finalCss = '' 88 | nodes.forEach((node) => { 89 | let resultCss = transformCss(node); 90 | if(resultCss) 91 | finalCss += resultCss 92 | }); 93 | if(resultFilePath) { 94 | try { 95 | fs.writeFileSync(resultFilePath, finalCss, 'utf-8') 96 | } catch(err) { 97 | res.status(400).send(err) 98 | console.error(err) 99 | return 100 | } 101 | } 102 | finalCss = finalCss ? finalCss : 'No css styles found in the object' 103 | res.send(finalCss) 104 | }); 105 | 106 | reload(app).then(function (reloadReturned) { 107 | app.listen(4200, function () { 108 | console.log('Web server listening on port 4200!') 109 | }) 110 | }).catch(function (err) { 111 | console.error('Reload could not start, could not start server/sample app', err) 112 | }) 113 | //open('http://localhost:4200/') 114 | }; 115 | 116 | runServer(); 117 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "figma2css-app", 3 | "version": "0.0.6", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/code-frame": { 8 | "version": "7.10.1", 9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", 10 | "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", 11 | "requires": { 12 | "@babel/highlight": "^7.10.1" 13 | } 14 | }, 15 | "@babel/helper-validator-identifier": { 16 | "version": "7.10.1", 17 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", 18 | "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==" 19 | }, 20 | "@babel/highlight": { 21 | "version": "7.10.1", 22 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", 23 | "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", 24 | "requires": { 25 | "@babel/helper-validator-identifier": "^7.10.1", 26 | "chalk": "^2.0.0", 27 | "js-tokens": "^4.0.0" 28 | } 29 | }, 30 | "@polka/url": { 31 | "version": "0.5.0", 32 | "resolved": "https://registry.npmjs.org/@polka/url/-/url-0.5.0.tgz", 33 | "integrity": "sha512-oZLYFEAzUKyi3SKnXvj32ZCEGH6RDnao7COuCVhDydMS9NrCSVXhM79VaKyP5+Zc33m0QXEd2DN3UkU7OsHcfw==" 34 | }, 35 | "@rollup/plugin-commonjs": { 36 | "version": "12.0.0", 37 | "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-12.0.0.tgz", 38 | "integrity": "sha512-8+mDQt1QUmN+4Y9D3yCG8AJNewuTSLYPJVzKKUZ+lGeQrI+bV12Tc5HCyt2WdlnG6ihIL/DPbKRJlB40DX40mw==", 39 | "requires": { 40 | "@rollup/pluginutils": "^3.0.8", 41 | "commondir": "^1.0.1", 42 | "estree-walker": "^1.0.1", 43 | "glob": "^7.1.2", 44 | "is-reference": "^1.1.2", 45 | "magic-string": "^0.25.2", 46 | "resolve": "^1.11.0" 47 | } 48 | }, 49 | "@rollup/plugin-node-resolve": { 50 | "version": "8.0.0", 51 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.0.0.tgz", 52 | "integrity": "sha512-5poJCChrkVggXXND/sQ7yNqwjUNT4fP31gpRWCnSNnlXuUXTCMHT33xZrTGxgjm5Rl18MHj7iEzlCT8rYWwQSA==", 53 | "requires": { 54 | "@rollup/pluginutils": "^3.0.8", 55 | "@types/resolve": "0.0.8", 56 | "builtin-modules": "^3.1.0", 57 | "deep-freeze": "^0.0.1", 58 | "deepmerge": "^4.2.2", 59 | "is-module": "^1.0.0", 60 | "resolve": "^1.14.2" 61 | } 62 | }, 63 | "@rollup/pluginutils": { 64 | "version": "3.0.10", 65 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.10.tgz", 66 | "integrity": "sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw==", 67 | "requires": { 68 | "@types/estree": "0.0.39", 69 | "estree-walker": "^1.0.1", 70 | "picomatch": "^2.2.2" 71 | } 72 | }, 73 | "@types/estree": { 74 | "version": "0.0.39", 75 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 76 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" 77 | }, 78 | "@types/node": { 79 | "version": "14.0.6", 80 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.6.tgz", 81 | "integrity": "sha512-FbNmu4F67d3oZMWBV6Y4MaPER+0EpE9eIYf2yaHhCWovc1dlXCZkqGX4NLHfVVr6umt20TNBdRzrNJIzIKfdbw==" 82 | }, 83 | "@types/resolve": { 84 | "version": "0.0.8", 85 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", 86 | "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", 87 | "requires": { 88 | "@types/node": "*" 89 | } 90 | }, 91 | "accepts": { 92 | "version": "1.3.7", 93 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 94 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 95 | "requires": { 96 | "mime-types": "~2.1.24", 97 | "negotiator": "0.6.2" 98 | } 99 | }, 100 | "ansi-styles": { 101 | "version": "3.2.1", 102 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 103 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 104 | "requires": { 105 | "color-convert": "^1.9.0" 106 | } 107 | }, 108 | "anymatch": { 109 | "version": "3.1.1", 110 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", 111 | "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", 112 | "requires": { 113 | "normalize-path": "^3.0.0", 114 | "picomatch": "^2.0.4" 115 | } 116 | }, 117 | "array-flatten": { 118 | "version": "1.1.1", 119 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 120 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 121 | }, 122 | "async-limiter": { 123 | "version": "1.0.1", 124 | "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", 125 | "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" 126 | }, 127 | "balanced-match": { 128 | "version": "1.0.0", 129 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 130 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 131 | }, 132 | "binary-extensions": { 133 | "version": "2.0.0", 134 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", 135 | "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==" 136 | }, 137 | "body-parser": { 138 | "version": "1.19.0", 139 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 140 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 141 | "requires": { 142 | "bytes": "3.1.0", 143 | "content-type": "~1.0.4", 144 | "debug": "2.6.9", 145 | "depd": "~1.1.2", 146 | "http-errors": "1.7.2", 147 | "iconv-lite": "0.4.24", 148 | "on-finished": "~2.3.0", 149 | "qs": "6.7.0", 150 | "raw-body": "2.4.0", 151 | "type-is": "~1.6.17" 152 | } 153 | }, 154 | "brace-expansion": { 155 | "version": "1.1.11", 156 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 157 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 158 | "requires": { 159 | "balanced-match": "^1.0.0", 160 | "concat-map": "0.0.1" 161 | } 162 | }, 163 | "braces": { 164 | "version": "3.0.2", 165 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 166 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 167 | "requires": { 168 | "fill-range": "^7.0.1" 169 | } 170 | }, 171 | "buffer-from": { 172 | "version": "1.1.1", 173 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 174 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" 175 | }, 176 | "builtin-modules": { 177 | "version": "3.1.0", 178 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", 179 | "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==" 180 | }, 181 | "bytes": { 182 | "version": "3.1.0", 183 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 184 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 185 | }, 186 | "chalk": { 187 | "version": "2.4.2", 188 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 189 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 190 | "requires": { 191 | "ansi-styles": "^3.2.1", 192 | "escape-string-regexp": "^1.0.5", 193 | "supports-color": "^5.3.0" 194 | }, 195 | "dependencies": { 196 | "supports-color": { 197 | "version": "5.5.0", 198 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 199 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 200 | "requires": { 201 | "has-flag": "^3.0.0" 202 | } 203 | } 204 | } 205 | }, 206 | "chokidar": { 207 | "version": "3.4.0", 208 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", 209 | "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", 210 | "requires": { 211 | "anymatch": "~3.1.1", 212 | "braces": "~3.0.2", 213 | "fsevents": "~2.1.2", 214 | "glob-parent": "~5.1.0", 215 | "is-binary-path": "~2.1.0", 216 | "is-glob": "~4.0.1", 217 | "normalize-path": "~3.0.0", 218 | "readdirp": "~3.4.0" 219 | } 220 | }, 221 | "cli-color": { 222 | "version": "2.0.0", 223 | "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz", 224 | "integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==", 225 | "requires": { 226 | "ansi-regex": "^2.1.1", 227 | "d": "^1.0.1", 228 | "es5-ext": "^0.10.51", 229 | "es6-iterator": "^2.0.3", 230 | "memoizee": "^0.4.14", 231 | "timers-ext": "^0.1.7" 232 | }, 233 | "dependencies": { 234 | "ansi-regex": { 235 | "version": "2.1.1", 236 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 237 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 238 | } 239 | } 240 | }, 241 | "color-convert": { 242 | "version": "1.9.3", 243 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 244 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 245 | "requires": { 246 | "color-name": "1.1.3" 247 | } 248 | }, 249 | "color-name": { 250 | "version": "1.1.3", 251 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 252 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 253 | }, 254 | "commander": { 255 | "version": "5.1.0", 256 | "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", 257 | "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" 258 | }, 259 | "commondir": { 260 | "version": "1.0.1", 261 | "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", 262 | "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" 263 | }, 264 | "concat-map": { 265 | "version": "0.0.1", 266 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 267 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 268 | }, 269 | "console-clear": { 270 | "version": "1.1.1", 271 | "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", 272 | "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==" 273 | }, 274 | "content-disposition": { 275 | "version": "0.5.3", 276 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 277 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 278 | "requires": { 279 | "safe-buffer": "5.1.2" 280 | } 281 | }, 282 | "content-type": { 283 | "version": "1.0.4", 284 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 285 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 286 | }, 287 | "cookie": { 288 | "version": "0.4.0", 289 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 290 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 291 | }, 292 | "cookie-signature": { 293 | "version": "1.0.6", 294 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 295 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 296 | }, 297 | "cors": { 298 | "version": "2.8.5", 299 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 300 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 301 | "requires": { 302 | "object-assign": "^4", 303 | "vary": "^1" 304 | } 305 | }, 306 | "d": { 307 | "version": "1.0.1", 308 | "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", 309 | "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", 310 | "requires": { 311 | "es5-ext": "^0.10.50", 312 | "type": "^1.0.1" 313 | } 314 | }, 315 | "debug": { 316 | "version": "2.6.9", 317 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 318 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 319 | "requires": { 320 | "ms": "2.0.0" 321 | } 322 | }, 323 | "deep-freeze": { 324 | "version": "0.0.1", 325 | "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", 326 | "integrity": "sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=" 327 | }, 328 | "deepmerge": { 329 | "version": "4.2.2", 330 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", 331 | "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" 332 | }, 333 | "depd": { 334 | "version": "1.1.2", 335 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 336 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 337 | }, 338 | "destroy": { 339 | "version": "1.0.4", 340 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 341 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 342 | }, 343 | "ee-first": { 344 | "version": "1.1.1", 345 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 346 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 347 | }, 348 | "encodeurl": { 349 | "version": "1.0.2", 350 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 351 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 352 | }, 353 | "es5-ext": { 354 | "version": "0.10.53", 355 | "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", 356 | "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", 357 | "requires": { 358 | "es6-iterator": "~2.0.3", 359 | "es6-symbol": "~3.1.3", 360 | "next-tick": "~1.0.0" 361 | } 362 | }, 363 | "es6-iterator": { 364 | "version": "2.0.3", 365 | "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", 366 | "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", 367 | "requires": { 368 | "d": "1", 369 | "es5-ext": "^0.10.35", 370 | "es6-symbol": "^3.1.1" 371 | } 372 | }, 373 | "es6-symbol": { 374 | "version": "3.1.3", 375 | "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", 376 | "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", 377 | "requires": { 378 | "d": "^1.0.1", 379 | "ext": "^1.1.2" 380 | } 381 | }, 382 | "es6-weak-map": { 383 | "version": "2.0.3", 384 | "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", 385 | "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", 386 | "requires": { 387 | "d": "1", 388 | "es5-ext": "^0.10.46", 389 | "es6-iterator": "^2.0.3", 390 | "es6-symbol": "^3.1.1" 391 | } 392 | }, 393 | "escape-html": { 394 | "version": "1.0.3", 395 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 396 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 397 | }, 398 | "escape-string-regexp": { 399 | "version": "1.0.5", 400 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 401 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 402 | }, 403 | "estree-walker": { 404 | "version": "1.0.1", 405 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", 406 | "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==" 407 | }, 408 | "etag": { 409 | "version": "1.8.1", 410 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 411 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 412 | }, 413 | "event-emitter": { 414 | "version": "0.3.5", 415 | "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", 416 | "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", 417 | "requires": { 418 | "d": "1", 419 | "es5-ext": "~0.10.14" 420 | } 421 | }, 422 | "express": { 423 | "version": "4.17.1", 424 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 425 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 426 | "requires": { 427 | "accepts": "~1.3.7", 428 | "array-flatten": "1.1.1", 429 | "body-parser": "1.19.0", 430 | "content-disposition": "0.5.3", 431 | "content-type": "~1.0.4", 432 | "cookie": "0.4.0", 433 | "cookie-signature": "1.0.6", 434 | "debug": "2.6.9", 435 | "depd": "~1.1.2", 436 | "encodeurl": "~1.0.2", 437 | "escape-html": "~1.0.3", 438 | "etag": "~1.8.1", 439 | "finalhandler": "~1.1.2", 440 | "fresh": "0.5.2", 441 | "merge-descriptors": "1.0.1", 442 | "methods": "~1.1.2", 443 | "on-finished": "~2.3.0", 444 | "parseurl": "~1.3.3", 445 | "path-to-regexp": "0.1.7", 446 | "proxy-addr": "~2.0.5", 447 | "qs": "6.7.0", 448 | "range-parser": "~1.2.1", 449 | "safe-buffer": "5.1.2", 450 | "send": "0.17.1", 451 | "serve-static": "1.14.1", 452 | "setprototypeof": "1.1.1", 453 | "statuses": "~1.5.0", 454 | "type-is": "~1.6.18", 455 | "utils-merge": "1.0.1", 456 | "vary": "~1.1.2" 457 | } 458 | }, 459 | "ext": { 460 | "version": "1.4.0", 461 | "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", 462 | "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", 463 | "requires": { 464 | "type": "^2.0.0" 465 | }, 466 | "dependencies": { 467 | "type": { 468 | "version": "2.0.0", 469 | "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", 470 | "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" 471 | } 472 | } 473 | }, 474 | "figma2css-module": { 475 | "version": "0.0.4", 476 | "resolved": "https://registry.npmjs.org/figma2css-module/-/figma2css-module-0.0.4.tgz", 477 | "integrity": "sha512-pgYMD+BuC0Df7cfImwJBM+nmQ2VH0LeSsjICJTkJsTvr5Ltp+gtx+5T9HGIC6+JTQka9qDdp9DLYYe+pYLlWkQ==" 478 | }, 479 | "figmafetch-module": { 480 | "version": "1.0.4", 481 | "resolved": "https://registry.npmjs.org/figmafetch-module/-/figmafetch-module-1.0.4.tgz", 482 | "integrity": "sha512-BQ/46PI8RBEqYzKDTYxIu6KPC3825XeLfjrbNJT7mxhXWUjH5khLLekR0xFNlRG2ImoBgYSchr/hgPVd47BXGw==", 483 | "requires": { 484 | "node-fetch": "^2.6.0" 485 | } 486 | }, 487 | "fill-range": { 488 | "version": "7.0.1", 489 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 490 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 491 | "requires": { 492 | "to-regex-range": "^5.0.1" 493 | } 494 | }, 495 | "finalhandler": { 496 | "version": "1.1.2", 497 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 498 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 499 | "requires": { 500 | "debug": "2.6.9", 501 | "encodeurl": "~1.0.2", 502 | "escape-html": "~1.0.3", 503 | "on-finished": "~2.3.0", 504 | "parseurl": "~1.3.3", 505 | "statuses": "~1.5.0", 506 | "unpipe": "~1.0.0" 507 | } 508 | }, 509 | "forwarded": { 510 | "version": "0.1.2", 511 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 512 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 513 | }, 514 | "fresh": { 515 | "version": "0.5.2", 516 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 517 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 518 | }, 519 | "fs.realpath": { 520 | "version": "1.0.0", 521 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 522 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 523 | }, 524 | "fsevents": { 525 | "version": "2.1.3", 526 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", 527 | "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", 528 | "optional": true 529 | }, 530 | "get-port": { 531 | "version": "3.2.0", 532 | "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", 533 | "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" 534 | }, 535 | "glob": { 536 | "version": "7.1.6", 537 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 538 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 539 | "requires": { 540 | "fs.realpath": "^1.0.0", 541 | "inflight": "^1.0.4", 542 | "inherits": "2", 543 | "minimatch": "^3.0.4", 544 | "once": "^1.3.0", 545 | "path-is-absolute": "^1.0.0" 546 | } 547 | }, 548 | "glob-parent": { 549 | "version": "5.1.1", 550 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", 551 | "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", 552 | "requires": { 553 | "is-glob": "^4.0.1" 554 | } 555 | }, 556 | "has-flag": { 557 | "version": "3.0.0", 558 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 559 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" 560 | }, 561 | "http-errors": { 562 | "version": "1.7.2", 563 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 564 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 565 | "requires": { 566 | "depd": "~1.1.2", 567 | "inherits": "2.0.3", 568 | "setprototypeof": "1.1.1", 569 | "statuses": ">= 1.5.0 < 2", 570 | "toidentifier": "1.0.0" 571 | } 572 | }, 573 | "iconv-lite": { 574 | "version": "0.4.24", 575 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 576 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 577 | "requires": { 578 | "safer-buffer": ">= 2.1.2 < 3" 579 | } 580 | }, 581 | "inflight": { 582 | "version": "1.0.6", 583 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 584 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 585 | "requires": { 586 | "once": "^1.3.0", 587 | "wrappy": "1" 588 | } 589 | }, 590 | "inherits": { 591 | "version": "2.0.3", 592 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 593 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 594 | }, 595 | "ipaddr.js": { 596 | "version": "1.9.1", 597 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 598 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 599 | }, 600 | "is-binary-path": { 601 | "version": "2.1.0", 602 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 603 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 604 | "requires": { 605 | "binary-extensions": "^2.0.0" 606 | } 607 | }, 608 | "is-docker": { 609 | "version": "2.0.0", 610 | "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.0.0.tgz", 611 | "integrity": "sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==" 612 | }, 613 | "is-extglob": { 614 | "version": "2.1.1", 615 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 616 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" 617 | }, 618 | "is-glob": { 619 | "version": "4.0.1", 620 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 621 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 622 | "requires": { 623 | "is-extglob": "^2.1.1" 624 | } 625 | }, 626 | "is-module": { 627 | "version": "1.0.0", 628 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 629 | "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=" 630 | }, 631 | "is-number": { 632 | "version": "7.0.0", 633 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 634 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" 635 | }, 636 | "is-promise": { 637 | "version": "2.2.2", 638 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", 639 | "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" 640 | }, 641 | "is-reference": { 642 | "version": "1.2.0", 643 | "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.0.tgz", 644 | "integrity": "sha512-ZVxq+5TkOx6GQdnoMm2aRdCKADdcrOWXLGzGT+vIA8DMpqEJaRk5AL1bS80zJ2bjHunVmjdzfCt0e4BymIEqKQ==", 645 | "requires": { 646 | "@types/estree": "0.0.44" 647 | }, 648 | "dependencies": { 649 | "@types/estree": { 650 | "version": "0.0.44", 651 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.44.tgz", 652 | "integrity": "sha512-iaIVzr+w2ZJ5HkidlZ3EJM8VTZb2MJLCjw3V+505yVts0gRC4UMvjw0d1HPtGqI/HQC/KdsYtayfzl+AXY2R8g==" 653 | } 654 | } 655 | }, 656 | "is-wsl": { 657 | "version": "2.2.0", 658 | "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", 659 | "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", 660 | "requires": { 661 | "is-docker": "^2.0.0" 662 | } 663 | }, 664 | "jest-worker": { 665 | "version": "24.9.0", 666 | "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", 667 | "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", 668 | "requires": { 669 | "merge-stream": "^2.0.0", 670 | "supports-color": "^6.1.0" 671 | } 672 | }, 673 | "js-tokens": { 674 | "version": "4.0.0", 675 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 676 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" 677 | }, 678 | "kleur": { 679 | "version": "3.0.3", 680 | "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", 681 | "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==" 682 | }, 683 | "livereload": { 684 | "version": "0.9.1", 685 | "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.1.tgz", 686 | "integrity": "sha512-9g7sua11kkyZNo2hLRCG3LuZZwqexoyEyecSlV8cAsfAVVCZqLzVir6XDqmH0r+Vzgnd5LrdHDMyjtFnJQLAYw==", 687 | "requires": { 688 | "chokidar": "^3.3.0", 689 | "livereload-js": "^3.1.0", 690 | "opts": ">= 1.2.0", 691 | "ws": "^6.2.1" 692 | }, 693 | "dependencies": { 694 | "ws": { 695 | "version": "6.2.1", 696 | "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", 697 | "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", 698 | "requires": { 699 | "async-limiter": "~1.0.0" 700 | } 701 | } 702 | } 703 | }, 704 | "livereload-js": { 705 | "version": "3.2.2", 706 | "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.2.2.tgz", 707 | "integrity": "sha512-xhScbNeC687ZINjEf/bD+BMiPx4s4q0mehcLb3zCc8+mykOtmaBR4vqzyIV9rIGdG9JjHaT0LiFdscvivCjX1Q==" 708 | }, 709 | "local-access": { 710 | "version": "1.0.1", 711 | "resolved": "https://registry.npmjs.org/local-access/-/local-access-1.0.1.tgz", 712 | "integrity": "sha512-ykt2pgN0aqIy6KQC1CqdWTWkmUwNgaOS6dcpHVjyBJONA+Xi7AtSB1vuxC/U/0tjIP3wcRudwQk1YYzUvzk2bA==" 713 | }, 714 | "lru-queue": { 715 | "version": "0.1.0", 716 | "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", 717 | "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", 718 | "requires": { 719 | "es5-ext": "~0.10.2" 720 | } 721 | }, 722 | "magic-string": { 723 | "version": "0.25.7", 724 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", 725 | "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", 726 | "requires": { 727 | "sourcemap-codec": "^1.4.4" 728 | } 729 | }, 730 | "media-typer": { 731 | "version": "0.3.0", 732 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 733 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 734 | }, 735 | "memoizee": { 736 | "version": "0.4.14", 737 | "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz", 738 | "integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==", 739 | "requires": { 740 | "d": "1", 741 | "es5-ext": "^0.10.45", 742 | "es6-weak-map": "^2.0.2", 743 | "event-emitter": "^0.3.5", 744 | "is-promise": "^2.1", 745 | "lru-queue": "0.1", 746 | "next-tick": "1", 747 | "timers-ext": "^0.1.5" 748 | } 749 | }, 750 | "merge-descriptors": { 751 | "version": "1.0.1", 752 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 753 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 754 | }, 755 | "merge-stream": { 756 | "version": "2.0.0", 757 | "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", 758 | "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" 759 | }, 760 | "methods": { 761 | "version": "1.1.2", 762 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 763 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 764 | }, 765 | "mime": { 766 | "version": "1.6.0", 767 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 768 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 769 | }, 770 | "mime-db": { 771 | "version": "1.44.0", 772 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 773 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" 774 | }, 775 | "mime-types": { 776 | "version": "2.1.27", 777 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 778 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 779 | "requires": { 780 | "mime-db": "1.44.0" 781 | } 782 | }, 783 | "minimatch": { 784 | "version": "3.0.4", 785 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 786 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 787 | "requires": { 788 | "brace-expansion": "^1.1.7" 789 | } 790 | }, 791 | "minimist": { 792 | "version": "1.2.5", 793 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 794 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" 795 | }, 796 | "mri": { 797 | "version": "1.1.5", 798 | "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", 799 | "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==" 800 | }, 801 | "ms": { 802 | "version": "2.0.0", 803 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 804 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 805 | }, 806 | "negotiator": { 807 | "version": "0.6.2", 808 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 809 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 810 | }, 811 | "next-tick": { 812 | "version": "1.0.0", 813 | "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", 814 | "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" 815 | }, 816 | "node-fetch": { 817 | "version": "2.6.0", 818 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", 819 | "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" 820 | }, 821 | "normalize-path": { 822 | "version": "3.0.0", 823 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 824 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" 825 | }, 826 | "object-assign": { 827 | "version": "4.1.1", 828 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 829 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 830 | }, 831 | "on-finished": { 832 | "version": "2.3.0", 833 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 834 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 835 | "requires": { 836 | "ee-first": "1.1.1" 837 | } 838 | }, 839 | "once": { 840 | "version": "1.4.0", 841 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 842 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 843 | "requires": { 844 | "wrappy": "1" 845 | } 846 | }, 847 | "open": { 848 | "version": "7.0.4", 849 | "resolved": "https://registry.npmjs.org/open/-/open-7.0.4.tgz", 850 | "integrity": "sha512-brSA+/yq+b08Hsr4c8fsEW2CRzk1BmfN3SAK/5VCHQ9bdoZJ4qa/+AfR0xHjlbbZUyPkUHs1b8x1RqdyZdkVqQ==", 851 | "requires": { 852 | "is-docker": "^2.0.0", 853 | "is-wsl": "^2.1.1" 854 | } 855 | }, 856 | "opts": { 857 | "version": "1.2.7", 858 | "resolved": "https://registry.npmjs.org/opts/-/opts-1.2.7.tgz", 859 | "integrity": "sha512-hwZhzGGG/GQ7igxAVFOEun2N4fWul31qE9nfBdCnZGQCB5+L7tN9xZ+94B4aUpLOJx/of3zZs5XsuubayQYQjA==" 860 | }, 861 | "parseurl": { 862 | "version": "1.3.3", 863 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 864 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 865 | }, 866 | "path-is-absolute": { 867 | "version": "1.0.1", 868 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 869 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 870 | }, 871 | "path-parse": { 872 | "version": "1.0.6", 873 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", 874 | "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" 875 | }, 876 | "path-to-regexp": { 877 | "version": "0.1.7", 878 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 879 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 880 | }, 881 | "picomatch": { 882 | "version": "2.2.2", 883 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", 884 | "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" 885 | }, 886 | "proxy-addr": { 887 | "version": "2.0.6", 888 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", 889 | "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", 890 | "requires": { 891 | "forwarded": "~0.1.2", 892 | "ipaddr.js": "1.9.1" 893 | } 894 | }, 895 | "qs": { 896 | "version": "6.7.0", 897 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 898 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 899 | }, 900 | "querystringify": { 901 | "version": "2.1.1", 902 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", 903 | "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==" 904 | }, 905 | "range-parser": { 906 | "version": "1.2.1", 907 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 908 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 909 | }, 910 | "raw-body": { 911 | "version": "2.4.0", 912 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 913 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 914 | "requires": { 915 | "bytes": "3.1.0", 916 | "http-errors": "1.7.2", 917 | "iconv-lite": "0.4.24", 918 | "unpipe": "1.0.0" 919 | } 920 | }, 921 | "readdirp": { 922 | "version": "3.4.0", 923 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", 924 | "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", 925 | "requires": { 926 | "picomatch": "^2.2.1" 927 | } 928 | }, 929 | "reload": { 930 | "version": "3.0.4", 931 | "resolved": "https://registry.npmjs.org/reload/-/reload-3.0.4.tgz", 932 | "integrity": "sha512-Jddjfwz19wvOooGE3LoIUVhDyndFlJqrWQ/dQJssKfc7TwGUuJe02hTHerWRMmilWGg2hFxMB+D2wMmrkSH3kw==", 933 | "requires": { 934 | "cli-color": "~2.0.0", 935 | "commander": "~4.1.0", 936 | "finalhandler": "~1.1.1", 937 | "minimist": "~1.2.0", 938 | "open": "^7.0.0", 939 | "serve-static": "~1.14.0", 940 | "supervisor": "~0.12.0", 941 | "url-parse": "~1.4.4", 942 | "ws": "~7.2.0" 943 | }, 944 | "dependencies": { 945 | "commander": { 946 | "version": "4.1.1", 947 | "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", 948 | "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" 949 | } 950 | } 951 | }, 952 | "require-relative": { 953 | "version": "0.8.7", 954 | "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", 955 | "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=" 956 | }, 957 | "requires-port": { 958 | "version": "1.0.0", 959 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 960 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" 961 | }, 962 | "resolve": { 963 | "version": "1.17.0", 964 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", 965 | "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", 966 | "requires": { 967 | "path-parse": "^1.0.6" 968 | } 969 | }, 970 | "rollup": { 971 | "version": "2.11.2", 972 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.11.2.tgz", 973 | "integrity": "sha512-pJT6mfH+/gh1sOWyNMAWxjbYGL5x2AfsaR0SWLRwq2e7vxOKt/0mBjtYDTVYF8JXxVzmnuDzA+EpsPLWt/oyrg==", 974 | "requires": { 975 | "fsevents": "~2.1.2" 976 | } 977 | }, 978 | "rollup-plugin-livereload": { 979 | "version": "1.3.0", 980 | "resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-1.3.0.tgz", 981 | "integrity": "sha512-abyqXaB21+nFHo+vJULBqfzNx6zXABC19UyvqgDfdoxR/8pFAd041GO+GIUe8ZYC2DbuMUmioh1Lvbk14YLZgw==", 982 | "requires": { 983 | "livereload": "^0.9.1" 984 | } 985 | }, 986 | "rollup-plugin-svelte": { 987 | "version": "5.2.2", 988 | "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.2.2.tgz", 989 | "integrity": "sha512-I+TJ2T+VLKGbKQcpeMJ4AR2ciROqTZNjxbiMiH4Cn1yByaB9OEuy3CnrgHHuWatQcPuF3yIViyKX7OlETWDKOQ==", 990 | "requires": { 991 | "require-relative": "^0.8.7", 992 | "rollup-pluginutils": "^2.8.2", 993 | "sourcemap-codec": "^1.4.8" 994 | } 995 | }, 996 | "rollup-plugin-terser": { 997 | "version": "5.3.0", 998 | "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz", 999 | "integrity": "sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g==", 1000 | "requires": { 1001 | "@babel/code-frame": "^7.5.5", 1002 | "jest-worker": "^24.9.0", 1003 | "rollup-pluginutils": "^2.8.2", 1004 | "serialize-javascript": "^2.1.2", 1005 | "terser": "^4.6.2" 1006 | } 1007 | }, 1008 | "rollup-pluginutils": { 1009 | "version": "2.8.2", 1010 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", 1011 | "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", 1012 | "requires": { 1013 | "estree-walker": "^0.6.1" 1014 | }, 1015 | "dependencies": { 1016 | "estree-walker": { 1017 | "version": "0.6.1", 1018 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", 1019 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==" 1020 | } 1021 | } 1022 | }, 1023 | "sade": { 1024 | "version": "1.7.3", 1025 | "resolved": "https://registry.npmjs.org/sade/-/sade-1.7.3.tgz", 1026 | "integrity": "sha512-m4BctppMvJ60W1dXnHq7jMmFe3hPJZDAH85kQ3ACTo7XZNVUuTItCQ+2HfyaMeV5cKrbw7l4vD/6We3GBxvdJw==", 1027 | "requires": { 1028 | "mri": "^1.1.0" 1029 | } 1030 | }, 1031 | "safe-buffer": { 1032 | "version": "5.1.2", 1033 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1034 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 1035 | }, 1036 | "safer-buffer": { 1037 | "version": "2.1.2", 1038 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1039 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1040 | }, 1041 | "send": { 1042 | "version": "0.17.1", 1043 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 1044 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 1045 | "requires": { 1046 | "debug": "2.6.9", 1047 | "depd": "~1.1.2", 1048 | "destroy": "~1.0.4", 1049 | "encodeurl": "~1.0.2", 1050 | "escape-html": "~1.0.3", 1051 | "etag": "~1.8.1", 1052 | "fresh": "0.5.2", 1053 | "http-errors": "~1.7.2", 1054 | "mime": "1.6.0", 1055 | "ms": "2.1.1", 1056 | "on-finished": "~2.3.0", 1057 | "range-parser": "~1.2.1", 1058 | "statuses": "~1.5.0" 1059 | }, 1060 | "dependencies": { 1061 | "ms": { 1062 | "version": "2.1.1", 1063 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 1064 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 1065 | } 1066 | } 1067 | }, 1068 | "serialize-javascript": { 1069 | "version": "2.1.2", 1070 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", 1071 | "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==" 1072 | }, 1073 | "serve-static": { 1074 | "version": "1.14.1", 1075 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 1076 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 1077 | "requires": { 1078 | "encodeurl": "~1.0.2", 1079 | "escape-html": "~1.0.3", 1080 | "parseurl": "~1.3.3", 1081 | "send": "0.17.1" 1082 | } 1083 | }, 1084 | "setprototypeof": { 1085 | "version": "1.1.1", 1086 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 1087 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 1088 | }, 1089 | "sirv": { 1090 | "version": "0.4.6", 1091 | "resolved": "https://registry.npmjs.org/sirv/-/sirv-0.4.6.tgz", 1092 | "integrity": "sha512-rYpOXlNbpHiY4nVXxuDf4mXPvKz1reZGap/LkWp9TvcZ84qD/nPBjjH/6GZsgIjVMbOslnY8YYULAyP8jMn1GQ==", 1093 | "requires": { 1094 | "@polka/url": "^0.5.0", 1095 | "mime": "^2.3.1" 1096 | }, 1097 | "dependencies": { 1098 | "mime": { 1099 | "version": "2.4.6", 1100 | "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", 1101 | "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==" 1102 | } 1103 | } 1104 | }, 1105 | "sirv-cli": { 1106 | "version": "0.4.6", 1107 | "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-0.4.6.tgz", 1108 | "integrity": "sha512-/Vj85/kBvPL+n9ibgX6FicLE8VjidC1BhlX67PYPBfbBAphzR6i0k0HtU5c2arejfU3uzq8l3SYPCwl1x7z6Ww==", 1109 | "requires": { 1110 | "console-clear": "^1.1.0", 1111 | "get-port": "^3.2.0", 1112 | "kleur": "^3.0.0", 1113 | "local-access": "^1.0.1", 1114 | "sade": "^1.4.0", 1115 | "sirv": "^0.4.6", 1116 | "tinydate": "^1.0.0" 1117 | } 1118 | }, 1119 | "source-map": { 1120 | "version": "0.6.1", 1121 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1122 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" 1123 | }, 1124 | "source-map-support": { 1125 | "version": "0.5.19", 1126 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", 1127 | "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", 1128 | "requires": { 1129 | "buffer-from": "^1.0.0", 1130 | "source-map": "^0.6.0" 1131 | } 1132 | }, 1133 | "sourcemap-codec": { 1134 | "version": "1.4.8", 1135 | "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", 1136 | "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" 1137 | }, 1138 | "statuses": { 1139 | "version": "1.5.0", 1140 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 1141 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 1142 | }, 1143 | "supervisor": { 1144 | "version": "0.12.0", 1145 | "resolved": "https://registry.npmjs.org/supervisor/-/supervisor-0.12.0.tgz", 1146 | "integrity": "sha1-3n5jNwFbKRhRwQ81OMSn8EkX7ME=" 1147 | }, 1148 | "supports-color": { 1149 | "version": "6.1.0", 1150 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", 1151 | "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", 1152 | "requires": { 1153 | "has-flag": "^3.0.0" 1154 | } 1155 | }, 1156 | "svelte": { 1157 | "version": "3.23.0", 1158 | "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.23.0.tgz", 1159 | "integrity": "sha512-cnyd96bK/Nw5DnYuB1hzm5cl6+I1fpmdKOteA7KLzU9KGLsLmvWsSkSKbcntzODCLmSySN3HjcgTHRo6/rJNTw==" 1160 | }, 1161 | "terser": { 1162 | "version": "4.7.0", 1163 | "resolved": "https://registry.npmjs.org/terser/-/terser-4.7.0.tgz", 1164 | "integrity": "sha512-Lfb0RiZcjRDXCC3OSHJpEkxJ9Qeqs6mp2v4jf2MHfy8vGERmVDuvjXdd/EnP5Deme5F2yBRBymKmKHCBg2echw==", 1165 | "requires": { 1166 | "commander": "^2.20.0", 1167 | "source-map": "~0.6.1", 1168 | "source-map-support": "~0.5.12" 1169 | }, 1170 | "dependencies": { 1171 | "commander": { 1172 | "version": "2.20.3", 1173 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 1174 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" 1175 | } 1176 | } 1177 | }, 1178 | "timers-ext": { 1179 | "version": "0.1.7", 1180 | "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", 1181 | "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", 1182 | "requires": { 1183 | "es5-ext": "~0.10.46", 1184 | "next-tick": "1" 1185 | } 1186 | }, 1187 | "tinydate": { 1188 | "version": "1.2.0", 1189 | "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.2.0.tgz", 1190 | "integrity": "sha512-3GwPk8VhDFnUZ2TrgkhXJs6hcMAIIw4x/xkz+ayK6dGoQmp2nUwKzBXK0WnMsqkh6vfUhpqQicQF3rbshfyJkg==" 1191 | }, 1192 | "to-regex-range": { 1193 | "version": "5.0.1", 1194 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1195 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1196 | "requires": { 1197 | "is-number": "^7.0.0" 1198 | } 1199 | }, 1200 | "toidentifier": { 1201 | "version": "1.0.0", 1202 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 1203 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 1204 | }, 1205 | "type": { 1206 | "version": "1.2.0", 1207 | "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", 1208 | "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" 1209 | }, 1210 | "type-is": { 1211 | "version": "1.6.18", 1212 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1213 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1214 | "requires": { 1215 | "media-typer": "0.3.0", 1216 | "mime-types": "~2.1.24" 1217 | } 1218 | }, 1219 | "unpipe": { 1220 | "version": "1.0.0", 1221 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1222 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 1223 | }, 1224 | "url-parse": { 1225 | "version": "1.4.7", 1226 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", 1227 | "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", 1228 | "requires": { 1229 | "querystringify": "^2.1.1", 1230 | "requires-port": "^1.0.0" 1231 | } 1232 | }, 1233 | "utils-merge": { 1234 | "version": "1.0.1", 1235 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1236 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 1237 | }, 1238 | "vary": { 1239 | "version": "1.1.2", 1240 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1241 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 1242 | }, 1243 | "wrappy": { 1244 | "version": "1.0.2", 1245 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1246 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1247 | }, 1248 | "ws": { 1249 | "version": "7.2.5", 1250 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.5.tgz", 1251 | "integrity": "sha512-C34cIU4+DB2vMyAbmEKossWq2ZQDr6QEyuuCzWrM9zfw1sGc0mYiJ0UnG9zzNykt49C2Fi34hvr2vssFQRS6EA==" 1252 | } 1253 | } 1254 | } 1255 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "figma2css-app", 3 | "version": "0.0.6", 4 | "description": "", 5 | "main": "figma2css-app.js", 6 | "bin": "figma2css-app.js", 7 | "scripts": { 8 | "backend": "./node_modules/.bin/supervisor -k -- ./figma2css-app.js", 9 | "backend-test": "node ./__test__/endpoints.js", 10 | "frontend": "rollup -c -w", 11 | "build": "rollup -c", 12 | "start": "sirv ./public", 13 | "figma2css": "node ./figma2css-app.js" 14 | }, 15 | "keywords": [], 16 | "author": "", 17 | "license": "ISC", 18 | "dependencies": { 19 | "body-parser": "^1.19.0", 20 | "commander": "^5.1.0", 21 | "cors": "^2.8.5", 22 | "express": "^4.17.1", 23 | "figma2css-module": "^0.0.4", 24 | "figmafetch-module": "^1.0.4", 25 | "open": "^7.0.4", 26 | "reload": "^3.0.4", 27 | "supervisor": "^0.12.0", 28 | "@rollup/plugin-commonjs": "^12.0.0", 29 | "@rollup/plugin-node-resolve": "^8.0.0", 30 | "rollup": "^2.3.4", 31 | "rollup-plugin-livereload": "^1.0.0", 32 | "rollup-plugin-svelte": "^5.0.3", 33 | "rollup-plugin-terser": "^5.1.2", 34 | "sirv-cli": "^0.4.4", 35 | "svelte": "^3.0.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /public/build/bundle.css: -------------------------------------------------------------------------------- 1 | 2 | /*# sourceMappingURL=bundle.css.map */ -------------------------------------------------------------------------------- /public/build/bundle.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "file": "bundle.css", 4 | "sources": [], 5 | "sourcesContent": [], 6 | "names": [], 7 | "mappings": "" 8 | } -------------------------------------------------------------------------------- /public/build/bundle.js: -------------------------------------------------------------------------------- 1 | 2 | (function(l, r) { if (l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (window.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(window.document); 3 | var app = (function () { 4 | 'use strict'; 5 | 6 | function noop() { } 7 | function add_location(element, file, line, column, char) { 8 | element.__svelte_meta = { 9 | loc: { file, line, column, char } 10 | }; 11 | } 12 | function run(fn) { 13 | return fn(); 14 | } 15 | function blank_object() { 16 | return Object.create(null); 17 | } 18 | function run_all(fns) { 19 | fns.forEach(run); 20 | } 21 | function is_function(thing) { 22 | return typeof thing === 'function'; 23 | } 24 | function safe_not_equal(a, b) { 25 | return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); 26 | } 27 | 28 | function append(target, node) { 29 | target.appendChild(node); 30 | } 31 | function insert(target, node, anchor) { 32 | target.insertBefore(node, anchor || null); 33 | } 34 | function detach(node) { 35 | node.parentNode.removeChild(node); 36 | } 37 | function destroy_each(iterations, detaching) { 38 | for (let i = 0; i < iterations.length; i += 1) { 39 | if (iterations[i]) 40 | iterations[i].d(detaching); 41 | } 42 | } 43 | function element(name) { 44 | return document.createElement(name); 45 | } 46 | function text(data) { 47 | return document.createTextNode(data); 48 | } 49 | function space() { 50 | return text(' '); 51 | } 52 | function listen(node, event, handler, options) { 53 | node.addEventListener(event, handler, options); 54 | return () => node.removeEventListener(event, handler, options); 55 | } 56 | function attr(node, attribute, value) { 57 | if (value == null) 58 | node.removeAttribute(attribute); 59 | else if (node.getAttribute(attribute) !== value) 60 | node.setAttribute(attribute, value); 61 | } 62 | function children(element) { 63 | return Array.from(element.childNodes); 64 | } 65 | function set_input_value(input, value) { 66 | input.value = value == null ? '' : value; 67 | } 68 | function custom_event(type, detail) { 69 | const e = document.createEvent('CustomEvent'); 70 | e.initCustomEvent(type, false, false, detail); 71 | return e; 72 | } 73 | 74 | let current_component; 75 | function set_current_component(component) { 76 | current_component = component; 77 | } 78 | function get_current_component() { 79 | if (!current_component) 80 | throw new Error(`Function called outside component initialization`); 81 | return current_component; 82 | } 83 | function onMount(fn) { 84 | get_current_component().$$.on_mount.push(fn); 85 | } 86 | 87 | const dirty_components = []; 88 | const binding_callbacks = []; 89 | const render_callbacks = []; 90 | const flush_callbacks = []; 91 | const resolved_promise = Promise.resolve(); 92 | let update_scheduled = false; 93 | function schedule_update() { 94 | if (!update_scheduled) { 95 | update_scheduled = true; 96 | resolved_promise.then(flush); 97 | } 98 | } 99 | function add_render_callback(fn) { 100 | render_callbacks.push(fn); 101 | } 102 | function add_flush_callback(fn) { 103 | flush_callbacks.push(fn); 104 | } 105 | let flushing = false; 106 | const seen_callbacks = new Set(); 107 | function flush() { 108 | if (flushing) 109 | return; 110 | flushing = true; 111 | do { 112 | // first, call beforeUpdate functions 113 | // and update components 114 | for (let i = 0; i < dirty_components.length; i += 1) { 115 | const component = dirty_components[i]; 116 | set_current_component(component); 117 | update(component.$$); 118 | } 119 | dirty_components.length = 0; 120 | while (binding_callbacks.length) 121 | binding_callbacks.pop()(); 122 | // then, once components are updated, call 123 | // afterUpdate functions. This may cause 124 | // subsequent updates... 125 | for (let i = 0; i < render_callbacks.length; i += 1) { 126 | const callback = render_callbacks[i]; 127 | if (!seen_callbacks.has(callback)) { 128 | // ...so guard against infinite loops 129 | seen_callbacks.add(callback); 130 | callback(); 131 | } 132 | } 133 | render_callbacks.length = 0; 134 | } while (dirty_components.length); 135 | while (flush_callbacks.length) { 136 | flush_callbacks.pop()(); 137 | } 138 | update_scheduled = false; 139 | flushing = false; 140 | seen_callbacks.clear(); 141 | } 142 | function update($$) { 143 | if ($$.fragment !== null) { 144 | $$.update(); 145 | run_all($$.before_update); 146 | const dirty = $$.dirty; 147 | $$.dirty = [-1]; 148 | $$.fragment && $$.fragment.p($$.ctx, dirty); 149 | $$.after_update.forEach(add_render_callback); 150 | } 151 | } 152 | const outroing = new Set(); 153 | let outros; 154 | function group_outros() { 155 | outros = { 156 | r: 0, 157 | c: [], 158 | p: outros // parent group 159 | }; 160 | } 161 | function check_outros() { 162 | if (!outros.r) { 163 | run_all(outros.c); 164 | } 165 | outros = outros.p; 166 | } 167 | function transition_in(block, local) { 168 | if (block && block.i) { 169 | outroing.delete(block); 170 | block.i(local); 171 | } 172 | } 173 | function transition_out(block, local, detach, callback) { 174 | if (block && block.o) { 175 | if (outroing.has(block)) 176 | return; 177 | outroing.add(block); 178 | outros.c.push(() => { 179 | outroing.delete(block); 180 | if (callback) { 181 | if (detach) 182 | block.d(1); 183 | callback(); 184 | } 185 | }); 186 | block.o(local); 187 | } 188 | } 189 | 190 | const globals = (typeof window !== 'undefined' 191 | ? window 192 | : typeof globalThis !== 'undefined' 193 | ? globalThis 194 | : global); 195 | 196 | function bind(component, name, callback) { 197 | const index = component.$$.props[name]; 198 | if (index !== undefined) { 199 | component.$$.bound[index] = callback; 200 | callback(component.$$.ctx[index]); 201 | } 202 | } 203 | function create_component(block) { 204 | block && block.c(); 205 | } 206 | function mount_component(component, target, anchor) { 207 | const { fragment, on_mount, on_destroy, after_update } = component.$$; 208 | fragment && fragment.m(target, anchor); 209 | // onMount happens before the initial afterUpdate 210 | add_render_callback(() => { 211 | const new_on_destroy = on_mount.map(run).filter(is_function); 212 | if (on_destroy) { 213 | on_destroy.push(...new_on_destroy); 214 | } 215 | else { 216 | // Edge case - component was destroyed immediately, 217 | // most likely as a result of a binding initialising 218 | run_all(new_on_destroy); 219 | } 220 | component.$$.on_mount = []; 221 | }); 222 | after_update.forEach(add_render_callback); 223 | } 224 | function destroy_component(component, detaching) { 225 | const $$ = component.$$; 226 | if ($$.fragment !== null) { 227 | run_all($$.on_destroy); 228 | $$.fragment && $$.fragment.d(detaching); 229 | // TODO null out other refs, including component.$$ (but need to 230 | // preserve final state?) 231 | $$.on_destroy = $$.fragment = null; 232 | $$.ctx = []; 233 | } 234 | } 235 | function make_dirty(component, i) { 236 | if (component.$$.dirty[0] === -1) { 237 | dirty_components.push(component); 238 | schedule_update(); 239 | component.$$.dirty.fill(0); 240 | } 241 | component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); 242 | } 243 | function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { 244 | const parent_component = current_component; 245 | set_current_component(component); 246 | const prop_values = options.props || {}; 247 | const $$ = component.$$ = { 248 | fragment: null, 249 | ctx: null, 250 | // state 251 | props, 252 | update: noop, 253 | not_equal, 254 | bound: blank_object(), 255 | // lifecycle 256 | on_mount: [], 257 | on_destroy: [], 258 | before_update: [], 259 | after_update: [], 260 | context: new Map(parent_component ? parent_component.$$.context : []), 261 | // everything else 262 | callbacks: blank_object(), 263 | dirty 264 | }; 265 | let ready = false; 266 | $$.ctx = instance 267 | ? instance(component, prop_values, (i, ret, ...rest) => { 268 | const value = rest.length ? rest[0] : ret; 269 | if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { 270 | if ($$.bound[i]) 271 | $$.bound[i](value); 272 | if (ready) 273 | make_dirty(component, i); 274 | } 275 | return ret; 276 | }) 277 | : []; 278 | $$.update(); 279 | ready = true; 280 | run_all($$.before_update); 281 | // `false` as a special case of no DOM component 282 | $$.fragment = create_fragment ? create_fragment($$.ctx) : false; 283 | if (options.target) { 284 | if (options.hydrate) { 285 | const nodes = children(options.target); 286 | // eslint-disable-next-line @typescript-eslint/no-non-null-assertion 287 | $$.fragment && $$.fragment.l(nodes); 288 | nodes.forEach(detach); 289 | } 290 | else { 291 | // eslint-disable-next-line @typescript-eslint/no-non-null-assertion 292 | $$.fragment && $$.fragment.c(); 293 | } 294 | if (options.intro) 295 | transition_in(component.$$.fragment); 296 | mount_component(component, options.target, options.anchor); 297 | flush(); 298 | } 299 | set_current_component(parent_component); 300 | } 301 | class SvelteComponent { 302 | $destroy() { 303 | destroy_component(this, 1); 304 | this.$destroy = noop; 305 | } 306 | $on(type, callback) { 307 | const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); 308 | callbacks.push(callback); 309 | return () => { 310 | const index = callbacks.indexOf(callback); 311 | if (index !== -1) 312 | callbacks.splice(index, 1); 313 | }; 314 | } 315 | $set() { 316 | // overridden by instance, if it has props 317 | } 318 | } 319 | 320 | function dispatch_dev(type, detail) { 321 | document.dispatchEvent(custom_event(type, Object.assign({ version: '3.23.0' }, detail))); 322 | } 323 | function append_dev(target, node) { 324 | dispatch_dev("SvelteDOMInsert", { target, node }); 325 | append(target, node); 326 | } 327 | function insert_dev(target, node, anchor) { 328 | dispatch_dev("SvelteDOMInsert", { target, node, anchor }); 329 | insert(target, node, anchor); 330 | } 331 | function detach_dev(node) { 332 | dispatch_dev("SvelteDOMRemove", { node }); 333 | detach(node); 334 | } 335 | function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) { 336 | const modifiers = options === true ? ["capture"] : options ? Array.from(Object.keys(options)) : []; 337 | if (has_prevent_default) 338 | modifiers.push('preventDefault'); 339 | if (has_stop_propagation) 340 | modifiers.push('stopPropagation'); 341 | dispatch_dev("SvelteDOMAddEventListener", { node, event, handler, modifiers }); 342 | const dispose = listen(node, event, handler, options); 343 | return () => { 344 | dispatch_dev("SvelteDOMRemoveEventListener", { node, event, handler, modifiers }); 345 | dispose(); 346 | }; 347 | } 348 | function attr_dev(node, attribute, value) { 349 | attr(node, attribute, value); 350 | if (value == null) 351 | dispatch_dev("SvelteDOMRemoveAttribute", { node, attribute }); 352 | else 353 | dispatch_dev("SvelteDOMSetAttribute", { node, attribute, value }); 354 | } 355 | function set_data_dev(text, data) { 356 | data = '' + data; 357 | if (text.data === data) 358 | return; 359 | dispatch_dev("SvelteDOMSetData", { node: text, data }); 360 | text.data = data; 361 | } 362 | function validate_each_argument(arg) { 363 | if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) { 364 | let msg = '{#each} only iterates over array-like objects.'; 365 | if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) { 366 | msg += ' You can use a spread to convert this iterable into an array.'; 367 | } 368 | throw new Error(msg); 369 | } 370 | } 371 | function validate_slots(name, slot, keys) { 372 | for (const slot_key of Object.keys(slot)) { 373 | if (!~keys.indexOf(slot_key)) { 374 | console.warn(`<${name}> received an unexpected slot "${slot_key}".`); 375 | } 376 | } 377 | } 378 | class SvelteComponentDev extends SvelteComponent { 379 | constructor(options) { 380 | if (!options || (!options.target && !options.$$inline)) { 381 | throw new Error(`'target' is a required option`); 382 | } 383 | super(); 384 | } 385 | $destroy() { 386 | super.$destroy(); 387 | this.$destroy = () => { 388 | console.warn(`Component was already destroyed`); // eslint-disable-line no-console 389 | }; 390 | } 391 | $capture_state() { } 392 | $inject_state() { } 393 | } 394 | 395 | var baseUrl = `http://localhost:4200`; 396 | 397 | /* src/Node.svelte generated by Svelte v3.23.0 */ 398 | 399 | const file = "src/Node.svelte"; 400 | 401 | function get_each_context(ctx, list, i) { 402 | const child_ctx = ctx.slice(); 403 | child_ctx[5] = list[i]; 404 | return child_ctx; 405 | } 406 | 407 | // (14:28) {:else} 408 | function create_else_block(ctx) { 409 | let t; 410 | 411 | const block = { 412 | c: function create() { 413 | t = text("↓"); 414 | }, 415 | m: function mount(target, anchor) { 416 | insert_dev(target, t, anchor); 417 | }, 418 | d: function destroy(detaching) { 419 | if (detaching) detach_dev(t); 420 | } 421 | }; 422 | 423 | dispatch_dev("SvelteRegisterBlock", { 424 | block, 425 | id: create_else_block.name, 426 | type: "else", 427 | source: "(14:28) {:else}", 428 | ctx 429 | }); 430 | 431 | return block; 432 | } 433 | 434 | // (14:4) {#if data.isOpen} 435 | function create_if_block_1(ctx) { 436 | let t; 437 | 438 | const block = { 439 | c: function create() { 440 | t = text("↑"); 441 | }, 442 | m: function mount(target, anchor) { 443 | insert_dev(target, t, anchor); 444 | }, 445 | d: function destroy(detaching) { 446 | if (detaching) detach_dev(t); 447 | } 448 | }; 449 | 450 | dispatch_dev("SvelteRegisterBlock", { 451 | block, 452 | id: create_if_block_1.name, 453 | type: "if", 454 | source: "(14:4) {#if data.isOpen}", 455 | ctx 456 | }); 457 | 458 | return block; 459 | } 460 | 461 | // (18:2) {#if data.children} 462 | function create_if_block(ctx) { 463 | let ul; 464 | let ul_class_value; 465 | let current; 466 | let each_value = /*data*/ ctx[0].children; 467 | validate_each_argument(each_value); 468 | let each_blocks = []; 469 | 470 | for (let i = 0; i < each_value.length; i += 1) { 471 | each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); 472 | } 473 | 474 | const out = i => transition_out(each_blocks[i], 1, 1, () => { 475 | each_blocks[i] = null; 476 | }); 477 | 478 | const block = { 479 | c: function create() { 480 | ul = element("ul"); 481 | 482 | for (let i = 0; i < each_blocks.length; i += 1) { 483 | each_blocks[i].c(); 484 | } 485 | 486 | attr_dev(ul, "class", ul_class_value = "list pa0 pl3 " + (/*data*/ ctx[0].isOpen ? "db" : "dn")); 487 | add_location(ul, file, 18, 4, 541); 488 | }, 489 | m: function mount(target, anchor) { 490 | insert_dev(target, ul, anchor); 491 | 492 | for (let i = 0; i < each_blocks.length; i += 1) { 493 | each_blocks[i].m(ul, null); 494 | } 495 | 496 | current = true; 497 | }, 498 | p: function update(ctx, dirty) { 499 | if (dirty & /*data*/ 1) { 500 | each_value = /*data*/ ctx[0].children; 501 | validate_each_argument(each_value); 502 | let i; 503 | 504 | for (i = 0; i < each_value.length; i += 1) { 505 | const child_ctx = get_each_context(ctx, each_value, i); 506 | 507 | if (each_blocks[i]) { 508 | each_blocks[i].p(child_ctx, dirty); 509 | transition_in(each_blocks[i], 1); 510 | } else { 511 | each_blocks[i] = create_each_block(child_ctx); 512 | each_blocks[i].c(); 513 | transition_in(each_blocks[i], 1); 514 | each_blocks[i].m(ul, null); 515 | } 516 | } 517 | 518 | group_outros(); 519 | 520 | for (i = each_value.length; i < each_blocks.length; i += 1) { 521 | out(i); 522 | } 523 | 524 | check_outros(); 525 | } 526 | 527 | if (!current || dirty & /*data*/ 1 && ul_class_value !== (ul_class_value = "list pa0 pl3 " + (/*data*/ ctx[0].isOpen ? "db" : "dn"))) { 528 | attr_dev(ul, "class", ul_class_value); 529 | } 530 | }, 531 | i: function intro(local) { 532 | if (current) return; 533 | 534 | for (let i = 0; i < each_value.length; i += 1) { 535 | transition_in(each_blocks[i]); 536 | } 537 | 538 | current = true; 539 | }, 540 | o: function outro(local) { 541 | each_blocks = each_blocks.filter(Boolean); 542 | 543 | for (let i = 0; i < each_blocks.length; i += 1) { 544 | transition_out(each_blocks[i]); 545 | } 546 | 547 | current = false; 548 | }, 549 | d: function destroy(detaching) { 550 | if (detaching) detach_dev(ul); 551 | destroy_each(each_blocks, detaching); 552 | } 553 | }; 554 | 555 | dispatch_dev("SvelteRegisterBlock", { 556 | block, 557 | id: create_if_block.name, 558 | type: "if", 559 | source: "(18:2) {#if data.children}", 560 | ctx 561 | }); 562 | 563 | return block; 564 | } 565 | 566 | // (20:6) {#each data.children as child} 567 | function create_each_block(ctx) { 568 | let current; 569 | 570 | const node = new Node({ 571 | props: { 572 | data: /*child*/ ctx[5], 573 | isParentChecked: /*data*/ ctx[0].isChecked 574 | }, 575 | $$inline: true 576 | }); 577 | 578 | const block = { 579 | c: function create() { 580 | create_component(node.$$.fragment); 581 | }, 582 | m: function mount(target, anchor) { 583 | mount_component(node, target, anchor); 584 | current = true; 585 | }, 586 | p: function update(ctx, dirty) { 587 | const node_changes = {}; 588 | if (dirty & /*data*/ 1) node_changes.data = /*child*/ ctx[5]; 589 | if (dirty & /*data*/ 1) node_changes.isParentChecked = /*data*/ ctx[0].isChecked; 590 | node.$set(node_changes); 591 | }, 592 | i: function intro(local) { 593 | if (current) return; 594 | transition_in(node.$$.fragment, local); 595 | current = true; 596 | }, 597 | o: function outro(local) { 598 | transition_out(node.$$.fragment, local); 599 | current = false; 600 | }, 601 | d: function destroy(detaching) { 602 | destroy_component(node, detaching); 603 | } 604 | }; 605 | 606 | dispatch_dev("SvelteRegisterBlock", { 607 | block, 608 | id: create_each_block.name, 609 | type: "each", 610 | source: "(20:6) {#each data.children as child}", 611 | ctx 612 | }); 613 | 614 | return block; 615 | } 616 | 617 | function create_fragment(ctx) { 618 | let li; 619 | let span0; 620 | let span0_class_value; 621 | let t0; 622 | let span1; 623 | let input; 624 | let t1; 625 | let span2; 626 | let t2_value = /*data*/ ctx[0].name + ""; 627 | let t2; 628 | let t3; 629 | let current; 630 | let mounted; 631 | let dispose; 632 | 633 | function select_block_type(ctx, dirty) { 634 | if (/*data*/ ctx[0].isOpen) return create_if_block_1; 635 | return create_else_block; 636 | } 637 | 638 | let current_block_type = select_block_type(ctx); 639 | let if_block0 = current_block_type(ctx); 640 | let if_block1 = /*data*/ ctx[0].children && create_if_block(ctx); 641 | 642 | const block = { 643 | c: function create() { 644 | li = element("li"); 645 | span0 = element("span"); 646 | if_block0.c(); 647 | t0 = space(); 648 | span1 = element("span"); 649 | input = element("input"); 650 | t1 = space(); 651 | span2 = element("span"); 652 | t2 = text(t2_value); 653 | t3 = space(); 654 | if (if_block1) if_block1.c(); 655 | attr_dev(span0, "class", span0_class_value = "pointer " + (/*data*/ ctx[0].children ? "o-100" : "o-0")); 656 | add_location(span0, file, 10, 2, 251); 657 | attr_dev(input, "type", "checkbox"); 658 | add_location(input, file, 15, 8, 405); 659 | add_location(span1, file, 15, 2, 399); 660 | attr_dev(span2, "class", "w4 dib truncate"); 661 | add_location(span2, file, 16, 2, 466); 662 | attr_dev(li, "class", "list w7"); 663 | add_location(li, file, 9, 0, 228); 664 | }, 665 | l: function claim(nodes) { 666 | throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); 667 | }, 668 | m: function mount(target, anchor) { 669 | insert_dev(target, li, anchor); 670 | append_dev(li, span0); 671 | if_block0.m(span0, null); 672 | append_dev(li, t0); 673 | append_dev(li, span1); 674 | append_dev(span1, input); 675 | input.checked = /*data*/ ctx[0].isChecked; 676 | append_dev(li, t1); 677 | append_dev(li, span2); 678 | append_dev(span2, t2); 679 | append_dev(li, t3); 680 | if (if_block1) if_block1.m(li, null); 681 | current = true; 682 | 683 | if (!mounted) { 684 | dispose = [ 685 | listen_dev(span0, "click", /*toggleOpen*/ ctx[1], false, false, false), 686 | listen_dev(input, "change", /*input_change_handler*/ ctx[4]) 687 | ]; 688 | 689 | mounted = true; 690 | } 691 | }, 692 | p: function update(ctx, [dirty]) { 693 | if (current_block_type !== (current_block_type = select_block_type(ctx))) { 694 | if_block0.d(1); 695 | if_block0 = current_block_type(ctx); 696 | 697 | if (if_block0) { 698 | if_block0.c(); 699 | if_block0.m(span0, null); 700 | } 701 | } 702 | 703 | if (!current || dirty & /*data*/ 1 && span0_class_value !== (span0_class_value = "pointer " + (/*data*/ ctx[0].children ? "o-100" : "o-0"))) { 704 | attr_dev(span0, "class", span0_class_value); 705 | } 706 | 707 | if (dirty & /*data*/ 1) { 708 | input.checked = /*data*/ ctx[0].isChecked; 709 | } 710 | 711 | if ((!current || dirty & /*data*/ 1) && t2_value !== (t2_value = /*data*/ ctx[0].name + "")) set_data_dev(t2, t2_value); 712 | 713 | if (/*data*/ ctx[0].children) { 714 | if (if_block1) { 715 | if_block1.p(ctx, dirty); 716 | 717 | if (dirty & /*data*/ 1) { 718 | transition_in(if_block1, 1); 719 | } 720 | } else { 721 | if_block1 = create_if_block(ctx); 722 | if_block1.c(); 723 | transition_in(if_block1, 1); 724 | if_block1.m(li, null); 725 | } 726 | } else if (if_block1) { 727 | group_outros(); 728 | 729 | transition_out(if_block1, 1, 1, () => { 730 | if_block1 = null; 731 | }); 732 | 733 | check_outros(); 734 | } 735 | }, 736 | i: function intro(local) { 737 | if (current) return; 738 | transition_in(if_block1); 739 | current = true; 740 | }, 741 | o: function outro(local) { 742 | transition_out(if_block1); 743 | current = false; 744 | }, 745 | d: function destroy(detaching) { 746 | if (detaching) detach_dev(li); 747 | if_block0.d(); 748 | if (if_block1) if_block1.d(); 749 | mounted = false; 750 | run_all(dispose); 751 | } 752 | }; 753 | 754 | dispatch_dev("SvelteRegisterBlock", { 755 | block, 756 | id: create_fragment.name, 757 | type: "component", 758 | source: "", 759 | ctx 760 | }); 761 | 762 | return block; 763 | } 764 | 765 | function instance($$self, $$props, $$invalidate) { 766 | let { data } = $$props; 767 | let { isParentChecked } = $$props; 768 | const toggleOpen = () => $$invalidate(0, data.isOpen = !data.isOpen, data); 769 | const isChecked = isParentChecked => $$invalidate(0, data.isChecked = isParentChecked, data); 770 | const writable_props = ["data", "isParentChecked"]; 771 | 772 | Object.keys($$props).forEach(key => { 773 | if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); 774 | }); 775 | 776 | let { $$slots = {}, $$scope } = $$props; 777 | validate_slots("Node", $$slots, []); 778 | 779 | function input_change_handler() { 780 | data.isChecked = this.checked; 781 | $$invalidate(0, data); 782 | } 783 | 784 | $$self.$set = $$props => { 785 | if ("data" in $$props) $$invalidate(0, data = $$props.data); 786 | if ("isParentChecked" in $$props) $$invalidate(2, isParentChecked = $$props.isParentChecked); 787 | }; 788 | 789 | $$self.$capture_state = () => ({ 790 | data, 791 | isParentChecked, 792 | toggleOpen, 793 | isChecked 794 | }); 795 | 796 | $$self.$inject_state = $$props => { 797 | if ("data" in $$props) $$invalidate(0, data = $$props.data); 798 | if ("isParentChecked" in $$props) $$invalidate(2, isParentChecked = $$props.isParentChecked); 799 | }; 800 | 801 | if ($$props && "$$inject" in $$props) { 802 | $$self.$inject_state($$props.$$inject); 803 | } 804 | 805 | $$self.$$.update = () => { 806 | if ($$self.$$.dirty & /*isParentChecked*/ 4) { 807 | isChecked(isParentChecked); 808 | } 809 | }; 810 | 811 | return [data, toggleOpen, isParentChecked, isChecked, input_change_handler]; 812 | } 813 | 814 | class Node extends SvelteComponentDev { 815 | constructor(options) { 816 | super(options); 817 | init(this, options, instance, create_fragment, safe_not_equal, { data: 0, isParentChecked: 2 }); 818 | 819 | dispatch_dev("SvelteRegisterComponent", { 820 | component: this, 821 | tagName: "Node", 822 | options, 823 | id: create_fragment.name 824 | }); 825 | 826 | const { ctx } = this.$$; 827 | const props = options.props || {}; 828 | 829 | if (/*data*/ ctx[0] === undefined && !("data" in props)) { 830 | console.warn(" was created without expected prop 'data'"); 831 | } 832 | 833 | if (/*isParentChecked*/ ctx[2] === undefined && !("isParentChecked" in props)) { 834 | console.warn(" was created without expected prop 'isParentChecked'"); 835 | } 836 | } 837 | 838 | get data() { 839 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 840 | } 841 | 842 | set data(value) { 843 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 844 | } 845 | 846 | get isParentChecked() { 847 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 848 | } 849 | 850 | set isParentChecked(value) { 851 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 852 | } 853 | } 854 | 855 | /* src/TreeView.svelte generated by Svelte v3.23.0 */ 856 | const file$1 = "src/TreeView.svelte"; 857 | 858 | function get_each_context$1(ctx, list, i) { 859 | const child_ctx = ctx.slice(); 860 | child_ctx[3] = list[i]; 861 | return child_ctx; 862 | } 863 | 864 | // (22:2) {#each roots as root} 865 | function create_each_block$1(ctx) { 866 | let current; 867 | 868 | const node = new Node({ 869 | props: { 870 | data: /*root*/ ctx[3], 871 | isParentChecked: /*root*/ ctx[3].isChecked 872 | }, 873 | $$inline: true 874 | }); 875 | 876 | const block = { 877 | c: function create() { 878 | create_component(node.$$.fragment); 879 | }, 880 | m: function mount(target, anchor) { 881 | mount_component(node, target, anchor); 882 | current = true; 883 | }, 884 | p: function update(ctx, dirty) { 885 | const node_changes = {}; 886 | if (dirty & /*roots*/ 1) node_changes.data = /*root*/ ctx[3]; 887 | if (dirty & /*roots*/ 1) node_changes.isParentChecked = /*root*/ ctx[3].isChecked; 888 | node.$set(node_changes); 889 | }, 890 | i: function intro(local) { 891 | if (current) return; 892 | transition_in(node.$$.fragment, local); 893 | current = true; 894 | }, 895 | o: function outro(local) { 896 | transition_out(node.$$.fragment, local); 897 | current = false; 898 | }, 899 | d: function destroy(detaching) { 900 | destroy_component(node, detaching); 901 | } 902 | }; 903 | 904 | dispatch_dev("SvelteRegisterBlock", { 905 | block, 906 | id: create_each_block$1.name, 907 | type: "each", 908 | source: "(22:2) {#each roots as root}", 909 | ctx 910 | }); 911 | 912 | return block; 913 | } 914 | 915 | function create_fragment$1(ctx) { 916 | let ul; 917 | let current; 918 | let each_value = /*roots*/ ctx[0]; 919 | validate_each_argument(each_value); 920 | let each_blocks = []; 921 | 922 | for (let i = 0; i < each_value.length; i += 1) { 923 | each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i)); 924 | } 925 | 926 | const out = i => transition_out(each_blocks[i], 1, 1, () => { 927 | each_blocks[i] = null; 928 | }); 929 | 930 | const block = { 931 | c: function create() { 932 | ul = element("ul"); 933 | 934 | for (let i = 0; i < each_blocks.length; i += 1) { 935 | each_blocks[i].c(); 936 | } 937 | 938 | attr_dev(ul, "class", "list pa0 pl3"); 939 | add_location(ul, file$1, 20, 0, 482); 940 | }, 941 | l: function claim(nodes) { 942 | throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); 943 | }, 944 | m: function mount(target, anchor) { 945 | insert_dev(target, ul, anchor); 946 | 947 | for (let i = 0; i < each_blocks.length; i += 1) { 948 | each_blocks[i].m(ul, null); 949 | } 950 | 951 | current = true; 952 | }, 953 | p: function update(ctx, [dirty]) { 954 | if (dirty & /*roots*/ 1) { 955 | each_value = /*roots*/ ctx[0]; 956 | validate_each_argument(each_value); 957 | let i; 958 | 959 | for (i = 0; i < each_value.length; i += 1) { 960 | const child_ctx = get_each_context$1(ctx, each_value, i); 961 | 962 | if (each_blocks[i]) { 963 | each_blocks[i].p(child_ctx, dirty); 964 | transition_in(each_blocks[i], 1); 965 | } else { 966 | each_blocks[i] = create_each_block$1(child_ctx); 967 | each_blocks[i].c(); 968 | transition_in(each_blocks[i], 1); 969 | each_blocks[i].m(ul, null); 970 | } 971 | } 972 | 973 | group_outros(); 974 | 975 | for (i = each_value.length; i < each_blocks.length; i += 1) { 976 | out(i); 977 | } 978 | 979 | check_outros(); 980 | } 981 | }, 982 | i: function intro(local) { 983 | if (current) return; 984 | 985 | for (let i = 0; i < each_value.length; i += 1) { 986 | transition_in(each_blocks[i]); 987 | } 988 | 989 | current = true; 990 | }, 991 | o: function outro(local) { 992 | each_blocks = each_blocks.filter(Boolean); 993 | 994 | for (let i = 0; i < each_blocks.length; i += 1) { 995 | transition_out(each_blocks[i]); 996 | } 997 | 998 | current = false; 999 | }, 1000 | d: function destroy(detaching) { 1001 | if (detaching) detach_dev(ul); 1002 | destroy_each(each_blocks, detaching); 1003 | } 1004 | }; 1005 | 1006 | dispatch_dev("SvelteRegisterBlock", { 1007 | block, 1008 | id: create_fragment$1.name, 1009 | type: "component", 1010 | source: "", 1011 | ctx 1012 | }); 1013 | 1014 | return block; 1015 | } 1016 | 1017 | function instance$1($$self, $$props, $$invalidate) { 1018 | let { treeData = "" } = $$props; 1019 | let roots = []; 1020 | 1021 | const loadData = data => { 1022 | if (!data) return; 1023 | 1024 | let transformTreeView = child => { 1025 | child.isOpen = true; 1026 | child.isChecked = false; 1027 | if (child.children) child.children = child.children.map(child => transformTreeView(child)); 1028 | return child; 1029 | }; 1030 | 1031 | $$invalidate(0, roots = data.document.children.map(child => transformTreeView(child))); 1032 | }; 1033 | 1034 | const writable_props = ["treeData"]; 1035 | 1036 | Object.keys($$props).forEach(key => { 1037 | if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); 1038 | }); 1039 | 1040 | let { $$slots = {}, $$scope } = $$props; 1041 | validate_slots("TreeView", $$slots, []); 1042 | 1043 | $$self.$set = $$props => { 1044 | if ("treeData" in $$props) $$invalidate(1, treeData = $$props.treeData); 1045 | }; 1046 | 1047 | $$self.$capture_state = () => ({ Node, treeData, roots, loadData }); 1048 | 1049 | $$self.$inject_state = $$props => { 1050 | if ("treeData" in $$props) $$invalidate(1, treeData = $$props.treeData); 1051 | if ("roots" in $$props) $$invalidate(0, roots = $$props.roots); 1052 | }; 1053 | 1054 | if ($$props && "$$inject" in $$props) { 1055 | $$self.$inject_state($$props.$$inject); 1056 | } 1057 | 1058 | $$self.$$.update = () => { 1059 | if ($$self.$$.dirty & /*treeData*/ 2) { 1060 | loadData(treeData); 1061 | } 1062 | }; 1063 | 1064 | return [roots, treeData]; 1065 | } 1066 | 1067 | class TreeView extends SvelteComponentDev { 1068 | constructor(options) { 1069 | super(options); 1070 | init(this, options, instance$1, create_fragment$1, safe_not_equal, { treeData: 1 }); 1071 | 1072 | dispatch_dev("SvelteRegisterComponent", { 1073 | component: this, 1074 | tagName: "TreeView", 1075 | options, 1076 | id: create_fragment$1.name 1077 | }); 1078 | } 1079 | 1080 | get treeData() { 1081 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 1082 | } 1083 | 1084 | set treeData(value) { 1085 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 1086 | } 1087 | } 1088 | 1089 | /* src/Input.svelte generated by Svelte v3.23.0 */ 1090 | 1091 | const file$2 = "src/Input.svelte"; 1092 | 1093 | function create_fragment$2(ctx) { 1094 | let div; 1095 | let label_1; 1096 | let t0; 1097 | let t1; 1098 | let input; 1099 | let input_class_value; 1100 | let t2; 1101 | let p; 1102 | let t3; 1103 | let div_class_value; 1104 | let mounted; 1105 | let dispose; 1106 | 1107 | const block = { 1108 | c: function create() { 1109 | div = element("div"); 1110 | label_1 = element("label"); 1111 | t0 = text(/*label*/ ctx[2]); 1112 | t1 = space(); 1113 | input = element("input"); 1114 | t2 = space(); 1115 | p = element("p"); 1116 | t3 = text(/*error*/ ctx[4]); 1117 | attr_dev(label_1, "class", "mb2"); 1118 | add_location(label_1, file$2, 10, 2, 188); 1119 | attr_dev(input, "id", /*id*/ ctx[1]); 1120 | attr_dev(input, "class", input_class_value = `border-box h2 input-reset ba br2 b--moon-gray pa0 pl2`); 1121 | attr_dev(input, "placeholder", /*placeholder*/ ctx[3]); 1122 | input.required = true; 1123 | add_location(input, file$2, 11, 2, 225); 1124 | attr_dev(p, "classname", "ma0 pt1"); 1125 | add_location(p, file$2, 13, 2, 367); 1126 | attr_dev(div, "class", div_class_value = `flex flex-column mr3 f7 w6 ${/*css*/ ctx[5]}`); 1127 | add_location(div, file$2, 9, 0, 136); 1128 | }, 1129 | l: function claim(nodes) { 1130 | throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); 1131 | }, 1132 | m: function mount(target, anchor) { 1133 | insert_dev(target, div, anchor); 1134 | append_dev(div, label_1); 1135 | append_dev(label_1, t0); 1136 | append_dev(div, t1); 1137 | append_dev(div, input); 1138 | set_input_value(input, /*value*/ ctx[0]); 1139 | append_dev(div, t2); 1140 | append_dev(div, p); 1141 | append_dev(p, t3); 1142 | 1143 | if (!mounted) { 1144 | dispose = listen_dev(input, "input", /*input_input_handler*/ ctx[6]); 1145 | mounted = true; 1146 | } 1147 | }, 1148 | p: function update(ctx, [dirty]) { 1149 | if (dirty & /*label*/ 4) set_data_dev(t0, /*label*/ ctx[2]); 1150 | 1151 | if (dirty & /*id*/ 2) { 1152 | attr_dev(input, "id", /*id*/ ctx[1]); 1153 | } 1154 | 1155 | if (dirty & /*placeholder*/ 8) { 1156 | attr_dev(input, "placeholder", /*placeholder*/ ctx[3]); 1157 | } 1158 | 1159 | if (dirty & /*value*/ 1 && input.value !== /*value*/ ctx[0]) { 1160 | set_input_value(input, /*value*/ ctx[0]); 1161 | } 1162 | 1163 | if (dirty & /*error*/ 16) set_data_dev(t3, /*error*/ ctx[4]); 1164 | 1165 | if (dirty & /*css*/ 32 && div_class_value !== (div_class_value = `flex flex-column mr3 f7 w6 ${/*css*/ ctx[5]}`)) { 1166 | attr_dev(div, "class", div_class_value); 1167 | } 1168 | }, 1169 | i: noop, 1170 | o: noop, 1171 | d: function destroy(detaching) { 1172 | if (detaching) detach_dev(div); 1173 | mounted = false; 1174 | dispose(); 1175 | } 1176 | }; 1177 | 1178 | dispatch_dev("SvelteRegisterBlock", { 1179 | block, 1180 | id: create_fragment$2.name, 1181 | type: "component", 1182 | source: "", 1183 | ctx 1184 | }); 1185 | 1186 | return block; 1187 | } 1188 | 1189 | function instance$2($$self, $$props, $$invalidate) { 1190 | let { id } = $$props; 1191 | let { label } = $$props; 1192 | let { value } = $$props; 1193 | let { placeholder } = $$props; 1194 | let { error } = $$props; 1195 | let { css } = $$props; 1196 | const writable_props = ["id", "label", "value", "placeholder", "error", "css"]; 1197 | 1198 | Object.keys($$props).forEach(key => { 1199 | if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); 1200 | }); 1201 | 1202 | let { $$slots = {}, $$scope } = $$props; 1203 | validate_slots("Input", $$slots, []); 1204 | 1205 | function input_input_handler() { 1206 | value = this.value; 1207 | $$invalidate(0, value); 1208 | } 1209 | 1210 | $$self.$set = $$props => { 1211 | if ("id" in $$props) $$invalidate(1, id = $$props.id); 1212 | if ("label" in $$props) $$invalidate(2, label = $$props.label); 1213 | if ("value" in $$props) $$invalidate(0, value = $$props.value); 1214 | if ("placeholder" in $$props) $$invalidate(3, placeholder = $$props.placeholder); 1215 | if ("error" in $$props) $$invalidate(4, error = $$props.error); 1216 | if ("css" in $$props) $$invalidate(5, css = $$props.css); 1217 | }; 1218 | 1219 | $$self.$capture_state = () => ({ 1220 | id, 1221 | label, 1222 | value, 1223 | placeholder, 1224 | error, 1225 | css 1226 | }); 1227 | 1228 | $$self.$inject_state = $$props => { 1229 | if ("id" in $$props) $$invalidate(1, id = $$props.id); 1230 | if ("label" in $$props) $$invalidate(2, label = $$props.label); 1231 | if ("value" in $$props) $$invalidate(0, value = $$props.value); 1232 | if ("placeholder" in $$props) $$invalidate(3, placeholder = $$props.placeholder); 1233 | if ("error" in $$props) $$invalidate(4, error = $$props.error); 1234 | if ("css" in $$props) $$invalidate(5, css = $$props.css); 1235 | }; 1236 | 1237 | if ($$props && "$$inject" in $$props) { 1238 | $$self.$inject_state($$props.$$inject); 1239 | } 1240 | 1241 | return [value, id, label, placeholder, error, css, input_input_handler]; 1242 | } 1243 | 1244 | class Input extends SvelteComponentDev { 1245 | constructor(options) { 1246 | super(options); 1247 | 1248 | init(this, options, instance$2, create_fragment$2, safe_not_equal, { 1249 | id: 1, 1250 | label: 2, 1251 | value: 0, 1252 | placeholder: 3, 1253 | error: 4, 1254 | css: 5 1255 | }); 1256 | 1257 | dispatch_dev("SvelteRegisterComponent", { 1258 | component: this, 1259 | tagName: "Input", 1260 | options, 1261 | id: create_fragment$2.name 1262 | }); 1263 | 1264 | const { ctx } = this.$$; 1265 | const props = options.props || {}; 1266 | 1267 | if (/*id*/ ctx[1] === undefined && !("id" in props)) { 1268 | console.warn(" was created without expected prop 'id'"); 1269 | } 1270 | 1271 | if (/*label*/ ctx[2] === undefined && !("label" in props)) { 1272 | console.warn(" was created without expected prop 'label'"); 1273 | } 1274 | 1275 | if (/*value*/ ctx[0] === undefined && !("value" in props)) { 1276 | console.warn(" was created without expected prop 'value'"); 1277 | } 1278 | 1279 | if (/*placeholder*/ ctx[3] === undefined && !("placeholder" in props)) { 1280 | console.warn(" was created without expected prop 'placeholder'"); 1281 | } 1282 | 1283 | if (/*error*/ ctx[4] === undefined && !("error" in props)) { 1284 | console.warn(" was created without expected prop 'error'"); 1285 | } 1286 | 1287 | if (/*css*/ ctx[5] === undefined && !("css" in props)) { 1288 | console.warn(" was created without expected prop 'css'"); 1289 | } 1290 | } 1291 | 1292 | get id() { 1293 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 1294 | } 1295 | 1296 | set id(value) { 1297 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 1298 | } 1299 | 1300 | get label() { 1301 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 1302 | } 1303 | 1304 | set label(value) { 1305 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 1306 | } 1307 | 1308 | get value() { 1309 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 1310 | } 1311 | 1312 | set value(value) { 1313 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 1314 | } 1315 | 1316 | get placeholder() { 1317 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 1318 | } 1319 | 1320 | set placeholder(value) { 1321 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 1322 | } 1323 | 1324 | get error() { 1325 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 1326 | } 1327 | 1328 | set error(value) { 1329 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 1330 | } 1331 | 1332 | get css() { 1333 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); 1334 | } 1335 | 1336 | set css(value) { 1337 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); 1338 | } 1339 | } 1340 | 1341 | /* src/CSSGenerator.svelte generated by Svelte v3.23.0 */ 1342 | 1343 | const file$3 = "src/CSSGenerator.svelte"; 1344 | 1345 | function create_fragment$3(ctx) { 1346 | let div; 1347 | 1348 | const block = { 1349 | c: function create() { 1350 | div = element("div"); 1351 | attr_dev(div, "id", "generator"); 1352 | add_location(div, file$3, 3, 0, 20); 1353 | }, 1354 | l: function claim(nodes) { 1355 | throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); 1356 | }, 1357 | m: function mount(target, anchor) { 1358 | insert_dev(target, div, anchor); 1359 | }, 1360 | p: noop, 1361 | i: noop, 1362 | o: noop, 1363 | d: function destroy(detaching) { 1364 | if (detaching) detach_dev(div); 1365 | } 1366 | }; 1367 | 1368 | dispatch_dev("SvelteRegisterBlock", { 1369 | block, 1370 | id: create_fragment$3.name, 1371 | type: "component", 1372 | source: "", 1373 | ctx 1374 | }); 1375 | 1376 | return block; 1377 | } 1378 | 1379 | function instance$3($$self, $$props) { 1380 | const writable_props = []; 1381 | 1382 | Object.keys($$props).forEach(key => { 1383 | if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); 1384 | }); 1385 | 1386 | let { $$slots = {}, $$scope } = $$props; 1387 | validate_slots("CSSGenerator", $$slots, []); 1388 | return []; 1389 | } 1390 | 1391 | class CSSGenerator extends SvelteComponentDev { 1392 | constructor(options) { 1393 | super(options); 1394 | init(this, options, instance$3, create_fragment$3, safe_not_equal, {}); 1395 | 1396 | dispatch_dev("SvelteRegisterComponent", { 1397 | component: this, 1398 | tagName: "CSSGenerator", 1399 | options, 1400 | id: create_fragment$3.name 1401 | }); 1402 | } 1403 | } 1404 | 1405 | /* src/App.svelte generated by Svelte v3.23.0 */ 1406 | 1407 | const { console: console_1 } = globals; 1408 | const file$4 = "src/App.svelte"; 1409 | 1410 | // (195:2) {#if loading} 1411 | function create_if_block$1(ctx) { 1412 | let div; 1413 | let img; 1414 | let img_src_value; 1415 | 1416 | const block = { 1417 | c: function create() { 1418 | div = element("div"); 1419 | img = element("img"); 1420 | attr_dev(img, "class", "w2 h2"); 1421 | if (img.src !== (img_src_value = "https://i.ya-webdesign.com/images/loading-png-gif.gif")) attr_dev(img, "src", img_src_value); 1422 | attr_dev(img, "alt", "loading"); 1423 | add_location(img, file$4, 196, 6, 4520); 1424 | attr_dev(div, "class", "bg-white-50 fixed w-100 h-100 z-999 flex justify-center items-center"); 1425 | add_location(div, file$4, 195, 4, 4431); 1426 | }, 1427 | m: function mount(target, anchor) { 1428 | insert_dev(target, div, anchor); 1429 | append_dev(div, img); 1430 | }, 1431 | d: function destroy(detaching) { 1432 | if (detaching) detach_dev(div); 1433 | } 1434 | }; 1435 | 1436 | dispatch_dev("SvelteRegisterBlock", { 1437 | block, 1438 | id: create_if_block$1.name, 1439 | type: "if", 1440 | source: "(195:2) {#if loading}", 1441 | ctx 1442 | }); 1443 | 1444 | return block; 1445 | } 1446 | 1447 | function create_fragment$4(ctx) { 1448 | let main; 1449 | let header; 1450 | let t0; 1451 | let t1; 1452 | let div1; 1453 | let div0; 1454 | let updating_value; 1455 | let t2; 1456 | let updating_value_1; 1457 | let t3; 1458 | let button0; 1459 | let t5; 1460 | let div3; 1461 | let updating_value_2; 1462 | let t6; 1463 | let p; 1464 | let t8; 1465 | let div2; 1466 | let button1; 1467 | let t10; 1468 | let button2; 1469 | let t11_value = (/*isWatching*/ ctx[1] ? "Stop Watching!" : "Watch") + ""; 1470 | let t11; 1471 | let button2_class_value; 1472 | let t12; 1473 | let div6; 1474 | let div4; 1475 | let t13; 1476 | let div5; 1477 | let textarea; 1478 | let t14; 1479 | let t15; 1480 | let footer; 1481 | let current; 1482 | let mounted; 1483 | let dispose; 1484 | let if_block = /*loading*/ ctx[2] && create_if_block$1(ctx); 1485 | 1486 | function input0_value_binding(value) { 1487 | /*input0_value_binding*/ ctx[26].call(null, value); 1488 | } 1489 | 1490 | let input0_props = { 1491 | id: "figmaToken", 1492 | label: "Figma Access Token*", 1493 | placeholder: "Figma Access Token", 1494 | error: /*figmaTokenError*/ ctx[8] 1495 | }; 1496 | 1497 | if (/*figmaToken*/ ctx[4] !== void 0) { 1498 | input0_props.value = /*figmaToken*/ ctx[4]; 1499 | } 1500 | 1501 | const input0 = new Input({ props: input0_props, $$inline: true }); 1502 | binding_callbacks.push(() => bind(input0, "value", input0_value_binding)); 1503 | 1504 | function input1_value_binding(value) { 1505 | /*input1_value_binding*/ ctx[27].call(null, value); 1506 | } 1507 | 1508 | let input1_props = { 1509 | css: "ew8", 1510 | id: "fileURL", 1511 | label: "File URL*", 1512 | placeholder: "File URL*", 1513 | error: /*fileURLError*/ ctx[7] 1514 | }; 1515 | 1516 | if (/*fileURL*/ ctx[5] !== void 0) { 1517 | input1_props.value = /*fileURL*/ ctx[5]; 1518 | } 1519 | 1520 | const input1 = new Input({ props: input1_props, $$inline: true }); 1521 | binding_callbacks.push(() => bind(input1, "value", input1_value_binding)); 1522 | 1523 | function input2_value_binding(value) { 1524 | /*input2_value_binding*/ ctx[28].call(null, value); 1525 | } 1526 | 1527 | let input2_props = { 1528 | css: "ew8", 1529 | id: "output-path", 1530 | label: "Full Output Path", 1531 | placeholder: "Full Output Path", 1532 | error: /*outputPathError*/ ctx[9] 1533 | }; 1534 | 1535 | if (/*filePath*/ ctx[0] !== void 0) { 1536 | input2_props.value = /*filePath*/ ctx[0]; 1537 | } 1538 | 1539 | const input2 = new Input({ props: input2_props, $$inline: true }); 1540 | binding_callbacks.push(() => bind(input2, "value", input2_value_binding)); 1541 | 1542 | const treeview = new TreeView({ 1543 | props: { treeData: /*treeData*/ ctx[3] }, 1544 | $$inline: true 1545 | }); 1546 | 1547 | const cssgenerator = new CSSGenerator({ $$inline: true }); 1548 | 1549 | const block = { 1550 | c: function create() { 1551 | main = element("main"); 1552 | header = element("header"); 1553 | t0 = space(); 1554 | if (if_block) if_block.c(); 1555 | t1 = space(); 1556 | div1 = element("div"); 1557 | div0 = element("div"); 1558 | create_component(input0.$$.fragment); 1559 | t2 = space(); 1560 | create_component(input1.$$.fragment); 1561 | t3 = space(); 1562 | button0 = element("button"); 1563 | button0.textContent = "Load Data"; 1564 | t5 = space(); 1565 | div3 = element("div"); 1566 | create_component(input2.$$.fragment); 1567 | t6 = space(); 1568 | p = element("p"); 1569 | p.textContent = "Select the css file output, select the nodes in the treeview and click generate"; 1570 | t8 = space(); 1571 | div2 = element("div"); 1572 | button1 = element("button"); 1573 | button1.textContent = "Generate CSS"; 1574 | t10 = space(); 1575 | button2 = element("button"); 1576 | t11 = text(t11_value); 1577 | t12 = space(); 1578 | div6 = element("div"); 1579 | div4 = element("div"); 1580 | create_component(treeview.$$.fragment); 1581 | t13 = space(); 1582 | div5 = element("div"); 1583 | textarea = element("textarea"); 1584 | t14 = space(); 1585 | create_component(cssgenerator.$$.fragment); 1586 | t15 = space(); 1587 | footer = element("footer"); 1588 | add_location(header, file$4, 192, 2, 4390); 1589 | attr_dev(div0, "class", "flex"); 1590 | add_location(div0, file$4, 203, 4, 4730); 1591 | attr_dev(button0, "class", "bn bg-green white br2 h2 f7 w4 pointer"); 1592 | add_location(button0, file$4, 212, 4, 5079); 1593 | attr_dev(div1, "class", "flex justify-between items-center bb b--light-gray ph4 pv3"); 1594 | add_location(div1, file$4, 202, 2, 4653); 1595 | attr_dev(p, "class", "pa0 ma0 f7"); 1596 | add_location(p, file$4, 221, 4, 5444); 1597 | attr_dev(button1, "class", "mr3 bn bg-green white br2 h2 f7 w4 pointer"); 1598 | add_location(button1, file$4, 223, 6, 5579); 1599 | attr_dev(button2, "class", button2_class_value = `${/*isWatching*/ ctx[1] ? "bg-red" : "bg-green"} bn white br2 h2 f7 w4 pointer`); 1600 | add_location(button2, file$4, 227, 6, 5710); 1601 | attr_dev(div2, "class", "flex"); 1602 | add_location(div2, file$4, 222, 4, 5554); 1603 | attr_dev(div3, "class", "flex items-center justify-between bb b--light-gray ph4 pv2"); 1604 | add_location(div3, file$4, 216, 2, 5200); 1605 | attr_dev(div4, "class", "w7 bg-light-gray overflow-auto"); 1606 | add_location(div4, file$4, 234, 4, 5954); 1607 | attr_dev(textarea, "class", "w-100 h-100"); 1608 | add_location(textarea, file$4, 238, 6, 6109); 1609 | attr_dev(div5, "class", "w-100 h-100 pa3 flex justify-center"); 1610 | add_location(div5, file$4, 237, 4, 6053); 1611 | attr_dev(div6, "class", "flex relative h-100 w-100"); 1612 | add_location(div6, file$4, 233, 2, 5910); 1613 | add_location(footer, file$4, 242, 2, 6214); 1614 | add_location(main, file$4, 191, 0, 4381); 1615 | }, 1616 | l: function claim(nodes) { 1617 | throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); 1618 | }, 1619 | m: function mount(target, anchor) { 1620 | insert_dev(target, main, anchor); 1621 | append_dev(main, header); 1622 | append_dev(main, t0); 1623 | if (if_block) if_block.m(main, null); 1624 | append_dev(main, t1); 1625 | append_dev(main, div1); 1626 | append_dev(div1, div0); 1627 | mount_component(input0, div0, null); 1628 | append_dev(div0, t2); 1629 | mount_component(input1, div0, null); 1630 | append_dev(div1, t3); 1631 | append_dev(div1, button0); 1632 | append_dev(main, t5); 1633 | append_dev(main, div3); 1634 | mount_component(input2, div3, null); 1635 | append_dev(div3, t6); 1636 | append_dev(div3, p); 1637 | append_dev(div3, t8); 1638 | append_dev(div3, div2); 1639 | append_dev(div2, button1); 1640 | append_dev(div2, t10); 1641 | append_dev(div2, button2); 1642 | append_dev(button2, t11); 1643 | append_dev(main, t12); 1644 | append_dev(main, div6); 1645 | append_dev(div6, div4); 1646 | mount_component(treeview, div4, null); 1647 | append_dev(div6, t13); 1648 | append_dev(div6, div5); 1649 | append_dev(div5, textarea); 1650 | set_input_value(textarea, /*resultCss*/ ctx[6]); 1651 | append_dev(main, t14); 1652 | mount_component(cssgenerator, main, null); 1653 | append_dev(main, t15); 1654 | append_dev(main, footer); 1655 | current = true; 1656 | 1657 | if (!mounted) { 1658 | dispose = [ 1659 | listen_dev(button0, "click", /*loadTreeView*/ ctx[10], false, false, false), 1660 | listen_dev(button1, "click", /*generate*/ ctx[12], false, false, false), 1661 | listen_dev(button2, "click", /*watch*/ ctx[11], false, false, false), 1662 | listen_dev(textarea, "input", /*textarea_input_handler*/ ctx[29]) 1663 | ]; 1664 | 1665 | mounted = true; 1666 | } 1667 | }, 1668 | p: function update(ctx, [dirty]) { 1669 | if (/*loading*/ ctx[2]) { 1670 | if (if_block) ; else { 1671 | if_block = create_if_block$1(ctx); 1672 | if_block.c(); 1673 | if_block.m(main, t1); 1674 | } 1675 | } else if (if_block) { 1676 | if_block.d(1); 1677 | if_block = null; 1678 | } 1679 | 1680 | const input0_changes = {}; 1681 | 1682 | if (!updating_value && dirty & /*figmaToken*/ 16) { 1683 | updating_value = true; 1684 | input0_changes.value = /*figmaToken*/ ctx[4]; 1685 | add_flush_callback(() => updating_value = false); 1686 | } 1687 | 1688 | input0.$set(input0_changes); 1689 | const input1_changes = {}; 1690 | if (dirty & /*fileURLError*/ 128) input1_changes.error = /*fileURLError*/ ctx[7]; 1691 | 1692 | if (!updating_value_1 && dirty & /*fileURL*/ 32) { 1693 | updating_value_1 = true; 1694 | input1_changes.value = /*fileURL*/ ctx[5]; 1695 | add_flush_callback(() => updating_value_1 = false); 1696 | } 1697 | 1698 | input1.$set(input1_changes); 1699 | const input2_changes = {}; 1700 | 1701 | if (!updating_value_2 && dirty & /*filePath*/ 1) { 1702 | updating_value_2 = true; 1703 | input2_changes.value = /*filePath*/ ctx[0]; 1704 | add_flush_callback(() => updating_value_2 = false); 1705 | } 1706 | 1707 | input2.$set(input2_changes); 1708 | if ((!current || dirty & /*isWatching*/ 2) && t11_value !== (t11_value = (/*isWatching*/ ctx[1] ? "Stop Watching!" : "Watch") + "")) set_data_dev(t11, t11_value); 1709 | 1710 | if (!current || dirty & /*isWatching*/ 2 && button2_class_value !== (button2_class_value = `${/*isWatching*/ ctx[1] ? "bg-red" : "bg-green"} bn white br2 h2 f7 w4 pointer`)) { 1711 | attr_dev(button2, "class", button2_class_value); 1712 | } 1713 | 1714 | const treeview_changes = {}; 1715 | if (dirty & /*treeData*/ 8) treeview_changes.treeData = /*treeData*/ ctx[3]; 1716 | treeview.$set(treeview_changes); 1717 | 1718 | if (dirty & /*resultCss*/ 64) { 1719 | set_input_value(textarea, /*resultCss*/ ctx[6]); 1720 | } 1721 | }, 1722 | i: function intro(local) { 1723 | if (current) return; 1724 | transition_in(input0.$$.fragment, local); 1725 | transition_in(input1.$$.fragment, local); 1726 | transition_in(input2.$$.fragment, local); 1727 | transition_in(treeview.$$.fragment, local); 1728 | transition_in(cssgenerator.$$.fragment, local); 1729 | current = true; 1730 | }, 1731 | o: function outro(local) { 1732 | transition_out(input0.$$.fragment, local); 1733 | transition_out(input1.$$.fragment, local); 1734 | transition_out(input2.$$.fragment, local); 1735 | transition_out(treeview.$$.fragment, local); 1736 | transition_out(cssgenerator.$$.fragment, local); 1737 | current = false; 1738 | }, 1739 | d: function destroy(detaching) { 1740 | if (detaching) detach_dev(main); 1741 | if (if_block) if_block.d(); 1742 | destroy_component(input0); 1743 | destroy_component(input1); 1744 | destroy_component(input2); 1745 | destroy_component(treeview); 1746 | destroy_component(cssgenerator); 1747 | mounted = false; 1748 | run_all(dispose); 1749 | } 1750 | }; 1751 | 1752 | dispatch_dev("SvelteRegisterBlock", { 1753 | block, 1754 | id: create_fragment$4.name, 1755 | type: "component", 1756 | source: "", 1757 | ctx 1758 | }); 1759 | 1760 | return block; 1761 | } 1762 | 1763 | function instance$4($$self, $$props, $$invalidate) { 1764 | let filePath = ""; 1765 | let isWatching = false; 1766 | 1767 | let loading = false, 1768 | treeData = "", 1769 | data = "", 1770 | figmaToken = "", 1771 | fileURL = "", 1772 | resultCss; 1773 | 1774 | let figmaTokenError = "", fileURLError = "", outputPathError = ""; 1775 | 1776 | const extractFileId = fileURL => { 1777 | let result = fileURL.match(/file\/(.*?)\//); 1778 | if (result[1]) return result[1]; else return false; 1779 | }; 1780 | 1781 | const isURLValid = fileURL => { 1782 | let result = fileURL.match(/file\/(.*?)\//); 1783 | if (result[1]) return true; else return false; 1784 | }; 1785 | 1786 | const loadData = async () => { 1787 | saveInputValuesInLocalStorage(); 1788 | 1789 | try { 1790 | data = await (await fetch(`${baseUrl}/data?fileURL=${fileURL}&figmaToken=${figmaToken}&writeData=true`)).json(); 1791 | return data; 1792 | } catch(err) { 1793 | console.error(err); 1794 | } 1795 | }; 1796 | 1797 | const loadTreeView = async () => { 1798 | if (!fileURL || !figmaToken) return; 1799 | $$invalidate(2, loading = true); 1800 | $$invalidate(3, treeData = await loadData()); 1801 | $$invalidate(2, loading = false); 1802 | }; 1803 | 1804 | const getCheckedIds = data => { 1805 | let checkedIds = []; 1806 | if (data.isChecked) checkedIds.push(data); 1807 | 1808 | if (data.children) { 1809 | data.children.forEach(child => { 1810 | checkedIds = checkedIds.concat(getCheckedIds(child)); 1811 | }); 1812 | } 1813 | 1814 | return checkedIds; 1815 | }; 1816 | 1817 | const testFileName = name => { 1818 | let regex = new RegExp(/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$|([<>:"\\/\\\\|?*])|(\\.|\\s)$/ig); 1819 | return !regex.test(name); 1820 | }; 1821 | 1822 | const getCheckedNodes = data => { 1823 | let result = []; 1824 | 1825 | data.forEach(child => { 1826 | result = getCheckedIds(child); 1827 | }); 1828 | 1829 | return result; 1830 | }; 1831 | 1832 | let lastModified = new Date("1900-05-24T02:34:14.475592Z"); 1833 | let watchInterval = false; 1834 | 1835 | const watch = async () => { 1836 | if (isWatching) { 1837 | clearInterval(watchInterval); 1838 | $$invalidate(1, isWatching = false); 1839 | return; 1840 | } 1841 | 1842 | let i = 0; 1843 | $$invalidate(1, isWatching = true); 1844 | 1845 | watchInterval = setInterval( 1846 | async () => { 1847 | if (i < 1) { 1848 | i++; 1849 | return; 1850 | } 1851 | 1852 | if (await shouldUpdateData()) { 1853 | $$invalidate(2, loading = true); 1854 | await loadData(); 1855 | await generateCss(); 1856 | $$invalidate(2, loading = false); 1857 | } 1858 | }, 1859 | 1000 1860 | ); 1861 | }; 1862 | 1863 | const shouldUpdateData = async () => { 1864 | if (!fileURL) { 1865 | $$invalidate(7, fileURLError = "Invalid file"); 1866 | return; 1867 | } 1868 | 1869 | try { 1870 | let result = await (await fetch(`${baseUrl}/data?figmaToken=${figmaToken}&fileURL=${fileURL}&depth=1&writeData=false`)).json(); 1871 | let currentLastModified = new Date(result.lastModified); 1872 | 1873 | if (currentLastModified > lastModified) { 1874 | lastModified = currentLastModified; 1875 | return true; 1876 | } else { 1877 | return false; 1878 | } 1879 | } catch(err) { 1880 | console.error(err); 1881 | return false; 1882 | } 1883 | }; 1884 | 1885 | const generate = async () => { 1886 | $$invalidate(2, loading = true); 1887 | 1888 | if (await shouldUpdateData()) { 1889 | await loadData(); 1890 | } 1891 | 1892 | await generateCss(); 1893 | $$invalidate(2, loading = false); 1894 | }; 1895 | 1896 | const generateCss = async () => { 1897 | if (!data) return; 1898 | let checkedNodes = getCheckedNodes(treeData.document.children); 1899 | 1900 | if (!checkedNodes.length) { 1901 | console.error("No checked items!"); 1902 | return; 1903 | } 1904 | 1905 | let url = `${baseUrl}/css`; 1906 | if (filePath) url += `?filePath=${filePath}`; 1907 | 1908 | try { 1909 | $$invalidate(6, resultCss = await (await fetch(url, { 1910 | method: "post", 1911 | headers: { 1912 | "Accept": "application/json", 1913 | "Content-Type": "application/json" 1914 | }, 1915 | body: JSON.stringify({ ids: checkedNodes.map(node => node.id) }) 1916 | })).text()); 1917 | } catch(err) { 1918 | console.error(err); 1919 | } 1920 | }; 1921 | 1922 | const saveInputValuesInLocalStorage = () => { 1923 | window.localStorage.setItem("figmaToken", figmaToken); 1924 | window.localStorage.setItem("fileURL", fileURL); 1925 | window.localStorage.setItem("filePath", filePath); 1926 | }; 1927 | 1928 | const loadCachedValues = () => { 1929 | $$invalidate(4, figmaToken = window.localStorage.getItem("figmaToken")); 1930 | $$invalidate(5, fileURL = window.localStorage.getItem("fileURL")); 1931 | $$invalidate(0, filePath = window.localStorage.getItem("filePath")); 1932 | return { figmaToken, fileURL, filePath }; 1933 | }; 1934 | 1935 | onMount(async () => { 1936 | loadCachedValues(); 1937 | }); 1938 | 1939 | const writable_props = []; 1940 | 1941 | Object.keys($$props).forEach(key => { 1942 | if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console_1.warn(` was created with unknown prop '${key}'`); 1943 | }); 1944 | 1945 | let { $$slots = {}, $$scope } = $$props; 1946 | validate_slots("App", $$slots, []); 1947 | 1948 | function input0_value_binding(value) { 1949 | figmaToken = value; 1950 | $$invalidate(4, figmaToken); 1951 | } 1952 | 1953 | function input1_value_binding(value) { 1954 | fileURL = value; 1955 | $$invalidate(5, fileURL); 1956 | } 1957 | 1958 | function input2_value_binding(value) { 1959 | filePath = value; 1960 | $$invalidate(0, filePath); 1961 | } 1962 | 1963 | function textarea_input_handler() { 1964 | resultCss = this.value; 1965 | $$invalidate(6, resultCss); 1966 | } 1967 | 1968 | $$self.$capture_state = () => ({ 1969 | baseUrl, 1970 | TreeView, 1971 | Input, 1972 | onMount, 1973 | CSSGenerator, 1974 | filePath, 1975 | isWatching, 1976 | loading, 1977 | treeData, 1978 | data, 1979 | figmaToken, 1980 | fileURL, 1981 | resultCss, 1982 | figmaTokenError, 1983 | fileURLError, 1984 | outputPathError, 1985 | extractFileId, 1986 | isURLValid, 1987 | loadData, 1988 | loadTreeView, 1989 | getCheckedIds, 1990 | testFileName, 1991 | getCheckedNodes, 1992 | lastModified, 1993 | watchInterval, 1994 | watch, 1995 | shouldUpdateData, 1996 | generate, 1997 | generateCss, 1998 | saveInputValuesInLocalStorage, 1999 | loadCachedValues 2000 | }); 2001 | 2002 | $$self.$inject_state = $$props => { 2003 | if ("filePath" in $$props) $$invalidate(0, filePath = $$props.filePath); 2004 | if ("isWatching" in $$props) $$invalidate(1, isWatching = $$props.isWatching); 2005 | if ("loading" in $$props) $$invalidate(2, loading = $$props.loading); 2006 | if ("treeData" in $$props) $$invalidate(3, treeData = $$props.treeData); 2007 | if ("data" in $$props) data = $$props.data; 2008 | if ("figmaToken" in $$props) $$invalidate(4, figmaToken = $$props.figmaToken); 2009 | if ("fileURL" in $$props) $$invalidate(5, fileURL = $$props.fileURL); 2010 | if ("resultCss" in $$props) $$invalidate(6, resultCss = $$props.resultCss); 2011 | if ("figmaTokenError" in $$props) $$invalidate(8, figmaTokenError = $$props.figmaTokenError); 2012 | if ("fileURLError" in $$props) $$invalidate(7, fileURLError = $$props.fileURLError); 2013 | if ("outputPathError" in $$props) $$invalidate(9, outputPathError = $$props.outputPathError); 2014 | if ("lastModified" in $$props) lastModified = $$props.lastModified; 2015 | if ("watchInterval" in $$props) watchInterval = $$props.watchInterval; 2016 | }; 2017 | 2018 | if ($$props && "$$inject" in $$props) { 2019 | $$self.$inject_state($$props.$$inject); 2020 | } 2021 | 2022 | return [ 2023 | filePath, 2024 | isWatching, 2025 | loading, 2026 | treeData, 2027 | figmaToken, 2028 | fileURL, 2029 | resultCss, 2030 | fileURLError, 2031 | figmaTokenError, 2032 | outputPathError, 2033 | loadTreeView, 2034 | watch, 2035 | generate, 2036 | data, 2037 | lastModified, 2038 | watchInterval, 2039 | extractFileId, 2040 | isURLValid, 2041 | loadData, 2042 | getCheckedIds, 2043 | testFileName, 2044 | getCheckedNodes, 2045 | shouldUpdateData, 2046 | generateCss, 2047 | saveInputValuesInLocalStorage, 2048 | loadCachedValues, 2049 | input0_value_binding, 2050 | input1_value_binding, 2051 | input2_value_binding, 2052 | textarea_input_handler 2053 | ]; 2054 | } 2055 | 2056 | class App extends SvelteComponentDev { 2057 | constructor(options) { 2058 | super(options); 2059 | init(this, options, instance$4, create_fragment$4, safe_not_equal, {}); 2060 | 2061 | dispatch_dev("SvelteRegisterComponent", { 2062 | component: this, 2063 | tagName: "App", 2064 | options, 2065 | id: create_fragment$4.name 2066 | }); 2067 | } 2068 | } 2069 | 2070 | const app = new App({ 2071 | target: document.body 2072 | }); 2073 | 2074 | return app; 2075 | 2076 | }()); 2077 | //# sourceMappingURL=bundle.js.map 2078 | -------------------------------------------------------------------------------- /public/build/bundle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../src/base-url.js","../../src/Node.svelte","../../src/TreeView.svelte","../../src/Input.svelte","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group) {\n const value = [];\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.push(group[i].__value);\n }\n return value;\n}\nfunction to_number(value) {\n return value === '' ? undefined : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n while (j < node.attributes.length) {\n const attribute = node.attributes[j];\n if (attributes[attribute.name]) {\n j++;\n }\n else {\n node.removeAttribute(attribute.name);\n }\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.data !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n const z_index = (parseInt(computed_style.zIndex) || 0) - 1;\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', `display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ` +\n `overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${z_index};`);\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = `data:text/html,`;\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error(`Function called outside component initialization`);\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n info.blocks[i] = null;\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error(`Cannot have duplicate keys in a keyed each`);\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += \" \" + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += \" \" + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, options = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, options);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : ``;\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const prop_values = options.props || {};\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : []),\n // everything else\n callbacks: blank_object(),\n dirty\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, prop_values, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if ($$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n };\n}\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.23.0' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev(\"SvelteDOMRemove\", { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? [\"capture\"] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev(\"SvelteDOMAddEventListener\", { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev(\"SvelteDOMRemoveEventListener\", { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev(\"SvelteDOMRemoveAttribute\", { node, attribute });\n else\n dispatch_dev(\"SvelteDOMSetAttribute\", { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev(\"SvelteDOMSetProperty\", { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev(\"SvelteDOMSetDataset\", { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.data === data)\n return;\n dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(`'target' is a required option`);\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn(`Component was already destroyed`); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error(`Infinite loop detected`);\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","export default `http://localhost:4200`\n","\n\n
  • \n \n {#if data.isOpen}↑{:else}↓{/if}\n \n \n {data.name}\n {#if data.children}\n
      \n {#each data.children as child}\n \n {/each}\n
    \n {/if}\n
  • \n","\n\n
      \n {#each roots as root}\n \n {/each}\n
    \n\n\n","\n\n
    \n \n \n

    {error}

    \n
    \n","\n\n
    \n
    \n
    \n {#if loading}\n
    \n \"loading\"/\n
    \n {/if}\n\n
    \n
    \n \n \n
    \n \n
    \n
    \n \n

    Select the css file output, select the nodes in the treeview and click generate

    \n
    \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n\n\n","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body\n});\n\nexport default app;\n"],"names":[],"mappings":";;;;;IAAA,SAAS,IAAI,GAAG,GAAG;IAWnB,SAAS,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5OpD,UAAC,GAAG,GAAG,IAAI,GAAG,CAAC;IACpB,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI;IACtB,CAAC;;;;;;;;"} -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/figmatools/figma2css-app/ab545c995654697c83a35cebefb24e13b24708e3/public/favicon.png -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Figma 2 CSS App 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import svelte from 'rollup-plugin-svelte'; 2 | import resolve from '@rollup/plugin-node-resolve'; 3 | import commonjs from '@rollup/plugin-commonjs'; 4 | import livereload from 'rollup-plugin-livereload'; 5 | import { terser } from 'rollup-plugin-terser'; 6 | 7 | const production = !process.env.ROLLUP_WATCH; 8 | 9 | export default { 10 | input: 'src/main.js', 11 | output: { 12 | sourcemap: true, 13 | format: 'iife', 14 | name: 'app', 15 | file: 'public/build/bundle.js' 16 | }, 17 | plugins: [ 18 | svelte({ 19 | // enable run-time checks when not in production 20 | dev: !production, 21 | // we'll extract any component CSS out into 22 | // a separate file - better for performance 23 | css: css => { 24 | css.write('public/build/bundle.css'); 25 | } 26 | }), 27 | 28 | // If you have external dependencies installed from 29 | // npm, you'll most likely need these plugins. In 30 | // some cases you'll need additional configuration - 31 | // consult the documentation for details: 32 | // https://github.com/rollup/plugins/tree/master/packages/commonjs 33 | resolve({ 34 | browser: true, 35 | dedupe: ['svelte'] 36 | }), 37 | commonjs(), 38 | 39 | // In dev mode, call `npm run start` once 40 | // the bundle has been generated 41 | !production && serve(), 42 | 43 | // Watch the `public` directory and refresh the 44 | // browser on changes when not in production 45 | !production && livereload('public'), 46 | 47 | // If we're building for production (npm run build 48 | // instead of npm run dev), minify 49 | production && terser() 50 | ], 51 | watch: { 52 | clearScreen: false 53 | } 54 | }; 55 | 56 | function serve() { 57 | let started = false; 58 | 59 | return { 60 | writeBundle() { 61 | if (!started) { 62 | started = true; 63 | 64 | require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], { 65 | stdio: ['ignore', 'inherit', 'inherit'], 66 | shell: true 67 | }); 68 | } 69 | } 70 | }; 71 | } 72 | -------------------------------------------------------------------------------- /src/App.svelte: -------------------------------------------------------------------------------- 1 | 191 | 192 |
    193 |
    194 |
    195 | {#if loading} 196 |
    197 | loading 200 |
    201 | {/if} 202 | 203 |
    204 |
    205 | 208 | 212 |
    213 | 216 |
    217 |
    218 | 222 |

    Select the css file output, select the nodes in the treeview and click generate

    223 |
    224 | 228 | 232 |
    233 |
    234 |
    235 |
    236 | 237 |
    238 |
    239 | 240 |
    241 |
    242 | 243 |
    244 |
    245 |
    246 | 247 | 249 | -------------------------------------------------------------------------------- /src/CSSGenerator.svelte: -------------------------------------------------------------------------------- 1 | 3 | 4 |
    5 |
    6 | 7 | 9 | -------------------------------------------------------------------------------- /src/Input.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 |
    11 | 12 | 14 |

    {error}

    15 |
    16 | -------------------------------------------------------------------------------- /src/Node.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 |
  • 11 | 14 | {#if data.isOpen}↑{:else}↓{/if} 15 | 16 | 17 | {data.name} 18 | {#if data.children} 19 |
      20 | {#each data.children as child} 21 | 22 | {/each} 23 |
    24 | {/if} 25 |
  • 26 | -------------------------------------------------------------------------------- /src/TreeView.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 |
      22 | {#each roots as root} 23 | 24 | {/each} 25 |
    26 | 27 | 29 | -------------------------------------------------------------------------------- /src/base-url.js: -------------------------------------------------------------------------------- 1 | export default `http://localhost:4200` 2 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import App from './App.svelte'; 2 | 3 | const app = new App({ 4 | target: document.body 5 | }); 6 | 7 | export default app; 8 | --------------------------------------------------------------------------------