babavoss 0.0.1 → 0.12.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 (158) hide show
  1. package/NOTICE +7 -0
  2. package/bin/voss.ts +48 -0
  3. package/gui/babavoss-web.js +234 -0
  4. package/gui/chunk-5hpp1ypv.js +11710 -0
  5. package/gui/chunk-9rq662fd.js +8627 -0
  6. package/gui/chunk-k3cm8j6r.js +433 -0
  7. package/gui/chunk-pk09y98y.js +50 -0
  8. package/gui/chunk-smz02qa6.js +186 -0
  9. package/gui/chunk-wwqypxre.js +49 -0
  10. package/gui/gui.js +2015 -0
  11. package/gui/react-compiler-runtime.js +39 -0
  12. package/gui/react-dom-client.js +21 -0
  13. package/gui/react-dom.js +44 -0
  14. package/gui/react-jsx-runtime.js +19 -0
  15. package/gui/react.js +105 -0
  16. package/gui/theme.css +3053 -0
  17. package/index.ts +15 -0
  18. package/package.json +50 -4
  19. package/src/baba/check.ts +90 -0
  20. package/src/baba/config.ts +261 -0
  21. package/src/baba/find.ts +12 -0
  22. package/src/baba/init.ts +176 -0
  23. package/src/baba/node.ts +483 -0
  24. package/src/baba/project.ts +63 -0
  25. package/src/baba/registry.ts +35 -0
  26. package/src/baba/worker.ts +55 -0
  27. package/src/bench/index.ts +6 -0
  28. package/src/bench/measure.ts +132 -0
  29. package/src/bench/scenarios.ts +136 -0
  30. package/src/build/builder.ts +74 -0
  31. package/src/build/failure.ts +78 -0
  32. package/src/build/guard.ts +85 -0
  33. package/src/build/mdx-register.ts +3 -0
  34. package/src/build/mdx.ts +38 -0
  35. package/src/build/project.ts +38 -0
  36. package/src/build/views.ts +146 -0
  37. package/src/builder/main.ts +29 -0
  38. package/src/desktop/bob.ts +76 -0
  39. package/src/desktop/desktop.css +111 -0
  40. package/src/desktop/icons.ts +50 -0
  41. package/src/desktop/index.ts +323 -0
  42. package/src/desktop/routes.ts +98 -0
  43. package/src/desktop/view.tsx +673 -0
  44. package/src/door/core.ts +384 -0
  45. package/src/ecs/baba.ts +431 -0
  46. package/src/ecs/codec.ts +334 -0
  47. package/src/ecs/handles.ts +91 -0
  48. package/src/ecs/replica.ts +150 -0
  49. package/src/ecs/runtime.ts +603 -0
  50. package/src/ecs/scheduler.ts +75 -0
  51. package/src/ecs/snapshot.ts +102 -0
  52. package/src/ecs/state.ts +759 -0
  53. package/src/ecs/system.ts +256 -0
  54. package/src/ecs/table.ts +420 -0
  55. package/src/ecs/testbed.ts +97 -0
  56. package/src/exec/host.ts +177 -0
  57. package/src/exec/main.ts +98 -0
  58. package/src/exec/watch.ts +7 -0
  59. package/src/exec/wire.ts +29 -0
  60. package/src/generated/build.ts +4 -0
  61. package/src/gui/css.d.ts +1 -0
  62. package/src/gui/gui.tsx +245 -0
  63. package/src/gui/index.ts +51 -0
  64. package/src/gui/inspector.tsx +47 -0
  65. package/src/gui/levels.tsx +73 -0
  66. package/src/gui/promptware.tsx +68 -0
  67. package/src/gui/runner.tsx +118 -0
  68. package/src/gui/theme.css +498 -0
  69. package/src/gui/theme.ts +25 -0
  70. package/src/gui/wizard.tsx +227 -0
  71. package/src/guide/add-a-desktop.mdx +100 -0
  72. package/src/guide/compose-an-interface.mdx +84 -0
  73. package/src/guide/index.ts +13 -0
  74. package/src/guide/reach-outside.mdx +112 -0
  75. package/src/guide/spec-a-system.mdx +93 -0
  76. package/src/guide/systems-together.mdx +72 -0
  77. package/src/guide/write-a-system.mdx +183 -0
  78. package/src/guide/write-promptware.mdx +90 -0
  79. package/src/http/server.ts +310 -0
  80. package/src/kernel/build.ts +21 -0
  81. package/src/kernel/builder.ts +105 -0
  82. package/src/kernel/children.ts +117 -0
  83. package/src/kernel/context.ts +90 -0
  84. package/src/kernel/lock.ts +46 -0
  85. package/src/kernel/names.ts +14 -0
  86. package/src/kernel/schema.ts +130 -0
  87. package/src/kernel/where.ts +12 -0
  88. package/src/kit/index.ts +232 -0
  89. package/src/maker/system.ts +213 -0
  90. package/src/mcp/daemon.ts +61 -0
  91. package/src/mcp/main.ts +208 -0
  92. package/src/mcp/rpc.ts +64 -0
  93. package/src/mcp/tools.ts +125 -0
  94. package/src/prompt/evals.ts +42 -0
  95. package/src/prompt/index.ts +242 -0
  96. package/src/prompt/jsx-dev-runtime.ts +1 -0
  97. package/src/prompt/jsx-runtime.ts +49 -0
  98. package/src/prompt/mdx.d.ts +1 -0
  99. package/src/promptware/compile.ts +183 -0
  100. package/src/promptware/define.ts +16 -0
  101. package/src/promptware/disk.ts +72 -0
  102. package/src/promptware/markdown.d.ts +6 -0
  103. package/src/promptware/sync.ts +437 -0
  104. package/src/promptware/system.ts +215 -0
  105. package/src/runtime/bridge.ts +85 -0
  106. package/src/runtime/connect.ts +54 -0
  107. package/src/runtime/env.ts +35 -0
  108. package/src/runtime/harness.ts +80 -0
  109. package/src/runtime/main.ts +119 -0
  110. package/src/runtime/worker.ts +33 -0
  111. package/src/server/edge.ts +332 -0
  112. package/src/server/main.ts +45 -0
  113. package/src/server/messages.ts +97 -0
  114. package/src/server/protocol.ts +37 -0
  115. package/src/services/args.ts +45 -0
  116. package/src/services/exec.ts +69 -0
  117. package/src/services/fs.ts +139 -0
  118. package/src/services/http.ts +30 -0
  119. package/src/services/index.ts +113 -0
  120. package/src/services/secrets.ts +18 -0
  121. package/src/shell/address.ts +21 -0
  122. package/src/shell/args.ts +219 -0
  123. package/src/shell/client.ts +107 -0
  124. package/src/shell/codes.ts +26 -0
  125. package/src/shell/positional.ts +20 -0
  126. package/src/shell/run.ts +470 -0
  127. package/src/shell/service.ts +167 -0
  128. package/src/shell/state.ts +204 -0
  129. package/src/spec/adapters.ts +72 -0
  130. package/src/spec/diff.ts +26 -0
  131. package/src/spec/files.ts +17 -0
  132. package/src/spec/index.ts +155 -0
  133. package/src/spec/run.ts +97 -0
  134. package/src/spec/take.ts +54 -0
  135. package/src/test/index.ts +8 -0
  136. package/src/test/prove.ts +56 -0
  137. package/src/test/records.ts +23 -0
  138. package/src/test/specs.ts +56 -0
  139. package/src/test/steps.ts +100 -0
  140. package/src/test/voss-dir.ts +17 -0
  141. package/src/transport/messages.ts +110 -0
  142. package/src/transport/transport.ts +62 -0
  143. package/src/wall/probe.ts +67 -0
  144. package/src/wall/profile.ts +103 -0
  145. package/src/wall/spawn.ts +59 -0
  146. package/src/web/app.tsx +53 -0
  147. package/src/web/core.tsx +140 -0
  148. package/src/web/form.ts +155 -0
  149. package/src/web/hooks.ts +135 -0
  150. package/src/web/index.tsx +17 -0
  151. package/src/web/list.ts +19 -0
  152. package/src/web/maker.tsx +766 -0
  153. package/src/web/objects.tsx +213 -0
  154. package/src/web/socket.ts +84 -0
  155. package/src/web/state.tsx +69 -0
  156. package/src/web/store.ts +221 -0
  157. package/src/web/ui.tsx +135 -0
  158. package/README.md +0 -5
@@ -0,0 +1,498 @@
1
+ /* Cascade layers: the theme sits in `voss`, above Tailwind's preflight and below its utilities,
2
+ so an app's classes win over the theme's bare elements and the theme wins over the reset. */
3
+ @layer theme, base, voss, components, utilities;
4
+ @import "../desktop/desktop.css";
5
+
6
+ @layer voss {
7
+
8
+ /* The one theme: voss's pages, the kit (bv-*) and plain elements inside a view.
9
+ Every neutral carries the same faint warmth; depth is a step of lightness,
10
+ layers part by a 1px line, never by a shadow. A row is 28px, a control 24,
11
+ the gutter 12, one radius of 4. Two sizes of type: 13/20 and 11/16.
12
+ Light by default; dark from the system unless a choice sets data-theme. */
13
+
14
+ :root, .desktop {
15
+ --background: oklch(0.968 0.004 75);
16
+ --surface: oklch(0.992 0.003 75);
17
+ --card: var(--surface);
18
+ --foreground: oklch(0.29 0.008 70);
19
+ --popover: oklch(0.995 0.003 75);
20
+ --muted: oklch(0.945 0.005 75);
21
+ --muted-foreground: oklch(0.53 0.01 70);
22
+ --accent: oklch(0.935 0.006 75);
23
+ --primary: oklch(0.52 0.11 250);
24
+ --primary-foreground: oklch(0.985 0.004 250);
25
+ --destructive: oklch(0.56 0.14 28);
26
+ --warning: oklch(0.68 0.11 75);
27
+ --success: oklch(0.58 0.1 155);
28
+ --border: oklch(0.29 0.008 70 / 11%);
29
+ --input: oklch(0.29 0.008 70 / 16%);
30
+ --desk: oklch(0.925 0.006 75);
31
+ --chrome: oklch(0.952 0.005 75);
32
+ --radius: 4px;
33
+ --row: 28px;
34
+ --control: 24px;
35
+ --gutter: 12px;
36
+ --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
37
+ --font-mono: ui-monospace, Menlo, Consolas, monospace;
38
+ color-scheme: light;
39
+ }
40
+
41
+ @media (prefers-color-scheme: dark) {
42
+ :root:not([data-theme="light"]), .desktop[data-theme="system"] {
43
+ --background: oklch(0.2 0.005 75);
44
+ --surface: oklch(0.228 0.006 75);
45
+ --foreground: oklch(0.87 0.012 80);
46
+ --popover: oklch(0.25 0.006 75);
47
+ --muted: oklch(0.245 0.006 75);
48
+ --muted-foreground: oklch(0.66 0.012 78);
49
+ --accent: oklch(0.275 0.007 75);
50
+ --primary: oklch(0.74 0.075 245);
51
+ --primary-foreground: oklch(0.2 0.01 245);
52
+ --destructive: oklch(0.71 0.1 30);
53
+ --warning: oklch(0.79 0.09 80);
54
+ --success: oklch(0.75 0.085 155);
55
+ --border: oklch(0.87 0.012 80 / 10%);
56
+ --input: oklch(0.87 0.012 80 / 15%);
57
+ --desk: oklch(0.165 0.005 75);
58
+ --chrome: oklch(0.185 0.005 75);
59
+ color-scheme: dark;
60
+ }
61
+ }
62
+
63
+ :root[data-theme="dark"], .desktop[data-theme="dark"] {
64
+ --background: oklch(0.2 0.005 75);
65
+ --surface: oklch(0.228 0.006 75);
66
+ --foreground: oklch(0.87 0.012 80);
67
+ --popover: oklch(0.25 0.006 75);
68
+ --muted: oklch(0.245 0.006 75);
69
+ --muted-foreground: oklch(0.66 0.012 78);
70
+ --accent: oklch(0.275 0.007 75);
71
+ --primary: oklch(0.74 0.075 245);
72
+ --primary-foreground: oklch(0.2 0.01 245);
73
+ --destructive: oklch(0.71 0.1 30);
74
+ --warning: oklch(0.79 0.09 80);
75
+ --success: oklch(0.75 0.085 155);
76
+ --border: oklch(0.87 0.012 80 / 10%);
77
+ --input: oklch(0.87 0.012 80 / 15%);
78
+ --desk: oklch(0.165 0.005 75);
79
+ --chrome: oklch(0.185 0.005 75);
80
+ color-scheme: dark;
81
+ }
82
+
83
+ /* Base: the page never scrolls; windows do. */
84
+ *, *::before, *::after { box-sizing: border-box; }
85
+ html { font: 13px/20px var(--font-sans); -webkit-font-smoothing: antialiased; height: 100%; }
86
+ body { margin: 0; height: 100%; background: var(--desk); color: var(--foreground); }
87
+ #root { height: 100%; display: flex; overflow: hidden; }
88
+ * { scrollbar-width: thin; scrollbar-color: color-mix(in oklch, var(--foreground) 25%, transparent) transparent; }
89
+ code, kbd, pre, samp { font-family: var(--font-mono); font-size: 12px; line-height: 20px; }
90
+ a { color: var(--primary); text-decoration: none; }
91
+ a:hover { text-decoration: underline; }
92
+ :focus-visible { outline: 2px solid color-mix(in oklch, var(--primary) 60%, transparent); outline-offset: 1px; }
93
+ [hidden] { display: none !important; }
94
+ h1, h2, h3 { margin: 0; font-weight: 600; }
95
+
96
+ button, input, select, textarea { font: inherit; color: inherit; }
97
+
98
+ /* ---- the UI kit, babavoss/web ---- */
99
+ .bv-muted { color: var(--muted-foreground); }
100
+ .bv-error { color: var(--destructive); }
101
+
102
+ /* The kit. */
103
+ .bv-button {
104
+ display: inline-flex; align-items: center; gap: 6px; height: var(--control); padding: 0 10px;
105
+ border: 1px solid var(--input); border-radius: var(--radius); background: var(--muted); cursor: pointer; white-space: nowrap;
106
+ }
107
+ .bv-button:hover { background: var(--accent); }
108
+ .bv-button:disabled { opacity: .55; cursor: default; }
109
+ .bv-primary { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
110
+ .bv-primary:hover { background: color-mix(in oklch, var(--primary) 88%, black); }
111
+ .bv-quiet { background: transparent; border-color: transparent; }
112
+ .bv-quiet:hover { background: var(--accent); }
113
+ .bv-danger { background: var(--destructive); color: white; border-color: transparent; }
114
+ .bv-input { height: var(--control); padding: 1px 8px; border: 1px solid var(--input); border-radius: var(--radius); background: var(--surface); min-width: 0; }
115
+ .bv-input[aria-invalid="true"] { border-color: var(--destructive); }
116
+ .bv-textarea { height: auto; padding: 4px 8px; resize: vertical; }
117
+ .bv-select { padding-right: 4px; }
118
+ .bv-mono { font-family: var(--font-mono); font-size: 12px; }
119
+ .bv-check { width: 14px; height: 14px; margin: 0; accent-color: var(--primary); }
120
+ .bv-kbd { display: inline-block; min-width: 18px; padding: 0 4px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: var(--radius); background: var(--surface); font-size: 11px; line-height: 16px; text-align: center; }
121
+ .bv-code { padding: 0 4px; border-radius: var(--radius); background: color-mix(in oklch, var(--destructive) 12%, transparent); }
122
+
123
+ .bv-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
124
+ .bv-panel-head { display: flex; align-items: center; gap: 8px; height: var(--row); padding: 0 var(--gutter); border-bottom: 1px solid var(--border); background: var(--chrome); }
125
+ .bv-panel-title { flex: 1; font-weight: 600; }
126
+ .bv-panel-body { padding: var(--gutter); }
127
+
128
+ .bv-rows { display: flex; flex-direction: column; }
129
+ .bv-row { display: flex; align-items: center; gap: 8px; min-height: var(--row); padding: 0 var(--gutter); border: 0; background: none; text-align: left; width: 100%; }
130
+ .bv-row-button { cursor: pointer; border-radius: var(--radius); }
131
+ .bv-row-button:hover, .bv-row.bv-active { background: var(--accent); }
132
+ .bv-row-label { flex: none; }
133
+ .bv-row-hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-foreground); }
134
+
135
+ .bv-table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); }
136
+ .bv-table { border-collapse: collapse; width: 100%; }
137
+ .bv-table th, .bv-table td { height: var(--row); padding: 0 var(--gutter); text-align: left; white-space: nowrap; }
138
+ .bv-table th { position: sticky; top: 0; background: var(--chrome); font-weight: 600; border-bottom: 1px solid var(--border); }
139
+ .bv-table tbody tr:hover { background: var(--muted); }
140
+
141
+ .bv-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: oklch(0.2 0.005 75 / 35%); }
142
+ .bv-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 64px); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--popover); outline: none; }
143
+ .bv-dialog-head { padding: var(--gutter); font-weight: 600; border-bottom: 1px solid var(--border); }
144
+ .bv-dialog-body { padding: var(--gutter); overflow: auto; }
145
+ .bv-dialog-body p { margin: var(--gutter) 0 0; }
146
+ .bv-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 8px var(--gutter); border-top: 1px solid var(--border); }
147
+
148
+ .bv-cmd { display: flex; flex-direction: column; min-height: 0; }
149
+ .bv-cmd-input { height: 36px; padding: 0 var(--gutter); border: 0; border-bottom: 1px solid var(--border); background: transparent; outline: none; }
150
+ .bv-cmd-list { overflow: auto; max-height: 60vh; padding: 4px; }
151
+ .bv-cmd-group { padding: 8px 8px 2px; font-size: 11px; line-height: 16px; color: var(--muted-foreground); }
152
+ .bv-cmd-item { display: flex; align-items: center; gap: 8px; height: var(--row); padding: 0 8px; border-radius: var(--radius); cursor: pointer; }
153
+ .bv-cmd-item.bv-active { background: color-mix(in oklch, var(--primary) 15%, transparent); }
154
+ .bv-cmd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
155
+ .bv-cmd-hint { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted-foreground); }
156
+ .bv-cmd-empty { padding: 8px; color: var(--muted-foreground); }
157
+
158
+ /* The runner. */
159
+ .bv-runner { padding: 8px; }
160
+ .bv-runner > p { margin: 4px var(--gutter); }
161
+ .bv-runner-nav { margin: 0 0 4px; }
162
+ .bv-form { display: flex; flex-direction: column; gap: var(--gutter); padding: 4px; }
163
+ .bv-form-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
164
+ .bv-form-name { font-weight: 600; font-size: 13px; }
165
+ .bv-field { display: flex; flex-direction: column; gap: 4px; }
166
+ .bv-field label { display: flex; align-items: baseline; gap: 6px; font-weight: 500; }
167
+ .bv-field-inline { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; }
168
+ .bv-required { color: var(--destructive); margin-left: 1px; }
169
+ .bv-type { font-weight: 400; font-size: 11px; color: var(--muted-foreground); font-family: var(--font-mono); }
170
+ .bv-form-actions { display: flex; align-items: center; gap: 8px; }
171
+ .bv-output { margin: 0; }
172
+ .bv-json { padding: 8px var(--gutter); border: 1px solid var(--border); border-radius: var(--radius); background: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
173
+ .bv-error { margin: 0; }
174
+
175
+ /* ---- voss's pages: the picker, the host, the inspector, the runner ---- */
176
+ .gui-page { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
177
+ .gui-list { display: flex; flex-direction: column; gap: 8px; }
178
+ .gui-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
179
+ .gui-card h2 { font-size: 14px; flex: 1; }
180
+ .gui-card .gui-links { display: flex; gap: 10px; }
181
+ /* ---- the picker: a column on the desk, the brand over one box, the keys under it ----
182
+ The box is one surface parted by 1px lines; a row lights by a step of lightness and a
183
+ 2px rail in the primary on its left edge; nothing casts a shadow. */
184
+ .pk-gap { flex: 1; }
185
+
186
+
187
+
188
+ .pk-pane { display: flex; flex-direction: column; min-height: 0; flex: 1; }
189
+ .pk-fade { animation: pk-in 140ms ease-out; }
190
+ @keyframes pk-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
191
+
192
+ .pk-strip { display: flex; flex: none; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 var(--gutter); border-bottom: 1px solid var(--border); background: var(--chrome); }
193
+ .pk-strip-title { font-weight: 600; }
194
+
195
+ .pk-list { list-style: none; margin: 0; padding: 4px 0; overflow: auto; flex: 1; min-height: 0; }
196
+ .pk-list > li { margin: 0; }
197
+
198
+ /* A baba: a tile with its initial in its own hue, the title and name, its directory under them. */
199
+ .pk-tile { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; font-weight: 600; font-size: 13px;
200
+ background: color-mix(in oklch, oklch(0.68 0.14 var(--h, 250)) 20%, var(--surface));
201
+ color: color-mix(in oklch, oklch(0.62 0.15 var(--h, 250)) 85%, var(--foreground));
202
+ box-shadow: inset 0 0 0 1px color-mix(in oklch, oklch(0.65 0.14 var(--h, 250)) 28%, transparent); }
203
+ .pk-go { flex: none; display: grid; place-items: center; color: var(--muted-foreground); opacity: 0; transform: translateX(-3px); transition: opacity 100ms, transform 100ms; }
204
+ .is-active > .pk-go, .pk-baba.is-active .pk-go, .pk-folder.is-active .pk-go { opacity: 1; transform: none; }
205
+
206
+ /* Loading: the rows' shapes, breathing. */
207
+ .is-ghost { pointer-events: none; }
208
+ .pk-ghost-line { display: block; height: 8px; margin: 4px 0; border-radius: 4px; background: var(--muted); animation: pk-breathe 1.2s ease-in-out infinite alternate; }
209
+ .pk-ghost-line.is-sub { height: 6px; opacity: .7; }
210
+ @keyframes pk-breathe { from { opacity: .55; } to { opacity: 1; } }
211
+
212
+ .pk-empty .pk-primary { margin-top: 12px; }
213
+
214
+ .pk-alert { margin: 0; padding: 6px var(--gutter); border-top: 1px solid color-mix(in oklch, var(--destructive) 30%, transparent); background: color-mix(in oklch, var(--destructive) 8%, var(--surface)); color: var(--destructive); font-size: 12px; overflow-wrap: anywhere; }
215
+ .pk-list + .pk-alert, .pk-strip + .pk-alert { border-top: 0; border-bottom: 1px solid color-mix(in oklch, var(--destructive) 30%, transparent); }
216
+
217
+ /* The folder picker: the path and a filter, the folders, a dock with what will happen. */
218
+ .pk-path { display: flex; flex: none; align-items: center; gap: 8px; min-height: 36px; padding: 0 6px 0 8px; border-bottom: 1px solid var(--border); }
219
+ .pk-crumbs { display: flex; flex: 1; min-width: 0; align-items: center; overflow: hidden; white-space: nowrap; }
220
+ .pk-crumb-wrap:last-child { min-width: 0; }
221
+ .pk-crumb-wrap:last-child .pk-crumb { display: block; overflow: hidden; text-overflow: ellipsis; line-height: 22px; }
222
+ .pk-crumb-wrap { display: inline-flex; align-items: center; }
223
+ .pk-crumb { display: inline-flex; align-items: center; height: 22px; padding: 0 4px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted-foreground); font: inherit; cursor: pointer; }
224
+ button.pk-crumb:hover { background: var(--accent); color: var(--foreground); }
225
+ .pk-crumb.is-here { color: var(--foreground); font-weight: 600; cursor: default; }
226
+ .pk-crumb-sep { color: var(--muted-foreground); opacity: .5; padding: 0 1px; }
227
+ .pk-filter { flex: none; display: flex; align-items: center; gap: 6px; width: 150px; height: var(--control); padding: 0 8px; border: 1px solid var(--input); border-radius: var(--radius); background: var(--background); color: var(--muted-foreground); transition: width 140ms, border-color 100ms; }
228
+ .pk-filter:focus-within { width: 190px; border-color: color-mix(in oklch, var(--primary) 55%, transparent); color: var(--foreground); }
229
+ .pk-filter input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; }
230
+
231
+ .pk-folders { transition: opacity 120ms; }
232
+ .pk-folders.is-loading { opacity: .5; }
233
+ .pk-folder { position: relative; display: flex; align-items: center; gap: 8px; width: calc(100% - 8px); height: var(--row); margin: 0 4px; padding: 0 8px; border: 0; border-radius: var(--radius); background: transparent; color: inherit; text-align: left; cursor: pointer; }
234
+ .pk-folder.is-active { background: var(--accent); }
235
+ .pk-folder.is-active::before { content: ""; position: absolute; left: -4px; top: 6px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--primary); }
236
+ .pk-folder-icon { flex: none; display: grid; place-items: center; color: var(--muted-foreground); }
237
+ .pk-folder.is-baba .pk-folder-icon { color: var(--primary); }
238
+ .pk-folder.is-baba .pk-folder-name { font-weight: 600; }
239
+ .pk-folder.is-up .pk-folder-name { color: var(--muted-foreground); }
240
+ .pk-folder-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
241
+ .pk-folder-name mark { background: color-mix(in oklch, var(--primary) 22%, transparent); color: inherit; border-radius: 2px; }
242
+ .pk-folder-note { font-size: 11px; color: var(--muted-foreground); }
243
+ .pk-pill { flex: none; padding: 0 6px; border-radius: 8px; font-size: 11px; line-height: 16px; color: var(--primary); background: color-mix(in oklch, var(--primary) 12%, transparent); }
244
+ .pk-pill.is-known { color: var(--success); background: color-mix(in oklch, var(--success) 13%, transparent); }
245
+ .pk-none { padding: 12px var(--gutter); color: var(--muted-foreground); }
246
+
247
+ .pk-dock { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px var(--gutter); border-top: 1px solid var(--border); background: var(--chrome); }
248
+ .pk-dock-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
249
+ .pk-dock-line:empty { display: none; }
250
+ .pk-dock-icon { flex: none; display: grid; place-items: center; color: var(--muted-foreground); }
251
+ .pk-dock.is-baba .pk-dock-icon { color: var(--primary); }
252
+ .pk-dock.is-known .pk-dock-icon { color: var(--success); }
253
+ .pk-dock-text { min-width: 0; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
254
+ .pk-here { color: var(--foreground); font-family: var(--font-mono); font-size: 12px; }
255
+ .pk-dock-text code { font-size: 12px; color: var(--foreground); }
256
+ .pk-field { display: flex; align-items: center; height: var(--control); min-width: 0; width: 150px; border: 1px solid var(--input); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
257
+ .pk-field.is-wide { width: 190px; }
258
+ .pk-field:focus-within { border-color: color-mix(in oklch, var(--primary) 55%, transparent); }
259
+ .pk-field span { flex: none; align-self: stretch; display: grid; place-items: center; padding: 0 7px; border-right: 1px solid var(--border); background: var(--muted); color: var(--muted-foreground); font-size: 11px; }
260
+ .pk-field input { flex: 1; min-width: 0; height: 100%; padding: 0 7px; border: 0; outline: 0; background: transparent; }
261
+ .pk-busy { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground); }
262
+
263
+ .pk-primary { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border: 0; border-radius: var(--radius); background: var(--primary); color: var(--primary-foreground); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background 100ms; }
264
+ .pk-empty .pk-primary { padding-right: 10px; }
265
+ .pk-primary:hover { background: color-mix(in oklch, var(--primary) 88%, var(--foreground)); }
266
+ .pk-primary:disabled { opacity: .5; cursor: default; }
267
+
268
+ .pk-kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: var(--radius); background: var(--surface); color: var(--foreground); font-family: var(--font-sans); font-size: 10px; line-height: 1; }
269
+ .pk-kbd.is-on-primary { border: 0; background: color-mix(in oklch, var(--primary-foreground) 18%, transparent); color: var(--primary-foreground); }
270
+
271
+
272
+ .pk-spin { display: inline-block; width: 12px; height: 12px; border: 1.5px solid color-mix(in oklch, var(--muted-foreground) 35%, transparent); border-top-color: var(--muted-foreground); border-radius: 50%; animation: pk-turn 700ms linear infinite; }
273
+ @keyframes pk-turn { to { transform: rotate(360deg); } }
274
+
275
+ @media (max-width: 560px) {
276
+ .pk-dock-line:not(.is-say) { flex-wrap: wrap; }
277
+ .pk-field, .pk-field.is-wide { width: 100%; }
278
+ .pk-filter, .pk-filter:focus-within { width: 120px; }
279
+ }
280
+ @media (prefers-reduced-motion: reduce) { .pk-fade, .pk-ghost-line, .pk-spin { animation: none; } .pk-go, .pk-filter, .pk-folders { transition: none; } }
281
+
282
+ .gui-view { position: fixed; inset: 0; overflow: auto; background: var(--background); }
283
+ .gui-notice { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--destructive); background: color-mix(in oklch, var(--destructive) 10%, var(--background)); }
284
+ .gui-failure { white-space: pre-wrap; font-family: var(--font-mono); font-size: 12px; margin: 8px 0 0; }
285
+ .gui-section { margin: 16px 0; }
286
+ .gui-section h2 { font-size: 13px; margin-bottom: 8px; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .04em; }
287
+ .gui-entity { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--border); }
288
+ .gui-entity code { color: var(--muted-foreground); }
289
+ .gui-parts { display: flex; flex-wrap: wrap; gap: 6px 12px; }
290
+ .gui-part { display: inline-flex; gap: 6px; align-items: baseline; }
291
+ .gui-part b { font-weight: 600; }
292
+ .gui-part pre { margin: 0; display: inline; font-size: 12px; white-space: pre-wrap; }
293
+ .gui-filter { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
294
+ .gui-fade { animation: gui-appear 100ms ease-out; }
295
+ @keyframes gui-appear { from { opacity: 0 } to { opacity: 1 } }
296
+ @media (prefers-reduced-motion: reduce) { .gui-fade { animation: none; } }
297
+
298
+ /* ---- voss's apps, in the shell's windows: the state, the contract, the promptware, the settings, with a page's gutters; the Maker edge to edge ---- */
299
+ .gui-app { max-width: 1100px; padding: 16px 20px 32px; }
300
+ .gui-app > h2 { margin: 16px 0 4px; font-size: 13px; }
301
+ .gui-choices { display: flex; gap: 6px; margin-top: 8px; }
302
+ .gui-stale { position: fixed; left: 10px; bottom: 10px; z-index: 900; display: flex; gap: 12px; align-items: center; max-width: min(640px, calc(100vw - 60px)); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--foreground); font-size: 13px; box-shadow: 0 8px 24px color-mix(in oklch, black 25%, transparent); }
303
+
304
+ /* The proofs page and a view's own use of the player: voss's classes. */
305
+ .bv-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
306
+ .bv-between { justify-content: space-between; }
307
+ /* Cards: one per instance. */
308
+ .bv-object-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; font-size: 12px; line-height: 16px; }
309
+ .bv-object-card-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 4px 10px; height: 28px; background: var(--chrome); border-bottom: 1px solid var(--border); font-size: 13px; line-height: 20px; }
310
+ .bv-object-key { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary); font-variant-numeric: tabular-nums; }
311
+ .bv-object-card-head .bv-muted { margin-left: auto; font-size: 11px; }
312
+ .bv-object-fields { display: grid; grid-template-columns: minmax(72px, auto) 1fr; gap: 2px 10px; margin: 0; padding: 6px 10px; }
313
+ .bv-object-fields > div { display: contents; }
314
+ .bv-object-fields dt { color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
315
+ .bv-object-fields dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
316
+ .bv-object-fields code { font-size: 11px; }
317
+ .bv-object-num { font-variant-numeric: tabular-nums; }
318
+ .bv-object-tag { padding: 0 5px; border-radius: 3px; background: var(--muted); color: var(--muted-foreground); font-size: 11px; }
319
+ .bv-object-ref { padding: 0 4px; border: 0; border-radius: 3px; background: transparent; color: var(--primary); cursor: pointer; font: inherit; }
320
+ .bv-object-ref:hover { background: color-mix(in oklch, var(--primary) 12%, transparent); }
321
+ .bv-object-more { border: 0; background: transparent; color: var(--muted-foreground); cursor: pointer; font: inherit; padding: 0; text-decoration: underline dotted; }
322
+ .bv-object-rider { border-top: 1px solid var(--border); }
323
+ .bv-object-rider h4 { display: flex; gap: 8px; margin: 0; padding: 4px 10px 0; font-size: 11px; line-height: 16px; font-weight: 600; color: var(--muted-foreground); }
324
+ .bv-object-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px; border-top: 1px solid var(--border); background: var(--chrome); }
325
+ .bv-object-actions .bv-button { height: 20px; padding: 0 8px; font-size: 11px; }
326
+ .bv-object-needs { padding: 0 6px; height: 20px; line-height: 20px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted-foreground); font-size: 11px; }
327
+ .bv-object-actions .is-open { border-color: var(--primary); }
328
+ .bv-object-form { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--background); }
329
+ .bv-object-form-head { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
330
+ .bv-object-field { display: grid; grid-template-columns: 90px 1fr; gap: 8px; align-items: center; font-size: 12px; }
331
+ .bv-object-field .bv-input, .bv-object-field select, .bv-object-field textarea { width: 100%; min-width: 0; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--input); border-radius: var(--radius); padding: 2px 6px; }
332
+ .bv-object-loose h4 { display: flex; gap: 8px; margin: 0 0 6px; font-size: 12px; }
333
+ /* The proofs page in the boards' language: a rail of 28px rows on the left, the pane on the right, strips of 28px, 4px radius, two sizes of type. */
334
+ .bv-proofs { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: 100%; min-height: 0; }
335
+ .bv-rail { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; scrollbar-gutter: stable; border-right: 1px solid var(--border); }
336
+ .bv-rail-strip { position: sticky; top: 0; z-index: 1; flex-shrink: 0; display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; background: var(--chrome); border-bottom: 1px solid var(--border); }
337
+ .bv-rail-count { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; white-space: nowrap; }
338
+ .bv-rail-strip .bv-button { flex-shrink: 0; }
339
+ .bv-rail-strip .bv-button { height: 20px; padding: 0 6px; font-size: 11px; }
340
+ .bv-lenses { display: inline-flex; gap: 2px; }
341
+ .bv-lens { height: 20px; padding: 0 8px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted-foreground); font: inherit; font-size: 12px; cursor: pointer; }
342
+ .bv-lens:hover { color: var(--foreground); }
343
+ .bv-lens.is-open { background: var(--accent); color: var(--foreground); }
344
+ .bv-stage-card, .bv-object-col { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; text-align: left; min-width: 0; flex-shrink: 0; }
345
+ .bv-stage-card:hover, .bv-object-col:hover { background: var(--accent); }
346
+ .bv-stage-card.is-open, .bv-object-col.is-open { background: color-mix(in oklch, var(--primary) 8%, transparent); box-shadow: inset 2px 0 0 var(--primary); }
347
+ .bv-stage-text, .bv-object-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
348
+ .bv-stage-text b, .bv-object-head b { font-weight: 500; white-space: nowrap; }
349
+ .bv-stage-text .bv-muted, .bv-object-head .bv-muted { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
350
+ .bv-object-count { font-size: 11px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
351
+ .bv-proof-dot { flex: none; width: 8px; height: 8px; margin: 0; border-radius: 50%; }
352
+ .bv-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
353
+ .bv-pane-body { padding: 12px; margin: 0; }
354
+ .bv-film-head { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 4px 12px; background: var(--chrome); border-bottom: 1px solid var(--border); flex-shrink: 0; }
355
+ .bv-film-head > div { min-width: 0; }
356
+ .bv-film-head h2, .bv-film-head h3 { margin: 0; font-size: 13px; line-height: 20px; font-weight: 600; }
357
+ .bv-film-intent { margin: 0; font-size: 11px; line-height: 16px; color: var(--muted-foreground); max-width: 90ch; }
358
+ .bv-verdict { flex: none; margin-left: auto; height: 20px; padding: 0 6px; border-radius: var(--radius); font-size: 11px; line-height: 20px; font-weight: 500; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
359
+ .bv-proof-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 4px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
360
+ .bv-proof-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; max-width: 360px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--muted-foreground); font: inherit; font-size: 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
361
+ .bv-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
362
+ .bv-proof-chip:hover { background: var(--accent); color: var(--foreground); }
363
+ .bv-proof-chip.is-open { background: color-mix(in oklch, var(--primary) 10%, transparent); border-color: color-mix(in oklch, var(--primary) 40%, transparent); color: var(--foreground); }
364
+ .bv-object-sheet { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0 12px; margin: 0; padding: 4px 12px; border-bottom: 1px solid var(--border); font-size: 11px; line-height: 16px; }
365
+ .bv-object-sheet dt { color: var(--muted-foreground); opacity: .8; }
366
+ .bv-object-sheet dd { margin: 0; min-width: 0; color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
367
+ .bv-object-sheet code { font-size: 11px; }
368
+ .bv-object-map { display: flex; flex-direction: column; }
369
+ .bv-object-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
370
+ .bv-object-loose { margin-top: 16px; }
371
+ .bv-film > .bv-film-head { border-top: 1px solid var(--border); }
372
+ /* A film holds still while it plays: the transport is pinned, the stage keeps its tallest height, the detail beside it reserves its rows, nothing changes width. */
373
+ .bv-film { --detail-row: 21px; display: flex; flex-direction: column; }
374
+ .bv-film-intent { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 16px; }
375
+ .bv-verdict { min-width: 56px; text-align: center; }
376
+ .bv-film-transport { position: sticky; top: 0; z-index: 2; flex-shrink: 0; background: var(--background); border-bottom: 1px solid var(--border); }
377
+ .bv-film-controls { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; flex-wrap: nowrap; }
378
+ .bv-film-controls .bv-button { height: 20px; padding: 0 8px; font-size: 11px; flex-shrink: 0; }
379
+ .bv-film-controls .bv-film-play { min-width: 56px; justify-content: center; }
380
+ .bv-film-controls .is-hidden { visibility: hidden; }
381
+ .bv-film-controls input[type=range] { flex: 1; min-width: 80px; accent-color: var(--primary); }
382
+ .bv-film-time { flex-shrink: 0; min-width: 116px; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
383
+ .bv-film-strip { display: flex; gap: 2px; flex-wrap: nowrap; height: 26px; align-items: center; padding: 0 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
384
+ .bv-film-frame { flex: none; width: 10px; height: 16px; padding: 0; border: 0; border-radius: 2px; cursor: pointer; background: var(--muted); opacity: .7; }
385
+ .bv-film-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
386
+ .bv-film-stage { position: relative; margin: 0; padding: 0; min-width: 0; overflow-x: auto; overflow-y: hidden; }
387
+ /* The padding is inside the measured box, so the height kept is the height drawn. */
388
+ .bv-film-frame-box { padding: 12px; }
389
+ /* Every frame drawn once, out of sight, at the stage's width: how tall the stage must be before the first frame shows. */
390
+ .bv-film-probe { position: absolute; top: 0; left: 0; right: 0; visibility: hidden; pointer-events: none; }
391
+ .bv-film-probe > div { position: absolute; top: 0; left: 0; right: 0; }
392
+ .bv-film-detail { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 8px 12px; border-left: 1px solid var(--border); min-height: 100%; }
393
+ .bv-film-steps, .bv-film-checks { list-style: none; margin: 0; padding: 0; font-size: 12px; line-height: 16px; }
394
+ .bv-film-steps li, .bv-film-checks li { padding: 2px 0; border-top: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
395
+ .bv-film-steps li:first-child, .bv-film-checks li:first-child { border-top: 0; }
396
+ @media (max-width: 900px) { .bv-film-body { grid-template-columns: minmax(0, 1fr); } .bv-film-detail { border-left: 0; border-top: 1px solid var(--border); } }
397
+ .bv-proof-dot.is-passed { background: var(--success); }
398
+ .bv-proof-dot.is-failed { background: var(--destructive); box-shadow: 0 0 0 3px color-mix(in oklch, var(--destructive) 25%, transparent); }
399
+ .bv-proof-dot.is-unproven { background: var(--warning); }
400
+ .bv-proof-dot.is-undrawn { background: transparent; border: 1.5px dashed var(--muted-foreground); }
401
+ .bv-proof-dot.is-sketch { background: transparent; border: 1.5px solid var(--muted-foreground); }
402
+ .bv-proofs-output { margin: 8px 0 0; padding: 8px 10px; font-size: 11px; line-height: 1.4; white-space: pre-wrap; border-radius: 8px; background: var(--muted); color: var(--muted-foreground); }
403
+ .bv-proofs-output.is-bad { color: var(--destructive); }
404
+ .bv-verdict.is-passed { background: color-mix(in oklch, var(--success) 18%, transparent); color: var(--success); }
405
+ .bv-verdict.is-failed { background: color-mix(in oklch, var(--destructive) 18%, transparent); color: var(--destructive); }
406
+ .bv-verdict.is-sketch { background: var(--muted); color: var(--muted-foreground); }
407
+ .bv-verdict.is-live { background: color-mix(in oklch, var(--primary) 18%, transparent); color: var(--primary); }
408
+ .bv-film-frame.is-ok { background: var(--success); }
409
+ .bv-film-frame.is-bad { background: var(--destructive); }
410
+ .bv-film-frame:hover { opacity: 1; }
411
+ .bv-film-frame.is-here { opacity: 1; outline: 2px solid var(--foreground); outline-offset: 1px; }
412
+ .bv-film-kind { display: inline-block; min-width: 40px; margin-right: 4px; padding: 0 5px; line-height: 16px; border-radius: 3px; font-size: 11px; background: var(--muted); color: var(--muted-foreground); }
413
+ .bv-film-mark { display: inline-block; width: 16px; font-weight: 700; }
414
+ .bv-film-checks .is-ok .bv-film-mark { color: var(--success); }
415
+ .bv-film-checks .is-bad { color: var(--destructive); }
416
+ .bv-film-error { color: var(--destructive); }
417
+ .bv-sandbox-code { margin: 12px 0 0; padding: 10px 12px; font-size: 12px; line-height: 1.45; white-space: pre; overflow: auto; border-radius: 8px; background: var(--muted); color: var(--foreground); }
418
+ .bv-state-list { display: flex; flex-direction: column; gap: 4px; }
419
+ .bv-state-entity { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); font-size: 13px; }
420
+ .bv-state-part b { margin-right: 4px; }
421
+ .bv-state-part code { font-size: 12px; color: var(--muted-foreground); }
422
+ }
423
+
424
+ /* ---- the Baba Maker: the catalogue of specs, and a state open in the lab shell ---- */
425
+ .bv-maker { padding: 12px 16px; font-size: 13px; line-height: 20px; }
426
+ .bv-maker-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
427
+ .bv-maker-head h2 { margin: 0; font-size: 15px; }
428
+ .bv-maker-list { list-style: none; margin: 0; padding: 0; }
429
+ .bv-maker-spec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); }
430
+ .bv-maker-open { background: none; border: 0; padding: 0; color: var(--foreground); font: inherit; text-align: left; cursor: pointer; }
431
+ .bv-maker-open:hover b { text-decoration: underline; }
432
+ .bv-maker-facts { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
433
+ .bv-maker-output { margin: 8px 0; padding: 8px 10px; font-size: 12px; white-space: pre-wrap; border-radius: 8px; background: var(--muted); color: var(--destructive); }
434
+ .bv-lab { display: flex; flex-direction: column; height: 100%; min-height: 0; font-size: 13px; line-height: 20px; }
435
+ .bv-lab-app { flex: 1; min-width: 0; min-height: 0; }
436
+ /* The sandbox: the app in a frame, apart from the page; its edge turns the accent while the state plays. */
437
+ .bv-lab-frame { height: 100%; min-height: 0; overflow: auto; border: 1px solid transparent; background: var(--background); transition: border-color .15s; }
438
+ .bv-lab-frame.is-playing { border-color: var(--primary); }
439
+ .bv-lab-bare { padding: 12px; }
440
+ .bv-lab-views { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: stretch; } .bv-lab-views .is-open { font-weight: 600; }
441
+ /* The status bar: one line per thing to know, each a slot whose popover opens above it. */
442
+ .bv-bar { position: relative; z-index: 2; display: flex; align-items: stretch; gap: 2px; height: 30px; padding: 0 6px; border-top: 1px solid var(--border); background: var(--card); font-size: 12px; line-height: 30px; white-space: nowrap; }
443
+ .bv-bar-head { border-top: 0; border-bottom: 1px solid var(--border); }
444
+ .bv-bar-head .bv-popover { bottom: auto; top: calc(100% + 4px); }
445
+ .bv-bar-slot { position: relative; display: flex; }
446
+ .bv-bar-item { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 0; border-radius: var(--radius); background: transparent; color: var(--foreground); font: inherit; line-height: 1; cursor: pointer; }
447
+ .bv-bar-icon { width: 14px; height: 14px; flex: none; opacity: .85; }
448
+ .bv-bar-item b { font-weight: 600; }
449
+ .bv-bar-time { font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
450
+ .bv-bar-item:hover, .bv-bar-item.is-open { background: var(--accent); }
451
+ .bv-bar-item.is-ok { color: var(--success); }
452
+ .bv-bar-item.is-bad { color: var(--destructive); }
453
+ .bv-bar-item.is-warn { color: var(--warning); }
454
+ .bv-bar-item.is-here { color: var(--primary); }
455
+ .bv-bar-item .bv-muted { color: var(--muted-foreground); font-weight: 400; }
456
+ .bv-bar-slot { align-items: stretch; }
457
+ .bv-lab-answer .bv-button .bv-bar-icon { margin-right: 4px; }
458
+ .bv-bar-back { padding: 0 6px; color: var(--muted-foreground); }
459
+ .bv-bar-back:hover { color: var(--foreground); }
460
+ .bv-bar-play { width: 30px; padding: 0; justify-content: center; }
461
+ .bv-bar-play.is-on { color: var(--primary); }
462
+ .bv-bar-gap { flex: 1; }
463
+ .bv-bar-summary { margin: 0 0 4px; }
464
+ .bv-popover { position: absolute; bottom: calc(100% + 4px); left: 0; width: 360px; max-width: calc(100vw - 24px); max-height: min(70vh, 640px); overflow: auto; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--popover); box-shadow: 0 8px 24px color-mix(in oklch, var(--foreground) 14%, transparent); font-size: 12px; line-height: 16px; white-space: normal; }
465
+ .bv-popover.is-right { left: auto; right: 0; }
466
+ .bv-popover.is-wide { width: 460px; }
467
+ .bv-popover h3 { margin: 8px 0 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-foreground); }
468
+ .bv-popover h3:first-child { margin-top: 0; }
469
+ .bv-lab-transport { display: flex; align-items: center; gap: 10px; }
470
+ .bv-lab-transport select { font: inherit; background: var(--background); color: var(--foreground); border: 1px solid var(--border); border-radius: 4px; }
471
+ .bv-lab-scenarios, .bv-lab-jobs, .bv-lab-changes, .bv-lab-outside, .bv-lab-log { list-style: none; margin: 0; padding: 0; }
472
+ .bv-lab-scenarios > li, .bv-lab-jobs > li, .bv-lab-changes > li, .bv-lab-log > li { padding: 4px 0; border-top: 1px solid var(--border); }
473
+ .bv-lab-scenarios > li:first-child, .bv-lab-jobs > li:first-child, .bv-lab-changes > li:first-child, .bv-lab-log > li:first-child { border-top: 0; }
474
+ .bv-lab-scenario-row { display: flex; align-items: center; gap: 6px; }
475
+ .bv-lab-scenario-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
476
+ .bv-lab-answer { display: flex; gap: 4px; margin-top: 4px; }
477
+ .bv-lab-answer input { flex: 1; min-width: 0; font: inherit; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--background); color: var(--foreground); }
478
+ .bv-lab-changes ul { list-style: none; margin: 2px 0 0 8px; padding: 0; }
479
+ .bv-film-checks .is-warn { color: var(--warning); }
480
+ .bv-film-checks .is-warn .bv-film-mark { color: var(--warning); }
481
+ .bv-lab-knobs { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
482
+ .bv-lab-knob { width: 64px; font: inherit; padding: 1px 4px; border: 1px solid var(--border); border-radius: 4px; background: var(--background); color: var(--foreground); }
483
+ .bv-lab-scenarios > li.is-open { background: color-mix(in oklch, var(--primary) 8%, transparent); margin: 0 -12px; padding: 4px 12px; }
484
+ .bv-lab-story-wrap { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
485
+ .bv-lab-story { list-style: none; margin: 4px 0 0; padding: 0; }
486
+ .bv-lab-story > li { display: grid; grid-template-columns: 14px 1fr; column-gap: 4px; padding: 3px 0; border-top: 1px solid var(--border); color: var(--muted-foreground); }
487
+ .bv-lab-story > li:first-child { border-top: 0; }
488
+ .bv-lab-story > li.is-done, .bv-lab-story > li.is-ok, .bv-lab-story > li.is-bad, .bv-lab-story > li.is-warn { color: var(--foreground); }
489
+ .bv-lab-story > li.is-here { color: var(--primary); font-weight: 500; }
490
+ .bv-lab-story > li.is-ok .bv-film-mark { color: var(--success); }
491
+ .bv-lab-story > li.is-bad { color: var(--destructive); }
492
+ .bv-lab-story > li.is-warn { color: var(--warning); }
493
+ .bv-lab-story .bv-lab-changes { grid-column: 2; margin: 2px 0 0; font-size: 11px; color: var(--muted-foreground); }
494
+ .bv-lab-story-head { margin: 0 0 2px; }
495
+ .bv-lab-take { margin-top: 4px; }
496
+ .bv-lab-tree { list-style: none; margin: 2px 0 0 10px; padding: 0; font-size: 11px; }
497
+ .bv-lab-expect { margin: 4px 0; }
498
+ .bv-lab-model .bv-object-map { margin-bottom: 6px; }
@@ -0,0 +1,25 @@
1
+ // Light or dark: the system decides unless a choice is remembered in this
2
+ // browser. The stylesheet follows prefers-color-scheme by itself; a choice
3
+ // is a data-theme attribute on the root element, set before the first paint.
4
+ export type Theme = "light" | "dark" | "system";
5
+ export const themeKey = "babavoss.theme";
6
+
7
+ /** Runs in the head of every page, before anything paints: a remembered choice never flashes the other theme. */
8
+ export const early = `try{var t=localStorage.getItem(${JSON.stringify(themeKey)});if(t==="light"||t==="dark")document.documentElement.dataset.theme=t}catch(e){}`;
9
+
10
+ export function theme(): Theme {
11
+ try {
12
+ const v = localStorage.getItem(themeKey);
13
+ if (v === "light" || v === "dark") return v;
14
+ } catch {}
15
+ return "system";
16
+ }
17
+
18
+ export function setTheme(next: Theme): void {
19
+ try {
20
+ if (next === "system") localStorage.removeItem(themeKey);
21
+ else localStorage.setItem(themeKey, next);
22
+ } catch {}
23
+ if (next === "system") delete document.documentElement.dataset.theme;
24
+ else document.documentElement.dataset.theme = next;
25
+ }