├── .gitignore ├── README.md ├── RELEASE_NOTE.md ├── docs └── capture.png ├── inker8-xd.xdx ├── jsconfig.json ├── package.json ├── src ├── assets │ ├── logo.png │ ├── logo_128.png │ └── logo_512.png ├── lib │ ├── compress.js │ ├── dialogs.js │ └── manifest.js ├── main.js └── manifest.json ├── tools ├── build.js └── version.js ├── types ├── application.d.ts ├── clipboard.d.ts ├── commands.d.ts ├── index.d.ts ├── scenegraph.d.ts └── uxp.d.ts └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # build artifacts 2 | plugin.sketchplugin 3 | 4 | # npm 5 | node_modules 6 | .npm 7 | npm-debug.log 8 | *error.log 9 | # mac 10 | .DS_Store 11 | 12 | # WebStorm 13 | .idea 14 | static-plugin 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Adobe XD Plugin for Inker8 2 | 3 | [![Join the chat at https://gitter.im/inker8/xd-plugin](https://badges.gitter.im/inker8/xd-plugin.svg)](https://gitter.im/inker8/xd-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | 5 | An [Adobe XD](https://www.adobe.com/cn/products/xd.html) plugin to export design spec and icons via one click. 6 | 7 | ## Features 8 | 9 | * Copy text of layers 10 | * Copy CSS properties of layers 11 | * Copy SVG icon / React SVG Component of laters 12 | 13 | ## Captures 14 | 15 | ![](https://github.com/inker8/xd-plugin/raw/master/docs/capture.png) 16 | 17 | ## Install 18 | 19 | ### 1. Install from plugin manager 20 | 21 | 1. Go to `Plugins > Discover Plugins` to open plugin manager. 22 | 2. Search for `inker8` and install it. 23 | 24 | ### 2. Download and install from github directly 25 | 26 | [Download the ZIP file](https://github.com/inker8/xd-plugin/raw/master/inker8-xd.xdx) and double click 27 | -------------------------------------------------------------------------------- /RELEASE_NOTE.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | * Initial upload 3 | 4 | ## 1.0.1 5 | * Fix windows export 6 | * Add export dialog 7 | 8 | ## 1.0.2 9 | * Fix cannot switch artboards 10 | 11 | ## 1.0.3 12 | * Fix export CSS in edge (#3) 13 | -------------------------------------------------------------------------------- /docs/capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inker8/xd-plugin/32184c8d3e6dc0fcdba1f33c5268175f153caa89/docs/capture.png -------------------------------------------------------------------------------- /inker8-xd.xdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inker8/xd-plugin/32184c8d3e6dc0fcdba1f33c5268175f153caa89/inker8-xd.xdx -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2015", 4 | "baseUrl": "./", 5 | "checkJs": true, 6 | "lib": [ 7 | "es2015", 8 | "dom" 9 | ], 10 | "paths": { 11 | "*": [ 12 | "types/*" 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inker8-xd", 3 | "version": "1.0.3", 4 | "description": "", 5 | "private": true, 6 | "main": "index.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1", 9 | "start": "node ./tools/build.js -w", 10 | "dev:link": "node ./tools/build.js", 11 | "build": "rm -rf inker8-xd.xdx && cd src && zip -r -X ../inker8-xd.xdx *", 12 | "preversion": "node ./tools/version.js && npm run build && git add -A" 13 | }, 14 | "author": "", 15 | "license": "ISC", 16 | "devDependencies": { 17 | "@types/node": "^10.12.0", 18 | "sync-glob": "^1.3.8" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inker8/xd-plugin/32184c8d3e6dc0fcdba1f33c5268175f153caa89/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/logo_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inker8/xd-plugin/32184c8d3e6dc0fcdba1f33c5268175f153caa89/src/assets/logo_128.png -------------------------------------------------------------------------------- /src/assets/logo_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inker8/xd-plugin/32184c8d3e6dc0fcdba1f33c5268175f153caa89/src/assets/logo_512.png -------------------------------------------------------------------------------- /src/lib/dialogs.js: -------------------------------------------------------------------------------- 1 | // @ts-nocheck 2 | /* 3 | * Copyright 2018 Adobe Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | const {getManifest, getNearestIcon} = require('./manifest.js'); 19 | 20 | let manifest; 21 | 22 | /** 23 | * Converts a string (or an array of strings or other objects) to a nicer HTML 24 | * representation. Essentially this is a _very_ basic markdown parser. 25 | * 26 | * The following tokens are understood, when encountered at the beginning of 27 | * a string: 28 | * 29 | * Token | Result 30 | * -------------|----------------------- 31 | * `##` | `

` 32 | * `###` | `

` 33 | * `* ` | Bulleted list 34 | * `----` | `
` 35 | * `---` | `
` 36 | * `[...](href)`| `

...

` 37 | * 38 | * @param {string | string[] | * | Array<*>} str 39 | * @returns {string} the HTML representation 40 | */ 41 | function strToHtml(str) { 42 | // allow some common overloads, including arrays and non-strings 43 | if (Array.isArray(str)) { 44 | return str.map(str => strToHtml(str)).join(''); 45 | } 46 | if (typeof str !== 'string') { 47 | return strToHtml(`${str}`); 48 | } 49 | 50 | let html = str; 51 | 52 | // handle some markdown stuff 53 | if (html.substr(0, 2) === '##') { 54 | html = `

${html.substr(2).trim().toUpperCase()}

`; 55 | } else if (html.substr(0, 1) === '#') { 56 | html = `

${html.substr(1).trim()}

`; 57 | } else if (html.substr(0, 2) === '* ') { 58 | html = `

${html.substr(2).trim()}

`; 59 | } else if (html.substr(0, 4) === '----') { 60 | html = `
${html.substr(5).trim()}`; 61 | } else if (html.substr(0, 3) === '---') { 62 | html = `
${html.substr(4).trim()}`; 63 | } else { 64 | html = `

${html.trim()}

`; 65 | } 66 | 67 | // handle links -- the catch here is that the link will transform the entire paragraph! 68 | const regex = /\[([^\]]*)\]\(([^\)]*)\)/; 69 | const matches = str.match(regex); 70 | if (matches) { 71 | const title = matches[1]; 72 | const url = matches[2]; 73 | html = `

${html.replace(regex, title).replace(/\<\|?p\>/g, '')}

`; 74 | } 75 | 76 | return html; 77 | } 78 | 79 | /* 80 | * Generates a "notice" dialog with the title, default icon, and a series of messages. 81 | * 82 | * @param {*} param 83 | * @property {string} param.title The dialog title 84 | * @property {string} [param.icon] The dialog icon to use. If not provided, no icon will be rendered 85 | * @property {string[]} param.msgs The messages to render. If a message starts with `http`, it will be rendered as a link. 86 | * @property {string} [param.prompt] If specified, will render as a prompt with a single input field and the prompt as a placeholder 87 | * @property {boolean} [param.multiline=false] If `true`, the prompt will render as a multi-line text field. 88 | * @property {boolean} [param.isError=false] If specified, will render the header in a red color 89 | * @property {Function} [param.render] If set, the results of this function (a DOM tree) will be appended into the content area of the dialog. 90 | * @property {Function} [param.template] If set, the results of this function (a string) will be appended into the content area of the dialog. 91 | * @property {Object[]} [buttons] Indicates the buttons to render. If none are specified, a `Close` button is rendered. 92 | * @returns {Promise} Resolves to an object of the form {which, value}. `value` only makes sense if `prompt` is set. `which` indicates which button was pressed. 93 | */ 94 | async function createDialog({ 95 | title = '', 96 | icon = 'plugin-icon', 97 | msgs = [], 98 | prompt = '', 99 | multiline = false, 100 | render = null, 101 | template = () => '', 102 | isError=false, 103 | buttons=[ 104 | {label: 'Close', variant: 'cta', type:'submit'} 105 | ]} = {}, 106 | width=360, 107 | height='auto', 108 | iconSize=18 109 | ) { 110 | 111 | let messages = Array.isArray(msgs) ? msgs : [ msgs ]; 112 | 113 | try { 114 | if (!manifest) { 115 | manifest = await getManifest(); 116 | } 117 | } catch (err) { 118 | console.error(err) 119 | } 120 | 121 | let usingPluginIcon = false; 122 | if (icon === 'plugin-icon') { 123 | if (manifest.icons) { 124 | usingPluginIcon = true; 125 | iconSize = 24; 126 | icon = getNearestIcon(manifest, iconSize); 127 | } 128 | } 129 | 130 | const dialog = document.createElement('dialog'); 131 | dialog.innerHTML = ` 132 | 180 |
181 |

182 | ${title} 183 | ${icon ? `` : ''} 184 |

185 |
186 |
187 | ${ 188 | !render && ( 189 | template ? template() : ( 190 | messages.map(msg => strToHtml(msg)).join('') + 191 | (prompt ? `` : '') 196 | ) 197 | ) 198 | } 199 |
200 |
201 | ${buttons.map(({label, type, variant} = /** @type {any} */ ({}), idx) => ``).join('')} 202 |
203 |
204 | `; 205 | // if render fn is passed, we'll call it and attach the DOM tree 206 | if (render) { 207 | dialog.querySelector(".container").appendChild(render()); 208 | } 209 | // The "ok" and "cancel" button indices. OK buttons are "submit" or "cta" buttons. Cancel buttons are "reset" buttons. 210 | let okButtonIdx = -1; 211 | let cancelButtonIdx = -1; 212 | let clickedButtonIdx = -1; 213 | // Ensure that the form can submit when the user presses ENTER (we trigger the OK button here) 214 | const form = dialog.querySelector('form'); 215 | form.onsubmit = () => dialog.close('ok'); 216 | // Attach button event handlers and set ok and cancel indices 217 | buttons.forEach(({type, variant} = {}, idx) => { 218 | const button = dialog.querySelector(`#btn${idx}`); 219 | if (type === 'submit' || variant === 'cta') { 220 | okButtonIdx = idx; 221 | } 222 | if (type === 'reset') { 223 | cancelButtonIdx = idx; 224 | } 225 | button.onclick = e => { 226 | e.preventDefault(); 227 | clickedButtonIdx = idx; 228 | dialog.close( idx === cancelButtonIdx ? 'reasonCanceled' : 'ok'); 229 | } 230 | }); 231 | try { 232 | document.appendChild(dialog); 233 | const response = /** @type {any} */(await dialog.showModal()); 234 | if (response === 'reasonCanceled') { 235 | // user hit ESC 236 | return {which: cancelButtonIdx, value: ''}; 237 | } else { 238 | if (clickedButtonIdx === -1) { 239 | // user pressed ENTER, so no button was clicked! 240 | clickedButtonIdx = okButtonIdx; // may still be -1, but we tried 241 | } 242 | return {which: clickedButtonIdx, value: prompt ? dialog.querySelector('#prompt').value : ''}; 243 | } 244 | } catch(err) { 245 | // system refused the dialog 246 | return {which: cancelButtonIdx, value: ''}; 247 | } finally { 248 | dialog.remove(); 249 | } 250 | } 251 | /** 252 | * Generates an alert message 253 | * 254 | * @param {string} title 255 | * @param {string[]} msgs 256 | * @returns {Promise<{which: number}>} `which` indicates which button was clicked. 257 | */ 258 | async function alert(title, ...msgs) { 259 | return createDialog({title, msgs}); 260 | } 261 | /** 262 | * Generates a warning message 263 | * 264 | * @param {string} title 265 | * @param {string[]} msgs 266 | * @returns {Promise<{which: number}>} `which` indicates which button was clicked. 267 | */ 268 | async function error(title, ...msgs) { 269 | return createDialog({title, isError: true, msgs}); 270 | } 271 | /** 272 | * Displays a confirmation dialog. 273 | * 274 | * @param {string} title 275 | * @param {string} msg 276 | * @param {string[]} [buttons = ['Cancel', 'OK']] the buttons to display (in macOS order); TWO MAX. 277 | * @returns {Promise<{which: number}>} `which` indicates which button was clicked. 278 | */ 279 | async function confirm(title, msg, buttons = [ 'Cancel', 'OK' ]) { 280 | return createDialog({title, msgs: [msg], buttons: [ 281 | {label: buttons[0], type:'reset', variant: 'primary'}, 282 | {label: buttons[1], type:'submit', variant: 'cta'} 283 | ]}); 284 | } 285 | /** 286 | * Displays a warning dialog. 287 | * 288 | * @param {string} title 289 | * @param {string} msg 290 | * @param {string[]} [buttons = ['Cancel', 'OK']] the buttons to display (in macOS order); TWO MAX. 291 | * @returns {Promise<{which: number}>} `which` indicates which button was clicked. 292 | */ 293 | async function warning(title, msg, buttons = [ 'Cancel', 'OK' ]) { 294 | return createDialog({title, msgs: [msg], buttons: [ 295 | {label: buttons[0], type:'submit', variant: 'primary'}, 296 | {label: buttons[1], type:'button', variant: 'warning'} 297 | ]}); 298 | } 299 | /** 300 | * Displays a warning dialog. 301 | * 302 | * @param {string} title 303 | * @param {string} msg 304 | * @param {string} prompt 305 | * @param {string[]} [buttons = ['Cancel', 'OK']] the buttons to display (in macOS order); TWO MAX. 306 | * @param {boolean} [multiline = false] If `true`, a multiline textarea will be used instead of a single line editor. 307 | * @returns {Promise<{which: number, value: string}>} `which` indicates which button was clicked, and `value` indicates the entered value in the text field. 308 | */ 309 | async function prompt(title, msg, prompt, buttons = [ 'Cancel', 'OK' ], multiline = false) { 310 | return createDialog({title, msgs: [msg], prompt, multiline, buttons: [ 311 | {label: buttons[0], type:'reset', variant: 'primary'}, 312 | {label: buttons[1], type:'submit', variant: 'cta'} 313 | ]}); 314 | } 315 | module.exports = { 316 | createDialog, 317 | alert, 318 | error, 319 | confirm, 320 | warning, 321 | prompt 322 | }; 323 | -------------------------------------------------------------------------------- /src/lib/manifest.js: -------------------------------------------------------------------------------- 1 | // @ts-nocheck 2 | /* 3 | * Copyright 2018 Adobe Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | const uxp = require('uxp') 18 | const { 19 | File, 20 | Folder 21 | } = uxp.storage 22 | let manifest; 23 | 24 | /** 25 | * Reads the plugin's manifest and returns the parsed contents. 26 | * 27 | * Throws if the manifest is invalid or doesn't exist. 28 | * 29 | * Note: Reads manifest only once. Future calls will not reload 30 | * the manifest file. 31 | */ 32 | async function getManifest() { 33 | if (!manifest) { 34 | const fs = require("uxp").storage.localFileSystem; 35 | const dataFolder = await fs.getPluginFolder(); 36 | const manifestFile = await dataFolder.getEntry("manifest.json"); 37 | // if (manifestFile) { 38 | // const json = await manifestFile.read(); 39 | // console.log('json[0]', json[0]) 40 | // manifest = JSON.parse(json); 41 | // } 42 | } 43 | return manifest || {}; 44 | } 45 | 46 | /** 47 | * Return the icon path that can fit the requested size without upscaling. 48 | * 49 | * @param {*} manifest 50 | * @param {number} size 51 | * @returns {string} path to the icon 52 | */ 53 | function getNearestIcon(manifest, size) { 54 | if (!manifest) { 55 | return; 56 | } 57 | 58 | if (manifest.icons) { 59 | // icons is an array of objects of the form 60 | // { width, height, path } 61 | 62 | // icons are assumed to be square, so we'll sort descending on the width 63 | const sortedIcons = manifest.icons.sort((a, b) => { 64 | const iconAWidth = a.width; 65 | const iconBWidth = b.width; 66 | return iconAWidth < iconBWidth ? 1 : iconAWidth > iconBWidth ? -1 : 0; 67 | }); 68 | 69 | // next, search until we find an icon _too_ small for the desired size 70 | const icon = sortedIcons.reduce((last, cur) => { 71 | if (!last) { 72 | last = cur; 73 | } else { 74 | if (cur.width >= size) { 75 | last = cur; 76 | } 77 | } 78 | return last; 79 | }); 80 | 81 | return icon.path; 82 | } 83 | } 84 | 85 | module.exports = { 86 | getManifest, 87 | getNearestIcon 88 | } 89 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Sample plugin scaffolding for Adobe XD. 3 | * 4 | * Visit http://adobexdplatform.com/ for API docs and more sample code. 5 | */ 6 | 7 | const scenegraph = require("scenegraph"); 8 | const storage = require("uxp").storage 9 | const fs = require("uxp").storage.localFileSystem; 10 | const application = require('application') 11 | const Dialogs = require('./lib/dialogs') 12 | global.setTimeout = /** @type {any} */(global.setTimeout || ((fn) => fn())) 13 | const Compress = require('./lib/compress') 14 | const Folder = storage.Folder 15 | 16 | /** 17 | * 18 | * @param {string} name 19 | * @returns {string} 20 | */ 21 | function filterName(name) { 22 | return name.replace(/[\W]+/g, '-') 23 | } 24 | 25 | async function getDbJson(nodes) { 26 | let tempFolder = await fs.getTemporaryFolder(); 27 | tempFolder = await tempFolder.createFolder(Math.random().toString(36).slice(2)) 28 | let files = await Promise.all( 29 | nodes.map(node => tempFolder.createFile(`${Math.random().toString(36).slice(5)}.svg`)) 30 | ) 31 | let results = await application.createRenditions(nodes.map( 32 | (node, i) => { 33 | return { 34 | node: node, 35 | outputFile: files[i], 36 | type: application.RenditionType.SVG, 37 | scale: 2, 38 | minify: false, 39 | embedImages: true, 40 | } 41 | } 42 | )) 43 | let len = 100 44 | while (len--) { 45 | await new Promise(res => res()) 46 | } 47 | let svgs = await Promise.all( 48 | files.map(async f => { 49 | let svg = await f.read() 50 | console.log('before', svg.length) 51 | let res = await Compress.compressSVG(svg) 52 | console.log('after', res.svg.length) 53 | return res.svg 54 | }) 55 | ) 56 | let svgList = svgs.map((svg, i) => ({ 57 | svg, 58 | name: nodes[i].name 59 | })).filter(s => s.svg && s.svg !== 'null' && s.name) 60 | return ` 61 | window['__ARTBOARDS__'] = ${JSON.stringify(svgList)} 62 | ` 63 | } 64 | /** 65 | * 66 | * @param {Folder} folder 67 | * @param {Folder} dist 68 | */ 69 | async function copyFolder(folder, dist) { 70 | let entries = await folder.getEntries() 71 | for (const entry of entries) { 72 | if (entry.isFile) { 73 | entry.copyTo(dist, { overwride: true }).catch(err => console.warn('[warn]', err)) 74 | } else { 75 | let d = await dist.createFolder(filterName(entry.name)) 76 | copyFolder(/** @type {Folder} */ (entry), d) 77 | } 78 | } 79 | } 80 | 81 | /** 82 | * 83 | * @param {Folder} folder 84 | */ 85 | async function deleteFolder(folder) { 86 | let entries = await folder.getEntries() 87 | for (const entry of entries) { 88 | if (entry.isFile) { 89 | await entry.delete() 90 | } else { 91 | await deleteFolder(/** @type {Folder} */(entry)) 92 | } 93 | } 94 | await folder.delete() 95 | } 96 | /** 97 | * 98 | * @param {Folder} folder 99 | * @param {string} name 100 | * @param {?number} i 101 | * @returns {Promise} 102 | */ 103 | async function createAutoFolder(folder, name, i = 0) { 104 | /** @type {Folder} */ 105 | let exportsFolder = undefined 106 | try { 107 | exportsFolder = await folder.createFolder(name + (i ? '_' + i : '')) 108 | } catch (error) { 109 | console.error(error) 110 | return createAutoFolder(folder, name, i + 1) 111 | } 112 | return exportsFolder 113 | } 114 | 115 | /** 116 | * 117 | * @param {any} nodes 118 | * @param {string} name 119 | */ 120 | async function saveNodes(nodes, name) { 121 | name = filterName(name) 122 | let folder = await fs.getFolder(); 123 | if (!folder) { 124 | return 125 | } 126 | // folder = await folder.createFolder(node.name) 127 | let pluginFolder = await fs.getPluginFolder() 128 | 129 | let statics = /** @type {Folder} */ (await pluginFolder.getEntry('assets/static-plugin')) 130 | /** @type {Folder} */ 131 | let exportsFolder = undefined 132 | try { 133 | exportsFolder = await folder.createFolder(name) 134 | } catch (error) { 135 | console.error(error) 136 | let ret = await Dialogs.confirm(`The folder [${name}] already exists, do you want override it?`, '') 137 | if (ret.which === 1) { 138 | let oldFolder = /** @type {Folder} */(await folder.getEntry(name)) 139 | await deleteFolder(oldFolder) 140 | exportsFolder = await folder.createFolder(name) 141 | } else { 142 | exportsFolder = await createAutoFolder(folder, name) 143 | } 144 | } 145 | await copyFolder(statics, exportsFolder) 146 | let dbJson = await getDbJson(nodes) 147 | let dist = /** @type {Folder} */(await exportsFolder.getEntry('dist')) 148 | let dbFile = await dist.createFile('db.js') 149 | await dbFile.write(dbJson) 150 | } 151 | 152 | async function exportCurrentArtboard(selection, documentRoot) { 153 | // console.log('application.appLanguage', application.appLanguage) 154 | let items = selection.itemsIncludingLocked 155 | if (!items.length) { 156 | return Dialogs.alert('No nodes are selected, please select some nodes.') 157 | } 158 | await saveNodes(items, documentRoot.name || items[0].name || 'inker8-exports') 159 | } 160 | 161 | async function exportAllArtboards(selection, documentRoot) { 162 | let items = [] 163 | 164 | documentRoot.children.forEach( 165 | (child, i) => { 166 | items[i] = child 167 | } 168 | ) 169 | // console.log('documentRoot.name', documentRoot.name) 170 | if (!items.length) { 171 | return Dialogs.alert('No artboards are in document, please create some artboards.') 172 | } 173 | await saveNodes(items, documentRoot.name || items[0].name || 'inker8-exports') 174 | } 175 | 176 | module.exports = { 177 | commands: { 178 | exportCurrentArtboard, 179 | exportAllArtboards 180 | } 181 | }; 182 | -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Inker8", 3 | "id": "c0e74810", 4 | "version": "1.0.3", 5 | "description": "Export design spec to measure positions, copy css and export icons. Make writing CSS and UI fun.", 6 | "icons": [ 7 | { 8 | "width": 96, 9 | "height": 96, 10 | "path": "assets/logo.png" 11 | }, 12 | { 13 | "width": 128, 14 | "height": 128, 15 | "path": "assets/logo_128.png" 16 | }, 17 | { 18 | "width": 512, 19 | "height": 512, 20 | "path": "assets/logo_512.png" 21 | } 22 | ], 23 | "host": { 24 | "app": "XD", 25 | "minVersion": "13.0.0" 26 | }, 27 | "uiEntryPoints": [ 28 | { 29 | "type": "menu", 30 | "label": { 31 | "default": "Inker8", 32 | "zh": "Inker8" 33 | }, 34 | "menuItems": [ 35 | { 36 | "type": "menu", 37 | "label": { 38 | "default": "Export current artboard (local)", 39 | "zh": "导出当前画板到本地" 40 | }, 41 | "commandId": "exportCurrentArtboard" 42 | }, 43 | { 44 | "type": "menu", 45 | "label": { 46 | "default": "Export all artboards (local)", 47 | "zh": "导出所有画板到本地" 48 | }, 49 | "commandId": "exportAllArtboards" 50 | } 51 | ] 52 | } 53 | ] 54 | } 55 | -------------------------------------------------------------------------------- /tools/build.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | const os = require('os') 4 | const { spawn, spawnSync, execSync } = require('child_process') 5 | 6 | let cwd = process.cwd() 7 | 8 | function cd(d) { 9 | cwd = path.relative(cwd, d) 10 | } 11 | 12 | function env(key, val) { 13 | process.env[key] = val 14 | } 15 | 16 | function execAsync(file, args = [], options) { 17 | spawn(file, args, { 18 | stdio: 'inherit', 19 | cwd: cwd, 20 | ...options, 21 | }) 22 | } 23 | 24 | function exec(file, args = [], options) { 25 | spawnSync(file, args, { 26 | stdio: 'inherit', 27 | cwd: cwd, 28 | ...options, 29 | }) 30 | } 31 | 32 | 33 | const DevPluginDirs = { 34 | darwin: `${os.homedir()}/Library/Application\ Support/Adobe/Adobe\ XD\ CC/develop`, 35 | win32: `${os.homedir()}/AppData/Local/Packages/Adobe.CC.XD_adky2gkssdxte/LocalState/develop`, 36 | } 37 | let devPluginDir = DevPluginDirs[process.platform] 38 | if (os.release().toLowerCase().includes('microsoft')) { 39 | console.time('cmd.exe') 40 | const winUser = execSync('cmd.exe /C "echo %username%"').toString('utf8').trim() 41 | console.timeEnd('cmd.exe') 42 | devPluginDir = `/c/Users/${winUser}/AppData/Local/Packages/Adobe.CC.XD_adky2gkssdxte/LocalState/develop` 43 | } 44 | 45 | cd('./src') 46 | 47 | const IsWatch = process.argv.indexOf('-w') >= 0 48 | const DistDir = path.join(devPluginDir, 'inker8') 49 | 50 | if (IsWatch) { 51 | exec('sync-glob', ['--watch', './**', DistDir]) 52 | } else { 53 | exec('sync-glob', ['./**', DistDir]) 54 | } 55 | -------------------------------------------------------------------------------- /tools/version.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | const os = require('os') 4 | const { 5 | spawn, 6 | spawnSync, 7 | execSync 8 | } = require('child_process') 9 | 10 | let cwd = process.cwd() 11 | 12 | function cd(d) { 13 | cwd = path.relative(cwd, d) 14 | } 15 | 16 | function env(key, val) { 17 | process.env[key] = val 18 | } 19 | 20 | function execAsync(file, args = [], options) { 21 | spawn(file, args, { 22 | stdio: 'inherit', 23 | cwd: cwd, 24 | ...options, 25 | }) 26 | } 27 | 28 | function exec(file, args = [], options) { 29 | spawnSync(file, args, { 30 | stdio: 'inherit', 31 | cwd: cwd, 32 | ...options, 33 | }) 34 | } 35 | 36 | function updateManifest(file) { 37 | let version = process.env.npm_package_version 38 | let manifest = JSON.parse(fs.readFileSync(file, 'utf8')) 39 | manifest.version = version 40 | fs.writeFileSync(file, JSON.stringify(manifest, null, 2)) 41 | } 42 | 43 | updateManifest('./src/manifest.json') 44 | -------------------------------------------------------------------------------- /types/application.d.ts: -------------------------------------------------------------------------------- 1 | import {Color, SceneNode} from "./scenegraph"; 2 | import {File} from "./uxp"; 3 | 4 | /** 5 | * All rendition settings fields are required (for a given rendition type) unless otherwise specified. 6 | */ 7 | type RenditionSettings = { 8 | /** 9 | * Root of scenegraph subtree to render. This may be any node in the scenegraph, regardless of the current edit context. 10 | */ 11 | node: SceneNode; 12 | /** 13 | * File to save the rendition to (overwritten without warning if it already exists) 14 | */ 15 | outputFile: File; 16 | /** 17 | * File type: RenditionType.PNG, JPG, PDF, or SVG 18 | */ 19 | type: string; 20 | /** 21 | * (PNG & JPG renditions) DPI multipler in the range [0.1, 100], e.g. 2.0 for @2x DPI. 22 | */ 23 | scale: number; 24 | /** 25 | * (JPG renditions) Compression quality in the range [1, 100]. 26 | */ 27 | quality: number; 28 | /** 29 | * (PNG & JPEG renditions) Alpha component ignored for JPG. Optional: defaults to transparent for PNG, solid white for JPG. 30 | */ 31 | background: Color; 32 | /** 33 | * (SVG renditions) If true, SVG code is minified. 34 | */ 35 | minify: boolean; 36 | /** 37 | * (SVG renditions) If true, bitmap images are stored as base64 data inside the SVG file. If false, bitmap images are saved as separate files linked from the SVG code. 38 | */ 39 | embedImages: boolean; 40 | } 41 | 42 | /** 43 | * Type that gets returned by `application.createRenditions` 44 | */ 45 | type RenditionResult = { 46 | /** 47 | * File the rendition was written to (equal to outputFile in RenditionSettings) 48 | */ 49 | outputFile: File; 50 | } 51 | 52 | /** 53 | * The application module exposes useful information about XD's state, along with APIs for exporting content. 54 | */ 55 | declare class application { 56 | 57 | public static RenditionType: { 58 | PNG: string 59 | SVG: string 60 | PDF: string 61 | JPG: string 62 | } 63 | 64 | /** 65 | * Generate renditions of nodes in the document in a batch. Overwrites any existing files without warning. 66 | * 67 | * A single createRenditions() call can generate any number of renditions, including multiple renditions of the same node (with different output settings) or renditions of multiple different nodes. Only one createRenditions() call can be executing at any given time, so wait for the Promise it returns before calling it again. 68 | * 69 | * @param renditions List of renditions to generate 70 | * @return Promise, string> - Promise which is fulfilled with an array of RenditionResults (pointing to the same outputFiles that were originally passed in, or rejected with an error string if one or more renditions failed for any reason. 71 | */ 72 | public static createRenditions(renditions: RenditionSettings[]): Promise; 73 | 74 | /** 75 | * Adobe XD version number in the form "major.minor.patch.build" 76 | */ 77 | public static readonly version: string; 78 | 79 | /** 80 | * Current language the application UI is using. This may not equal the user's OS locale setting: it is the closest locale supported by XD - use this when you want your plugin's UI to be consistent with XD's UI. Specifies language only, with no region info (e.g. "fr", not "fr_FR"). 81 | */ 82 | public static readonly appLanguage: string; 83 | 84 | /** 85 | * User's OS-wide locale setting. May not match the XD UI, since XD does not support all world languages. Includes both language and region (e.g. "fr_CA" or "en_US"). 86 | */ 87 | public static readonly systemLocale: string; 88 | } 89 | 90 | export = application; 91 | -------------------------------------------------------------------------------- /types/clipboard.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This module lets you copy text to the clipboard. It is not yet possible to copy other content types, or to handle paste events. 3 | */ 4 | declare class clipboard { 5 | /** 6 | * Write plain text to the clipboard. 7 | * @param text Will be automatically converted to string if a different type is passed 8 | */ 9 | public static copyText(text: string | any): void; 10 | } 11 | 12 | export = clipboard; 13 | -------------------------------------------------------------------------------- /types/commands.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * You can make structural changes to the scenegraph, and perform other complex operations, by programmatically invoking the same commands as XD users have access to in the UI. These methods do not take arguments. Instead, set the selection to the objects you want the command to target, then invoke the command: 3 | */ 4 | declare class commands { 5 | /** 6 | * Wraps the selected objects in a Group, leaving the Group selected afterward. Equivalent to Object > Group in the UI. 7 | */ 8 | public static group(): void; 9 | 10 | /** 11 | * Ungroups any of the selected objects that are ungroupable containers (Groups, Symbols, Repeat Grids, etc.). Equivalent to Object > Ungroup. 12 | */ 13 | public static ungroup(): void; 14 | 15 | /** 16 | * Creates a masked Group from the selected objects, using the object that is highest in the z order as the mask shape. The mask shape must be a leaf node or Boolean Group. Equivalent to Object > Mask With Shape. 17 | */ 18 | public static createMaskGroup(): void; 19 | 20 | /** 21 | * Converts each selected object to a Path with the exact same visual appearance. Only applies to leaf nodes and Boolean Groups. Equivalent to Object > Path > Convert to Path. 22 | */ 23 | public static convertToPath(): void; 24 | 25 | /** 26 | * Duplicates all selected objects, leaving the duplicates selected afterward. 27 | * 28 | * - If the objects are artboards, the duplicates are positioned to not overlap any more artboards, and are placed at the top of the artboard z order. 29 | * - If normal objects, each duplicate is in the exact same position as the original, and just above it in the z order (duplicates of a multiple selection will not be contiguous in the z order if the originals were not). 30 | * 31 | * Edit > Duplicate 32 | */ 33 | public static duplicate(): void; 34 | 35 | /** 36 | * Brings selected objects to the front of the z order. Equivalent to Object > Arrange > Bring to Front. 37 | */ 38 | public static bringToFront(): void; 39 | 40 | /** 41 | * Brings each selected object one step closer to the front of the z order. Equivalent to Object > Arrange > Bring Forward. 42 | */ 43 | public static bringForward(): void; 44 | 45 | /** 46 | * Sends selected objects to the back of the z order. Equivalent to Object > Arrange > Send to Back. 47 | */ 48 | public static sendToBack(): void; 49 | 50 | /** 51 | * Sends each selected object one step closer to the back of the z order. Equivalent to Object > Arrange > Send Backward. 52 | */ 53 | public static sendBackward(): void; 54 | 55 | /** 56 | * Aligns all selected objects flush left. Equivalent to Object > Align > Left. 57 | */ 58 | public static alignLeft(): void; 59 | 60 | /** 61 | * Aligns all selected objects flush right. Equivalent to Object > Align > Right. 62 | */ 63 | public static alignRight(): void; 64 | 65 | /** 66 | * Aligns all selected objects along their horizontal centerlines. Equivalent to Object > Align > Center (Horizontally). 67 | */ 68 | public static alignHorizontalCenter(): void; 69 | 70 | /** 71 | * Aligns all selected objects flush top. Equivalent to Object > Align > Top. 72 | */ 73 | public static alignTop(): void; 74 | 75 | /** 76 | * Aligns all selected objects flush bottom. Equivalent to Object > Align > Bottom. 77 | */ 78 | public static alignBottom(): void; 79 | 80 | /** 81 | * Aligns all selected objects along their vertical centerlines. Equivalent to Object > Align > Center (Vertically). 82 | */ 83 | public static alignVerticalCenter(): void; 84 | 85 | /** 86 | * Distributes all selected objects evenly along the X axis. Equivalent to Object > Distribute > Horizontally. 87 | */ 88 | public static distributeHorizontal(): void; 89 | 90 | /** 91 | * Distributes all selected objects evenly along the Y axis. Equivalent to Object > Distribute > Vertically. 92 | */ 93 | public static distributeVertical(): void; 94 | 95 | /** 96 | * Shifts all selected objects and their content so they align crisply with the pixel grid. Equivalent to Object > Align to Pixel Grid. 97 | */ 98 | public static alignToPixelGrid(): void; 99 | 100 | 101 | // /** 102 | //* Flips the object horizontally. Some objects such as Symbols cannot be flipped. Equivalent to Object > Flip > Horizontally. 103 | //*/ 104 | //public static filpHorizontal(): void; 105 | // 106 | // /** 107 | // * Flips the object vertically. Some objects such as Symbols cannot be flipped. Equivalent to Object > Flip > Vertically. 108 | //*/ 109 | //public static flipVertical(): void; 110 | } 111 | 112 | export = commands; 113 | -------------------------------------------------------------------------------- /types/index.d.ts: -------------------------------------------------------------------------------- 1 | import {Artboard, SceneNode} from "scenegraph"; 2 | 3 | export {}; 4 | 5 | declare global { 6 | /** 7 | * Imports classes from a module (e.g. ```const { Text } = require('scenegraph'); ```) 8 | * @param module The module name 9 | */ 10 | function require(module: string): void; 11 | 12 | /** 13 | * Represents the children of a scenenode. Typically accessed via the SceneNode.children property. 14 | */ 15 | class SceneNodeList { 16 | public items: SceneNode[]; 17 | public readonly length: number; 18 | 19 | public forEach( 20 | callback: (sceneNode: SceneNode, index: number) => void, 21 | thisArg?: object 22 | ): void; 23 | 24 | public forEachRight( 25 | callback: (sceneNode: SceneNode, index: number) => void, 26 | thisArg?: object 27 | ): void; 28 | 29 | public filter( 30 | callback: (sceneNode: SceneNode, index: number) => boolean, 31 | thisArg?: object 32 | ): Array; 33 | 34 | public map( 35 | callback: (sceneNode: SceneNode, index: number) => any, 36 | thisArg?: object 37 | ): Array; 38 | 39 | public some( 40 | callback: (sceneNode: SceneNode, index: number) => boolean, 41 | thisArg?: object 42 | ): boolean; 43 | 44 | public at(index: number): SceneNode | null; 45 | } 46 | 47 | /** 48 | * The selection object represents the currently selected set of nodes in the UI. You can set the selection to use it as input for commands, or to determine what is left selected for the user when your plugin’s edit operation completes. 49 | * 50 | * The current selection state is passed to your command handler function as an argument. 51 | * 52 | * The selection can only contain items within the current edit context: 53 | * 54 | * - If the user has drilled down into a container node, the container is the current edit context and only its immediate children can be selected. 55 | * - If the user hasn’t drilled into any container, the root of the document is the edit context, and the selection may contain any artboard or any combination of the pasteboard’s immediate children and one or more artboards’ immediate children. The selection cannot contain both artboards and non-artboards at the same time, however. 56 | * 57 | * Note that when in the root edit context, the selection can contain items with multiple different parents. 58 | * 59 | * Items that are locked cannot be in the selection. If the user or your plugin attempts to select any locked items, they are automatically filtered into a separate list (itemsIncludingLocked) which is generally only used by the Unlock command. 60 | */ 61 | interface Selection { 62 | /** 63 | * Array representing the current selection. Empty array if nothing is selected (never null). Never includes locked nodes. 64 | * 65 | * As a convenience, the setter also accepts a single node or null as valid input. However, the getter always returns an array. 66 | * 67 | * If the user selects nodes one-by-one, by Shift-clicking, this array lists the nodes in the order they were added to the selection. 68 | * 69 | * Returns a fresh array each time, so this can be mutated by the caller without interfering with anything. Mutating the array does not change the selection - only invoking the ‘items’ setter changes selection. 70 | */ 71 | items: Array; 72 | /** 73 | * Array representing the current selection plus any locked items that the user has attempted to select. 74 | */ 75 | itemsIncludingLocked: Array; 76 | /** 77 | * True if the selection isn’t empty and consists of one or more non-Artboards. Never true at the same time as hasArtboards. 78 | */ 79 | hasArtwork: boolean; 80 | /** 81 | * True if the selection isn’t empty and consists of one or more Artboards. Never true at the same time as hasArtwork. 82 | */ 83 | hasArtboards: boolean; 84 | /** 85 | * The context in which selection and edit operations must occur. If the user hasn’t drilled into any container node, this value is the document root, and its scope includes all immediate children of the pasteboard (including Artboards), and all immediate children of all those Artboards. 86 | */ 87 | editContext: SceneNode; 88 | /** 89 | * The preferred parent to insert newly added content into. Takes into account the current edit context as well as the “focused artboard” if in the root context. 90 | */ 91 | insertionParent: SceneNode; 92 | /** 93 | * The artboard the user is currently most focused on (via recent selection or edit operations). May be null, for example if no artboards exist or if the user just deleted an artboard. 94 | */ 95 | focusedArtboard: Artboard | null | undefined; 96 | 97 | } 98 | 99 | /** 100 | * To get an instance: `require("uxp").shell` 101 | */ 102 | class Shell { 103 | /** 104 | * Opens the url in an the system browser. 105 | * @param url The url which should be opened 106 | */ 107 | public openExternal(url: string); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /types/scenegraph.d.ts: -------------------------------------------------------------------------------- 1 | declare interface Point { 2 | x: number; 3 | y: number; 4 | } 5 | 6 | interface ScaleFactor { 7 | scaleX: number; 8 | scaleY: number; 9 | } 10 | 11 | declare class Matrix { 12 | /** 13 | * Creates a new transform matrix with the following structure: 14 | * 15 | * ``` 16 | * | a c e | 17 | * | b d f | 18 | * | 0 0 1 | 19 | * ``` 20 | * 21 | * Note: XD does not generally allow transform matrices with scale or shear (skew) components - only translate and rotate components are typically permitted. 22 | * 23 | * If no arguments, creates a new identity matrix by default. 24 | * 25 | * @param a 26 | * @param b 27 | * @param c 28 | * @param d 29 | * @param e 30 | * @param f 31 | */ 32 | public constructor(a: number, b: number, c: number, d: number, e: number, f: number); 33 | 34 | /** 35 | * Copies another matrix's values into this matrix. 36 | * @param otherMatrix The matrix to copy values from. 37 | */ 38 | public setFrom(otherMatrix: Matrix); 39 | 40 | /** 41 | * Returns a copy of the matrix 42 | */ 43 | public clone(): Matrix; 44 | 45 | /** 46 | * Multiplies a passed affine transform to the right: this * M. The result effectively applies the transform of the passed in matrix first, followed by the transform of this matrix second. Modifies this matrix object and also returns it so calls can be chained. 47 | * @param aOrOtherMatrix A Matrix or the a component of an affine transform. 48 | * @param b The b component of an affine transform. 49 | * @param c The c component of an affine transform. 50 | * @param d The d component of an affine transform. 51 | * @param e The e component of an affine transform. 52 | * @param f The f component of an affine transform. 53 | */ 54 | public add(aOrOtherMatrix: number, b: number, c: number, d: number, e: number, f: number); 55 | 56 | /** 57 | * Multiplies a passed affine transform to the right: this * M. The result effectively applies the transform of the passed in matrix first, followed by the transform of this matrix second. Modifies this matrix object and also returns it so calls can be chained. 58 | * @param aOrOtherMatrix A Matrix or the a component of an affine transform. 59 | */ 60 | public add(aOrOtherMatrix: Matrix); 61 | 62 | /** 63 | * Multiplies a passed affine transform to the left: M * this. The result effectively applies the transform of this matrix first, followed by the transform of the passed in matrix second. Modifies this matrix object and also returns it so calls can be chained. 64 | * @param aOrOtherMatrix A Matrix or the a component of an affine transform. 65 | * @param b The b component of an affine transform. 66 | * @param c The c component of an affine transform. 67 | * @param d The d component of an affine transform. 68 | * @param e The e component of an affine transform. 69 | * @param f The f component of an affine transform. 70 | */ 71 | public multLeft(aOrOtherMatrix: number, b: number, c: number, d: number, e: number, f: number); 72 | 73 | /** 74 | * Multiplies a passed affine transform to the left: M * this. The result effectively applies the transform of this matrix first, followed by the transform of the passed in matrix second. Modifies this matrix object and also returns it so calls can be chained. 75 | * @param aOrOtherMatrix A Matrix or the a component of an affine transform. 76 | */ 77 | public multLeft(aOrOtherMatrix: Matrix); 78 | 79 | /** 80 | * Returns an inverted version of the matrix. Returns a brand new matrix - does not modify this matrix object. 81 | */ 82 | public invert(): Matrix; 83 | 84 | /** 85 | * Applies translation before the current transform of this matrix, as if using the add() method. Modifies this matrix object and also returns it so calls can be chained. 86 | * @param tx horizontal offset distance 87 | * @param ty vertical offset distance 88 | */ 89 | public translate(tx: number, ty: number): Matrix; 90 | 91 | /** 92 | * Applies scaling before the current transform of this matrix, as if using the add() method. Modifies this matrix object and also returns it so calls can be chained. 93 | * 94 | * Note: scale transforms are not generally permitted in XD. 95 | * @param sx amount to be scaled, with 1 resulting in no change 96 | * @param sy amount to scale along the vertical axis. (Otherwise sx applies to both axes.) 97 | * @param cx horizontal origin point from which to scale (if unspecified, scales from the local coordinates' origin point) 98 | * @param cy vertical origin point from which to scale 99 | */ 100 | public scale(sx: number, sy?: number, cx?: number, cy?: number): Matrix; 101 | 102 | /** 103 | * Applies clockwise rotation before the current transform of this matrix, as if using the add() method. Modifies this matrix object and also returns it so calls can be chained. 104 | * @param angle angle of rotation, in degrees clockwise 105 | * @param cx horizontal origin point from which to rotate (if unspecified, scales from the local coordinates' origin point) 106 | * @param cy vertical origin point from which to rotate 107 | */ 108 | public rotate(angle: number, cx?: number, cy?: number): Matrix; 109 | 110 | /** 111 | * Returns x coordinate of the given point after transformation described by this matrix. See also Matrix.y and Matrix.transformPoint. 112 | * @param x 113 | * @param y 114 | */ 115 | public x(x: number, y: number): number; 116 | 117 | /** 118 | * Returns y coordinate of the given point after transformation described by this matrix. See also Matrix.x and Matrix.transformPoint. 119 | * @param x 120 | * @param y 121 | */ 122 | public y(x: number, y: number): number; 123 | 124 | /** 125 | * Returns x & y coordinates of the given point after transformation described by this matrix. 126 | * @param point 127 | */ 128 | public transformPoint(point: Point): Point; 129 | 130 | /** 131 | * Transforms a rectangle using this matrix, returning the axis-aligned bounds of the resulting rectangle. If this matrix has rotation, then the result will have different width & height from the original rectangle, due to axis alignment. See "Coordinate Spaces" for some illustrations of this. 132 | * @param rect 133 | */ 134 | public transformRect(rect: Bounds): Bounds; 135 | 136 | /** 137 | * @return The translation component of this matrix: [tx, ty]. Equals the `e` and `f` components of this matrix. 138 | */ 139 | public getTranslate(): number[]; 140 | 141 | /** 142 | * Split the matrix into scale factors. This method assumes that there is no skew in the matrix. 143 | */ 144 | public scaleFactors(): ScaleFactor; 145 | 146 | /** 147 | * Returns a new matrix that contains only the translate and rotate components of the current matrix, with the given scale factors stripped out. Must be passed the exact scale factors returned by scaleFactors() for this matrix, and this matrix must have no skew/shear component. 148 | * 149 | * Returns a brand new matrix - does not modify this matrix object. 150 | * @param scaleX horizontal scale component to remove 151 | * @param scaleY vertical scale component to remove 152 | */ 153 | public removedScaleMatrix(scaleX: number, scaleY: number): Matrix; 154 | 155 | /** 156 | * @return true, if the matrix includes any skew (shear) 157 | */ 158 | public hasSkew(): boolean; 159 | } 160 | 161 | declare class Color { 162 | /** 163 | * Integer 0-255. Get/set the alpha channel value. 164 | */ 165 | public a: number; 166 | 167 | /** 168 | * Integer 0-255. Get/set the red channel value. 169 | */ 170 | public r: number; 171 | 172 | /** 173 | * Integer 0-255. Get/set the green channel value. 174 | */ 175 | public g: number; 176 | 177 | /** 178 | * Integer 0-255. Get/set the blue channel value. 179 | */ 180 | public b: number; 181 | 182 | /** 183 | * Creates a new color instance. 184 | * @param value String in CSS color format (hex, rgb, rgba, hsl, hsla, hsv, hsva, or color name); or ARGB numeric value (unsigned 32-bit integer); or object with r, g, b, a keys all set to integers from 0 - 255 (if a is omitted, 255 is used). 185 | * @param opacity Optional, floating-point value from 0 - 1. Use when value parameter doesn't specify an opacity and you don't want the default 1.0 (100%) opacity. 186 | */ 187 | public constructor(value: string | { r: number, g: number, b: number, a?: number }, opacity?: number); 188 | 189 | /** 190 | * Convert to an object with r, g, b, a keys where r, g, b, a range from 0 - 255. 191 | */ 192 | public toRgba(): { r: number, g: number, b: number, a: number }; 193 | 194 | /** 195 | * Convert to hex string with "#" prefix. Ignores the Color's alpha value. Returns a 3-digit string if possible, otherwise returns a 6-digit string. 196 | * @param forceSixDigits True if you want the result to always have 6 digits. 197 | */ 198 | public toHex(forceSixDigits: boolean): string; 199 | 200 | /** 201 | * Returns a clone of the current color object 202 | */ 203 | public clone(): Color; 204 | } 205 | 206 | declare class LinearGradientFill { 207 | /** 208 | * Array of objects representing each color and its position along the gradient line. The position (stop value) is a number 0.0 - 1.0. 209 | */ 210 | public colorStops: {color:Color,stop:number}[]; 211 | 212 | /** 213 | * X position of the start of the gradient line, as a multiple of the object's bounding box: X=0 indicates the left edge of the bounding box and X=1 indicates the right edge. The gradient line may start or end outside the object's bounding box, so values may be < 0 or > 1. 214 | */ 215 | public startX: number; 216 | 217 | /** 218 | * Y position of the start of the gradient line, as a multiple of the object's bounding box: Y=0 indicates the top edge of the bounding box and Y=1 indicates the bottom edge. The gradient line may start or end outside the object's bounding box, so values may be < 0 or > 1. 219 | */ 220 | public startY: number; 221 | 222 | /** 223 | * X position of the end of the gradient line, as a multiple of the object's bounding box: X=0 indicates the left edge of the bounding box and X=1 indicates the right edge. The gradient line may start or end outside the object's bounding box, so values may be < 0 or > 1. 224 | */ 225 | public endX: number; 226 | 227 | /** 228 | * Y position of the end of the gradient line, as a multiple of the object's bounding box: Y=0 indicates the top edge of the bounding box and Y=1 indicates the bottom edge. The gradient line may start or end outside the object's bounding box, so values may be < 0 or > 1. 229 | */ 230 | public endY: number; 231 | 232 | /** 233 | * Create a new LinearGradientFill instance. 234 | */ 235 | public constructor(); 236 | 237 | /** 238 | * Returns a copy of this instance. 239 | */ 240 | public clone(): LinearGradientFill; 241 | 242 | /** 243 | * Returns an array of [startX, startY, endX, endY]. 244 | */ 245 | public getEndPoints(): number[]; 246 | 247 | /** 248 | * Shorthand for setting all four start/endpoint properties. 249 | * @param startX 250 | * @param startY 251 | * @param endX 252 | * @param endY 253 | */ 254 | public setEndPoints(startX: number, startY: number, endX: number, endY: number); 255 | } 256 | 257 | declare class RadialGradientFill { 258 | // TODO: Waiting for documentation to arrive 259 | } 260 | 261 | declare class ImageFill { 262 | /** 263 | * The image is stretched (distorting its aspect ratio) so its edges line up exactly with the edges of the shape. (Similar to `object-fit: fill` in CSS). 264 | */ 265 | public static SCALE_STRETCH: string; 266 | /** 267 | * The image's aspect ratio is preserved and it it scaled to completely cover the area of the shape. This means on one axis the image's edges line up exactly with the edges of the shape, and on the other axis the image extends beyond the shape's bounds and is cropped. (Similar to `object-fit: cover` in CSS). 268 | */ 269 | public static SCALE_COVER: string; 270 | 271 | /** 272 | * How the image is scaled when the aspect ratio of the shape does not match the aspect ratio of the image: 273 | * * ImageFill.SCALE_STRETCH - The image is stretched (distorting its aspect ratio) so its edges line up exactly with the edges of the shape. (Similar to `object-fit: fill` in CSS). 274 | * * ImageFill.SCALE_COVER - The image's aspect ratio is preserved and it it scaled to completely cover the area of the shape. This means on one axis the image's edges line up exactly with the edges of the shape, and on the other axis the image extends beyond the shape's bounds and is cropped. (Similar to `object-fit: cover` in CSS). 275 | * 276 | * Image size and scaling are also affected by cropping settings, but these are not yet exposed to plugins. 277 | * 278 | * To change this property, use cloneWithOverrides. 279 | */ 280 | public scaleBehaviour: string; 281 | 282 | /** 283 | * Format the image data was originally encoded in, such as `image/gif` or `image/jpeg`. 284 | */ 285 | public readonly mimeType: string; 286 | 287 | /** 288 | * True if the image comes from a link to an external resource, such as Creative Cloud Libraries. 289 | */ 290 | public readonly isLinkedContent: boolean; 291 | 292 | /** 293 | * Pixel dimensions of the underlying bitmap image data. 294 | */ 295 | public readonly naturalWidth: number; 296 | 297 | /** 298 | * Pixel dimensions of the underlying bitmap image data. 299 | */ 300 | public readonly naturalHeight: number; 301 | 302 | /** 303 | * 304 | * @param fileOrDataURI File object pointing to an image file; or a string containing a data: URI with a base-64 encoded image. 305 | */ 306 | public constructor(fileOrDataURI: string | uxp.storage.File); 307 | 308 | /** 309 | * @returns a new copy of this ImageFill. 310 | */ 311 | public clone(): ImageFill; 312 | } 313 | 314 | 315 | declare class Shadow { 316 | /** 317 | * X offset of the shadow relative to the shape it is attached to, in global coordinates (i.e. independent of the shape's rotation or any parent's rotation). May be negative. 318 | */ 319 | public x: number; 320 | 321 | /** 322 | * Y offset of the shadow relative to the shape it is attached to, in global coordinates (i.e. independent of the shape's rotation or any parent's rotation). May be negative. 323 | */ 324 | public y: number; 325 | public blur: number; 326 | public color: Color; 327 | 328 | /** 329 | * If false, the shadow is not rendered. The user can toggle this via a checkbox in the Properties panel. 330 | */ 331 | public visible: boolean; 332 | 333 | /** 334 | * Creates a drop shadow style object with the given properties. 335 | * @param x 336 | * @param y 337 | * @param blur 338 | * @param color 339 | * @param visible optional and defaults to true. 340 | */ 341 | public constructor(x: number, y: number, blur: number, color: Color, visible: boolean = true) 342 | } 343 | 344 | declare class Blur { 345 | /** 346 | * The amount of blur 347 | * 348 | * (0 - 50) 349 | */ 350 | public blurAmount: number; 351 | /** 352 | * For background blur effects, the amount to increase or decrease the brightness of the background. Ignored for object blur effects. 353 | * 354 | * (-50 - 50) 355 | */ 356 | public brightnessAmount: number; 357 | 358 | /** 359 | * For background blur effects, the a multiplier on the opacity of the object's fill drawn over top of the blurred background. Useful to create a color tint on top of the blurred background. Does not affect stroke opacity. 360 | * 361 | * Ignored for object blur effects. 362 | * 363 | * (0.0 - 1.0) 364 | */ 365 | public fillOpacity: number; 366 | /** 367 | * If true, renders a background blur effect: all objects beneath the shape are blurred (modulated by brightnessAmount), but the shape itself is still rendered with crisp edges (with its fill modulated by fillOpacity). 368 | * 369 | * If false, renders an object blur effect: the shape itself is blurred, and objects beneath it are unaffected. 370 | */ 371 | public isBackgroundEffect: boolean; 372 | 373 | /** 374 | * If false, the blur effect is not rendered. The user can toggle this via a checkbox in the Properties panel. 375 | */ 376 | public visible: boolean; 377 | 378 | /** 379 | * Creates an object blur or background blur effect object with the given properties. 380 | * @param blurAmount 381 | * @param brightnessAmount 382 | * @param fillOpacity 383 | * @param visible 384 | * @param isBackgroundEffect 385 | */ 386 | constructor(blurAmount: number, brightnessAmount: number, fillOpacity: number, visible?: boolean, isBackgroundEffect?: boolean); 387 | } 388 | 389 | declare interface Bounds { 390 | x: number; 391 | y: number; 392 | width: number; 393 | height: number; 394 | } 395 | 396 | /** 397 | * Base class of all scenegraph nodes. Nodes will always be an instance of some subclass of SceneNode. 398 | */ 399 | declare abstract class SceneNode { 400 | /** 401 | * Returns a unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. Cut-Paste will result in a new guid, however. 402 | */ 403 | public readonly guid: string; 404 | /** 405 | * Returns the parent node. Null if this is the root node, or a freshly constructed node which has not been added to a parent yet. 406 | */ 407 | public readonly parent: SceneNode | null; 408 | /** 409 | * Returns a list of this node’s children. List is length 0 if the node has no children. The first child is lowest in the z order. 410 | * This list is not an Array, so you must use at(i) instead of [i] to access children by index. It has a number of Array-like methods such as forEach() for convenience, however. 411 | * The list is immutable. Use removeFromParent and addChild to add/remove child nodes. 412 | */ 413 | public readonly children: SceneNodeList; 414 | /** 415 | * True if the node’s parent chain connects back to the document root node. 416 | */ 417 | public readonly isInArtworkTree: boolean; 418 | /** 419 | * True if this node is a type that could have children (e.g. an Artboard, Group, Boolean Group, etc.). 420 | */ 421 | public readonly isContainer: boolean; 422 | /** 423 | * True if this node is part of the current selection. To change which nodes are selected, use selection. 424 | */ 425 | public readonly selected: boolean; 426 | 427 | /** 428 | * False if this node has been hidden by the user (eyeball toggle in Layers panel). If true, the node may still be invisible for other reasons: a parent or grandparent has visible=false, the node has opacity=0%, the node is clipped by a mask, etc. 429 | */ 430 | public visible: boolean; 431 | 432 | /** 433 | * (0.0-1.0)Node’s opacity setting. The overall visual opacity seen on canvas is determined by combining this value with the opacity of the node’s entire parent chain, as well as the opacity settings of its fill/stroke properties if this is a leaf node. 434 | */ 435 | public opacity: number; 436 | 437 | /** 438 | * Affine transform matrix that converts from the node’s local coordinate space to its parent’s coordinate space. The matrix never has skew or scale components, and if this node is an Artboard the matrix never has rotation either. Rather than working with the raw matrix directly, it may be easier to use methods such as placeInParentCoordinates or rotateAround. 439 | * Returns a fresh Matrix each time, so this can be mutated by the caller without interfering with anything. Mutating the returned Matrix does not change the node’s transform - only invoking the ‘transform’ setter changes the node. To modify an existing transform, always be sure to re-invoke the transform setter rather than just changing the Matrix object’s properties inline. See “Properties with object values”. 440 | * For an overview of node transforms & coordinate systems, see Coordinate spaces. 441 | */ 442 | public readonly transform: Matrix; 443 | 444 | /** 445 | * The translate component of this node’s transform. Since translation is applied after any rotation in the transform Matrix, translation occurs along the parent’s X/Y axes, not the node’s own local X/Y axes. This is equivalent to the e & f fields in the transform Matrix. 446 | * For an overview of node positioning & coordinate systems, see Coordinate spaces. 447 | */ 448 | public translation: Point; 449 | 450 | /** 451 | * The rotation component of this node’s transform, in clockwise degrees. 452 | * For an overview of node transforms & coordinate systems, see Coordinate spaces. 453 | */ 454 | public readonly rotation: number; 455 | 456 | /** 457 | * The node’s path bounds in document-global coordinate space (represented by a bounding box aligned with global X/Y axes). Path bounds match the selection outline seen in the XD, but exclude some visual parts of the node (outer stroke, drop shadow / blur, etc.). 458 | */ 459 | public readonly globalBounds: Bounds; 460 | 461 | /** 462 | * The node’s path bounds in its own local coordinate space. This coordinate space may be rotated and translated relative to the parent’s coordinate space. Path bounds match the selection outline seen in XD, but exclude some visual parts of the node (outerstroke, drop shadow / blur, etc.). 463 | * The visual top-left of a node’s path bounds is located at (localBounds.x, localBounds.y). This value is not necessarily (0,0) in the local coordinate space: for example, a text node’s baseline is at y=0 in local coordinates, so the top of the text has a negative y value. 464 | */ 465 | public readonly localBounds: Bounds; 466 | 467 | /** 468 | * The node’s path bounds in its parent’s coordinate space (represented by a bounding box aligned with the parent’s X/Y axes - so if the node has rotation, the top-left of the node is not necessarily located at the top-left of boundsInParent). Path bounds match the selection outline seen in XD, but exclude some visual parts of the node (outer stroke, drop shadow / blur, etc.). 469 | */ 470 | public readonly boundsInParent: Bounds; 471 | 472 | /** 473 | * The position of the node’s upper-left corner (localBounds.x, localBounds.y) in its parent’s coordinate space. If the node is rotated, this is not the same as the top-left corner of boundsInParent. This is a shortcut for node.transform.transformPoint({x: node.localBounds.x, y: node.localBounds.y}) 474 | */ 475 | public readonly topLeftInParent: Point; 476 | 477 | /** 478 | * The position of the node’s centerpoint in its own local coordinate space. Useful as an argument to rotateAround. This is a shortcut for {x: localBounds.x + localBounds.width/2, y: localBounds.y + localBounds.height/2}) 479 | */ 480 | public readonly localCenterPoint: Point; 481 | 482 | /** 483 | * The node’s draw bounds in document-global coordinate space. Draw bounds are larger than the selection outline seen in XD, including outer stroke, drop shadow / blur, etc. - every visible pixel of the node is encompassed by these bounds. This matches the image dimensions if the node is exported as a PNG/JPEG bitmap. 484 | */ 485 | public readonly globalDrawBounds: Bounds; 486 | 487 | /** 488 | * Node name as seen in the Layers panel. Also used as filename during export. 489 | */ 490 | public name: string; 491 | 492 | /** 493 | * True if name is a generic, auto-generated string (e.g. “Rectangle 5”). False if name has been explicitly set. 494 | */ 495 | public readonly hasDefaultName: boolean; 496 | 497 | /** 498 | * True if the node is locked, meaning it cannot normally be selected. 499 | */ 500 | public locked: boolean; 501 | 502 | /** 503 | * True if the node should be included in the output of File > export > Batch and other bulk-export workflows. 504 | */ 505 | public markedForExport: boolean; 506 | 507 | /** 508 | * True if the node’s appearance comes from a link to an external resource, such as Creative Cloud Libraries. 509 | */ 510 | public readonly hasLinkedContent: boolean; 511 | 512 | /** 513 | * Remove this node from its parent, effectively deleting it from the document. 514 | */ 515 | public removeFromParent(): void; 516 | 517 | /** 518 | * Move the node by the given number of pixels along the parent’s X/Y axes (if this node has no rotation, this is identical to moving the node along its own local X/Y axes). This is equivalent to modifying the value returned by ‘translation’ and then setting it back. 519 | * For an overview of node positioning & coordinate systems, see Coordinate spaces. 520 | * @param {number} deltaX 521 | * @param {number} deltaY 522 | */ 523 | public moveInParentCoordinates(deltaX: number, deltaY: number): void; 524 | 525 | /** 526 | * Move the node so the given point in its local coordinates is placed at the given point in its parent’s coordinates (taking into account any rotation on this node, etc.). 527 | * For an overview of node positioning & coordinate systems, see Coordinate spaces. 528 | * @param {Point} registrationPoint Point in this node’s local coordinate space to align with parentPoint 529 | * @param {Point} parentPoint Point in this node’s parent’s coordinate space to move registrationPoint to 530 | */ 531 | public placeInParentCoordinates( 532 | registrationPoint: Point, 533 | parentPoint: Point 534 | ): void; 535 | 536 | /** 537 | * Rotate the node clockwise by the given number of degrees around the given point in the plugin’s local coordinate space. If this node already has nonzero rotation, this operation adds to its existing angle. 538 | * @param {number} deltaAngle In degrees. 539 | * @param {Point} rotationCenter Point to rotate around, in node’s local coordinates. 540 | */ 541 | public rotateAround(deltaAngle: number, rotationCenter: Point): void; 542 | 543 | /** 544 | * Attempts to change localBounds.width & height to match the specified sizes. This operation may not succeed, since some nodes are not resizable. Resizing one dimension may affect the other, if the node’s aspect ratio is locked. 545 | * @param {number} width 546 | * @param {number} height 547 | */ 548 | public resize(width: number, height: number): void; 549 | } 550 | 551 | /** 552 | * Base class for nodes that have a stroke and/or fill. This includes leaf nodes such as Rectangle, as well as BooleanGroup which is a container node. If you create a shape node, it will not be visible unless you explicitly give it either a stroke or a fill. 553 | */ 554 | declare class GraphicsNode extends SceneNode { 555 | /** 556 | * The fill applied to this shape, if any. If this property is null or fillEnabled is false, no fill is drawn. Freshly created nodes have no fill by default. 557 | * 558 | * For Line objects, fill is ignored. For Text objects, only solid Color fill values are allowed. 559 | * 560 | * To modify an existing fill, always be sure to re-invoke the fill setter rather than just changing the fill object’s properties inline. See “Properties with object values”. 561 | * 562 | * Known issue: When modifying a gradient fill object specifically, you must clone the gradient returned by the getter before modifying it, to avoid issues with Undo history. 563 | */ 564 | public fill: 565 | | null 566 | | Color 567 | | LinearGradientFill 568 | | RadialGradientFill 569 | | ImageFill; 570 | 571 | /** 572 | * If false, the fill is not rendered. The user can toggle this via a checkbox in the Properties panel. 573 | */ 574 | public fillEnabled: boolean; 575 | 576 | /** 577 | * The stroke color applied to this shape, if any. If this property is null or strokeEnabled is false, no stroke is drawn. Freshly created nodes have no stroke by default. Artboard objects ignore stroke settings. 578 | * 579 | * Depending on the strokeWidth and strokePosition, the path outline of a node may need to be positioned on fractional pixels in order for the stroke itself to be crisply aligned to the pixel grid. For example, if a horizontal line uses a 1px center stroke, the line’s y should end in .5 to keep the stroke on-pixel. 580 | * 581 | * To modify an existing stroke, always be sure to re-invoke the stroke setter rather than just changing the Color object’s properties inline. See “Properties with object values”. 582 | */ 583 | public stroke: null | Color; 584 | 585 | /** 586 | * If false, the stroke is not rendered. The user can toggle this via a checkbox in the Properties panel. 587 | */ 588 | public strokeEnabled: boolean; 589 | 590 | /** 591 | * Thickness in pixels of the stroke. 592 | * value must be >= 0 593 | */ 594 | public strokeWidth: number; 595 | 596 | /** 597 | * Position of the stroke relative to the shape’s path outline: GraphicNode.INNER_STROKE, OUTER_STROKE, or CENTER_STROKE. 598 | */ 599 | public strokePosition: string; 600 | 601 | /** 602 | * For Lines and non-closed Paths, how the dangling ends of the stroke are rendered: GraphicNode.STROKE_CAP_NONE, STROKE_CAP_SQUARE, or STROKE_CAP_ROUND. 603 | */ 604 | public strokeEndCaps: string; 605 | 606 | /** 607 | * How sharp corners in the shape are rendered: GraphicNode.STROKE_JOIN_BEVEL, STROKE_JOIN_ROUND, or STROKE_JOIN_MITER. 608 | */ 609 | public strokeJoins: string; 610 | 611 | /** 612 | * value must be >= 0 613 | */ 614 | public strokeMiterLimit: number; 615 | 616 | /** 617 | * Empty array indicates a solid stroke. If non-empty, values represent the lengths of rendered and blank segments of the stroke’s dash pattern, repeated along the length of the stroke. The first value is the length of the first solid segment. If the array is odd length, the items are copied to double the array length. For example, [3] produces the same effect as [3, 3]. 618 | * 619 | * The appearance of each segment’s start/end follows the strokeEndCaps setting. 620 | */ 621 | public strokeDashArray: Array; 622 | 623 | /** 624 | * Ignored unless strokeDashArray is non-empty. Shifts the “phase” of the repeating dash pattern along the length of the stroke. 625 | */ 626 | public strokeDashOffset: number; 627 | 628 | /** 629 | * The node’s dropshadow, if any. If there is no shadow applied, this property may be null or shadow.visible may be false. 630 | */ 631 | public shadow: null | Shadow; 632 | 633 | /** 634 | * The node’s object blur or background blur settings, if applicable. If there is no blur effect applied, this property may be null or blur.visible may be false. 635 | */ 636 | public blur: null | Blur; 637 | 638 | /** 639 | * Returns a representation of the node’s outline in SVG syntax. Note that only nodes with strokePosition == GraphicNode.CENTER_STROKE can be faithfully rendered in actual SVG using the exact pathData shown here. 640 | */ 641 | public readonly pathData: string; 642 | 643 | /** 644 | * True if the node’s image fill comes from a link to an external resource, such as Creative Cloud Libraries. 645 | */ 646 | public readonly hasLinkedGraphicFill: boolean; 647 | } 648 | 649 | /** 650 | * Artboard container node. All Artboards must be children of the root node (they cannot be nested), and they must be placed below all pasteboard content in the z order. 651 | * 652 | * Artboards can have a background fill, but the stroke, shadow, and blur settings are all ignored. Artboards cannot be locked or hidden, or have opacity < 100%. 653 | * 654 | * If a node is changed to overlap an Artboard, it will automatically become a child of the artboard when the operation finishes, and similar if a node is changed to no longer overlap an Artboard. It is not possible to have a node overlapping an Artboard that does not become a child of the artboard, or vice versa, a node that falls entirely outside an Artboard’s bounds but remains its child. 655 | */ 656 | declare class Artboard extends GraphicsNode { 657 | /** 658 | * value must be >= 0 659 | */ 660 | public width: number; 661 | 662 | /** 663 | * For scrollable Artboards, this is the total height encompassing all content - not just the viewport size (i.e. screen height). 664 | * 665 | * value must be >= 0 666 | */ 667 | public height: number; 668 | 669 | /** 670 | * If Artboard is scrollable, this is the height of the viewport (e.g. mobile device screen size). Null if Artboard isn’t scrollable. 671 | */ 672 | public viewportHeight: null | number; 673 | 674 | /** 675 | * Adds a child node to this container node. You can only add leaf nodes this way; to create structured subtrees of content, use commands. 676 | * @param {SceneNode} node Child to add 677 | * @param {number} index Optional: index to insert child at. Child is appended to end of children list (top of z order) otherwise. 678 | */ 679 | public addChild(node: SceneNode, index?: number): void; 680 | 681 | /** 682 | * Inserts a child node after the given reference node. 683 | * @param {SceneNode} node Child to add 684 | * @param {SceneNode} relativeTo New child is added immediately after this existing child 685 | */ 686 | public addChildAfter(node: SceneNode, relativeTo: SceneNode): void; 687 | 688 | /** 689 | * Inserts a child node before the given reference node. 690 | * @param {SceneNode} node Child to add 691 | * @param {SceneNode} relativeTo New child is added immediately before this existing child 692 | */ 693 | public addChildBefore(node: SceneNode, relativeTo: SceneNode): void; 694 | 695 | /** 696 | * Removes all children from this node. Equivalent to calling removeFromParent() on each child in turn, but faster. 697 | */ 698 | public removeAllChildren(): void; 699 | } 700 | 701 | /** 702 | * Rectangle leaf node shape, with or without rounded corners. Like all shape nodes, has no fill or stroke by default unless you set one. 703 | */ 704 | declare class Rectangle extends GraphicsNode { 705 | /** 706 | * value must be >= 0 707 | */ 708 | public width: number; 709 | 710 | /** 711 | * value must be >= 0 712 | */ 713 | public height: number; 714 | 715 | /** 716 | * To set all corners to the same value, use setAllCornerRadii. 717 | */ 718 | public cornerRadii: { 719 | topLeft: number; 720 | topRight: number; 721 | bottomRight: number; 722 | bottomLeft: number; 723 | }; 724 | 725 | /** 726 | * True if any of the Rectangle’s four corners is rounded (corner radius > 0). 727 | */ 728 | public readonly hasRoundedCorners: boolean; 729 | /** 730 | * The actual corner radius that is rendered may be capped by the size of the rectangle. Returns the actual radii that are currently in effect, which may be smaller than the cornerRadii values as a result. 731 | */ 732 | public effectiveCornerRadii: { 733 | topLeft: number; 734 | topRight: number; 735 | bottomRight: number; 736 | bottomLeft: number; 737 | }; 738 | 739 | /** 740 | * Set the rounding radius of all four corners of the Rectangle to the same value. To set the corners to different radius values, use cornerRadii. 741 | * @param {number} radius New radius of all corners 742 | */ 743 | public setAllCornerRadii(radius: number): void; 744 | } 745 | 746 | /** 747 | * Ellipse leaf node shape. 748 | */ 749 | declare class Ellipse extends GraphicsNode { 750 | public radiusX: number; 751 | public radiusY: number; 752 | /** 753 | * True if the Ellipse is a circle (i.e., has a 1:1 aspect ratio). 754 | */ 755 | public isCircle: boolean; 756 | } 757 | 758 | /** 759 | * Line leaf node shape. 760 | */ 761 | declare class Line extends GraphicsNode { 762 | /** 763 | * Start point of the Line in local coordinate space.TEMP: To change the start point, use setStartEnd. 764 | */ 765 | public readonly start: Point; 766 | /** 767 | * Endpoint of the Line in local coordinate space.TEMP: To change the endpoint, use setStartEnd. 768 | */ 769 | public readonly end: Point; 770 | 771 | /** 772 | * Set the start and end points of the Line in local coordinate space. The values may be normalized by this setter, shifting the node’s translation and counter-shifting the start/end points. So the start/end setters may return values different from the values you passed this setter, even though the line’s visual bounds and appearance are the same. 773 | * @param {number} startX 774 | * @param {number} startY 775 | * @param {number} endX 776 | * @param {number} endY 777 | */ 778 | public setSTartEnd( 779 | startX: number, 780 | startY: number, 781 | endX: number, 782 | endY: number 783 | ): void; 784 | } 785 | 786 | /** 787 | * Arbitrary vector Path leaf node shape. 788 | * 789 | * The path may not start at (0,0) in local coordinates, for example if it starts with a move (“M”) 790 | */ 791 | declare class Path extends GraphicsNode { 792 | /** 793 | * Representation of the path outline in SVG syntax. Unlike other node types, pathData is writable here. Syntax is automatically normalized, so the getter may return a slightly different string than what you passed to the setter. 794 | */ 795 | public pathData: string; 796 | } 797 | 798 | /** 799 | * BooleanGroup container node - although it has fill/stroke/etc. properties like a leaf shape node, it is a container with children. Its visual appearance is determined by generating a path via a nondestructive boolean operation on all its children’s paths. 800 | * 801 | * It is not currently possible for plugins to create a new BooleanGroup node, aside from using commands.duplicate to clone existing BooleanGroups. 802 | */ 803 | declare class BooleanGroup extends GraphicsNode { 804 | /** 805 | * Which boolean operation is used to generate the path: BooleanGroup.PATH_OP_ADD, PATH_OP_SUBTRACT, PATH_OP_INTERSECT, or PATH_OP_EXCLUDE_OVERLAP. 806 | */ 807 | public readonly pathOp: string; 808 | 809 | /** 810 | * Adds a child node to this container node. You can only add leaf nodes this way; to create structured subtrees of content, use commands. 811 | * @param {SceneNode} node Child to add 812 | * @param {number} index Optional: index to insert child at. Child is appended to end of children list (top of z order) otherwise. 813 | */ 814 | public addChild(node: SceneNode, index?: number): void; 815 | 816 | /** 817 | * Inserts a child node after the given reference node. 818 | * @param {SceneNode} node Child to add 819 | * @param {SceneNode} relativeTo New child is added immediately after this existing child 820 | */ 821 | public addChildAfter(node: SceneNode, relativeTo: SceneNode): void; 822 | 823 | /** 824 | * Inserts a child node before the given reference node. 825 | * @param {SceneNode} node Child to add 826 | * @param {SceneNode} relativeTo New child is added immediately before this existing child 827 | */ 828 | public addChildBefore(node: SceneNode, relativeTo: SceneNode): void; 829 | 830 | /** 831 | * Removes all children from this node. Equivalent to calling removeFromParent() on each child in turn, but faster. 832 | */ 833 | public removeAllChildren(): void; 834 | } 835 | 836 | /** 837 | * Text leaf node shape. Text can have a fill and/or stroke, but only a solid-color fill is allowed (gradient or image will will be rejected). 838 | * 839 | * There are two types of Text nodes: 840 | * - Point Text - Expands to fit the full width of the text content. Only uses multiple lines if the text content contains hard line breaks ("\n"). 841 | * - Area Text - Fixed width and height. Text is automatically wrapped (soft line wrapping) to fit the width. If it does not fit the height, any remaining text is clipped. Check whether areaBox is null to determine the type of a Text node. 842 | * 843 | * The baseline of a Point Text node is at y=0 in its own local coordinate system. Horizontally, local x=0 is the anchor point that the text grows from / shrinks toward when edited. This anchor depends on the justification: for example, if the text is centered, x=0 is the horizontal centerpoint of the text. 844 | * 845 | * The bounds reported for a Text object leave enough space for descenders, uppercase letters, and accent marks, even if the current string does not contain any of those characters. This makes aligning text based on its bounds behave more consistently. 846 | */ 847 | declare class Text extends GraphicsNode { 848 | /** 849 | * The plaintext content of the node, including any hard line breaks but excluding soft line wrap breaks. 850 | * 851 | * Setting text does not change styleRanges, so styles aligned with the old text’s string indices will continue to be applied to the new string’s indices unless you explicitly change styleRanges as well. 852 | */ 853 | public text: string; 854 | 855 | /** 856 | * Array of text ranges and their character style settings. Each range covers a set number of characters in the text content. Ranges are contiguous, with each one starting immediately after the previous one. Any characters past the end of the last range use the same style as the last range. 857 | * 858 | * When setting styleRanges, any fields missing from a given range default to the existing values from the last range in the old value of styleRanges. The styleRanges getter always returns fully realized range objects with all fields specified. 859 | */ 860 | public styleRanges: Array<{ 861 | length: number; 862 | fontFamily: string; 863 | fontStyle: string; 864 | fontSize: number; 865 | fill: Color; 866 | charSpacing: number; 867 | underline: boolean; 868 | }>; 869 | 870 | /** 871 | * If true, the text is drawn upside down. 872 | */ 873 | public flipY: boolean; 874 | 875 | /** 876 | * Horizontal alignment: Text.ALIGN_LEFT, ALIGN_CENTER, or ALIGN_RIGHT. This setting affects the layout of multiline text, and it also affects what direction text grows when edited on canvas. 877 | */ 878 | public textAlign: string; 879 | 880 | /** 881 | * Distance between baselines in multiline text, in document pixels. The special value 0 causes XD to use the default line spacing defined by the font given the current font size & style. 882 | * 883 | * This property is not automatically adjusted when fontSize changes, if line spacing is not set to 0, the line spacing will stay fixed while the font size changes, shifting the spacing’s proportional relationship to font size. If the value is 0, then the rendered line spacing will change to match the new font size, since 0 means the spacing is dynamically calculated from the current font settings. 884 | */ 885 | public lineSpacing: number; 886 | 887 | /** 888 | * Null for point text. For area text, specifies the size of the rectangle within which text is wrapped and clipped. 889 | */ 890 | public readonly areaBox: null | { width: number; height: number }; 891 | 892 | /** 893 | * Always false for point text. For area text, true if the text does not fit in the content box and its bottom is being clipped. 894 | */ 895 | public readonly clippedByArea: boolean; 896 | } 897 | 898 | /** 899 | * Group nodes represent two types of simple containers in XD: 900 | * - Plain Groups, created by the Object > Group command 901 | * - Masked Groups, created by the Object > Mask With Shape command You can determine whether a group is masked by checking the mask property. 902 | * 903 | * Groups and other containers cannot be created directly using scenenode constructors, since you can’t add a populated Group to the scenegraph (you can’t add subtrees all at once) nor can you add an empty Group and then add children to it (can’t add nodes outside the scope of the current edit context). Instead, to create Groups and other nested structures, use commands. 904 | * 905 | * In a Mask Group, the mask shape is included in the group’s children list, at the top of the z order. It is not visible - only its path outline is used, for clipping the group. 906 | */ 907 | declare class Group extends SceneNode { 908 | /** 909 | * The mask shape applied to this group, if any. This object is also present in the group’s children list. Though it has no direct visual appearance of its own, the mask affects the entire groups’s appearance by clipping all its other content. 910 | */ 911 | public readonly mask: SceneNode | null; 912 | 913 | /** 914 | * Adds a child node to this container node. You can only add leaf nodes this way; to create structured subtrees of content, use commands. 915 | * @param {SceneNode} node Child to add 916 | * @param {number} index Optional: index to insert child at. Child is appended to end of children list (top of z order) otherwise. 917 | */ 918 | public addChild(node: SceneNode, index?: number): void; 919 | 920 | /** 921 | * Inserts a child node after the given reference node. 922 | * @param {SceneNode} node Child to add 923 | * @param {SceneNode} relativeTo New child is added immediately after this existing child 924 | */ 925 | public addChildAfter(node: SceneNode, relativeTo: SceneNode): void; 926 | 927 | /** 928 | * Inserts a child node before the given reference node. 929 | * @param {SceneNode} node Child to add 930 | * @param {SceneNode} relativeTo New child is added immediately before this existing child 931 | */ 932 | public addChildBefore(node: SceneNode, relativeTo: SceneNode): void; 933 | 934 | /** 935 | * Removes all children from this node. Equivalent to calling removeFromParent() on each child in turn, but faster. 936 | */ 937 | public removeAllChildren(): void; 938 | } 939 | 940 | /** 941 | * Container node representing one instance of a Symbol. Changes within a symbol instance are automatically synced to all other instances of the symbol, with certain exceptions (called “overrides”). 942 | * 943 | * It is not currently possible for plugins to create a new Symbol definition or a new SymbolInstance node, aside from using commands.duplicate to clone existing SymbolInstances. 944 | */ 945 | declare class SymbolInstance extends SceneNode { 946 | /** 947 | * An identifier unique within this document that is shared by all instances of the same Symbol. 948 | */ 949 | public readonly symbolId: string; 950 | 951 | /** 952 | * Adds a child node to this container node. You can only add leaf nodes this way; to create structured subtrees of content, use commands. 953 | * @param {SceneNode} node Child to add 954 | * @param {number} index Optional: index to insert child at. Child is appended to end of children list (top of z order) otherwise. 955 | */ 956 | public addChild(node: SceneNode, index?: number): void; 957 | 958 | /** 959 | * Inserts a child node after the given reference node. 960 | * @param {SceneNode} node Child to add 961 | * @param {SceneNode} relativeTo New child is added immediately after this existing child 962 | */ 963 | public addChildAfter(node: SceneNode, relativeTo: SceneNode): void; 964 | 965 | /** 966 | * Inserts a child node before the given reference node. 967 | * @param {SceneNode} node Child to add 968 | * @param {SceneNode} relativeTo New child is added immediately before this existing child 969 | */ 970 | public addChildBefore(node: SceneNode, relativeTo: SceneNode): void; 971 | 972 | /** 973 | * Removes all children from this node. Equivalent to calling removeFromParent() on each child in turn, but faster. 974 | */ 975 | public removeAllChildren(): void; 976 | } 977 | 978 | /** 979 | * Repeat Grid container node containing multiple grid cells, each one a child Group. Changes within one cell are automatically synced to all the other cells - with certain exceptions, called "overrides." A Repeat Grid also defines a rectangular clipping mask which determines how may cells are visible (new cells are automatically generated as needed if the Repeat Grid is resized larger). 980 | * Each grid cell is a Group that is an immediate child of the RepeatGrid. These groups are automatically created and destroyed as needed when the RepeatGrid is resized. 981 | * It is not currently possible for plugins to create a new RepeatGrid node, aside from using commands.duplicate to clone existing RepeatGrids. 982 | */ 983 | declare class RepeatGrid extends SceneNode { 984 | /** 985 | * Defines size of the RepeatGrid. Cells are created and destroyed as necessary to fill the current size. Cells that only partially fit will be clipped. 986 | */ 987 | public width: number; 988 | 989 | /** 990 | * Defines size of the RepeatGrid. Cells are created and destroyed as necessary to fill the current size. Cells that only partially fit will be clipped. 991 | */ 992 | public height: number; 993 | 994 | /** 995 | * Number of grid columns 996 | */ 997 | public numColumns: number; 998 | 999 | /** 1000 | * Number of grid rows 1001 | */ 1002 | public numRows: number; 1003 | 1004 | /** 1005 | * Horizontal spacing between grid cells/columns 1006 | */ 1007 | public paddingX: number; 1008 | 1009 | /** 1010 | * Vertical spacing between grid cells/rows 1011 | */ 1012 | public paddingY: number; 1013 | 1014 | /** 1015 | * The size of each grid cell. The size of each cell’s content can vary slightly due to text overrides; the cell size is always set to the width of the widest cell content and the height of the tallest cell content. 1016 | */ 1017 | public cellSize: { width: number; height: number }; 1018 | 1019 | /** 1020 | * Attach a sequence of text values to the instances of a given text node across all the cells of a Repeat Grid. The sequence is repeated as necessary to cover all the grid cells. This is a persistent data binding, so if the Repeat Grid is resized later to increase the number of grid cells, items from this sequence will be used to fill the text values of the new cells. 1021 | * You can call this API from either of two different edit contexts: 1022 | * - Edit context is the parent node of this RepeatGrid (i.e. a context where the RepeatGrid could be selected) 1023 | * - Edit context is the RepeatGrid cell which is the parent of textNode (i.e. a context where textNode could be selected) 1024 | * @param {Text} textNode A Text node exemplar that is an immediate child of one of this RepeatGrid's cells. The data series will be bound to this text node and all corresponding copies of it in the other grid cells. 1025 | * @param {string[]} textValues Array of one or more strings. Empty strings are ignored. 1026 | */ 1027 | public attachTextDataSeries(textNode: Text, textValues: string[]): void; 1028 | 1029 | /** 1030 | * Attach a sequence of image fills to the instances of a given shape node across all the cells of a Repeat Grid. The sequence is repeated as necessary to cover all the grid cells. This is a persistent data binding, so if the Repeat Grid is resized later to increase the number of grid cells, items from this sequence will be used to set the image fill in the new cells. 1031 | * You can call this API from either of two different edit contexts: 1032 | * - Edit context is the parent node of this RepeatGrid (i.e. a context where the RepeatGrid could be selected) 1033 | * - Edit context is the RepeatGrid cell which is the parent of shapeNode (i.e. a context where shapeNode could be selected) 1034 | * @param {GraphicsNode} shapeNode A shape node exemplar that is an immediate child of one of this RepeatGrid's cells. The image series will be bound to this node and all corresponding copies of it in the other grid cells. Must be a node type that supports image fills (e.g. Rectangle, but not Text or Line). 1035 | * @param {string[]} images Array of one or more ImageFills. 1036 | */ 1037 | attachImageDataSeries(shapeNode: GraphicsNode, images: string[]): void; 1038 | 1039 | /** 1040 | * Adds a child node to this container node. You can only add leaf nodes this way; to create structured subtrees of content, use commands. 1041 | * @param {SceneNode} node Child to add 1042 | * @param {number} index Optional: index to insert child at. Child is appended to end of children list (top of z order) otherwise. 1043 | */ 1044 | public addChild(node: SceneNode, index?: number): void; 1045 | 1046 | /** 1047 | * Inserts a child node after the given reference node. 1048 | * @param {SceneNode} node Child to add 1049 | * @param {SceneNode} relativeTo New child is added immediately after this existing child 1050 | */ 1051 | public addChildAfter(node: SceneNode, relativeTo: SceneNode): void; 1052 | 1053 | /** 1054 | * Inserts a child node before the given reference node. 1055 | * @param {SceneNode} node Child to add 1056 | * @param {SceneNode} relativeTo New child is added immediately before this existing child 1057 | */ 1058 | public addChildBefore(node: SceneNode, relativeTo: SceneNode): void; 1059 | 1060 | /** 1061 | * Removes all children from this node. Equivalent to calling removeFromParent() on each child in turn, but faster. 1062 | */ 1063 | public removeAllChildren(): void; 1064 | } 1065 | 1066 | /** 1067 | * Container node whose content is linked to an external resource, such as Creative Cloud Libraries. It cannot be edited except by first ungrouping it, breaking this link. 1068 | */ 1069 | declare class LinkedGraphic extends SceneNode { 1070 | } 1071 | 1072 | /** 1073 | * Class representing the root node of the document. All Artboards are children of this node, as well as any pasteboard content that does not lie within an Artboard. Artboards must be grouped contiguously at the bottom of this node’s z order. The root node has no visual appearance of its own. 1074 | */ 1075 | declare class RootNode extends SceneNode { 1076 | /** 1077 | * Adds a child node to this container node. You can only add leaf nodes this way; to create structured subtrees of content, use commands. 1078 | * @param {SceneNode} node Child to add 1079 | * @param {number} index Optional: index to insert child at. Child is appended to end of children list (top of z order) otherwise. 1080 | */ 1081 | public addChild(node: SceneNode, index?: number): void; 1082 | 1083 | /** 1084 | * Inserts a child node after the given reference node. 1085 | * @param {SceneNode} node Child to add 1086 | * @param {SceneNode} relativeTo New child is added immediately after this existing child 1087 | */ 1088 | public addChildAfter(node: SceneNode, relativeTo: SceneNode): void; 1089 | 1090 | /** 1091 | * Inserts a child node before the given reference node. 1092 | * @param {SceneNode} node Child to add 1093 | * @param {SceneNode} relativeTo New child is added immediately before this existing child 1094 | */ 1095 | public addChildBefore(node: SceneNode, relativeTo: SceneNode): void; 1096 | 1097 | /** 1098 | * Removes all children from this node. Equivalent to calling removeFromParent() on each child in turn, but faster. 1099 | */ 1100 | public removeAllChildren(): void; 1101 | } 1102 | 1103 | export { 1104 | RootNode, 1105 | SceneNode, 1106 | GraphicsNode, 1107 | Artboard, 1108 | Rectangle, 1109 | Ellipse, 1110 | Line, 1111 | Path, 1112 | BooleanGroup, 1113 | Text, 1114 | Group, 1115 | SymbolInstance, 1116 | RepeatGrid, 1117 | LinkedGraphic, 1118 | Color, 1119 | ImageFill, 1120 | LinearGradientFill, 1121 | Matrix, 1122 | Shadow, 1123 | Blur 1124 | } 1125 | -------------------------------------------------------------------------------- /types/uxp.d.ts: -------------------------------------------------------------------------------- 1 | declare const shell: Shell; 2 | 3 | declare module storage { 4 | /** 5 | * An Entry is the base class for `File` and `Folder`. You'll typically never instantiate an `Entry` directly, but it provides the common fields and methods that both `File` and `Folder` share. 6 | */ 7 | declare export static class Entry { 8 | /** 9 | * Creates an instance of Entry. 10 | * @param name 11 | * @param provider 12 | * @param id 13 | */ 14 | public constructor(name: any, provider: any, id: any); 15 | 16 | /** 17 | * Indicates that this instance is an `Entry`. Useful for type-checking. 18 | */ 19 | public isEntry: boolean; 20 | 21 | /** 22 | * Indicates that this instance is not a `File`. Useful for type-checking. 23 | */ 24 | public readonly isFile: boolean; 25 | 26 | /** 27 | * Indicates that this instance is **not** a folder. Useful for type-checking. 28 | */ 29 | public readonly isFolder: boolean; 30 | 31 | /** 32 | * The name of this entry. Read-only. 33 | */ 34 | public readonly name: string; 35 | 36 | /** 37 | * The associated provider that services this entry. Read-only. 38 | */ 39 | public readonly provider: FileSystemProvider; 40 | 41 | /** 42 | * The url of this entry. You can use this url as input to other entities of the extension system like for eg: set as src attribute of a Image widget in UI. Read-only. 43 | */ 44 | public readonly url: string; 45 | 46 | /** 47 | * The platform native file-system path of this entry. Read-only 48 | */ 49 | public readonly nativePath: string; 50 | 51 | /** 52 | * Copies this entry to the specified `folder`. 53 | * @param folder the folder to which to copy this entry 54 | * @param {object} options additional options 55 | * @param {boolean=false} options.overwrite if `true`, allows overwriting existing entries 56 | * 57 | * @throws errors.EntryExistsError if the attempt would overwrite an entry and `overwrite` is `false` 58 | * @throws errors.PermissionDeniedError if the underlying file system rejects the attempt 59 | * @throws errors.OutOfSpaceError if the file system is out of storage space 60 | */ 61 | public copyTo(folder: Folder, options?): Promise; 62 | 63 | /** 64 | * Moves this entry to the target folder, optionally specifying a new name. 65 | * @param folder the folder to which to move this entry 66 | * @param {object} options 67 | * @param {boolean=false} options.overwrite If true allows the move to overwrite existing files 68 | * @param {string=} options.newName If specified, the entry is renamed to this name 69 | */ 70 | public moveTo(folder: Folder, options?): Promise; 71 | 72 | /** 73 | * Removes this entry from the file system. If the entry is a folder, all the contents will also be removed. 74 | */ 75 | public delete(): Promise; 76 | 77 | /** 78 | * @returns this entry's metadata. 79 | */ 80 | public getMetadata(): Promise; 81 | 82 | } 83 | 84 | /** 85 | * Metadata for an entry. It includes useful information such as: 86 | * 87 | * * size of the file (if a file) 88 | * * date created 89 | * * date modified 90 | * * name 91 | * 92 | * You'll not instantiate this directly; use Entry#getMetadata to do so. 93 | * @see {@link Entry.getMetadata} 94 | */ 95 | declare export static class EntryMetadata { 96 | /** 97 | * The name of the entry. 98 | */ 99 | public readonly name: string; 100 | /** 101 | * The size of the entry, if a file. Zero if a folder. 102 | */ 103 | public readonly size: number; 104 | /** 105 | * The date this entry was created. 106 | */ 107 | public readonly dateCreated: Date; 108 | /** 109 | * The date this entry was modified. 110 | */ 111 | public readonly dateModified: Date; 112 | /** 113 | * Indicates if the entry is a file 114 | */ 115 | public readonly isFile: boolean; 116 | /** 117 | * Indicates if the entry is a folder 118 | */ 119 | public readonly isFolder: boolean; 120 | } 121 | 122 | /** 123 | * Represents a file on a file system. Provides methods for reading from and writing to the file. You'll never instantiate a File directly; instead you'll get access via a FileSystemProvider. 124 | * @see {@link FileSystemProvider} 125 | */ 126 | declare export static class File extends Entry { 127 | /** 128 | * Indicates whether this file is read-only or read-write. See readOnly and readWrite. 129 | * @see {@link modes} 130 | */ 131 | public mode: Symbol; 132 | 133 | /** 134 | * Reads data from the file and returns it. The file format can be specified with the `format` option. If a format is not supplied, the file is assumed to be a text file using UTF8 encoding. 135 | * @param {object=} options 136 | * @param {Symbol=} options.format The format of the file; see utf8 and blob. 137 | * @see {@link formats} 138 | */ 139 | public read(options?): Promise; 140 | 141 | /** 142 | * Writes data to a file, appending if desired. The format of the file is controlled via the `format` option, and defaults to UTF8. 143 | * 144 | * @throws errors.FileIsReadOnlyError if writing to a read-only file 145 | * @throws errors.OutOfSpaceError If writing to the file causes the file system to exceed the available space (or quota) 146 | * 147 | * @param data the data to write to the file 148 | * @param {object=} options 149 | * @param {Symbol=} options.format The format of the file; see utf8 and blob. 150 | * @param {boolean=false} options.append if `true`, the data is written to the end of the file 151 | * @see {@link formats} 152 | */ 153 | public write(data: string | ArrayBuffer, options?): Promise; 154 | 155 | /** 156 | * Determines if the entry is a file or not. This is safe to use even if the entry is `null` or `undefined`. 157 | * @param entry the entry to check 158 | */ 159 | public static isFile(entry: any): boolean; 160 | } 161 | 162 | /** 163 | * Provides access to files and folders on a file system. You'll typically not instantiate this directly; instead you'll use an instance of one that has already been created for you. This class is abstract, meaning that you'll need to provide your own implementation in order to use it effectively. 164 | */ 165 | declare export static class FileSystemProvider { 166 | /** 167 | * Indicates that this is a {@link FileSystemProvider}. Useful for type-checking. 168 | */ 169 | public readonly isFileSystemProvider: boolean; 170 | /** 171 | * An array of the domains this file system supports. If the file system can open a file picker to the user's `documents` folder, for example, then `userDocuments` will be in this list. 172 | */ 173 | public readonly supportedDomains: Symbol[]; 174 | 175 | /** 176 | * Gets a file (or files) from the file system provider for the purpose of opening them. Files are read-only. 177 | * 178 | * Multiple files can be returned if the `allowMultiple` option is `true`. 179 | * @param {object} options 180 | * @param {Symbol} options.initialDomain the preferred initial location of the file picker. If not defined, the most recently used domain from a file picker is used instead. 181 | * @param {string[]} options.types the allowed file types 182 | * @param {boolean=false} options.allowMultiple if `true`, multiple files can be returned (as an array) 183 | * 184 | * @returns the selected files, or empty if no file were selected. 185 | */ 186 | public getFileForOpening(options?): Promise; 187 | 188 | /** 189 | * Gets a file reference suitable for saving. The file is read-write. Any file picker displayed will be of the "save" variety. 190 | * 191 | * If the user attempts to save a file that doesn't exist, the file is created automatically. 192 | * 193 | * If the act of writing to the file would overwrite it, the file picker should prompt the user if they are OK with that action. If not, the file should not be returned. 194 | * 195 | * @param {object} options 196 | * @param {Symbol} options.initialDomain the preferred initial location of the file picker. If not defined, the most recently used domain from a file picker is used instead. 197 | * 198 | * @returns the selected file, or `null` if no file were selected. 199 | */ 200 | public getFileForSaving(options?): Promise; 201 | 202 | /** 203 | * Gets a folder from the file system via a folder picker dialog. The files and folders within can be accessed via {@link Folder.getEntries}. Any files within are read-write. 204 | * 205 | * If the user dismisses the picker, `null` is returned instead. 206 | * 207 | * @param {object} options 208 | * @param {Symbol} options.initialDomain the preferred initial location of the file picker. If not defined, the most recently used domain from a file picker is used instead. 209 | * 210 | * @returns the selected folder, or `null` if no folder is selected. 211 | */ 212 | public getFolder(options?): Promise; 213 | 214 | /** 215 | * Returns a temporary folder. The contents of the folder will be removed when the extension is disposed. 216 | */ 217 | public getTemporaryFolder(): Promise; 218 | 219 | /** 220 | * Returns a folder that can be used for extension's data storage without user interaction. It is persistent across host-app version upgrades. 221 | */ 222 | public getDataFolder(): Promise; 223 | 224 | /** 225 | * Returns an plugin's folder – this folder and everything within it are read only. This contains all the Plugin related packaged assets. 226 | */ 227 | public getPluginFolder(): Promise; 228 | 229 | /** 230 | * Returns the fs url of given entry. 231 | * @param entry the entry 232 | */ 233 | public getFsUrl(entry: Entry): string; 234 | 235 | /** 236 | * Returns the platform native file system path of given entry. 237 | * @param entry the entry 238 | */ 239 | public getNativePath(entry: Entry): string; 240 | 241 | /** 242 | * Checks if the supplied object is a {@link FileSystemProvider}. It's safe to use even if the object is `null` or `undefined`. Useful for type checking. 243 | * @param fs the object to check 244 | * @returns If `true`, the object is a file system provider 245 | */ 246 | public static isFileSystemProvider(fs: any): boolean; 247 | } 248 | 249 | declare export class LocalFileSystemProvider extends FileSystemProvider { 250 | // TODO: Waiting for documentation on `LocalFileSystemProvider` 251 | } 252 | 253 | /** 254 | * Represents a folder on a file system. You'll never instantiate this directly, but will get it by calling {@link FileSystemProvider.getTemporaryFolder}, {@link FileSystemProvider.getFolder}, or via {@link Folder.getEntries}. 255 | */ 256 | declare export static class Folder extends Entry { 257 | /** 258 | * Returns an array of entries contained within this folder. 259 | * @returns The entries within the folder. 260 | */ 261 | public getEntries(): Promise; 262 | 263 | /** 264 | * Creates an entry within this folder and returns the appropriate instance. 265 | * @param {string} name the name of the entry to create 266 | * @param {object} options 267 | * @param {Symbol=types.file} options.type Indicates which kind of entry to create. Pass {@link types.folder} to create a new folder. 268 | * @param {boolean=false} options.overwrite If `true`, the create attempt can overwrite an existing file 269 | * 270 | * @returns the created entry 271 | */ 272 | public createEntry(name: string, options?): Promise; 273 | 274 | /** 275 | * Creates a File Entry object within this folder and returns the appropriate instance. Note that this method just create a file entry object and not the actual file on the disk. The file actually gets created when you call for eg: write method on the file entry object. 276 | * @param {string} name the name of the file to create 277 | * @param {object} options 278 | * @param {boolean=false} options.overwrite If `true`, the create attempt can overwrite an existing file 279 | * 280 | * @returns the created entry 281 | */ 282 | public createFile(name: string, options?): Promise; 283 | 284 | /** 285 | * Creates a Folder within this folder and returns the appropriate instance. 286 | * @param {string} name the name of the folder to create 287 | * @returns the created entry 288 | */ 289 | public createFolder(name: string): Promise; 290 | 291 | /** 292 | * Gets an entry from within this folder and returns the appropriate instance. 293 | * @param {string} filePath the name/path of the entry to fetch 294 | * 295 | * @returns the fetched entry. 296 | */ 297 | public getEntry(filePath: string): Promise; 298 | 299 | /** 300 | * Renames an entry to a new name. 301 | * @param {Entry} entry the entry to rename 302 | * @param {string} newName the new name to assign 303 | * @param {object} options 304 | * @param {boolean=false} options.overwrite if `true`, renaming can overwrite an existing entry 305 | */ 306 | public renameEntry(entry: Entry, newName: string, options?): Promise; 307 | 308 | /** 309 | * Checks if an entry is a folder. Safe to use if entry might be `null` or `undefined`. Useful for type checking. 310 | * @param entry the entry to check 311 | * 312 | * @returns if `true`, the entry is a folder 313 | */ 314 | public static isFolder(entry: any): boolean; 315 | } 316 | 317 | declare export const localFileSystem: LocalFileSystemProvider; 318 | 319 | namespace errors { 320 | /** 321 | * Attempted to invoke an abstract method. 322 | */ 323 | declare class AbstractMethodInvocationError extends Error { 324 | } 325 | 326 | /** 327 | * Attempted to execute a command that required the providers of all entries to match. 328 | */ 329 | declare class ProviderMismatchError extends Error { 330 | } 331 | 332 | /** 333 | * The object passed as an entry is not actually an {@link Entry}. 334 | */ 335 | declare class EntryIsNotAnEntryError extends Error { 336 | } 337 | 338 | /** 339 | * The entry is not a folder, but was expected to be a folder. 340 | */ 341 | declare class EntryIsNotAFolderError extends Error { 342 | } 343 | 344 | /** 345 | * The entry is not a file, but was expected to be. 346 | */ 347 | declare class EntryIsNotAFileError extends Error { 348 | } 349 | 350 | /** 351 | * The instance was expected to be a file system, but wasn't. 352 | */ 353 | declare class NotAFileSystemError extends Error { 354 | } 355 | 356 | /** 357 | * The file system is out of space (or quota has been exceeded) 358 | */ 359 | declare class OutOfSpaceError extends Error { 360 | } 361 | 362 | /** 363 | * The file system revoked permission to complete the requested action. 364 | */ 365 | declare class PermissionDeniedError extends Error { 366 | } 367 | 368 | /** 369 | * An attempt was made to overwrite an entry without indicating that it was safe to do so via `overwrite: true`. 370 | */ 371 | declare class EntryExistsError extends Error { 372 | } 373 | 374 | /** 375 | * An attempt was made to write to a file that was opened as read-only. 376 | */ 377 | declare class FileIsReadOnlyError extends Error { 378 | } 379 | 380 | /** 381 | * Domain is not supported by the current {@link FileSystemProvider} instance. 382 | */ 383 | declare class DomainNotSupportedError extends Error { 384 | } 385 | 386 | /** 387 | * The file name contains invalid characters 388 | */ 389 | declare class InvalidFileNameError extends Error { 390 | } 391 | } 392 | 393 | /** 394 | * Common locations that we can use when displaying a file picker. 395 | */ 396 | namespace domains { 397 | /** 398 | * The user's desktop folder 399 | */ 400 | declare const userDesktop: Symbol; 401 | /** 402 | * The user's documents folder 403 | */ 404 | declare const userDocuments: Symbol; 405 | /** 406 | * The user's pictures folder or library 407 | */ 408 | declare const userPictures: Symbol; 409 | /** 410 | * The user's videos / movies folder or library 411 | */ 412 | declare const userVideos: Symbol; 413 | /** 414 | * The user's music folder or library 415 | */ 416 | declare const userMusic: Symbol; 417 | /** 418 | * Local application data 419 | */ 420 | declare const appLocalData: Symbol; 421 | /** 422 | * Local application library 423 | */ 424 | declare const appLocalLibrary: Symbol; 425 | /** 426 | * Local application cache directory (persistence not guaranteed) 427 | */ 428 | declare const appLocalCache: Symbol; 429 | /** 430 | * Local application shared data folder 431 | */ 432 | declare const appLocalShared: Symbol; 433 | /** 434 | * Local temporary directory 435 | */ 436 | declare const appLocalTemporary: Symbol; 437 | /** 438 | * Roaming application data 439 | */ 440 | declare const appRoamingData: Symbol; 441 | /** 442 | * Roaming application library data 443 | */ 444 | declare const appRoamingLibrary: Symbol; 445 | } 446 | 447 | /** 448 | * This namespace describes the various file type extensions that can used be used in some FS file open methods. 449 | */ 450 | namespace fileTypes { 451 | /** 452 | * Text file extensions 453 | */ 454 | declare const text: Symbol; 455 | /** 456 | * Image file extensions 457 | */ 458 | declare const images: Symbol; 459 | /** 460 | * 461 | All file types 462 | */ 463 | declare const all: Symbol; 464 | } 465 | 466 | /** 467 | * This namespace describes the file content formats supported in FS methods like read and write. 468 | */ 469 | namespace formats { 470 | /** 471 | * UTF8 File encoding 472 | */ 473 | declare const utf8: Symbol; 474 | /** 475 | * Binary file encoding 476 | */ 477 | declare const binary: Symbol; 478 | } 479 | 480 | /** 481 | * This namespace describes the file open modes. for eg: open file in read-only or both read-write 482 | */ 483 | namespace modes { 484 | /** 485 | * The file is read-only; attempts to write will fail. 486 | */ 487 | declare const readOnly: Symbol; 488 | /** 489 | * The file is read-write. 490 | */ 491 | declare const readWrite: Symbol; 492 | } 493 | 494 | /** 495 | * This namespace describes the type of the entry. Whether file or folder etc. 496 | */ 497 | namespace types { 498 | /** 499 | * A file; used when creating an entity 500 | */ 501 | declare const file: Symbol; 502 | /** 503 | * A folder; used when creating an entity 504 | */ 505 | declare const folder: Symbol; 506 | } 507 | } 508 | 509 | export = {shell, storage}; 510 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/node@^10.12.0": 6 | version "10.12.0" 7 | resolved "http://registry.npm.taobao.org/@types/node/download/@types/node-10.12.0.tgz#ea6dcbddbc5b584c83f06c60e82736d8fbb0c235" 8 | 9 | abbrev@1: 10 | version "1.1.1" 11 | resolved "http://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" 12 | 13 | ansi-regex@^2.0.0: 14 | version "2.1.1" 15 | resolved "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 16 | 17 | ansi-regex@^3.0.0: 18 | version "3.0.0" 19 | resolved "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 20 | 21 | ansi-styles@^2.2.1: 22 | version "2.2.1" 23 | resolved "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 24 | 25 | anymatch@^1.3.0: 26 | version "1.3.2" 27 | resolved "http://registry.npm.taobao.org/anymatch/download/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" 28 | dependencies: 29 | micromatch "^2.1.5" 30 | normalize-path "^2.0.0" 31 | 32 | aproba@^1.0.3: 33 | version "1.2.0" 34 | resolved "http://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" 35 | 36 | are-we-there-yet@~1.1.2: 37 | version "1.1.5" 38 | resolved "http://registry.npm.taobao.org/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" 39 | dependencies: 40 | delegates "^1.0.0" 41 | readable-stream "^2.0.6" 42 | 43 | arr-diff@^2.0.0: 44 | version "2.0.0" 45 | resolved "http://registry.npm.taobao.org/arr-diff/download/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" 46 | dependencies: 47 | arr-flatten "^1.0.1" 48 | 49 | arr-diff@^4.0.0: 50 | version "4.0.0" 51 | resolved "http://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" 52 | 53 | arr-flatten@^1.0.1, arr-flatten@^1.1.0: 54 | version "1.1.0" 55 | resolved "http://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" 56 | 57 | arr-union@^3.1.0: 58 | version "3.1.0" 59 | resolved "http://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" 60 | 61 | array-unique@^0.2.1: 62 | version "0.2.1" 63 | resolved "http://registry.npm.taobao.org/array-unique/download/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" 64 | 65 | array-unique@^0.3.2: 66 | version "0.3.2" 67 | resolved "http://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" 68 | 69 | assign-symbols@^1.0.0: 70 | version "1.0.0" 71 | resolved "http://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" 72 | 73 | async-each@^1.0.0: 74 | version "1.0.1" 75 | resolved "http://registry.npm.taobao.org/async-each/download/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" 76 | 77 | atob@^2.1.1: 78 | version "2.1.2" 79 | resolved "http://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" 80 | 81 | balanced-match@^1.0.0: 82 | version "1.0.0" 83 | resolved "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 84 | 85 | base@^0.11.1: 86 | version "0.11.2" 87 | resolved "http://registry.npm.taobao.org/base/download/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" 88 | dependencies: 89 | cache-base "^1.0.1" 90 | class-utils "^0.3.5" 91 | component-emitter "^1.2.1" 92 | define-property "^1.0.0" 93 | isobject "^3.0.1" 94 | mixin-deep "^1.2.0" 95 | pascalcase "^0.1.1" 96 | 97 | binary-extensions@^1.0.0: 98 | version "1.12.0" 99 | resolved "http://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14" 100 | 101 | bluebird@^3.4.7: 102 | version "3.5.2" 103 | resolved "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.2.tgz#1be0908e054a751754549c270489c1505d4ab15a" 104 | 105 | brace-expansion@^1.1.7: 106 | version "1.1.11" 107 | resolved "http://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 108 | dependencies: 109 | balanced-match "^1.0.0" 110 | concat-map "0.0.1" 111 | 112 | braces@^1.8.2: 113 | version "1.8.5" 114 | resolved "http://registry.npm.taobao.org/braces/download/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" 115 | dependencies: 116 | expand-range "^1.8.1" 117 | preserve "^0.2.0" 118 | repeat-element "^1.1.2" 119 | 120 | braces@^2.3.1: 121 | version "2.3.2" 122 | resolved "http://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" 123 | dependencies: 124 | arr-flatten "^1.1.0" 125 | array-unique "^0.3.2" 126 | extend-shallow "^2.0.1" 127 | fill-range "^4.0.0" 128 | isobject "^3.0.1" 129 | repeat-element "^1.1.2" 130 | snapdragon "^0.8.1" 131 | snapdragon-node "^2.0.1" 132 | split-string "^3.0.2" 133 | to-regex "^3.0.1" 134 | 135 | builtin-modules@^1.0.0: 136 | version "1.1.1" 137 | resolved "http://registry.npm.taobao.org/builtin-modules/download/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 138 | 139 | cache-base@^1.0.1: 140 | version "1.0.1" 141 | resolved "http://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" 142 | dependencies: 143 | collection-visit "^1.0.0" 144 | component-emitter "^1.2.1" 145 | get-value "^2.0.6" 146 | has-value "^1.0.0" 147 | isobject "^3.0.1" 148 | set-value "^2.0.0" 149 | to-object-path "^0.3.0" 150 | union-value "^1.0.0" 151 | unset-value "^1.0.0" 152 | 153 | camelcase@^3.0.0: 154 | version "3.0.0" 155 | resolved "http://registry.npm.taobao.org/camelcase/download/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" 156 | 157 | chalk@^1.1.3: 158 | version "1.1.3" 159 | resolved "http://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 160 | dependencies: 161 | ansi-styles "^2.2.1" 162 | escape-string-regexp "^1.0.2" 163 | has-ansi "^2.0.0" 164 | strip-ansi "^3.0.0" 165 | supports-color "^2.0.0" 166 | 167 | chokidar@^1.6.1: 168 | version "1.7.0" 169 | resolved "http://registry.npm.taobao.org/chokidar/download/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" 170 | dependencies: 171 | anymatch "^1.3.0" 172 | async-each "^1.0.0" 173 | glob-parent "^2.0.0" 174 | inherits "^2.0.1" 175 | is-binary-path "^1.0.0" 176 | is-glob "^2.0.0" 177 | path-is-absolute "^1.0.0" 178 | readdirp "^2.0.0" 179 | optionalDependencies: 180 | fsevents "^1.0.0" 181 | 182 | chownr@^1.0.1: 183 | version "1.1.1" 184 | resolved "http://registry.npm.taobao.org/chownr/download/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" 185 | 186 | class-utils@^0.3.5: 187 | version "0.3.6" 188 | resolved "http://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" 189 | dependencies: 190 | arr-union "^3.1.0" 191 | define-property "^0.2.5" 192 | isobject "^3.0.0" 193 | static-extend "^0.1.1" 194 | 195 | cliui@^3.2.0: 196 | version "3.2.0" 197 | resolved "http://registry.npm.taobao.org/cliui/download/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" 198 | dependencies: 199 | string-width "^1.0.1" 200 | strip-ansi "^3.0.1" 201 | wrap-ansi "^2.0.0" 202 | 203 | code-point-at@^1.0.0: 204 | version "1.1.0" 205 | resolved "http://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 206 | 207 | collection-visit@^1.0.0: 208 | version "1.0.0" 209 | resolved "http://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" 210 | dependencies: 211 | map-visit "^1.0.0" 212 | object-visit "^1.0.0" 213 | 214 | component-emitter@^1.2.1: 215 | version "1.2.1" 216 | resolved "http://registry.npm.taobao.org/component-emitter/download/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" 217 | 218 | concat-map@0.0.1: 219 | version "0.0.1" 220 | resolved "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 221 | 222 | console-control-strings@^1.0.0, console-control-strings@~1.1.0: 223 | version "1.1.0" 224 | resolved "http://registry.npm.taobao.org/console-control-strings/download/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" 225 | 226 | copy-descriptor@^0.1.0: 227 | version "0.1.1" 228 | resolved "http://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" 229 | 230 | core-util-is@~1.0.0: 231 | version "1.0.2" 232 | resolved "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 233 | 234 | debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: 235 | version "2.6.9" 236 | resolved "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 237 | dependencies: 238 | ms "2.0.0" 239 | 240 | decamelize@^1.1.1: 241 | version "1.2.0" 242 | resolved "http://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 243 | 244 | decode-uri-component@^0.2.0: 245 | version "0.2.0" 246 | resolved "http://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" 247 | 248 | deep-extend@^0.6.0: 249 | version "0.6.0" 250 | resolved "http://registry.npm.taobao.org/deep-extend/download/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" 251 | 252 | define-property@^0.2.5: 253 | version "0.2.5" 254 | resolved "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" 255 | dependencies: 256 | is-descriptor "^0.1.0" 257 | 258 | define-property@^1.0.0: 259 | version "1.0.0" 260 | resolved "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" 261 | dependencies: 262 | is-descriptor "^1.0.0" 263 | 264 | define-property@^2.0.2: 265 | version "2.0.2" 266 | resolved "http://registry.npm.taobao.org/define-property/download/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" 267 | dependencies: 268 | is-descriptor "^1.0.2" 269 | isobject "^3.0.1" 270 | 271 | delegates@^1.0.0: 272 | version "1.0.0" 273 | resolved "http://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" 274 | 275 | detect-libc@^1.0.2: 276 | version "1.0.3" 277 | resolved "http://registry.npm.taobao.org/detect-libc/download/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" 278 | 279 | error-ex@^1.2.0: 280 | version "1.3.2" 281 | resolved "http://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" 282 | dependencies: 283 | is-arrayish "^0.2.1" 284 | 285 | escape-string-regexp@^1.0.2: 286 | version "1.0.5" 287 | resolved "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 288 | 289 | expand-brackets@^0.1.4: 290 | version "0.1.5" 291 | resolved "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" 292 | dependencies: 293 | is-posix-bracket "^0.1.0" 294 | 295 | expand-brackets@^2.1.4: 296 | version "2.1.4" 297 | resolved "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" 298 | dependencies: 299 | debug "^2.3.3" 300 | define-property "^0.2.5" 301 | extend-shallow "^2.0.1" 302 | posix-character-classes "^0.1.0" 303 | regex-not "^1.0.0" 304 | snapdragon "^0.8.1" 305 | to-regex "^3.0.1" 306 | 307 | expand-range@^1.8.1: 308 | version "1.8.2" 309 | resolved "http://registry.npm.taobao.org/expand-range/download/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" 310 | dependencies: 311 | fill-range "^2.1.0" 312 | 313 | extend-shallow@^2.0.1: 314 | version "2.0.1" 315 | resolved "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" 316 | dependencies: 317 | is-extendable "^0.1.0" 318 | 319 | extend-shallow@^3.0.0, extend-shallow@^3.0.2: 320 | version "3.0.2" 321 | resolved "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" 322 | dependencies: 323 | assign-symbols "^1.0.0" 324 | is-extendable "^1.0.1" 325 | 326 | extglob@^0.3.1: 327 | version "0.3.2" 328 | resolved "http://registry.npm.taobao.org/extglob/download/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" 329 | dependencies: 330 | is-extglob "^1.0.0" 331 | 332 | extglob@^2.0.4: 333 | version "2.0.4" 334 | resolved "http://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" 335 | dependencies: 336 | array-unique "^0.3.2" 337 | define-property "^1.0.0" 338 | expand-brackets "^2.1.4" 339 | extend-shallow "^2.0.1" 340 | fragment-cache "^0.2.1" 341 | regex-not "^1.0.0" 342 | snapdragon "^0.8.1" 343 | to-regex "^3.0.1" 344 | 345 | filename-regex@^2.0.0: 346 | version "2.0.1" 347 | resolved "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" 348 | 349 | fill-range@^2.1.0: 350 | version "2.2.4" 351 | resolved "http://registry.npm.taobao.org/fill-range/download/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" 352 | dependencies: 353 | is-number "^2.1.0" 354 | isobject "^2.0.0" 355 | randomatic "^3.0.0" 356 | repeat-element "^1.1.2" 357 | repeat-string "^1.5.2" 358 | 359 | fill-range@^4.0.0: 360 | version "4.0.0" 361 | resolved "http://registry.npm.taobao.org/fill-range/download/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" 362 | dependencies: 363 | extend-shallow "^2.0.1" 364 | is-number "^3.0.0" 365 | repeat-string "^1.6.1" 366 | to-regex-range "^2.1.0" 367 | 368 | find-up@^1.0.0: 369 | version "1.1.2" 370 | resolved "http://registry.npm.taobao.org/find-up/download/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" 371 | dependencies: 372 | path-exists "^2.0.0" 373 | pinkie-promise "^2.0.0" 374 | 375 | for-in@^1.0.1, for-in@^1.0.2: 376 | version "1.0.2" 377 | resolved "http://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" 378 | 379 | for-own@^0.1.4: 380 | version "0.1.5" 381 | resolved "http://registry.npm.taobao.org/for-own/download/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" 382 | dependencies: 383 | for-in "^1.0.1" 384 | 385 | fragment-cache@^0.2.1: 386 | version "0.2.1" 387 | resolved "http://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" 388 | dependencies: 389 | map-cache "^0.2.2" 390 | 391 | fs-extra@^1.0.0: 392 | version "1.0.0" 393 | resolved "http://registry.npm.taobao.org/fs-extra/download/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" 394 | dependencies: 395 | graceful-fs "^4.1.2" 396 | jsonfile "^2.1.0" 397 | klaw "^1.0.0" 398 | 399 | fs-minipass@^1.2.5: 400 | version "1.2.5" 401 | resolved "http://registry.npm.taobao.org/fs-minipass/download/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" 402 | dependencies: 403 | minipass "^2.2.1" 404 | 405 | fs.realpath@^1.0.0: 406 | version "1.0.0" 407 | resolved "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 408 | 409 | fsevents@^1.0.0: 410 | version "1.2.4" 411 | resolved "http://registry.npm.taobao.org/fsevents/download/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" 412 | dependencies: 413 | nan "^2.9.2" 414 | node-pre-gyp "^0.10.0" 415 | 416 | gauge@~2.7.3: 417 | version "2.7.4" 418 | resolved "http://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" 419 | dependencies: 420 | aproba "^1.0.3" 421 | console-control-strings "^1.0.0" 422 | has-unicode "^2.0.0" 423 | object-assign "^4.1.0" 424 | signal-exit "^3.0.0" 425 | string-width "^1.0.1" 426 | strip-ansi "^3.0.1" 427 | wide-align "^1.1.0" 428 | 429 | get-caller-file@^1.0.1: 430 | version "1.0.3" 431 | resolved "http://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" 432 | 433 | get-value@^2.0.3, get-value@^2.0.6: 434 | version "2.0.6" 435 | resolved "http://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" 436 | 437 | glob-all@^3.1.0: 438 | version "3.1.0" 439 | resolved "http://registry.npm.taobao.org/glob-all/download/glob-all-3.1.0.tgz#8913ddfb5ee1ac7812656241b03d5217c64b02ab" 440 | dependencies: 441 | glob "^7.0.5" 442 | yargs "~1.2.6" 443 | 444 | glob-base@^0.3.0: 445 | version "0.3.0" 446 | resolved "http://registry.npm.taobao.org/glob-base/download/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" 447 | dependencies: 448 | glob-parent "^2.0.0" 449 | is-glob "^2.0.0" 450 | 451 | glob-parent@^2.0.0: 452 | version "2.0.0" 453 | resolved "http://registry.npm.taobao.org/glob-parent/download/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" 454 | dependencies: 455 | is-glob "^2.0.0" 456 | 457 | glob@^7.0.5: 458 | version "7.1.3" 459 | resolved "http://registry.npm.taobao.org/glob/download/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" 460 | dependencies: 461 | fs.realpath "^1.0.0" 462 | inflight "^1.0.4" 463 | inherits "2" 464 | minimatch "^3.0.4" 465 | once "^1.3.0" 466 | path-is-absolute "^1.0.0" 467 | 468 | graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: 469 | version "4.1.11" 470 | resolved "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 471 | 472 | has-ansi@^2.0.0: 473 | version "2.0.0" 474 | resolved "http://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 475 | dependencies: 476 | ansi-regex "^2.0.0" 477 | 478 | has-unicode@^2.0.0: 479 | version "2.0.1" 480 | resolved "http://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" 481 | 482 | has-value@^0.3.1: 483 | version "0.3.1" 484 | resolved "http://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" 485 | dependencies: 486 | get-value "^2.0.3" 487 | has-values "^0.1.4" 488 | isobject "^2.0.0" 489 | 490 | has-value@^1.0.0: 491 | version "1.0.0" 492 | resolved "http://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" 493 | dependencies: 494 | get-value "^2.0.6" 495 | has-values "^1.0.0" 496 | isobject "^3.0.0" 497 | 498 | has-values@^0.1.4: 499 | version "0.1.4" 500 | resolved "http://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" 501 | 502 | has-values@^1.0.0: 503 | version "1.0.0" 504 | resolved "http://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" 505 | dependencies: 506 | is-number "^3.0.0" 507 | kind-of "^4.0.0" 508 | 509 | hosted-git-info@^2.1.4: 510 | version "2.7.1" 511 | resolved "http://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" 512 | 513 | iconv-lite@^0.4.4: 514 | version "0.4.24" 515 | resolved "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" 516 | dependencies: 517 | safer-buffer ">= 2.1.2 < 3" 518 | 519 | ignore-walk@^3.0.1: 520 | version "3.0.1" 521 | resolved "http://registry.npm.taobao.org/ignore-walk/download/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" 522 | dependencies: 523 | minimatch "^3.0.4" 524 | 525 | inflight@^1.0.4: 526 | version "1.0.6" 527 | resolved "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 528 | dependencies: 529 | once "^1.3.0" 530 | wrappy "1" 531 | 532 | inherits@2, inherits@^2.0.1, inherits@~2.0.3: 533 | version "2.0.3" 534 | resolved "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 535 | 536 | ini@~1.3.0: 537 | version "1.3.5" 538 | resolved "http://registry.npm.taobao.org/ini/download/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" 539 | 540 | invert-kv@^1.0.0: 541 | version "1.0.0" 542 | resolved "http://registry.npm.taobao.org/invert-kv/download/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" 543 | 544 | is-accessor-descriptor@^0.1.6: 545 | version "0.1.6" 546 | resolved "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" 547 | dependencies: 548 | kind-of "^3.0.2" 549 | 550 | is-accessor-descriptor@^1.0.0: 551 | version "1.0.0" 552 | resolved "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" 553 | dependencies: 554 | kind-of "^6.0.0" 555 | 556 | is-arrayish@^0.2.1: 557 | version "0.2.1" 558 | resolved "http://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 559 | 560 | is-binary-path@^1.0.0: 561 | version "1.0.1" 562 | resolved "http://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" 563 | dependencies: 564 | binary-extensions "^1.0.0" 565 | 566 | is-buffer@^1.1.5: 567 | version "1.1.6" 568 | resolved "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" 569 | 570 | is-builtin-module@^1.0.0: 571 | version "1.0.0" 572 | resolved "http://registry.npm.taobao.org/is-builtin-module/download/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" 573 | dependencies: 574 | builtin-modules "^1.0.0" 575 | 576 | is-data-descriptor@^0.1.4: 577 | version "0.1.4" 578 | resolved "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" 579 | dependencies: 580 | kind-of "^3.0.2" 581 | 582 | is-data-descriptor@^1.0.0: 583 | version "1.0.0" 584 | resolved "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" 585 | dependencies: 586 | kind-of "^6.0.0" 587 | 588 | is-descriptor@^0.1.0: 589 | version "0.1.6" 590 | resolved "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" 591 | dependencies: 592 | is-accessor-descriptor "^0.1.6" 593 | is-data-descriptor "^0.1.4" 594 | kind-of "^5.0.0" 595 | 596 | is-descriptor@^1.0.0, is-descriptor@^1.0.2: 597 | version "1.0.2" 598 | resolved "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" 599 | dependencies: 600 | is-accessor-descriptor "^1.0.0" 601 | is-data-descriptor "^1.0.0" 602 | kind-of "^6.0.2" 603 | 604 | is-dotfile@^1.0.0: 605 | version "1.0.3" 606 | resolved "http://registry.npm.taobao.org/is-dotfile/download/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" 607 | 608 | is-equal-shallow@^0.1.3: 609 | version "0.1.3" 610 | resolved "http://registry.npm.taobao.org/is-equal-shallow/download/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" 611 | dependencies: 612 | is-primitive "^2.0.0" 613 | 614 | is-extendable@^0.1.0, is-extendable@^0.1.1: 615 | version "0.1.1" 616 | resolved "http://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" 617 | 618 | is-extendable@^1.0.1: 619 | version "1.0.1" 620 | resolved "http://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" 621 | dependencies: 622 | is-plain-object "^2.0.4" 623 | 624 | is-extglob@^1.0.0: 625 | version "1.0.0" 626 | resolved "http://registry.npm.taobao.org/is-extglob/download/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" 627 | 628 | is-fullwidth-code-point@^1.0.0: 629 | version "1.0.0" 630 | resolved "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 631 | dependencies: 632 | number-is-nan "^1.0.0" 633 | 634 | is-fullwidth-code-point@^2.0.0: 635 | version "2.0.0" 636 | resolved "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 637 | 638 | is-glob@^2.0.0, is-glob@^2.0.1: 639 | version "2.0.1" 640 | resolved "http://registry.npm.taobao.org/is-glob/download/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" 641 | dependencies: 642 | is-extglob "^1.0.0" 643 | 644 | is-number@^2.1.0: 645 | version "2.1.0" 646 | resolved "http://registry.npm.taobao.org/is-number/download/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" 647 | dependencies: 648 | kind-of "^3.0.2" 649 | 650 | is-number@^3.0.0: 651 | version "3.0.0" 652 | resolved "http://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" 653 | dependencies: 654 | kind-of "^3.0.2" 655 | 656 | is-number@^4.0.0: 657 | version "4.0.0" 658 | resolved "http://registry.npm.taobao.org/is-number/download/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" 659 | 660 | is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: 661 | version "2.0.4" 662 | resolved "http://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" 663 | dependencies: 664 | isobject "^3.0.1" 665 | 666 | is-posix-bracket@^0.1.0: 667 | version "0.1.1" 668 | resolved "http://registry.npm.taobao.org/is-posix-bracket/download/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" 669 | 670 | is-primitive@^2.0.0: 671 | version "2.0.0" 672 | resolved "http://registry.npm.taobao.org/is-primitive/download/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" 673 | 674 | is-utf8@^0.2.0: 675 | version "0.2.1" 676 | resolved "http://registry.npm.taobao.org/is-utf8/download/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" 677 | 678 | is-windows@^1.0.2: 679 | version "1.0.2" 680 | resolved "http://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" 681 | 682 | isarray@1.0.0, isarray@~1.0.0: 683 | version "1.0.0" 684 | resolved "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 685 | 686 | isobject@^2.0.0: 687 | version "2.1.0" 688 | resolved "http://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" 689 | dependencies: 690 | isarray "1.0.0" 691 | 692 | isobject@^3.0.0, isobject@^3.0.1: 693 | version "3.0.1" 694 | resolved "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" 695 | 696 | jsonfile@^2.1.0: 697 | version "2.4.0" 698 | resolved "http://registry.npm.taobao.org/jsonfile/download/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" 699 | optionalDependencies: 700 | graceful-fs "^4.1.6" 701 | 702 | kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: 703 | version "3.2.2" 704 | resolved "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" 705 | dependencies: 706 | is-buffer "^1.1.5" 707 | 708 | kind-of@^4.0.0: 709 | version "4.0.0" 710 | resolved "http://registry.npm.taobao.org/kind-of/download/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" 711 | dependencies: 712 | is-buffer "^1.1.5" 713 | 714 | kind-of@^5.0.0: 715 | version "5.1.0" 716 | resolved "http://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" 717 | 718 | kind-of@^6.0.0, kind-of@^6.0.2: 719 | version "6.0.2" 720 | resolved "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" 721 | 722 | klaw@^1.0.0: 723 | version "1.3.1" 724 | resolved "http://registry.npm.taobao.org/klaw/download/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" 725 | optionalDependencies: 726 | graceful-fs "^4.1.9" 727 | 728 | lcid@^1.0.0: 729 | version "1.0.0" 730 | resolved "http://registry.npm.taobao.org/lcid/download/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" 731 | dependencies: 732 | invert-kv "^1.0.0" 733 | 734 | load-json-file@^1.0.0: 735 | version "1.1.0" 736 | resolved "http://registry.npm.taobao.org/load-json-file/download/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" 737 | dependencies: 738 | graceful-fs "^4.1.2" 739 | parse-json "^2.2.0" 740 | pify "^2.0.0" 741 | pinkie-promise "^2.0.0" 742 | strip-bom "^2.0.0" 743 | 744 | map-cache@^0.2.2: 745 | version "0.2.2" 746 | resolved "http://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" 747 | 748 | map-visit@^1.0.0: 749 | version "1.0.0" 750 | resolved "http://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" 751 | dependencies: 752 | object-visit "^1.0.0" 753 | 754 | math-random@^1.0.1: 755 | version "1.0.1" 756 | resolved "http://registry.npm.taobao.org/math-random/download/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" 757 | 758 | micromatch@^2.1.5: 759 | version "2.3.11" 760 | resolved "http://registry.npm.taobao.org/micromatch/download/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" 761 | dependencies: 762 | arr-diff "^2.0.0" 763 | array-unique "^0.2.1" 764 | braces "^1.8.2" 765 | expand-brackets "^0.1.4" 766 | extglob "^0.3.1" 767 | filename-regex "^2.0.0" 768 | is-extglob "^1.0.0" 769 | is-glob "^2.0.1" 770 | kind-of "^3.0.2" 771 | normalize-path "^2.0.1" 772 | object.omit "^2.0.0" 773 | parse-glob "^3.0.4" 774 | regex-cache "^0.4.2" 775 | 776 | micromatch@^3.1.10: 777 | version "3.1.10" 778 | resolved "http://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" 779 | dependencies: 780 | arr-diff "^4.0.0" 781 | array-unique "^0.3.2" 782 | braces "^2.3.1" 783 | define-property "^2.0.2" 784 | extend-shallow "^3.0.2" 785 | extglob "^2.0.4" 786 | fragment-cache "^0.2.1" 787 | kind-of "^6.0.2" 788 | nanomatch "^1.2.9" 789 | object.pick "^1.3.0" 790 | regex-not "^1.0.0" 791 | snapdragon "^0.8.1" 792 | to-regex "^3.0.2" 793 | 794 | minimatch@^3.0.4: 795 | version "3.0.4" 796 | resolved "http://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 797 | dependencies: 798 | brace-expansion "^1.1.7" 799 | 800 | minimist@0.0.8: 801 | version "0.0.8" 802 | resolved "http://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 803 | 804 | minimist@^0.1.0: 805 | version "0.1.0" 806 | resolved "http://registry.npm.taobao.org/minimist/download/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" 807 | 808 | minimist@^1.2.0: 809 | version "1.2.0" 810 | resolved "http://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 811 | 812 | minipass@^2.2.1, minipass@^2.3.3: 813 | version "2.3.4" 814 | resolved "http://registry.npm.taobao.org/minipass/download/minipass-2.3.4.tgz#4768d7605ed6194d6d576169b9e12ef71e9d9957" 815 | dependencies: 816 | safe-buffer "^5.1.2" 817 | yallist "^3.0.0" 818 | 819 | minizlib@^1.1.0: 820 | version "1.1.1" 821 | resolved "http://registry.npm.taobao.org/minizlib/download/minizlib-1.1.1.tgz#6734acc045a46e61d596a43bb9d9cd326e19cc42" 822 | dependencies: 823 | minipass "^2.2.1" 824 | 825 | mixin-deep@^1.2.0: 826 | version "1.3.1" 827 | resolved "http://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" 828 | dependencies: 829 | for-in "^1.0.2" 830 | is-extendable "^1.0.1" 831 | 832 | mkdirp@^0.5.0, mkdirp@^0.5.1: 833 | version "0.5.1" 834 | resolved "http://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 835 | dependencies: 836 | minimist "0.0.8" 837 | 838 | ms@2.0.0: 839 | version "2.0.0" 840 | resolved "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 841 | 842 | nan@^2.9.2: 843 | version "2.11.1" 844 | resolved "http://registry.npm.taobao.org/nan/download/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" 845 | 846 | nanomatch@^1.2.9: 847 | version "1.2.13" 848 | resolved "http://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" 849 | dependencies: 850 | arr-diff "^4.0.0" 851 | array-unique "^0.3.2" 852 | define-property "^2.0.2" 853 | extend-shallow "^3.0.2" 854 | fragment-cache "^0.2.1" 855 | is-windows "^1.0.2" 856 | kind-of "^6.0.2" 857 | object.pick "^1.3.0" 858 | regex-not "^1.0.0" 859 | snapdragon "^0.8.1" 860 | to-regex "^3.0.1" 861 | 862 | needle@^2.2.1: 863 | version "2.2.4" 864 | resolved "http://registry.npm.taobao.org/needle/download/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" 865 | dependencies: 866 | debug "^2.1.2" 867 | iconv-lite "^0.4.4" 868 | sax "^1.2.4" 869 | 870 | node-pre-gyp@^0.10.0: 871 | version "0.10.3" 872 | resolved "http://registry.npm.taobao.org/node-pre-gyp/download/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" 873 | dependencies: 874 | detect-libc "^1.0.2" 875 | mkdirp "^0.5.1" 876 | needle "^2.2.1" 877 | nopt "^4.0.1" 878 | npm-packlist "^1.1.6" 879 | npmlog "^4.0.2" 880 | rc "^1.2.7" 881 | rimraf "^2.6.1" 882 | semver "^5.3.0" 883 | tar "^4" 884 | 885 | nopt@^4.0.1: 886 | version "4.0.1" 887 | resolved "http://registry.npm.taobao.org/nopt/download/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" 888 | dependencies: 889 | abbrev "1" 890 | osenv "^0.1.4" 891 | 892 | normalize-package-data@^2.3.2: 893 | version "2.4.0" 894 | resolved "http://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" 895 | dependencies: 896 | hosted-git-info "^2.1.4" 897 | is-builtin-module "^1.0.0" 898 | semver "2 || 3 || 4 || 5" 899 | validate-npm-package-license "^3.0.1" 900 | 901 | normalize-path@^2.0.0, normalize-path@^2.0.1: 902 | version "2.1.1" 903 | resolved "http://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" 904 | dependencies: 905 | remove-trailing-separator "^1.0.1" 906 | 907 | npm-bundled@^1.0.1: 908 | version "1.0.5" 909 | resolved "http://registry.npm.taobao.org/npm-bundled/download/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" 910 | 911 | npm-packlist@^1.1.6: 912 | version "1.1.12" 913 | resolved "http://registry.npm.taobao.org/npm-packlist/download/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" 914 | dependencies: 915 | ignore-walk "^3.0.1" 916 | npm-bundled "^1.0.1" 917 | 918 | npmlog@^4.0.2: 919 | version "4.1.2" 920 | resolved "http://registry.npm.taobao.org/npmlog/download/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" 921 | dependencies: 922 | are-we-there-yet "~1.1.2" 923 | console-control-strings "~1.1.0" 924 | gauge "~2.7.3" 925 | set-blocking "~2.0.0" 926 | 927 | number-is-nan@^1.0.0: 928 | version "1.0.1" 929 | resolved "http://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 930 | 931 | object-assign@^4.1.0: 932 | version "4.1.1" 933 | resolved "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 934 | 935 | object-copy@^0.1.0: 936 | version "0.1.0" 937 | resolved "http://registry.npm.taobao.org/object-copy/download/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" 938 | dependencies: 939 | copy-descriptor "^0.1.0" 940 | define-property "^0.2.5" 941 | kind-of "^3.0.3" 942 | 943 | object-visit@^1.0.0: 944 | version "1.0.1" 945 | resolved "http://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" 946 | dependencies: 947 | isobject "^3.0.0" 948 | 949 | object.omit@^2.0.0: 950 | version "2.0.1" 951 | resolved "http://registry.npm.taobao.org/object.omit/download/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" 952 | dependencies: 953 | for-own "^0.1.4" 954 | is-extendable "^0.1.1" 955 | 956 | object.pick@^1.3.0: 957 | version "1.3.0" 958 | resolved "http://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" 959 | dependencies: 960 | isobject "^3.0.1" 961 | 962 | once@^1.3.0: 963 | version "1.4.0" 964 | resolved "http://registry.npm.taobao.org/once/download/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 965 | dependencies: 966 | wrappy "1" 967 | 968 | os-homedir@^1.0.0: 969 | version "1.0.2" 970 | resolved "http://registry.npm.taobao.org/os-homedir/download/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" 971 | 972 | os-locale@^1.4.0: 973 | version "1.4.0" 974 | resolved "http://registry.npm.taobao.org/os-locale/download/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" 975 | dependencies: 976 | lcid "^1.0.0" 977 | 978 | os-tmpdir@^1.0.0: 979 | version "1.0.2" 980 | resolved "http://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 981 | 982 | osenv@^0.1.4: 983 | version "0.1.5" 984 | resolved "http://registry.npm.taobao.org/osenv/download/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" 985 | dependencies: 986 | os-homedir "^1.0.0" 987 | os-tmpdir "^1.0.0" 988 | 989 | parse-glob@^3.0.4: 990 | version "3.0.4" 991 | resolved "http://registry.npm.taobao.org/parse-glob/download/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" 992 | dependencies: 993 | glob-base "^0.3.0" 994 | is-dotfile "^1.0.0" 995 | is-extglob "^1.0.0" 996 | is-glob "^2.0.0" 997 | 998 | parse-json@^2.2.0: 999 | version "2.2.0" 1000 | resolved "http://registry.npm.taobao.org/parse-json/download/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" 1001 | dependencies: 1002 | error-ex "^1.2.0" 1003 | 1004 | pascalcase@^0.1.1: 1005 | version "0.1.1" 1006 | resolved "http://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" 1007 | 1008 | path-exists@^2.0.0: 1009 | version "2.1.0" 1010 | resolved "http://registry.npm.taobao.org/path-exists/download/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" 1011 | dependencies: 1012 | pinkie-promise "^2.0.0" 1013 | 1014 | path-is-absolute@^1.0.0: 1015 | version "1.0.1" 1016 | resolved "http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 1017 | 1018 | path-type@^1.0.0: 1019 | version "1.1.0" 1020 | resolved "http://registry.npm.taobao.org/path-type/download/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" 1021 | dependencies: 1022 | graceful-fs "^4.1.2" 1023 | pify "^2.0.0" 1024 | pinkie-promise "^2.0.0" 1025 | 1026 | pify@^2.0.0: 1027 | version "2.3.0" 1028 | resolved "http://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 1029 | 1030 | pinkie-promise@^2.0.0: 1031 | version "2.0.1" 1032 | resolved "http://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 1033 | dependencies: 1034 | pinkie "^2.0.0" 1035 | 1036 | pinkie@^2.0.0: 1037 | version "2.0.4" 1038 | resolved "http://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 1039 | 1040 | posix-character-classes@^0.1.0: 1041 | version "0.1.1" 1042 | resolved "http://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" 1043 | 1044 | preserve@^0.2.0: 1045 | version "0.2.0" 1046 | resolved "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" 1047 | 1048 | process-nextick-args@~2.0.0: 1049 | version "2.0.0" 1050 | resolved "http://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" 1051 | 1052 | randomatic@^3.0.0: 1053 | version "3.1.0" 1054 | resolved "http://registry.npm.taobao.org/randomatic/download/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116" 1055 | dependencies: 1056 | is-number "^4.0.0" 1057 | kind-of "^6.0.0" 1058 | math-random "^1.0.1" 1059 | 1060 | rc@^1.2.7: 1061 | version "1.2.8" 1062 | resolved "http://registry.npm.taobao.org/rc/download/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" 1063 | dependencies: 1064 | deep-extend "^0.6.0" 1065 | ini "~1.3.0" 1066 | minimist "^1.2.0" 1067 | strip-json-comments "~2.0.1" 1068 | 1069 | read-pkg-up@^1.0.1: 1070 | version "1.0.1" 1071 | resolved "http://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" 1072 | dependencies: 1073 | find-up "^1.0.0" 1074 | read-pkg "^1.0.0" 1075 | 1076 | read-pkg@^1.0.0: 1077 | version "1.1.0" 1078 | resolved "http://registry.npm.taobao.org/read-pkg/download/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" 1079 | dependencies: 1080 | load-json-file "^1.0.0" 1081 | normalize-package-data "^2.3.2" 1082 | path-type "^1.0.0" 1083 | 1084 | readable-stream@^2.0.2, readable-stream@^2.0.6: 1085 | version "2.3.6" 1086 | resolved "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" 1087 | dependencies: 1088 | core-util-is "~1.0.0" 1089 | inherits "~2.0.3" 1090 | isarray "~1.0.0" 1091 | process-nextick-args "~2.0.0" 1092 | safe-buffer "~5.1.1" 1093 | string_decoder "~1.1.1" 1094 | util-deprecate "~1.0.1" 1095 | 1096 | readdirp@^2.0.0: 1097 | version "2.2.1" 1098 | resolved "http://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" 1099 | dependencies: 1100 | graceful-fs "^4.1.11" 1101 | micromatch "^3.1.10" 1102 | readable-stream "^2.0.2" 1103 | 1104 | regex-cache@^0.4.2: 1105 | version "0.4.4" 1106 | resolved "http://registry.npm.taobao.org/regex-cache/download/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" 1107 | dependencies: 1108 | is-equal-shallow "^0.1.3" 1109 | 1110 | regex-not@^1.0.0, regex-not@^1.0.2: 1111 | version "1.0.2" 1112 | resolved "http://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" 1113 | dependencies: 1114 | extend-shallow "^3.0.2" 1115 | safe-regex "^1.1.0" 1116 | 1117 | remove-trailing-separator@^1.0.1: 1118 | version "1.1.0" 1119 | resolved "http://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" 1120 | 1121 | repeat-element@^1.1.2: 1122 | version "1.1.3" 1123 | resolved "http://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" 1124 | 1125 | repeat-string@^1.5.2, repeat-string@^1.6.1: 1126 | version "1.6.1" 1127 | resolved "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" 1128 | 1129 | require-directory@^2.1.1: 1130 | version "2.1.1" 1131 | resolved "http://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" 1132 | 1133 | require-main-filename@^1.0.1: 1134 | version "1.0.1" 1135 | resolved "http://registry.npm.taobao.org/require-main-filename/download/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" 1136 | 1137 | resolve-url@^0.2.1: 1138 | version "0.2.1" 1139 | resolved "http://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" 1140 | 1141 | ret@~0.1.10: 1142 | version "0.1.15" 1143 | resolved "http://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" 1144 | 1145 | rimraf@^2.6.1: 1146 | version "2.6.2" 1147 | resolved "http://registry.npm.taobao.org/rimraf/download/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" 1148 | dependencies: 1149 | glob "^7.0.5" 1150 | 1151 | safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: 1152 | version "5.1.2" 1153 | resolved "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" 1154 | 1155 | safe-regex@^1.1.0: 1156 | version "1.1.0" 1157 | resolved "http://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" 1158 | dependencies: 1159 | ret "~0.1.10" 1160 | 1161 | "safer-buffer@>= 2.1.2 < 3": 1162 | version "2.1.2" 1163 | resolved "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" 1164 | 1165 | sax@^1.2.4: 1166 | version "1.2.4" 1167 | resolved "http://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" 1168 | 1169 | "semver@2 || 3 || 4 || 5", semver@^5.3.0: 1170 | version "5.6.0" 1171 | resolved "http://registry.npm.taobao.org/semver/download/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" 1172 | 1173 | set-blocking@^2.0.0, set-blocking@~2.0.0: 1174 | version "2.0.0" 1175 | resolved "http://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" 1176 | 1177 | set-value@^0.4.3: 1178 | version "0.4.3" 1179 | resolved "http://registry.npm.taobao.org/set-value/download/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" 1180 | dependencies: 1181 | extend-shallow "^2.0.1" 1182 | is-extendable "^0.1.1" 1183 | is-plain-object "^2.0.1" 1184 | to-object-path "^0.3.0" 1185 | 1186 | set-value@^2.0.0: 1187 | version "2.0.0" 1188 | resolved "http://registry.npm.taobao.org/set-value/download/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" 1189 | dependencies: 1190 | extend-shallow "^2.0.1" 1191 | is-extendable "^0.1.1" 1192 | is-plain-object "^2.0.3" 1193 | split-string "^3.0.1" 1194 | 1195 | signal-exit@^3.0.0: 1196 | version "3.0.2" 1197 | resolved "http://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 1198 | 1199 | snapdragon-node@^2.0.1: 1200 | version "2.1.1" 1201 | resolved "http://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" 1202 | dependencies: 1203 | define-property "^1.0.0" 1204 | isobject "^3.0.0" 1205 | snapdragon-util "^3.0.1" 1206 | 1207 | snapdragon-util@^3.0.1: 1208 | version "3.0.1" 1209 | resolved "http://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" 1210 | dependencies: 1211 | kind-of "^3.2.0" 1212 | 1213 | snapdragon@^0.8.1: 1214 | version "0.8.2" 1215 | resolved "http://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" 1216 | dependencies: 1217 | base "^0.11.1" 1218 | debug "^2.2.0" 1219 | define-property "^0.2.5" 1220 | extend-shallow "^2.0.1" 1221 | map-cache "^0.2.2" 1222 | source-map "^0.5.6" 1223 | source-map-resolve "^0.5.0" 1224 | use "^3.1.0" 1225 | 1226 | source-map-resolve@^0.5.0: 1227 | version "0.5.2" 1228 | resolved "http://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" 1229 | dependencies: 1230 | atob "^2.1.1" 1231 | decode-uri-component "^0.2.0" 1232 | resolve-url "^0.2.1" 1233 | source-map-url "^0.4.0" 1234 | urix "^0.1.0" 1235 | 1236 | source-map-url@^0.4.0: 1237 | version "0.4.0" 1238 | resolved "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" 1239 | 1240 | source-map@^0.5.6: 1241 | version "0.5.7" 1242 | resolved "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" 1243 | 1244 | spdx-correct@^3.0.0: 1245 | version "3.0.2" 1246 | resolved "http://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e" 1247 | dependencies: 1248 | spdx-expression-parse "^3.0.0" 1249 | spdx-license-ids "^3.0.0" 1250 | 1251 | spdx-exceptions@^2.1.0: 1252 | version "2.2.0" 1253 | resolved "http://registry.npm.taobao.org/spdx-exceptions/download/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" 1254 | 1255 | spdx-expression-parse@^3.0.0: 1256 | version "3.0.0" 1257 | resolved "http://registry.npm.taobao.org/spdx-expression-parse/download/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" 1258 | dependencies: 1259 | spdx-exceptions "^2.1.0" 1260 | spdx-license-ids "^3.0.0" 1261 | 1262 | spdx-license-ids@^3.0.0: 1263 | version "3.0.1" 1264 | resolved "http://registry.npm.taobao.org/spdx-license-ids/download/spdx-license-ids-3.0.1.tgz#e2a303236cac54b04031fa7a5a79c7e701df852f" 1265 | 1266 | split-string@^3.0.1, split-string@^3.0.2: 1267 | version "3.1.0" 1268 | resolved "http://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" 1269 | dependencies: 1270 | extend-shallow "^3.0.0" 1271 | 1272 | static-extend@^0.1.1: 1273 | version "0.1.2" 1274 | resolved "http://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" 1275 | dependencies: 1276 | define-property "^0.2.5" 1277 | object-copy "^0.1.0" 1278 | 1279 | string-width@^1.0.1, string-width@^1.0.2: 1280 | version "1.0.2" 1281 | resolved "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 1282 | dependencies: 1283 | code-point-at "^1.0.0" 1284 | is-fullwidth-code-point "^1.0.0" 1285 | strip-ansi "^3.0.0" 1286 | 1287 | "string-width@^1.0.2 || 2": 1288 | version "2.1.1" 1289 | resolved "http://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 1290 | dependencies: 1291 | is-fullwidth-code-point "^2.0.0" 1292 | strip-ansi "^4.0.0" 1293 | 1294 | string_decoder@~1.1.1: 1295 | version "1.1.1" 1296 | resolved "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" 1297 | dependencies: 1298 | safe-buffer "~5.1.0" 1299 | 1300 | strip-ansi@^3.0.0, strip-ansi@^3.0.1: 1301 | version "3.0.1" 1302 | resolved "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 1303 | dependencies: 1304 | ansi-regex "^2.0.0" 1305 | 1306 | strip-ansi@^4.0.0: 1307 | version "4.0.0" 1308 | resolved "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 1309 | dependencies: 1310 | ansi-regex "^3.0.0" 1311 | 1312 | strip-bom@^2.0.0: 1313 | version "2.0.0" 1314 | resolved "http://registry.npm.taobao.org/strip-bom/download/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" 1315 | dependencies: 1316 | is-utf8 "^0.2.0" 1317 | 1318 | strip-json-comments@~2.0.1: 1319 | version "2.0.1" 1320 | resolved "http://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 1321 | 1322 | supports-color@^2.0.0: 1323 | version "2.0.0" 1324 | resolved "http://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 1325 | 1326 | sync-glob@^1.3.8: 1327 | version "1.3.8" 1328 | resolved "http://registry.npm.taobao.org/sync-glob/download/sync-glob-1.3.8.tgz#4425bf6d85eb8a01192c8b7c87df29fd6060ba86" 1329 | dependencies: 1330 | bluebird "^3.4.7" 1331 | chalk "^1.1.3" 1332 | chokidar "^1.6.1" 1333 | fs-extra "^1.0.0" 1334 | glob-all "^3.1.0" 1335 | yargs "^6.3.0" 1336 | 1337 | tar@^4: 1338 | version "4.4.6" 1339 | resolved "http://registry.npm.taobao.org/tar/download/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" 1340 | dependencies: 1341 | chownr "^1.0.1" 1342 | fs-minipass "^1.2.5" 1343 | minipass "^2.3.3" 1344 | minizlib "^1.1.0" 1345 | mkdirp "^0.5.0" 1346 | safe-buffer "^5.1.2" 1347 | yallist "^3.0.2" 1348 | 1349 | to-object-path@^0.3.0: 1350 | version "0.3.0" 1351 | resolved "http://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" 1352 | dependencies: 1353 | kind-of "^3.0.2" 1354 | 1355 | to-regex-range@^2.1.0: 1356 | version "2.1.1" 1357 | resolved "http://registry.npm.taobao.org/to-regex-range/download/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" 1358 | dependencies: 1359 | is-number "^3.0.0" 1360 | repeat-string "^1.6.1" 1361 | 1362 | to-regex@^3.0.1, to-regex@^3.0.2: 1363 | version "3.0.2" 1364 | resolved "http://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" 1365 | dependencies: 1366 | define-property "^2.0.2" 1367 | extend-shallow "^3.0.2" 1368 | regex-not "^1.0.2" 1369 | safe-regex "^1.1.0" 1370 | 1371 | union-value@^1.0.0: 1372 | version "1.0.0" 1373 | resolved "http://registry.npm.taobao.org/union-value/download/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" 1374 | dependencies: 1375 | arr-union "^3.1.0" 1376 | get-value "^2.0.6" 1377 | is-extendable "^0.1.1" 1378 | set-value "^0.4.3" 1379 | 1380 | unset-value@^1.0.0: 1381 | version "1.0.0" 1382 | resolved "http://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" 1383 | dependencies: 1384 | has-value "^0.3.1" 1385 | isobject "^3.0.0" 1386 | 1387 | urix@^0.1.0: 1388 | version "0.1.0" 1389 | resolved "http://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" 1390 | 1391 | use@^3.1.0: 1392 | version "3.1.1" 1393 | resolved "http://registry.npm.taobao.org/use/download/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" 1394 | 1395 | util-deprecate@~1.0.1: 1396 | version "1.0.2" 1397 | resolved "http://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 1398 | 1399 | validate-npm-package-license@^3.0.1: 1400 | version "3.0.4" 1401 | resolved "http://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" 1402 | dependencies: 1403 | spdx-correct "^3.0.0" 1404 | spdx-expression-parse "^3.0.0" 1405 | 1406 | which-module@^1.0.0: 1407 | version "1.0.0" 1408 | resolved "http://registry.npm.taobao.org/which-module/download/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" 1409 | 1410 | wide-align@^1.1.0: 1411 | version "1.1.3" 1412 | resolved "http://registry.npm.taobao.org/wide-align/download/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" 1413 | dependencies: 1414 | string-width "^1.0.2 || 2" 1415 | 1416 | wrap-ansi@^2.0.0: 1417 | version "2.1.0" 1418 | resolved "http://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" 1419 | dependencies: 1420 | string-width "^1.0.1" 1421 | strip-ansi "^3.0.1" 1422 | 1423 | wrappy@1: 1424 | version "1.0.2" 1425 | resolved "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1426 | 1427 | y18n@^3.2.1: 1428 | version "3.2.1" 1429 | resolved "http://registry.npm.taobao.org/y18n/download/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" 1430 | 1431 | yallist@^3.0.0, yallist@^3.0.2: 1432 | version "3.0.2" 1433 | resolved "http://registry.npm.taobao.org/yallist/download/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" 1434 | 1435 | yargs-parser@^4.2.0: 1436 | version "4.2.1" 1437 | resolved "http://registry.npm.taobao.org/yargs-parser/download/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" 1438 | dependencies: 1439 | camelcase "^3.0.0" 1440 | 1441 | yargs@^6.3.0: 1442 | version "6.6.0" 1443 | resolved "http://registry.npm.taobao.org/yargs/download/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" 1444 | dependencies: 1445 | camelcase "^3.0.0" 1446 | cliui "^3.2.0" 1447 | decamelize "^1.1.1" 1448 | get-caller-file "^1.0.1" 1449 | os-locale "^1.4.0" 1450 | read-pkg-up "^1.0.1" 1451 | require-directory "^2.1.1" 1452 | require-main-filename "^1.0.1" 1453 | set-blocking "^2.0.0" 1454 | string-width "^1.0.2" 1455 | which-module "^1.0.0" 1456 | y18n "^3.2.1" 1457 | yargs-parser "^4.2.0" 1458 | 1459 | yargs@~1.2.6: 1460 | version "1.2.6" 1461 | resolved "http://registry.npm.taobao.org/yargs/download/yargs-1.2.6.tgz#9c7b4a82fd5d595b2bf17ab6dcc43135432fe34b" 1462 | dependencies: 1463 | minimist "^0.1.0" 1464 | --------------------------------------------------------------------------------