@mak-98/dirvi-app 0.0.0-stage → 0.11.0-beta.3
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/LICENSE +674 -0
- package/dist/application/create-app-api.d.ts +11 -0
- package/dist/application/create-app-api.d.ts.map +1 -0
- package/dist/application/create-app-api.js +33 -0
- package/dist/application/create-dirvi-api.d.ts +10 -0
- package/dist/application/create-dirvi-api.d.ts.map +1 -0
- package/dist/application/create-dirvi-api.js +23 -0
- package/dist/application/init-runtime.d.ts +20 -0
- package/dist/application/init-runtime.d.ts.map +1 -0
- package/dist/application/init-runtime.js +117 -0
- package/dist/application/package-loader.d.ts +9 -0
- package/dist/application/package-loader.d.ts.map +1 -0
- package/dist/application/package-loader.js +1 -0
- package/dist/application/shell-api.d.ts +5 -0
- package/dist/application/shell-api.d.ts.map +1 -0
- package/dist/application/shell-api.js +1 -0
- package/dist/domain/app-pack-ref.d.ts +17 -0
- package/dist/domain/app-pack-ref.d.ts.map +1 -0
- package/dist/domain/app-pack-ref.js +37 -0
- package/dist/domain/app.d.ts +39 -0
- package/dist/domain/app.d.ts.map +1 -0
- package/dist/domain/app.js +25 -0
- package/dist/domain/config.d.ts +402 -0
- package/dist/domain/config.d.ts.map +1 -0
- package/dist/domain/config.js +44 -0
- package/dist/domain/dirvi-api.d.ts +24 -0
- package/dist/domain/dirvi-api.d.ts.map +1 -0
- package/dist/domain/dirvi-api.js +1 -0
- package/dist/domain/ex-command.d.ts +12 -0
- package/dist/domain/ex-command.d.ts.map +1 -0
- package/dist/domain/ex-command.js +1 -0
- package/dist/domain/init-runtime.d.ts +41 -0
- package/dist/domain/init-runtime.d.ts.map +1 -0
- package/dist/domain/init-runtime.js +1 -0
- package/dist/domain/initialization.d.ts +20 -0
- package/dist/domain/initialization.d.ts.map +1 -0
- package/dist/domain/initialization.js +1 -0
- package/dist/domain/public-init-api.d.ts +42 -0
- package/dist/domain/public-init-api.d.ts.map +1 -0
- package/dist/domain/public-init-api.js +1 -0
- package/dist/domain/shell-api.d.ts +5 -0
- package/dist/domain/shell-api.d.ts.map +1 -0
- package/dist/domain/shell-api.js +1 -0
- package/dist/domain/theme.d.ts +536 -0
- package/dist/domain/theme.d.ts.map +1 -0
- package/dist/domain/theme.js +170 -0
- package/dist/domain/view-name-schema.d.ts +18 -0
- package/dist/domain/view-name-schema.d.ts.map +1 -0
- package/dist/domain/view-name-schema.js +68 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/theme.d.ts +536 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +170 -0
- package/dist/ui/App.d.ts +18 -0
- package/dist/ui/App.d.ts.map +1 -0
- package/dist/ui/App.js +225 -0
- package/dist/ui/AppSetup.d.ts +17 -0
- package/dist/ui/AppSetup.d.ts.map +1 -0
- package/dist/ui/AppSetup.js +88 -0
- package/dist/ui/Shell.d.ts +49 -0
- package/dist/ui/Shell.d.ts.map +1 -0
- package/dist/ui/Shell.js +54 -0
- package/dist/ui/app-screen-renderer.d.ts +28 -0
- package/dist/ui/app-screen-renderer.d.ts.map +1 -0
- package/dist/ui/app-screen-renderer.js +1 -0
- package/dist/ui/color-resolver.d.ts +3 -0
- package/dist/ui/color-resolver.d.ts.map +1 -0
- package/dist/ui/color-resolver.js +61 -0
- package/dist/ui/hooks/useView.d.ts +4 -0
- package/dist/ui/hooks/useView.d.ts.map +1 -0
- package/dist/ui/hooks/useView.js +32 -0
- package/dist/ui/loading-screen-renderer.d.ts +3 -0
- package/dist/ui/loading-screen-renderer.d.ts.map +1 -0
- package/dist/ui/loading-screen-renderer.js +1 -0
- package/dist/ui/view.d.ts +23 -0
- package/dist/ui/view.d.ts.map +1 -0
- package/dist/ui/view.js +74 -0
- package/package.json +34 -3
- package/README.md +0 -3
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ConfigSchema: z.ZodObject<{
|
|
3
|
+
indentSize: z.ZodDefault<z.ZodNumber>;
|
|
4
|
+
firstIndent: z.ZodOptional<z.ZodString>;
|
|
5
|
+
theme: z.ZodDefault<z.ZodObject<{
|
|
6
|
+
statusBar: z.ZodDefault<z.ZodObject<{
|
|
7
|
+
command: z.ZodDefault<z.ZodObject<{
|
|
8
|
+
fg: z.ZodObject<{
|
|
9
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
10
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
black: "black";
|
|
13
|
+
red: "red";
|
|
14
|
+
green: "green";
|
|
15
|
+
yellow: "yellow";
|
|
16
|
+
blue: "blue";
|
|
17
|
+
cyan: "cyan";
|
|
18
|
+
magenta: "magenta";
|
|
19
|
+
white: "white";
|
|
20
|
+
gray: "gray";
|
|
21
|
+
grey: "grey";
|
|
22
|
+
blackBright: "blackBright";
|
|
23
|
+
redBright: "redBright";
|
|
24
|
+
greenBright: "greenBright";
|
|
25
|
+
yellowBright: "yellowBright";
|
|
26
|
+
blueBright: "blueBright";
|
|
27
|
+
cyanBright: "cyanBright";
|
|
28
|
+
magentaBright: "magentaBright";
|
|
29
|
+
whiteBright: "whiteBright";
|
|
30
|
+
}>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
normal: z.ZodDefault<z.ZodObject<{
|
|
34
|
+
fg: z.ZodObject<{
|
|
35
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
36
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
black: "black";
|
|
39
|
+
red: "red";
|
|
40
|
+
green: "green";
|
|
41
|
+
yellow: "yellow";
|
|
42
|
+
blue: "blue";
|
|
43
|
+
cyan: "cyan";
|
|
44
|
+
magenta: "magenta";
|
|
45
|
+
white: "white";
|
|
46
|
+
gray: "gray";
|
|
47
|
+
grey: "grey";
|
|
48
|
+
blackBright: "blackBright";
|
|
49
|
+
redBright: "redBright";
|
|
50
|
+
greenBright: "greenBright";
|
|
51
|
+
yellowBright: "yellowBright";
|
|
52
|
+
blueBright: "blueBright";
|
|
53
|
+
cyanBright: "cyanBright";
|
|
54
|
+
magentaBright: "magentaBright";
|
|
55
|
+
whiteBright: "whiteBright";
|
|
56
|
+
}>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
background: z.ZodDefault<z.ZodObject<{
|
|
60
|
+
bg: z.ZodObject<{
|
|
61
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
62
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
64
|
+
black: "black";
|
|
65
|
+
red: "red";
|
|
66
|
+
green: "green";
|
|
67
|
+
yellow: "yellow";
|
|
68
|
+
blue: "blue";
|
|
69
|
+
cyan: "cyan";
|
|
70
|
+
magenta: "magenta";
|
|
71
|
+
white: "white";
|
|
72
|
+
gray: "gray";
|
|
73
|
+
grey: "grey";
|
|
74
|
+
blackBright: "blackBright";
|
|
75
|
+
redBright: "redBright";
|
|
76
|
+
greenBright: "greenBright";
|
|
77
|
+
yellowBright: "yellowBright";
|
|
78
|
+
blueBright: "blueBright";
|
|
79
|
+
cyanBright: "cyanBright";
|
|
80
|
+
magentaBright: "magentaBright";
|
|
81
|
+
whiteBright: "whiteBright";
|
|
82
|
+
}>>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
tree: z.ZodDefault<z.ZodObject<{
|
|
87
|
+
leaf: z.ZodDefault<z.ZodObject<{
|
|
88
|
+
fg: z.ZodObject<{
|
|
89
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
90
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
92
|
+
black: "black";
|
|
93
|
+
red: "red";
|
|
94
|
+
green: "green";
|
|
95
|
+
yellow: "yellow";
|
|
96
|
+
blue: "blue";
|
|
97
|
+
cyan: "cyan";
|
|
98
|
+
magenta: "magenta";
|
|
99
|
+
white: "white";
|
|
100
|
+
gray: "gray";
|
|
101
|
+
grey: "grey";
|
|
102
|
+
blackBright: "blackBright";
|
|
103
|
+
redBright: "redBright";
|
|
104
|
+
greenBright: "greenBright";
|
|
105
|
+
yellowBright: "yellowBright";
|
|
106
|
+
blueBright: "blueBright";
|
|
107
|
+
cyanBright: "cyanBright";
|
|
108
|
+
magentaBright: "magentaBright";
|
|
109
|
+
whiteBright: "whiteBright";
|
|
110
|
+
}>>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
branch: z.ZodDefault<z.ZodObject<{
|
|
114
|
+
fg: z.ZodObject<{
|
|
115
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
116
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
118
|
+
black: "black";
|
|
119
|
+
red: "red";
|
|
120
|
+
green: "green";
|
|
121
|
+
yellow: "yellow";
|
|
122
|
+
blue: "blue";
|
|
123
|
+
cyan: "cyan";
|
|
124
|
+
magenta: "magenta";
|
|
125
|
+
white: "white";
|
|
126
|
+
gray: "gray";
|
|
127
|
+
grey: "grey";
|
|
128
|
+
blackBright: "blackBright";
|
|
129
|
+
redBright: "redBright";
|
|
130
|
+
greenBright: "greenBright";
|
|
131
|
+
yellowBright: "yellowBright";
|
|
132
|
+
blueBright: "blueBright";
|
|
133
|
+
cyanBright: "cyanBright";
|
|
134
|
+
magentaBright: "magentaBright";
|
|
135
|
+
whiteBright: "whiteBright";
|
|
136
|
+
}>>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
folded: z.ZodDefault<z.ZodObject<{
|
|
140
|
+
fg: z.ZodObject<{
|
|
141
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
142
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
black: "black";
|
|
145
|
+
red: "red";
|
|
146
|
+
green: "green";
|
|
147
|
+
yellow: "yellow";
|
|
148
|
+
blue: "blue";
|
|
149
|
+
cyan: "cyan";
|
|
150
|
+
magenta: "magenta";
|
|
151
|
+
white: "white";
|
|
152
|
+
gray: "gray";
|
|
153
|
+
grey: "grey";
|
|
154
|
+
blackBright: "blackBright";
|
|
155
|
+
redBright: "redBright";
|
|
156
|
+
greenBright: "greenBright";
|
|
157
|
+
yellowBright: "yellowBright";
|
|
158
|
+
blueBright: "blueBright";
|
|
159
|
+
cyanBright: "cyanBright";
|
|
160
|
+
magentaBright: "magentaBright";
|
|
161
|
+
whiteBright: "whiteBright";
|
|
162
|
+
}>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
}, z.core.$strip>>;
|
|
165
|
+
cursorLine: z.ZodDefault<z.ZodObject<{
|
|
166
|
+
bg: z.ZodObject<{
|
|
167
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
168
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
170
|
+
black: "black";
|
|
171
|
+
red: "red";
|
|
172
|
+
green: "green";
|
|
173
|
+
yellow: "yellow";
|
|
174
|
+
blue: "blue";
|
|
175
|
+
cyan: "cyan";
|
|
176
|
+
magenta: "magenta";
|
|
177
|
+
white: "white";
|
|
178
|
+
gray: "gray";
|
|
179
|
+
grey: "grey";
|
|
180
|
+
blackBright: "blackBright";
|
|
181
|
+
redBright: "redBright";
|
|
182
|
+
greenBright: "greenBright";
|
|
183
|
+
yellowBright: "yellowBright";
|
|
184
|
+
blueBright: "blueBright";
|
|
185
|
+
cyanBright: "cyanBright";
|
|
186
|
+
magentaBright: "magentaBright";
|
|
187
|
+
whiteBright: "whiteBright";
|
|
188
|
+
}>>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
indentGuide: z.ZodDefault<z.ZodObject<{
|
|
192
|
+
fg: z.ZodOptional<z.ZodObject<{
|
|
193
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
194
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
196
|
+
black: "black";
|
|
197
|
+
red: "red";
|
|
198
|
+
green: "green";
|
|
199
|
+
yellow: "yellow";
|
|
200
|
+
blue: "blue";
|
|
201
|
+
cyan: "cyan";
|
|
202
|
+
magenta: "magenta";
|
|
203
|
+
white: "white";
|
|
204
|
+
gray: "gray";
|
|
205
|
+
grey: "grey";
|
|
206
|
+
blackBright: "blackBright";
|
|
207
|
+
redBright: "redBright";
|
|
208
|
+
greenBright: "greenBright";
|
|
209
|
+
yellowBright: "yellowBright";
|
|
210
|
+
blueBright: "blueBright";
|
|
211
|
+
cyanBright: "cyanBright";
|
|
212
|
+
magentaBright: "magentaBright";
|
|
213
|
+
whiteBright: "whiteBright";
|
|
214
|
+
}>>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
}, z.core.$strip>>;
|
|
217
|
+
}, z.core.$strip>>;
|
|
218
|
+
feedbackBar: z.ZodDefault<z.ZodObject<{
|
|
219
|
+
message: z.ZodDefault<z.ZodObject<{
|
|
220
|
+
fg: z.ZodObject<{
|
|
221
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
222
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
224
|
+
black: "black";
|
|
225
|
+
red: "red";
|
|
226
|
+
green: "green";
|
|
227
|
+
yellow: "yellow";
|
|
228
|
+
blue: "blue";
|
|
229
|
+
cyan: "cyan";
|
|
230
|
+
magenta: "magenta";
|
|
231
|
+
white: "white";
|
|
232
|
+
gray: "gray";
|
|
233
|
+
grey: "grey";
|
|
234
|
+
blackBright: "blackBright";
|
|
235
|
+
redBright: "redBright";
|
|
236
|
+
greenBright: "greenBright";
|
|
237
|
+
yellowBright: "yellowBright";
|
|
238
|
+
blueBright: "blueBright";
|
|
239
|
+
cyanBright: "cyanBright";
|
|
240
|
+
magentaBright: "magentaBright";
|
|
241
|
+
whiteBright: "whiteBright";
|
|
242
|
+
}>>;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
bg: z.ZodObject<{
|
|
245
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
246
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
248
|
+
black: "black";
|
|
249
|
+
red: "red";
|
|
250
|
+
green: "green";
|
|
251
|
+
yellow: "yellow";
|
|
252
|
+
blue: "blue";
|
|
253
|
+
cyan: "cyan";
|
|
254
|
+
magenta: "magenta";
|
|
255
|
+
white: "white";
|
|
256
|
+
gray: "gray";
|
|
257
|
+
grey: "grey";
|
|
258
|
+
blackBright: "blackBright";
|
|
259
|
+
redBright: "redBright";
|
|
260
|
+
greenBright: "greenBright";
|
|
261
|
+
yellowBright: "yellowBright";
|
|
262
|
+
blueBright: "blueBright";
|
|
263
|
+
cyanBright: "cyanBright";
|
|
264
|
+
magentaBright: "magentaBright";
|
|
265
|
+
whiteBright: "whiteBright";
|
|
266
|
+
}>>;
|
|
267
|
+
}, z.core.$strip>;
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
|
+
success: z.ZodDefault<z.ZodObject<{
|
|
270
|
+
fg: z.ZodObject<{
|
|
271
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
272
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
274
|
+
black: "black";
|
|
275
|
+
red: "red";
|
|
276
|
+
green: "green";
|
|
277
|
+
yellow: "yellow";
|
|
278
|
+
blue: "blue";
|
|
279
|
+
cyan: "cyan";
|
|
280
|
+
magenta: "magenta";
|
|
281
|
+
white: "white";
|
|
282
|
+
gray: "gray";
|
|
283
|
+
grey: "grey";
|
|
284
|
+
blackBright: "blackBright";
|
|
285
|
+
redBright: "redBright";
|
|
286
|
+
greenBright: "greenBright";
|
|
287
|
+
yellowBright: "yellowBright";
|
|
288
|
+
blueBright: "blueBright";
|
|
289
|
+
cyanBright: "cyanBright";
|
|
290
|
+
magentaBright: "magentaBright";
|
|
291
|
+
whiteBright: "whiteBright";
|
|
292
|
+
}>>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
bg: z.ZodObject<{
|
|
295
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
296
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
298
|
+
black: "black";
|
|
299
|
+
red: "red";
|
|
300
|
+
green: "green";
|
|
301
|
+
yellow: "yellow";
|
|
302
|
+
blue: "blue";
|
|
303
|
+
cyan: "cyan";
|
|
304
|
+
magenta: "magenta";
|
|
305
|
+
white: "white";
|
|
306
|
+
gray: "gray";
|
|
307
|
+
grey: "grey";
|
|
308
|
+
blackBright: "blackBright";
|
|
309
|
+
redBright: "redBright";
|
|
310
|
+
greenBright: "greenBright";
|
|
311
|
+
yellowBright: "yellowBright";
|
|
312
|
+
blueBright: "blueBright";
|
|
313
|
+
cyanBright: "cyanBright";
|
|
314
|
+
magentaBright: "magentaBright";
|
|
315
|
+
whiteBright: "whiteBright";
|
|
316
|
+
}>>;
|
|
317
|
+
}, z.core.$strip>;
|
|
318
|
+
}, z.core.$strip>>;
|
|
319
|
+
error: z.ZodDefault<z.ZodObject<{
|
|
320
|
+
fg: z.ZodObject<{
|
|
321
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
322
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
323
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
324
|
+
black: "black";
|
|
325
|
+
red: "red";
|
|
326
|
+
green: "green";
|
|
327
|
+
yellow: "yellow";
|
|
328
|
+
blue: "blue";
|
|
329
|
+
cyan: "cyan";
|
|
330
|
+
magenta: "magenta";
|
|
331
|
+
white: "white";
|
|
332
|
+
gray: "gray";
|
|
333
|
+
grey: "grey";
|
|
334
|
+
blackBright: "blackBright";
|
|
335
|
+
redBright: "redBright";
|
|
336
|
+
greenBright: "greenBright";
|
|
337
|
+
yellowBright: "yellowBright";
|
|
338
|
+
blueBright: "blueBright";
|
|
339
|
+
cyanBright: "cyanBright";
|
|
340
|
+
magentaBright: "magentaBright";
|
|
341
|
+
whiteBright: "whiteBright";
|
|
342
|
+
}>>;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
bg: z.ZodObject<{
|
|
345
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
346
|
+
ansi256: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
basic: z.ZodOptional<z.ZodEnum<{
|
|
348
|
+
black: "black";
|
|
349
|
+
red: "red";
|
|
350
|
+
green: "green";
|
|
351
|
+
yellow: "yellow";
|
|
352
|
+
blue: "blue";
|
|
353
|
+
cyan: "cyan";
|
|
354
|
+
magenta: "magenta";
|
|
355
|
+
white: "white";
|
|
356
|
+
gray: "gray";
|
|
357
|
+
grey: "grey";
|
|
358
|
+
blackBright: "blackBright";
|
|
359
|
+
redBright: "redBright";
|
|
360
|
+
greenBright: "greenBright";
|
|
361
|
+
yellowBright: "yellowBright";
|
|
362
|
+
blueBright: "blueBright";
|
|
363
|
+
cyanBright: "cyanBright";
|
|
364
|
+
magentaBright: "magentaBright";
|
|
365
|
+
whiteBright: "whiteBright";
|
|
366
|
+
}>>;
|
|
367
|
+
}, z.core.$strip>;
|
|
368
|
+
}, z.core.$strip>>;
|
|
369
|
+
}, z.core.$strip>>;
|
|
370
|
+
}, z.core.$strip>>;
|
|
371
|
+
}, z.core.$strip>;
|
|
372
|
+
export type Config = z.infer<typeof ConfigSchema>;
|
|
373
|
+
export declare const defaultConfig: Config;
|
|
374
|
+
/**
|
|
375
|
+
* A recursively optional form of a configuration value.
|
|
376
|
+
*
|
|
377
|
+
* Config scripts submit patches rather than full Config values, so a script can
|
|
378
|
+
* change a nested option without repeating unrelated defaults. Arrays remain
|
|
379
|
+
* whole values because configuration arrays should be replaced, not merged by
|
|
380
|
+
* index.
|
|
381
|
+
*/
|
|
382
|
+
type DeepPartial<Value> = Value extends readonly unknown[] ? Value : Value extends object ? {
|
|
383
|
+
readonly [Key in keyof Value]?: DeepPartial<Value[Key]>;
|
|
384
|
+
} : Value;
|
|
385
|
+
/**
|
|
386
|
+
* A partial configuration update accepted from an init.mjs script.
|
|
387
|
+
*
|
|
388
|
+
* Every patch is merged with the current complete configuration and then
|
|
389
|
+
* validated with ConfigSchema before it becomes active.
|
|
390
|
+
*/
|
|
391
|
+
export type ConfigPatch = DeepPartial<Config>;
|
|
392
|
+
/**
|
|
393
|
+
* Deeply merges plain configuration objects without mutating either input.
|
|
394
|
+
*
|
|
395
|
+
* Nested records merge recursively. Scalars, undefined values, and arrays
|
|
396
|
+
* replace the corresponding current value. ConfigSchema validates the result
|
|
397
|
+
* immediately after this operation, since TypeScript cannot prove that a
|
|
398
|
+
* generic runtime merge preserves all domain invariants.
|
|
399
|
+
*/
|
|
400
|
+
export declare function merge<Value>(current: Value, patch: DeepPartial<Value>): Value;
|
|
401
|
+
export {};
|
|
402
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/domain/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMvB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,aAAa,EAAE,MAA+B,CAAC;AAK5D;;;;;;;GAOG;AACH,KAAK,WAAW,CAAC,KAAK,IAAI,KAAK,SAAS,SAAS,OAAO,EAAE,GACtD,KAAK,GACL,KAAK,SAAS,MAAM,GAClB;IAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;CAAE,GAC3D,KAAK,CAAC;AAEZ;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,KAAK,CAiB7E"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defaultTheme, ThemeSchema } from './theme.js';
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// Configuration
|
|
5
|
+
// =============================================================================
|
|
6
|
+
export const ConfigSchema = z.object({
|
|
7
|
+
indentSize: z.number().int().min(0).default(2),
|
|
8
|
+
// When omitted, ViewRowComponent uses `indentSize` spaces.
|
|
9
|
+
// An empty string is valid and removes the first indentation prefix.
|
|
10
|
+
firstIndent: z.string().optional(),
|
|
11
|
+
theme: ThemeSchema.default(defaultTheme),
|
|
12
|
+
});
|
|
13
|
+
export const defaultConfig = ConfigSchema.parse({});
|
|
14
|
+
/**
|
|
15
|
+
* Deeply merges plain configuration objects without mutating either input.
|
|
16
|
+
*
|
|
17
|
+
* Nested records merge recursively. Scalars, undefined values, and arrays
|
|
18
|
+
* replace the corresponding current value. ConfigSchema validates the result
|
|
19
|
+
* immediately after this operation, since TypeScript cannot prove that a
|
|
20
|
+
* generic runtime merge preserves all domain invariants.
|
|
21
|
+
*/
|
|
22
|
+
export function merge(current, patch) {
|
|
23
|
+
if (!isRecord(current) || !isRecord(patch)) {
|
|
24
|
+
return patch;
|
|
25
|
+
}
|
|
26
|
+
const result = { ...current };
|
|
27
|
+
for (const [key, patchValue] of Object.entries(patch)) {
|
|
28
|
+
const currentValue = result[key];
|
|
29
|
+
result[key] =
|
|
30
|
+
isRecord(currentValue) && isRecord(patchValue)
|
|
31
|
+
? merge(currentValue, patchValue)
|
|
32
|
+
: patchValue;
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Returns whether a value can participate in the object-merge branch.
|
|
38
|
+
*
|
|
39
|
+
* Arrays are deliberately excluded: they are configuration values to replace
|
|
40
|
+
* atomically rather than collections to merge by numeric index.
|
|
41
|
+
*/
|
|
42
|
+
function isRecord(value) {
|
|
43
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
44
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Config } from './config.js';
|
|
2
|
+
import type { AppInput } from './app.js';
|
|
3
|
+
import type { AppApiApplicator } from 'dirvi-apis';
|
|
4
|
+
import type { ExCommand } from './ex-command.js';
|
|
5
|
+
/**
|
|
6
|
+
* The configured, long-lived Dirvi application API.
|
|
7
|
+
*
|
|
8
|
+
* This is created after init.mjs has finished evaluating. Unlike PublicInitApi,
|
|
9
|
+
* it cannot install packages or register apps: startup composition is sealed.
|
|
10
|
+
*/
|
|
11
|
+
export type DirviApi = {
|
|
12
|
+
readonly config: Config;
|
|
13
|
+
readonly initialAppId: string;
|
|
14
|
+
readonly appIds: readonly string[];
|
|
15
|
+
readonly customExCommands: readonly ExCommand[];
|
|
16
|
+
/**
|
|
17
|
+
* Opens a registered app using host-provided startup input.
|
|
18
|
+
*
|
|
19
|
+
* The returned applicator preserves the concrete AppApi generic parameters
|
|
20
|
+
* selected by the app plugin without exposing them to the host or Shell.
|
|
21
|
+
*/
|
|
22
|
+
readonly openApp: (appId: string, input: AppInput) => AppApiApplicator;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=dirvi-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dirvi-api.d.ts","sourceRoot":"","sources":["../../src/domain/dirvi-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,SAAS,EAAE,CAAC;IAEhD;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,KAAK,gBAAgB,CAAC;CACxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ShellApi } from './shell-api.js';
|
|
2
|
+
/**
|
|
3
|
+
* A command registered by init.mjs and invoked through Ex mode.
|
|
4
|
+
*
|
|
5
|
+
* The command receives the live DirviApi only when it is executed. This keeps
|
|
6
|
+
* initialization separate from the running application lifecycle.
|
|
7
|
+
*/
|
|
8
|
+
export type ExCommand = {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly execute: (shell: ShellApi) => void | Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=ex-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ex-command.d.ts","sourceRoot":"","sources":["../../src/domain/ex-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AppPlugin } from 'dirvi-apis';
|
|
2
|
+
import { AppPackageReference } from './app-pack-ref.js';
|
|
3
|
+
import { Config, ConfigPatch } from './config.js';
|
|
4
|
+
import { App } from './app.js';
|
|
5
|
+
/**
|
|
6
|
+
* The startup configuration API exposed to init.mjs as the global `dirvi`.
|
|
7
|
+
*
|
|
8
|
+
* This is intentionally a narrow facade. It is the public scripting boundary,
|
|
9
|
+
* rather than an escape hatch into UI state or infrastructure implementations.
|
|
10
|
+
*/
|
|
11
|
+
export type PublicInitApi = {
|
|
12
|
+
readonly options: {
|
|
13
|
+
set: (patch: ConfigPatch) => void;
|
|
14
|
+
};
|
|
15
|
+
readonly apps: {
|
|
16
|
+
install: (reference: AppPackageReference) => Promise<AppPlugin>;
|
|
17
|
+
/**
|
|
18
|
+
* Registers an application made available by init.mjs.
|
|
19
|
+
*/
|
|
20
|
+
register: (id: string, appPlugin: AppPlugin) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Optionally selects the app initially opened by the shell.
|
|
23
|
+
*
|
|
24
|
+
* If omitted, the runtime falls back to the most recently registered app.
|
|
25
|
+
*/
|
|
26
|
+
initialAppId: (appId: string) => void;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Everything registered while init.mjs was evaluated.
|
|
31
|
+
*
|
|
32
|
+
* Config is shared tree-UI configuration. App selection is distinct from Config
|
|
33
|
+
* value. initialAppId is always the ID of one app in apps: either the app
|
|
34
|
+
* explicitly selected by init.mjs or the most recently registered app.
|
|
35
|
+
*/
|
|
36
|
+
export type Init = {
|
|
37
|
+
readonly config: Config;
|
|
38
|
+
readonly apps: readonly App[];
|
|
39
|
+
readonly initialAppId: string;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=init-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-runtime.d.ts","sourceRoot":"","sources":["../../src/domain/init-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,OAAO,EAAE;QAChB,GAAG,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;KACnC,CAAC;IAEF,QAAQ,CAAC,IAAI,EAAE;QACb,OAAO,EAAE,CAAC,SAAS,EAAE,mBAAmB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;QAChE;;WAEG;QACH,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;QACrD;;;;WAIG;QACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;KACvC,CAAC;CACH,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Config } from './config.js';
|
|
2
|
+
import { ExCommand } from './ex-command.js';
|
|
3
|
+
import { AppPackageReference } from './app-pack-ref.js';
|
|
4
|
+
/**
|
|
5
|
+
* Object set through initialization, i.e. evaluating init.mjs.
|
|
6
|
+
*
|
|
7
|
+
* Config is shared tree-UI configuration. App selection is distinct from Config
|
|
8
|
+
* value. Ex commands are executable startup registrations and are therefore
|
|
9
|
+
* stored separately from Config.
|
|
10
|
+
*
|
|
11
|
+
* initialAppId is always the ID of one app in apps: either the app explicitly
|
|
12
|
+
* selected by init.mjs or the most recently registered app.
|
|
13
|
+
*/
|
|
14
|
+
export type Initialization = {
|
|
15
|
+
readonly config: Readonly<Config>;
|
|
16
|
+
readonly initialAppId: string;
|
|
17
|
+
readonly registeredApps: ReadonlyMap<string, AppPackageReference>;
|
|
18
|
+
readonly exCommands: readonly ExCommand[];
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=initialization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialization.d.ts","sourceRoot":"","sources":["../../src/domain/initialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAClE,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;CAC3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AppPackageReference } from './app-pack-ref.js';
|
|
2
|
+
import { ConfigPatch } from './config.js';
|
|
3
|
+
import { ShellApi } from './shell-api.js';
|
|
4
|
+
/**
|
|
5
|
+
* The startup configuration API exposed to init.mjs as the global `dirvi`.
|
|
6
|
+
*
|
|
7
|
+
* This is intentionally a narrow facade. It is the public scripting boundary,
|
|
8
|
+
* rather than an escape hatch into UI state or infrastructure implementations.
|
|
9
|
+
*/
|
|
10
|
+
export type PublicInitApi = {
|
|
11
|
+
readonly options: {
|
|
12
|
+
set: (patch: ConfigPatch) => void;
|
|
13
|
+
};
|
|
14
|
+
readonly apps: {
|
|
15
|
+
/**
|
|
16
|
+
* Optionally selects the app initially opened by the shell.
|
|
17
|
+
*
|
|
18
|
+
* If omitted, the runtime falls back to the most recently registered app.
|
|
19
|
+
*/
|
|
20
|
+
initialAppId: (appId: string) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Registers an application made available by init.mjs.
|
|
23
|
+
*/
|
|
24
|
+
register: (id: string, appReference: AppPackageReference) => void;
|
|
25
|
+
};
|
|
26
|
+
readonly ex: {
|
|
27
|
+
/**
|
|
28
|
+
* Registers an Ex command invoked as `:${name}`.
|
|
29
|
+
*
|
|
30
|
+
* The closure receives the live DirviApi when the user invokes the command,
|
|
31
|
+
* not while init.mjs is being evaluated. E.g.
|
|
32
|
+
*
|
|
33
|
+
* ```js
|
|
34
|
+
* dirvi.ex.register('hello', (api) => {
|
|
35
|
+
* // Do something with api
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
register: (name: string, execute: (shell: ShellApi) => void | Promise<void>) => void;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=public-init-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-init-api.d.ts","sourceRoot":"","sources":["../../src/domain/public-init-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,OAAO,EAAE;QAChB,GAAG,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;KACnC,CAAC;IAEF,QAAQ,CAAC,IAAI,EAAE;QACb;;;;WAIG;QACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;QACtC;;WAEG;QACH,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,mBAAmB,KAAK,IAAI,CAAC;KACnE,CAAC;IAEF,QAAQ,CAAC,EAAE,EAAE;QACX;;;;;;;;;;;WAWG;QACH,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAC/C,IAAI,CAAC;KACX,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-api.d.ts","sourceRoot":"","sources":["../../src/domain/shell-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|