@popcorn245/cornfield 0.38.0 → 0.40.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/cli/cornfield.js +4 -1
- package/core/config.js +5 -0
- package/core/contrast.js +47 -6
- package/core/layers.js +412 -0
- package/core/map-tokens.js +45 -1
- package/core/proposal.js +22 -0
- package/core/strings.js +17 -0
- package/core/theme.js +5 -4
- package/core/validate.js +4 -1
- package/explorer/check.js +14 -10
- package/explorer/explorer.css +185 -31
- package/explorer/header-fit.js +8 -0
- package/explorer/index.html +22 -11
- package/explorer/kind-letters.js +70 -0
- package/explorer/layer-model.js +59 -0
- package/explorer/layers.js +239 -53
- package/explorer/main.js +11 -10
- package/explorer/map-style.js +28 -6
- package/explorer/panels.js +5 -3
- package/explorer/proposal.js +20 -86
- package/explorer/renderer-canvas2d.js +9 -0
- package/explorer/renderer-webgl.js +21 -11
- package/explorer/review-column.js +430 -0
- package/explorer/review.js +7 -7
- package/explorer/scenario-list-model.js +301 -0
- package/explorer/scenario-ui.js +142 -136
- package/explorer/scene.js +15 -1
- package/explorer/shaders.js +1 -1
- package/explorer/sheets.js +5 -2
- package/explorer/state.js +9 -0
- package/package.json +1 -1
- package/server/server.js +4 -1
package/core/proposal.js
CHANGED
|
@@ -735,6 +735,28 @@ export function summarize(proposal) {
|
|
|
735
735
|
};
|
|
736
736
|
}
|
|
737
737
|
|
|
738
|
+
/**
|
|
739
|
+
* What a reviewer is not told by the checks: scenarios that name no persona (spec 0006 D3). A scenario names
|
|
740
|
+
* one when it, or any of its steps, has an `actor`. Warnings only: the proposal is still valid, and an outage
|
|
741
|
+
* or a pipeline scenario honestly has no actor. `topology` is the map the proposal is checked against.
|
|
742
|
+
* @param {{ nodes?: { id: string, type?: string }[] } | null} topology
|
|
743
|
+
* @param {object} proposal
|
|
744
|
+
* @returns {string[]} one line each, ready to print
|
|
745
|
+
*/
|
|
746
|
+
export function personaWarnings(topology, proposal) {
|
|
747
|
+
const scenarios = asList(proposal?.scenarios);
|
|
748
|
+
const isPersona = (n) => n && n.type === 'persona';
|
|
749
|
+
const hasPersonas = asList(topology?.nodes).some(isPersona) || asList(proposal?.nodes?.add).some(isPersona);
|
|
750
|
+
if (scenarios.length === 0) return [];
|
|
751
|
+
if (!hasPersonas) return ['Warning: the map has no personas (topology.personas.json); every scenario is listed under Anyone.'];
|
|
752
|
+
const out = [];
|
|
753
|
+
scenarios.forEach((s, i) => {
|
|
754
|
+
if (s?.actor || asList(s?.steps).some((st) => st?.actor)) return;
|
|
755
|
+
out.push(`Warning: scenarios[${i}] "${s?.id ?? ''}" names no persona; it is listed under Anyone.`);
|
|
756
|
+
});
|
|
757
|
+
return out;
|
|
758
|
+
}
|
|
759
|
+
|
|
738
760
|
/**
|
|
739
761
|
* What-if edits, as the viewer and the what-if agent write them. Every edit is `{ op, …fields }`; an
|
|
740
762
|
* `at` (a timestamp) may ride along and is ignored here. Indexes are 0-based positions in the
|
package/core/strings.js
CHANGED
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
export const STRINGS = Object.freeze({
|
|
15
15
|
// The header
|
|
16
16
|
layers: 'Layers',
|
|
17
|
+
layersAll: 'All',
|
|
18
|
+
layersNone: 'None',
|
|
19
|
+
overlays: 'Overlays',
|
|
17
20
|
dataFlow: 'Flow',
|
|
18
21
|
house: 'House',
|
|
19
22
|
proposals: 'Proposals',
|
|
@@ -33,6 +36,20 @@ export const STRINGS = Object.freeze({
|
|
|
33
36
|
reviewNoteLabel: 'Note for the drafting agent',
|
|
34
37
|
reviewNotePlaceholder: 'What should change?',
|
|
35
38
|
openSpecsList: 'Open the Specs list',
|
|
39
|
+
// The review column and the scenario player
|
|
40
|
+
changes: 'Changes',
|
|
41
|
+
personasAndScenarios: 'Personas and scenarios',
|
|
42
|
+
scenarios: 'Scenarios',
|
|
43
|
+
anyone: 'Anyone',
|
|
44
|
+
notInAnyScenario: 'Not in any scenario',
|
|
45
|
+
steps: 'Steps',
|
|
46
|
+
previousStep: 'Previous',
|
|
47
|
+
nextStep: 'Next',
|
|
48
|
+
pause: 'Pause',
|
|
49
|
+
play: 'Play',
|
|
50
|
+
playAgain: 'Play again',
|
|
51
|
+
nextScenario: 'Next scenario',
|
|
52
|
+
notChecked: 'Not checked',
|
|
36
53
|
// The Work panel: its tabs run in the order of the loop
|
|
37
54
|
tabSpecs: 'Specs',
|
|
38
55
|
tabPulls: 'PRs',
|
package/core/theme.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* fontHosts: [], // the hosts of the font FILES, when a fonts host is not a known pair
|
|
12
12
|
* names: { day: './tools/cornfield/day.css' }, // named themes: data-theme-name on <html>, a picker in the header
|
|
13
13
|
* default: 'day', // the name used until a viewer picks one
|
|
14
|
-
* icons: { app: './tools/cornfield/icons/app.svg' }, // an icon per node kind, drawn inside the node on the map (svg or png)
|
|
14
|
+
* icons: { app: './tools/cornfield/icons/app.svg' }, // an icon per node type ("app"), per finer kind ("service:timer") or per project layer ("layer:timers"), drawn inside the node on the map (svg or png)
|
|
15
15
|
* pixelated: true, // small icons are drawn crisp (nearest-neighbour), not smoothed
|
|
16
16
|
* contrast: 'error', // 'warn' turns a failing contrast pair in `validate` into a warning
|
|
17
17
|
* }
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
import fs from 'node:fs';
|
|
23
23
|
import path from 'node:path';
|
|
24
24
|
import { NODE_THEMES } from './schema.js';
|
|
25
|
+
import { iconKeyShape } from './layers.js';
|
|
25
26
|
|
|
26
27
|
export const THEME_KEYS = Object.freeze(['css', 'fonts', 'fontHosts', 'names', 'default', 'icons', 'pixelated', 'contrast']);
|
|
27
28
|
/** The node kinds an icon may be set for: every node type of the map */
|
|
@@ -109,10 +110,10 @@ export function themeProblems(t) {
|
|
|
109
110
|
}
|
|
110
111
|
if (t.pixelated !== undefined && typeof t.pixelated !== 'boolean') out.push('theme.pixelated is true or false.');
|
|
111
112
|
if (t.icons !== undefined) {
|
|
112
|
-
if (!isObject(t.icons)) out.push('theme.icons is { "<node
|
|
113
|
+
if (!isObject(t.icons)) out.push('theme.icons is { "<node type>": "./path.svg" } (or "<type>:<kind>", or "layer:<key>").');
|
|
113
114
|
else {
|
|
114
115
|
for (const [kind, rel] of Object.entries(t.icons)) {
|
|
115
|
-
if (!
|
|
116
|
+
if (!iconKeyShape(kind)) out.push(`theme.icons "${kind.slice(0, 60)}": not a node type (${ICON_KINDS.join(', ')}), a finer kind like "service:timer", or a project layer like "layer:timers".`);
|
|
116
117
|
const found = themeIconAsset(t, rel);
|
|
117
118
|
if ('problem' in found) out.push(`theme.icons.${kind} ${found.problem}`);
|
|
118
119
|
}
|
|
@@ -145,7 +146,7 @@ export function iconUrls(theme) {
|
|
|
145
146
|
const out = {};
|
|
146
147
|
if (!theme || !isObject(theme.icons)) return out;
|
|
147
148
|
for (const [kind, rel] of Object.entries(theme.icons)) {
|
|
148
|
-
if (!
|
|
149
|
+
if (!iconKeyShape(kind)) continue;
|
|
149
150
|
const found = themeIconAsset(theme, rel);
|
|
150
151
|
if (!('problem' in found)) out[kind] = THEME_ASSET_PREFIX + found.asset;
|
|
151
152
|
}
|
package/core/validate.js
CHANGED
|
@@ -24,7 +24,8 @@ import { deriveTopology } from './derive.js';
|
|
|
24
24
|
import { missingPaths, planSync } from './sync.js';
|
|
25
25
|
import { repoPaths, repoReader } from './repo.js';
|
|
26
26
|
import { checkThemeContrast } from './contrast.js';
|
|
27
|
-
import { mapTokenWarnings } from './map-tokens.js';
|
|
27
|
+
import { layerTokenWarnings, mapTokenWarnings } from './map-tokens.js';
|
|
28
|
+
import { layersMapWarnings } from './layers.js';
|
|
28
29
|
import { BRAND_IMAGE_KEYS, brandAssetFile } from './brand.js';
|
|
29
30
|
import { MAX_THEME_BYTES, cssProblems, cssUrls, themeAssetFile, themeFileUrl, themeFiles, themeIconFileProblems, themeUrlTarget } from './theme.js';
|
|
30
31
|
|
|
@@ -286,6 +287,8 @@ export async function validateRepo({ config, derivers, topology = readTopology(c
|
|
|
286
287
|
warnings.push(...contrast.warnings);
|
|
287
288
|
if (contrast.summary) notes.push(contrast.summary);
|
|
288
289
|
warnings.push(...mapTokenWarnings(config)); // a map font, line width or glow the map cannot read draws as auto
|
|
290
|
+
warnings.push(...layerTokenWarnings(config, topology)); // a kind token, a group token or an icon for a kind or layer that is not there
|
|
291
|
+
warnings.push(...layersMapWarnings(config.layers, topology)); // a project layer that matches nothing, or whose every node an earlier layer took
|
|
289
292
|
errors.push(...validateCloudNodes(topology, config.root));
|
|
290
293
|
errors.push(...validateProposalFiles(topology, path.join(config.root, config.proposals), config.root));
|
|
291
294
|
const io = repoReader(config.root);
|
package/explorer/check.js
CHANGED
|
@@ -33,7 +33,9 @@ let version = 0;
|
|
|
33
33
|
|
|
34
34
|
/** Hands the tool its checker (main.js, from the plugin); none means every checked step reads "Not checked" */
|
|
35
35
|
export function initChecks(opts = {}) {
|
|
36
|
-
|
|
36
|
+
const next = opts.checker || null;
|
|
37
|
+
if (next !== checker) closeChecks(); // answers asked of another checker are not this one's
|
|
38
|
+
checker = next;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/** Changes whenever a verdict may have: scenario-ui.js puts it in the player's signature, so an answer redraws the step */
|
|
@@ -47,12 +49,17 @@ const namesActor = (scenario) => !!scenario && (!!scenario.actor || (Array.isArr
|
|
|
47
49
|
* @param {() => void} onChange called when an answer arrives or the As menu moved (scenario-ui.js syncs and redraws)
|
|
48
50
|
*/
|
|
49
51
|
export function openChecks(scenario, onChange = () => {}) {
|
|
52
|
+
// the scenario that is already being checked (opened in the list, now played): its answers stay, only who is told changes
|
|
53
|
+
if (current && current.scenario && scenario && current.scenario.id === scenario.id) { current.onChange = onChange; replan(scenario); return; }
|
|
50
54
|
closeChecks();
|
|
51
55
|
current = { scenario: null, as: null, nodes: null, plan: null, answer: { status: 'idle' }, controller: null, onChange };
|
|
52
56
|
if (namesActor(scenario) && state.activeLayers.persona !== true) toggleLayer('persona');
|
|
53
57
|
replan(scenario);
|
|
54
58
|
}
|
|
55
59
|
|
|
60
|
+
/** The id of the scenario being checked (a player's or the list's), or null */
|
|
61
|
+
export const checkedScenarioId = () => (current && current.scenario ? current.scenario.id : null);
|
|
62
|
+
|
|
56
63
|
/** The scenario closed: nothing more is asked or shown */
|
|
57
64
|
export function closeChecks() {
|
|
58
65
|
if (current && current.controller) current.controller.abort();
|
|
@@ -125,21 +132,18 @@ export function scenarioVerdicts() {
|
|
|
125
132
|
|
|
126
133
|
/** The pill in the head, the line under the text, and the As row under the controls: only on the bar of a scenario that names an actor, so any other bar is as it was */
|
|
127
134
|
function mountControls(bar) {
|
|
128
|
-
|
|
129
|
-
const title = bar.querySelector('.hx-player-title');
|
|
135
|
+
// the pill ends the step's line; the reason is a line of its own under the bar's row, with the As row (the player is one bar: spec 0006 D6)
|
|
130
136
|
const pill = document.createElement('span');
|
|
131
137
|
pill.className = 'hx-player-verdict';
|
|
132
138
|
pill.dataset.corn = 'state-pill';
|
|
133
139
|
pill.hidden = true;
|
|
134
|
-
|
|
140
|
+
const text = bar.querySelector('.hx-player-text');
|
|
141
|
+
if (text) text.append(' ', pill); else bar.prepend(pill);
|
|
135
142
|
|
|
136
143
|
const line = document.createElement('p');
|
|
137
144
|
line.className = 'hx-player-check';
|
|
138
145
|
line.dataset.corn = 'scenario-check';
|
|
139
|
-
line.setAttribute('aria-live', 'polite');
|
|
140
146
|
line.hidden = true;
|
|
141
|
-
const text = bar.querySelector('.hx-player-text');
|
|
142
|
-
if (text) text.after(line); else bar.appendChild(line);
|
|
143
147
|
|
|
144
148
|
const row = document.createElement('div');
|
|
145
149
|
row.className = 'hx-player-as';
|
|
@@ -147,8 +151,8 @@ function mountControls(bar) {
|
|
|
147
151
|
<label class="hx-player-as-label">As <select data-corn="control" class="hx-player-speed hx-player-as-menu" data-check="as" aria-label="Act every step as"></select></label>
|
|
148
152
|
<button data-corn-kind="secondary" type="button" class="hx-btn" data-check="recheck">Check again</button>
|
|
149
153
|
<span class="hx-player-as-sum hx-faint"></span>`;
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
154
|
+
const track = bar.querySelector('.hx-player-track');
|
|
155
|
+
if (track) { track.before(line); track.before(row); } else { bar.appendChild(line); bar.appendChild(row); }
|
|
152
156
|
|
|
153
157
|
row.querySelector('[data-check=as]').addEventListener('change', (e) => chooseActor(e.target.value));
|
|
154
158
|
row.querySelector('[data-check=recheck]').addEventListener('click', recheck);
|
|
@@ -209,7 +213,7 @@ export function paintChecks(bar, snap) {
|
|
|
209
213
|
const line = bar.querySelector('.hx-player-check');
|
|
210
214
|
const row = bar.querySelector('.hx-player-as');
|
|
211
215
|
if (!pill || !line || !row) return;
|
|
212
|
-
const words = verdictWords(snap.verdict);
|
|
216
|
+
const words = snap.done ? null : verdictWords(snap.verdict); // at the end there is no step to say a verdict of
|
|
213
217
|
pill.hidden = !words;
|
|
214
218
|
line.hidden = !words;
|
|
215
219
|
if (words) {
|
package/explorer/explorer.css
CHANGED
|
@@ -193,7 +193,6 @@ h1, h2, h3, p { margin: 0; }
|
|
|
193
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
194
|
.hx-header .hx-layers { position: absolute; top: calc(100% + var(--corn-space-4)); left: var(--corn-space-4); }
|
|
195
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
196
|
/* The live chip sits on the map too, left of Fit */
|
|
198
197
|
.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
198
|
.hx-work { height: 44px; min-width: 44px; justify-content: center; padding: 0 var(--corn-space-3); }
|
|
@@ -404,7 +403,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
404
403
|
.hx-proposal-bar.is-error { border-color: color-mix(in srgb, var(--corn-removed) 50%, transparent); }
|
|
405
404
|
.hx-proposal-message { color: var(--corn-text-2); }
|
|
406
405
|
.hx-proposal-bar.is-error .hx-proposal-message { color: var(--corn-bad); }
|
|
407
|
-
.hx-proposal-
|
|
406
|
+
.hx-proposal-count:focus-visible, .hx-proposal-mode:focus-visible, .hx-seg-btn:focus-visible, .hx-change-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
408
407
|
.hx-proposal-summary { margin-top: var(--corn-space-2); color: var(--corn-text-2); line-height: 1.45; }
|
|
409
408
|
|
|
410
409
|
/* Before / Diff / After */
|
|
@@ -418,10 +417,10 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
418
417
|
.hx-proposal-errors ul { margin: var(--corn-space-2) 0 var(--corn-space-1); padding-left: var(--corn-space-5); line-height: 1.5; }
|
|
419
418
|
.hx-proposal-errors p { margin-top: var(--corn-space-1); font-size: var(--corn-text-xs); }
|
|
420
419
|
|
|
421
|
-
.hx-proposal-changes { display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); max-height: 40dvh; margin-top: var(--corn-space-2); overflow-y: auto; }
|
|
422
420
|
.hx-change-row { display: flex; align-items: center; gap: var(--corn-space-3); width: 100%; padding: var(--corn-space-1) var(--corn-space-2); border: 0; border-radius: var(--corn-radius-sm); background: none; text-align: left; font-size: var(--corn-text-xs); }
|
|
423
421
|
.hx-change-row:hover { background: var(--corn-line-soft); }
|
|
424
422
|
.hx-change-what { width: 56px; flex: none; color: var(--corn-text-3); }
|
|
423
|
+
.hx-change-row .hx-name { min-width: 0; overflow-wrap: anywhere; } /* a long label wraps in its row: the list never scrolls sideways */
|
|
425
424
|
|
|
426
425
|
/* The marks' colours, shared with the picture: the diff tokens, whose light values are theme-model.js `lightColor` of the dark ones */
|
|
427
426
|
.hx-mark-dot { display: inline-block; width: 12px; height: 12px; flex: none; margin-right: var(--corn-space-2); border-radius: 50%; border: var(--corn-border-strong) solid var(--corn-changed); vertical-align: -2px; }
|
|
@@ -453,27 +452,34 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
453
452
|
}
|
|
454
453
|
|
|
455
454
|
/* ---- scenario player (scenario-ui.js): the bar while a scenario plays, and the scenario list --------- */
|
|
456
|
-
.hx-player { position: absolute; left:
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
455
|
+
.hx-player { position: absolute; left: calc(var(--hx-col-w, 0px) + 24px); right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2) var(--corn-space-4); padding: var(--corn-space-3) var(--corn-space-4); border-radius: var(--corn-radius-lg); z-index: 25; overflow: hidden; }
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
460
459
|
.hx-player .hx-close { width: 28px; height: 28px; font-size: var(--corn-text-sm); }
|
|
461
|
-
|
|
460
|
+
|
|
462
461
|
.hx-player-speed { flex: none; height: 28px; padding: 0 var(--corn-space-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); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); cursor: pointer; }
|
|
463
462
|
.hx-player-speed:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
464
|
-
.hx-player-text { margin: 0; min-
|
|
463
|
+
.hx-player-text { margin: 0; flex: 1 1 18em; min-width: 0; font-size: var(--corn-text-base); line-height: 1.4; color: var(--corn-text); user-select: text; overflow-wrap: anywhere; }
|
|
464
|
+
.hx-player-who { color: var(--corn-text-2); font-weight: 600; }
|
|
465
|
+
.hx-player-text .hx-player-verdict { margin-left: var(--corn-space-2); }
|
|
465
466
|
.hx-player-count { color: var(--corn-accent-text); font-weight: 600; white-space: nowrap; }
|
|
466
|
-
.hx-player-controls { display: flex; gap: var(--corn-space-3); }
|
|
467
|
-
.hx-player-
|
|
467
|
+
.hx-player-controls { display: flex; flex: none; gap: var(--corn-space-3); }
|
|
468
|
+
.hx-player-side { display: flex; flex: none; align-items: center; gap: var(--corn-space-3); margin-left: auto; }
|
|
469
|
+
.hx-player-controls .hx-btn { justify-content: center; white-space: nowrap; }
|
|
470
|
+
.hx-player-controls .hx-btn[hidden] { display: none; }
|
|
471
|
+
/* The glyphs are drawn, not said: the names are the words (an empty alternative after the slash keeps a screen reader from reading them) */
|
|
472
|
+
.hx-player-prev::before { content: "◀" / ""; margin-right: var(--corn-space-2); }
|
|
473
|
+
.hx-player-next::after { content: "▶" / ""; margin-left: var(--corn-space-2); }
|
|
474
|
+
/* the pause mark is drawn (two bars), not a character: not every font has one */
|
|
475
|
+
.hx-player-toggle[data-state="playing"]::before { content: "" / ""; display: inline-block; box-sizing: border-box; width: 1em; height: 1em; margin-right: var(--corn-space-2); border-left: calc(var(--corn-border-strong) * 1.5) solid currentColor; border-right: calc(var(--corn-border-strong) * 1.5) solid currentColor; }
|
|
476
|
+
.hx-player-toggle[data-state="paused"]::before { content: "▶" / ""; margin-right: var(--corn-space-2); }
|
|
477
|
+
.hx-player-toggle[data-state="done"]::before { content: "↻" / ""; margin-right: var(--corn-space-2); }
|
|
468
478
|
.hx-player-controls .hx-btn:disabled { opacity: 0.4; cursor: default; }
|
|
469
479
|
.hx-player-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--corn-line-soft); }
|
|
470
480
|
.hx-player-fill { display: block; height: 100%; width: 0; background: var(--corn-accent-text); }
|
|
471
481
|
|
|
472
|
-
.hx-scenarios { position: absolute; top: 12px; left: 12px; max-width: min(320px, calc(100% - 24px)); padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius); font-size: var(--corn-text-sm); color: var(--corn-text-2); z-index: 12; }
|
|
473
|
-
.hx-scenarios-item { display: block; width: 100%; margin-top: var(--corn-space-2); padding: var(--corn-space-2) var(--corn-space-3); border: var(--corn-border) solid var(--corn-line-soft); border-radius: var(--corn-radius-sm); background: transparent; color: var(--corn-text); font-size: var(--corn-text-sm); text-align: left; cursor: pointer; }
|
|
474
|
-
.hx-scenarios-item:hover { background: color-mix(in srgb, var(--corn-accent-hover) 25%, transparent); }
|
|
475
482
|
/* With a proposal open the list is a row of its bar (scenario-ui.js mounts it there), so it opens in the bar's flow and the bar grows to hold it */
|
|
476
|
-
.hx-proposal-bar .hx-scenarios { position: static; max-width: none; max-height: 40dvh; margin-top: var(--corn-space-2); padding: var(--corn-space-2) var(--corn-space-3); overflow-y: auto; border-radius: var(--corn-radius-sm); border-color: var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
|
|
477
483
|
|
|
478
484
|
/* ---- what-if editing (whatif.js): the controls under the proposal bar, the drag that draws an edge ---- */
|
|
479
485
|
.hx-whatif { margin-top: var(--corn-space-3); padding-top: var(--corn-space-3); border-top: var(--corn-border) solid color-mix(in srgb, var(--corn-edit) 30%, transparent); }
|
|
@@ -539,14 +545,16 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
539
545
|
.hx-proposal-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-3) var(--corn-space-4); }
|
|
540
546
|
.hx-proposal-name { flex: 0 1 auto; min-width: 0; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--corn-text-base); font-weight: 650; color: var(--corn-text); }
|
|
541
547
|
.hx-proposal-counts { display: contents; }
|
|
542
|
-
.hx-proposal-chip { display: inline-flex; align-items: center;
|
|
543
|
-
.hx-proposal-
|
|
548
|
+
.hx-proposal-chip { display: inline-flex; align-items: center; flex-wrap: wrap; color: var(--corn-text-2); font-size: var(--corn-text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
549
|
+
.hx-proposal-count { display: inline-flex; align-items: center; padding: var(--corn-space-1) var(--corn-space-2); border: 0; border-radius: var(--corn-radius-sm); background: none; color: inherit; font: inherit; white-space: inherit; cursor: pointer; }
|
|
550
|
+
.hx-proposal-count:hover { color: var(--corn-text); text-decoration: underline; }
|
|
551
|
+
.hx-proposal-peek { display: none; margin: 0; }
|
|
544
552
|
.hx-proposal-chip .hx-mark-dot { margin: 0 var(--corn-space-2) 0 0; }
|
|
553
|
+
h2.hx-proposal-name { margin: 0; }
|
|
545
554
|
.hx-proposal-sep { margin: 0 var(--corn-space-2); color: var(--corn-text-3); }
|
|
546
555
|
.hx-proposal-mode { display: none; }
|
|
547
556
|
.hx-proposal-tools, .hx-proposal-actions { display: flex; align-items: center; gap: var(--corn-space-3); }
|
|
548
557
|
.hx-proposal-tools .hx-btn { height: 30px; font-size: var(--corn-text-sm); font-weight: 500; }
|
|
549
|
-
#proposal-play[aria-expanded="true"] { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
550
558
|
#proposal-edit.hx-btn--active { background: var(--corn-edit-text); border-color: var(--corn-edit); color: var(--corn-ground); }
|
|
551
559
|
.hx-proposal-actions { margin-left: auto; }
|
|
552
560
|
.hx-proposal-actions .hx-btn { height: 32px; justify-content: center; padding: 0 var(--corn-space-5); font-size: var(--corn-text-sm); font-weight: 500; }
|
|
@@ -564,7 +572,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
564
572
|
.hx-proposal-head { display: grid; grid-template-columns: 1fr auto; gap: var(--corn-space-2) var(--corn-space-3); }
|
|
565
573
|
.hx-proposal-name { grid-column: 1 / -1; order: 1; max-width: none; }
|
|
566
574
|
.hx-proposal-counts { display: flex; grid-column: 1 / -1; order: 2; align-items: center; flex-wrap: wrap; column-gap: var(--corn-space-2); }
|
|
567
|
-
.hx-proposal-
|
|
575
|
+
.hx-proposal-count, .hx-proposal-mode { min-height: 44px; }
|
|
568
576
|
.hx-proposal-mode { display: inline-flex; align-items: center; gap: var(--corn-space-2); padding: 0 var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text); font-size: var(--corn-text-sm); font-weight: 600; }
|
|
569
577
|
/* A chevron drawn from an image and the text colour: a thick --corn-border-strong cannot turn it into a heart (the borders it used to be drawn with) */
|
|
570
578
|
.hx-proposal-mode::after { content: ""; width: 10px; height: 10px; background: currentColor; -webkit-mask: var(--hx-chevron) no-repeat center / contain; mask: var(--hx-chevron) no-repeat center / contain; }
|
|
@@ -580,7 +588,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
580
588
|
.hx-proposal-more .hx-btn--icon { order: 6; width: 44px; height: 44px; }
|
|
581
589
|
.hx-proposal-more-menu { position: static; grid-column: 1 / -1; order: 7; box-shadow: none; }
|
|
582
590
|
.hx-proposal-more-menu .hx-btn { height: auto; min-height: 44px; font-size: var(--corn-text-md); }
|
|
583
|
-
.hx-
|
|
591
|
+
.hx-review .hx-btn, .hx-whatif .hx-btn { min-height: 44px; }
|
|
584
592
|
}
|
|
585
593
|
|
|
586
594
|
/* A proposal's mockups (mockups.js): the buttons in a node's panel and the window one opens in. A mockup is untrusted content, shown in an <img> or a sandboxed <iframe>. */
|
|
@@ -631,13 +639,18 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
631
639
|
.hx-proposal-bar[data-sheet-state="peek"] #proposal-body > :not(.hx-proposal-head),
|
|
632
640
|
.hx-proposal-bar[data-sheet-state="peek"] .hx-proposal-head > :is(.hx-proposal-tools, .hx-proposal-more, .hx-proposal-more-menu) { display: none; }
|
|
633
641
|
.hx-proposal-bar[data-sheet-state="peek"] .hx-review > :not([data-review-hint]):not([data-review-msg]) { display: none; } /* the peek keeps the reason Approve is off, and a refusal */
|
|
634
|
-
.hx-proposal-bar[data-sheet-state="expanded"] .hx-
|
|
642
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-whatif-panel { max-height: none; overflow: visible; }
|
|
635
643
|
|
|
636
|
-
/* The scenario player:
|
|
637
|
-
.hx-player { max-height: 50dvh; overflow: hidden; gap: var(--corn-space-
|
|
644
|
+
/* The scenario player: one row (Previous, Pause, Next, the counter and Close) in the peek; the text, the speed and the checks when it is open */
|
|
645
|
+
.hx-player { position: relative; left: auto; right: auto; bottom: auto; flex-wrap: wrap; max-height: 50dvh; overflow: hidden; gap: 0 var(--corn-space-3); padding: 0 var(--corn-space-4) var(--corn-space-3); --sheet-pb: var(--corn-space-3); }
|
|
646
|
+
.hx-player > .hx-sheet-handle { flex: 0 0 100%; }
|
|
638
647
|
.hx-player[data-sheet-state="expanded"] { overflow-y: auto; }
|
|
639
|
-
.hx-player[data-sheet-state="peek"] > :not(.hx-sheet-handle):not(.hx-player-
|
|
640
|
-
.hx-player[data-sheet-state="peek"] .hx-player-text {
|
|
648
|
+
.hx-player[data-sheet-state="peek"] > :not(.hx-sheet-handle):not(.hx-player-controls):not(.hx-player-text):not(.hx-player-side):not(.hx-player-track):not(.hx-player-says) { display: none; } /* Previous, Pause and Next stay in the peek, with the counter and Close */
|
|
649
|
+
.hx-player[data-sheet-state="peek"] .hx-player-text { flex: 1 1 0; display: flex; align-items: center; gap: var(--corn-space-2); min-height: 44px; overflow: hidden; font-size: var(--corn-text-md); white-space: nowrap; }
|
|
650
|
+
.hx-player[data-sheet-state="peek"] .hx-player-step, .hx-player[data-sheet-state="peek"] .hx-player-who, .hx-player[data-sheet-state="peek"] .hx-player-sep { display: none; }
|
|
651
|
+
.hx-player[data-sheet-state="peek"] .hx-player-side .hx-player-speed { display: none; }
|
|
652
|
+
.hx-player[data-sheet-state="expanded"] .hx-player-text { flex: 1 0 100%; order: 3; }
|
|
653
|
+
.hx-player[data-sheet-state="expanded"] .hx-player-title { position: static; width: auto; height: auto; clip: auto; clip-path: none; overflow: visible; order: 0; flex: 0 0 100%; font-size: var(--corn-text-sm); font-weight: 600; color: var(--corn-text-2); }
|
|
641
654
|
|
|
642
655
|
/* The node panel: its title and type until expanded */
|
|
643
656
|
.hx-drawer { max-height: 60dvh; }
|
|
@@ -955,6 +968,8 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
955
968
|
/* ---- the node panel (panels.js, #138): type · name · one line · facts · mockups · threads · the diff · the actions ------------ */
|
|
956
969
|
.hx-drawer-id { flex: 1; min-width: 0; }
|
|
957
970
|
.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); }
|
|
971
|
+
/* The badge carries a project's own kind ("Service · timer", spec 0009): a long one wraps inside the panel, never past it */
|
|
972
|
+
.hx-kicker [data-corn="badge"] { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
|
|
958
973
|
#drawer-host { white-space: pre; } /* the kicker is a flex row, which drops a leading space: keep " · host" */
|
|
959
974
|
.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); }
|
|
960
975
|
.hx-drawer-id .hx-drawer-title { font-size: var(--corn-text-xl); font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
|
|
@@ -1022,7 +1037,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
1022
1037
|
.hx-header-left[data-brand-short] .hx-title { display: none; }
|
|
1023
1038
|
.hx-header-left[data-overflow] { -webkit-mask: linear-gradient(to right, var(--corn-text) calc(100% - var(--corn-space-6)), transparent); mask: linear-gradient(to right, var(--corn-text) calc(100% - var(--corn-space-6)), transparent); }
|
|
1024
1039
|
/* A scroll container never cuts a focus ring: a row that is tabbed to stops short of the edge by the ring's width and offset */
|
|
1025
|
-
.hx-forge-body, .hx-drawer-body, .hx-
|
|
1040
|
+
.hx-forge-body, .hx-drawer-body, .hx-rc-scroll, .hx-proposal-bar, .hx-confirm, .hx-whatif-edges .hx-whatif-list { scroll-padding-block: calc(var(--corn-focus-width) + var(--corn-focus-offset) + var(--corn-space-1)); }
|
|
1026
1041
|
/* The Work tabs scroll sideways: a tab brought into view stops short of the edge by the strip's own padding */
|
|
1027
1042
|
.hx-forge-tabs { scroll-padding-inline: var(--corn-space-4); }
|
|
1028
1043
|
/* Numbers shown as data take the number face (a brand sets --corn-font-num; digits in a pixel face misread) */
|
|
@@ -1052,15 +1067,19 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1052
1067
|
|
|
1053
1068
|
@media (max-width: 767px) {
|
|
1054
1069
|
.hx-proposal-source { grid-column: 1 / -1; order: 1; justify-self: start; }
|
|
1055
|
-
.hx-player-controls .hx-btn { min-height: 44px; padding: 0 var(--corn-space-
|
|
1070
|
+
.hx-player-controls .hx-btn { min-height: 44px; min-width: 44px; padding: 0 var(--corn-space-3); white-space: nowrap; }
|
|
1071
|
+
/* On a phone the controls are glyphs, the names are said: ◀ ⏸ ▶ in a 44px row */
|
|
1072
|
+
.hx-player-prev .hx-player-label, .hx-player-next .hx-player-label, .hx-player-toggle .hx-player-label { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
1073
|
+
.hx-player-prev::before, .hx-player-next::after, .hx-player-toggle::before { margin: 0; }
|
|
1074
|
+
.hx-player-next-scenario { font-size: var(--corn-text-sm); }
|
|
1056
1075
|
.hx-proposal-ways .hx-btn, a.hx-proposal-source { min-height: 44px; } /* targets a thumb can hit */
|
|
1057
1076
|
.hx-proposal-source { padding: 0; border: 0; border-radius: 0; background: none; } /* a line of the sheet, not a pill 44px tall */
|
|
1058
1077
|
a.hx-proposal-source { text-decoration: underline; text-underline-offset: 3px; }
|
|
1059
1078
|
.hx-player-controls { gap: var(--corn-space-2); }
|
|
1060
1079
|
/* While a scenario plays the proposal sheet folds to its title and counts: the player needs the room */
|
|
1061
|
-
.hx-dock:has(> .hx-player) .hx-proposal-bar[data-sheet-state="peek"] .hx-
|
|
1080
|
+
.hx-dock:has(> .hx-player) .hx-proposal-bar[data-sheet-state="peek"] .hx-rc-foot { display: none; }
|
|
1062
1081
|
/* The note open: the field, Cancel and the send button are all there is, so all of them stay above the keyboard */
|
|
1063
|
-
.hx-proposal-bar:has(.hx-review-form:not([hidden])) :is(.hx-proposal-name, .hx-proposal-source, .hx-proposal-counts, .hx-proposal-tools, .hx-proposal-more, .hx-review-status, .hx-review-line) { display: none; }
|
|
1082
|
+
.hx-proposal-bar:has(.hx-review-form:not([hidden])) :is(.hx-proposal-name, .hx-proposal-source, .hx-proposal-counts, .hx-proposal-tools, .hx-proposal-more, .hx-review-status, .hx-review-line, .hx-rc-scroll, .hx-rc-tabs, .hx-proposal-peek) { display: none; } /* the review column's lists too: the sheet holds the note and its buttons */
|
|
1064
1083
|
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-proposal-actions { order: 4; grid-template-columns: 1fr; }
|
|
1065
1084
|
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-proposal-actions .hx-btn--approve { display: none; }
|
|
1066
1085
|
/* Reflow: nothing is wider than the sheet, and long words and counts wrap instead of being cut */
|
|
@@ -1091,10 +1110,10 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1091
1110
|
.hx-change-row { min-height: 28px; }
|
|
1092
1111
|
.hx-run .hx-link { display: inline-flex; align-items: center; min-height: 24px; } /* a run card's links sit on lines 14px apart: 24px at a desk (WCAG 2.5.8) */
|
|
1093
1112
|
@media (max-width: 767px), (pointer: coarse) {
|
|
1094
|
-
.hx-change-row, .hx-toggle-row, .hx-textbtn, .hx-player-speed, .hx-player .hx-close,
|
|
1113
|
+
.hx-change-row, .hx-sc-row, .hx-step, .hx-rc-tab, .hx-toggle-row, .hx-textbtn, .hx-player-speed, .hx-player .hx-close,
|
|
1095
1114
|
.hx-confirm .hx-btn, .hx-confirm .hx-forge-input, .hx-confirm .hx-forge-select, .hx-mobile-search .hx-input { min-height: 44px; }
|
|
1096
1115
|
.hx-textbtn, .hx-player-speed, .hx-player .hx-close, .hx-confirm .hx-btn { min-width: 44px; }
|
|
1097
|
-
.hx-proposal-chip { flex-wrap: wrap; white-space: normal; text-align: left; } /* the counts say what they count, so they are longer: they wrap rather than clip */
|
|
1116
|
+
.hx-proposal-chip { flex-wrap: wrap; white-space: normal; text-align: left; } .hx-proposal-count { white-space: normal; text-align: left; } /* the counts say what they count, so they are longer: they wrap rather than clip */
|
|
1098
1117
|
.hx-sheet-handle { height: 44px; } /* the grip is drawn the same; the button itself is 44px (a hit area stretched past it is clipped by the sheet above, and covers its title below) */
|
|
1099
1118
|
.hx-run .hx-link, .hx-forge-check .hx-link { display: inline-flex; align-items: center; min-height: 44px; }
|
|
1100
1119
|
}
|
|
@@ -1156,6 +1175,141 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1156
1175
|
.hx-offline[hidden] { display: none; }
|
|
1157
1176
|
.hx-offline[data-corn-state="success"] { border-color: var(--corn-ok); }
|
|
1158
1177
|
|
|
1178
|
+
/* ==== the review column (spec 0006, review-column.js): the changes, and the personas with the scenarios that apply to them ==============
|
|
1179
|
+
From 768px it is docked on the left of the map under the proposal bar (the free map is what it leaves: sheets.js visibleMapRect);
|
|
1180
|
+
on a phone it is the expanded proposal sheet's body, a two-part switch at its top, its foot (the decision) always in view. */
|
|
1181
|
+
.hx-review-column { position: absolute; left: 12px; bottom: 12px; top: var(--hx-column-top, 150px); width: 400px; z-index: 14; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--corn-radius-lg); font-size: var(--corn-text-sm); user-select: text; }
|
|
1182
|
+
.hx-review-column[hidden] { display: none; }
|
|
1183
|
+
@media (max-width: 1023px) { .hx-review-column { width: 320px; } }
|
|
1184
|
+
/* The Work panel: from 1280px the column moves over to make room for it; narrower, the panel lies over the column while it is open (moving it would leave the map a sliver) */
|
|
1185
|
+
@media (min-width: 1280px) { .hx-stage:has(.forge-open) .hx-review-column { left: calc(var(--hx-forge-w) + 12px); } }
|
|
1186
|
+
/* The node panel (480px) and the 320px column do not both fit under 1024px: the column gives up its width, so the panel covers none of it */
|
|
1187
|
+
@media (min-width: 768px) and (max-width: 1023px) { .hx-stage:has(.drawer-open) .hx-review-column { width: min(320px, calc(100% - 504px)); } }
|
|
1188
|
+
.hx-rc-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-2); overflow: hidden; padding: var(--corn-space-3) var(--corn-space-4); }
|
|
1189
|
+
.hx-proposal-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin: 0; flex: none; }
|
|
1190
|
+
.hx-rc-lists { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-4); }
|
|
1191
|
+
/* Both lists are on screen at once: the changes take what they need up to 40%, the scenarios the rest, each scrolling on its own */
|
|
1192
|
+
.hx-rc-section { display: flex; flex-direction: column; min-height: 0; }
|
|
1193
|
+
/* review-column.js measures the scenarios and sets --hx-changes-max: 40% while the scenarios need the rest, more when they are few */
|
|
1194
|
+
#rc-changes { flex: 0 1 auto; max-height: var(--hx-changes-max, 40%); }
|
|
1195
|
+
#rc-scenarios { flex: 1 1 0; min-height: min(12em, var(--hx-scenarios-need, 12em)); }
|
|
1196
|
+
.hx-change-list, .hx-rc-sbody { min-height: 0; overflow-y: auto; scroll-padding-block: var(--corn-space-2); }
|
|
1197
|
+
.hx-rc-h { flex: none; }
|
|
1198
|
+
.hx-rc-tabs { display: flex; gap: var(--corn-space-2); }
|
|
1199
|
+
.hx-rc-tabs[hidden] { display: none; }
|
|
1200
|
+
.hx-rc-tab { flex: 1; min-height: 32px; padding: 0 var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text-3); font: inherit; font-weight: 600; cursor: pointer; }
|
|
1201
|
+
.hx-rc-tab[aria-selected="true"] { background: var(--corn-accent); border-color: var(--corn-accent); color: var(--corn-text-on-accent); }
|
|
1202
|
+
.hx-rc-tab:focus-visible, .hx-sc-row:focus-visible, .hx-step:focus-visible, .hx-rc-h:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
1203
|
+
.hx-rc-section[hidden] { display: none; }
|
|
1204
|
+
.hx-rc-h { margin: 0 0 var(--corn-space-2); font-size: var(--corn-text-sm); font-weight: 650; color: var(--corn-text); }
|
|
1205
|
+
.hx-rc-h [data-corn="count"] { color: var(--corn-text-3); font-variant-numeric: tabular-nums; }
|
|
1206
|
+
.hx-rc-empty, .hx-rc-note, .hx-rc-coverage { margin: var(--corn-space-2) 0 0; line-height: 1.45; }
|
|
1207
|
+
.hx-rc-coverage { color: var(--corn-text-2); }
|
|
1208
|
+
.hx-change-list, .hx-sc-list, .hx-steps { margin: 0; padding: 0; list-style: none; }
|
|
1209
|
+
.hx-change-list { display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1210
|
+
.hx-persona { margin-top: var(--corn-space-4); }
|
|
1211
|
+
.hx-persona:first-of-type { margin-top: 0; }
|
|
1212
|
+
.hx-persona-name { margin: 0 0 var(--corn-space-1); font-size: var(--corn-text-xs); font-weight: 650; letter-spacing: 0.02em; color: var(--corn-text-3); overflow-wrap: anywhere; }
|
|
1213
|
+
.hx-sc-list { display: flex; flex-direction: column; gap: var(--corn-space-1); }
|
|
1214
|
+
.hx-sc-row { display: flex; align-items: flex-start; gap: var(--corn-space-3); width: 100%; padding: var(--corn-space-2) var(--corn-space-2); border: var(--corn-border) solid var(--corn-line-soft); border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text); font: inherit; text-align: left; cursor: pointer; }
|
|
1215
|
+
.hx-sc-row:hover { background: color-mix(in srgb, var(--corn-accent-hover) 18%, transparent); }
|
|
1216
|
+
.hx-sc-caret { flex: none; width: 1em; color: var(--corn-text-3); }
|
|
1217
|
+
.hx-sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1218
|
+
.hx-sc-title { font-weight: 600; overflow-wrap: anywhere; }
|
|
1219
|
+
.hx-sc-meta { font-size: var(--corn-text-xs); color: var(--corn-text-3); }
|
|
1220
|
+
.hx-sc-seen { flex: none; font-size: var(--corn-text-xs); color: var(--corn-added-text); white-space: nowrap; }
|
|
1221
|
+
.hx-steps { margin: var(--corn-space-1) 0 var(--corn-space-2) var(--corn-space-4); display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1222
|
+
.hx-steps[hidden] { display: none; }
|
|
1223
|
+
.hx-step { display: flex; align-items: flex-start; gap: var(--corn-space-3); width: 100%; padding: var(--corn-space-2) var(--corn-space-2); border: 0; border-left: var(--corn-border-strong) solid transparent; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text); font: inherit; font-size: var(--corn-text-xs); text-align: left; cursor: pointer; }
|
|
1224
|
+
.hx-step:hover { background: var(--corn-line-soft); }
|
|
1225
|
+
.hx-step[aria-current="step"] { border-left-color: var(--corn-accent-text); background: color-mix(in srgb, var(--corn-accent-hover) 22%, transparent); }
|
|
1226
|
+
.hx-step-n { flex: none; min-width: 1.4em; color: var(--corn-accent-text); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
1227
|
+
.hx-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1228
|
+
.hx-step-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--corn-space-3); }
|
|
1229
|
+
.hx-step-who { color: var(--corn-text-2); font-weight: 600; }
|
|
1230
|
+
.hx-step-where { font-weight: 600; overflow-wrap: anywhere; }
|
|
1231
|
+
.hx-step-mark { display: inline-flex; align-items: center; gap: var(--corn-space-1); color: var(--corn-text-3); }
|
|
1232
|
+
.hx-step-mark .hx-mark-dot { margin: 0; }
|
|
1233
|
+
.hx-step-text { color: var(--corn-text-2); line-height: 1.4; overflow-wrap: anywhere; }
|
|
1234
|
+
.hx-step-off { color: var(--corn-text-3); font-style: italic; }
|
|
1235
|
+
.hx-step-verdict { align-self: flex-start; white-space: normal; text-align: right; max-width: 40%; overflow-wrap: anywhere; }
|
|
1236
|
+
.hx-rc-foot { flex: none; display: flex; flex-direction: column; gap: var(--corn-space-2); padding: var(--corn-space-3) var(--corn-space-4); border-top: var(--corn-border) solid var(--corn-line); }
|
|
1237
|
+
.hx-rc-foot .hx-review { flex: none; order: 0; }
|
|
1238
|
+
.hx-rc-foot .hx-proposal-actions { margin-left: auto; }
|
|
1239
|
+
@media (max-width: 767px) {
|
|
1240
|
+
/* The expanded proposal sheet: the column is its body, with no box of its own */
|
|
1241
|
+
.hx-review-column { position: static; width: auto; max-height: none; overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
|
|
1242
|
+
.hx-rc-scroll, .hx-rc-lists, .hx-rc-section, .hx-change-list, .hx-rc-sbody { display: block; overflow: visible; max-height: none; min-height: 0; }
|
|
1243
|
+
.hx-rc-scroll { padding: var(--corn-space-2) 0; }
|
|
1244
|
+
.hx-rc-section[hidden] { display: none; }
|
|
1245
|
+
/* the sheet scrolls, not a section: each section is as tall as its list (the desktop's 40% cap and 12em floor would let the rows run under the decision) */
|
|
1246
|
+
#rc-changes, #rc-scenarios { flex: none; max-height: none; min-height: 0; }
|
|
1247
|
+
.hx-rc-lists { display: flex; flex-direction: column; }
|
|
1248
|
+
.hx-change-list { display: flex; }
|
|
1249
|
+
.hx-rc-foot { padding: var(--corn-space-3) 0 0; } /* after both lists, in the sheet's own flow: nothing overlaps the rows above it */
|
|
1250
|
+
.hx-rc-foot .hx-proposal-actions { margin-left: 0; width: 100%; }
|
|
1251
|
+
.hx-step { min-height: 44px; }
|
|
1252
|
+
.hx-sc-row, .hx-rc-tab { min-height: 44px; }
|
|
1253
|
+
.hx-step-verdict { max-width: 45%; }
|
|
1254
|
+
/* The peek: the title, the one line of counts, and the decision; the lists wait for the sheet to open */
|
|
1255
|
+
.hx-proposal-bar[data-sheet-state="peek"] #proposal-body > .hx-review-column { display: flex; }
|
|
1256
|
+
.hx-proposal-bar[data-sheet-state="peek"] .hx-review-column > :not(.hx-rc-foot) { display: none; }
|
|
1257
|
+
.hx-proposal-bar[data-sheet-state="peek"] .hx-proposal-chip { display: none; }
|
|
1258
|
+
/* Opened, the sheet's switch carries the counts, so the head is one short row: Before / Diff / After, Edit and ⋯ */
|
|
1259
|
+
.hx-proposal-bar[data-sheet-state="expanded"] { max-height: 62dvh; }
|
|
1260
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-chip, .hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-summary { display: none; }
|
|
1261
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-counts { grid-column: 1; order: 3; }
|
|
1262
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-tools { grid-column: 2; order: 4; }
|
|
1263
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-head { grid-template-columns: minmax(0, 1fr) auto auto; }
|
|
1264
|
+
.hx-proposal-bar[data-sheet-state="expanded"] .hx-proposal-more .hx-btn--icon { grid-column: 3; order: 4; }
|
|
1265
|
+
.hx-proposal-summary { display: none; }
|
|
1266
|
+
.hx-proposal-bar[data-sheet-state="peek"] .hx-proposal-peek { display: block; color: var(--corn-text-2); }
|
|
1267
|
+
}
|
|
1268
|
+
/* ==== end of the review column ================================================================================================== */
|
|
1269
|
+
|
|
1270
|
+
/* ==== the scenario player, one bar under the map (spec 0006 D6) ================================================================
|
|
1271
|
+
From 768px it sits at the foot of the map area, to the right of the review column; the stage tells it how wide the column is. */
|
|
1272
|
+
@media (min-width: 768px) {
|
|
1273
|
+
.hx-stage:has(.hx-review-column:not([hidden])) { --hx-col-w: 400px; }
|
|
1274
|
+
.hx-stage:has(.forge-open):has(.hx-review-column:not([hidden])) { --hx-col-w: max(400px, var(--hx-forge-w)); }
|
|
1275
|
+
.hx-stage:has(.drawer-open) .hx-player { right: 504px; }
|
|
1276
|
+
}
|
|
1277
|
+
@media (min-width: 1280px) {
|
|
1278
|
+
.hx-stage:has(.forge-open):has(.hx-review-column:not([hidden])) { --hx-col-w: calc(400px + var(--hx-forge-w)); }
|
|
1279
|
+
}
|
|
1280
|
+
@media (min-width: 768px) and (max-width: 1023px) {
|
|
1281
|
+
.hx-stage:has(.hx-review-column:not([hidden])) { --hx-col-w: 320px; }
|
|
1282
|
+
.hx-stage:has(.forge-open):has(.hx-review-column:not([hidden])) { --hx-col-w: max(320px, var(--hx-forge-w)); }
|
|
1283
|
+
}
|
|
1284
|
+
.hx-player-as, .hx-player-check { flex: 1 0 100%; }
|
|
1285
|
+
.hx-player-speed[data-corn="control"] { color: var(--corn-text); }
|
|
1286
|
+
/* ==== end of the player bar ===================================================================================================== */
|
|
1287
|
+
|
|
1288
|
+
/* ---------------------------------------------------------------------------
|
|
1289
|
+
Project layers and finer kinds (spec 0009): the Layers menu holds its title (with All and None) while the rows scroll, the Overlays heading,
|
|
1290
|
+
the "+N shown by the proposal" note and the kinds key under a row. Every colour is a token; a theme reaches each through its data-corn hook.
|
|
1291
|
+
--------------------------------------------------------------------------- */
|
|
1292
|
+
.hx-layers .hx-menu { display: flex; flex-direction: column; overflow: hidden; }
|
|
1293
|
+
.hx-layers .hx-menu[hidden] { display: none; }
|
|
1294
|
+
.hx-layers .hx-menu-head { flex: none; }
|
|
1295
|
+
.hx-menu-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
|
|
1296
|
+
.hx-overlays { margin-top: var(--corn-space-3); padding-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line); }
|
|
1297
|
+
.hx-layer-note { font-size: var(--corn-text-2xs); }
|
|
1298
|
+
.hx-kinds { padding: 0 var(--corn-space-3) var(--corn-space-1) var(--corn-space-5); }
|
|
1299
|
+
.hx-kinds-btn { display: inline-flex; align-items: center; gap: var(--corn-space-1); }
|
|
1300
|
+
.hx-kind-keys { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1301
|
+
.hx-kind-key { display: flex; align-items: center; gap: var(--corn-space-3); padding: calc(var(--corn-space-1) / 2) 0; color: var(--corn-text-2); font-size: var(--corn-text-xs); }
|
|
1302
|
+
.hx-kind-letter { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; padding: 0 var(--corn-space-1); border-radius: var(--corn-radius-xs); background: var(--corn-surface-3); color: var(--corn-text); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); font-weight: 700; }
|
|
1303
|
+
.hx-kind-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
|
1304
|
+
@media (max-width: 767px) {
|
|
1305
|
+
/* On a phone the menu spans the screen, at most 70% of its height */
|
|
1306
|
+
.hx-layers .hx-menu { position: fixed; top: calc(56px + var(--corn-space-4) + 44px + var(--corn-space-2)); left: 12px; right: 12px; width: auto; max-width: none; max-height: 70dvh; }
|
|
1307
|
+
/* An open menu is over the phone's sheets (the dock, z-index 45), not under them: else a proposal's sheet hides its last rows, which no scroll reaches */
|
|
1308
|
+
.hx-header:has(.hx-layers .hx-menu:not([hidden])) { z-index: 46; }
|
|
1309
|
+
.hx-kinds-btn { min-height: 44px; }
|
|
1310
|
+
}
|
|
1311
|
+
/* ==== end of project layers and finer kinds ============================================================================================ */
|
|
1312
|
+
|
|
1159
1313
|
/* ==========================================================================
|
|
1160
1314
|
What is waiting on you (spec 0010): the one number's badge, the Specs groups, each row's review state, the search, the Runs headings
|
|
1161
1315
|
========================================================================== */
|
package/explorer/header-fit.js
CHANGED
|
@@ -22,6 +22,14 @@ const wider = (el) => el.scrollWidth > el.clientWidth + 1;
|
|
|
22
22
|
export function fitLeft(left) {
|
|
23
23
|
left.removeAttribute(SHORT_ATTR);
|
|
24
24
|
left.removeAttribute(OVERFLOW_ATTR);
|
|
25
|
+
// A menu that is open hangs under its chip and past the group's edge; that is not the group's content running over, and the fade
|
|
26
|
+
// (explorer.css [data-overflow]) is a mask that would hide the menu itself. Measure with open menus out of the way, then put them back.
|
|
27
|
+
const open = [...left.querySelectorAll('.hx-menu')].filter((m) => !m.hidden).map((m) => [m, m.style.display]);
|
|
28
|
+
open.forEach(([m]) => { m.style.display = 'none'; });
|
|
29
|
+
try { return measure(left); } finally { open.forEach(([m, was]) => { m.style.display = was; }); }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function measure(left) {
|
|
25
33
|
let short = false;
|
|
26
34
|
if (left.querySelector('[data-corn="brand-wordmark"]') && wider(left)) {
|
|
27
35
|
left.setAttribute(SHORT_ATTR, '');
|