avelra 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +72 -2
- package/bin/avelra.js +5 -0
- package/lib/launcher.js +46 -0
- package/package.json +39 -4
- package/platform/darwin-arm64/bin/avelra +0 -0
- package/platform/darwin-arm64/libexec/avelra/avelra-pack +0 -0
- package/platform/darwin-arm64/libexec/avelra/avelra-runtime +0 -0
- package/platform/darwin-arm64/share/avelra/templates/app/avelra.config.json +12 -0
- package/platform/darwin-arm64/share/avelra/templates/app/client/app.js +131 -0
- package/platform/darwin-arm64/share/avelra/templates/app/client/avelra-lockup.svg +32 -0
- package/platform/darwin-arm64/share/avelra/templates/app/client/fonts/Inter-Regular.woff2 +0 -0
- package/platform/darwin-arm64/share/avelra/templates/app/client/fonts/Inter-SemiBold.woff2 +0 -0
- package/platform/darwin-arm64/share/avelra/templates/app/client/fonts/OFL-Inter.txt +92 -0
- package/platform/darwin-arm64/share/avelra/templates/app/client/fonts/OFL-SpaceGrotesk.txt +93 -0
- package/platform/darwin-arm64/share/avelra/templates/app/client/fonts/SpaceGrotesk.ttf +0 -0
- package/platform/darwin-arm64/share/avelra/templates/app/client/index.html +89 -0
- package/platform/darwin-arm64/share/avelra/templates/app/client/styles.css +529 -0
- package/platform/darwin-arm64/share/avelra/templates/app/icon.png +0 -0
- package/platform/darwin-arm64/share/doc/avelra/LICENSE +21 -0
- package/platform/linux-x64/bin/avelra +0 -0
- package/platform/linux-x64/libexec/avelra/avelra-installer +0 -0
- package/platform/linux-x64/libexec/avelra/avelra-pack +0 -0
- package/platform/linux-x64/libexec/avelra/avelra-runtime +0 -0
- package/platform/linux-x64/share/avelra/templates/app/avelra.config.json +12 -0
- package/platform/linux-x64/share/avelra/templates/app/client/app.js +131 -0
- package/platform/linux-x64/share/avelra/templates/app/client/avelra-lockup.svg +32 -0
- package/platform/linux-x64/share/avelra/templates/app/client/fonts/Inter-Regular.woff2 +0 -0
- package/platform/linux-x64/share/avelra/templates/app/client/fonts/Inter-SemiBold.woff2 +0 -0
- package/platform/linux-x64/share/avelra/templates/app/client/fonts/OFL-Inter.txt +92 -0
- package/platform/linux-x64/share/avelra/templates/app/client/fonts/OFL-SpaceGrotesk.txt +93 -0
- package/platform/linux-x64/share/avelra/templates/app/client/fonts/SpaceGrotesk.ttf +0 -0
- package/platform/linux-x64/share/avelra/templates/app/client/index.html +89 -0
- package/platform/linux-x64/share/avelra/templates/app/client/styles.css +529 -0
- package/platform/linux-x64/share/avelra/templates/app/icon.png +0 -0
- package/platform/linux-x64/share/doc/avelra/LICENSE +21 -0
- package/platform/win32-x64/bin/avelra.exe +0 -0
- package/platform/win32-x64/libexec/avelra/avelra-pack.exe +0 -0
- package/platform/win32-x64/libexec/avelra/avelra-runtime.exe +0 -0
- package/platform/win32-x64/share/avelra/templates/app/avelra.config.json +12 -0
- package/platform/win32-x64/share/avelra/templates/app/client/app.js +131 -0
- package/platform/win32-x64/share/avelra/templates/app/client/avelra-lockup.svg +32 -0
- package/platform/win32-x64/share/avelra/templates/app/client/fonts/Inter-Regular.woff2 +0 -0
- package/platform/win32-x64/share/avelra/templates/app/client/fonts/Inter-SemiBold.woff2 +0 -0
- package/platform/win32-x64/share/avelra/templates/app/client/fonts/OFL-Inter.txt +92 -0
- package/platform/win32-x64/share/avelra/templates/app/client/fonts/OFL-SpaceGrotesk.txt +93 -0
- package/platform/win32-x64/share/avelra/templates/app/client/fonts/SpaceGrotesk.ttf +0 -0
- package/platform/win32-x64/share/avelra/templates/app/client/index.html +89 -0
- package/platform/win32-x64/share/avelra/templates/app/client/styles.css +529 -0
- package/platform/win32-x64/share/avelra/templates/app/icon.png +0 -0
- package/platform/win32-x64/share/doc/avelra/LICENSE +21 -0
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "Space Grotesk";
|
|
3
|
+
src: url("fonts/SpaceGrotesk.ttf") format("truetype");
|
|
4
|
+
font-weight: 300 700;
|
|
5
|
+
font-display: swap;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: "Inter";
|
|
10
|
+
src: url("fonts/Inter-Regular.woff2") format("woff2");
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
font-display: swap;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@font-face {
|
|
16
|
+
font-family: "Inter";
|
|
17
|
+
src: url("fonts/Inter-SemiBold.woff2") format("woff2");
|
|
18
|
+
font-weight: 600 700;
|
|
19
|
+
font-display: swap;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:root {
|
|
23
|
+
--ink: #151827;
|
|
24
|
+
--muted: #64708c;
|
|
25
|
+
--iris: #5b4bd6;
|
|
26
|
+
--violet: #7a5cff;
|
|
27
|
+
--cyan: #00b8d9;
|
|
28
|
+
--paper: #fbfcff;
|
|
29
|
+
--soft: #f4f5fb;
|
|
30
|
+
--line: #e4e7f2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
* {
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
html,
|
|
38
|
+
body {
|
|
39
|
+
margin: 0;
|
|
40
|
+
min-height: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body {
|
|
44
|
+
min-height: 100vh;
|
|
45
|
+
background: var(--paper);
|
|
46
|
+
color: var(--ink);
|
|
47
|
+
font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.shell {
|
|
51
|
+
width: min(900px, calc(100% - 64px));
|
|
52
|
+
min-height: 100vh;
|
|
53
|
+
margin: 0 auto;
|
|
54
|
+
padding: 24px 0 18px;
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.top {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
padding-bottom: 16px;
|
|
64
|
+
border-bottom: 1px solid var(--line);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.brand-lockup {
|
|
68
|
+
display: block;
|
|
69
|
+
height: 46px;
|
|
70
|
+
width: auto;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.version {
|
|
74
|
+
color: var(--muted);
|
|
75
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
76
|
+
font-size: 10px;
|
|
77
|
+
letter-spacing: 0.12em;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
main {
|
|
81
|
+
flex: 1;
|
|
82
|
+
display: grid;
|
|
83
|
+
grid-template-columns: minmax(0, 1fr) 430px;
|
|
84
|
+
gap: 44px;
|
|
85
|
+
align-items: stretch;
|
|
86
|
+
align-content: start;
|
|
87
|
+
padding-top: 34px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.eyebrow {
|
|
91
|
+
margin: 0;
|
|
92
|
+
color: var(--iris);
|
|
93
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
94
|
+
font-size: 10px;
|
|
95
|
+
letter-spacing: 0.16em;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
h1 {
|
|
99
|
+
margin: 12px 0 0;
|
|
100
|
+
font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
|
|
101
|
+
font-size: 64px;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
line-height: 0.96;
|
|
104
|
+
letter-spacing: -3px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.copy {
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
align-self: stretch;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.lead {
|
|
114
|
+
max-width: 400px;
|
|
115
|
+
margin: 16px 0 0;
|
|
116
|
+
color: var(--muted);
|
|
117
|
+
font-size: 17px;
|
|
118
|
+
line-height: 1.5;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
code {
|
|
122
|
+
color: var(--ink);
|
|
123
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
124
|
+
font-size: 0.92em;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.benefits {
|
|
128
|
+
margin-top: 22px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.benefits-title {
|
|
132
|
+
margin: 0 0 8px;
|
|
133
|
+
color: var(--muted);
|
|
134
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
135
|
+
font-size: 10px;
|
|
136
|
+
letter-spacing: 0.14em;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.benefits ul {
|
|
140
|
+
margin: 0;
|
|
141
|
+
padding: 0;
|
|
142
|
+
list-style: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.benefits li {
|
|
146
|
+
display: grid;
|
|
147
|
+
grid-template-columns: 22px 1fr;
|
|
148
|
+
gap: 8px;
|
|
149
|
+
padding: 7px 0;
|
|
150
|
+
border-top: 1px solid var(--line);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.benefits .num {
|
|
154
|
+
padding-top: 1px;
|
|
155
|
+
color: var(--iris);
|
|
156
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
157
|
+
font-size: 10px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.benefits strong {
|
|
161
|
+
display: block;
|
|
162
|
+
color: var(--ink);
|
|
163
|
+
font-size: 14px;
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.benefits p {
|
|
168
|
+
margin: 3px 0 0;
|
|
169
|
+
color: var(--muted);
|
|
170
|
+
font-size: 12.5px;
|
|
171
|
+
line-height: 1.4;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.links {
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-wrap: wrap;
|
|
177
|
+
gap: 22px;
|
|
178
|
+
margin-top: auto;
|
|
179
|
+
padding-top: 22px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.links a {
|
|
183
|
+
color: var(--ink);
|
|
184
|
+
font-size: 15px;
|
|
185
|
+
font-weight: 600;
|
|
186
|
+
text-decoration: none;
|
|
187
|
+
border-bottom: 1px solid #c9cede;
|
|
188
|
+
padding-bottom: 3px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.links a span {
|
|
192
|
+
color: var(--iris);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.links a:hover {
|
|
196
|
+
color: var(--iris);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.links .link-disabled {
|
|
200
|
+
color: var(--muted);
|
|
201
|
+
font-size: 15px;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
border-bottom: 1px dashed #d7dbe7;
|
|
204
|
+
padding-bottom: 3px;
|
|
205
|
+
cursor: not-allowed;
|
|
206
|
+
opacity: .65;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.links .link-disabled span {
|
|
210
|
+
color: var(--muted);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.bridge {
|
|
214
|
+
align-self: start;
|
|
215
|
+
padding: 16px;
|
|
216
|
+
border: 1px solid var(--line);
|
|
217
|
+
background: var(--soft);
|
|
218
|
+
border-radius: 10px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.bridge-top {
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
justify-content: space-between;
|
|
225
|
+
gap: 12px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.label {
|
|
229
|
+
color: var(--iris);
|
|
230
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
231
|
+
font-size: 11px;
|
|
232
|
+
letter-spacing: 0.14em;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.state {
|
|
236
|
+
color: var(--muted);
|
|
237
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
238
|
+
font-size: 11px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.state.ok {
|
|
242
|
+
color: #007a94;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.state.ok::before {
|
|
246
|
+
content: "● ";
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.state.degraded {
|
|
250
|
+
color: #a15c00;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.state.degraded::before {
|
|
254
|
+
content: "● ";
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.state.error {
|
|
258
|
+
color: #b42318;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.state.error::before {
|
|
262
|
+
content: "● ";
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.hint {
|
|
266
|
+
margin: 10px 0 0;
|
|
267
|
+
color: var(--ink);
|
|
268
|
+
font-size: 13px;
|
|
269
|
+
line-height: 1.45;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.hint strong {
|
|
273
|
+
color: var(--ink);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.health-headline {
|
|
277
|
+
display: flex;
|
|
278
|
+
flex-direction: column;
|
|
279
|
+
gap: 4px;
|
|
280
|
+
margin: 16px 0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.health-headline strong {
|
|
284
|
+
font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
|
|
285
|
+
font-size: 24px;
|
|
286
|
+
font-weight: 500;
|
|
287
|
+
letter-spacing: -0.8px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.health-headline span {
|
|
291
|
+
color: var(--muted);
|
|
292
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
293
|
+
font-size: 11px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.health-checks {
|
|
297
|
+
border-top: 1px solid var(--line);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.health-row {
|
|
301
|
+
display: flex;
|
|
302
|
+
justify-content: space-between;
|
|
303
|
+
gap: 12px;
|
|
304
|
+
padding: 8px 0;
|
|
305
|
+
border-bottom: 1px solid var(--line);
|
|
306
|
+
color: var(--muted);
|
|
307
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
308
|
+
font-size: 11px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.health-check {
|
|
312
|
+
font-weight: 600;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.health-check.ok {
|
|
316
|
+
color: #007a94;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.health-check.degraded {
|
|
320
|
+
color: #a15c00;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.health-check.failed {
|
|
324
|
+
color: #b42318;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.health-footer {
|
|
328
|
+
display: flex;
|
|
329
|
+
align-items: center;
|
|
330
|
+
justify-content: space-between;
|
|
331
|
+
gap: 12px;
|
|
332
|
+
margin-top: 14px;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.health-footer > span {
|
|
336
|
+
color: var(--muted);
|
|
337
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
338
|
+
font-size: 10px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.call,
|
|
342
|
+
.result {
|
|
343
|
+
margin: 10px 0 0;
|
|
344
|
+
padding: 10px 11px;
|
|
345
|
+
overflow: auto;
|
|
346
|
+
border: 1px solid var(--line);
|
|
347
|
+
border-radius: 6px;
|
|
348
|
+
background: #fff;
|
|
349
|
+
color: var(--ink);
|
|
350
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
351
|
+
font-size: 12px;
|
|
352
|
+
line-height: 1.55;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.result .row {
|
|
356
|
+
display: flex;
|
|
357
|
+
justify-content: space-between;
|
|
358
|
+
gap: 12px;
|
|
359
|
+
padding: 5px 0;
|
|
360
|
+
border-bottom: 1px solid #f0f1f7;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.result .row:last-child {
|
|
364
|
+
border-bottom: 0;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.result .row span:first-child {
|
|
368
|
+
color: var(--muted);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.result .row span:last-child {
|
|
372
|
+
color: var(--ink);
|
|
373
|
+
font-weight: 600;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.call {
|
|
377
|
+
color: var(--muted);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.call #code-value {
|
|
381
|
+
color: var(--iris);
|
|
382
|
+
font-weight: 600;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.section-label {
|
|
386
|
+
margin: 14px 0 0;
|
|
387
|
+
color: var(--ink);
|
|
388
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
389
|
+
font-size: 10px;
|
|
390
|
+
letter-spacing: 0.14em;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.controls-label {
|
|
394
|
+
margin-top: 12px;
|
|
395
|
+
color: var(--ink);
|
|
396
|
+
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
|
|
397
|
+
font-size: 12px;
|
|
398
|
+
letter-spacing: 0;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.controls {
|
|
402
|
+
display: flex;
|
|
403
|
+
align-items: center;
|
|
404
|
+
gap: 8px;
|
|
405
|
+
margin-top: 7px;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.field {
|
|
409
|
+
color: var(--muted);
|
|
410
|
+
font-size: 12px;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
input {
|
|
414
|
+
width: 72px;
|
|
415
|
+
padding: 7px 8px;
|
|
416
|
+
border: 1px solid var(--line);
|
|
417
|
+
border-radius: 3px;
|
|
418
|
+
background: #fff;
|
|
419
|
+
color: var(--ink);
|
|
420
|
+
font: inherit;
|
|
421
|
+
font-size: 13px;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
button {
|
|
425
|
+
padding: 8px 12px;
|
|
426
|
+
border: 0;
|
|
427
|
+
border-radius: 3px;
|
|
428
|
+
background: var(--iris);
|
|
429
|
+
color: #fff;
|
|
430
|
+
font: inherit;
|
|
431
|
+
font-size: 12px;
|
|
432
|
+
font-weight: 600;
|
|
433
|
+
cursor: pointer;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
button:hover {
|
|
437
|
+
background: #4a3bc0;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
button:disabled {
|
|
441
|
+
opacity: 0.55;
|
|
442
|
+
cursor: not-allowed;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
input:focus-visible,
|
|
446
|
+
button:focus-visible,
|
|
447
|
+
a:focus-visible {
|
|
448
|
+
outline: 3px solid var(--cyan);
|
|
449
|
+
outline-offset: 2px;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.result {
|
|
453
|
+
min-height: 88px;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
footer {
|
|
457
|
+
display: flex;
|
|
458
|
+
justify-content: space-between;
|
|
459
|
+
gap: 16px;
|
|
460
|
+
padding-top: 14px;
|
|
461
|
+
border-top: 1px solid var(--line);
|
|
462
|
+
color: var(--muted);
|
|
463
|
+
font-family: ui-monospace, "Cascadia Mono", monospace;
|
|
464
|
+
font-size: 10px;
|
|
465
|
+
letter-spacing: 0.06em;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.modal-backdrop {
|
|
469
|
+
position: fixed;
|
|
470
|
+
inset: 0;
|
|
471
|
+
z-index: 20;
|
|
472
|
+
display: grid;
|
|
473
|
+
place-items: center;
|
|
474
|
+
padding: 24px;
|
|
475
|
+
background: rgba(21, 24, 39, 0.52);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.modal-backdrop[hidden] {
|
|
479
|
+
display: none;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.modal {
|
|
483
|
+
width: min(460px, 100%);
|
|
484
|
+
padding: 24px;
|
|
485
|
+
border: 1px solid var(--line);
|
|
486
|
+
border-radius: 8px;
|
|
487
|
+
background: var(--paper);
|
|
488
|
+
box-shadow: 0 24px 80px rgba(21, 24, 39, 0.24);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.modal h2 {
|
|
492
|
+
margin: 10px 0 0;
|
|
493
|
+
font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
|
|
494
|
+
font-size: 30px;
|
|
495
|
+
font-weight: 500;
|
|
496
|
+
line-height: 1;
|
|
497
|
+
letter-spacing: -1.3px;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.modal-copy {
|
|
501
|
+
margin: 14px 0 10px;
|
|
502
|
+
color: var(--muted);
|
|
503
|
+
font-size: 14px;
|
|
504
|
+
line-height: 1.5;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.modal-url {
|
|
508
|
+
display: block;
|
|
509
|
+
padding: 10px 12px;
|
|
510
|
+
border: 1px solid var(--line);
|
|
511
|
+
border-radius: 4px;
|
|
512
|
+
background: var(--soft);
|
|
513
|
+
color: var(--ink);
|
|
514
|
+
font-size: 11px;
|
|
515
|
+
overflow-wrap: anywhere;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.modal-actions {
|
|
519
|
+
display: flex;
|
|
520
|
+
justify-content: flex-end;
|
|
521
|
+
margin-top: 18px;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
@media (max-width: 860px) {
|
|
525
|
+
main {
|
|
526
|
+
grid-template-columns: 1fr;
|
|
527
|
+
gap: 28px;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Avelra contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
const statusEl = document.getElementById("status");
|
|
2
|
+
const healthApp = document.getElementById("health-app");
|
|
3
|
+
const healthMeta = document.getElementById("health-meta");
|
|
4
|
+
const healthChecks = document.getElementById("health-checks");
|
|
5
|
+
const healthUptime = document.getElementById("health-uptime");
|
|
6
|
+
const healthRefresh = document.getElementById("health-refresh");
|
|
7
|
+
const urlOpenError = document.getElementById("url-open-error");
|
|
8
|
+
const urlOpenErrorUrl = document.getElementById("url-open-error-url");
|
|
9
|
+
const urlOpenErrorClose = document.getElementById("url-open-error-close");
|
|
10
|
+
|
|
11
|
+
function formatUptime(ms) {
|
|
12
|
+
const totalSeconds = Math.max(0, Math.floor(Number(ms) / 1000));
|
|
13
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
14
|
+
const seconds = totalSeconds % 60;
|
|
15
|
+
return minutes > 0 ? `${minutes}m ${seconds}s` : `${seconds}s`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function healthStatusLabel(status) {
|
|
19
|
+
if (status === "ok") return "ok";
|
|
20
|
+
if (status === "degraded") return "degraded";
|
|
21
|
+
if (status === "failed") return "failed";
|
|
22
|
+
return "unknown";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function setHealthState(status) {
|
|
26
|
+
statusEl.textContent = healthStatusLabel(status);
|
|
27
|
+
statusEl.className = "state";
|
|
28
|
+
if (status === "ok") statusEl.classList.add("ok");
|
|
29
|
+
if (status === "degraded") statusEl.classList.add("degraded");
|
|
30
|
+
if (status === "failed") statusEl.classList.add("error");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function renderHealth(health) {
|
|
34
|
+
setHealthState(health.status);
|
|
35
|
+
healthApp.textContent = `${health.app.name} ${health.app.version}`;
|
|
36
|
+
healthMeta.textContent =
|
|
37
|
+
`Avelra ${health.runtime.version} · ${health.platform.os}/${health.platform.arch}`;
|
|
38
|
+
healthUptime.textContent = `uptime ${formatUptime(health.runtime.uptimeMs)}`;
|
|
39
|
+
healthChecks.textContent = "";
|
|
40
|
+
for (const check of health.checks) {
|
|
41
|
+
const row = document.createElement("div");
|
|
42
|
+
row.className = "health-row";
|
|
43
|
+
const id = document.createElement("span");
|
|
44
|
+
id.textContent = check.id;
|
|
45
|
+
const state = document.createElement("span");
|
|
46
|
+
state.className = `health-check ${check.status}`;
|
|
47
|
+
state.textContent = check.status;
|
|
48
|
+
row.append(id, state);
|
|
49
|
+
healthChecks.append(row);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function checkHealth() {
|
|
54
|
+
if (!window.avelra || !window.avelra.app) {
|
|
55
|
+
statusEl.textContent = "preview";
|
|
56
|
+
healthApp.textContent = "Avelra preview";
|
|
57
|
+
healthMeta.textContent = "Open this app with `avelra run`.";
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
statusEl.textContent = "checking…";
|
|
62
|
+
statusEl.className = "state";
|
|
63
|
+
healthRefresh.disabled = true;
|
|
64
|
+
try {
|
|
65
|
+
const response = await window.avelra.app.healthCheck();
|
|
66
|
+
if (!response || response.success !== true) {
|
|
67
|
+
throw new Error((response && response.error && response.error.message) ||
|
|
68
|
+
"health check failed");
|
|
69
|
+
}
|
|
70
|
+
renderHealth(response.returnValue);
|
|
71
|
+
} catch (error) {
|
|
72
|
+
setHealthState("failed");
|
|
73
|
+
healthApp.textContent = "Health check failed";
|
|
74
|
+
healthMeta.textContent = String(error);
|
|
75
|
+
} finally {
|
|
76
|
+
healthRefresh.disabled = false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function openUrl(url) {
|
|
81
|
+
const response = await window.avelra.os.openUrl(url);
|
|
82
|
+
if (!response || response.success !== true) {
|
|
83
|
+
throw new Error((response && response.error && response.error.message) ||
|
|
84
|
+
"could not open URL");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function showUrlOpenError(url) {
|
|
89
|
+
urlOpenErrorUrl.textContent = url;
|
|
90
|
+
urlOpenError.hidden = false;
|
|
91
|
+
urlOpenErrorClose.focus();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function hideUrlOpenError() {
|
|
95
|
+
urlOpenError.hidden = true;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
urlOpenErrorClose.addEventListener("click", hideUrlOpenError);
|
|
99
|
+
urlOpenError.addEventListener("click", (event) => {
|
|
100
|
+
if (event.target === urlOpenError) {
|
|
101
|
+
hideUrlOpenError();
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
document.addEventListener("keydown", (event) => {
|
|
105
|
+
if (event.key === "Escape" && !urlOpenError.hidden) {
|
|
106
|
+
hideUrlOpenError();
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
for (const link of document.querySelectorAll("a[data-open-url]")) {
|
|
111
|
+
link.addEventListener("click", async (event) => {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
try {
|
|
114
|
+
await openUrl(link.href);
|
|
115
|
+
} catch (error) {
|
|
116
|
+
showUrlOpenError(link.href);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function reportReady() {
|
|
122
|
+
if (!window.avelra || !window.avelra.app) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
126
|
+
window.avelra.app.ready().catch(() => {});
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
healthRefresh.addEventListener("click", checkHealth);
|
|
131
|
+
checkHealth().finally(reportReady);
|