jsx-repl 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ module.exports = {}
@@ -0,0 +1,393 @@
1
+
2
+ .split-pane[data-v-a59bbead] {
3
+ display: flex;
4
+ height: 100%;
5
+ position: relative;
6
+ }
7
+ .split-pane.dragging[data-v-a59bbead] {
8
+ cursor: ew-resize;
9
+ }
10
+ .dragging .left[data-v-a59bbead],
11
+ .dragging .right[data-v-a59bbead] {
12
+ pointer-events: none;
13
+ }
14
+ .left[data-v-a59bbead],
15
+ .right[data-v-a59bbead] {
16
+ position: relative;
17
+ height: 100%;
18
+ }
19
+ .view-size[data-v-a59bbead] {
20
+ position: absolute;
21
+ top: 40px;
22
+ left: 10px;
23
+ font-size: 12px;
24
+ color: var(--text-light);
25
+ z-index: 100;
26
+ }
27
+ .left[data-v-a59bbead] {
28
+ border-right: 1px solid var(--border);
29
+ }
30
+ .dragger[data-v-a59bbead] {
31
+ position: absolute;
32
+ z-index: 3;
33
+ top: 0;
34
+ bottom: 0;
35
+ right: -5px;
36
+ width: 10px;
37
+ cursor: ew-resize;
38
+ }
39
+ .toggler[data-v-a59bbead] {
40
+ display: none;
41
+ z-index: 3;
42
+ font-family: var(--font-code);
43
+ color: var(--text-light);
44
+ position: absolute;
45
+ left: 50%;
46
+ bottom: 20px;
47
+ background-color: var(--bg);
48
+ padding: 8px 12px;
49
+ border-radius: 8px;
50
+ transform: translateX(-50%);
51
+ box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
52
+ }
53
+ .dark .toggler[data-v-a59bbead] {
54
+ background-color: var(--bg);
55
+ }
56
+
57
+ /* vertical */
58
+ @media (min-width: 721px) {
59
+ .split-pane.vertical[data-v-a59bbead] {
60
+ display: block;
61
+ }
62
+ .split-pane.vertical.dragging[data-v-a59bbead] {
63
+ cursor: ns-resize;
64
+ }
65
+ .vertical .dragger[data-v-a59bbead] {
66
+ top: auto;
67
+ height: 10px;
68
+ width: 100%;
69
+ left: 0;
70
+ right: 0;
71
+ bottom: -5px;
72
+ cursor: ns-resize;
73
+ }
74
+ .vertical .left[data-v-a59bbead],
75
+ .vertical .right[data-v-a59bbead] {
76
+ width: 100%;
77
+ }
78
+ .vertical .left[data-v-a59bbead] {
79
+ border-right: none;
80
+ border-bottom: 1px solid var(--border);
81
+ }
82
+ }
83
+
84
+ /* mobile */
85
+ @media (max-width: 720px) {
86
+ .left[data-v-a59bbead],
87
+ .right[data-v-a59bbead] {
88
+ position: absolute;
89
+ inset: 0;
90
+ width: auto !important;
91
+ height: auto !important;
92
+ }
93
+ .dragger[data-v-a59bbead] {
94
+ display: none;
95
+ }
96
+ .split-pane .toggler[data-v-a59bbead] {
97
+ display: block;
98
+ }
99
+ .split-pane .right[data-v-a59bbead] {
100
+ z-index: -1;
101
+ pointer-events: none;
102
+ }
103
+ .split-pane .left[data-v-a59bbead] {
104
+ z-index: 0;
105
+ pointer-events: all;
106
+ }
107
+ .split-pane.show-output .right[data-v-a59bbead] {
108
+ z-index: 0;
109
+ pointer-events: all;
110
+ }
111
+ .split-pane.show-output .left[data-v-a59bbead] {
112
+ z-index: -1;
113
+ pointer-events: none;
114
+ }
115
+ }
116
+
117
+ .msg.err[data-v-024df844] {
118
+ --color: #f56c6c;
119
+ --bg-color: #fef0f0;
120
+ }
121
+ .dark .msg.err[data-v-024df844] {
122
+ --bg-color: #2b1d1d;
123
+ }
124
+ .msg.warn[data-v-024df844] {
125
+ --color: #e6a23c;
126
+ --bg-color: #fdf6ec;
127
+ }
128
+ .dark .msg.warn[data-v-024df844] {
129
+ --bg-color: #292218;
130
+ }
131
+ pre[data-v-024df844] {
132
+ margin: 0;
133
+ padding: 12px 20px;
134
+ overflow: auto;
135
+ }
136
+ .msg[data-v-024df844] {
137
+ position: absolute;
138
+ bottom: 0;
139
+ left: 8px;
140
+ right: 8px;
141
+ z-index: 20;
142
+ border: 2px solid transparent;
143
+ border-radius: 6px;
144
+ font-family: var(--font-code);
145
+ white-space: pre-wrap;
146
+ margin-bottom: 8px;
147
+ max-height: calc(100% - 300px);
148
+ min-height: 40px;
149
+ display: flex;
150
+ align-items: stretch;
151
+ color: var(--color);
152
+ border-color: var(--color);
153
+ background-color: var(--bg-color);
154
+ }
155
+ .dismiss[data-v-024df844] {
156
+ position: absolute;
157
+ top: 2px;
158
+ right: 2px;
159
+ width: 18px;
160
+ height: 18px;
161
+ line-height: 18px;
162
+ border-radius: 9px;
163
+ text-align: center;
164
+ display: block;
165
+ font-size: 9px;
166
+ padding: 0;
167
+ color: var(--bg-color);
168
+ background-color: var(--color);
169
+ }
170
+ @media (max-width: 720px) {
171
+ .dismiss[data-v-024df844] {
172
+ top: -9px;
173
+ right: -9px;
174
+ }
175
+ .msg[data-v-024df844] {
176
+ bottom: 50px;
177
+ }
178
+ }
179
+ .fade-enter-active[data-v-024df844],
180
+ .fade-leave-active[data-v-024df844] {
181
+ transition: all 0.15s ease-out;
182
+ }
183
+ .fade-enter-from[data-v-024df844],
184
+ .fade-leave-to[data-v-024df844] {
185
+ opacity: 0;
186
+ transform: translate(0, 10px);
187
+ }
188
+
189
+ .iframe-container[data-v-39b455b8],
190
+ .iframe-container[data-v-39b455b8] iframe {
191
+ width: 100%;
192
+ height: 100%;
193
+ border: none;
194
+ background-color: #fff;
195
+ }
196
+ .iframe-container.dark[data-v-39b455b8] iframe {
197
+ background-color: #1e1e1e;
198
+ }
199
+
200
+ .tab-buttons[data-v-8c91af99] {
201
+ display: flex;
202
+ box-sizing: border-box;
203
+ border-bottom: 1px solid var(--border);
204
+ background-color: var(--bg);
205
+ min-height: var(--header-height);
206
+ overflow: hidden;
207
+ }
208
+ .tab-buttons button[data-v-8c91af99] {
209
+ padding: 0;
210
+ box-sizing: border-box;
211
+ }
212
+ .tab-buttons span[data-v-8c91af99] {
213
+ font-size: 13px;
214
+ font-family: var(--font-code);
215
+ text-transform: uppercase;
216
+ color: var(--text-light);
217
+ display: inline-block;
218
+ padding: 8px 16px 6px;
219
+ line-height: 20px;
220
+ }
221
+ button.active[data-v-8c91af99] {
222
+ color: var(--color-branding-dark);
223
+ border-bottom: 3px solid var(--color-branding-dark);
224
+ }
225
+
226
+ .file-selector[data-v-25e384ad] {
227
+ display: flex;
228
+ box-sizing: border-box;
229
+ border-bottom: 1px solid var(--border);
230
+ background-color: var(--bg);
231
+ overflow-y: hidden;
232
+ overflow-x: auto;
233
+ white-space: nowrap;
234
+ position: relative;
235
+ height: var(--header-height);
236
+ }
237
+ .file-selector[data-v-25e384ad]::-webkit-scrollbar {
238
+ height: 1px;
239
+ }
240
+ .file-selector[data-v-25e384ad]::-webkit-scrollbar-track {
241
+ background-color: var(--border);
242
+ }
243
+ .file-selector[data-v-25e384ad]::-webkit-scrollbar-thumb {
244
+ background-color: var(--color-branding);
245
+ }
246
+ .file[data-v-25e384ad] {
247
+ position: relative;
248
+ display: inline-block;
249
+ font-size: 13px;
250
+ font-family: var(--font-code);
251
+ cursor: pointer;
252
+ color: var(--text-light);
253
+ box-sizing: border-box;
254
+ }
255
+ .file.active[data-v-25e384ad] {
256
+ color: var(--color-branding);
257
+ border-bottom: 3px solid var(--color-branding);
258
+ cursor: text;
259
+ }
260
+ .file span[data-v-25e384ad] {
261
+ display: inline-block;
262
+ padding: 8px 10px 6px;
263
+ line-height: 20px;
264
+ }
265
+ .file.pending span[data-v-25e384ad] {
266
+ min-width: 50px;
267
+ min-height: 34px;
268
+ padding-right: 32px;
269
+ background-color: rgba(200, 200, 200, 0.2);
270
+ color: transparent;
271
+ }
272
+ .file.pending input[data-v-25e384ad] {
273
+ position: absolute;
274
+ inset: 8px 7px auto;
275
+ font-size: 13px;
276
+ font-family: var(--font-code);
277
+ line-height: 20px;
278
+ outline: none;
279
+ border: none;
280
+ padding: 0 3px;
281
+ min-width: 1px;
282
+ color: inherit;
283
+ background-color: transparent;
284
+ }
285
+ .file .remove[data-v-25e384ad] {
286
+ display: inline-block;
287
+ vertical-align: middle;
288
+ line-height: 12px;
289
+ cursor: pointer;
290
+ padding-left: 0;
291
+ }
292
+ .add[data-v-25e384ad] {
293
+ font-size: 18px;
294
+ font-family: var(--font-code);
295
+ color: #999;
296
+ vertical-align: middle;
297
+ margin-left: 6px;
298
+ position: relative;
299
+ top: -1px;
300
+ }
301
+ .add[data-v-25e384ad]:hover {
302
+ color: var(--color-branding);
303
+ }
304
+ .icon[data-v-25e384ad] {
305
+ margin-top: -1px;
306
+ }
307
+
308
+ .wrapper[data-v-17ef6099] {
309
+ display: flex;
310
+ align-items: center;
311
+ cursor: pointer;
312
+ user-select: none;
313
+ }
314
+ .toggle[data-v-17ef6099] {
315
+ display: inline-block;
316
+ margin-left: 4px;
317
+ width: 32px;
318
+ height: 18px;
319
+ border-radius: 12px;
320
+ position: relative;
321
+ background-color: var(--border);
322
+ }
323
+ .indicator[data-v-17ef6099] {
324
+ font-size: 12px;
325
+ background-color: var(--text-light);
326
+ width: 14px;
327
+ height: 14px;
328
+ border-radius: 50%;
329
+ transition: transform ease-in-out 0.2s;
330
+ position: absolute;
331
+ left: 2px;
332
+ top: 2px;
333
+ color: var(--bg);
334
+ text-align: center;
335
+ }
336
+ .active .indicator[data-v-17ef6099] {
337
+ background-color: var(--color-branding);
338
+ transform: translateX(14px);
339
+ color: white;
340
+ }
341
+
342
+ .editor-container[data-v-b7163f23] {
343
+ height: 100%;
344
+ overflow: hidden;
345
+ position: relative;
346
+ }
347
+ .editor-floating[data-v-b7163f23] {
348
+ position: absolute;
349
+ bottom: 16px;
350
+ right: 16px;
351
+ z-index: 11;
352
+ display: flex;
353
+ flex-direction: column;
354
+ align-items: end;
355
+ gap: 8px;
356
+ background-color: var(--bg);
357
+ color: var(--text-light);
358
+ padding: 8px;
359
+ }
360
+
361
+ .vue-repl {
362
+ --bg: #fff;
363
+ --bg-soft: #f8f8f8;
364
+ --border: #ddd;
365
+ --text-light: #888;
366
+ --font-code: Menlo, Monaco, Consolas, 'Courier New', monospace;
367
+ --color-branding: #42b883;
368
+ --color-branding-dark: #416f9c;
369
+ --header-height: 38px;
370
+
371
+ height: 100%;
372
+ margin: 0;
373
+ overflow: hidden;
374
+ font-size: 13px;
375
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
376
+ Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
377
+ background-color: var(--bg-soft);
378
+ }
379
+ .dark .vue-repl {
380
+ --bg: #1a1a1a;
381
+ --bg-soft: #242424;
382
+ --border: #383838;
383
+ --text-light: #aaa;
384
+ --color-branding: #42d392;
385
+ --color-branding-dark: #89ddff;
386
+ }
387
+ .vue-repl button {
388
+ border: none;
389
+ outline: none;
390
+ cursor: pointer;
391
+ margin: 0;
392
+ background-color: transparent;
393
+ }
@@ -0,0 +1,327 @@
1
+ import { Component } from 'vue';
2
+ import { ComponentOptionsMixin } from 'vue';
3
+ import { ComponentProvideOptions } from 'vue';
4
+ import { ComputedRef } from 'vue';
5
+ import { CreateComponentPublicInstanceWithMixins } from 'vue';
6
+ import { DefineComponent } from 'vue';
7
+ import { editor } from 'monaco-editor-core';
8
+ import { GlobalComponents } from 'vue';
9
+ import { GlobalDirectives } from 'vue';
10
+ import { version as languageToolsVersion } from '@ts-macro/language-plugin/package.json';
11
+ import type * as monaco from 'monaco-editor-core';
12
+ import { PublicProps } from 'vue';
13
+ import { Ref } from 'vue';
14
+ import { ShallowRef } from 'vue';
15
+ import { ToRefs } from 'vue';
16
+ import { UnwrapRef } from 'vue';
17
+
18
+ declare type __VLS_Props = ReplProps;
19
+
20
+ declare type __VLS_Props_2 = {
21
+ show: boolean;
22
+ ssr: boolean;
23
+ };
24
+
25
+ declare type __VLS_PublicProps = {
26
+ modelValue?: boolean;
27
+ } & __VLS_Props;
28
+
29
+ export declare function compileFile(store: Store, { filename, code, compiled }: File_2): Promise<(string | Error)[]>;
30
+
31
+ declare type EditorComponentType = Component<EditorProps>;
32
+
33
+ declare type EditorMode = 'js' | 'css' | 'ssr';
34
+
35
+ declare interface EditorProps {
36
+ value: string;
37
+ filename: string;
38
+ readonly?: boolean;
39
+ mode?: EditorMode;
40
+ }
41
+
42
+ declare class File_2 {
43
+ filename: string;
44
+ code: string;
45
+ hidden: boolean;
46
+ compiled: {
47
+ js: string;
48
+ css: string;
49
+ ssr: string;
50
+ };
51
+ editorViewState: editor.ICodeEditorViewState | null;
52
+ constructor(filename: string, code?: string, hidden?: boolean);
53
+ get language(): "css" | "vue" | "typescript" | "html" | "javascript";
54
+ }
55
+ export { File_2 as File }
56
+
57
+ export declare interface ImportMap {
58
+ imports?: Record<string, string | undefined>;
59
+ scopes?: Record<string, Record<string, string>>;
60
+ }
61
+
62
+ export { languageToolsVersion }
63
+
64
+ export declare function mergeImportMap(a: ImportMap, b: ImportMap): ImportMap;
65
+
66
+ export declare type OutputModes = EditorMode;
67
+
68
+ export declare const Preview: DefineComponent<__VLS_Props_2, {
69
+ reload: typeof reload_2;
70
+ container: Readonly<ShallowRef<HTMLDivElement | null>>;
71
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
72
+ container: HTMLDivElement;
73
+ }, any>;
74
+
75
+ /**
76
+ * Reload the preview iframe
77
+ */
78
+ declare function reload(): void;
79
+
80
+ /**
81
+ * Reload the preview iframe
82
+ */
83
+ declare function reload_2(): void;
84
+
85
+ export declare const Repl: DefineComponent<__VLS_PublicProps, {
86
+ reload: typeof reload;
87
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
88
+ "update:modelValue": (value: boolean) => any;
89
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
90
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
91
+ }>, {
92
+ ssr: boolean;
93
+ layout: "horizontal" | "vertical";
94
+ store: Store;
95
+ splitPaneOptions: {
96
+ codeTogglerText?: string;
97
+ outputTogglerText?: string;
98
+ };
99
+ theme: "dark" | "light";
100
+ previewTheme: boolean;
101
+ autoResize: boolean;
102
+ showCompileOutput: boolean;
103
+ clearConsole: boolean;
104
+ layoutReverse: boolean;
105
+ previewOptions: {
106
+ headHTML?: string;
107
+ bodyHTML?: string;
108
+ placeholderHTML?: string;
109
+ customCode?: {
110
+ importCode?: string;
111
+ useCode?: string;
112
+ };
113
+ showRuntimeError?: boolean;
114
+ showRuntimeWarning?: boolean;
115
+ };
116
+ editorOptions: {
117
+ showErrorText?: string | false;
118
+ virtualFilesText?: string | false;
119
+ autoSaveText?: string | false;
120
+ monacoOptions?: monaco.editor.IStandaloneEditorConstructionOptions;
121
+ };
122
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
123
+ output: CreateComponentPublicInstanceWithMixins<Readonly<{
124
+ editorComponent: EditorComponentType;
125
+ showCompileOutput?: boolean;
126
+ ssr: boolean;
127
+ }> & Readonly<{}>, {
128
+ reload: () => void;
129
+ previewRef: Readonly<ShallowRef<CreateComponentPublicInstanceWithMixins<Readonly<{
130
+ show: boolean;
131
+ ssr: boolean;
132
+ }> & Readonly<{}>, {
133
+ reload: () => void;
134
+ container: Readonly<ShallowRef<HTMLDivElement | null>>;
135
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
136
+ container: HTMLDivElement;
137
+ }, any, ComponentProvideOptions, {
138
+ P: {};
139
+ B: {};
140
+ D: {};
141
+ C: {};
142
+ M: {};
143
+ Defaults: {};
144
+ }, Readonly<{
145
+ show: boolean;
146
+ ssr: boolean;
147
+ }> & Readonly<{}>, {
148
+ reload: () => void;
149
+ container: Readonly<ShallowRef<HTMLDivElement | null>>;
150
+ }, {}, {}, {}, {}> | null>>;
151
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
152
+ preview: CreateComponentPublicInstanceWithMixins<Readonly<{
153
+ show: boolean;
154
+ ssr: boolean;
155
+ }> & Readonly<{}>, {
156
+ reload: () => void;
157
+ container: Readonly<ShallowRef<HTMLDivElement | null>>;
158
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
159
+ container: HTMLDivElement;
160
+ }, any, ComponentProvideOptions, {
161
+ P: {};
162
+ B: {};
163
+ D: {};
164
+ C: {};
165
+ M: {};
166
+ Defaults: {};
167
+ }, Readonly<{
168
+ show: boolean;
169
+ ssr: boolean;
170
+ }> & Readonly<{}>, {
171
+ reload: () => void;
172
+ container: Readonly<ShallowRef<HTMLDivElement | null>>;
173
+ }, {}, {}, {}, {}> | null;
174
+ }, HTMLDivElement, ComponentProvideOptions, {
175
+ P: {};
176
+ B: {};
177
+ D: {};
178
+ C: {};
179
+ M: {};
180
+ Defaults: {};
181
+ }, Readonly<{
182
+ editorComponent: EditorComponentType;
183
+ showCompileOutput?: boolean;
184
+ ssr: boolean;
185
+ }> & Readonly<{}>, {
186
+ reload: () => void;
187
+ previewRef: Readonly<ShallowRef<CreateComponentPublicInstanceWithMixins<Readonly<{
188
+ show: boolean;
189
+ ssr: boolean;
190
+ }> & Readonly<{}>, {
191
+ reload: () => void;
192
+ container: Readonly<ShallowRef<HTMLDivElement | null>>;
193
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
194
+ container: HTMLDivElement;
195
+ }, any, ComponentProvideOptions, {
196
+ P: {};
197
+ B: {};
198
+ D: {};
199
+ C: {};
200
+ M: {};
201
+ Defaults: {};
202
+ }, Readonly<{
203
+ show: boolean;
204
+ ssr: boolean;
205
+ }> & Readonly<{}>, {
206
+ reload: () => void;
207
+ container: Readonly<ShallowRef<HTMLDivElement | null>>;
208
+ }, {}, {}, {}, {}> | null>>;
209
+ }, {}, {}, {}, {}> | null;
210
+ }, HTMLDivElement>;
211
+
212
+ export declare interface ReplProps {
213
+ theme?: 'dark' | 'light';
214
+ previewTheme?: boolean;
215
+ editor: EditorComponentType;
216
+ store?: Store;
217
+ autoResize?: boolean;
218
+ showCompileOutput?: boolean;
219
+ clearConsole?: boolean;
220
+ layout?: 'horizontal' | 'vertical';
221
+ layoutReverse?: boolean;
222
+ ssr?: boolean;
223
+ previewOptions?: {
224
+ headHTML?: string;
225
+ bodyHTML?: string;
226
+ placeholderHTML?: string;
227
+ customCode?: {
228
+ importCode?: string;
229
+ useCode?: string;
230
+ };
231
+ showRuntimeError?: boolean;
232
+ showRuntimeWarning?: boolean;
233
+ };
234
+ editorOptions?: {
235
+ showErrorText?: string | false;
236
+ virtualFilesText?: string | false;
237
+ autoSaveText?: string | false;
238
+ monacoOptions?: monaco.editor.IStandaloneEditorConstructionOptions;
239
+ };
240
+ splitPaneOptions?: {
241
+ codeTogglerText?: string;
242
+ outputTogglerText?: string;
243
+ };
244
+ }
245
+
246
+ export declare interface ReplStore extends UnwrapRef<StoreState> {
247
+ activeFile: File_2;
248
+ activeConfigFile: File_2;
249
+ viteConfig: ViteConfig;
250
+ init(): void;
251
+ setActive(filename: string): void;
252
+ addFile(filename: string | File_2): void;
253
+ deleteFile(filename: string): void;
254
+ renameFile(oldFilename: string, newFilename: string): void;
255
+ getImportMap(): ImportMap;
256
+ getTsConfig(): Record<string, any>;
257
+ getTsMacroConfig(): string;
258
+ serialize(): string;
259
+ deserialize(serializedState: string): void;
260
+ getFiles(): Record<string, {
261
+ code: string;
262
+ hidden?: boolean;
263
+ }>;
264
+ setFiles(newFiles: Record<string, string>, mainFile?: string): Promise<void>;
265
+ }
266
+
267
+ export declare type Store = Pick<ReplStore, 'files' | 'activeFile' | 'activeConfigFile' | 'mainFile' | 'errors' | 'showOutput' | 'outputMode' | 'vueVersion' | 'locale' | 'typescriptVersion' | 'dependencyVersion' | 'reloadLanguageTools' | 'init' | 'setActive' | 'addFile' | 'deleteFile' | 'renameFile' | 'getImportMap' | 'getTsConfig' | 'viteConfig' | 'getTsMacroConfig' | 'preset' | 'presets' | 'importMap'>;
268
+
269
+ export declare type StoreState = ToRefs<{
270
+ files: Record<string, File_2>;
271
+ activeFilename: string;
272
+ activeConfigFilename: string;
273
+ mainFile: string;
274
+ builtinImportMap: ImportMap;
275
+ errors: (string | Error)[];
276
+ showOutput: boolean;
277
+ outputMode: OutputModes;
278
+ vueVersion: string | null;
279
+ importMap: ImportMap;
280
+ locale: string | undefined;
281
+ typescriptVersion: string;
282
+ /** \{ dependencyName: version \} */
283
+ dependencyVersion: Record<string, string>;
284
+ reloadLanguageTools?: (() => void) | undefined;
285
+ tsMacroConfigCode: string;
286
+ preset: string;
287
+ presets: Record<string, Template>;
288
+ }>;
289
+
290
+ declare type Template = {
291
+ indexHtml: string;
292
+ welcome: string;
293
+ new: string;
294
+ viteConfig: string;
295
+ };
296
+
297
+ export declare function useStore({ files, activeFilename, // set later
298
+ activeConfigFilename, // set later
299
+ mainFile, builtinImportMap, errors, showOutput, outputMode, vueVersion, locale, typescriptVersion, dependencyVersion, reloadLanguageTools, tsMacroConfigCode, preset, presets, }?: Partial<StoreState>, serializedState?: string): ReplStore;
300
+
301
+ export declare function useVueImportMap(defaults?: {
302
+ runtimeDev?: string | (() => string);
303
+ runtimeProd?: string | (() => string);
304
+ serverRenderer?: string | (() => string);
305
+ vueVersion?: string | null;
306
+ }): {
307
+ productionMode: Ref<boolean, boolean>;
308
+ importMap: ComputedRef<ImportMap>;
309
+ vueVersion: Ref<string | null, string | null>;
310
+ defaultVersion: string;
311
+ };
312
+
313
+ declare type ViteConfig = {
314
+ plugins: VitePlugin[];
315
+ };
316
+
317
+ declare type VitePlugin = {
318
+ name?: string;
319
+ resolveId?: (id: string) => string | null | undefined;
320
+ load?: (id: string) => string | null | undefined;
321
+ transform?: (code: string, id: string) => string | {
322
+ code: string;
323
+ map: any;
324
+ } | null | undefined;
325
+ };
326
+
327
+ export { }