Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: import css or json from import-maps or http #73

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6c8ae8b
feat: import css | json from module or http
Thy3634 Feb 14, 2023
46faae7
feat: import assets as url
Feb 15, 2023
5adce61
feat: import uri?raw as text
Feb 15, 2023
504811c
style: format
sxzz Jun 26, 2023
2e62b65
Merge branch 'vuejs:main' into main
Thy3634 Jul 21, 2023
92435ed
chore: release v4.5.0
yyx990803 Feb 3, 2025
180dcef
chore: use lts node version
yyx990803 Feb 3, 2025
0bd4c17
fix(split-pane): rendering order comes from the store.show-output
wangcch Jan 23, 2025
9f53bd1
feat(store): return `setImportMap` and add `merge` parameter
wangcch Feb 7, 2025
b9a1593
Merge pull request #307 from wangcch/fix-split-panels-text
edison1105 Feb 16, 2025
68855cf
Merge pull request #314 from wangcch/feat-store-setImportMap
edison1105 Feb 16, 2025
b549715
feat: export `Sandbox` as standalone output component (#309)
wangcch Feb 17, 2025
e62ddda
fix: apply builtin import map after deserialize (#315)
wangcch Feb 17, 2025
29c8137
chore(deps): update all non-major dependencies (#302)
renovate[bot] Feb 18, 2025
bbc740b
feat(editor): scrollbar style for firefox (#320)
wangcch Feb 18, 2025
33ca3c0
feat: support cache selected typescript version (#305)
huangmingfu Feb 19, 2025
9ae056b
feat: support vapor template-only component (#322)
edison1105 Feb 19, 2025
da105a4
feat: add core entry for node usage (#310)
Dsaquel Feb 19, 2025
a927083
fix: ts error
edison1105 Feb 19, 2025
8016f5a
chore: release v4.5.1
edison1105 Feb 19, 2025
5e092b6
chore: update changelog
edison1105 Feb 19, 2025
ef49472
feat: support unocss REPL
Thy3634 Mar 14, 2025
bcb3e24
Merge branch 'main' of https://github.com/Thy3634/vue-repl
Thy3634 Mar 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.12
lts/*
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib",
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
}
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## [4.5.1](https://github.com/vuejs/repl/compare/v4.5.0...v4.5.1) (2025-02-19)


### Bug Fixes

* apply builtin import map after deserialize ([#315](https://github.com/vuejs/repl/issues/315)) ([e62ddda](https://github.com/vuejs/repl/commit/e62ddda06fe3339a467f88b13b0271c2a5c7e96d))
* handle `showOutput` work with `layoutReverse: false` mobile-only edge case ([#307](https://github.com/vuejs/repl/pull/307))([0bd4c17](https://github.com/vuejs/repl/commit/0bd4c17b6dd26d4e17387f50e089dd3ffefaf054))


### Features

* add core entry for node usage ([#310](https://github.com/vuejs/repl/issues/310)) ([da105a4](https://github.com/vuejs/repl/commit/da105a42618899d214701a5fb6549719f73331bb))
* scrollbar style for firefox ([#320](https://github.com/vuejs/repl/issues/320)) ([bbc740b](https://github.com/vuejs/repl/commit/bbc740bfa840dfb6c77824470f1ffdc4a6261e85))
* export `Sandbox` as standalone output component ([#309](https://github.com/vuejs/repl/issues/309)) ([b549715](https://github.com/vuejs/repl/commit/b5497152fefe8f190eca59755bedb27b2f3178f2))
* expose `setImportMap` ([#314](https://github.com/vuejs/repl/pull/314))([9f53bd1](https://github.com/vuejs/repl/commit/9f53bd11aee1d75984e5597878e53bec4ae168e5))
* support cache selected typescript version ([#305](https://github.com/vuejs/repl/issues/305)) ([33ca3c0](https://github.com/vuejs/repl/commit/33ca3c0317aa0418c094ec8f9e6712d81fa11465))
* support vapor template-only component ([#322](https://github.com/vuejs/repl/issues/322)) ([9ae056b](https://github.com/vuejs/repl/commit/9ae056b701ff54446c5c1ec9f29444d5239e0931))



# [4.5.0](https://github.com/vuejs/repl/compare/v4.4.3...v4.5.0) (2025-02-03)


### Features

* pass on descriptor vapor flag when compiling template ([adaaceb](https://github.com/vuejs/repl/commit/adaaceb24984435ae02ab3eda071f10dba9e0362))



## [4.4.3](https://github.com/vuejs/repl/compare/v4.4.2...v4.4.3) (2025-01-02)


Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,28 @@ productionMode.value = true
<Repl :store="store" :editor="Monaco" :showCompileOutput="true" />
</template>
```

Use only the Preview without the editor

```vue
<script setup>
import { ref } from 'vue'
import { Sandbox, useStore } from '@vue/repl'

// retrieve some configuration options from the URL
const query = new URLSearchParams(location.search)

const store = useStore(
{
// custom vue version
vueVersion: ref(query.get('vue')),
},
// initialize repl with previously serialized state
location.hash,
)
</script>

<template>
<Sandbox :store="store" />
</template>
```
55 changes: 36 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@vue/repl",
"version": "4.4.3",
"version": "4.5.1",
"description": "Vue component for editing Vue components",
"packageManager": "[email protected].2",
"packageManager": "[email protected].5",
"type": "module",
"main": "dist/ssr-stub.js",
"module": "dist/vue-repl.js",
Expand All @@ -26,6 +26,11 @@
"import": "./dist/codemirror-editor.js",
"require": null
},
"./core": {
"types": "./dist/core.d.ts",
"import": "./dist/core.js",
"require": null
},
"./package.json": "./package.json",
"./style.css": "./dist/vue-repl.css",
"./dist/style.css": "./dist/vue-repl.css"
Expand Down Expand Up @@ -71,40 +76,52 @@
},
"homepage": "https://github.com/vuejs/repl#readme",
"devDependencies": {
"@babel/standalone": "^7.26.4",
"@babel/types": "^7.26.3",
"@eslint/js": "^9.17.0",
"@babel/standalone": "^7.26.9",
"@babel/types": "^7.26.9",
"@eslint/js": "^9.20.0",
"@rollup/plugin-replace": "^6.0.2",
"@shikijs/monaco": "^1.25.1",
"@shikijs/monaco": "^1.29.2",
"@types/babel__standalone": "^7.1.9",
"@types/codemirror": "^5.60.15",
"@types/hash-sum": "^1.0.2",
"@types/node": "^22.10.3",
"@types/node": "^22.13.4",
"@unocss/autocomplete": "66.1.0-beta.5",
"@unocss/core": "66.1.0-beta.5",
"@unocss/extractor-arbitrary-variants": "66.1.0-beta.5",
"@unocss/rule-utils": "66.1.0-beta.5",
"@unocss/transformer-attributify-jsx": "66.1.0-beta.5",
"@unocss/transformer-compile-class": "66.1.0-beta.5",
"@unocss/transformer-directives": "66.1.0-beta.5",
"@unocss/transformer-variant-group": "66.1.0-beta.5",
"@vitejs/plugin-vue": "^5.2.1",
"@volar/jsdelivr": "~2.4.11",
"@volar/monaco": "~2.4.11",
"@vue/babel-plugin-jsx": "^1.2.5",
"@vue/language-service": "~2.2.0",
"@vue/language-service": "~2.2.2",
"assert": "^2.1.0",
"bumpp": "^9.9.2",
"bumpp": "^9.11.1",
"codemirror": "^5.65.18",
"conventional-changelog-cli": "^5.0.0",
"eslint": "^9.17.0",
"eslint": "^9.20.1",
"eslint-plugin-vue": "^9.32.0",
"fflate": "^0.8.2",
"hash-sum": "^2.0.0",
"lint-staged": "^15.3.0",
"lint-staged": "^15.4.3",
"monaco-editor-core": "^0.52.2",
"prettier": "^3.4.2",
"shiki": "^1.25.1",
"prettier": "^3.5.1",
"shiki": "^1.29.2",
"simple-git-hooks": "^2.11.1",
"sucrase": "^3.35.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.19.0",
"vite": "^6.0.6",
"vite-plugin-dts": "^4.4.0",
"vscode-uri": "^3.0.8",
"typescript": "^5.7.3",
"typescript-eslint": "^8.24.1",
"unocss": "66.1.0-beta.5",
"vite": "^6.1.0",
"vite-plugin-dts": "^4.5.0",
"vscode-uri": "^3.1.0",
"vue": "^3.5.13",
"vue-tsc": "~2.2.0"
"vue-tsc": "~2.2.2"
},
"dependencies": {
"ofetch": "^1.4.1"
}
}
Loading