dssoca 0.1.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.
Files changed (38) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +89 -0
  3. package/dist/components/Badge.svelte +16 -0
  4. package/dist/components/Badge.svelte.d.ts +8 -0
  5. package/dist/components/Button.svelte +16 -0
  6. package/dist/components/Button.svelte.d.ts +11 -0
  7. package/dist/components/Card.svelte +26 -0
  8. package/dist/components/Card.svelte.d.ts +10 -0
  9. package/dist/components/EmptyState.svelte +50 -0
  10. package/dist/components/EmptyState.svelte.d.ts +11 -0
  11. package/dist/components/Icon.svelte +46 -0
  12. package/dist/components/Icon.svelte.d.ts +10 -0
  13. package/dist/components/Input.svelte +53 -0
  14. package/dist/components/Input.svelte.d.ts +16 -0
  15. package/dist/components/LogStream.svelte +61 -0
  16. package/dist/components/LogStream.svelte.d.ts +14 -0
  17. package/dist/components/MetricTile.svelte +20 -0
  18. package/dist/components/MetricTile.svelte.d.ts +10 -0
  19. package/dist/components/PassocaMark.svelte +15 -0
  20. package/dist/components/PassocaMark.svelte.d.ts +7 -0
  21. package/dist/components/ServiceCard.svelte +44 -0
  22. package/dist/components/ServiceCard.svelte.d.ts +11 -0
  23. package/dist/components/Sidebar.svelte +49 -0
  24. package/dist/components/Sidebar.svelte.d.ts +20 -0
  25. package/dist/components/Sparkline.svelte +15 -0
  26. package/dist/components/Sparkline.svelte.d.ts +7 -0
  27. package/dist/components/Toaster.svelte +72 -0
  28. package/dist/components/Toaster.svelte.d.ts +18 -0
  29. package/dist/components/Topbar.svelte +60 -0
  30. package/dist/components/Topbar.svelte.d.ts +9 -0
  31. package/dist/config.d.ts +34 -0
  32. package/dist/config.js +42 -0
  33. package/dist/index.d.ts +16 -0
  34. package/dist/index.js +16 -0
  35. package/dist/theme.css +610 -0
  36. package/dist/toast.svelte.d.ts +25 -0
  37. package/dist/toast.svelte.js +32 -0
  38. package/package.json +68 -0
package/dist/theme.css ADDED
@@ -0,0 +1,610 @@
1
+ /* ============================================================
2
+ HUBSSOCA — Design System
3
+ Derived from passoca.dev — signal green on near-black.
4
+ House rule: NO ROUNDED CORNERS. Everything is squared.
5
+
6
+ Two independent axes (see DESIGN.md):
7
+ • color → [data-theme="dark" | "light"] (dark = default)
8
+ • density → [data-density="comfy" | "compact"] (comfy = default)
9
+ Set them via the config helpers in $lib/config.ts, or by hand on
10
+ any ancestor element (usually <html>).
11
+ ============================================================ */
12
+
13
+ /* ---------- web fonts (Google Fonts CDN) --------------------- */
14
+ @import url("https://fonts.googleapis.com/css2?family=Electrolize&family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400;1,700&display=swap");
15
+
16
+ /* ---------- local font fallbacks (copy fonts/ to your app's static/fonts/) */
17
+ @font-face {
18
+ font-family: "Caskaydia Cove";
19
+ font-style: normal;
20
+ font-weight: 400;
21
+ font-display: swap;
22
+ src: url("/fonts/Caskaydia-Cove.ttf") format("truetype");
23
+ }
24
+ @font-face {
25
+ font-family: "Caskaydia Cove Mono";
26
+ font-style: normal;
27
+ font-weight: 400;
28
+ font-display: swap;
29
+ src: url("/fonts/Caskaydia-Cove-Mono.ttf") format("truetype");
30
+ }
31
+
32
+ /* ============================================================
33
+ AXIS 1 — COLOR THEME
34
+ ============================================================ */
35
+ :root,
36
+ [data-theme="dark"] {
37
+ /* surfaces */
38
+ --hs-bg: #100f10;
39
+ --hs-bg-elev: #1e1e1e;
40
+ --hs-bg-inset: rgba(7, 6, 7, 0);
41
+ --hs-line: rgba(255, 255, 255, 0.12);
42
+ --hs-line-strong: rgba(255, 255, 255, 0.22);
43
+
44
+ /* foreground */
45
+ --hs-fg: #e0e0e0;
46
+ --hs-fg-shine: #ffffff;
47
+ --hs-fg-muted: #aaaaaa;
48
+ --hs-fg-faint: #6f6f6f;
49
+ --hs-fg-on-primary: #100f10;
50
+
51
+ /* brand */
52
+ --hs-primary: #66ef73;
53
+ --hs-primary-soft: rgba(102, 239, 115, 0.18);
54
+ --hs-primary-rgb: 102, 239, 115;
55
+
56
+ /* status */
57
+ --hs-red: #ff5c5c;
58
+ --hs-yellow: #e0c36a;
59
+ --hs-blue: #9aa4ff;
60
+ --hs-cyan: #66d9ef;
61
+ --hs-purple: #b98cff;
62
+
63
+ /* code */
64
+ --hs-code-bg: #011627;
65
+ --hs-code-fg: #d6deeb;
66
+ --hs-code-string: #addb67;
67
+ --hs-code-number: #f78c6c;
68
+ --hs-code-keyword: #c792ea;
69
+ --hs-code-func: #82aaff;
70
+ --hs-code-comment: #637777;
71
+
72
+ --hs-selection-bg: var(--hs-primary);
73
+ --hs-selection-fg: var(--hs-fg-on-primary);
74
+ }
75
+
76
+ [data-theme="light"] {
77
+ --hs-bg: #fefefe;
78
+ --hs-bg-elev: #ffffff;
79
+ --hs-line: rgba(0, 0, 0, 0.12);
80
+ --hs-line-strong: rgba(0, 0, 0, 0.22);
81
+ --hs-fg: #000000;
82
+ --hs-fg-shine: #000000;
83
+ --hs-fg-muted: #626262;
84
+ --hs-fg-faint: #888888;
85
+ --hs-fg-on-primary: #100f10;
86
+ }
87
+
88
+ /* ---------- type + radii + motion (density-independent) ------ */
89
+ :root {
90
+ --hs-font-display: "Electrolize", "Space Grotesk", "Inter", system-ui, sans-serif;
91
+ --hs-font-subhead: "Electrolize", "Space Grotesk", "Inter", system-ui, sans-serif;
92
+ --hs-font-body: "JetBrains Mono", "Caskaydia Cove", ui-monospace, "SF Mono", Menlo, monospace;
93
+ --hs-font-alt: "Electrolize", "Inter", system-ui, sans-serif;
94
+ --hs-font-mono: "JetBrains Mono", "Caskaydia Cove Mono", ui-monospace, "SF Mono", Menlo, monospace;
95
+
96
+ --hs-size-display: clamp(36px, 8vw, 54px);
97
+ --hs-size-h1: 32px;
98
+ --hs-size-h2: 24px;
99
+ --hs-size-h3: 20px;
100
+ --hs-size-body: 16px;
101
+ --hs-size-sm: 14px;
102
+ --hs-size-xs: 12px;
103
+
104
+ --hs-s-1: 4px;
105
+ --hs-s-2: 8px;
106
+ --hs-s-3: 12px;
107
+ --hs-s-4: 16px;
108
+ --hs-s-5: 20px;
109
+ --hs-s-6: 24px;
110
+ --hs-s-8: 32px;
111
+ --hs-s-10: 40px;
112
+ --hs-s-12: 48px;
113
+ --hs-s-16: 64px;
114
+
115
+ /* radii — ALL SQUARE */
116
+ --hs-radius-0: 0;
117
+ --hs-radius-1: 0;
118
+ --hs-radius-2: 0;
119
+ --hs-radius-pill: 0;
120
+
121
+ /* elevation */
122
+ --hs-shadow-0: none;
123
+ --hs-shadow-1: 0 0 0 1px var(--hs-line);
124
+ --hs-shadow-2: 0 1px 0 0 rgba(0, 0, 0, 0.4), 0 0 0 1px var(--hs-line);
125
+ --hs-shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.35);
126
+ --hs-shadow-glow: 0 0 24px rgba(var(--hs-primary-rgb), 0.35);
127
+
128
+ /* motion */
129
+ --hs-ease: cubic-bezier(0.215, 0.61, 0.355, 1);
130
+ --hs-dur-fast: 150ms;
131
+ --hs-dur: 250ms;
132
+ --hs-dur-slow: 350ms;
133
+ --hs-dur-xslow: 650ms;
134
+ }
135
+
136
+ /* ============================================================
137
+ AXIS 2 — DENSITY
138
+ comfy = roomy, general-purpose default (other projects)
139
+ compact = dense control-room layout (the hub opts in)
140
+ Every density-sensitive value below is a token so a single
141
+ data-density flip rescales the whole chrome.
142
+ ============================================================ */
143
+ :root,
144
+ [data-density="comfy"] {
145
+ --hs-leading: 1.5;
146
+
147
+ --hs-ui-xs: 11px; /* micro uppercase labels */
148
+ --hs-ui-sm: 12px; /* secondary chrome text */
149
+ --hs-ui-md: 13px; /* primary chrome text */
150
+ --hs-ui-lg: 15px; /* names / logo */
151
+
152
+ --hs-control-font: 14px;
153
+ --hs-control-py: 9px;
154
+ --hs-control-px: 16px;
155
+
156
+ --hs-input-font: 15px;
157
+ --hs-input-py: 13px;
158
+ --hs-input-px: 16px;
159
+
160
+ --hs-panel-head-py: 12px;
161
+ --hs-panel-head-px: 18px;
162
+ --hs-panel-body-py: 18px;
163
+ --hs-panel-body-px: 18px;
164
+
165
+ --hs-card-py: 16px;
166
+ --hs-card-px: 18px;
167
+ --hs-metric-val: 32px;
168
+
169
+ --hs-row-py: 9px;
170
+ --hs-row-px: 14px;
171
+
172
+ --hs-badge-py: 5px;
173
+ --hs-badge-px: 12px;
174
+
175
+ --hs-gap: 14px;
176
+ --hs-gap-sm: 10px;
177
+ --hs-block-gap: 28px;
178
+
179
+ --hs-shell-side-w: 220px;
180
+ --hs-shell-top-h: 48px;
181
+ --hs-main-py: 28px;
182
+ --hs-main-px: 36px;
183
+ }
184
+
185
+ [data-density="compact"] {
186
+ --hs-leading: 1.3;
187
+
188
+ --hs-ui-xs: 9.5px;
189
+ --hs-ui-sm: 10.5px;
190
+ --hs-ui-md: 11.5px;
191
+ --hs-ui-lg: 13px;
192
+
193
+ --hs-control-font: 12px;
194
+ --hs-control-py: 5px;
195
+ --hs-control-px: 9px;
196
+
197
+ --hs-input-font: 14px;
198
+ --hs-input-py: 10px;
199
+ --hs-input-px: 12px;
200
+
201
+ --hs-panel-head-py: 7px;
202
+ --hs-panel-head-px: 12px;
203
+ --hs-panel-body-py: 10px;
204
+ --hs-panel-body-px: 12px;
205
+
206
+ --hs-card-py: 10px;
207
+ --hs-card-px: 12px;
208
+ --hs-metric-val: 26px;
209
+
210
+ --hs-row-py: 5px;
211
+ --hs-row-px: 10px;
212
+
213
+ --hs-badge-py: 3px;
214
+ --hs-badge-px: 8px;
215
+
216
+ --hs-gap: 8px;
217
+ --hs-gap-sm: 6px;
218
+ --hs-block-gap: 16px;
219
+
220
+ --hs-shell-side-w: 180px;
221
+ --hs-shell-top-h: 36px;
222
+ --hs-main-py: 16px;
223
+ --hs-main-px: 20px;
224
+ }
225
+
226
+ /* ---------- base element styles ------------------------------ */
227
+ html {
228
+ font-family: var(--hs-font-body);
229
+ font-size: clamp(16px, 1vw + 12px, 20px);
230
+ line-height: var(--hs-leading);
231
+ color: var(--hs-fg);
232
+ background: var(--hs-bg);
233
+ -moz-osx-font-smoothing: grayscale;
234
+ -webkit-font-smoothing: antialiased;
235
+ }
236
+
237
+ *, *::before, *::after { box-sizing: border-box; }
238
+
239
+ ::selection { background: var(--hs-selection-bg); color: var(--hs-selection-fg); }
240
+
241
+ .hs-display, h1.hs-display {
242
+ font-family: var(--hs-font-display);
243
+ font-style: normal;
244
+ font-weight: 400;
245
+ font-size: var(--hs-size-display);
246
+ line-height: 1.05;
247
+ letter-spacing: -0.015em;
248
+ color: var(--hs-fg);
249
+ margin: 0 0 var(--hs-s-4) 0;
250
+ text-shadow: 3px 3px var(--hs-bg);
251
+ position: relative;
252
+ z-index: 0;
253
+ }
254
+ .hs-display > span { position: relative; }
255
+ .hs-display > span::before {
256
+ content: "";
257
+ position: absolute;
258
+ left: -2%; right: -8%; top: 70%; height: 20%;
259
+ background: var(--hs-primary);
260
+ opacity: 0.9;
261
+ z-index: -1;
262
+ }
263
+
264
+ h1, .hs-h1 {
265
+ font-family: var(--hs-font-subhead);
266
+ font-weight: 400;
267
+ font-size: var(--hs-size-h1);
268
+ line-height: 1.15;
269
+ letter-spacing: 0.01em;
270
+ margin: 0 0 var(--hs-s-3) 0;
271
+ color: var(--hs-fg);
272
+ }
273
+ h2, .hs-h2 {
274
+ font-family: var(--hs-font-subhead);
275
+ font-weight: 400;
276
+ font-size: var(--hs-size-h2);
277
+ line-height: 32px;
278
+ letter-spacing: 0.01em;
279
+ margin: 0 0 var(--hs-s-2) 0;
280
+ color: var(--hs-fg);
281
+ }
282
+ h3, .hs-h3 {
283
+ font-family: var(--hs-font-subhead);
284
+ font-weight: 400;
285
+ font-size: var(--hs-size-h3);
286
+ line-height: 28px;
287
+ letter-spacing: 0.01em;
288
+ margin: 0 0 var(--hs-s-2) 0;
289
+ color: var(--hs-fg);
290
+ }
291
+ p, .hs-p {
292
+ font-family: var(--hs-font-body);
293
+ font-size: var(--hs-size-body);
294
+ line-height: calc(var(--hs-size-body) * var(--hs-leading));
295
+ color: var(--hs-fg);
296
+ margin: 0 0 var(--hs-s-3) 0;
297
+ }
298
+ small, .hs-sm {
299
+ font-size: var(--hs-size-sm);
300
+ line-height: 20px;
301
+ color: var(--hs-fg-muted);
302
+ }
303
+ .hs-caption {
304
+ font-family: var(--hs-font-mono);
305
+ text-transform: lowercase;
306
+ font-size: var(--hs-size-xs);
307
+ letter-spacing: 0.04em;
308
+ color: var(--hs-fg-faint);
309
+ }
310
+
311
+ a, .hs-link {
312
+ color: inherit;
313
+ text-decoration: none;
314
+ position: relative;
315
+ font-weight: 600;
316
+ transition: color var(--hs-dur) var(--hs-ease);
317
+ }
318
+ a::before, .hs-link::before {
319
+ content: "";
320
+ position: absolute;
321
+ left: 0; bottom: -1px;
322
+ width: 100%; height: 1px;
323
+ background: var(--hs-primary);
324
+ transition: height var(--hs-dur) var(--hs-ease);
325
+ }
326
+ a:hover::before, .hs-link:hover::before { height: 2px; }
327
+ a.hs-no-underline::before, .hs-no-underline::before { display: none; }
328
+
329
+ code, kbd, .hs-mono {
330
+ font-family: var(--hs-font-mono);
331
+ font-size: 0.92em;
332
+ color: var(--hs-code-fg);
333
+ background: rgba(255, 255, 255, 0.06);
334
+ padding: 0.1em 0.35em;
335
+ }
336
+ pre {
337
+ font-family: var(--hs-font-mono);
338
+ background: var(--hs-code-bg);
339
+ color: var(--hs-code-fg);
340
+ padding: var(--hs-s-4);
341
+ overflow: auto;
342
+ line-height: 1.45;
343
+ font-size: var(--hs-size-sm);
344
+ }
345
+
346
+ ::-webkit-scrollbar { width: 3px; height: 3px; }
347
+ ::-webkit-scrollbar-track { background: var(--hs-bg); }
348
+ ::-webkit-scrollbar-thumb {
349
+ background: linear-gradient(24deg, var(--hs-bg) 0%, var(--hs-primary) 50%, var(--hs-bg) 100%);
350
+ }
351
+
352
+ :where(button, a, input, textarea, [tabindex]):focus-visible {
353
+ outline: 2px solid var(--hs-primary);
354
+ outline-offset: 2px;
355
+ }
356
+
357
+ /* ---------- hub shell ---------------------------------------- */
358
+ .hub-app {
359
+ display: grid;
360
+ grid-template-columns: var(--hs-shell-side-w) 1fr;
361
+ grid-template-rows: var(--hs-shell-top-h) 1fr;
362
+ min-height: 100vh;
363
+ }
364
+
365
+ /* ---------- topbar ------------------------------------------- */
366
+ .hub-topbar {
367
+ grid-column: 1 / -1;
368
+ display: flex; align-items: stretch;
369
+ background: var(--hs-bg);
370
+ border-bottom: 1px solid var(--hs-line);
371
+ font-family: var(--hs-font-mono);
372
+ font-size: var(--hs-ui-md);
373
+ color: var(--hs-fg-muted);
374
+ user-select: none;
375
+ position: sticky; top: 0; z-index: 10;
376
+ }
377
+ .hub-topbar .seg {
378
+ display: flex; align-items: center; gap: 8px;
379
+ padding: 0 var(--hs-panel-head-px);
380
+ border-right: 1px solid var(--hs-line);
381
+ cursor: default;
382
+ }
383
+ .hub-topbar .seg.right { border-right: none; border-left: 1px solid var(--hs-line); }
384
+ .hub-topbar .seg.click { cursor: pointer; }
385
+ .hub-topbar .seg.click:hover { background: rgba(255,255,255,.03); color: var(--hs-fg); }
386
+ .hub-topbar .logo { color: var(--hs-fg); }
387
+ .hub-topbar .logo .nm { font-family: var(--hs-font-display); font-size: var(--hs-ui-lg); letter-spacing: 0.02em; line-height: 1; }
388
+ .hub-topbar .ws { display: flex; align-items: stretch; }
389
+ .hub-topbar .ws .tab {
390
+ display: flex; align-items: center;
391
+ padding: 0 var(--hs-row-px);
392
+ color: var(--hs-fg-faint);
393
+ border-right: 1px solid var(--hs-line);
394
+ cursor: pointer;
395
+ font: 500 var(--hs-ui-md) var(--hs-font-mono);
396
+ background: transparent; border-top: 0; border-bottom: 0; border-left: 0;
397
+ transition: all var(--hs-dur-fast) var(--hs-ease);
398
+ }
399
+ .hub-topbar .ws .tab:hover { color: var(--hs-fg); background: rgba(255,255,255,.03); }
400
+ .hub-topbar .ws .tab .n { color: var(--hs-fg-faint); margin-right: 6px; }
401
+ .hub-topbar .ws .tab.active { color: var(--hs-fg); background: rgba(102,239,115,.06); box-shadow: inset 0 -2px 0 var(--hs-primary); }
402
+ .hub-topbar .ws .tab.active .n { color: var(--hs-primary); }
403
+ .hub-topbar .grow { flex: 1; }
404
+ .hub-topbar .dot { width: 6px; height: 6px; background: var(--hs-primary); display: inline-block; }
405
+ .hub-topbar .stat { font-variant-numeric: tabular-nums; }
406
+ .hub-topbar .stat .k { color: var(--hs-fg-faint); margin-right: 4px; }
407
+ .hub-topbar .stat .v { color: var(--hs-fg); }
408
+ .hub-topbar .clock { color: var(--hs-fg); font-variant-numeric: tabular-nums; }
409
+ .hub-topbar .clock .sep { color: var(--hs-fg-faint); margin: 0 2px; }
410
+ .hub-topbar .kbd { font-family: var(--hs-font-mono); font-size: var(--hs-ui-sm); color: var(--hs-fg-muted); border: 1px solid var(--hs-line); padding: 2px 5px; line-height: 1; }
411
+
412
+ /* ---------- sidebar ------------------------------------------ */
413
+ .hub-side {
414
+ border-right: 1px solid var(--hs-line);
415
+ padding: var(--hs-gap) var(--hs-s-1);
416
+ display: flex; flex-direction: column; gap: 1px;
417
+ background: var(--hs-bg);
418
+ }
419
+ .hub-side .section {
420
+ font-family: var(--hs-font-mono); font-size: var(--hs-ui-xs);
421
+ color: var(--hs-fg-faint); text-transform: uppercase; letter-spacing: 0.12em;
422
+ padding: var(--hs-row-px) var(--hs-row-px) var(--hs-s-1);
423
+ }
424
+ .hub-side .item {
425
+ display: flex; align-items: center; gap: 8px;
426
+ padding: var(--hs-row-py) var(--hs-row-px); cursor: pointer; color: var(--hs-fg-muted);
427
+ font: 500 var(--hs-ui-md) var(--hs-font-mono);
428
+ border-left: 2px solid transparent;
429
+ transition: all var(--hs-dur-fast) var(--hs-ease);
430
+ }
431
+ .hub-side .item:hover { color: var(--hs-fg); background: rgba(255,255,255,.03); }
432
+ .hub-side .item.active { color: var(--hs-fg); background: rgba(102,239,115,.06); border-left-color: var(--hs-primary); }
433
+ .hub-side .item .dot { width: 5px; height: 5px; margin-left: auto; background: var(--hs-primary); }
434
+ .hub-side .item .dot.warn { background: var(--hs-yellow); }
435
+ .hub-side .item .dot.err { background: var(--hs-red); }
436
+
437
+ /* ---------- main content area -------------------------------- */
438
+ .hub-main { padding: var(--hs-main-py) var(--hs-main-px) 60px; overflow: auto; }
439
+ .hub-pageHead {
440
+ display: flex; align-items: flex-end; justify-content: space-between;
441
+ margin-bottom: var(--hs-block-gap); gap: 24px;
442
+ }
443
+ .hub-pageHead h1 {
444
+ font-family: var(--hs-font-display);
445
+ font-weight: 400;
446
+ font-size: 32px; line-height: 1; margin: 0;
447
+ letter-spacing: -0.015em;
448
+ text-shadow: 3px 3px var(--hs-bg);
449
+ }
450
+ .hub-pageHead h1 .accent { position: relative; }
451
+ .hub-pageHead h1 .accent::before {
452
+ content: ""; position: absolute; left: -2%; right: -6%; top: 70%; height: 22%;
453
+ background: var(--hs-primary); opacity: 0.9; z-index: -1;
454
+ }
455
+ .hub-pageHead .sub { color: var(--hs-fg-muted); font-size: var(--hs-ui-md); margin-top: 6px; font-family: var(--hs-font-mono); }
456
+
457
+ /* ---------- metric tiles ------------------------------------- */
458
+ .hub-metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--hs-gap); margin-bottom: var(--hs-block-gap); }
459
+ .hub-metric {
460
+ padding: var(--hs-card-py) var(--hs-card-px);
461
+ border: 1px solid var(--hs-line);
462
+ background: var(--hs-bg-elev);
463
+ display: flex; flex-direction: column; gap: 4px;
464
+ }
465
+ .hub-metric .label { font-family: var(--hs-font-mono); font-size: var(--hs-ui-xs); color: var(--hs-fg-faint); text-transform: lowercase; letter-spacing: 0.04em; }
466
+ .hub-metric .val { font-family: var(--hs-font-display); font-weight: 400; font-size: var(--hs-metric-val); line-height: 1; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
467
+ .hub-metric .val .small { font-size: .5em; opacity: .5; }
468
+ .hub-metric .delta { font-family: var(--hs-font-mono); font-size: var(--hs-ui-xs); }
469
+ .hub-metric .delta.up { color: var(--hs-primary); }
470
+ .hub-metric .delta.down { color: var(--hs-red); }
471
+
472
+ /* ---------- panels ------------------------------------------- */
473
+ .hub-grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--hs-gap); margin-bottom: var(--hs-gap); }
474
+ .hub-panel { border: 1px solid var(--hs-line); background: var(--hs-bg-elev); }
475
+ .hub-panel-head {
476
+ padding: var(--hs-panel-head-py) var(--hs-panel-head-px);
477
+ border-bottom: 1px solid var(--hs-line);
478
+ display: flex; align-items: center; justify-content: space-between;
479
+ font-family: var(--hs-font-mono); font-size: var(--hs-ui-sm);
480
+ color: var(--hs-fg-faint); text-transform: uppercase; letter-spacing: 0.06em;
481
+ }
482
+ .hub-panel-head .title { color: var(--hs-fg); letter-spacing: 0.06em; }
483
+ .hub-panel-head .meta { color: var(--hs-fg-faint); text-transform: lowercase; letter-spacing: 0.04em; }
484
+ .hub-panel-body { padding: var(--hs-panel-body-py) var(--hs-panel-body-px); }
485
+
486
+ /* ---------- service card ------------------------------------- */
487
+ .hub-svc {
488
+ display: grid; grid-template-columns: 1fr auto;
489
+ gap: var(--hs-gap); padding: var(--hs-card-py) var(--hs-card-px);
490
+ border: 1px solid var(--hs-line);
491
+ background: var(--hs-bg-elev);
492
+ cursor: pointer;
493
+ transition: all var(--hs-dur-fast) var(--hs-ease);
494
+ }
495
+ .hub-svc:hover { border-color: var(--hs-line-strong); background: #232323; }
496
+ .hub-svc .head { display: flex; align-items: center; gap: 10px; }
497
+ .hub-svc .head .name { font-family: var(--hs-font-display); font-size: var(--hs-ui-lg); letter-spacing: -0.005em; }
498
+ .hub-svc .head .host { font-family: var(--hs-font-mono); font-size: var(--hs-ui-sm); color: var(--hs-fg-muted); }
499
+ .hub-svc .status { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
500
+ .hub-svc .footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
501
+ .hub-svc .latency { font-family: var(--hs-font-mono); font-size: var(--hs-ui-sm); color: var(--hs-fg-muted); }
502
+ .hub-svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hs-gap-sm); }
503
+
504
+ /* ---------- sparkline ---------------------------------------- */
505
+ .hub-spark { display: flex; align-items: flex-end; gap: 1px; height: 18px; }
506
+ .hub-spark i { width: 3px; background: var(--hs-primary); opacity: .85; }
507
+
508
+ /* ---------- badge -------------------------------------------- */
509
+ .hub-badge {
510
+ font-family: var(--hs-font-mono); font-size: var(--hs-ui-xs);
511
+ padding: var(--hs-badge-py) var(--hs-badge-px); letter-spacing: 0.05em;
512
+ display: inline-flex; align-items: center; gap: 6px; text-transform: lowercase;
513
+ border: 1px solid var(--hs-line);
514
+ }
515
+ .hub-badge.up { background: rgba(102,239,115,.12); color: var(--hs-primary); border-color: rgba(102,239,115,.4); }
516
+ .hub-badge.deg { background: rgba(224,195,106,.12); color: var(--hs-yellow); border-color: rgba(224,195,106,.4); }
517
+ .hub-badge.down { background: rgba(255,92,92,.12); color: var(--hs-red); border-color: rgba(255,92,92,.4); }
518
+ .hub-badge.info { background: rgba(102,217,239,.12); color: var(--hs-cyan); border-color: rgba(102,217,239,.4); }
519
+ .hub-badge .dot { width: 5px; height: 5px; background: currentColor; }
520
+
521
+ /* ---------- button ------------------------------------------- */
522
+ .hub-btn {
523
+ font-family: var(--hs-font-body); font-size: var(--hs-control-font); line-height: 1; font-weight: 500;
524
+ padding: var(--hs-control-py) var(--hs-control-px);
525
+ border: 1px solid var(--hs-line);
526
+ background: transparent; color: var(--hs-fg);
527
+ cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
528
+ transition: all var(--hs-dur-fast) var(--hs-ease);
529
+ }
530
+ .hub-btn:hover { background: rgba(255,255,255,.04); border-color: var(--hs-line-strong); }
531
+ .hub-btn.primary { background: var(--hs-primary); color: var(--hs-fg-on-primary); border-color: var(--hs-primary); font-weight: 600; }
532
+ .hub-btn.primary:hover { background: #7df089; box-shadow: var(--hs-shadow-glow); }
533
+ .hub-btn.ghost { border-color: transparent; color: var(--hs-fg-muted); padding: var(--hs-control-py) var(--hs-gap-sm); }
534
+ .hub-btn.ghost:hover { color: var(--hs-fg); background: rgba(255,255,255,.04); border-color: transparent; }
535
+
536
+ /* ---------- input -------------------------------------------- */
537
+ .hub-input {
538
+ font-family: var(--hs-font-body); font-size: var(--hs-input-font);
539
+ background: transparent; color: var(--hs-fg);
540
+ border: 1px solid var(--hs-line); padding: var(--hs-input-py) var(--hs-input-px);
541
+ width: 100%; transition: all .2s var(--hs-ease);
542
+ }
543
+ .hub-input:focus { outline: none; border-color: var(--hs-primary); box-shadow: 0 0 0 3px var(--hs-primary-soft); }
544
+ .hub-input::placeholder { font-style: italic; color: var(--hs-fg-faint); }
545
+ .hub-field { display: flex; flex-direction: column; gap: 6px; }
546
+ .hub-field .lbl { font-family: var(--hs-font-mono); font-size: var(--hs-ui-xs); color: var(--hs-fg-muted); text-transform: uppercase; letter-spacing: 0.08em; }
547
+
548
+ /* ---------- log viewer --------------------------------------- */
549
+ .hub-logs {
550
+ font-family: var(--hs-font-mono); font-size: var(--hs-ui-md);
551
+ background: #0a0a0a; color: var(--hs-code-fg);
552
+ padding: var(--hs-gap) var(--hs-panel-body-px);
553
+ min-height: 160px; max-height: 240px; overflow: auto;
554
+ }
555
+ .hub-logs .ln { display: flex; gap: 10px; line-height: 1.45; }
556
+ .hub-logs .t { color: var(--hs-fg-faint); min-width: 58px; }
557
+ .hub-logs .lvl { min-width: 38px; }
558
+ .hub-logs .lvl.info { color: var(--hs-cyan); }
559
+ .hub-logs .lvl.warn { color: var(--hs-yellow); }
560
+ .hub-logs .lvl.err { color: var(--hs-red); }
561
+ .hub-logs .lvl.ok { color: var(--hs-primary); }
562
+ .hub-logs .svc { color: var(--hs-purple); }
563
+
564
+ /* ---------- login screen ------------------------------------- */
565
+ .hub-login {
566
+ min-height: 100vh; display: flex; align-items: center; justify-content: center;
567
+ background: var(--hs-bg);
568
+ position: relative; overflow: hidden;
569
+ }
570
+ .hub-login::before {
571
+ content: "";
572
+ position: absolute; inset: 0;
573
+ background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px);
574
+ pointer-events: none;
575
+ }
576
+ .hub-login-card {
577
+ width: 380px; padding: var(--hs-s-8);
578
+ border: 1px solid var(--hs-line); background: var(--hs-bg-elev);
579
+ display: flex; flex-direction: column; gap: 18px;
580
+ position: relative; z-index: 1;
581
+ }
582
+ .hub-login-card .mark { display: flex; align-items: center; gap: 10px; }
583
+ .hub-login-card .mark .wm { font-family: var(--hs-font-display); font-weight: 400; font-size: 28px; line-height: 1; letter-spacing: 0.01em; }
584
+ .hub-login-card .h { font-family: var(--hs-font-subhead); font-size: 20px; }
585
+ .hub-login-card .sub { color: var(--hs-fg-muted); font-size: 13px; margin-top: -10px; }
586
+ .hub-login-card .footer { font-family: var(--hs-font-mono); font-size: 10px; color: var(--hs-fg-faint); text-align: center; margin-top: 6px; }
587
+
588
+ /* ---------- table -------------------------------------------- */
589
+ .hub-table { width: 100%; border-collapse: collapse; }
590
+ .hub-table th, .hub-table td {
591
+ text-align: left; padding: var(--hs-row-py) var(--hs-row-px);
592
+ font-size: var(--hs-ui-md);
593
+ border-bottom: 1px solid var(--hs-line);
594
+ font-family: var(--hs-font-mono);
595
+ }
596
+ .hub-table th {
597
+ font-size: var(--hs-ui-xs); color: var(--hs-fg-faint);
598
+ text-transform: uppercase; letter-spacing: 0.1em; font-weight: 400;
599
+ padding: var(--hs-row-py) var(--hs-row-px);
600
+ }
601
+ .hub-table tr:hover td { background: rgba(255,255,255,.03); }
602
+ .hub-table .mono { color: var(--hs-fg-muted); }
603
+
604
+ /* ---------- footer ------------------------------------------- */
605
+ .hub-footer {
606
+ margin-top: var(--hs-s-3); padding-top: var(--hs-s-2);
607
+ border-top: 1px solid var(--hs-line);
608
+ display: flex; justify-content: space-between;
609
+ font-family: var(--hs-font-mono); font-size: var(--hs-ui-sm); color: var(--hs-fg-faint);
610
+ }
@@ -0,0 +1,25 @@
1
+ export type ToastKind = 'success' | 'error' | 'info';
2
+ export interface Toast {
3
+ id: number;
4
+ kind: ToastKind;
5
+ message: string;
6
+ }
7
+ /**
8
+ * Module-singleton toast store (Svelte 5 runes). One instance is shared by
9
+ * every consumer of the package, so `toast.success(...)` from anywhere shows
10
+ * in the single <Toaster /> mounted at the app root.
11
+ */
12
+ declare class ToastStore {
13
+ #private;
14
+ items: Toast[];
15
+ push(kind: ToastKind, message: string, timeout?: number): number;
16
+ dismiss(id: number): void;
17
+ clear(): void;
18
+ }
19
+ export declare const toasts: ToastStore;
20
+ export declare const toast: {
21
+ success: (message: string, timeout?: number) => number;
22
+ error: (message: string, timeout?: number) => number;
23
+ info: (message: string, timeout?: number) => number;
24
+ };
25
+ export {};
@@ -0,0 +1,32 @@
1
+ const DEFAULT_TIMEOUT = 4000;
2
+ /**
3
+ * Module-singleton toast store (Svelte 5 runes). One instance is shared by
4
+ * every consumer of the package, so `toast.success(...)` from anywhere shows
5
+ * in the single <Toaster /> mounted at the app root.
6
+ */
7
+ class ToastStore {
8
+ items = $state([]);
9
+ #seq = 0;
10
+ push(kind, message, timeout = DEFAULT_TIMEOUT) {
11
+ const id = ++this.#seq;
12
+ this.items.push({ id, kind, message });
13
+ if (timeout > 0 && typeof window !== 'undefined') {
14
+ setTimeout(() => this.dismiss(id), timeout);
15
+ }
16
+ return id;
17
+ }
18
+ dismiss(id) {
19
+ const i = this.items.findIndex((t) => t.id === id);
20
+ if (i !== -1)
21
+ this.items.splice(i, 1);
22
+ }
23
+ clear() {
24
+ this.items = [];
25
+ }
26
+ }
27
+ export const toasts = new ToastStore();
28
+ export const toast = {
29
+ success: (message, timeout) => toasts.push('success', message, timeout),
30
+ error: (message, timeout) => toasts.push('error', message, timeout),
31
+ info: (message, timeout) => toasts.push('info', message, timeout)
32
+ };