@tutti-os/ui-system 0.0.38 → 0.0.40

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.
@@ -37,6 +37,12 @@
37
37
  color-scheme: light;
38
38
  }
39
39
 
40
+ @media (prefers-color-scheme: dark) {
41
+ html:not([data-theme="light"]) {
42
+ color-scheme: dark;
43
+ }
44
+ }
45
+
40
46
  body {
41
47
  margin: 0;
42
48
  min-width: 320px;
@@ -377,6 +377,183 @@
377
377
  color-mix(in srgb, var(--workbench-accent) 30%, transparent);
378
378
  }
379
379
 
380
+ @media (prefers-color-scheme: dark) {
381
+ :root:not([data-theme="light"]) {
382
+ --background: oklch(0.192 0.008 255);
383
+ --background-panel: rgb(42 42 43);
384
+ --background-fronted: rgb(51 51 51 / 1);
385
+ --background-soft: oklch(0.224 0.01 255);
386
+ --foreground: oklch(0.955 0.004 84);
387
+ --text-primary: rgb(255 255 255);
388
+ --text-primary-hover: rgb(255 255 255 / 90%);
389
+ --text-tertiary: rgb(255 255 255 / 50%);
390
+ --text-placeholder: rgb(255 255 255 / 30%);
391
+ --text-inverted: rgb(60 60 60);
392
+ --white-stationary: rgb(255 255 255);
393
+ --black-stationary: rgb(0 0 0);
394
+ --toast-neutral-bg: var(--white-stationary);
395
+ --toast-neutral-fg: var(--black-stationary);
396
+ --toast-neutral-border: rgb(0 0 0 / 10%);
397
+ --toast-shadow-color: rgb(0 0 0 / 24%);
398
+
399
+ --card: oklch(0.252 0.01 255 / 88%);
400
+ --card-foreground: var(--foreground);
401
+ --popover: oklch(0.264 0.01 255 / 95%);
402
+ --popover-foreground: var(--foreground);
403
+
404
+ --primary: oklch(0.714 0.086 248);
405
+ --primary-foreground: oklch(0.208 0.012 255);
406
+ --secondary: oklch(0.292 0.009 255);
407
+ --secondary-foreground: var(--foreground);
408
+ --muted: oklch(0.282 0.008 255);
409
+ --muted-foreground: oklch(0.734 0.012 255);
410
+ --text-secondary: rgb(255 255 255 / 70%);
411
+ --text-disabled: rgb(255 255 255 / 30%);
412
+ --rich-text-mention-app: rgb(191, 90, 242);
413
+ --rich-text-mention-issue: var(--tutti-purple);
414
+ --rich-text-mention-session: rgb(74, 222, 128);
415
+ --folder: rgb(80, 175, 238);
416
+ --rich-text-folder: rgb(80, 175, 238);
417
+ --rich-text-mention-file: rgb(80, 175, 238);
418
+ --accent-codex: rgb(79 143 255);
419
+ --accent: var(--accent-codex);
420
+ --accent-codex-border: color-mix(
421
+ in srgb,
422
+ var(--accent-codex) 20%,
423
+ transparent
424
+ );
425
+ --status-running: rgb(79 143 255);
426
+ --tutti-purple: rgb(136 152 255);
427
+ --tutti-purple-bg: color-mix(
428
+ in srgb,
429
+ var(--background-fronted) 88%,
430
+ var(--tutti-purple) 12%
431
+ );
432
+ --tutti-purple-border: color-mix(
433
+ in srgb,
434
+ var(--tutti-purple) 20%,
435
+ transparent
436
+ );
437
+ --accent-claude: rgb(251 111 62);
438
+ --accent-foreground: var(--foreground);
439
+ --destructive: oklch(0.672 0.172 25);
440
+ --destructive-foreground: oklch(0.19 0.01 25);
441
+ --state-danger: rgb(244 91 91);
442
+ --state-danger-hover: color-mix(
443
+ in srgb,
444
+ var(--state-danger) 90%,
445
+ transparent
446
+ );
447
+ --state-success: rgb(74 222 128);
448
+ --state-warning: rgb(251 146 60);
449
+ --on-danger: rgb(248 113 113 / 10%);
450
+ --on-danger-hover: color-mix(
451
+ in srgb,
452
+ var(--on-danger) 82%,
453
+ var(--state-danger)
454
+ );
455
+ --border: oklch(0.352 0.012 255);
456
+ --border-1: rgb(255 255 255 / 12%);
457
+ --border-2: rgb(255 255 255 / 8%);
458
+ --line-1: var(--border-1);
459
+ --line-2: var(--border-2);
460
+ --line-focus-window: rgb(255 255 255 / 20%);
461
+ --border-focus: rgb(79 143 255 / 24%);
462
+ --input: oklch(0.318 0.011 255);
463
+ --ring: oklch(0.728 0.078 248);
464
+ --accent-bg: color-mix(
465
+ in srgb,
466
+ var(--background-fronted) 88%,
467
+ var(--accent-codex) 12%
468
+ );
469
+
470
+ --panel: oklch(0.236 0.009 255 / 92%);
471
+ --panel-foreground: var(--foreground);
472
+ --success: oklch(0.702 0.124 158);
473
+ --success-foreground: oklch(0.172 0.01 158);
474
+ --warning: oklch(0.82 0.108 86);
475
+ --warning-foreground: oklch(0.204 0.02 84);
476
+ --backdrop: rgb(0 0 0 / 60%);
477
+
478
+ --shadow-soft: 0 14px 32px rgb(0 0 0 / 24%);
479
+ --shadow-panel: 0 24px 52px rgb(0 0 0 / 34%);
480
+ --shadow-side-panel: -20px 0px 64px rgb(0 0 0 / 32%);
481
+ --shadow-elevated: rgb(0 0 0 / 50%);
482
+ --transparency-block: rgb(255 255 255 / 10%);
483
+ --transparency-hover: rgb(255 255 255 / 14%);
484
+ --transparency-active: rgb(255 255 255 / 16%);
485
+
486
+ --workbench-canvas-bg: oklch(0.172 0.008 255);
487
+ --workbench-surface-background:
488
+ linear-gradient(
489
+ 135deg,
490
+ color-mix(in srgb, var(--workbench-accent) 10%, transparent),
491
+ transparent 34%
492
+ ),
493
+ radial-gradient(
494
+ circle at 18% 12%,
495
+ color-mix(in srgb, var(--workbench-accent) 12%, transparent),
496
+ transparent 28%
497
+ ),
498
+ var(--workbench-canvas-bg);
499
+ --workbench-foreground: var(--foreground);
500
+ --workbench-muted-foreground: var(--muted-foreground);
501
+ --workbench-chrome-foreground: color-mix(
502
+ in srgb,
503
+ var(--foreground) 82%,
504
+ transparent
505
+ );
506
+ --workbench-chrome-muted: color-mix(
507
+ in srgb,
508
+ var(--foreground) 64%,
509
+ transparent
510
+ );
511
+ --workbench-chrome-hover-bg: var(--transparency-block);
512
+ --workbench-panel: oklch(0.236 0.009 255 / 90%);
513
+ --workbench-window-bg: color-mix(
514
+ in srgb,
515
+ var(--workbench-panel) 92%,
516
+ transparent
517
+ );
518
+ --workbench-node-surface: color-mix(
519
+ in srgb,
520
+ var(--workbench-window-bg) 96%,
521
+ var(--workbench-panel)
522
+ );
523
+ --workbench-window-header-bg: color-mix(
524
+ in srgb,
525
+ var(--workbench-panel) 86%,
526
+ transparent
527
+ );
528
+ --workbench-field-bg: color-mix(
529
+ in srgb,
530
+ var(--workbench-window-bg) 92%,
531
+ black
532
+ );
533
+ --workbench-window-backdrop-filter: blur(40px) saturate(1.08);
534
+ --workbench-border: rgb(255 255 255 / 12%);
535
+ --workbench-accent: var(--primary);
536
+ --workbench-focused-border: rgb(255 255 255 / 32%);
537
+ --workbench-scrim: color-mix(in srgb, var(--card) 78%, transparent);
538
+ --workbench-window-elevation: 0 14px 32px rgb(0 0 0 / 42%);
539
+ --workbench-control-hover-bg: color-mix(
540
+ in srgb,
541
+ var(--workbench-foreground) 11%,
542
+ transparent
543
+ );
544
+ --workbench-dock-shadow:
545
+ 0 18px 44px rgb(0 0 0 / 42%), 0 1px 0 rgb(255 255 255 / 10%);
546
+ --workbench-snap-guide: color-mix(in srgb, var(--primary) 18%, transparent);
547
+ --workbench-snap-guide-border: color-mix(
548
+ in srgb,
549
+ var(--workbench-accent) 72%,
550
+ transparent
551
+ );
552
+ --workbench-snap-guide-shadow: 0 0 0 1px
553
+ color-mix(in srgb, var(--workbench-accent) 30%, transparent);
554
+ }
555
+ }
556
+
380
557
  [data-workbench-wallpaper-appearance="dark"] {
381
558
  --transparency-block: rgb(255 255 255 / 12%);
382
559
  --transparency-hover: rgb(255 255 255 / 16%);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tutti-os/ui-system",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -73,12 +73,16 @@
73
73
  "ws": "^8.20.1"
74
74
  },
75
75
  "devDependencies": {
76
+ "@testing-library/jest-dom": "^6.9.1",
77
+ "@testing-library/react": "^16.3.0",
76
78
  "@types/react": "^19.1.6",
77
79
  "@types/react-dom": "^19.1.5",
78
80
  "@types/ws": "^8.18.1",
81
+ "jsdom": "^27.2.0",
79
82
  "tsx": "^4.22.3",
80
83
  "typescript": "^5.8.3",
81
84
  "vite": "^6.4.2",
85
+ "vitest": "^4.0.13",
82
86
  "@tutti-os/config-tsconfig": "0.0.0"
83
87
  },
84
88
  "peerDependencies": {
@@ -94,6 +98,7 @@
94
98
  "scripts": {
95
99
  "build": "tsup --config tsup.config.ts && node ../../../tools/scripts/copy-package-assets.mjs src/styles dist/styles src/metadata/components.json dist/metadata/components.json src/metadata/components.schema.json dist/metadata/components.schema.json",
96
100
  "dev:server": "tsx src/dev-server/server.ts",
101
+ "test": "vitest run",
97
102
  "typecheck": "node ../../../tools/scripts/run-tsgo-typecheck.mjs"
98
103
  },
99
104
  "typesVersions": {
package/ui-system.md CHANGED
@@ -244,6 +244,10 @@ host-owned caller logic.
244
244
  ## Token Rules
245
245
 
246
246
  - CSS variables are the source of truth for theme values
247
+ - Shared theme styles must support both host-managed
248
+ `html[data-theme="light" | "dark"]` and workspace-app CSS
249
+ `prefers-color-scheme`; explicit `data-theme` values should override system
250
+ preference when both are present.
247
251
  - Tailwind utilities should consume the same token layer rather than defining a parallel color system
248
252
  - prefer semantic token names such as `background`, `foreground`, `primary`, `muted`, and `destructive` over raw palette leakage in public APIs
249
253
  - keep tutti-specific token extensions additive and minimal
@@ -307,6 +311,8 @@ The current shared global `z-index` tokens are:
307
311
  Dialog backdrops that should dim or block panel surfaces beneath them.
308
312
  - `--z-dialog`
309
313
  Dialog content rendered above dialog backdrops.
314
+ - `--z-dialog-popover`
315
+ Floating controls or host-owned preview windows that must stay above dialog content and backdrop while remaining below tooltips.
310
316
  - `--z-tooltip`
311
317
  Short hover/focus guidance that should stay above panels, drawers, and their popovers so clipped text can be inspected across overlay boundaries.
312
318