@pipelex/mthds-ui 0.8.0 → 0.9.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.
@@ -2172,20 +2172,37 @@ button.stuff-viewer-local-file--button:focus-visible {
2172
2172
 
2173
2173
  /* ─── Standalone GraphViewer chrome (toolbar, theme, layout) ─────────── */
2174
2174
 
2175
- * { box-sizing: border-box; margin: 0; padding: 0; }
2175
+ * {
2176
+ box-sizing: border-box;
2177
+ margin: 0;
2178
+ padding: 0;
2179
+ }
2176
2180
 
2177
- html, body {
2181
+ html,
2182
+ body {
2178
2183
  height: 100%;
2179
2184
  overflow: hidden;
2180
- font-family: "Inter", -apple-system, sans-serif;
2185
+ font-family:
2186
+ "Inter",
2187
+ -apple-system,
2188
+ sans-serif;
2181
2189
  }
2182
2190
 
2183
2191
  /* ─── Theme system ──────────────────────────────────────────────────── */
2184
2192
 
2185
- body[data-theme="dark"], body:not([data-theme]) {
2193
+ /* `data-theme="system"` defaults to the dark palette so a host with no
2194
+ `prefers-color-scheme` support (legacy WebKit / older Electron / some
2195
+ webviews) still gets themed chrome on first paint, before — and even if —
2196
+ the JS bundle loads. This mirrors the JS side, where `detectSystemTheme()`
2197
+ also falls back to dark. The `prefers-color-scheme: light` query below flips
2198
+ it to light when the engine supports it; `prefers-color-scheme: dark` needs
2199
+ no block because it already matches this default. */
2200
+ body[data-theme="dark"],
2201
+ body[data-theme="system"],
2202
+ body:not([data-theme]) {
2186
2203
  --chrome-bg: #0d1117;
2187
2204
  --chrome-surface: #161b22;
2188
- --chrome-border: rgba(255,255,255,0.08);
2205
+ --chrome-border: rgba(255, 255, 255, 0.08);
2189
2206
  --chrome-text: #e2e8f0;
2190
2207
  --chrome-text-muted: #8b949e;
2191
2208
  background: #0a0a0f;
@@ -2195,7 +2212,7 @@ body[data-theme="dark"], body:not([data-theme]) {
2195
2212
  body[data-theme="light"] {
2196
2213
  --chrome-bg: #ffffff;
2197
2214
  --chrome-surface: #f6f8fa;
2198
- --chrome-border: rgba(0,0,0,0.1);
2215
+ --chrome-border: rgba(0, 0, 0, 0.1);
2199
2216
  --chrome-text: #1f2328;
2200
2217
  --chrome-text-muted: #656d76;
2201
2218
  background: #ffffff;
@@ -2206,7 +2223,7 @@ body[data-theme="light"] {
2206
2223
  body[data-theme="system"] {
2207
2224
  --chrome-bg: #ffffff;
2208
2225
  --chrome-surface: #f6f8fa;
2209
- --chrome-border: rgba(0,0,0,0.1);
2226
+ --chrome-border: rgba(0, 0, 0, 0.1);
2210
2227
  --chrome-text: #1f2328;
2211
2228
  --chrome-text-muted: #656d76;
2212
2229
  background: #ffffff;
@@ -2214,18 +2231,6 @@ body[data-theme="light"] {
2214
2231
  }
2215
2232
  }
2216
2233
 
2217
- @media (prefers-color-scheme: dark) {
2218
- body[data-theme="system"] {
2219
- --chrome-bg: #0d1117;
2220
- --chrome-surface: #161b22;
2221
- --chrome-border: rgba(255,255,255,0.08);
2222
- --chrome-text: #e2e8f0;
2223
- --chrome-text-muted: #8b949e;
2224
- background: #0a0a0f;
2225
- color: #e2e8f0;
2226
- }
2227
- }
2228
-
2229
2234
  /* ─── Layout ────────────────────────────────────────────────────────── */
2230
2235
 
2231
2236
  #app-container {
@@ -2253,7 +2258,9 @@ body[data-theme="light"] {
2253
2258
  z-index: 20;
2254
2259
  }
2255
2260
 
2256
- .toolbar-spacer { flex: 1; }
2261
+ .toolbar-spacer {
2262
+ flex: 1;
2263
+ }
2257
2264
 
2258
2265
  .toolbar-btn {
2259
2266
  all: unset;
@@ -2265,7 +2272,9 @@ body[data-theme="light"] {
2265
2272
  height: 28px;
2266
2273
  border-radius: 4px;
2267
2274
  color: var(--chrome-text-muted);
2268
- transition: background 0.15s, color 0.15s;
2275
+ transition:
2276
+ background 0.15s,
2277
+ color 0.15s;
2269
2278
  }
2270
2279
 
2271
2280
  .toolbar-btn:hover {
@@ -2279,8 +2288,12 @@ body[data-theme="light"] {
2279
2288
  }
2280
2289
 
2281
2290
  /* Direction toggle */
2282
- .direction-icon { display: none; }
2283
- .direction-icon.active { display: inline-flex; }
2291
+ .direction-icon {
2292
+ display: none;
2293
+ }
2294
+ .direction-icon.active {
2295
+ display: inline-flex;
2296
+ }
2284
2297
 
2285
2298
  /* Controllers toggle */
2286
2299
  .toggle-switch {
@@ -2293,7 +2306,9 @@ body[data-theme="light"] {
2293
2306
  user-select: none;
2294
2307
  }
2295
2308
 
2296
- .toggle-switch input { display: none; }
2309
+ .toggle-switch input {
2310
+ display: none;
2311
+ }
2297
2312
 
2298
2313
  .toggle-track {
2299
2314
  width: 28px;
@@ -2305,7 +2320,7 @@ body[data-theme="light"] {
2305
2320
  }
2306
2321
 
2307
2322
  .toggle-switch input:checked + .toggle-track {
2308
- background: #50FA7B44;
2323
+ background: #50fa7b44;
2309
2324
  }
2310
2325
 
2311
2326
  .toggle-knob {
@@ -2316,39 +2331,22 @@ body[data-theme="light"] {
2316
2331
  height: 12px;
2317
2332
  border-radius: 50%;
2318
2333
  background: var(--chrome-text-muted);
2319
- transition: left 0.15s, background 0.15s;
2334
+ transition:
2335
+ left 0.15s,
2336
+ background 0.15s;
2320
2337
  }
2321
2338
 
2322
2339
  .toggle-switch input:checked + .toggle-track .toggle-knob {
2323
2340
  left: 14px;
2324
- background: #50FA7B;
2341
+ background: #50fa7b;
2325
2342
  }
2326
2343
 
2327
2344
  .toggle-label {
2328
2345
  font-size: 11px;
2329
2346
  }
2330
2347
 
2331
- /* Theme toggle */
2332
- .theme-btn {
2333
- all: unset;
2334
- cursor: pointer;
2335
- display: flex;
2336
- align-items: center;
2337
- gap: 4px;
2338
- font-size: 10px;
2339
- color: var(--chrome-text-muted);
2340
- padding: 4px 8px;
2341
- border-radius: 4px;
2342
- transition: background 0.15s;
2343
- }
2344
-
2345
- .theme-btn:hover {
2346
- background: var(--chrome-border);
2347
- }
2348
-
2349
- .theme-label {
2350
- text-transform: capitalize;
2351
- }
2348
+ /* The theme toggle lives in the in-graph toolbar (library-owned tri-state);
2349
+ the standalone page no longer renders its own theme button. */
2352
2350
 
2353
2351
  /* ─── Header branding ───────────────────────────────────────────────── */
2354
2352
 
@@ -2363,7 +2361,10 @@ body[data-theme="light"] {
2363
2361
  opacity: 0.7;
2364
2362
  }
2365
2363
 
2364
+ /* `system` defaults to the dark logo (hide the light variant), matching the
2365
+ chrome default above; the `prefers-color-scheme: light` query flips it. */
2366
2366
  body[data-theme="dark"] .header-logo.light-logo,
2367
+ body[data-theme="system"] .header-logo.light-logo,
2367
2368
  body:not([data-theme]) .header-logo.light-logo {
2368
2369
  display: none;
2369
2370
  }
@@ -2385,14 +2386,40 @@ body[data-theme="light"] .header-logo.light-logo {
2385
2386
  }
2386
2387
  }
2387
2388
 
2388
- @media (prefers-color-scheme: dark) {
2389
- body[data-theme="system"] .header-logo.light-logo {
2390
- display: none;
2391
- }
2392
- }
2393
-
2394
2389
  .header-title {
2395
2390
  font-size: 12px;
2396
2391
  font-weight: 600;
2397
2392
  color: var(--chrome-text-muted);
2398
2393
  }
2394
+
2395
+ /* ─── Error screen ──────────────────────────────────────────────────── */
2396
+
2397
+ /* Shown when the embedded config or spec is malformed. Uses explicit colors
2398
+ rather than the `--chrome-*` vars so it stays legible even when the theme
2399
+ parse is the thing that failed. */
2400
+ .standalone-error {
2401
+ display: flex;
2402
+ flex-direction: column;
2403
+ gap: 8px;
2404
+ height: 100%;
2405
+ padding: 24px;
2406
+ overflow: auto;
2407
+ background: #0a0a0f;
2408
+ color: #e2e8f0;
2409
+ }
2410
+
2411
+ .standalone-error-title {
2412
+ font-size: 14px;
2413
+ font-weight: 600;
2414
+ color: #ff6b6b;
2415
+ }
2416
+
2417
+ .standalone-error-message {
2418
+ margin: 0;
2419
+ font-family: ui-monospace, "SF Mono", Menlo, monospace;
2420
+ font-size: 12px;
2421
+ line-height: 1.5;
2422
+ white-space: pre-wrap;
2423
+ word-break: break-word;
2424
+ color: #8b949e;
2425
+ }