@vuetify/vue-repl 1.4.0
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.
- package/README.md +61 -0
- package/dist/ssr-stub.js +1 -0
- package/dist/style.css +765 -0
- package/dist/vue-repl.d.ts +167 -0
- package/dist/vue-repl.js +29204 -0
- package/package.json +62 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { AllowedComponentProps } from 'vue';
|
|
2
|
+
import { ComponentCustomProps } from 'vue';
|
|
3
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
4
|
+
import * as defaultCompiler from 'vue/compiler-sfc';
|
|
5
|
+
import { DefineComponent } from 'vue';
|
|
6
|
+
import { ExtractPropTypes } from 'vue';
|
|
7
|
+
import { PropType } from 'vue';
|
|
8
|
+
import { SFCAsyncStyleCompileOptions } from 'vue/compiler-sfc';
|
|
9
|
+
import { SFCScriptCompileOptions } from 'vue/compiler-sfc';
|
|
10
|
+
import { SFCTemplateCompileOptions } from 'vue/compiler-sfc';
|
|
11
|
+
import { VNodeProps } from 'vue';
|
|
12
|
+
|
|
13
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
+
|
|
15
|
+
declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
|
|
16
|
+
|
|
17
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
declare type __VLS_TypePropsToRuntimeProps_2<T> = {
|
|
27
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
28
|
+
type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
|
|
29
|
+
} : {
|
|
30
|
+
type: PropType<T[K]>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
36
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
37
|
+
default: D[K];
|
|
38
|
+
} : P[K];
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export declare function compileFile(store: Store, { filename, code, compiled }: File_2): Promise<void>;
|
|
42
|
+
|
|
43
|
+
declare class File_2 {
|
|
44
|
+
filename: string;
|
|
45
|
+
code: string;
|
|
46
|
+
hidden: boolean;
|
|
47
|
+
compiled: {
|
|
48
|
+
js: string;
|
|
49
|
+
css: string;
|
|
50
|
+
ssr: string;
|
|
51
|
+
};
|
|
52
|
+
constructor(filename: string, code?: string, hidden?: boolean);
|
|
53
|
+
}
|
|
54
|
+
export { File_2 as File }
|
|
55
|
+
|
|
56
|
+
export declare type OutputModes = 'preview' | 'js' | 'css' | 'ssr';
|
|
57
|
+
|
|
58
|
+
export declare const Preview: DefineComponent<__VLS_TypePropsToRuntimeProps_2<{
|
|
59
|
+
show: boolean;
|
|
60
|
+
ssr: boolean;
|
|
61
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<{
|
|
62
|
+
show: boolean;
|
|
63
|
+
ssr: boolean;
|
|
64
|
+
}>>>, {}>;
|
|
65
|
+
|
|
66
|
+
export declare const Repl: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ReplProps>, {
|
|
67
|
+
store: () => ReplStore;
|
|
68
|
+
autoResize: boolean;
|
|
69
|
+
showCompileOutput: boolean;
|
|
70
|
+
showImportMap: boolean;
|
|
71
|
+
clearConsole: boolean;
|
|
72
|
+
ssr: boolean;
|
|
73
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ReplProps>, {
|
|
74
|
+
store: () => ReplStore;
|
|
75
|
+
autoResize: boolean;
|
|
76
|
+
showCompileOutput: boolean;
|
|
77
|
+
showImportMap: boolean;
|
|
78
|
+
clearConsole: boolean;
|
|
79
|
+
ssr: boolean;
|
|
80
|
+
}>>>, {
|
|
81
|
+
ssr: boolean;
|
|
82
|
+
store: Store;
|
|
83
|
+
showCompileOutput: boolean;
|
|
84
|
+
autoResize: boolean;
|
|
85
|
+
showImportMap: boolean;
|
|
86
|
+
clearConsole: boolean;
|
|
87
|
+
}>;
|
|
88
|
+
|
|
89
|
+
export declare interface ReplProps {
|
|
90
|
+
store?: Store;
|
|
91
|
+
autoResize?: boolean;
|
|
92
|
+
showCompileOutput?: boolean;
|
|
93
|
+
showImportMap?: boolean;
|
|
94
|
+
clearConsole?: boolean;
|
|
95
|
+
sfcOptions?: SFCOptions;
|
|
96
|
+
layout?: string;
|
|
97
|
+
ssr?: boolean;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export declare class ReplStore implements Store {
|
|
101
|
+
state: StoreState;
|
|
102
|
+
compiler: typeof defaultCompiler;
|
|
103
|
+
vueVersion?: string;
|
|
104
|
+
options?: SFCOptions;
|
|
105
|
+
initialShowOutput: boolean;
|
|
106
|
+
initialOutputMode: OutputModes;
|
|
107
|
+
private defaultVueRuntimeURL;
|
|
108
|
+
private defaultVueServerRendererURL;
|
|
109
|
+
private pendingCompiler;
|
|
110
|
+
constructor({ serializedState, defaultVueRuntimeURL, defaultVueServerRendererURL, showOutput, outputMode }?: StoreOptions);
|
|
111
|
+
init(): void;
|
|
112
|
+
setActive(filename: string): void;
|
|
113
|
+
addFile(fileOrFilename: string | File_2): void;
|
|
114
|
+
deleteFile(filename: string): void;
|
|
115
|
+
serialize(): string;
|
|
116
|
+
getFiles(): Record<string, string>;
|
|
117
|
+
setFiles(newFiles: Record<string, string>, mainFile?: string): Promise<void>;
|
|
118
|
+
private forceSandboxReset;
|
|
119
|
+
private initImportMap;
|
|
120
|
+
getImportMap(): any;
|
|
121
|
+
setImportMap(map: {
|
|
122
|
+
imports: Record<string, string>;
|
|
123
|
+
scopes?: Record<string, Record<string, string>>;
|
|
124
|
+
}): void;
|
|
125
|
+
setVueVersion(version: string): Promise<void>;
|
|
126
|
+
resetVueVersion(): void;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export declare interface SFCOptions {
|
|
130
|
+
script?: Omit<SFCScriptCompileOptions, 'id'>;
|
|
131
|
+
style?: SFCAsyncStyleCompileOptions;
|
|
132
|
+
template?: SFCTemplateCompileOptions;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export declare interface Store {
|
|
136
|
+
state: StoreState;
|
|
137
|
+
options?: SFCOptions;
|
|
138
|
+
compiler: typeof defaultCompiler;
|
|
139
|
+
vueVersion?: string;
|
|
140
|
+
init: () => void;
|
|
141
|
+
setActive: (filename: string) => void;
|
|
142
|
+
addFile: (filename: string | File_2) => void;
|
|
143
|
+
deleteFile: (filename: string) => void;
|
|
144
|
+
getImportMap: () => any;
|
|
145
|
+
initialShowOutput: boolean;
|
|
146
|
+
initialOutputMode: OutputModes;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export declare interface StoreOptions {
|
|
150
|
+
serializedState?: string;
|
|
151
|
+
showOutput?: boolean;
|
|
152
|
+
outputMode?: OutputModes | string;
|
|
153
|
+
defaultVueRuntimeURL?: string;
|
|
154
|
+
defaultVueServerRendererURL?: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export declare interface StoreState {
|
|
158
|
+
mainFile: string;
|
|
159
|
+
files: Record<string, File_2>;
|
|
160
|
+
activeFile: File_2;
|
|
161
|
+
errors: (string | Error)[];
|
|
162
|
+
vueRuntimeURL: string;
|
|
163
|
+
vueServerRendererURL: string;
|
|
164
|
+
resetFlip: boolean;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export { }
|