├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .prettierignore ├── .vscode ├── launch.json └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── index.html ├── package.json ├── prettier.config.js ├── src ├── asset-resolver.ts ├── infra │ └── communication │ │ ├── connect.ts │ │ ├── logger.ts │ │ ├── subject.ts │ │ └── types.ts ├── parser │ ├── modifier.ts │ ├── script │ │ ├── manipulate.ts │ │ ├── modify.ts │ │ └── types.ts │ ├── style │ │ ├── codegen.ts │ │ ├── manipulate.ts │ │ ├── match.ts │ │ ├── modify.ts │ │ ├── transform.ts │ │ └── types.ts │ ├── template │ │ ├── manipulate.ts │ │ ├── modify.ts │ │ ├── transform.ts │ │ └── types.ts │ └── vue-file.ts ├── repositories │ ├── editor-repository.ts │ ├── setting-repository.ts │ └── vue-file-repository.ts ├── server │ ├── main.ts │ ├── mutator.ts │ ├── resolver.ts │ └── subject-type.ts ├── types │ ├── hash-sum.d.ts │ ├── postcss-safe-parser.d.ts │ └── xml-name-validator.d.ts ├── utils.ts ├── view │ ├── App.vue │ ├── communication │ │ └── client.ts │ ├── components │ │ ├── BaseIcon.vue │ │ ├── ComponentCatalog.vue │ │ ├── ComponentCatalogPreview.vue │ │ ├── ContainerVueComponent.vue │ │ ├── ContainerVueNode.vue │ │ ├── InputComposition.vue │ │ ├── InputJson.vue │ │ ├── PageMain.vue │ │ ├── Renderer.vue │ │ ├── RendererGuide.vue │ │ ├── Resizable.vue │ │ ├── ScopeInformation.vue │ │ ├── StyleDeclaration.vue │ │ ├── StyleInformation.vue │ │ ├── StyleValue.vue │ │ ├── Toolbar.vue │ │ ├── Viewport.vue │ │ ├── VueChild.vue │ │ ├── VueComponent.vue │ │ ├── VueExpression.vue │ │ ├── VueNode.vue │ │ └── VueSlot.vue │ ├── eval.ts │ ├── global.css │ ├── lib │ │ └── drag-and-drop.js │ ├── load-icons.ts │ ├── main.ts │ ├── store │ │ ├── bounds-calculator.ts │ │ ├── index.ts │ │ ├── modules │ │ │ ├── guide.ts │ │ │ ├── index.ts │ │ │ ├── project │ │ │ │ ├── index.ts │ │ │ │ ├── project-actions.ts │ │ │ │ ├── project-getters.ts │ │ │ │ ├── project-mutations.ts │ │ │ │ ├── project-state.ts │ │ │ │ └── types.ts │ │ │ └── viewport.ts │ │ └── style-matcher.ts │ ├── ui-logic │ │ ├── editing.ts │ │ ├── rendering.ts │ │ └── style-value-lexer.ts │ └── vite-env.d.ts ├── vscode │ ├── modifier.ts │ └── watcher.ts └── vue-designer.ts ├── tests ├── asset-resolver.spec.ts ├── helpers │ ├── style.ts │ ├── template.ts │ ├── vue.ts │ └── ws.ts ├── infra │ └── communication │ │ ├── connect.spec.ts │ │ └── subject.spec.ts ├── parser │ ├── modifier.spec.ts │ ├── script │ │ ├── child-component.spec.ts │ │ ├── data.spec.ts │ │ ├── modify.spec.ts │ │ └── prop.spec.ts │ ├── style │ │ ├── asset.spec.ts │ │ ├── codegen.spec.ts │ │ ├── matcher.spec.ts │ │ ├── modify.spec.ts │ │ ├── scoped.spec.ts │ │ ├── transform.spec.ts │ │ └── travarse.spec.ts │ └── template │ │ ├── asset.spec.ts │ │ ├── manipulate.spec.ts │ │ ├── modify.spec.ts │ │ ├── scoped.spec.ts │ │ ├── transform.spec.ts │ │ └── traverse.spec.ts ├── setup.ts └── view │ ├── InputComposition.spec.ts │ ├── InputJson.spec.ts │ ├── Renderer.spec.ts │ ├── Resizable.spec.ts │ ├── StyleDeclaration.spec.ts │ ├── StyleInformation.spec.ts │ ├── StyleValue │ └── basic.spec.ts │ ├── Toolbar.spec.ts │ ├── VueComponent │ ├── __snapshots__ │ │ ├── else-if.spec.ts.snap │ │ ├── else.spec.ts.snap │ │ ├── for.spec.ts.snap │ │ ├── if.spec.ts.snap │ │ ├── scoped-slot.spec.ts.snap │ │ └── slot.spec.ts.snap │ ├── basic.spec.ts │ ├── bind.spec.ts │ ├── child-component.spec.ts │ ├── else-if.spec.ts │ ├── else.spec.ts │ ├── error.spec.ts │ ├── for.spec.ts │ ├── html.spec.ts │ ├── if.spec.ts │ ├── model.spec.ts │ ├── scoped-slot.spec.ts │ ├── select.spec.ts │ ├── show.spec.ts │ ├── slot.spec.ts │ └── text.spec.ts │ ├── __snapshots__ │ ├── InputJson.spec.ts.snap │ └── StyleInformation.spec.ts.snap │ ├── communication │ └── client.spec.ts │ ├── eval.spec.ts │ ├── store │ ├── project.spec.ts │ └── style-matcher.spec.ts │ └── ui-logic │ ├── editing.spec.ts │ └── style-value-lexer.spec.ts ├── tsconfig.json ├── tsconfig.main.json ├── vite.config.ts └── yarn.lock /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | types: [opened, synchronize, reopened] 8 | 9 | jobs: 10 | ci: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - uses: actions/setup-node@v3 15 | with: 16 | node-version: '20' 17 | cache: 'yarn' 18 | - run: yarn install --frozen-lockfile 19 | - run: yarn format:check 20 | - run: yarn test 21 | - run: yarn build 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.log 3 | 4 | .vscode 5 | !.vscode/launch.json 6 | !.vscode/tasks.json 7 | 8 | node_modules 9 | /lib/ -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.json 2 | /lib/ 3 | /src/view/lib/ 4 | CHANGELOG.md -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | { 3 | "version": "0.1.0", 4 | "configurations": [ 5 | { 6 | "name": "Launch Extension", 7 | "type": "extensionHost", 8 | "request": "launch", 9 | "runtimeExecutable": "${execPath}", 10 | "args": ["--extensionDevelopmentPath=${workspaceRoot}"], 11 | "stopOnEntry": false, 12 | "sourceMaps": true, 13 | "outFiles": ["${workspaceRoot}/lib/**/*.js"], 14 | "env": { 15 | "DEV": "1" 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // Available variables which can be used inside of strings. 2 | // ${workspaceRoot}: the root folder of the team 3 | // ${file}: the current opened file 4 | // ${fileBasename}: the current opened file's basename 5 | // ${fileDirname}: the current opened file's dirname 6 | // ${fileExtname}: the current opened file's extension 7 | // ${cwd}: the current working directory of the spawned process 8 | 9 | // A task runner that calls a custom npm script that compiles the extension. 10 | { 11 | "version": "2.0.0", 12 | 13 | // we want to run npm 14 | "command": "npm", 15 | 16 | // we run the custom script "compile" as defined in package.json 17 | "args": ["run", "build", "--loglevel", "silent"], 18 | 19 | // The tsc compiler is started in watching mode 20 | "isBackground": true, 21 | 22 | // use the standard tsc in watch mode problem matcher to find compile problems in the output. 23 | "problemMatcher": "$tsc-watch", 24 | 25 | "tasks": [ 26 | { 27 | "label": "npm", 28 | "type": "shell", 29 | "command": "npm", 30 | "args": [ 31 | "run", 32 | "build", 33 | "--loglevel", 34 | "silent" 35 | ], 36 | "isBackground": true, 37 | "problemMatcher": "$tsc-watch", 38 | "group": { 39 | "_id": "build", 40 | "isDefault": false 41 | } 42 | } 43 | ] 44 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | src 2 | test 3 | types 4 | tsconfig.json 5 | tsconfig.main.json 6 | tsconfig.view.json 7 | webpack.config.js 8 | .gitignore 9 | .prettierrc.yml 10 | .prettierignore 11 | .circleci -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017-present katashin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |

Vue Designer

3 |

4 | 5 | Vue component design tool. 6 | 7 | > This extension is still work in progress. If you have some feedbacks for this extension, it would be really helpful! 8 | 9 | ![demo](https://user-images.githubusercontent.com/5158436/49339360-c26e8780-f645-11e8-8115-3784eff63814.gif) 10 | 11 | ## Quick Start 12 | 13 | - Download [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=ktsn.vue-designer) 14 | 15 | - Open the command pallete and select `Open Vue Designer`. Then you can see a preview pane of currently opened single file component (`.vue`). 16 | 17 | ## Settings 18 | 19 | ### `vueDesigner.sharedStyles` 20 | 21 | An array of CSS paths which will be loaded in the preview. It is useful when your application has global CSS such as reset CSS. 22 | 23 | ```json 24 | { 25 | "vueDesigner.sharedStyles": ["reset.css"] 26 | } 27 | ``` 28 | 29 | Note that it does not support `@import` in the loaded CSS yet. You need to specify all depending CSS files. 30 | 31 | ## Supported Preprocessors 32 | 33 | Vue Designer currently does not actively support preprocessors on `