@popcorn245/cornfield 0.29.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/mentions.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * @module core/mentions
3
3
  *
4
4
  * How a thread points at the map (spec 0005, D7). Pure: no I/O, no DOM, no Node built-ins, so the server (a hook's
5
- * payload) and the explorer (the lights, a node's "Mentioned in") load the same file.
5
+ * payload) and the explorer (the lights, a node's "Threads") load the same file.
6
6
  *
7
7
  * - **Mentions.** People write `[[core-server-auth]]` (a node's id) or `[[server/auth.js]]` (a repo path) in prose.
8
8
  * `parseMentions` reads them outside code: a fenced block and an inline code span are text about code, not links.
package/core/strings.js CHANGED
@@ -14,10 +14,10 @@
14
14
  export const STRINGS = Object.freeze({
15
15
  // The header
16
16
  layers: 'Layers',
17
- dataFlow: 'Data flow',
17
+ dataFlow: 'Flow',
18
18
  house: 'House',
19
19
  proposals: 'Proposals',
20
- issuesAndPrs: 'Issues & PRs',
20
+ issuesAndPrs: 'Work',
21
21
  searchPlaceholder: 'Search...',
22
22
  signOut: 'Sign out',
23
23
  poweredBy: 'powered by cornfield',
@@ -48,9 +48,8 @@ export const STRINGS = Object.freeze({
48
48
  continueRun: 'Continue',
49
49
  reply: 'Reply',
50
50
  // The node panel
51
- propsTitle: 'Properties & Attributes',
52
- detailsTitle: 'Details',
53
- openRoute: 'Open Live Route',
51
+ openRoute: 'Open route',
52
+ startRun: 'Start a run',
54
53
  copySpec: 'Copy Spec',
55
54
  // The hint, loading and errors
56
55
  hintInspect: 'Tap node to inspect live spec',
@@ -0,0 +1,89 @@
1
+ /**
2
+ * @module explorer/account-menu
3
+ *
4
+ * The one menu at the right of the header (`#account-btn` and `#account-menu`): who is signed in, Theme, Freeform layout, Review tokens,
5
+ * Proposals, the links, Sign out, and what powers it. A disclosure: `aria-expanded` says whether it is open, Escape closes it with
6
+ * the focus back on the button, and a click outside it or a Tab out of it closes it too. What fills it is in plugins.js (the person, the links,
7
+ * the footer), theme.js (the Theme segment), main.js (Freeform), proposal.js (the list of proposals) and review-tokens.js.
8
+ */
9
+
10
+ const $ = (id) => document.getElementById(id);
11
+
12
+ /** Whether the menu is open */
13
+ export function accountMenuOpen() {
14
+ const menu = $('account-menu');
15
+ return !!menu && !menu.hidden;
16
+ }
17
+
18
+ function set(open) {
19
+ const menu = $('account-menu');
20
+ const btn = $('account-btn');
21
+ if (menu) menu.hidden = !open;
22
+ if (btn) btn.setAttribute('aria-expanded', String(open));
23
+ }
24
+
25
+ /** Opens the menu */
26
+ export function openAccountMenu() {
27
+ set(true);
28
+ }
29
+
30
+ /**
31
+ * Closes the menu
32
+ * @param {{ restoreFocus?: boolean }} [opts] the focus goes back to the button (the default), unless something else takes it (a dialog)
33
+ */
34
+ export function closeAccountMenu({ restoreFocus = true } = {}) {
35
+ if (!accountMenuOpen()) return;
36
+ const had = !!document.activeElement && !!$('account-menu') && $('account-menu').contains(document.activeElement);
37
+ set(false);
38
+ const btn = $('account-btn');
39
+ if (restoreFocus && btn && had) btn.focus();
40
+ }
41
+
42
+ function onClick(e) {
43
+ const btn = $('account-btn');
44
+ const menu = $('account-menu');
45
+ if (!btn || !menu) return;
46
+ const target = e.target;
47
+ if (btn.contains(target)) {
48
+ if (accountMenuOpen()) closeAccountMenu(); else openAccountMenu();
49
+ return;
50
+ }
51
+ if (!accountMenuOpen()) return;
52
+ if (!menu.contains(target)) { closeAccountMenu({ restoreFocus: false }); return; }
53
+ // What opens something of its own takes the focus there; a link or a proposal chosen ends the menu. Theme, Freeform and the list of proposals keep it open
54
+ const item = target.closest ? target.closest('#tokens-btn, [data-action="open-proposal"], a[href], [data-corn="sign-out"]') : null;
55
+ if (!item) return;
56
+ closeAccountMenu({ restoreFocus: !item.matches('#tokens-btn') });
57
+ }
58
+
59
+ function onKey(e) {
60
+ if (e.key !== 'Escape' || !accountMenuOpen()) return;
61
+ e.preventDefault();
62
+ closeAccountMenu();
63
+ }
64
+
65
+ /** Leaving the menu with Tab closes it (focus is not left on a hidden control) */
66
+ function onFocusOut(e) {
67
+ const menu = $('account-menu');
68
+ const btn = $('account-btn');
69
+ if (!accountMenuOpen() || !e.relatedTarget) return;
70
+ if (!menu.contains(e.relatedTarget) && !btn.contains(e.relatedTarget)) closeAccountMenu({ restoreFocus: false });
71
+ }
72
+
73
+ let wired = false;
74
+ /** Wires the button and the menu, once (main.js) */
75
+ export function initAccountMenu() {
76
+ if (wired) return;
77
+ wired = true;
78
+ document.addEventListener('click', onClick);
79
+ document.addEventListener('keydown', onKey);
80
+ const root = $('account-btn') && $('account-btn').parentElement;
81
+ if (root) root.addEventListener('focusout', onFocusOut);
82
+ }
83
+
84
+ /** For tests: wire again on a fresh page */
85
+ export function resetAccountMenuForTests() {
86
+ document.removeEventListener('click', onClick);
87
+ document.removeEventListener('keydown', onKey);
88
+ wired = false;
89
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @module explorer/capped
3
+ *
4
+ * A long list in the node panel shows its first few items and a quiet "and 15 more" button that opens the rest in place
5
+ * (a disclosure: `aria-expanded`). `toggleCapped` is the click handler panels.js binds once on the panel.
6
+ */
7
+
8
+ /** Items shown before the rest folds away */
9
+ export const CAP = 5;
10
+ let counter = 0;
11
+
12
+ /**
13
+ * The items as HTML, folded after CAP when there are more.
14
+ * @param {string[]} items already-escaped HTML, one per item
15
+ */
16
+ export function capped(items) {
17
+ if (items.length <= CAP + 1) return items.join(''); // "and 1 more" saves nothing
18
+ const id = `hx-more-${++counter}`;
19
+ const rest = items.length - CAP;
20
+ return `${items.slice(0, CAP).join('')}<div class="hx-more" id="${id}" hidden>${items.slice(CAP).join('')}</div><button type="button" class="hx-btn hx-btn--quiet hx-textact hx-more-btn" data-more="${id}" data-rest="${rest}" aria-expanded="false" aria-controls="${id}">and ${rest} more</button>`;
21
+ }
22
+
23
+ /** Opens or folds the list a "more" button belongs to; true when the click was one */
24
+ export function toggleCapped(target) {
25
+ const button = target.closest && target.closest('[data-more]');
26
+ if (!button) return false;
27
+ const list = button.ownerDocument.getElementById(button.dataset.more);
28
+ const open = button.getAttribute('aria-expanded') !== 'true';
29
+ if (list) list.hidden = !open;
30
+ button.setAttribute('aria-expanded', String(open));
31
+ button.textContent = open ? 'Show fewer' : `and ${button.dataset.rest} more`;
32
+ return true;
33
+ }
@@ -42,13 +42,6 @@ h1, h2, h3, p { margin: 0; }
42
42
  -webkit-backdrop-filter: blur(var(--corn-blur));
43
43
  border-bottom: var(--corn-border) solid var(--corn-line);
44
44
  }
45
- .gradient-text {
46
- background: var(--corn-brand-gradient);
47
- -webkit-background-clip: text;
48
- background-clip: text;
49
- -webkit-text-fill-color: transparent;
50
- display: inline-block;
51
- }
52
45
 
53
46
  ::-webkit-scrollbar { width: 5px; height: 5px; }
54
47
  ::-webkit-scrollbar-track { background: transparent; }
@@ -75,32 +68,146 @@ h1, h2, h3, p { margin: 0; }
75
68
  /* Headings and titles take the display family (the same as the body unless a brand sets it) */
76
69
  .hx-title, .hx-drawer-title, .hx-block-title, .hx-menu-title, .hx-confirm-title, .hx-mockup-title { font-family: var(--corn-font-display); }
77
70
 
78
- /* ---- header ------------------------------------------------------------------------------ */
71
+ /* ==== the header (CF-41) ===============================================================================================
72
+ Left to right: the brand, the View switch (Map, Flow, House, Fit), the Layers chip, the live chip; at the right the search,
73
+ the Work toggle and the one account menu (account-menu.js). Everything reads the --corn-* tokens. From 768px it is a desktop
74
+ header; below it is a phone's: Map, Flow, House, a search icon and the account initial, with the Layers chip, the live chip
75
+ and Fit floating on the map (placed from the header's corner). The header has no backdrop-filter of its own: it sits above
76
+ the map, not over it, and one would keep its menus' .glass blur from working (they would show the map through). */
79
77
  .hx-header {
78
+ position: relative;
80
79
  flex: none;
81
80
  height: 56px;
82
81
  display: flex;
83
82
  align-items: center;
84
83
  justify-content: space-between;
85
84
  gap: var(--corn-space-3);
86
- padding: 0 var(--corn-space-3);
85
+ padding: 0 var(--corn-space-4);
87
86
  z-index: 20;
88
- background: color-mix(in srgb, var(--corn-ground) 88%, transparent);
89
- backdrop-filter: blur(var(--corn-blur));
90
- -webkit-backdrop-filter: blur(var(--corn-blur));
87
+ background: var(--corn-surface-1);
91
88
  border-bottom: var(--corn-border) solid var(--corn-line);
92
89
  }
93
90
  .hx-header-left, .hx-header-right { display: flex; align-items: center; gap: var(--corn-space-3); min-width: 0; }
94
- .hx-header-right { flex: none; gap: var(--corn-space-1); }
95
- @media (min-width: 640px) { .hx-header { padding: 0 var(--corn-space-5); } .hx-header-left { gap: var(--corn-space-4); } .hx-header-right { gap: var(--corn-space-3); } }
91
+ .hx-header-right { flex: none; }
92
+ .hx-only-wide { display: none; }
93
+ .hx-only-mobile { display: inline-flex; }
94
+
95
+ /* The brand: logo and wordmark; a click resets the view */
96
+ .hx-brand { display: flex; align-items: center; gap: var(--corn-space-3); flex: none; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; }
97
+ .hx-title { font-size: var(--corn-text-base); font-weight: 650; letter-spacing: -0.01em; color: var(--corn-text); }
98
+ .hx-mark { flex: none; }
99
+ .hx-mark-bg { fill: var(--corn-accent); }
100
+ .hx-mark-fg { fill: var(--corn-text-on-accent); }
101
+ .hx-mark-line { fill: none; stroke: var(--corn-text-on-accent); stroke-width: 1.5; }
102
+
103
+ /* The View switch: Map, Flow and House (aria-pressed says which is on), and Fit at its end */
104
+ .hx-view { display: inline-flex; align-items: center; flex: none; padding: var(--corn-space-1); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); }
105
+ .hx-view-btn, .hx-view-fit { display: inline-flex; align-items: center; justify-content: center; height: 28px; border: 0; border-radius: var(--corn-radius-sm); background: transparent; color: var(--corn-text-2); font-size: var(--corn-text-sm); font-weight: 500; white-space: nowrap; }
106
+ .hx-view-btn { padding: 0 var(--corn-space-4); }
107
+ .hx-view-btn:hover, .hx-view-fit:hover { background: var(--corn-surface-3); color: var(--corn-text); }
108
+ .hx-view-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent); font-weight: 600; }
109
+ .hx-view-fit { width: 28px; margin-left: var(--corn-space-1); border-left: var(--corn-border) solid var(--corn-line); border-radius: 0 var(--corn-radius-sm) var(--corn-radius-sm) 0; color: var(--corn-text-3); }
110
+
111
+ /* The Layers chip: "Layers · 13 of 20" */
112
+ .hx-layers-chip { display: inline-flex; align-items: center; gap: var(--corn-space-1); height: 30px; padding: 0 var(--corn-space-4); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-2); font-size: var(--corn-text-sm); white-space: nowrap; }
113
+ .hx-layers-chip:hover, .hx-layers-chip[aria-expanded="true"] { background: var(--corn-surface-3); color: var(--corn-text); }
114
+ .hx-layers-count { color: var(--corn-text-3); }
115
+ .hx-layers-chip--dim { border-color: var(--corn-line-soft); }
116
+ .hx-layers-chip--dim, .hx-layers-chip--dim .hx-layers-count { color: var(--corn-text-3); }
117
+
118
+ /* Search: the field with its key hint (a desktop's), an icon on a phone */
119
+ .hx-search { display: none; align-items: center; gap: var(--corn-space-3); width: 260px; min-width: 120px; height: 32px; padding: 0 var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-3); }
120
+ .hx-search:focus-within { border-color: var(--corn-focus); outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: 2px; }
121
+ .hx-search-icon { flex: none; }
122
+ .hx-search-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); outline: none; user-select: text; }
123
+ .hx-search-input::placeholder { color: var(--corn-text-3); }
124
+ .hx-kbd { flex: none; padding: 0 var(--corn-space-1); border-radius: var(--corn-radius-xs); border: var(--corn-border) solid var(--corn-line); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); color: var(--corn-text-3); }
125
+ .hx-search:focus-within .hx-kbd { display: none; }
126
+ .hx-hdr-icon { align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text-2); }
127
+ .hx-hdr-icon:hover { background: var(--corn-surface-3); color: var(--corn-text); }
128
+
129
+ /* The Work toggle: opens the Work panel (forge-panel.js says in the tag which pull request is lit) */
130
+ .hx-work { display: inline-flex; align-items: center; gap: var(--corn-space-2); height: 32px; padding: 0 var(--corn-space-4); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-2); font-size: var(--corn-text-sm); font-weight: 600; white-space: nowrap; }
131
+ .hx-work:hover { background: var(--corn-surface-3); color: var(--corn-text); }
132
+ .hx-work[aria-expanded="true"] { background: var(--corn-accent); border-color: var(--corn-accent-text); color: var(--corn-text-on-accent); }
133
+ .hx-forge-lit { padding: 0 var(--corn-space-2); border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-warn); background: var(--corn-ground); color: var(--corn-warn); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); }
134
+
135
+ /* The account button: the initial of who is signed in (a menu glyph when nobody is) */
136
+ .hx-account-btn { display: inline-flex; align-items: center; gap: var(--corn-space-3); height: 32px; padding: 0 var(--corn-space-2) 0 var(--corn-space-1); border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-2); }
137
+ .hx-account-btn:hover { background: var(--corn-surface-3); color: var(--corn-text); }
138
+ .hx-account-btn[aria-expanded="true"] { border-color: var(--corn-accent-text); }
139
+ .hx-avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--corn-accent); color: var(--corn-text-on-accent); font-size: var(--corn-text-xs); font-weight: 700; }
140
+ .hx-avatar:empty::before { content: "\2630"; }
141
+
142
+ /* The account menu: a panel under the button */
143
+ .hx-menu.hx-account-menu { left: auto; right: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); width: 264px; padding: var(--corn-space-2); font-size: var(--corn-text-sm); user-select: none; }
144
+ .hx-account-who { padding: var(--corn-space-3) var(--corn-space-4) var(--corn-space-2); color: var(--corn-text-3); font-size: var(--corn-text-sm); overflow-wrap: anywhere; }
145
+ .hx-account-row { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); padding: var(--corn-space-1) var(--corn-space-4); }
146
+ .hx-account-label { color: var(--corn-text-2); }
147
+ .hx-account-seg { display: inline-flex; padding: calc(var(--corn-space-1) / 2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); }
148
+ .hx-account-seg-btn { height: 24px; padding: 0 var(--corn-space-3); border: 0; border-radius: var(--corn-radius-xs); background: transparent; color: var(--corn-text-2); font-size: var(--corn-text-xs); font-weight: 500; }
149
+ .hx-account-seg-btn:hover { color: var(--corn-text); }
150
+ .hx-account-seg-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent); font-weight: 600; }
151
+ .hx-account-select { display: block; width: calc(100% - var(--corn-space-5)); height: 30px; margin: 0 var(--corn-space-3); padding: 0 var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); }
152
+ .hx-account-item { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); width: 100%; min-height: 32px; padding: 0 var(--corn-space-4); border: 0; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text); font-size: var(--corn-text-sm); text-align: left; text-decoration: none; }
153
+ .hx-account-item:hover { background: var(--corn-surface-3); }
154
+ .hx-account-item--sub { padding-left: var(--corn-space-6); color: var(--corn-text-2); }
155
+ .hx-account-item svg { flex: none; color: var(--corn-text-3); }
156
+ .hx-account-menu .cf-sign-out { margin: 0; }
157
+ .hx-account-menu .cf-sign-out .hx-account-item { color: var(--corn-text-2); }
158
+ .hx-account-menu .hx-links { display: flex; flex-direction: column; margin-top: var(--corn-space-2); padding-top: var(--corn-space-2); border-top: var(--corn-border) solid var(--corn-line); }
159
+ .hx-account-menu .hx-links:empty { display: none; }
160
+ .hx-account-foot { margin: var(--corn-space-1) 0 0; padding: var(--corn-space-2) var(--corn-space-4) var(--corn-space-1); color: var(--corn-text-3); font-size: var(--corn-text-xs); }
161
+ .hx-account-foot a { color: inherit; text-decoration: none; }
162
+ .hx-account-foot a:hover { color: var(--corn-text-2); text-decoration: underline; }
163
+ .hx-account-foot:empty { display: none; }
164
+ /* Freeform layout is a switch */
165
+ .hx-switch { position: relative; flex: none; width: 28px; height: 16px; border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-3); }
166
+ .hx-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--corn-text-3); transition: transform 0.15s; }
167
+ [aria-checked="true"] > .hx-switch { background: var(--corn-accent); border-color: var(--corn-accent); }
168
+ [aria-checked="true"] > .hx-switch::after { background: var(--corn-text-on-accent); transform: translateX(12px); }
169
+ @media (prefers-reduced-motion: reduce) { .hx-switch::after { transition: none; } }
170
+ /* The Proposals list opens inside the menu, under its entry, until the Specs tab of the Work panel takes it over */
171
+ .hx-account-menu .hx-menu--proposals { position: static; width: auto; max-width: none; max-height: 40vh; margin: var(--corn-space-1) 0; padding: var(--corn-space-2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); box-shadow: none; }
96
172
 
97
- .hx-brand { display: flex; align-items: center; gap: var(--corn-space-3); flex: none; padding: 0; border: 0; background: none; }
98
- .hx-title { font-size: var(--corn-text-base); font-weight: 900; letter-spacing: -0.025em; }
99
- .hx-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--corn-ok); box-shadow: 0 0 var(--corn-glow) color-mix(in srgb, var(--corn-ok) 50%, transparent); animation: hx-pulse 2s ease-in-out infinite; flex: none; }
100
- .hx-live-dot--ping { width: 8px; height: 8px; animation-name: hx-ping; }
101
- @keyframes hx-pulse { 50% { opacity: 0.5; } }
102
- @keyframes hx-ping { 0% { transform: scale(1); opacity: 1; } 75%, 100% { transform: scale(1.8); opacity: 0.2; } }
103
- @media (prefers-reduced-motion: reduce) { .hx-live-dot { animation: none; } }
173
+ @media (min-width: 768px) {
174
+ .hx-header { height: 52px; padding: 0 var(--corn-space-5); gap: var(--corn-space-5); }
175
+ .hx-header-left { gap: var(--corn-space-5); }
176
+ .hx-header-right { gap: var(--corn-space-3); }
177
+ .hx-brand { min-width: 0; min-height: 0; }
178
+ .hx-only-wide { display: inline; }
179
+ .hx-only-mobile { display: none; }
180
+ .hx-search { display: flex; }
181
+ }
182
+ /* Not for a desktop: the brand keeps its logo and shows its wordmark; with no wordmark the logo stands alone (the button keeps its name) */
183
+ @media (max-width: 767px) {
184
+ .hx-title:not(:has([data-corn="brand-wordmark"])) { display: none; }
185
+ .hx-header { padding: 0 var(--corn-space-3); }
186
+ /* Too narrow for the row (320px, or a repo's longer words): the left scrolls sideways rather than run under the right.
187
+ The padding keeps the focus rings inside the scrolled box; what sits on the map is placed from the header, so it is not clipped */
188
+ .hx-header-left { gap: var(--corn-space-1); margin-inline: calc(var(--corn-space-1) * -1); padding: var(--corn-space-1); overflow-x: auto; scrollbar-width: none; }
189
+ .hx-header-left::-webkit-scrollbar { display: none; }
190
+ .hx-header-right { gap: var(--corn-space-1); }
191
+ .hx-view { padding: 0; }
192
+ .hx-view-btn { min-width: 44px; height: 44px; padding: 0 var(--corn-space-2); }
193
+ .hx-view-fit { position: absolute; top: calc(100% + var(--corn-space-4)); right: var(--corn-space-4); width: 44px; height: 44px; margin: 0; border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-pill); background: var(--corn-surface-1); color: var(--corn-text-2); box-shadow: var(--corn-shadow); }
194
+ .hx-header .hx-layers { position: absolute; top: calc(100% + var(--corn-space-4)); left: var(--corn-space-4); }
195
+ .hx-layers-chip { height: 44px; padding: 0 var(--corn-space-5); border-radius: var(--corn-radius-pill); background: var(--corn-surface-1); box-shadow: var(--corn-shadow); }
196
+ .hx-layers .hx-menu { width: min(288px, calc(100vw - 24px)); }
197
+ /* The live chip sits on the map too, left of Fit */
198
+ .hx-header .hx-live { position: absolute; top: calc(100% + var(--corn-space-4)); right: calc(var(--corn-space-4) + var(--corn-space-3) + 44px); }
199
+ .hx-work { height: 44px; min-width: 44px; justify-content: center; padding: 0 var(--corn-space-3); }
200
+ .hx-forge-lit { display: none; }
201
+ .hx-account-btn { width: 44px; height: 44px; justify-content: center; padding: 0; border: 0; background: none; }
202
+ .hx-account-caret { display: none; }
203
+ .hx-avatar { width: 28px; height: 28px; }
204
+ .hx-menu.hx-account-menu { width: min(300px, calc(100vw - 24px)); }
205
+ .hx-account-item, .hx-account-row { min-height: 44px; }
206
+ .hx-account-seg-btn { height: 44px; padding: 0 var(--corn-space-4); }
207
+ .hx-account-select { height: 44px; }
208
+ .hx-stage .hx-hint { top: 68px; }
209
+ }
210
+ /* ==== end of the header ============================================================================================ */
104
211
 
105
212
  .hx-btn {
106
213
  display: inline-flex;
@@ -117,22 +224,13 @@ h1, h2, h3, p { margin: 0; }
117
224
  white-space: nowrap;
118
225
  }
119
226
  .hx-btn:hover { background: var(--corn-surface-3); color: var(--corn-text); }
120
- .hx-btn:focus-visible, .hx-toggle-row:focus-visible, .hx-zoom-btn:focus-visible, .hx-textbtn:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: 2px; }
227
+ .hx-btn:focus-visible, .hx-toggle-row:focus-visible, .hx-textbtn:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: 2px; }
121
228
  .hx-btn--active, .hx-btn--active:hover { background: var(--corn-accent); border-color: var(--corn-accent-text); color: var(--corn-text-on-accent); box-shadow: var(--corn-shadow-sm); }
122
- .hx-btn--dim { color: var(--corn-text-3); border-color: var(--corn-line-soft); } /* dimmed by its colours, not by opacity: opacity would take the text below AA */
123
- .hx-btn--dim:hover { color: var(--corn-text-2); }
124
229
  .hx-btn--quiet { font-weight: 500; color: var(--corn-text-3); }
125
230
  .hx-btn--icon { width: 28px; height: 28px; padding: 0; justify-content: center; font-size: var(--corn-text-base); }
126
- .hx-btn--preset { border-color: color-mix(in srgb, var(--corn-hue-orange) 35%, transparent); color: var(--corn-hue-orange); }
127
- .hx-btn--preset:hover { background: color-mix(in srgb, var(--corn-hue-orange) 15%, transparent); color: color-mix(in srgb, var(--corn-hue-orange) 60%, var(--corn-text)); }
128
- .hx-btn--preset.hx-btn--active { background: var(--corn-hue-orange); border-color: var(--corn-hue-orange); color: var(--corn-ground); }
129
231
  .hx-btn--rom { width: 100%; justify-content: center; margin-top: var(--corn-space-1); padding: var(--corn-space-2); background: color-mix(in srgb, var(--corn-hue-fuchsia) 20%, transparent); border-color: color-mix(in srgb, var(--corn-hue-fuchsia) 40%, transparent); color: color-mix(in srgb, var(--corn-hue-fuchsia) 60%, var(--corn-text)); font-weight: 700; }
130
232
  .hx-btn--rom:hover { background: color-mix(in srgb, var(--corn-hue-fuchsia) 30%, transparent); }
131
- .hx-btn--copy { padding: var(--corn-space-3) var(--corn-space-4); border-radius: var(--corn-radius); border: 0; }
132
233
 
133
- .hx-dots { display: inline-flex; }
134
- .hx-dots span { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 var(--corn-border) var(--corn-ground); margin-left: calc(var(--corn-space-1) * -1); }
135
- .hx-dots span:first-child { margin-left: 0; }
136
234
 
137
235
  .hx-input {
138
236
  width: 128px;
@@ -151,27 +249,7 @@ h1, h2, h3, p { margin: 0; }
151
249
  .hx-input::placeholder { color: var(--corn-text-3); }
152
250
  .hx-input--wide, .hx-input--wide:focus { width: 100%; flex: 1; }
153
251
 
154
- .hx-zoom { display: none; align-items: center; padding: calc(var(--corn-space-1) / 2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); }
155
- .hx-zoom-btn { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text-3); font-weight: 700; font-size: var(--corn-text-sm); }
156
- .hx-zoom-btn:hover { background: var(--corn-surface-2); color: var(--corn-text); }
157
- .hx-zoom-btn--accent { color: var(--corn-accent-text); }
158
-
159
- .hx-chip-link { display: none; align-items: center; gap: var(--corn-space-1); padding: var(--corn-space-1) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid; font-size: var(--corn-text-sm); font-weight: 500; text-decoration: none; transition: background 0.15s; }
160
- .hx-dot-sm { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
161
- .hx-chip-link--indigo { color: var(--corn-accent-text); background: color-mix(in srgb, var(--corn-accent-hover) 10%, transparent); border-color: color-mix(in srgb, var(--corn-accent-hover) 20%, transparent); }
162
- .hx-chip-link--pink { color: var(--corn-hue-pink); background: color-mix(in srgb, var(--corn-hue-pink) 10%, transparent); border-color: color-mix(in srgb, var(--corn-hue-pink) 20%, transparent); }
163
- .hx-chip-link--purple { color: var(--corn-edit-text); background: color-mix(in srgb, var(--corn-edit) 10%, transparent); border-color: color-mix(in srgb, var(--corn-edit) 20%, transparent); }
164
- .hx-chip-link:hover { background: var(--corn-line); }
165
252
 
166
- .hx-search { display: none; }
167
- .hx-only-wide { display: none; }
168
- @media (min-width: 640px) {
169
- .hx-search { display: block; }
170
- .hx-zoom { display: flex; }
171
- .hx-only-mobile { display: none !important; }
172
- }
173
- @media (min-width: 768px) { .hx-only-wide { display: inline; } }
174
- @media (min-width: 1280px) { .hx-chip-link { display: inline-flex; } }
175
253
 
176
254
  /* ---- layers menu ------------------------------------------------------------------------- */
177
255
  .hx-menu-wrap { position: relative; flex: none; }
@@ -234,8 +312,6 @@ h1, h2, h3, p { margin: 0; }
234
312
  .hx-hint span:last-child { overflow: hidden; text-overflow: ellipsis; }
235
313
  @media (min-width: 640px) { .hx-hint { font-size: var(--corn-text-xs); } }
236
314
 
237
- .hx-mobile-zoom { position: absolute; bottom: 16px; right: 12px; display: flex; flex-direction: column; gap: var(--corn-space-1); padding: var(--corn-space-1); border-radius: var(--corn-radius); z-index: 20; }
238
- .hx-mobile-zoom .hx-zoom-btn { width: 32px; height: 32px; background: var(--corn-surface-2); color: var(--corn-text); border-radius: var(--corn-radius-sm); }
239
315
 
240
316
  .hx-mobile-search { position: absolute; top: 56px; left: 0; right: 0; display: flex; align-items: center; gap: var(--corn-space-3); padding: var(--corn-space-3); z-index: 30; }
241
317
 
@@ -267,22 +343,16 @@ h1, h2, h3, p { margin: 0; }
267
343
  .hx-drawer-handle span { width: 48px; height: 6px; border-radius: var(--corn-radius-pill); background: var(--corn-surface-3); }
268
344
  .hx-drawer-body { flex: 1; display: flex; flex-direction: column; gap: var(--corn-space-5); padding: calc(var(--corn-space-5) + var(--corn-space-1)); overflow-y: auto; user-select: text; }
269
345
  @media (min-width: 640px) { .hx-drawer-body { padding: var(--corn-space-6); } }
270
- .hx-drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: var(--corn-space-4); border-bottom: var(--corn-border) solid var(--corn-surface-2); }
271
- .hx-drawer-title-wrap { display: flex; align-items: center; gap: var(--corn-space-3); min-width: 0; }
346
+ .hx-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--corn-space-3); }
272
347
  .hx-drawer-title { font-size: var(--corn-text-lg); font-weight: 700; color: var(--corn-text); overflow-wrap: anywhere; }
273
- .hx-badge { flex: none; padding: calc(var(--corn-space-1) / 2) var(--corn-space-3); border-radius: var(--corn-radius-xs); border: var(--corn-border) solid color-mix(in srgb, var(--corn-accent-hover) 30%, transparent); background: var(--corn-accent-soft); color: var(--corn-accent-text); font-size: var(--corn-text-2xs); font-weight: 700; letter-spacing: 0.025em; }
274
348
  .hx-close { width: 32px; height: 32px; flex: none; border: 0; border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text-3); font-weight: 700; font-size: var(--corn-text-base); }
275
349
  .hx-close:hover { color: var(--corn-text); }
276
- .hx-lead { font-size: var(--corn-text-sm); line-height: 1.6; }
350
+ .hx-lead { font-size: var(--corn-text-base); line-height: 1.5; color: var(--corn-text-2); }
277
351
 
278
352
  .hx-block { display: flex; flex-direction: column; gap: var(--corn-space-3); }
279
353
  .hx-block-title { font-size: var(--corn-text-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--corn-text-2); }
280
- .hx-props { display: flex; flex-direction: column; gap: var(--corn-space-2); font-family: var(--corn-mono); font-size: var(--corn-text-xs); }
281
- .hx-prop { padding: var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); }
282
- .hx-prop-head { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); }
283
- .hx-prop-head .hx-faint { font-size: var(--corn-text-2xs); }
284
- .hx-prop > .hx-faint { font-size: var(--corn-text-2xs); margin-top: calc(var(--corn-space-1) / 2); }
285
- .hx-meta { display: flex; flex-direction: column; gap: var(--corn-space-1); padding: var(--corn-space-4); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); font-family: var(--corn-mono); font-size: var(--corn-text-xs); color: var(--corn-text-3); overflow-wrap: anywhere; }
354
+ .hx-meta { display: flex; flex-direction: column; gap: var(--corn-space-5); font-size: var(--corn-text-md); color: var(--corn-text-2); overflow-wrap: anywhere; }
355
+ .hx-meta > :empty { display: none; } /* no live data, no threads: no gap where they would be */
286
356
 
287
357
  .hx-sec { margin-top: var(--corn-space-2); padding-top: var(--corn-space-2); border-top: var(--corn-border) solid var(--corn-line); }
288
358
  .hx-line { display: flex; align-items: flex-start; gap: var(--corn-space-2); padding: calc(var(--corn-space-1) / 2) 0; }
@@ -312,15 +382,11 @@ h1, h2, h3, p { margin: 0; }
312
382
  .hx-chip--warning { background: var(--corn-warn); }
313
383
  .hx-chip--danger, .hx-chip--success, .hx-chip--warning { color: var(--corn-ground); }
314
384
 
315
- .hx-drawer-foot { display: flex; gap: var(--corn-space-3); flex: none; padding: var(--corn-space-5) var(--corn-space-5) calc(var(--corn-space-5) + env(safe-area-inset-bottom, 0px)); border-top: var(--corn-border) solid var(--corn-surface-2); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); }
316
- .hx-open { flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--corn-space-2); padding: var(--corn-space-3) var(--corn-space-4); border-radius: var(--corn-radius); background: var(--corn-accent); color: var(--corn-text-on-accent); font-size: var(--corn-text-sm); font-weight: 600; text-align: center; text-decoration: none; box-shadow: var(--corn-shadow-sm); transition: background 0.15s; }
385
+ .hx-drawer-foot { display: flex; align-items: stretch; gap: var(--corn-space-3); flex: none; padding: var(--corn-space-4) var(--corn-space-5) calc(var(--corn-space-4) + env(safe-area-inset-bottom, 0px)); border-top: var(--corn-border) solid var(--corn-surface-2); }
386
+ .hx-open { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: var(--corn-space-2); min-height: 36px; padding: 0 var(--corn-space-4); border-radius: var(--corn-radius-sm); background: var(--corn-accent); color: var(--corn-text-on-accent); font-size: var(--corn-text-sm); font-weight: 600; text-align: center; text-decoration: none; transition: background 0.15s; }
317
387
  .hx-open:hover { background: var(--corn-accent-hover); }
318
- .hx-open:not([href]) { background: var(--corn-surface-2); color: var(--corn-text-3); }
319
388
 
320
389
  /* ---- proposals (proposal.js): picker, bar, marks, panel rows ----------------------------------- */
321
- .hx-btn--proposal { border-color: color-mix(in srgb, var(--corn-added) 35%, transparent); color: var(--corn-added-text); }
322
- .hx-btn--proposal:hover { background: color-mix(in srgb, var(--corn-added) 14%, transparent); color: var(--corn-added-text); }
323
- .hx-btn--proposal[aria-expanded="true"] { background: color-mix(in srgb, var(--corn-added) 20%, transparent); border-color: var(--corn-added); color: var(--corn-added-text); }
324
390
 
325
391
  .hx-menu--proposals { width: 360px; }
326
392
  .hx-proposal-list { display: flex; flex-direction: column; gap: var(--corn-space-1); }
@@ -557,8 +623,6 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
557
623
  .hx-sheet-handle:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: -2px; border-radius: var(--corn-radius); }
558
624
  .hx-backdrop { display: none; }
559
625
  .hx-stage[data-sheet-open="drawer"] .hx-backdrop:not([hidden]) { display: block; }
560
- /* The zoom buttons ride above the sheets */
561
- .hx-mobile-zoom { bottom: calc(16px + var(--hx-covered, 0px)); }
562
626
 
563
627
  /* The proposal bar */
564
628
  .hx-proposal-bar { max-height: 50dvh; overflow-y: auto; padding: 0 var(--corn-space-4) var(--corn-space-3); }
@@ -577,9 +641,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
577
641
  .hx-drawer { max-height: 60dvh; }
578
642
  .hx-drawer[data-sheet-state="peek"] .hx-drawer-body { flex: none; padding: 0 var(--corn-space-5) var(--corn-space-3); gap: 0; overflow: hidden; }
579
643
  .hx-drawer[data-sheet-state="peek"] .hx-drawer-body > :not(.hx-drawer-head), .hx-drawer[data-sheet-state="peek"] .hx-drawer-foot { display: none; }
580
- .hx-drawer[data-sheet-state="peek"] .hx-drawer-head { padding-bottom: 0; border-bottom: 0; }
581
644
  .hx-drawer[data-sheet-state="peek"] .hx-drawer-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
582
- .hx-drawer[data-sheet-state="peek"] .hx-drawer-title-wrap { flex: 1; }
583
645
  }
584
646
 
585
647
  @media (prefers-reduced-motion: reduce) {
@@ -610,11 +672,11 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
610
672
  .hx-live-help code { font-family: var(--corn-mono); font-size: var(--corn-text-2xs); color: var(--corn-text-2); overflow-wrap: anywhere; }
611
673
  .hx-live-second { font-size: var(--corn-text-xs); }
612
674
  .hx-live-buttons { display: inline-flex; gap: var(--corn-space-2); }
613
- @media (max-width: 639px) {
614
- .hx-menu--live { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; max-width: none; }
675
+ /* On a phone the chip is its dot on the map (its line is in the menu), and the menu spans the screen under it */
676
+ @media (max-width: 767px) {
677
+ .hx-live-chip { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: var(--corn-radius-pill); background: var(--corn-surface-1); box-shadow: var(--corn-shadow); }
678
+ .hx-menu--live { position: fixed; top: calc(56px + var(--corn-space-4) + 44px); left: 12px; right: 12px; width: auto; max-width: none; }
615
679
  }
616
- /* On a phone the chip is its dot (its line is in the menu), and the header keeps one row */
617
- @media (max-width: 767px) { .hx-live-chip { width: 28px; height: 28px; padding: 0; justify-content: center; } }
618
680
 
619
681
  /* ── Checked scenarios (PHY-10, check.js): the step's state on the player bar and the phone's sheet ──
620
682
  The pill sits in the head, so the phone's peek shows it; the line and the As row are the expanded part. */
@@ -672,37 +734,9 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
672
734
  .hx-drawer-title:focus { outline: none; }
673
735
  .hx-drawer-title:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: 2px; }
674
736
 
675
- /* Sign out (when sign-in is on): a form in the header, inline with the links */
676
- .cf-sign-out { display: inline-flex; margin: 0; }
677
- .cf-sign-out-icon { display: none; }
678
- /* A narrow phone, signed in, with Issues & PRs: the header keeps one row by showing the brand's dot without its
679
- title (the button keeps its name) and Sign out as its icon (its words stay for a screen reader), so every control
680
- keeps at least a 24px target (WCAG 2.5.8) */
681
- @media (max-width: 479px) {
682
- .hx-brand .hx-title { display: none; }
683
- .hx-brand { min-width: 24px; min-height: 24px; justify-content: center; }
684
- .hx-header .hx-btn { min-width: 24px; }
685
- .cf-sign-out .hx-btn { width: 28px; height: 28px; padding: 0; justify-content: center; }
686
- .cf-sign-out-icon { display: inline; font-size: var(--corn-text-base); }
687
- .cf-sign-out-text { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
688
- }
689
- /* Narrower still (320px, the reflow width): the left of the header scrolls sideways rather than running under the
690
- right, so nothing overlaps; its menus open fixed under the header, as the Proposals and Live menus already do there,
691
- so the scroll cannot clip them. The padding keeps the focus rings inside the scrolled box. */
692
- @media (max-width: 639px) {
693
- .hx-header-left { overflow-x: auto; scrollbar-width: none; padding-block: var(--corn-space-1); }
694
- .hx-header-left::-webkit-scrollbar { display: none; }
695
- #legend-dropdown.hx-menu { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; max-width: none; }
696
- }
697
-
698
737
  /* ---- the issues and PRs panel (forge-panel.js, CF-07) -------------------------------------------
699
738
  A slide-over from the left from 768px (the node panel is the one from the right), a bottom sheet in #sheet-dock below.
700
739
  Closed, it is inert (forge-panel.js), and off screen or not displayed. Only the tokens above are used, so it follows the theme. */
701
- .hx-btn--forge { border-color: var(--corn-line); }
702
- .hx-btn--forge[aria-expanded="true"] { background: var(--corn-accent); border-color: var(--corn-accent-text); color: var(--corn-text-on-accent); }
703
- .hx-forge-lit { padding: 0 var(--corn-space-2); border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-warn); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); color: var(--corn-warn); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); }
704
- @media (max-width: 767px) { .hx-btn--forge { width: 28px; height: 28px; padding: 0; justify-content: center; } .hx-forge-lit { display: none; } }
705
- /* A changed file's status column, and the nodes under it that line up past it */
706
740
  .hx-forge { --hx-forge-status-w: 56px; }
707
741
  .hx-forge { display: flex; flex-direction: column; z-index: 40; border-color: var(--corn-surface-2); pointer-events: none; touch-action: pan-y; transition: transform 0.2s ease-out; }
708
742
  .hx-forge * { touch-action: pan-y; }
@@ -831,7 +865,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
831
865
  .hx-forge-runs { display: flex; flex-direction: column; gap: var(--corn-space-2); margin: var(--corn-space-1) 0 var(--corn-space-3); }
832
866
  .hx-forge-runs[hidden] { display: none; }
833
867
 
834
- /* Threads (forge-panel.js, docs/threads.md): messages as written, read-only; a node's "Mentioned in" opens one */
868
+ /* Threads (forge-panel.js, docs/threads.md): messages as written, read-only; a node's "Threads" opens one */
835
869
  .hx-thread-msgs { display: flex; flex-direction: column; gap: var(--corn-space-3); margin: 0; padding: 0; list-style: none; }
836
870
  .hx-thread-msg { display: flex; flex-direction: column; gap: var(--corn-space-1); padding: var(--corn-space-3) var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius); background: var(--corn-surface-2); }
837
871
  .hx-thread-body { margin: 0; color: var(--corn-text); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
@@ -885,3 +919,58 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
885
919
 
886
920
  /* theme.pixelated (docs/config.md#theme): small pixel-art images are sampled without smoothing, in the page as on the map (map-style.js) */
887
921
  :root[data-pixelated] img { image-rendering: pixelated; }
922
+
923
+ /* ---- the node panel (panels.js, #138): type · name · one line · facts · mockups · threads · the diff · the actions ------------ */
924
+ .hx-drawer-id { flex: 1; min-width: 0; }
925
+ .hx-kicker { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 var(--corn-space-2); font-size: var(--corn-text-sm); color: var(--corn-text-3); }
926
+ .hx-diffpill { margin-left: var(--corn-space-3); padding: 0 var(--corn-space-3); border-radius: var(--corn-radius-pill); border: var(--corn-border) dashed var(--corn-added); color: var(--corn-added-text); font-size: var(--corn-text-xs); }
927
+ .hx-drawer-id .hx-drawer-title { font-size: var(--corn-text-xl); font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
928
+ .hx-drawer-id .hx-drawer-title.hx-mono { font-family: var(--corn-mono); }
929
+ .hx-facts { display: flex; flex-direction: column; gap: var(--corn-space-2); }
930
+ .hx-fact { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--corn-space-4); }
931
+ .hx-fact-k { color: var(--corn-text-3); }
932
+ .hx-fact-v { min-width: 0; color: var(--corn-text); }
933
+ .hx-fact-v .hx-line { padding: 0; }
934
+ .hx-fact-v .hx-name { color: var(--corn-text); }
935
+ .hx-fact-v .hx-code { color: var(--corn-text-2); font-size: var(--corn-text-sm); }
936
+ .hx-fact-v .hx-chips { padding-top: 0; }
937
+ .hx-sec-block { display: flex; flex-direction: column; gap: var(--corn-space-3); }
938
+ .hx-sec-title { margin: 0; font-size: var(--corn-text-sm); font-weight: 600; color: var(--corn-text-3); }
939
+ .hx-drawer .hx-mockups { margin: 0; padding: 0; border: 0; }
940
+ .hx-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--corn-space-2); }
941
+ .hx-row { display: flex; align-items: center; gap: var(--corn-space-4); width: 100%; min-height: 36px; padding: var(--corn-space-3) var(--corn-space-4); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text); font: inherit; text-align: left; }
942
+ .hx-row:hover { background: var(--corn-accent-soft); }
943
+ .hx-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: 2px; }
944
+ .hx-row-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
945
+ .hx-row-meta { flex: none; font-size: var(--corn-text-sm); color: var(--corn-text-3); font-variant-numeric: tabular-nums; }
946
+ .hx-drawer .hx-mockup-list { margin: var(--corn-space-3) 0 0; }
947
+ .hx-drawer .hx-mockup-item { flex-wrap: nowrap; gap: var(--corn-space-4); padding: var(--corn-space-1) var(--corn-space-1) var(--corn-space-1) 0; border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); }
948
+ .hx-drawer .hx-mockup-open { flex: 1; min-width: 0; min-height: 36px; border: 0; background: none; color: var(--corn-text); font-weight: 400; }
949
+ .hx-drawer .hx-mockup-state { flex: none; padding-right: var(--corn-space-3); color: var(--corn-text-3); }
950
+ .hx-drawer .hx-mockup-state--approved { color: var(--corn-added-text); }
951
+ .hx-drawer .hx-mockup-state--changed { color: var(--corn-warn); }
952
+ .hx-drawer .hx-mockup-state--missing { color: var(--corn-bad); }
953
+ .hx-textact { align-self: flex-start; background: none; border: 0; padding-left: 0; }
954
+ .hx-diff { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: var(--corn-space-1) var(--corn-space-4); padding: var(--corn-space-1) 0 var(--corn-space-1) var(--corn-space-4); border-left: var(--corn-border-strong) solid var(--corn-changed); font-family: var(--corn-mono); font-size: var(--corn-text-sm); color: var(--corn-text-2); }
955
+ .hx-diff--added { border-left-color: var(--corn-added); }
956
+ .hx-diff--removed { border-left-color: var(--corn-removed); }
957
+ .hx-diff--edit { border-left-color: var(--corn-edit); }
958
+ .hx-diff-k { color: var(--corn-text-3); }
959
+ .hx-diff-v { min-width: 0; overflow-wrap: anywhere; }
960
+ .hx-drawer .hx-why { margin: 0; }
961
+ .hx-drawer-foot .hx-open[hidden], .hx-drawer-foot .hx-foot-btn[hidden] { display: none; }
962
+ .hx-foot-btn { min-height: 36px; padding: 0 var(--corn-space-4); justify-content: center; }
963
+ @media (max-width: 767px) {
964
+ /* a phone: the sheet's actions are full width at the foot, each a 44px target */
965
+ .hx-drawer-foot { flex-direction: column; }
966
+ .hx-drawer-foot .hx-open, .hx-foot-btn { min-height: 44px; }
967
+ .hx-drawer .hx-row, .hx-drawer .hx-mockup-open, .hx-textact { min-height: 44px; }
968
+ .hx-drawer .hx-close { width: 44px; height: 44px; }
969
+ }
970
+ .hx-drawer .hx-whatif-drawer { font-size: var(--corn-text-md); color: var(--corn-text-2); }
971
+ .hx-drawer .hx-whatif-drawer select { max-width: 100%; }
972
+ .hx-drawer-foot .hx-btn--quiet { border-color: transparent; background: none; }
973
+ .hx-more { display: contents; }
974
+ .hx-more[hidden] { display: none; }
975
+ .hx-more-btn { display: block; margin-top: var(--corn-space-1); min-height: 0; padding: 0; font-size: var(--corn-text-sm); }
976
+ @media (max-width: 767px) { .hx-more-btn { min-height: 44px; } }
package/explorer/flows.js CHANGED
@@ -14,6 +14,7 @@
14
14
 
15
15
  import { state, nameOf, escHtml } from './state.js';
16
16
  import { themed } from './theme-model.js';
17
+ import { capped } from './capped.js';
17
18
 
18
19
  export const FLOW_STYLES = {
19
20
  outbox: { color: '#f59e0b', label: 'Outbox → API (writes)' },
@@ -148,11 +149,8 @@ export function renderFlowLegend() {
148
149
 
149
150
  export function flowSummary(node) {
150
151
  const flows = state.edges.filter((e) => e.kind === 'flow' && (e.from === node.id || e.to === node.id));
151
- if (flows.length === 0) return '';
152
- return `<div class="hx-sec" data-corn="section"><strong class="hx-strong">Data flows:</strong>
153
- ${flows.map((e) => {
154
- const out = e.from === node.id;
155
- const s = FLOW_STYLES[e.flow] || FLOW_STYLES.sync;
156
- return `<div class="hx-line"><span class="hx-glyph" style="--glyph:${s.color}">${out ? '→' : '←'}</span><span><span class="hx-name">${escHtml(nameOf(out ? e.to : e.from))}</span> · ${escHtml(e.label)}${e.status === 'live' ? '' : ' <span class="hx-warn">(proposed)</span>'}</span></div>`;
157
- }).join('')}</div>`;
152
+ const fact = (key, list, out) => (list.length
153
+ ? `<div class="hx-fact" data-corn="section"><div class="hx-fact-k">${key}</div><div class="hx-fact-v">${capped(list.map((e) => `<div class="hx-line"><span><span class="hx-name">${escHtml(nameOf(out ? e.to : e.from))}</span> · ${escHtml(e.label)}${e.status === 'live' ? '' : ' <span class="hx-warn">(proposed)</span>'}</span></div>`))}</div></div>`
154
+ : '');
155
+ return fact('Sends to', flows.filter((e) => e.from === node.id), true) + fact('Gets from', flows.filter((e) => e.to === node.id && e.from !== node.id), false);
158
156
  }