Skip to content

Commit 8cb197a

Browse files
committed
release: v2.0.0
1 parent a1a3fe1 commit 8cb197a

File tree

3 files changed

+270
-5
lines changed

3 files changed

+270
-5
lines changed

CHANGELOG.md

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,242 @@
1+
# [2.0.0](https://github.com/vuejs/repl/compare/v1.5.0...v2.0.0) (2023-06-22)
2+
3+
### Features
4+
5+
* Support using Monaco Editor + Volar ([#34](https://github.com/vuejs/repl/pull/34))
6+
7+
### BREAKING CHANGES
8+
9+
* The main `Repl` component now requires passing in the editor to be used via the `editor` prop. This is necessary so that the unused editor can be tree-shaken.
10+
11+
Example using Monaco:
12+
13+
```vue
14+
<script setup>
15+
import { Repl } from '@vue/repl'
16+
import Monaco from '@vue/repl/monaco-editor'
17+
import '@vue/repl/style.css'
18+
</script>
19+
20+
<template>
21+
<Repl :editor="Monaco" />
22+
</template>
23+
```
24+
25+
Example using CodeMirror:
26+
27+
```vue
28+
<script setup>
29+
import { Repl } from '@vue/repl'
30+
import CodeMirror from '@vue/repl/codemirror-editor'
31+
import '@vue/repl/style.css'
32+
</script>
33+
34+
<template>
35+
<Repl :editor="CodeMirror" />
36+
</template>
37+
```
38+
39+
# [1.5.0](https://github.com/vuejs/repl/compare/v1.4.1...v1.5.0) (2023-06-14)
40+
41+
42+
### Bug Fixes
43+
44+
* add ts and json mode ([#37](https://github.com/vuejs/repl/issues/37)) ([0e467af](https://github.com/vuejs/repl/commit/0e467afbb52c759fdad0a2bfc263812b0df285c5))
45+
* console logging for component instance proxies ([#62](https://github.com/vuejs/repl/issues/62)) ([bb0e143](https://github.com/vuejs/repl/commit/bb0e1430bff586b5505c3e9d11e8331359ee23d2))
46+
* css update in ssr mode ([3b7e511](https://github.com/vuejs/repl/commit/3b7e51126dd32e4ebf36b9bd492f1c117ac9de69)), closes [#91](https://github.com/vuejs/repl/issues/91) [#92](https://github.com/vuejs/repl/issues/92)
47+
* Fix reason.message not existing case ([#54](https://github.com/vuejs/repl/issues/54)) ([2508030](https://github.com/vuejs/repl/commit/2508030241504d750a3226eb9a70fddd45d3299d))
48+
* improve code gen when using cssVars in SSR ([#85](https://github.com/vuejs/repl/issues/85)) ([7e2bcc8](https://github.com/vuejs/repl/commit/7e2bcc864360e302d8b2a48e6904b7ec6c099f3f))
49+
* improve code with optional chain ([#72](https://github.com/vuejs/repl/issues/72)) ([b8caeae](https://github.com/vuejs/repl/commit/b8caeaef0368609fa3c41e992304d21d526de08c))
50+
* prevent opening new tab for a tags with javascript href ([#94](https://github.com/vuejs/repl/issues/94)) ([64906a5](https://github.com/vuejs/repl/commit/64906a529cc48869791e663ba6d203baed236f6f))
51+
* process all files when dynamic import ([#60](https://github.com/vuejs/repl/issues/60)) ([7049ae0](https://github.com/vuejs/repl/commit/7049ae006f8687d2dafce38b7f54d7281410062a))
52+
53+
54+
### Features
55+
56+
* add `sublime` keymap ([#45](https://github.com/vuejs/repl/issues/45)) ([29263d8](https://github.com/vuejs/repl/commit/29263d83d2d28e2ea3fc85c59de6d6d7ef92cca6))
57+
* add file renaming ([#63](https://github.com/vuejs/repl/issues/63)) ([eb41c3a](https://github.com/vuejs/repl/commit/eb41c3a180eb720ba0959ba2da8064442f1b25e6))
58+
* add search and replace ([#67](https://github.com/vuejs/repl/issues/67)) ([4ca3d94](https://github.com/vuejs/repl/commit/4ca3d94c98ed2029ccd61197780d45f348b2fcde))
59+
* local JSON files ([#82](https://github.com/vuejs/repl/issues/82)) ([db076eb](https://github.com/vuejs/repl/commit/db076eb2b07e104ef460d7e2bd99769b5653e1a5))
60+
* support for sandbox page customization ([#42](https://github.com/vuejs/repl/issues/42)) ([a22b969](https://github.com/vuejs/repl/commit/a22b96968894dcaf4fa096edf8a1dd7d7f903e5e))
61+
62+
63+
64+
## [1.4.1](https://github.com/vuejs/repl/compare/v1.4.0...v1.4.1) (2023-04-21)
65+
66+
67+
68+
# [1.4.0](https://github.com/vuejs/repl/compare/v1.3.6...v1.4.0) (2023-04-13)
69+
70+
71+
### Features
72+
73+
* provide fs option to support 3.3 external type resolving ([f0e826a](https://github.com/vuejs/repl/commit/f0e826a1ff9eae7c008f2b92b4af35a518dd0c7f))
74+
75+
76+
77+
## [1.3.6](https://github.com/vuejs/repl/compare/v1.3.5...v1.3.6) (2023-04-13)
78+
79+
80+
### Bug Fixes
81+
82+
* **types:** make sfc options partial ([9916f28](https://github.com/vuejs/repl/commit/9916f2862b327891604f3282fedf626759694e2c))
83+
84+
85+
86+
## [1.3.5](https://github.com/vuejs/repl/compare/v1.3.4...v1.3.5) (2023-04-06)
87+
88+
89+
### Bug Fixes
90+
91+
* avoid including vue in import map if using default URLs ([37ce32b](https://github.com/vuejs/repl/commit/37ce32b107864332eeebbc406a817d78ae8d982a))
92+
93+
94+
95+
## [1.3.4](https://github.com/vuejs/repl/compare/v1.3.3...v1.3.4) (2023-04-06)
96+
97+
98+
### Bug Fixes
99+
100+
* fix legacy domain in import maps ([7e7c7f9](https://github.com/vuejs/repl/commit/7e7c7f9dd62995f2f27448e72effb4c8fe879d72))
101+
102+
103+
104+
## [1.3.3](https://github.com/vuejs/repl/compare/v1.3.2...v1.3.3) (2023-03-17)
105+
106+
107+
### Bug Fixes
108+
109+
* ignore polyfill error in Safari ([39f4ab1](https://github.com/vuejs/repl/commit/39f4ab1956af85383e6616eafec3efc616313d28))
110+
111+
112+
113+
## [1.3.2](https://github.com/vuejs/repl/compare/v1.3.1...v1.3.2) (2022-09-27)
114+
115+
116+
### Bug Fixes
117+
118+
* reset sandbox when changing files for safari compat ([68a6197](https://github.com/vuejs/repl/commit/68a6197bbfb88dc74ec317ae50e3f686cbfeb081)), closes [vuejs/docs#1973](https://github.com/vuejs/docs/issues/1973)
119+
120+
121+
122+
## [1.3.1](https://github.com/vuejs/repl/compare/v1.3.0...v1.3.1) (2022-09-27)
123+
124+
125+
126+
# [1.3.0](https://github.com/vuejs/repl/compare/v1.2.4...v1.3.0) (2022-06-26)
127+
128+
129+
130+
## [1.2.4](https://github.com/vuejs/repl/compare/v1.2.3...v1.2.4) (2022-06-26)
131+
132+
133+
### Bug Fixes
134+
135+
* compile error when no script ([#38](https://github.com/vuejs/repl/issues/38)) ([6b9b7bc](https://github.com/vuejs/repl/commit/6b9b7bc9ea3f89772eaf1807e3b7478d39f3ef9c))
136+
137+
138+
### Features
139+
140+
* export Preview component ([#39](https://github.com/vuejs/repl/issues/39)) ([0b93cd6](https://github.com/vuejs/repl/commit/0b93cd66f5dc0beb2e44f271efa3868a155bff21))
141+
* gzip serialized state ([#43](https://github.com/vuejs/repl/issues/43)) ([b12eb88](https://github.com/vuejs/repl/commit/b12eb885deb080246d372495f443fe543de1eb6d))
142+
143+
144+
145+
## [1.2.3](https://github.com/vuejs/repl/compare/v1.2.2...v1.2.3) (2022-05-25)
146+
147+
148+
### Bug Fixes
149+
150+
* also reset import map when resetting to defauilt vue version ([5e89f07](https://github.com/vuejs/repl/commit/5e89f074ea5d33b301e079c5f4fe7860e1e5ca82))
151+
* improve new filename logic ([9647666](https://github.com/vuejs/repl/commit/9647666554407b32f16b8b5581333542769a5ea0))
152+
* warn versions that do not support in browser SSR ([01cb5b2](https://github.com/vuejs/repl/commit/01cb5b20cd15c3dcbe9f1b6d3dbc8797702924e9))
153+
154+
155+
156+
## [1.2.2](https://github.com/vuejs/repl/compare/v1.2.1...v1.2.2) (2022-05-25)
157+
158+
159+
### Bug Fixes
160+
161+
* do not start compiling until sfc options are set ([b6f86d9](https://github.com/vuejs/repl/commit/b6f86d920d22d83fde3bb77b11e8f44fff1a244d))
162+
163+
164+
165+
## [1.2.1](https://github.com/vuejs/repl/compare/v1.2.0...v1.2.1) (2022-05-25)
166+
167+
168+
### Bug Fixes
169+
170+
* fix html initialization in ssr mode ([152f2fa](https://github.com/vuejs/repl/commit/152f2fad88fa87fb617a8a69ff8f9f2c1b1eba33))
171+
172+
173+
174+
# [1.2.0](https://github.com/vuejs/repl/compare/v1.1.2...v1.2.0) (2022-05-25)
175+
176+
177+
### Bug Fixes
178+
179+
* avoid using native crypto ([c22e216](https://github.com/vuejs/repl/commit/c22e216b1c6d8bbce3cbb4376d82ce15ce149433)), closes [#25](https://github.com/vuejs/repl/issues/25)
180+
181+
182+
### Features
183+
184+
* **FileSelector:** add an increment counter for new files ([#36](https://github.com/vuejs/repl/issues/36)) ([63b8f22](https://github.com/vuejs/repl/commit/63b8f22a991984ce1ce6c56d14ae4f35f8b4a436))
185+
* support ssr + hydration ([098aa89](https://github.com/vuejs/repl/commit/098aa8992ad860c8529fb285552c6c26e7518e9e))
186+
187+
188+
189+
## [1.1.2](https://github.com/vuejs/repl/compare/v1.1.1...v1.1.2) (2022-05-20)
190+
191+
192+
### Bug Fixes
193+
194+
* apply TS transform to template when inine is disabled ([ec2ae81](https://github.com/vuejs/repl/commit/ec2ae811bd25da4be74b9df3bb8fcf9ba5d34cfb))
195+
196+
197+
198+
## [1.1.1](https://github.com/vuejs/repl/compare/v1.1.0...v1.1.1) (2022-05-17)
199+
200+
201+
### Bug Fixes
202+
203+
* adding file using enter emits error ([#23](https://github.com/vuejs/repl/issues/23)) ([918de7f](https://github.com/vuejs/repl/commit/918de7f3646a24db083e54301d6ac5c3a970c0df))
204+
205+
206+
207+
# [1.1.0](https://github.com/vuejs/repl/compare/v1.0.1...v1.1.0) (2022-05-17)
208+
209+
210+
211+
## [1.0.1](https://github.com/vuejs/repl/compare/f8bb46f969860539e3105ff56d092f0184a70eba...v1.0.1) (2022-05-17)
212+
213+
214+
### Bug Fixes
215+
216+
* also generate render function if inline mode is disabled ([9a325bb](https://github.com/vuejs/repl/commit/9a325bbf66b61403cd4df5ace31d0e7e1532fddf))
217+
* avoid reloading the iframe when switching output tabs ([20bde55](https://github.com/vuejs/repl/commit/20bde550e481c0a9c9218f8a583eae7b27ca42d2))
218+
* css double # ([#14](https://github.com/vuejs/repl/issues/14)) ([8bcf7f0](https://github.com/vuejs/repl/commit/8bcf7f0f22553214f7936863de3d9780272781b0))
219+
* fix module instantiation order ([879f084](https://github.com/vuejs/repl/commit/879f08495c061afa11e058a3e059365fe09277c6))
220+
* fix rewriteDefault TS edge case ([d277d7f](https://github.com/vuejs/repl/commit/d277d7f50113c45b8ae71afcda9aa369c64fba32))
221+
* fix setFiles with multi files cross imports ([424e00d](https://github.com/vuejs/repl/commit/424e00d2ac50636b3a2a9739620435b156f1a94a))
222+
* force app name ([18863af](https://github.com/vuejs/repl/commit/18863af803922f3966a80922db7c8a45a0cdd78d))
223+
* small screen error msg covered code button ([#18](https://github.com/vuejs/repl/issues/18)) ([02da79d](https://github.com/vuejs/repl/commit/02da79d0a238b8777fcd95675c8c5dbd1b626fd4))
224+
* toggler should be absolute ([f8bb46f](https://github.com/vuejs/repl/commit/f8bb46f969860539e3105ff56d092f0184a70eba))
225+
* update import map when setting vue versions ([15cc696](https://github.com/vuejs/repl/commit/15cc696054b49fe5ea6879b9492b96cca611c945))
226+
227+
228+
### Features
229+
230+
* add hidden file ([#17](https://github.com/vuejs/repl/issues/17)) ([35b6f1a](https://github.com/vuejs/repl/commit/35b6f1a38611e31b9adbe7540d789be144e33bdc))
231+
* allow starting on a specific view ([#15](https://github.com/vuejs/repl/issues/15)) ([7e63511](https://github.com/vuejs/repl/commit/7e635110bb5e11e8103b66c5d347cf959be8bd55))
232+
* export compileFile ([#13](https://github.com/vuejs/repl/issues/13)) ([60db549](https://github.com/vuejs/repl/commit/60db54905699e005d3117a693410c0cd50f154fe))
233+
* file-selector add horizontal scroll ([#10](https://github.com/vuejs/repl/issues/10)) ([d0c961e](https://github.com/vuejs/repl/commit/d0c961e7b20939f0e028fd0cb89ce75123f32aa7))
234+
* support passing in compiler-sfc options ([f6c7049](https://github.com/vuejs/repl/commit/f6c7049f9bc4a5e1dd3e1c1948ba2ecb43fad3c3))
235+
* support ts in template expressions ([a1e9881](https://github.com/vuejs/repl/commit/a1e98814699c020a2d82c8c5aad664e99bd6ef52))
236+
* vertical mode ([d59bb6c](https://github.com/vuejs/repl/commit/d59bb6cd0eb0e03fa548595f5c64b990cecd133e))
237+
238+
239+
1240
# [1.5.0](https://github.com/vuejs/repl/compare/v1.4.1...v1.5.0) (2023-06-14)
2241

3242

README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,51 @@
22

33
Vue SFC REPL as a Vue 3 component.
44

5-
## Simple Usage
5+
## Basic Usage
6+
7+
**Note: 2.0 now supports Monaco Editor, but also requires explicitly passing in the editor to be used for tree-shaking.**
8+
9+
### With CodeMirror Editor
10+
11+
Basic editing experience with no intellisense. Lighter weight, fewer network requests, better for embedding use cases.
12+
13+
```vue
14+
<script setup>
15+
import { Repl } from '@vue/repl'
16+
import CodeMirror from '@vue/repl/codemirror-editor'
17+
import '@vue/repl/style.css'
18+
</script>
19+
20+
<template>
21+
<Repl :editor="CodeMirror" />
22+
</template>
23+
```
24+
25+
### With Monaco Editor
26+
27+
With Volar support, autocomplete, type inference, and semantic highlighting. Heavier bundle, loads dts files from CDN, better for standalone use cases.
628

729
```vue
830
<script setup>
931
import { Repl } from '@vue/repl'
32+
import Monaco from '@vue/repl/monaco-editor'
1033
import '@vue/repl/style.css'
1134
</script>
1235
1336
<template>
14-
<Repl />
37+
<Repl :editor="Monaco" />
1538
</template>
1639
```
1740

1841
## Advanced Usage
1942

43+
Customize the behavior of the REPL by manually initializing the store.
44+
2045
```vue
2146
<script setup>
2247
import { watchEffect } from 'vue'
2348
import { Repl, ReplStore } from '@vue/repl'
49+
import Monaco from '@vue/repl/monaco-editor'
2450
2551
// retrieve some configuration options from the URL
2652
const query = new URLSearchParams(location.search)
@@ -33,7 +59,7 @@ const store = new ReplStore({
3359
showOutput: query.has('showOutput'),
3460
// starts on a different tab on the output pane if the URL has a outputMode query
3561
// and default to the "preview" tab
36-
outputMode: (query.get('outputMode') || 'preview'),
62+
outputMode: query.get('outputMode') || 'preview',
3763
3864
// specify the default URL to import Vue runtime from in the sandbox
3965
// default is the CDN link from jsdelivr.com with version matching Vue's version
@@ -56,6 +82,6 @@ store.setVueVersion('3.2.8')
5682
</script>
5783
5884
<template>
59-
<Repl :store="store" :showCompileOutput="true" />
85+
<Repl :store="store" :editor="Monaco" :showCompileOutput="true" />
6086
</template>
6187
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/repl",
3-
"version": "1.5.0",
3+
"version": "2.0.0",
44
"description": "Vue component for editing Vue components",
55
"type": "module",
66
"main": "dist/ssr-stub.js",

0 commit comments

Comments
 (0)