cornfield 0.24.0 → 0.26.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.
@@ -22,17 +22,17 @@
22
22
  </head>
23
23
  <body>
24
24
  <!-- Top bar: layers, data-flow preset, search, layout mode, zoom, links -->
25
- <header class="hx-header">
25
+ <header class="hx-header" data-corn="header">
26
26
  <!-- The page's one heading, for a screen reader's list of headings (plugins.js puts the config's title in it) -->
27
27
  <h1 id="cf-heading" class="hx-sr-only">cornfield: the map</h1>
28
28
  <div class="hx-header-left">
29
- <button type="button" id="cf-brand" class="hx-brand" data-action="reset-view" title="Reset View" aria-label="cornfield: reset the view">
29
+ <button type="button" id="cf-brand" class="hx-brand" data-corn="brand" data-action="reset-view" title="Reset View" aria-label="cornfield: reset the view">
30
30
  <span id="cf-mark" class="hx-live-dot"></span>
31
31
  <span id="cf-title" class="hx-title gradient-text">cornfield</span>
32
32
  </button>
33
33
 
34
34
  <div class="hx-menu-wrap">
35
- <button type="button" id="legend-toggle-btn" class="hx-btn" data-action="toggle-layers-menu" aria-label="Layers" aria-expanded="false" aria-controls="legend-dropdown" title="Toggle Architecture Layers">
35
+ <button type="button" id="legend-toggle-btn" class="hx-btn" data-action="toggle-layers-menu" aria-label="Layers" aria-expanded="false" aria-controls="legend-dropdown" title="Toggle Architecture Layers" data-corn="layers-button">
36
36
  <span class="hx-dots" aria-hidden="true">
37
37
  <span style="background:#6366f1"></span><span style="background:#06b6d4"></span><span style="background:#38bdf8"></span><span style="background:#10b981"></span><span style="background:#a855f7"></span><span style="background:#ec4899"></span><span style="background:#fb923c"></span>
38
38
  </span>
@@ -41,13 +41,13 @@
41
41
  </button>
42
42
 
43
43
  <!-- Interactive section toggles and the legend -->
44
- <div id="legend-dropdown" class="hx-menu glass" hidden>
44
+ <div id="legend-dropdown" class="hx-menu glass" hidden data-corn="layers-menu">
45
45
  <div class="hx-menu-title hx-menu-head">
46
46
  <span>Section Toggles</span>
47
47
  <span class="hx-menu-links">
48
- <button type="button" class="hx-textbtn hx-textbtn--accent" data-action="layers-all">All</button>
48
+ <button type="button" class="hx-textbtn hx-textbtn--accent" data-action="layers-all" data-corn-kind="quiet">All</button>
49
49
  <span class="hx-faint">•</span>
50
- <button type="button" class="hx-textbtn" data-action="layers-none">None</button>
50
+ <button type="button" class="hx-textbtn" data-action="layers-none" data-corn-kind="quiet">None</button>
51
51
  </span>
52
52
  </div>
53
53
  <p id="layers-preset-note" class="hx-note" hidden>The data-flow view shows its own tiers and ignores these toggles. Switch it off to use them.</p>
@@ -89,73 +89,73 @@
89
89
  </div>
90
90
 
91
91
  <!-- The data-flow preset: browser -> servers -> API -> tables -> services -> outside, animated -->
92
- <button type="button" id="preset-dataflow-btn" class="hx-btn hx-btn--preset" data-action="preset-dataflow" aria-pressed="false" aria-label="Data flow" title="Show only how data moves: browser, app servers, API, tables, services, outside systems">
92
+ <button type="button" id="preset-dataflow-btn" class="hx-btn hx-btn--preset" data-action="preset-dataflow" aria-pressed="false" aria-label="Data flow" title="Show only how data moves: browser, app servers, API, tables, services, outside systems" data-corn="preset-dataflow">
93
93
  <span aria-hidden="true">⇄</span>
94
94
  <span class="hx-only-wide">Data flow</span>
95
95
  </button>
96
96
 
97
97
  <!-- The House preset (explorer/house.js, spec 0029): the floor plan with its devices, machines and people, the software around it -->
98
- <button type="button" id="preset-house-btn" class="hx-btn hx-btn--preset" data-action="preset-house" aria-pressed="false" aria-label="House" title="Show the house: each floor's rooms with their devices and machines, the people beside it, the software around it">
98
+ <button type="button" id="preset-house-btn" class="hx-btn hx-btn--preset" data-action="preset-house" aria-pressed="false" aria-label="House" title="Show the house: each floor's rooms with their devices and machines, the people beside it, the software around it" data-corn="preset-house">
99
99
  <span aria-hidden="true">⌂</span>
100
100
  <span class="hx-only-wide">House</span>
101
101
  </button>
102
102
 
103
103
  <!-- Proposals: what a change would add, change and remove, drawn on the map (proposal.js) -->
104
104
  <div id="proposal-wrap" class="hx-menu-wrap">
105
- <button type="button" id="proposal-btn" class="hx-btn hx-btn--proposal" data-action="toggle-proposals-menu" aria-haspopup="true" aria-expanded="false" aria-label="Proposals" title="Open a proposal: what a change would add, change and remove">
105
+ <button type="button" id="proposal-btn" class="hx-btn hx-btn--proposal" data-action="toggle-proposals-menu" aria-haspopup="true" aria-expanded="false" aria-label="Proposals" title="Open a proposal: what a change would add, change and remove" data-corn="proposals-button">
106
106
  <span aria-hidden="true">✎</span>
107
107
  <span class="hx-only-wide">Proposals</span>
108
108
  <span class="hx-faint">▾</span>
109
109
  </button>
110
- <div id="proposal-menu" class="hx-menu hx-menu--proposals glass" hidden></div>
110
+ <div id="proposal-menu" class="hx-menu hx-menu--proposals glass" hidden data-corn="proposals-menu"></div>
111
111
  </div>
112
112
 
113
113
  <!-- Issues and pull requests (explorer/forge-panel.js): shown only when the config names a forge -->
114
- <button type="button" id="forge-btn" class="hx-btn hx-btn--forge" data-action="toggle-forge" aria-expanded="false" aria-controls="forge-panel" aria-label="Issues and pull requests" title="Issues, pull requests and deploys: a pull request lights the nodes it changes, a deploy the nodes it restarted" hidden>
114
+ <button type="button" id="forge-btn" class="hx-btn hx-btn--forge" data-action="toggle-forge" aria-expanded="false" aria-controls="forge-panel" aria-label="Issues and pull requests" title="Issues, pull requests and deploys: a pull request lights the nodes it changes, a deploy the nodes it restarted" hidden data-corn="forge-button">
115
115
  <span aria-hidden="true">⎇</span>
116
116
  <span class="hx-only-wide">Issues &amp; PRs</span>
117
117
  <span id="forge-btn-lit" class="hx-forge-lit" hidden></span>
118
118
  </button>
119
119
 
120
120
  <!-- Review tokens (explorer/review-tokens.js): shown only when somebody is signed in to a forge -->
121
- <button type="button" id="tokens-btn" class="hx-btn" aria-haspopup="dialog" aria-expanded="false" aria-controls="tokens-dialog" aria-label="Review tokens" title="Review tokens: let a script or a chat bot approve or send back a proposal as you" hidden>
121
+ <button type="button" id="tokens-btn" class="hx-btn" aria-haspopup="dialog" aria-expanded="false" aria-controls="tokens-dialog" aria-label="Review tokens" title="Review tokens: let a script or a chat bot approve or send back a proposal as you" hidden data-corn="tokens-button">
122
122
  <span aria-hidden="true">⚿</span>
123
123
  <span class="hx-only-wide">Review tokens</span>
124
124
  </button>
125
125
 
126
126
  <!-- The live layer's chip (explorer/live.js, spec 0029): shown once a live layer is on; a dot on a phone, its line on tap -->
127
127
  <div id="live-wrap" class="hx-menu-wrap hx-live" data-tone="idle" hidden>
128
- <button type="button" id="live-chip" class="hx-btn hx-live-chip" aria-haspopup="true" aria-expanded="false" aria-label="Live layer">
128
+ <button type="button" id="live-chip" class="hx-btn hx-live-chip" aria-haspopup="true" aria-expanded="false" aria-label="Live layer" data-corn="live-chip">
129
129
  <span class="hx-live-chip-dot" aria-hidden="true"></span>
130
130
  <span id="live-chip-text" class="hx-only-wide hx-live-chip-text"></span>
131
131
  </button>
132
- <div id="live-menu" class="hx-menu hx-menu--live glass" role="status" hidden></div>
132
+ <div id="live-menu" class="hx-menu hx-menu--live glass" role="status" hidden data-corn="live-menu"></div>
133
133
  </div>
134
134
  </div>
135
135
 
136
136
  <div class="hx-header-right">
137
- <button type="button" id="mobile-search-toggle" class="hx-btn hx-btn--icon hx-only-mobile" data-action="toggle-mobile-search" aria-label="Open Search" title="Search nodes">⌕</button>
137
+ <button type="button" id="mobile-search-toggle" class="hx-btn hx-btn--icon hx-only-mobile" data-action="toggle-mobile-search" aria-label="Open Search" title="Search nodes" data-corn-kind="icon">⌕</button>
138
138
 
139
- <div class="hx-search hx-only-desktop" role="search">
140
- <input type="text" id="node-search" class="hx-input" placeholder="Search..." aria-label="Search nodes" />
139
+ <div class="hx-search hx-only-desktop" role="search" data-corn="search">
140
+ <input type="text" id="node-search" class="hx-input" placeholder="Search..." aria-label="Search nodes" data-corn="search-input" />
141
141
  </div>
142
142
 
143
- <button type="button" id="freeform-toggle-btn" class="hx-btn" data-action="toggle-freeform" title="Toggle between Orbit parent clustering and freeform node dragging">
143
+ <button type="button" id="freeform-toggle-btn" class="hx-btn" data-action="toggle-freeform" title="Toggle between Orbit parent clustering and freeform node dragging" data-corn="layout-toggle">
144
144
  <span id="freeform-toggle-icon" aria-hidden="true">🔒</span>
145
145
  <span class="hx-only-wide" id="freeform-toggle-label">Orbit</span>
146
146
  </button>
147
147
 
148
- <button type="button" id="reset-positions-btn" class="hx-btn hx-btn--quiet" data-action="reset-positions" title="Reset custom dragged positions back to orbit" hidden>Reset Layout</button>
148
+ <button type="button" id="reset-positions-btn" class="hx-btn hx-btn--quiet" data-action="reset-positions" title="Reset custom dragged positions back to orbit" hidden data-corn-kind="quiet">Reset Layout</button>
149
149
 
150
- <div class="hx-zoom hx-only-desktop">
151
- <button type="button" class="hx-zoom-btn" data-action="zoom-in" title="Zoom In" aria-label="Zoom in">+</button>
152
- <button type="button" class="hx-zoom-btn" data-action="zoom-out" title="Zoom Out" aria-label="Zoom out">−</button>
153
- <button type="button" class="hx-zoom-btn" data-action="reset-view" title="Reset View" aria-label="Reset the view">⟲</button>
154
- <button type="button" class="hx-zoom-btn hx-zoom-btn--accent" data-action="fit" title="Fit to Screen" aria-label="Fit to the screen">⛶</button>
150
+ <div class="hx-zoom hx-only-desktop" data-corn="zoom">
151
+ <button type="button" class="hx-zoom-btn" data-action="zoom-in" title="Zoom In" aria-label="Zoom in" data-corn-kind="icon">+</button>
152
+ <button type="button" class="hx-zoom-btn" data-action="zoom-out" title="Zoom Out" aria-label="Zoom out" data-corn-kind="icon">−</button>
153
+ <button type="button" class="hx-zoom-btn" data-action="reset-view" title="Reset View" aria-label="Reset the view" data-corn-kind="icon">⟲</button>
154
+ <button type="button" class="hx-zoom-btn hx-zoom-btn--accent" data-action="fit" title="Fit to Screen" aria-label="Fit to the screen" data-corn-kind="icon">⛶</button>
155
155
  </div>
156
156
 
157
157
  <!-- Light, dark or the system's (theme.js): steps through them; its label says which is on -->
158
- <button type="button" id="theme-toggle-btn" class="hx-btn hx-btn--icon" data-action="cycle-theme" aria-label="Theme: follows the system. Change theme" title="Theme: follows the system">
158
+ <button type="button" id="theme-toggle-btn" class="hx-btn hx-btn--icon" data-action="cycle-theme" aria-label="Theme: follows the system. Change theme" title="Theme: follows the system" data-corn="theme-toggle" data-corn-kind="icon">
159
159
  <svg class="hx-theme-icon" viewBox="0 0 16 16" width="15" height="15" aria-hidden="true" focusable="false">
160
160
  <!-- system: half a disc; light: a sun; dark: a moon (theme.js shows the one for the choice) -->
161
161
  <g data-icon="system"><circle cx="8" cy="8" r="6" fill="none" stroke="currentColor" stroke-width="1.6" /><path d="M8 2a6 6 0 0 1 0 12z" fill="currentColor" /></g>
@@ -165,36 +165,36 @@
165
165
  </button>
166
166
 
167
167
  <!-- The named themes of the config (`theme.names`): filled and shown by explorer/theme-names.js; hidden when there are none -->
168
- <select id="theme-name-select" class="hx-forge-select" style="width:auto;max-width:9rem" aria-label="Theme" title="Theme" hidden></select>
168
+ <select id="theme-name-select" class="hx-forge-select" style="width:auto;max-width:9rem" aria-label="Theme" title="Theme" data-corn="theme-picker" hidden></select>
169
169
 
170
170
  <!-- The config's links (cornfield.config.js `links`), filled by explorer/plugins.js -->
171
- <span id="cf-links" class="hx-links"></span>
171
+ <span id="cf-links" class="hx-links" data-corn="links"></span>
172
172
  </div>
173
173
  </header>
174
174
 
175
175
  <!-- Mobile search bar -->
176
- <div id="mobile-search-bar" class="hx-mobile-search glass-header" role="search" hidden>
177
- <input type="text" id="mobile-node-search" class="hx-input hx-input--wide" placeholder="Search nodes, apps, components..." aria-label="Search nodes" />
178
- <button type="button" class="hx-textbtn" data-action="clear-search" aria-label="Clear search">✕</button>
179
- <button type="button" class="hx-textbtn" data-action="close-mobile-search">Cancel</button>
176
+ <div id="mobile-search-bar" class="hx-mobile-search glass-header" role="search" hidden data-corn="mobile-search">
177
+ <input type="text" id="mobile-node-search" class="hx-input hx-input--wide" placeholder="Search nodes, apps, components..." aria-label="Search nodes" data-corn="search-input" />
178
+ <button type="button" class="hx-textbtn" data-action="clear-search" aria-label="Clear search" data-corn-kind="quiet">✕</button>
179
+ <button type="button" class="hx-textbtn" data-action="close-mobile-search" data-corn-kind="quiet">Cancel</button>
180
180
  </div>
181
181
 
182
182
  <!-- The map -->
183
- <div class="hx-stage" role="main">
183
+ <div class="hx-stage" role="main" data-corn="stage">
184
184
  <!-- The map takes the keyboard when it has the focus (keyboard.js): its keys are below, read out with its name -->
185
- <canvas id="graph-canvas" tabindex="0" role="application" aria-roledescription="map" aria-label="Topology map" aria-describedby="map-keys-help"></canvas>
185
+ <canvas id="graph-canvas" tabindex="0" role="application" aria-roledescription="map" aria-label="Topology map" aria-describedby="map-keys-help" data-corn="map-canvas"></canvas>
186
186
  <p id="map-keys-help" class="hx-sr-only">Arrow keys pan, plus and minus zoom, 0 fits the map. N and P select the next and the previous node, Home and End the first and the last. Enter goes to the selected node's panel, Escape closes it. In Freeform, Alt and an arrow moves the selected node.</p>
187
187
  <!-- What the keyboard landed on, said by a screen reader (keyboard.js) -->
188
188
  <p id="map-announcer" class="hx-sr-only" role="status" aria-live="polite"></p>
189
189
  <!-- Every label, drawn on its own transparent canvas over the map (explorer/labels.js); the map canvas still gets the pointer -->
190
- <canvas id="label-canvas" aria-hidden="true"></canvas>
190
+ <canvas id="label-canvas" aria-hidden="true" data-corn="label-canvas"></canvas>
191
191
  <!-- The nodes agent runs are changing, marked over the map (explorer/runs-map.js): a picture; the Runs view says the same in words -->
192
- <div id="run-overlay" class="hx-run-overlay" aria-hidden="true" hidden></div>
192
+ <div id="run-overlay" class="hx-run-overlay" aria-hidden="true" hidden data-corn="run-overlay"></div>
193
193
 
194
194
  <!-- Below 768px the proposal bar, the scenario player and the node panel stack here as bottom sheets (sheets.js); from 768px the dock is display: contents -->
195
- <div id="sheet-dock" class="hx-dock">
195
+ <div id="sheet-dock" class="hx-dock" data-corn="dock">
196
196
  <!-- The open proposal: counts, Before / Diff / After, problems, close (proposal.js) -->
197
- <section id="proposal-bar" class="hx-proposal-bar glass" aria-label="Open proposal" hidden>
197
+ <section id="proposal-bar" class="hx-proposal-bar glass" aria-label="Open proposal" hidden data-corn="proposal-bar">
198
198
  <p id="proposal-message" class="hx-proposal-message" role="status" hidden></p>
199
199
  <div id="proposal-body">
200
200
  <div class="hx-proposal-head">
@@ -205,7 +205,7 @@
205
205
  <button type="button" class="hx-seg-btn" data-action="proposal-view" data-view="diff" aria-pressed="true">Diff</button>
206
206
  <button type="button" class="hx-seg-btn" data-action="proposal-view" data-view="after" aria-pressed="false">After</button>
207
207
  </div>
208
- <button type="button" class="hx-btn hx-btn--quiet" data-action="close-proposal" title="Close the proposal and go back to the map">Close</button>
208
+ <button type="button" class="hx-btn hx-btn--quiet" data-action="close-proposal" title="Close the proposal and go back to the map" data-corn-kind="quiet">Close</button>
209
209
  </div>
210
210
  <p id="proposal-summary" class="hx-proposal-summary" hidden></p>
211
211
  <details id="proposal-errors" class="hx-proposal-errors" hidden>
@@ -218,69 +218,69 @@
218
218
  </section>
219
219
 
220
220
  <!-- Issues and pull requests (forge-panel.js): a slide-over from the left on desktop, a bottom sheet on a phone; hidden and inert until the config names a forge -->
221
- <aside id="forge-panel" class="hx-forge glass" aria-label="Issues and pull requests" inert hidden>
221
+ <aside id="forge-panel" class="hx-forge glass" aria-label="Issues and pull requests" inert hidden data-corn="forge-panel">
222
222
  <div class="hx-forge-body">
223
223
  <div class="hx-forge-head">
224
224
  <h2 id="forge-title" class="hx-drawer-title" tabindex="-1">Issues and pull requests</h2>
225
- <button type="button" class="hx-btn hx-btn--quiet" data-action="refresh-forge" title="Ask the forge again">Refresh</button>
226
- <button type="button" class="hx-close" data-action="close-forge" aria-label="Close">✕</button>
225
+ <button type="button" class="hx-btn hx-btn--quiet" data-action="refresh-forge" title="Ask the forge again" data-corn-kind="quiet">Refresh</button>
226
+ <button type="button" class="hx-close" data-action="close-forge" aria-label="Close" data-corn-kind="icon">✕</button>
227
227
  </div>
228
228
  <p id="forge-status" class="hx-forge-status hx-faint"></p>
229
229
  <div class="hx-forge-controls">
230
- <div class="hx-forge-tabs" role="group" aria-label="Show">
231
- <button type="button" class="hx-forge-tab" data-forge-kind="pulls" aria-pressed="true">Pull requests</button>
232
- <button type="button" class="hx-forge-tab" data-forge-kind="issues" aria-pressed="false">Issues</button>
233
- <button type="button" class="hx-forge-tab" data-forge-kind="threads" aria-pressed="false" title="Ideas and spec conversations, with the nodes they mention">Threads</button>
234
- <button type="button" class="hx-forge-tab" data-forge-kind="deploys" aria-pressed="false">Deploys</button>
235
- <button type="button" class="hx-forge-tab" data-forge-kind="work" aria-pressed="false" title="Work grouped by issue and proposal, agent-made work marked">Agents</button>
236
- <button type="button" class="hx-forge-tab" data-forge-kind="notes" aria-pressed="false">Release notes</button>
230
+ <div class="hx-forge-tabs" role="group" aria-label="Show" data-corn="tabs">
231
+ <button type="button" class="hx-forge-tab" data-forge-kind="pulls" aria-pressed="true" data-corn="tab">Pull requests</button>
232
+ <button type="button" class="hx-forge-tab" data-forge-kind="issues" aria-pressed="false" data-corn="tab">Issues</button>
233
+ <button type="button" class="hx-forge-tab" data-forge-kind="threads" aria-pressed="false" title="Ideas and spec conversations, with the nodes they mention" data-corn="tab">Threads</button>
234
+ <button type="button" class="hx-forge-tab" data-forge-kind="deploys" aria-pressed="false" data-corn="tab">Deploys</button>
235
+ <button type="button" class="hx-forge-tab" data-forge-kind="work" aria-pressed="false" title="Work grouped by issue and proposal, agent-made work marked" data-corn="tab">Agents</button>
236
+ <button type="button" class="hx-forge-tab" data-forge-kind="notes" aria-pressed="false" data-corn="tab">Release notes</button>
237
237
  </div>
238
238
  <div id="forge-work-filters" class="hx-forge-work-filters" hidden>
239
239
  <label class="hx-forge-toggle"><input type="checkbox" id="forge-work-agents" /> Agent-made only</label>
240
240
  <label class="hx-forge-toggle"><input type="checkbox" id="forge-work-finished" /> Include merged and closed</label>
241
241
  </div>
242
242
  <div id="forge-filters" class="hx-forge-filters">
243
- <label class="hx-forge-field">State<select id="forge-state" class="hx-forge-select"></select></label>
244
- <label class="hx-forge-field">Label<select id="forge-label" class="hx-forge-select"></select></label>
245
- <label class="hx-forge-field">Author<select id="forge-author" class="hx-forge-select"></select></label>
246
- <label class="hx-forge-field hx-forge-field--text">Search<input type="search" id="forge-text" class="hx-forge-input" placeholder="Title, number, label" autocomplete="off" /></label>
243
+ <label class="hx-forge-field" data-corn="field">State<select id="forge-state" class="hx-forge-select"></select></label>
244
+ <label class="hx-forge-field" data-corn="field">Label<select id="forge-label" class="hx-forge-select"></select></label>
245
+ <label class="hx-forge-field" data-corn="field">Author<select id="forge-author" class="hx-forge-select"></select></label>
246
+ <label class="hx-forge-field hx-forge-field--text" data-corn="field">Search<input type="search" id="forge-text" class="hx-forge-input" placeholder="Title, number, label" autocomplete="off" /></label>
247
247
  </div>
248
248
  </div>
249
- <p id="forge-notice" class="hx-forge-notice" hidden></p>
250
- <p id="forge-act-note" class="hx-forge-notice" hidden></p>
249
+ <p id="forge-notice" class="hx-forge-notice" hidden data-corn="notice"></p>
250
+ <p id="forge-act-note" class="hx-forge-notice" hidden data-corn="notice"></p>
251
251
  <!-- New idea (forge-panel.js): opens an issue with the threads label as you, on the forge; the thread itself lives there -->
252
252
  <section id="forge-idea" class="hx-forge-notes" aria-label="New idea" hidden>
253
253
  <div class="hx-forge-actions">
254
- <button type="button" id="idea-open" class="hx-btn hx-btn--approve" data-action="idea-open" aria-expanded="false" aria-controls="idea-form">New idea …</button>
254
+ <button type="button" id="idea-open" class="hx-btn hx-btn--approve" data-action="idea-open" aria-expanded="false" aria-controls="idea-form" data-corn-kind="approve">New idea …</button>
255
255
  </div>
256
- <p id="idea-message" class="hx-forge-msg" role="status" hidden></p>
256
+ <p id="idea-message" class="hx-forge-msg" role="status" hidden data-corn="message"></p>
257
257
  <div id="idea-form" class="hx-forge-confirm" role="group" aria-labelledby="idea-form-title" hidden>
258
258
  <h3 id="idea-form-title" class="hx-forge-confirm-title">New idea</h3>
259
259
  <p id="idea-words"></p>
260
- <label class="hx-forge-field">Title<input type="text" id="idea-title" class="hx-forge-input" maxlength="256" autocomplete="off" /></label>
261
- <label class="hx-forge-field">What is the idea?<textarea id="idea-body" class="hx-forge-preview hx-thread-compose" rows="6" maxlength="20000" spellcheck="true"></textarea></label>
260
+ <label class="hx-forge-field" data-corn="field">Title<input type="text" id="idea-title" class="hx-forge-input" maxlength="256" autocomplete="off" /></label>
261
+ <label class="hx-forge-field" data-corn="field">What is the idea?<textarea id="idea-body" class="hx-forge-preview hx-thread-compose" rows="6" maxlength="20000" spellcheck="true"></textarea></label>
262
262
  <div class="hx-forge-actions">
263
- <button type="button" id="idea-send" class="hx-btn hx-btn--approve" data-action="idea-send">Open the idea</button>
264
- <button type="button" class="hx-btn hx-btn--quiet" data-action="idea-cancel">Cancel</button>
263
+ <button type="button" id="idea-send" class="hx-btn hx-btn--approve" data-action="idea-send" data-corn-kind="approve">Open the idea</button>
264
+ <button type="button" class="hx-btn hx-btn--quiet" data-action="idea-cancel" data-corn-kind="quiet">Cancel</button>
265
265
  </div>
266
266
  </div>
267
267
  </section>
268
268
  <!-- Release notes (forge-panel.js): the pull requests merged since a tag, grouped by the map; copy them, or have the forge keep them as a draft release -->
269
269
  <section id="forge-notes" class="hx-forge-notes" aria-label="Release notes" hidden>
270
- <label class="hx-forge-field">Since tag<select id="notes-since" class="hx-forge-select"></select></label>
271
- <label class="hx-forge-field">Draft, in Markdown<textarea id="notes-preview" class="hx-forge-preview" rows="14" readonly spellcheck="false"></textarea></label>
270
+ <label class="hx-forge-field" data-corn="field">Since tag<select id="notes-since" class="hx-forge-select"></select></label>
271
+ <label class="hx-forge-field" data-corn="field">Draft, in Markdown<textarea id="notes-preview" class="hx-forge-preview" rows="14" readonly spellcheck="false"></textarea></label>
272
272
  <div class="hx-forge-actions">
273
273
  <button type="button" id="notes-copy" class="hx-btn" data-action="copy-notes">Copy</button>
274
- <button type="button" id="notes-post" class="hx-btn hx-btn--approve" data-action="post-notes" aria-expanded="false" aria-controls="notes-confirm">Post as draft …</button>
274
+ <button type="button" id="notes-post" class="hx-btn hx-btn--approve" data-action="post-notes" aria-expanded="false" aria-controls="notes-confirm" data-corn-kind="approve">Post as draft …</button>
275
275
  </div>
276
- <p id="notes-message" class="hx-forge-msg" hidden></p>
276
+ <p id="notes-message" class="hx-forge-msg" hidden data-corn="message"></p>
277
277
  <div id="notes-confirm" class="hx-forge-confirm" role="group" aria-labelledby="notes-confirm-title" hidden>
278
278
  <h3 id="notes-confirm-title" class="hx-forge-confirm-title">Post as a draft release</h3>
279
279
  <p id="notes-confirm-words"></p>
280
- <label class="hx-forge-field">Tag for the draft<input type="text" id="notes-tag" class="hx-forge-input" autocomplete="off" spellcheck="false" /></label>
280
+ <label class="hx-forge-field" data-corn="field">Tag for the draft<input type="text" id="notes-tag" class="hx-forge-input" autocomplete="off" spellcheck="false" /></label>
281
281
  <div class="hx-forge-actions">
282
- <button type="button" id="notes-confirm-yes" class="hx-btn hx-btn--approve" data-action="confirm-notes">Create the draft</button>
283
- <button type="button" class="hx-btn hx-btn--quiet" data-action="cancel-notes">Cancel</button>
282
+ <button type="button" id="notes-confirm-yes" class="hx-btn hx-btn--approve" data-action="confirm-notes" data-corn-kind="approve">Create the draft</button>
283
+ <button type="button" class="hx-btn hx-btn--quiet" data-action="cancel-notes" data-corn-kind="quiet">Cancel</button>
284
284
  </div>
285
285
  </div>
286
286
  </section>
@@ -289,8 +289,8 @@
289
289
  <h3 id="forge-runs-title" class="hx-forge-runs-title">Agent runs</h3>
290
290
  <p id="forge-runs-status" class="hx-forge-meta hx-faint"></p>
291
291
  <p id="forge-runs-runner" class="hx-forge-meta" hidden></p>
292
- <p id="forge-runs-note" class="hx-forge-notice" hidden></p>
293
- <p id="forge-runs-trigger" class="hx-forge-notice" hidden></p>
292
+ <p id="forge-runs-note" class="hx-forge-notice" hidden data-corn="notice"></p>
293
+ <p id="forge-runs-trigger" class="hx-forge-notice" hidden data-corn="notice"></p>
294
294
  <div id="forge-runs-totals" role="group" aria-label="Tokens and cost the runners reported" hidden></div>
295
295
  <ul id="forge-runs-hand" class="hx-forge-meta" aria-label="Requests written by hand that started nothing" hidden></ul>
296
296
  <ul id="forge-runs-list" class="hx-forge-files" aria-label="Runs"></ul>
@@ -302,14 +302,14 @@
302
302
  </aside>
303
303
 
304
304
  <!-- Node panel: a slide-over on desktop, a bottom sheet on mobile -->
305
- <aside id="spec-drawer" class="hx-drawer glass" aria-label="Node details" inert>
305
+ <aside id="spec-drawer" class="hx-drawer glass" aria-label="Node details" inert data-corn="node-panel">
306
306
  <div class="hx-drawer-body">
307
307
  <div class="hx-drawer-head">
308
308
  <span class="hx-drawer-title-wrap">
309
- <span id="drawer-badge" class="hx-badge">ATOM</span>
309
+ <span id="drawer-badge" class="hx-badge" data-corn="badge">ATOM</span>
310
310
  <h2 id="drawer-title" class="hx-drawer-title">&lt;pop-button&gt;</h2>
311
311
  </span>
312
- <button type="button" class="hx-close" data-action="close-drawer" aria-label="Close">✕</button>
312
+ <button type="button" class="hx-close" data-action="close-drawer" aria-label="Close" data-corn-kind="icon">✕</button>
313
313
  </div>
314
314
 
315
315
  <p id="drawer-description" class="hx-faint hx-lead"></p>
@@ -333,78 +333,78 @@
333
333
  </div>
334
334
 
335
335
  <!-- Mobile zoom and fit, within thumb reach -->
336
- <div class="hx-mobile-zoom glass hx-only-mobile">
337
- <button type="button" class="hx-zoom-btn" data-action="zoom-in" aria-label="Zoom In">+</button>
338
- <button type="button" class="hx-zoom-btn" data-action="zoom-out" aria-label="Zoom Out">−</button>
339
- <button type="button" class="hx-zoom-btn hx-zoom-btn--accent" data-action="fit" title="Fit to Screen" aria-label="Fit View">⛶</button>
336
+ <div class="hx-mobile-zoom glass hx-only-mobile" data-corn="zoom">
337
+ <button type="button" class="hx-zoom-btn" data-action="zoom-in" aria-label="Zoom In" data-corn-kind="icon">+</button>
338
+ <button type="button" class="hx-zoom-btn" data-action="zoom-out" aria-label="Zoom Out" data-corn-kind="icon">−</button>
339
+ <button type="button" class="hx-zoom-btn hx-zoom-btn--accent" data-action="fit" title="Fit to Screen" aria-label="Fit View" data-corn-kind="icon">⛶</button>
340
340
  </div>
341
341
 
342
- <div class="hx-hint glass">
342
+ <div class="hx-hint glass" data-corn="hint">
343
343
  <span class="hx-accent" aria-hidden="true">👆</span>
344
344
  <span id="instruction-badge-text">Tap node to inspect live spec</span>
345
345
  </div>
346
346
 
347
347
  <!-- Loading and error states: a failed load never leaves a blank canvas -->
348
- <div id="loading-state" class="hx-state" role="status">Loading topology.json …</div>
349
- <div id="error-state" class="hx-state hx-state--error glass" role="alert" hidden>
348
+ <div id="loading-state" class="hx-state" role="status" data-corn="loading">Loading topology.json …</div>
349
+ <div id="error-state" class="hx-state hx-state--error glass" role="alert" hidden data-corn="error">
350
350
  <strong>The map could not be loaded</strong>
351
351
  <p id="error-message"></p>
352
352
  <p class="hx-faint">The explorer reads /topology.json from the cornfield server (cornfield serve). Run cornfield sync if the repo has no map yet, check that the server is up, then retry.</p>
353
- <button type="button" class="hx-btn hx-btn--active" data-action="retry">Retry</button>
353
+ <button type="button" class="hx-btn hx-btn--active" data-action="retry" data-corn-kind="primary">Retry</button>
354
354
  </div>
355
355
 
356
- <div id="drawer-backdrop" class="hx-backdrop" data-action="close-drawer" hidden></div>
356
+ <div id="drawer-backdrop" class="hx-backdrop" data-action="close-drawer" hidden data-corn="backdrop"></div>
357
357
 
358
358
  </div>
359
359
 
360
360
  <!-- The confirm step of landing a pull request, starting a spec and opening a build issue (forge-panel.js): a modal dialog over a scrim; the focus stays in it while it is open -->
361
- <div id="forge-confirm" class="hx-confirm-scrim" hidden>
362
- <div class="hx-confirm glass" role="dialog" aria-modal="true" aria-labelledby="forge-confirm-title" aria-describedby="forge-confirm-body">
361
+ <div id="forge-confirm" class="hx-confirm-scrim" hidden data-corn="dialog-scrim">
362
+ <div class="hx-confirm glass" role="dialog" aria-modal="true" aria-labelledby="forge-confirm-title" aria-describedby="forge-confirm-body" data-corn="confirm-dialog">
363
363
  <h2 id="forge-confirm-title" class="hx-confirm-title"></h2>
364
364
  <div id="forge-confirm-body"></div>
365
365
  <div class="hx-confirm-actions">
366
366
  <button type="button" class="hx-btn" data-action="forge-confirm-cancel">Cancel</button>
367
- <button type="button" class="hx-btn hx-btn--approve" data-action="forge-confirm-go">Land it</button>
367
+ <button type="button" class="hx-btn hx-btn--approve" data-action="forge-confirm-go" data-corn-kind="approve">Land it</button>
368
368
  </div>
369
369
  </div>
370
370
  </div>
371
371
 
372
372
  <!-- Start an agent (forge-panel.js): kind, profile, a brief, and a confirm step; a modal dialog over a scrim, the focus stays in it -->
373
- <div id="agent-start" class="hx-confirm-scrim" hidden>
374
- <div class="hx-confirm glass" role="dialog" aria-modal="true" aria-labelledby="agent-start-title" aria-describedby="agent-start-words">
373
+ <div id="agent-start" class="hx-confirm-scrim" hidden data-corn="dialog-scrim">
374
+ <div class="hx-confirm glass" role="dialog" aria-modal="true" aria-labelledby="agent-start-title" aria-describedby="agent-start-words" data-corn="agent-dialog">
375
375
  <h2 id="agent-start-title" class="hx-confirm-title">Start an agent</h2>
376
376
  <p id="agent-start-about" class="hx-forge-meta"></p>
377
377
  <p id="agent-start-runner" class="hx-forge-meta" hidden></p>
378
378
  <p id="agent-retry-note" class="hx-forge-meta" hidden></p>
379
379
  <form id="agent-start-form" class="hx-forge-confirm" novalidate>
380
- <label class="hx-forge-field">Kind of run<select id="agent-kind" class="hx-forge-select"></select></label>
381
- <label id="agent-profile-field" class="hx-forge-field" hidden>Profile<select id="agent-profile" class="hx-forge-select"></select></label>
380
+ <label class="hx-forge-field" data-corn="field">Kind of run<select id="agent-kind" class="hx-forge-select"></select></label>
381
+ <label id="agent-profile-field" class="hx-forge-field" hidden data-corn="field">Profile<select id="agent-profile" class="hx-forge-select"></select></label>
382
382
  <fieldset id="agent-limits-edit" class="hx-forge-field hx-forge-limits"><legend>Limits, hints for the runner (one left blank takes the config's, if any)</legend>
383
- <label class="hx-forge-field">Minutes<input type="number" id="agent-limit-minutes" class="hx-forge-input" min="0" step="any" inputmode="decimal" /></label>
384
- <label class="hx-forge-field">Turns<input type="number" id="agent-limit-turns" class="hx-forge-input" min="0" step="1" inputmode="numeric" /></label>
385
- <label class="hx-forge-field">Cost<input type="number" id="agent-limit-cost" class="hx-forge-input" min="0" step="any" inputmode="decimal" /></label>
386
- <label class="hx-forge-field">Tokens<input type="number" id="agent-limit-tokens" class="hx-forge-input" min="0" step="1" inputmode="numeric" /></label>
383
+ <label class="hx-forge-field" data-corn="field">Minutes<input type="number" id="agent-limit-minutes" class="hx-forge-input" min="0" step="any" inputmode="decimal" /></label>
384
+ <label class="hx-forge-field" data-corn="field">Turns<input type="number" id="agent-limit-turns" class="hx-forge-input" min="0" step="1" inputmode="numeric" /></label>
385
+ <label class="hx-forge-field" data-corn="field">Cost<input type="number" id="agent-limit-cost" class="hx-forge-input" min="0" step="any" inputmode="decimal" /></label>
386
+ <label class="hx-forge-field" data-corn="field">Tokens<input type="number" id="agent-limit-tokens" class="hx-forge-input" min="0" step="1" inputmode="numeric" /></label>
387
387
  </fieldset>
388
- <label class="hx-forge-field">Brief for the runner<textarea id="agent-brief" class="hx-forge-preview" rows="6" maxlength="20000" spellcheck="true"></textarea></label>
388
+ <label class="hx-forge-field" data-corn="field">Brief for the runner<textarea id="agent-brief" class="hx-forge-preview" rows="6" maxlength="20000" spellcheck="true"></textarea></label>
389
389
  <label id="agent-force-field" class="hx-forge-toggle" hidden><input type="checkbox" id="agent-force" /> Ask for another run on purpose</label>
390
390
  <p id="agent-start-words" class="hx-confirm-note"></p>
391
- <p id="agent-start-msg" class="hx-forge-msg hx-forge-msg--bad" role="alert" hidden></p>
391
+ <p id="agent-start-msg" class="hx-forge-msg hx-forge-msg--bad" role="alert" hidden data-corn="message" data-corn-state="failure"></p>
392
392
  <div class="hx-confirm-actions">
393
393
  <button type="button" class="hx-btn" data-action="agent-start-cancel">Cancel</button>
394
- <button type="submit" class="hx-btn hx-btn--approve" id="agent-start-go">Ask the runner</button>
394
+ <button type="submit" class="hx-btn hx-btn--approve" id="agent-start-go" data-corn-kind="approve">Ask the runner</button>
395
395
  </div>
396
396
  </form>
397
397
  </div>
398
398
  </div>
399
399
 
400
400
  <!-- Review tokens (review-tokens.js): make one (shown once), list them, revoke; a modal dialog over a scrim, the focus stays in it -->
401
- <div id="tokens-dialog" class="hx-confirm-scrim" hidden>
402
- <div class="hx-confirm glass" role="dialog" aria-modal="true" aria-labelledby="tokens-title" aria-describedby="tokens-intro">
401
+ <div id="tokens-dialog" class="hx-confirm-scrim" hidden data-corn="dialog-scrim">
402
+ <div class="hx-confirm glass" role="dialog" aria-modal="true" aria-labelledby="tokens-title" aria-describedby="tokens-intro" data-corn="tokens-dialog">
403
403
  <h2 id="tokens-title" class="hx-confirm-title" tabindex="-1">Review tokens</h2>
404
404
  <p id="tokens-intro" class="hx-confirm-note">A review token lets a script or a chat bot approve or send back a proposal as you (<code class="hx-code">POST /api/reviews</code>). It works while you are signed in here and still maintain the repo; it expires, and you can revoke it below.</p>
405
- <p id="tokens-msg" class="hx-forge-msg" role="status" hidden></p>
405
+ <p id="tokens-msg" class="hx-forge-msg" role="status" hidden data-corn="message"></p>
406
406
  <div id="tokens-secret" class="hx-tokens-secret" hidden>
407
- <label class="hx-forge-field" for="tokens-secret-value">Your new token (copy it now, it is not shown again)</label>
407
+ <label class="hx-forge-field" for="tokens-secret-value" data-corn="field">Your new token (copy it now, it is not shown again)</label>
408
408
  <div class="hx-tokens-row">
409
409
  <input id="tokens-secret-value" class="hx-forge-input hx-mono" type="text" readonly spellcheck="false" autocomplete="off" />
410
410
  <button type="button" class="hx-btn" data-tokens-copy>Copy</button>
@@ -412,11 +412,11 @@
412
412
  </div>
413
413
  <ul id="tokens-list" class="hx-tokens-list" aria-label="Your review tokens"></ul>
414
414
  <form id="tokens-form" class="hx-tokens-form" autocomplete="off">
415
- <label class="hx-forge-field">Kind of token<select id="tokens-scope" class="hx-forge-select"><option value="review">Review: approve or send back proposals</option><option value="agent">Agent: ask for agent runs (POST /api/agent-requests)</option><option value="runner">Runner: pull, claim and report on runs (GET /api/agent-requests)</option></select></label>
416
- <label class="hx-forge-field">Label<input id="tokens-label" class="hx-forge-input" type="text" maxlength="60" placeholder="chat bot" /></label>
417
- <label class="hx-forge-field">Days<input id="tokens-days" class="hx-forge-input" type="text" inputmode="numeric" maxlength="2" aria-describedby="tokens-days-hint" /></label>
415
+ <label class="hx-forge-field" data-corn="field">Kind of token<select id="tokens-scope" class="hx-forge-select"><option value="review">Review: approve or send back proposals</option><option value="agent">Agent: ask for agent runs (POST /api/agent-requests)</option><option value="runner">Runner: pull, claim and report on runs (GET /api/agent-requests)</option></select></label>
416
+ <label class="hx-forge-field" data-corn="field">Label<input id="tokens-label" class="hx-forge-input" type="text" maxlength="60" placeholder="chat bot" /></label>
417
+ <label class="hx-forge-field" data-corn="field">Days<input id="tokens-days" class="hx-forge-input" type="text" inputmode="numeric" maxlength="2" aria-describedby="tokens-days-hint" /></label>
418
418
  <span id="tokens-days-hint" class="hx-sr-only"></span>
419
- <button type="submit" id="tokens-make" class="hx-btn hx-btn--approve">Make a token</button>
419
+ <button type="submit" id="tokens-make" class="hx-btn hx-btn--approve" data-corn-kind="approve">Make a token</button>
420
420
  </form>
421
421
  <div class="hx-confirm-actions">
422
422
  <button type="button" class="hx-btn" data-tokens-close>Close</button>
@@ -75,7 +75,7 @@ export function renderLayerToggles() {
75
75
  const on = state.activeLayers[layer.key] !== false;
76
76
  const color = themed(layer.color, state.theme); // the dot is the colour the map draws on this ground
77
77
  return `
78
- <button type="button" class="hx-toggle-row${on ? '' : ' is-off'}" data-action="toggle-layer" data-layer="${layer.key}" aria-pressed="${on}" title="${layer.desc}">
78
+ <button type="button" class="hx-toggle-row${on ? '' : ' is-off'}" data-action="toggle-layer" data-layer="${layer.key}" aria-pressed="${on}" title="${layer.desc}" data-corn="row">
79
79
  <span class="hx-toggle-label">
80
80
  <span class="hx-dot" style="background-color: ${color}; box-shadow: ${on && state.theme !== 'light' ? `0 0 8px ${color}90` : 'none'}"></span>
81
81
  <span class="hx-toggle-name">${layer.label}</span>${layer.live ? '<span class="hx-live-tag">live</span>' : ''}
@@ -444,7 +444,7 @@ export function createLiveRunner({ source, groups, wanted, visible = () => true,
444
444
  export function liveDetailsHtml(node, live, esc) {
445
445
  if (!node) return '';
446
446
  const answer = live && live.answer;
447
- const sec = (title, body) => `<div class="hx-sec hx-live-sec"><strong class="hx-strong">${title}</strong>${body}</div>`;
447
+ const sec = (title, body) => `<div class="hx-sec hx-live-sec" data-corn="section"><strong class="hx-strong">${title}</strong>${body}</div>`;
448
448
  const when = answer ? `<div class="hx-faint">Live · ${esc(clockOf(answer.at))}</div>` : '';
449
449
 
450
450
  if (node.type === 'persona') {
package/explorer/live.js CHANGED
@@ -169,7 +169,7 @@ function paintChip() {
169
169
  row.innerHTML = `
170
170
  <span class="hx-live-buttons">
171
171
  <button type="button" class="hx-btn" data-live="refresh"${loading ? ' disabled' : ''}>Refresh</button>
172
- ${has ? '<button type="button" class="hx-btn" data-live="token-forget">Forget token</button>' : ''}
172
+ ${has ? '<button type="button" class="hx-btn" data-live="token-forget" data-corn-kind="danger">Forget token</button>' : ''}
173
173
  </span>
174
174
  <span class="hx-faint">${escHtml(source && source.name ? source.name : '')}</span>`;
175
175
  }
@@ -13,6 +13,7 @@
13
13
 
14
14
  import { state, escHtml } from './state.js';
15
15
  import { mockupsOf } from '../core/proposal.js';
16
+ import { cornStateAttr } from './corn-state.js';
16
17
 
17
18
  const STATE_WORDS = {
18
19
  approved: 'Reviewed',
@@ -55,11 +56,11 @@ export function mockupsFor(proposal, slug, source, nodeId, states = {}) {
55
56
  */
56
57
  export function mockupsSectionHtml(items) {
57
58
  if (!items.length) return '';
58
- const rows = items.map((m) => `<li class="hx-mockup-item">
59
+ const rows = items.map((m) => `<li class="hx-mockup-item" data-corn="row">
59
60
  <button type="button" class="hx-btn hx-mockup-open" data-mockup="${m.index}" aria-haspopup="dialog">${escHtml(m.title)}<span class="hx-sr-only"> (${m.type === 'page' ? 'page' : 'image'}, opens in a window)</span></button>
60
- <span class="hx-mockup-state hx-mockup-state--${escHtml(m.state)}">${escHtml(stateWords(m.state))}</span>
61
+ <span class="hx-mockup-state hx-mockup-state--${escHtml(m.state)}" data-corn="state-pill"${cornStateAttr(m.state)}>${escHtml(stateWords(m.state))}</span>
61
62
  </li>`).join('');
62
- return `<div class="hx-sec hx-mockups" data-mockups>
63
+ return `<div class="hx-sec hx-mockups" data-mockups data-corn="section">
63
64
  <strong class="hx-strong" id="hx-mockups-h">${items.length === 1 ? 'Mockup' : 'Mockups'}</strong>
64
65
  <ul class="hx-mockup-list" aria-labelledby="hx-mockups-h">${rows}</ul>
65
66
  </div>`;
@@ -23,6 +23,7 @@ import { state } from './state.js';
23
23
  import { hooks } from './proposal.js';
24
24
  import { mockupsOf } from '../core/proposal.js';
25
25
  import { mockupsFor, mockupsSectionHtml, stateWords } from './mockups-model.js';
26
+ import { cornState } from './corn-state.js';
26
27
 
27
28
  const $ = (id) => document.getElementById(id);
28
29
 
@@ -122,6 +123,7 @@ export function openMockup(index, opener = null) {
122
123
  returnTo = opener;
123
124
  dialog = document.createElement('div');
124
125
  dialog.className = 'hx-mockup-dialog';
126
+ dialog.dataset.corn = 'mockup-dialog';
125
127
  dialog.setAttribute('role', 'dialog');
126
128
  dialog.setAttribute('aria-modal', 'true');
127
129
  dialog.setAttribute('aria-labelledby', 'mockup-title');
@@ -142,6 +144,8 @@ export function openMockup(index, opener = null) {
142
144
  const status = document.createElement('p');
143
145
  status.id = 'mockup-state';
144
146
  status.className = `hx-mockup-state hx-mockup-state--${item.state}`;
147
+ status.dataset.corn = 'state-pill';
148
+ if (cornState(item.state)) status.dataset.cornState = cornState(item.state);
145
149
  status.textContent = stateWords(item.state);
146
150
  const stage = document.createElement('div');
147
151
  stage.className = 'hx-mockup-stage';
@@ -24,7 +24,7 @@ const $ = (id) => document.getElementById(id);
24
24
  const code = (s) => `<code class="hx-code">${escHtml(s)}</code>`;
25
25
  const nm = (id) => `<span class="hx-name">${escHtml(nameOf(id))}</span>`;
26
26
  const line = (color, arrow, body) => `<div class="hx-line"><span class="hx-glyph" style="--glyph:${color}">${arrow}</span><span>${body}</span></div>`;
27
- const section = (title, rows) => (rows.length ? `<div class="hx-sec"><strong class="hx-strong">${title}</strong>${rows.join('')}</div>` : '');
27
+ const section = (title, rows) => (rows.length ? `<div class="hx-sec" data-corn="section"><strong class="hx-strong">${title}</strong>${rows.join('')}</div>` : '');
28
28
  const varList = (vars) => `<div class="hx-chips">${vars.map((v) => `<code class="hx-var">${escHtml(v)}</code>`).join('')}</div>`;
29
29
  const edgesOf = (kind, side, id) => state.edges.filter((e) => e.kind === kind && e[side] === id);
30
30
 
@@ -87,12 +87,12 @@ export function applyBranding(doc, config) {
87
87
  if (!links) return;
88
88
  const html = Array.isArray(config.links) ? config.links
89
89
  .filter((l) => l && typeof l.label === 'string' && /^(https?:\/\/|\/)/.test(String(l.href)))
90
- .map((l) => `<a class="hx-chip-link hx-chip-link--indigo hx-only-xl" href="${escHtml(l.href)}" target="_blank" rel="noreferrer"><span class="hx-dot-sm"></span> ${escHtml(l.label)}</a>`)
90
+ .map((l) => `<a class="hx-chip-link hx-chip-link--indigo hx-only-xl" href="${escHtml(l.href)}" target="_blank" rel="noreferrer" data-corn="link"><span class="hx-dot-sm"></span> ${escHtml(l.label)}</a>`)
91
91
  .join('') : '';
92
92
  // A plain form: signing out is a same-origin POST (server/auth.js), no script needed. On a narrow phone only its icon
93
93
  // shows (explorer.css); the words stay in the button for a screen reader
94
94
  const signOut = config.signIn && typeof config.signIn.login === 'string'
95
- ? `<form class="cf-sign-out" method="post" action="/auth/sign-out"><button type="submit" class="hx-btn hx-btn--quiet" title="Signed in as ${escHtml(config.signIn.login)}"><span class="cf-sign-out-icon" aria-hidden="true">⎋</span><span class="cf-sign-out-text">Sign out</span></button></form>`
95
+ ? `<form class="cf-sign-out" method="post" action="/auth/sign-out" data-corn="sign-out"><button type="submit" class="hx-btn hx-btn--quiet" title="Signed in as ${escHtml(config.signIn.login)}" data-corn-kind="quiet"><span class="cf-sign-out-icon" aria-hidden="true">⎋</span><span class="cf-sign-out-text">Sign out</span></button></form>`
96
96
  : '';
97
97
  const powered = poweredBy(config.brand);
98
98
  if (html || powered || signOut) links.innerHTML = html + powered + signOut;