@qodalis/vue-cli 2.0.0-beta.1 → 2.0.0-beta.10

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,282 @@
1
+ import * as vue from 'vue';
2
+ import { PropType, InjectionKey, Ref } from 'vue';
3
+ import { ICliModule, ICliCommandProcessor, CliEngineSnapshot, CliPanelConfig } from '@qodalis/cli-core';
4
+ import { CliEngineOptions, CliEngine } from '@qodalis/cli';
5
+ export { CliEngine, CliEngineOptions } from '@qodalis/cli';
6
+
7
+ /**
8
+ * Props accepted by the Vue `Cli` component.
9
+ */
10
+ interface CliProps {
11
+ modules?: ICliModule[];
12
+ processors?: ICliCommandProcessor[];
13
+ options?: CliEngineOptions;
14
+ services?: Record<string, any>;
15
+ snapshot?: CliEngineSnapshot;
16
+ style?: Record<string, string>;
17
+ class?: string;
18
+ }
19
+ declare const Cli: vue.DefineComponent<vue.ExtractPropTypes<{
20
+ modules: {
21
+ type: PropType<ICliModule[]>;
22
+ default: undefined;
23
+ };
24
+ processors: {
25
+ type: PropType<ICliCommandProcessor[]>;
26
+ default: undefined;
27
+ };
28
+ options: {
29
+ type: PropType<CliEngineOptions>;
30
+ default: undefined;
31
+ };
32
+ services: {
33
+ type: PropType<Record<string, any>>;
34
+ default: undefined;
35
+ };
36
+ snapshot: {
37
+ type: PropType<CliEngineSnapshot>;
38
+ default: undefined;
39
+ };
40
+ style: {
41
+ type: PropType<Record<string, string>>;
42
+ default: undefined;
43
+ };
44
+ class: {
45
+ type: StringConstructor;
46
+ default: undefined;
47
+ };
48
+ }>, (() => null) | (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
49
+ [key: string]: any;
50
+ }>), {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
51
+ modules: {
52
+ type: PropType<ICliModule[]>;
53
+ default: undefined;
54
+ };
55
+ processors: {
56
+ type: PropType<ICliCommandProcessor[]>;
57
+ default: undefined;
58
+ };
59
+ options: {
60
+ type: PropType<CliEngineOptions>;
61
+ default: undefined;
62
+ };
63
+ services: {
64
+ type: PropType<Record<string, any>>;
65
+ default: undefined;
66
+ };
67
+ snapshot: {
68
+ type: PropType<CliEngineSnapshot>;
69
+ default: undefined;
70
+ };
71
+ style: {
72
+ type: PropType<Record<string, string>>;
73
+ default: undefined;
74
+ };
75
+ class: {
76
+ type: StringConstructor;
77
+ default: undefined;
78
+ };
79
+ }>> & Readonly<{
80
+ onReady?: ((...args: any[]) => any) | undefined;
81
+ }>, {
82
+ modules: ICliModule[];
83
+ processors: ICliCommandProcessor[];
84
+ options: CliEngineOptions;
85
+ services: Record<string, any>;
86
+ snapshot: CliEngineSnapshot;
87
+ style: Record<string, string>;
88
+ class: string;
89
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
90
+
91
+ interface CliPanelOptions extends CliEngineOptions, CliPanelConfig {
92
+ }
93
+ declare const CliPanel: vue.DefineComponent<vue.ExtractPropTypes<{
94
+ options: {
95
+ type: PropType<CliPanelOptions>;
96
+ default: undefined;
97
+ };
98
+ modules: {
99
+ type: PropType<ICliModule[]>;
100
+ default: undefined;
101
+ };
102
+ processors: {
103
+ type: PropType<ICliCommandProcessor[]>;
104
+ default: undefined;
105
+ };
106
+ services: {
107
+ type: PropType<Record<string, any>>;
108
+ default: undefined;
109
+ };
110
+ onClose: {
111
+ type: PropType<() => void>;
112
+ default: undefined;
113
+ };
114
+ style: {
115
+ type: PropType<Record<string, string>>;
116
+ default: undefined;
117
+ };
118
+ class: {
119
+ type: StringConstructor;
120
+ default: undefined;
121
+ };
122
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
123
+ [key: string]: any;
124
+ }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
125
+ options: {
126
+ type: PropType<CliPanelOptions>;
127
+ default: undefined;
128
+ };
129
+ modules: {
130
+ type: PropType<ICliModule[]>;
131
+ default: undefined;
132
+ };
133
+ processors: {
134
+ type: PropType<ICliCommandProcessor[]>;
135
+ default: undefined;
136
+ };
137
+ services: {
138
+ type: PropType<Record<string, any>>;
139
+ default: undefined;
140
+ };
141
+ onClose: {
142
+ type: PropType<() => void>;
143
+ default: undefined;
144
+ };
145
+ style: {
146
+ type: PropType<Record<string, string>>;
147
+ default: undefined;
148
+ };
149
+ class: {
150
+ type: StringConstructor;
151
+ default: undefined;
152
+ };
153
+ }>> & Readonly<{}>, {
154
+ modules: ICliModule[];
155
+ processors: ICliCommandProcessor[];
156
+ options: CliPanelOptions;
157
+ services: Record<string, any>;
158
+ style: Record<string, string>;
159
+ class: string;
160
+ onClose: () => void;
161
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
162
+
163
+ declare const CliProvider: vue.DefineComponent<vue.ExtractPropTypes<{
164
+ modules: {
165
+ type: PropType<ICliModule[]>;
166
+ default: undefined;
167
+ };
168
+ processors: {
169
+ type: PropType<ICliCommandProcessor[]>;
170
+ default: undefined;
171
+ };
172
+ options: {
173
+ type: PropType<CliEngineOptions>;
174
+ default: undefined;
175
+ };
176
+ services: {
177
+ type: PropType<Record<string, any>>;
178
+ default: undefined;
179
+ };
180
+ style: {
181
+ type: PropType<Record<string, string>>;
182
+ default: undefined;
183
+ };
184
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
185
+ [key: string]: any;
186
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "ready"[], "ready", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
187
+ modules: {
188
+ type: PropType<ICliModule[]>;
189
+ default: undefined;
190
+ };
191
+ processors: {
192
+ type: PropType<ICliCommandProcessor[]>;
193
+ default: undefined;
194
+ };
195
+ options: {
196
+ type: PropType<CliEngineOptions>;
197
+ default: undefined;
198
+ };
199
+ services: {
200
+ type: PropType<Record<string, any>>;
201
+ default: undefined;
202
+ };
203
+ style: {
204
+ type: PropType<Record<string, string>>;
205
+ default: undefined;
206
+ };
207
+ }>> & Readonly<{
208
+ onReady?: ((...args: any[]) => any) | undefined;
209
+ }>, {
210
+ modules: ICliModule[];
211
+ processors: ICliCommandProcessor[];
212
+ options: CliEngineOptions;
213
+ services: Record<string, any>;
214
+ style: Record<string, string>;
215
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
216
+
217
+ interface CliConfigValue {
218
+ modules?: ICliModule[];
219
+ processors?: ICliCommandProcessor[];
220
+ options?: CliEngineOptions;
221
+ services?: Record<string, any>;
222
+ }
223
+ declare const CliConfigKey: InjectionKey<CliConfigValue>;
224
+ declare const CliConfigProvider: vue.DefineComponent<vue.ExtractPropTypes<{
225
+ modules: {
226
+ type: PropType<ICliModule[]>;
227
+ default: undefined;
228
+ };
229
+ processors: {
230
+ type: PropType<ICliCommandProcessor[]>;
231
+ default: undefined;
232
+ };
233
+ options: {
234
+ type: PropType<CliEngineOptions>;
235
+ default: undefined;
236
+ };
237
+ services: {
238
+ type: PropType<Record<string, any>>;
239
+ default: undefined;
240
+ };
241
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
242
+ [key: string]: any;
243
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
244
+ modules: {
245
+ type: PropType<ICliModule[]>;
246
+ default: undefined;
247
+ };
248
+ processors: {
249
+ type: PropType<ICliCommandProcessor[]>;
250
+ default: undefined;
251
+ };
252
+ options: {
253
+ type: PropType<CliEngineOptions>;
254
+ default: undefined;
255
+ };
256
+ services: {
257
+ type: PropType<Record<string, any>>;
258
+ default: undefined;
259
+ };
260
+ }>> & Readonly<{}>, {
261
+ modules: ICliModule[];
262
+ processors: ICliCommandProcessor[];
263
+ options: CliEngineOptions;
264
+ services: Record<string, any>;
265
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
266
+
267
+ interface CliContextValue {
268
+ engine: Ref<CliEngine | null>;
269
+ }
270
+ declare const CliInjectionKey: InjectionKey<CliContextValue>;
271
+
272
+ declare function useCli(): CliContextValue;
273
+
274
+ interface UseCliEngineConfig {
275
+ modules?: ICliModule[];
276
+ processors?: ICliCommandProcessor[];
277
+ options?: CliEngineOptions;
278
+ services?: Record<string, any>;
279
+ }
280
+ declare function useCliEngine(containerRef: Ref<HTMLElement | null>, config?: UseCliEngineConfig): Ref<CliEngine | null>;
281
+
282
+ export { Cli, CliConfigKey, CliConfigProvider, type CliConfigValue, type CliContextValue, CliInjectionKey, CliPanel, type CliPanelOptions, type CliProps, CliProvider, type UseCliEngineConfig, useCli, useCliEngine };