cornfield 0.34.3 → 0.36.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 -2
- package/core/contrast.js +110 -5
- package/core/map-tokens.js +43 -0
- package/core/strings.js +4 -2
- package/core/validate.js +7 -3
- package/explorer/connection.js +62 -0
- package/explorer/corn-state.js +34 -2
- package/explorer/explorer.css +117 -35
- package/explorer/feedback.js +49 -0
- package/explorer/focus-room.js +26 -0
- package/explorer/forge-panel-model.js +41 -7
- package/explorer/forge-panel.js +224 -57
- package/explorer/header-fit.js +75 -0
- package/explorer/hint.js +92 -0
- package/explorer/house-model.js +11 -0
- package/explorer/house.css +1 -1
- package/explorer/house.js +5 -2
- package/explorer/index.html +15 -11
- package/explorer/labels.js +8 -6
- package/explorer/layers.js +1 -1
- package/explorer/live-model.js +6 -2
- package/explorer/main.js +7 -3
- package/explorer/map-style.js +107 -16
- package/explorer/panels.js +12 -4
- package/explorer/plugins.js +18 -3
- package/explorer/proposal-model.js +34 -5
- package/explorer/proposal.js +33 -10
- package/explorer/review.js +48 -7
- package/explorer/runs-model.js +42 -18
- package/explorer/runs-view.js +58 -20
- package/explorer/scenario-ui.js +1 -1
- package/explorer/sign-in.css +73 -0
- package/explorer/tokens.css +25 -6
- package/explorer/view.js +2 -3
- package/package.json +1 -1
- package/server/auth.js +94 -40
- package/server/forge-http.js +1 -1
- package/server/page-head.js +55 -0
- package/server/server.js +37 -46
package/explorer/explorer.css
CHANGED
|
@@ -117,7 +117,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
117
117
|
|
|
118
118
|
/* Search: the field with its key hint (a desktop's), an icon on a phone */
|
|
119
119
|
.hx-search { display: none; align-items: center; gap: var(--corn-space-3); width: 260px; min-width: 120px; height: 32px; padding: 0 var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-3); }
|
|
120
|
-
.hx-search:focus-within { border-color: var(--corn-focus); outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
120
|
+
.hx-search:focus-within { border-color: var(--corn-focus); outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
121
121
|
.hx-search-icon { flex: none; }
|
|
122
122
|
.hx-search-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); outline: none; user-select: text; }
|
|
123
123
|
.hx-search-input::placeholder { color: var(--corn-text-3); }
|
|
@@ -130,13 +130,13 @@ h1, h2, h3, p { margin: 0; }
|
|
|
130
130
|
.hx-work { display: inline-flex; align-items: center; gap: var(--corn-space-2); height: 32px; padding: 0 var(--corn-space-4); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-2); font-size: var(--corn-text-sm); font-weight: 600; white-space: nowrap; }
|
|
131
131
|
.hx-work:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
132
132
|
.hx-work[aria-expanded="true"] { background: var(--corn-accent); border-color: var(--corn-accent-text); color: var(--corn-text-on-accent); }
|
|
133
|
-
.hx-forge-lit { padding: 0 var(--corn-space-2); border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-warn); background: var(--corn-ground); color: var(--corn-warn); font-
|
|
133
|
+
.hx-forge-lit { padding: 0 var(--corn-space-2); border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-warn); background: var(--corn-ground); color: var(--corn-warn); font-size: var(--corn-text-2xs); }
|
|
134
134
|
|
|
135
135
|
/* The account button: the initial of who is signed in (a menu glyph when nobody is) */
|
|
136
136
|
.hx-account-btn { display: inline-flex; align-items: center; gap: var(--corn-space-3); height: 32px; padding: 0 var(--corn-space-2) 0 var(--corn-space-1); border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-2); }
|
|
137
137
|
.hx-account-btn:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
138
138
|
.hx-account-btn[aria-expanded="true"] { border-color: var(--corn-accent-text); }
|
|
139
|
-
.hx-avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius:
|
|
139
|
+
.hx-avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--corn-radius-pill); background: var(--corn-accent); color: var(--corn-text-on-accent); font-size: var(--corn-text-xs); font-weight: 700; }
|
|
140
140
|
.hx-avatar:empty::before { content: "\2630"; }
|
|
141
141
|
|
|
142
142
|
/* The account menu: a panel under the button */
|
|
@@ -224,7 +224,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
224
224
|
white-space: nowrap;
|
|
225
225
|
}
|
|
226
226
|
.hx-btn:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
227
|
-
.hx-btn:focus-visible, .hx-toggle-row:focus-visible, .hx-textbtn:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
227
|
+
.hx-btn:focus-visible, .hx-toggle-row:focus-visible, .hx-textbtn:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
228
228
|
.hx-btn--active, .hx-btn--active:hover { background: var(--corn-accent); border-color: var(--corn-accent-text); color: var(--corn-text-on-accent); box-shadow: var(--corn-shadow-sm); }
|
|
229
229
|
.hx-btn--quiet { font-weight: 500; color: var(--corn-text-3); }
|
|
230
230
|
.hx-btn--icon { width: 28px; height: 28px; padding: 0; justify-content: center; font-size: var(--corn-text-base); }
|
|
@@ -237,7 +237,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
237
237
|
padding: var(--corn-space-1) var(--corn-space-3) var(--corn-space-1) var(--corn-space-6);
|
|
238
238
|
border-radius: var(--corn-radius-sm);
|
|
239
239
|
border: var(--corn-border) solid var(--corn-line);
|
|
240
|
-
background: color-mix(in srgb, var(--corn-ground) 80%, transparent)
|
|
240
|
+
background: color-mix(in srgb, var(--corn-ground) 80%, transparent);
|
|
241
241
|
color: var(--corn-text);
|
|
242
242
|
font: inherit;
|
|
243
243
|
font-size: var(--corn-text-sm);
|
|
@@ -286,7 +286,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
286
286
|
.hx-toggle-row.is-off .hx-dot { transform: scale(0.75); opacity: 0.4; }
|
|
287
287
|
.hx-toggle-name { font-size: var(--corn-text-xs); font-weight: 500; color: var(--corn-text-2); }
|
|
288
288
|
.hx-toggle-row.is-off .hx-toggle-name { color: var(--corn-text-3); text-decoration: line-through; }
|
|
289
|
-
.hx-count { padding: calc(var(--corn-space-1) / 2) var(--corn-space-2); border-radius: var(--corn-radius-xs); background: var(--corn-surface-3); color: var(--corn-text-2); font-
|
|
289
|
+
.hx-count { padding: calc(var(--corn-space-1) / 2) var(--corn-space-2); border-radius: var(--corn-radius-xs); background: var(--corn-surface-3); color: var(--corn-text-2); font-size: var(--corn-text-2xs); }
|
|
290
290
|
.hx-toggle-row.is-off .hx-count { background: color-mix(in srgb, var(--corn-ground) 40%, transparent); color: var(--corn-text-3); }
|
|
291
291
|
.hx-tick { font-size: var(--corn-text-sm); font-weight: 700; color: var(--corn-ok); }
|
|
292
292
|
.hx-toggle-row.is-off .hx-tick { color: var(--corn-text-3); }
|
|
@@ -325,7 +325,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
325
325
|
.hx-backdrop { position: fixed; inset: 0; z-index: 40; background: var(--corn-scrim); backdrop-filter: blur(calc(var(--corn-blur) / 4)); }
|
|
326
326
|
@media (min-width: 768px) { .hx-backdrop { display: none; } }
|
|
327
327
|
|
|
328
|
-
.hx-drawer { display: flex; flex-direction: column; z-index: 40; border-color: var(--corn-
|
|
328
|
+
.hx-drawer { display: flex; flex-direction: column; z-index: 40; border-color: var(--corn-line); box-shadow: var(--corn-shadow-lg); pointer-events: none; touch-action: pan-y; transition: transform 0.2s ease-out; }
|
|
329
329
|
.hx-drawer * { touch-action: pan-y; }
|
|
330
330
|
.hx-drawer.drawer-open { pointer-events: auto; }
|
|
331
331
|
/* The closed panel waits just off the right edge: its shadow would show there */
|
|
@@ -362,7 +362,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
362
362
|
.hx-field { width: 100%; padding: var(--corn-space-1) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text-2); font-family: var(--corn-mono); font-size: var(--corn-text-xs); }
|
|
363
363
|
.hx-sim-result { font-size: var(--corn-text-xs); }
|
|
364
364
|
.hx-error-text { padding-top: var(--corn-space-3); color: var(--corn-bad); }
|
|
365
|
-
.hx-ms { width: 56px; flex: none; text-align: right;
|
|
365
|
+
.hx-ms { width: 56px; flex: none; text-align: right; color: var(--corn-hue-fuchsia); }
|
|
366
366
|
.hx-file { padding: calc(var(--corn-space-1) / 2) 0; }
|
|
367
367
|
|
|
368
368
|
.hx-sandbox { display: flex; flex-direction: column; gap: var(--corn-space-4); padding: var(--corn-space-5); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); }
|
|
@@ -381,7 +381,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
381
381
|
.hx-chip--warning { background: var(--corn-warn); }
|
|
382
382
|
.hx-chip--danger, .hx-chip--success, .hx-chip--warning { color: var(--corn-ground); }
|
|
383
383
|
|
|
384
|
-
.hx-drawer-foot { display: flex; align-items: stretch; gap: var(--corn-space-3); flex: none; padding: var(--corn-space-4) var(--corn-space-5) calc(var(--corn-space-4) + env(safe-area-inset-bottom, 0px)); border-top: var(--corn-border) solid var(--corn-
|
|
384
|
+
.hx-drawer-foot { display: flex; align-items: stretch; gap: var(--corn-space-3); flex: none; padding: var(--corn-space-4) var(--corn-space-5) calc(var(--corn-space-4) + env(safe-area-inset-bottom, 0px)); border-top: var(--corn-border) solid var(--corn-line-soft); }
|
|
385
385
|
.hx-open { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: var(--corn-space-2); min-height: 36px; padding: 0 var(--corn-space-4); border-radius: var(--corn-radius-sm); background: var(--corn-accent); color: var(--corn-text-on-accent); font-size: var(--corn-text-sm); font-weight: 600; text-align: center; text-decoration: none; transition: background 0.15s; }
|
|
386
386
|
.hx-open:hover { background: var(--corn-accent-hover); }
|
|
387
387
|
|
|
@@ -392,7 +392,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
392
392
|
.hx-proposal-empty { padding: var(--corn-space-3) calc(var(--corn-space-1) / 2); font-size: var(--corn-text-sm); }
|
|
393
393
|
.hx-proposal-item { display: flex; flex-direction: column; align-items: flex-start; gap: var(--corn-space-1); width: 100%; padding: var(--corn-space-3) var(--corn-space-3); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text); text-align: left; font-size: var(--corn-text-xs); }
|
|
394
394
|
button.hx-proposal-item:hover { background: var(--corn-surface-3); }
|
|
395
|
-
button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
395
|
+
button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
396
396
|
.hx-proposal-item.is-current { border-color: var(--corn-added-text); background: color-mix(in srgb, var(--corn-added) 12%, transparent); }
|
|
397
397
|
.hx-proposal-item.is-broken { opacity: 0.8; cursor: default; }
|
|
398
398
|
.hx-proposal-title { font-size: var(--corn-text-sm); font-weight: 600; color: var(--corn-text); overflow-wrap: anywhere; }
|
|
@@ -404,7 +404,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
404
404
|
.hx-proposal-bar.is-error { border-color: color-mix(in srgb, var(--corn-removed) 50%, transparent); }
|
|
405
405
|
.hx-proposal-message { color: var(--corn-text-2); }
|
|
406
406
|
.hx-proposal-bar.is-error .hx-proposal-message { color: var(--corn-bad); }
|
|
407
|
-
.hx-proposal-chip: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:
|
|
407
|
+
.hx-proposal-chip: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
408
|
.hx-proposal-summary { margin-top: var(--corn-space-2); color: var(--corn-text-2); line-height: 1.45; }
|
|
409
409
|
|
|
410
410
|
/* Before / Diff / After */
|
|
@@ -460,7 +460,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
460
460
|
.hx-player .hx-close { width: 28px; height: 28px; font-size: var(--corn-text-sm); }
|
|
461
461
|
.hx-player-title { flex: 1; }
|
|
462
462
|
.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
|
-
.hx-player-speed:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
463
|
+
.hx-player-speed:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
464
464
|
.hx-player-text { margin: 0; min-height: 2.8em; font-size: var(--corn-text-base); line-height: 1.4; color: var(--corn-text); user-select: text; }
|
|
465
465
|
.hx-player-count { color: var(--corn-accent-text); font-weight: 600; white-space: nowrap; }
|
|
466
466
|
.hx-player-controls { display: flex; gap: var(--corn-space-3); }
|
|
@@ -490,7 +490,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
490
490
|
.hx-whatif-field { display: flex; align-items: center; gap: var(--corn-space-3); color: var(--corn-text-2); }
|
|
491
491
|
.hx-whatif-field > select, .hx-whatif-field > .hx-whatif-input { flex: 1; min-width: 0; }
|
|
492
492
|
.hx-whatif-input, .hx-whatif-field select, .hx-whatif select { padding: var(--corn-space-1) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); user-select: text; }
|
|
493
|
-
.hx-whatif-input:focus, .hx-whatif-field select:focus { outline: var(--corn-focus-width) solid var(--corn-edit-text); outline-offset:
|
|
493
|
+
.hx-whatif-input:focus, .hx-whatif-field select:focus { outline: var(--corn-focus-width) solid var(--corn-edit-text); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
494
494
|
.hx-whatif-help { margin: 0; font-size: var(--corn-text-xs); }
|
|
495
495
|
.hx-whatif-pair { margin: 0; }
|
|
496
496
|
.hx-whatif-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2); }
|
|
@@ -521,7 +521,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
521
521
|
.hx-review-form[hidden] { display: none; }
|
|
522
522
|
.hx-review-label { color: var(--corn-text-3); font-size: var(--corn-text-xs); }
|
|
523
523
|
.hx-review-note { width: 100%; min-height: 44px; resize: vertical; padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); line-height: 1.4; user-select: text; }
|
|
524
|
-
.hx-review-note:focus { outline: var(--corn-focus-width) solid var(--corn-added-text); outline-offset:
|
|
524
|
+
.hx-review-note:focus { outline: var(--corn-focus-width) solid var(--corn-added-text); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
525
525
|
.hx-review-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2) var(--corn-space-3); }
|
|
526
526
|
.hx-btn--approve { border-color: color-mix(in srgb, var(--corn-added) 50%, transparent); color: var(--corn-added-text); }
|
|
527
527
|
.hx-btn--approve:hover { background: color-mix(in srgb, var(--corn-added) 20%, transparent); color: var(--corn-added-text); }
|
|
@@ -566,8 +566,9 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
566
566
|
.hx-proposal-counts { display: flex; grid-column: 1 / -1; order: 2; align-items: center; flex-wrap: wrap; column-gap: var(--corn-space-2); }
|
|
567
567
|
.hx-proposal-chip, .hx-proposal-mode { min-height: 44px; }
|
|
568
568
|
.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
|
-
|
|
570
|
-
.hx-proposal-mode
|
|
569
|
+
/* 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
|
+
.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; }
|
|
571
|
+
.hx-proposal-mode[aria-expanded="true"]::after { transform: rotate(180deg); }
|
|
571
572
|
.hx-seg, .hx-review { grid-column: 1 / -1; order: 3; }
|
|
572
573
|
.hx-proposal-bar:not([data-mode-open="true"]) .hx-seg { display: none; }
|
|
573
574
|
.hx-seg-btn { flex: 1; height: 44px; font-size: var(--corn-text-md); }
|
|
@@ -591,7 +592,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
591
592
|
.hx-mockup-state--changed { color: var(--corn-warn); font-weight: 600; }
|
|
592
593
|
.hx-mockup-state--missing { color: var(--corn-bad); }
|
|
593
594
|
.hx-mockup-dialog { position: fixed; z-index: 60; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: var(--corn-space-3); width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: var(--corn-space-4) var(--corn-space-4) var(--corn-space-4); border-radius: var(--corn-radius-lg); border: var(--corn-border) solid var(--corn-line); background: var(--corn-ground); color: var(--corn-text); box-shadow: var(--corn-shadow), 0 0 0 100vmax var(--corn-scrim); }
|
|
594
|
-
.hx-mockup-dialog:focus { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
595
|
+
.hx-mockup-dialog:focus { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
595
596
|
.hx-mockup-head { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-4); }
|
|
596
597
|
.hx-mockup-title { margin: 0; font-size: var(--corn-text-base); font-weight: 600; color: var(--corn-text); }
|
|
597
598
|
.hx-mockup-stage { min-height: 0; overflow: auto; display: flex; justify-content: center; border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-mockup-ground); }
|
|
@@ -614,11 +615,11 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
614
615
|
@media (max-width: 767px) {
|
|
615
616
|
.hx-dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none; }
|
|
616
617
|
.hx-dock > * { pointer-events: auto; }
|
|
617
|
-
.hx-dock > .hx-sheet { position: relative; top: auto; left: auto; right: auto; bottom: auto; width: 100%; max-width: none; margin: 0; transform: none; border-radius: var(--corn-radius-lg) var(--corn-radius-lg) 0 0; border-bottom: 0; box-shadow:
|
|
618
|
+
.hx-dock > .hx-sheet { position: relative; top: auto; left: auto; right: auto; bottom: auto; width: 100%; max-width: none; margin: 0; transform: none; border-radius: var(--corn-radius-lg) var(--corn-radius-lg) 0 0; border-bottom: 0; box-shadow: var(--corn-shadow-sheet); overscroll-behavior: contain; animation: hx-sheet-in 0.2s ease-out; --sheet-pb: var(--corn-space-3); }
|
|
618
619
|
.hx-dock > .hx-sheet[data-sheet-last]:not(.hx-drawer), .hx-dock > .hx-drawer[data-sheet-last][data-sheet-state="peek"] { padding-bottom: calc(var(--sheet-pb) + env(safe-area-inset-bottom, 0px)); }
|
|
619
620
|
.hx-sheet-handle { display: flex; flex: none; align-items: center; justify-content: center; width: 100%; height: 22px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; }
|
|
620
621
|
.hx-sheet-handle span { width: 40px; height: 5px; border-radius: var(--corn-radius-pill); background: var(--corn-surface-3); }
|
|
621
|
-
.hx-sheet-handle:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: -
|
|
622
|
+
.hx-sheet-handle:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-width) * -1); border-radius: var(--corn-radius); }
|
|
622
623
|
.hx-backdrop { display: none; }
|
|
623
624
|
.hx-stage[data-sheet-open="drawer"] .hx-backdrop:not([hidden]) { display: block; }
|
|
624
625
|
|
|
@@ -711,16 +712,16 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
711
712
|
Text only a screen reader reads (the heading, the map's keys, the announcer); a focus ring on everything that
|
|
712
713
|
takes the focus, the map included (the more specific rings above still win where they are set). */
|
|
713
714
|
.hx-sr-only { position: absolute !important; 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; }
|
|
714
|
-
:where(button, a[href], summary, select, textarea, [tabindex]):focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
715
|
-
#graph-canvas:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: -
|
|
715
|
+
:where(button, a[href], summary, select, textarea, [tabindex]):focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
716
|
+
#graph-canvas:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-width) * -1); }
|
|
716
717
|
.hx-drawer-title:focus { outline: none; }
|
|
717
|
-
.hx-drawer-title:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
718
|
+
.hx-drawer-title:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
718
719
|
|
|
719
720
|
/* ---- the issues and PRs panel (forge-panel.js, CF-07) -------------------------------------------
|
|
720
721
|
A slide-over from the left from 768px (the node panel is the one from the right), a bottom sheet in #sheet-dock below.
|
|
721
722
|
Closed, it is inert (forge-panel.js), and off screen or not displayed. Only the tokens above are used, so it follows the theme. */
|
|
722
723
|
.hx-forge { --hx-forge-status-w: 56px; }
|
|
723
|
-
.hx-forge { display: flex; flex-direction: column; z-index: 40; border-color: var(--corn-
|
|
724
|
+
.hx-forge { display: flex; flex-direction: column; z-index: 40; border-color: var(--corn-line); pointer-events: none; touch-action: pan-y; transition: transform 0.2s ease-out; }
|
|
724
725
|
.hx-forge * { touch-action: pan-y; }
|
|
725
726
|
.hx-forge.forge-open { pointer-events: auto; }
|
|
726
727
|
.hx-forge:not(.forge-open) { box-shadow: none; }
|
|
@@ -737,13 +738,13 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
737
738
|
.hx-forge:not(.forge-open) { display: none; }
|
|
738
739
|
.hx-forge { max-height: 60dvh; }
|
|
739
740
|
.hx-forge[data-sheet-state="peek"] .hx-forge-body { flex: none; padding: 0 var(--corn-space-5) var(--corn-space-3); gap: var(--corn-space-1); overflow: hidden; }
|
|
740
|
-
.hx-forge[data-sheet-state="peek"] .hx-forge-body > :not(.hx-forge-
|
|
741
|
+
.hx-forge[data-sheet-state="peek"] .hx-forge-body > :not(.hx-forge-top):not(#forge-bar), .hx-forge[data-sheet-state="peek"] #forge-filter-chip, .hx-forge[data-sheet-state="peek"] .hx-forge-tabs { display: none; }
|
|
741
742
|
.hx-forge[data-sheet-state="peek"] .hx-forge-head { padding-bottom: 0; border-bottom: 0; }
|
|
742
743
|
.hx-forge[data-sheet-state="peek"] .hx-forge-head .hx-btn { display: none; }
|
|
743
744
|
}
|
|
744
745
|
.hx-forge-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-4); padding: calc(var(--corn-space-5) + var(--corn-space-1)) var(--corn-space-5); overflow-y: auto; user-select: text; font-size: var(--corn-text-sm); }
|
|
745
746
|
@media (min-width: 640px) { .hx-forge-body { padding: var(--corn-space-6) calc(var(--corn-space-5) + var(--corn-space-1)); } }
|
|
746
|
-
.hx-forge-head { display: flex; align-items: center; gap: var(--corn-space-3); padding-bottom: var(--corn-space-3); border-bottom: var(--corn-border) solid var(--corn-
|
|
747
|
+
.hx-forge-head { display: flex; align-items: center; gap: var(--corn-space-3); padding-bottom: var(--corn-space-3); border-bottom: var(--corn-border) solid var(--corn-line-soft); }
|
|
747
748
|
.hx-forge-head .hx-drawer-title { flex: 1; min-width: 0; }
|
|
748
749
|
.hx-forge-status, .hx-forge-rate { font-size: var(--corn-text-xs); line-height: 1.5; }
|
|
749
750
|
.hx-forge-controls { display: flex; flex-direction: column; gap: var(--corn-space-3); padding: var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius); background: var(--corn-surface-2); } /* the Filter chip's box */
|
|
@@ -753,7 +754,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
753
754
|
.hx-forge-tab { flex: none; display: inline-flex; align-items: baseline; gap: var(--corn-space-1); padding: var(--corn-space-2) var(--corn-space-3) var(--corn-space-3); border: 0; border-bottom: var(--corn-border-strong) solid transparent; background: none; white-space: nowrap; color: var(--corn-text-2); font-size: var(--corn-text-sm); font-weight: 500; }
|
|
754
755
|
.hx-forge-tab:hover { color: var(--corn-text); }
|
|
755
756
|
.hx-forge-tab[aria-pressed="true"] { border-bottom-color: var(--corn-accent); color: var(--corn-text); font-weight: 600; }
|
|
756
|
-
.hx-forge-tab:focus-visible, .hx-forge-chip:focus-visible, .hx-forge-back:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: -
|
|
757
|
+
.hx-forge-tab:focus-visible, .hx-forge-chip:focus-visible, .hx-forge-back:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-width) * -1); }
|
|
757
758
|
.hx-forge-count { color: var(--corn-text-3); font-size: var(--corn-text-xs); font-weight: 500; }
|
|
758
759
|
.hx-forge-count[hidden] { display: none; }
|
|
759
760
|
/* The status line and the Filter chip; the focus is put on the title (a heading, tabindex -1) when the panel opens, so it shows no ring */
|
|
@@ -773,7 +774,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
773
774
|
.hx-forge-limits > legend { padding: 0 0 var(--corn-space-1); }
|
|
774
775
|
.hx-forge-select, .hx-forge-input { width: 100%; min-width: 0; padding: var(--corn-space-1) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); font-weight: 400; text-transform: none; letter-spacing: 0; user-select: text; }
|
|
775
776
|
.hx-forge-input::placeholder { color: var(--corn-text-3); }
|
|
776
|
-
.hx-forge-input:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
777
|
+
.hx-forge-input:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
777
778
|
.hx-forge-notice { padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-warn); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); color: var(--corn-text-2); line-height: 1.5; }
|
|
778
779
|
|
|
779
780
|
.hx-forge-list, .hx-forge-checks, .hx-forge-files { display: flex; flex-direction: column; gap: var(--corn-space-1); margin: 0; padding: 0; list-style: none; }
|
|
@@ -814,7 +815,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
814
815
|
.hx-forge-step { display: flex; flex-direction: column; gap: var(--corn-space-1); }
|
|
815
816
|
.hx-forge-startspec { flex: none; align-self: center; }
|
|
816
817
|
.hx-forge-notice--ok { border-color: var(--corn-ok); }
|
|
817
|
-
.hx-confirm-scrim { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: var(--corn-space-5); background:
|
|
818
|
+
.hx-confirm-scrim { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: var(--corn-space-5); background: var(--corn-scrim); }
|
|
818
819
|
.hx-confirm-scrim[hidden] { display: none; }
|
|
819
820
|
.hx-confirm { display: flex; flex-direction: column; gap: var(--corn-space-3); width: min(440px, 100%); max-height: 100%; overflow-y: auto; padding: var(--corn-space-5); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-lg); box-shadow: var(--corn-shadow-lg); font-size: var(--corn-text-sm); user-select: text; }
|
|
820
821
|
.hx-confirm-title { margin: 0; font-size: var(--corn-text-lg); font-weight: 700; color: var(--corn-text); }
|
|
@@ -824,7 +825,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
824
825
|
.hx-confirm-checks { display: flex; flex-direction: column; gap: var(--corn-space-1); margin: 0; padding: 0; list-style: none; }
|
|
825
826
|
.hx-confirm-label { margin: 0; color: var(--corn-text-3); }
|
|
826
827
|
.hx-confirm-pre { margin: 0; max-height: 140px; overflow: auto; padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text); font: var(--corn-text-xs)/1.5 var(--corn-mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
|
|
827
|
-
.hx-confirm-pre:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
828
|
+
.hx-confirm-pre:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
828
829
|
.hx-confirm-note { margin: 0; color: var(--corn-text-2); line-height: 1.5; }
|
|
829
830
|
.hx-confirm-actions { display: flex; justify-content: flex-end; gap: var(--corn-space-3); }
|
|
830
831
|
.hx-tokens-list { display: flex; flex-direction: column; gap: var(--corn-space-2); margin: 0; padding: 0; list-style: none; }
|
|
@@ -838,13 +839,15 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
838
839
|
.hx-tokens-form { display: grid; grid-template-columns: 1fr 5rem; gap: var(--corn-space-3); align-items: end; }
|
|
839
840
|
.hx-tokens-form .hx-btn { grid-column: 1 / -1; justify-self: start; }
|
|
840
841
|
.hx-forge-nodes { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: var(--corn-space-1); padding-left: calc(var(--hx-forge-status-w) + var(--corn-space-2)); }
|
|
841
|
-
|
|
842
|
+
/* A node button is a button (a square corner, a filled face, an arrow), never a state pill */
|
|
843
|
+
.hx-forge-node { padding: calc(var(--corn-space-1) / 2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-3); color: var(--corn-text); font-size: var(--corn-text-xs); }
|
|
844
|
+
.hx-forge-node::after { content: ' \2192'; }
|
|
842
845
|
.hx-forge-node:hover { background: var(--corn-surface-3); }
|
|
843
846
|
.hx-forge-work-filters { display: flex; flex-wrap: wrap; gap: var(--corn-space-2) var(--corn-space-4); }
|
|
844
847
|
.hx-forge-work-filters[hidden], .hx-forge-filters[hidden] { display: none; }
|
|
845
848
|
.hx-forge-toggle { display: inline-flex; align-items: center; gap: var(--corn-space-2); min-height: 24px; color: var(--corn-text-2); font-size: var(--corn-text-sm); }
|
|
846
849
|
.hx-forge-toggle input { accent-color: var(--corn-accent-text); }
|
|
847
|
-
.hx-forge-toggle input:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
850
|
+
.hx-forge-toggle input:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
848
851
|
.hx-forge-group { display: flex; flex-direction: column; gap: var(--corn-space-1); margin: 0 0 var(--corn-space-3); list-style: none; }
|
|
849
852
|
.hx-forge-gtitle { margin: 0; font-size: var(--corn-text-sm); font-weight: 700; color: var(--corn-text); overflow-wrap: anywhere; }
|
|
850
853
|
.hx-forge-gout { margin-left: var(--corn-space-1); }
|
|
@@ -853,7 +856,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
853
856
|
.hx-forge-why { font-size: var(--corn-text-xs); overflow-wrap: anywhere; }
|
|
854
857
|
.hx-forge-notes, .hx-forge-confirm { display: flex; flex-direction: column; gap: var(--corn-space-3); }
|
|
855
858
|
.hx-forge-preview { width: 100%; min-height: 12em; resize: vertical; padding: var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text); font-family: var(--corn-mono); font-size: var(--corn-text-xs); line-height: 1.5; font-weight: 400; text-transform: none; letter-spacing: 0; user-select: text; }
|
|
856
|
-
.hx-forge-preview:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
859
|
+
.hx-forge-preview:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
857
860
|
.hx-forge-actions { display: flex; flex-wrap: wrap; gap: var(--corn-space-3); }
|
|
858
861
|
.hx-forge-msg { padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); color: var(--corn-text-2); line-height: 1.5; overflow-wrap: anywhere; }
|
|
859
862
|
.hx-forge-msg--bad { border-color: var(--corn-warn); }
|
|
@@ -876,7 +879,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
876
879
|
.hx-forge-cta .hx-btn--approve { flex: 1; }
|
|
877
880
|
.hx-forge-cta .hx-btn[disabled] { background: var(--corn-surface-3); border-color: var(--corn-line); color: var(--corn-text-3); box-shadow: none; cursor: default; }
|
|
878
881
|
.hx-forge-open { text-decoration: none; color: var(--corn-text-2); }
|
|
879
|
-
.hx-forge-runline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2);
|
|
882
|
+
.hx-forge-runline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2); margin: 0; color: var(--corn-text-2); } /* a line of text with a state pill, not a box: it is not a control */
|
|
880
883
|
/* The foot of a list: Release notes … on PRs, New idea on Specs and Threads */
|
|
881
884
|
.hx-forge-foot { display: flex; flex-direction: column; gap: var(--corn-space-3); margin-top: auto; padding-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line); }
|
|
882
885
|
.hx-forge-foot > .hx-btn { align-self: flex-start; }
|
|
@@ -966,7 +969,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
966
969
|
.hx-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--corn-space-2); }
|
|
967
970
|
.hx-row { display: flex; align-items: center; gap: var(--corn-space-4); width: 100%; min-height: 36px; padding: var(--corn-space-3) var(--corn-space-4); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text); font: inherit; text-align: left; }
|
|
968
971
|
.hx-row:hover { background: var(--corn-accent-soft); }
|
|
969
|
-
.hx-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
972
|
+
.hx-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
970
973
|
.hx-row-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
|
971
974
|
.hx-row-meta { flex: none; font-size: var(--corn-text-sm); color: var(--corn-text-3); font-variant-numeric: tabular-nums; }
|
|
972
975
|
.hx-drawer .hx-mockup-list { margin: var(--corn-space-3) 0 0; }
|
|
@@ -1006,6 +1009,29 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
1006
1009
|
.hx-more-btn { display: block; margin-top: var(--corn-space-1); min-height: 0; padding: 0; font-size: var(--corn-text-sm); }
|
|
1007
1010
|
@media (max-width: 767px) { .hx-more-btn { min-height: 44px; } }
|
|
1008
1011
|
|
|
1012
|
+
/* ==== the chrome contract (CF review F46, F49, F54, F55): what a flat brand reaches, and what never clips or moves ================ */
|
|
1013
|
+
/* The phone search field's magnifier: an image taken from the text colour (it was a fixed grey picture); the mode caret's chevron */
|
|
1014
|
+
:root { --hx-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3.5l3 3 3-3'/%3E%3C/svg%3E");
|
|
1015
|
+
--hx-magnifier: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E"); }
|
|
1016
|
+
.hx-mobile-search::before { content: ""; position: absolute; top: 50%; left: calc(var(--corn-space-3) + 8px); width: 14px; height: 14px; transform: translateY(-50%); background: var(--corn-text-3); -webkit-mask: var(--hx-magnifier) no-repeat center / contain; mask: var(--hx-magnifier) no-repeat center / contain; pointer-events: none; z-index: 1; }
|
|
1017
|
+
/* A brand wordmark that does not fit leaves the logo (header-fit.js measures); a row that still scrolls shows it at its edge */
|
|
1018
|
+
.hx-header-left[data-brand-short] .hx-title { display: none; }
|
|
1019
|
+
.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); }
|
|
1020
|
+
/* 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 */
|
|
1021
|
+
.hx-forge-body, .hx-drawer-body, .hx-proposal-changes, .hx-proposal-bar, .hx-confirm, .hx-whatif-edges .hx-whatif-list, .hx-proposal-bar .hx-scenarios { scroll-padding-block: calc(var(--corn-focus-width) + var(--corn-focus-offset) + var(--corn-space-1)); }
|
|
1022
|
+
/* The Work tabs scroll sideways: a tab brought into view stops short of the edge by the strip's own padding */
|
|
1023
|
+
.hx-forge-tabs { scroll-padding-inline: var(--corn-space-4); }
|
|
1024
|
+
/* Numbers shown as data take the number face (a brand sets --corn-font-num; digits in a pixel face misread) */
|
|
1025
|
+
.hx-count, .hx-layers-count, .hx-forge-count, .hx-forge-lit, .hx-player-count, .hx-ms, .hx-row-meta, .hx-run-limits dd { font-family: var(--corn-font-num); font-variant-numeric: tabular-nums; }
|
|
1026
|
+
/* Windows high contrast (forced colours) repaints backgrounds, which would leave a masked icon the colour of the page: draw it in the text colour */
|
|
1027
|
+
@media (forced-colors: active) {
|
|
1028
|
+
.hx-mobile-search::before, .hx-proposal-mode::after { background: CanvasText; }
|
|
1029
|
+
}
|
|
1030
|
+
/* No panel, sheet or menu slides, and nothing fades or grows, for a viewer who asked for less motion */
|
|
1031
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1032
|
+
.hx-drawer, .hx-forge, .hx-input, .hx-btn, .hx-dot, .hx-sheet, .hx-menu, .hx-dock > .hx-sheet { transition: none; animation: none; }
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1009
1035
|
/* ---- the review flow, 0.34 design review (explorer/proposal.js, review.js, scenario-ui.js) -----------------------------
|
|
1010
1036
|
F08 the source chip on the bar; F11 the player's controls in a phone peek; F14 the note above the keyboard; F15 the reason
|
|
1011
1037
|
Approve is off in a peek; F16 the ways on from a bad link; F21 reflow at 400% zoom and with text spacing raised. */
|
|
@@ -1013,7 +1039,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
1013
1039
|
.hx-proposal-source[hidden] { display: none; }
|
|
1014
1040
|
a.hx-proposal-source { min-height: 24px; } /* a link: at least the WCAG 2.5.8 target (44px on a phone, below) */
|
|
1015
1041
|
a.hx-proposal-source:hover { color: var(--corn-text); text-decoration: underline; }
|
|
1016
|
-
a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset:
|
|
1042
|
+
a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
1017
1043
|
.hx-proposal-source[data-corn-state="draft"] { border-color: color-mix(in srgb, var(--corn-changed) 50%, transparent); }
|
|
1018
1044
|
.hx-proposal-ways { display: flex; flex-wrap: wrap; gap: var(--corn-space-2) var(--corn-space-3); margin-top: var(--corn-space-3); }
|
|
1019
1045
|
.hx-proposal-ways[hidden] { display: none; }
|
|
@@ -1068,3 +1094,59 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1068
1094
|
.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) */
|
|
1069
1095
|
.hx-run .hx-link, .hx-forge-check .hx-link { display: inline-flex; align-items: center; min-height: 44px; }
|
|
1070
1096
|
}
|
|
1097
|
+
|
|
1098
|
+
/* ==========================================================================
|
|
1099
|
+
The Work panel's states, results, disabled controls, loading and empty lists, and its fixed top (the 0.34 design review)
|
|
1100
|
+
========================================================================== */
|
|
1101
|
+
|
|
1102
|
+
/* A state is a word, an icon and a colour: the colour comes from a --corn-run-<state> token, the icon is a shape of its own (corn-state.js), and
|
|
1103
|
+
the waiting pill is solid, since a run that waits needs the maintainer and should stand out most. A pill is never a button: it has no hover. */
|
|
1104
|
+
.hx-forge-state { display: inline-flex; align-items: center; gap: var(--corn-space-1); }
|
|
1105
|
+
.hx-state-icon { flex: none; width: 1em; height: 1em; }
|
|
1106
|
+
.hx-forge-state--requested { color: var(--corn-run-requested); }
|
|
1107
|
+
.hx-forge-state--claimed { color: var(--corn-run-claimed); }
|
|
1108
|
+
.hx-forge-state--working { color: var(--corn-run-working); }
|
|
1109
|
+
.hx-forge-state--waiting { color: var(--corn-run-waiting-ink); background: var(--corn-run-waiting); border-color: var(--corn-run-waiting); border-width: var(--corn-border-strong); }
|
|
1110
|
+
.hx-forge-state--done { color: var(--corn-run-done); }
|
|
1111
|
+
.hx-forge-state--failed { color: var(--corn-run-failed); }
|
|
1112
|
+
.hx-forge-state--stopped { color: var(--corn-run-stopped); }
|
|
1113
|
+
.hx-state-spin { transform-origin: 6px 6px; animation: hx-state-turn 1.2s linear infinite; }
|
|
1114
|
+
@keyframes hx-state-turn { to { transform: rotate(360deg); } }
|
|
1115
|
+
@media (prefers-reduced-motion: reduce) { .hx-state-spin { animation: none; } }
|
|
1116
|
+
|
|
1117
|
+
/* What an action came to, by the control that was used: the words, and a mark that is not a colour */
|
|
1118
|
+
.hx-forge-result { margin: 0; padding: var(--corn-space-1) var(--corn-space-3); border-left: calc(var(--corn-border-strong) * 2) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text); line-height: 1.5; overflow-wrap: anywhere; }
|
|
1119
|
+
.hx-forge-result[hidden] { display: none; }
|
|
1120
|
+
.hx-forge-result[data-corn-state="success"] { border-left-color: var(--corn-ok); }
|
|
1121
|
+
.hx-forge-result[data-corn-state="failure"] { border-left-color: var(--corn-bad); }
|
|
1122
|
+
.hx-forge-result[data-corn-state="success"]::before { content: '\2713 '; }
|
|
1123
|
+
.hx-forge-result[data-corn-state="failure"]::before { content: '\2715 '; }
|
|
1124
|
+
.hx-drawer-foot .hx-forge-result { flex-basis: 100%; }
|
|
1125
|
+
|
|
1126
|
+
/* A disabled control looks disabled: no fill, a dashed edge, the quiet text colour and a cursor that says so */
|
|
1127
|
+
.hx-forge .hx-btn:disabled, .hx-forge-act:disabled, .hx-forge-cta .hx-btn[disabled] { background: none; border-style: dashed; color: var(--corn-text-3); box-shadow: none; cursor: not-allowed; }
|
|
1128
|
+
|
|
1129
|
+
/* Retry, in a notice, sits at the end of the line */
|
|
1130
|
+
.hx-forge-notice .hx-btn { margin-left: var(--corn-space-2); }
|
|
1131
|
+
.hx-forge-runs .hx-forge-notice[hidden], .hx-forge-notice[hidden] { display: none; }
|
|
1132
|
+
|
|
1133
|
+
/* A list that is being read holds its height: rows of a row's size, a quiet bar in each */
|
|
1134
|
+
.hx-forge-skeleton { display: flex; flex-direction: column; gap: var(--corn-space-2); min-height: 64px; padding: var(--corn-space-3); border: var(--corn-border) solid var(--corn-line-soft); border-radius: var(--corn-radius); list-style: none; }
|
|
1135
|
+
.hx-forge-skeleton > span { display: block; height: 10px; border-radius: var(--corn-radius-sm); background: var(--corn-surface-3); }
|
|
1136
|
+
.hx-forge-skeleton > span:last-child { width: 55%; }
|
|
1137
|
+
.hx-forge-empty { line-height: 1.5; }
|
|
1138
|
+
|
|
1139
|
+
/* The panel's title row and tabs stay in place while a list scrolls; the body's padding is taken up by the top so nothing shows above it */
|
|
1140
|
+
.hx-forge-body { --hx-forge-pad: calc(var(--corn-space-5) + var(--corn-space-1)); --hx-forge-padx: var(--corn-space-5); }
|
|
1141
|
+
@media (min-width: 640px) { .hx-forge-body { --hx-forge-pad: var(--corn-space-6); --hx-forge-padx: calc(var(--corn-space-5) + var(--corn-space-1)); } }
|
|
1142
|
+
.hx-forge-top { position: sticky; top: calc(var(--hx-forge-pad) * -1); z-index: 3; display: flex; flex-direction: column; gap: var(--corn-space-4); margin: calc(var(--hx-forge-pad) * -1) calc(var(--hx-forge-padx) * -1) 0; padding: var(--hx-forge-pad) var(--hx-forge-padx) 0; background: linear-gradient(var(--corn-surface-1), var(--corn-surface-1)), var(--corn-ground); } /* opaque: the panel's surface over the ground, so a list scrolls under it without showing through */
|
|
1143
|
+
.hx-forge-top .hx-forge-tabs { margin: 0 calc(var(--hx-forge-padx) * -1); padding: 0 var(--hx-forge-padx); }
|
|
1144
|
+
/* Where the tabs run on past an edge (a phone), they fade out on that side: a mask (only its alpha counts, so any opaque token does), so it works on any surface and in any theme */
|
|
1145
|
+
.hx-forge-top .hx-forge-tabs { mask-image: linear-gradient(to right, transparent 0, var(--corn-ground) var(--hx-fade-l, 0px), var(--corn-ground) calc(100% - var(--hx-fade-r, 0px)), transparent 100%); -webkit-mask-image: linear-gradient(to right, transparent 0, var(--corn-ground) var(--hx-fade-l, 0px), var(--corn-ground) calc(100% - var(--hx-fade-r, 0px)), transparent 100%); }
|
|
1146
|
+
.hx-forge-top[data-more~="start"] { --hx-fade-l: calc(var(--corn-space-6) * 1.5); }
|
|
1147
|
+
.hx-forge-top[data-more~="end"] { --hx-fade-r: calc(var(--corn-space-6) * 1.5); }
|
|
1148
|
+
|
|
1149
|
+
/* The page's one offline notice */
|
|
1150
|
+
.hx-offline { position: fixed; top: 64px; /* below the header */ left: 50%; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100% - 32px)); margin: 0; padding: var(--corn-space-2) var(--corn-space-4); border: var(--corn-border-strong) solid var(--corn-warn); border-radius: var(--corn-radius); background: var(--corn-surface-1); color: var(--corn-text); box-shadow: var(--corn-shadow); line-height: 1.5; }
|
|
1151
|
+
.hx-offline[hidden] { display: none; }
|
|
1152
|
+
.hx-offline[data-corn-state="success"] { border-color: var(--corn-ok); }
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module explorer/feedback
|
|
3
|
+
*
|
|
4
|
+
* One way to say what an action came to: **where the person is looking** (by the control they used) and **to a screen reader** (the live
|
|
5
|
+
* region), together. A result is kept under its key (a run's id) until the next action on that key, so a card that is drawn again shows
|
|
6
|
+
* it again; a result that has no next action to end it (Copy spec) goes after `RESULT_MS`, which is never less than five seconds.
|
|
7
|
+
*
|
|
8
|
+
* sayResult(key, words, ok) keep the result for `key` and announce it
|
|
9
|
+
* resultOf(key) { text, ok } or null
|
|
10
|
+
* clearResult(key) the next action on `key` begins: the old result goes
|
|
11
|
+
* showResultIn(el, key) paints the result of `key` into a result element (`data-corn="result"`), hidden when there is none
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { announce } from './keyboard.js';
|
|
15
|
+
|
|
16
|
+
/** How long a result with no next action to end it stays (ms): at least five seconds */
|
|
17
|
+
export const RESULT_MS = 6000;
|
|
18
|
+
|
|
19
|
+
const results = new Map();
|
|
20
|
+
|
|
21
|
+
/** Keeps the result of an action under `key` and announces it through the live region */
|
|
22
|
+
export function sayResult(key, text, ok = true) {
|
|
23
|
+
results.set(key, { text, ok });
|
|
24
|
+
announce(text);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** The result kept under `key`, or null */
|
|
28
|
+
export function resultOf(key) {
|
|
29
|
+
return results.get(key) || null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** The next action on `key` begins: its old result goes */
|
|
33
|
+
export function clearResult(key) {
|
|
34
|
+
results.delete(key);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Paints the result of `key` into `el` (a result element), hidden when there is none */
|
|
38
|
+
export function showResultIn(el, key) {
|
|
39
|
+
if (!el) return;
|
|
40
|
+
const r = results.get(key);
|
|
41
|
+
el.hidden = !r;
|
|
42
|
+
el.textContent = r ? r.text : '';
|
|
43
|
+
if (r) el.dataset.cornState = r.ok ? 'success' : 'failure'; else delete el.dataset.cornState;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** For tests: forget every result */
|
|
47
|
+
export function resetFeedbackForTests() {
|
|
48
|
+
results.clear();
|
|
49
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module explorer/focus-room
|
|
3
|
+
*
|
|
4
|
+
* A control that is tabbed to inside a strip that scrolls sideways (the Work panel's tabs) is brought fully into view, ring and all
|
|
5
|
+
* (CF review F54). A browser scrolls a focused control only until it is "mostly" visible, and the last tab was left a few pixels under
|
|
6
|
+
* the strip's edge, with its focus ring cut. `scroll-padding-inline` in explorer.css says how much room to leave; this asks for the scroll.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** The strips: a scroll container whose children are tabbed to */
|
|
10
|
+
export const STRIP = '.hx-forge-tabs';
|
|
11
|
+
|
|
12
|
+
/** Scrolls `el` into view inside its strip, if it has one, leaving the strip's scroll-padding */
|
|
13
|
+
export function revealInStrip(el) {
|
|
14
|
+
if (!el || typeof el.closest !== 'function' || typeof el.scrollIntoView !== 'function') return false;
|
|
15
|
+
const strip = el.closest(STRIP);
|
|
16
|
+
if (!strip || el === strip) return false;
|
|
17
|
+
el.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Listens for focus on the whole page, once. Returns how to stop. */
|
|
22
|
+
export function watchFocusRoom(doc = document) {
|
|
23
|
+
const on = (event) => revealInStrip(event.target);
|
|
24
|
+
doc.addEventListener('focusin', on);
|
|
25
|
+
return () => doc.removeEventListener('focusin', on);
|
|
26
|
+
}
|
|
@@ -402,15 +402,30 @@ export function mergeBlock(detail) {
|
|
|
402
402
|
const { pull, checks } = detail;
|
|
403
403
|
if (pull.state === 'merged') return 'It has landed already.';
|
|
404
404
|
if (pull.state !== 'open') return 'It is closed, so it cannot be landed.';
|
|
405
|
-
if (pull.draft) return 'It is a draft: mark it ready on the forge
|
|
406
|
-
if (!checks.length) return 'It has no checks, so nothing says it works.';
|
|
405
|
+
if (pull.draft) return 'It is a draft. Next: mark it ready for review on the forge, then press Refresh here.';
|
|
406
|
+
if (!checks.length) return 'It has no checks, so nothing says it works. Next: wait for the forge to start them, then press Refresh.';
|
|
407
407
|
const words = { queued: 'is waiting to run', running: 'is still running', failure: 'failed', cancelled: 'was cancelled' };
|
|
408
408
|
const not = checks.filter((c) => !GREEN.includes(c.state));
|
|
409
|
-
if (not.length)
|
|
409
|
+
if (not.length) {
|
|
410
|
+
// What to do about each, in words: a failure is re-run (here when the forge lets cornfield, else there); a check that is not done is waited for
|
|
411
|
+
const next = not.map((c) => (c.state === 'failure' || c.state === 'cancelled' ? `re-run ${c.name}${c.canRerun ? ' below' : ' on the forge'}` : `wait for ${c.name} to ${c.state === 'queued' ? 'start and finish' : 'finish'}`));
|
|
412
|
+
return `Can't land yet: ${not.map((c) => `${c.name} ${words[c.state] || c.state}`).join(', ')}. Next: ${next.join(', then ')}, then press Refresh.`;
|
|
413
|
+
}
|
|
410
414
|
if (detail.stale) return 'This is an older answer from the forge: refresh before landing it.';
|
|
411
415
|
return null;
|
|
412
416
|
}
|
|
413
417
|
|
|
418
|
+
/**
|
|
419
|
+
* A line of warning for a spec pull request whose proposal is not approved yet ('' when it is, or the pull request is not a spec's). Only words:
|
|
420
|
+
* what Land does is not changed by it.
|
|
421
|
+
* @param {{ pull: { state: string }, specs?: { slug: string, approved: boolean }[] }} detail
|
|
422
|
+
*/
|
|
423
|
+
export function approvalWarning(detail) {
|
|
424
|
+
if (!detail || detail.pull.state !== 'open') return '';
|
|
425
|
+
const open = (detail.specs || []).filter((s) => !s.approved).map((s) => s.slug);
|
|
426
|
+
return open.length ? `Its proposal${open.length > 1 ? 's' : ''} ${open.join(', ')} ${open.length > 1 ? 'are' : 'is'} not approved yet. Next: approve ${open.length > 1 ? 'them' : 'it'} first (Specs, open the proposal, Approve), then land this.` : '';
|
|
427
|
+
}
|
|
428
|
+
|
|
414
429
|
/**
|
|
415
430
|
* Why a failed check has no Re-run button; null when it has one or is not a failed check (nothing to say).
|
|
416
431
|
* @param {{ state: string, canRerun?: boolean }} check
|
|
@@ -483,11 +498,30 @@ export function actionWords(action, status, body, number) {
|
|
|
483
498
|
* @param {{ error?: string } | null} body the JSON the server gave, if it did
|
|
484
499
|
* @returns {string}
|
|
485
500
|
*/
|
|
486
|
-
export function errorWords(status, body) {
|
|
487
|
-
|
|
501
|
+
export function errorWords(status, body, { offline = false, what = '' } = {}) {
|
|
502
|
+
const head = what ? `Could not load ${what}. ` : '';
|
|
503
|
+
if (status === null) return `${head}${offline ? 'You are offline.' : 'cornfield could not be reached. Check that it is still running, then try again.'}`;
|
|
488
504
|
if (status === 401) return 'Your sign-in has ended. Sign in again to see issues and pull requests.';
|
|
489
|
-
|
|
490
|
-
|
|
505
|
+
// The server's own sentence says what went wrong in plain words (the forge's name, what it could not find); nothing a parser or a runtime said is passed on
|
|
506
|
+
if (body && typeof body.error === 'string' && body.error) return `${head}${body.error}`;
|
|
507
|
+
if (status >= 200 && status < 300) return `${head}cornfield sent an answer this page could not read. Try again.`;
|
|
508
|
+
if (status === 404) return `${head}It was not found. It may have been removed. Try again.`;
|
|
509
|
+
if (status === 403) return `${head}This sign-in may not see it. Ask a maintainer, or sign in as another account.`;
|
|
510
|
+
if (status === 429) return `${head}The forge asked cornfield to slow down. Try again in a minute.`;
|
|
511
|
+
if (status >= 500) return `${head}The server had a problem (error ${status}). Try again in a minute.`;
|
|
512
|
+
return `${head}The server refused (error ${status}). Try again.`;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/** What a list says when it has nothing in it: what would appear here and how to make one (the `kind` is the tab) */
|
|
516
|
+
export function emptyWords(kind, forgeName = 'the forge') {
|
|
517
|
+
return {
|
|
518
|
+
specs: 'No proposals yet. A proposal is a change to the map written down before it is built. Start one from an issue (Issues, then Start a spec), or push one as a file to the proposals folder.',
|
|
519
|
+
pulls: `No open pull requests. Agents open one when a run makes code, and you can open one on ${forgeName}.`,
|
|
520
|
+
issues: `No open issues. Open one on ${forgeName}, or write a New idea in Threads.`,
|
|
521
|
+
threads: 'No threads. A thread is an idea or a spec conversation; start one with New idea below.',
|
|
522
|
+
deploys: `No deploys to show. They appear here when a workflow runs on ${forgeName}.`,
|
|
523
|
+
work: 'No work here yet. Start an agent from an issue or a proposal and its pull request shows here.',
|
|
524
|
+
}[kind] || 'Nothing here yet.';
|
|
491
525
|
}
|
|
492
526
|
|
|
493
527
|
// ---------------------------------------------------------------------------
|