cornfield 0.47.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/contrast.js +6 -6
- package/core/strings.js +14 -0
- package/explorer/check.js +7 -227
- package/explorer/connection.js +3 -3
- package/explorer/css/account.css +46 -0
- package/explorer/css/base.css +159 -0
- package/explorer/css/changes.css +160 -0
- package/explorer/css/decision.css +68 -0
- package/explorer/css/dialogs.css +50 -0
- package/explorer/css/header.css +75 -0
- package/explorer/css/layers.css +92 -0
- package/explorer/css/live.css +48 -0
- package/explorer/css/map.css +43 -0
- package/explorer/css/node-panel.css +188 -0
- package/explorer/css/page.css +83 -0
- package/explorer/css/proposal.css +151 -0
- package/explorer/css/search.css +84 -0
- package/explorer/css/sheets.css +134 -0
- package/explorer/css/whatif.css +55 -0
- package/explorer/css/work.css +288 -0
- package/explorer/engine/checks.js +252 -0
- package/explorer/engine/connection.js +36 -0
- package/explorer/engine/layers.js +1 -0
- package/explorer/engine/map-style.js +2 -2
- package/explorer/engine/player.js +489 -0
- package/explorer/engine/proposal.js +373 -0
- package/explorer/engine/render.js +1 -0
- package/explorer/engine/source.js +315 -0
- package/explorer/engine/theme-sheet.js +444 -0
- package/explorer/focus-room.js +1 -1
- package/explorer/header-fit.js +3 -3
- package/explorer/house.css +1 -1
- package/explorer/index.html +23 -61
- package/explorer/instance.js +82 -6
- package/explorer/page-address.js +59 -0
- package/explorer/page-pieces.js +33 -5
- package/explorer/page.js +20 -20
- package/explorer/panels.js +1 -3
- package/explorer/pieces/changes.js +502 -0
- package/explorer/pieces/decision.js +657 -0
- package/explorer/pieces/layers.js +4 -0
- package/explorer/pieces/map-stage.css +1 -1
- package/explorer/pieces/map.js +113 -2
- package/explorer/pieces/node-panel.js +34 -1
- package/explorer/pieces/proposal.js +488 -0
- package/explorer/pieces/scope-link.js +50 -0
- package/explorer/pieces/scope.js +247 -0
- package/explorer/pieces/status.css +24 -0
- package/explorer/pieces/status.js +144 -0
- package/explorer/plugins.js +0 -10
- package/explorer/proposal.js +64 -697
- package/explorer/review-column.js +24 -439
- package/explorer/review.js +27 -673
- package/explorer/scenario-ui.js +32 -478
- package/explorer/sheets.js +8 -7
- package/explorer/theme-model.js +1 -1
- package/explorer/theme.js +1 -1
- package/explorer/tokens.css +2 -2
- package/explorer/view.js +6 -5
- package/explorer/waiting-line.js +7 -50
- package/package.json +1 -1
- package/server/components.js +144 -0
- package/server/embed.js +3 -1
- package/server/server.js +9 -1
- package/explorer/explorer.css +0 -1512
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* changes.css: the change list
|
|
3
|
+
* The review column (spec 0006, review-column.js): the changes, the personas and their scenarios; the scenario player, one bar under the map
|
|
4
|
+
* (spec 0006 D6) and its checked-scenario marks. Read by corn-changes (D4).
|
|
5
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
6
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
7
|
+
*/
|
|
8
|
+
.hx-change-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
9
|
+
.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); }
|
|
10
|
+
.hx-change-row:hover { background: var(--corn-line-soft); }
|
|
11
|
+
.hx-change-what { width: 56px; flex: none; color: var(--corn-text-3); }
|
|
12
|
+
.hx-change-row .hx-name { min-width: 0; overflow-wrap: anywhere; } /* a long label wraps in its row: the list never scrolls sideways */
|
|
13
|
+
.hx-change-row .hx-mark-dot { margin-right: 0; }
|
|
14
|
+
.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; }
|
|
15
|
+
.hx-player .hx-close { width: var(--hx-control-h); height: var(--hx-control-h); font-size: var(--corn-text-sm); }
|
|
16
|
+
.hx-player-speed { flex: none; height: var(--hx-control-h); 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; }
|
|
17
|
+
.hx-player-speed:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
18
|
+
.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; }
|
|
19
|
+
.hx-player-who { color: var(--corn-text-2); font-weight: 600; }
|
|
20
|
+
.hx-player-text .hx-player-verdict { margin-left: var(--corn-space-2); }
|
|
21
|
+
.hx-player-count { color: var(--corn-accent-text); font-weight: 600; white-space: nowrap; }
|
|
22
|
+
.hx-player-controls { display: flex; flex: none; gap: var(--corn-space-3); }
|
|
23
|
+
.hx-player-side { display: flex; flex: none; align-items: center; gap: var(--corn-space-3); margin-left: auto; }
|
|
24
|
+
.hx-player-controls .hx-btn { justify-content: center; white-space: nowrap; }
|
|
25
|
+
.hx-player-controls .hx-btn[hidden] { display: none; }
|
|
26
|
+
/* The glyphs are drawn, not said: the names are the words (an empty alternative after the slash keeps a screen reader from reading them) */
|
|
27
|
+
.hx-player-prev::before { content: "◀" / ""; margin-right: var(--corn-space-2); }
|
|
28
|
+
.hx-player-next::after { content: "▶" / ""; margin-left: var(--corn-space-2); }
|
|
29
|
+
/* the pause mark is drawn (two bars), not a character: not every font has one */
|
|
30
|
+
.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; }
|
|
31
|
+
.hx-player-toggle[data-state="paused"]::before { content: "▶" / ""; margin-right: var(--corn-space-2); }
|
|
32
|
+
.hx-player-toggle[data-state="done"]::before { content: "↻" / ""; margin-right: var(--corn-space-2); }
|
|
33
|
+
.hx-player-controls .hx-btn:disabled { opacity: 0.4; cursor: default; }
|
|
34
|
+
.hx-player-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--corn-line-soft); }
|
|
35
|
+
.hx-player-fill { display: block; height: 100%; width: 0; background: var(--corn-accent-text); }
|
|
36
|
+
@container corn-box (max-width: 767px) {
|
|
37
|
+
/* 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 */
|
|
38
|
+
.hx-player { position: relative; left: auto; right: auto; bottom: auto; flex-wrap: wrap; max-height: 50cqh; overflow: hidden; gap: 0 var(--corn-space-3); padding: 0 var(--corn-space-4) var(--corn-space-3); --sheet-pb: var(--corn-space-3); }
|
|
39
|
+
}
|
|
40
|
+
/* ── Checked scenarios (PHY-10, check.js): the step's state on the player bar and the phone's sheet ──
|
|
41
|
+
The pill sits in the head, so the phone's peek shows it; the line and the As row are the expanded part. */
|
|
42
|
+
.hx-player-verdict { flex: none; padding: calc(var(--corn-space-1) / 2) var(--corn-space-3); border-radius: var(--corn-radius-pill); font-size: var(--corn-text-xs); font-weight: 600; white-space: nowrap; border: var(--corn-border) solid var(--corn-line); color: var(--corn-text-2); background: color-mix(in srgb, var(--corn-text-3) 12%, transparent); }
|
|
43
|
+
.hx-player-check { margin: 0; padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); font-size: var(--corn-text-md); line-height: 1.4; color: var(--corn-text-2); background: color-mix(in srgb, var(--corn-text-3) 10%, transparent); border-left: var(--corn-border-strong) solid color-mix(in srgb, var(--corn-text-3) 50%, transparent); user-select: text; }
|
|
44
|
+
.hx-player-check-detail { display: block; font-size: var(--corn-text-xs); color: var(--corn-text-3); }
|
|
45
|
+
.hx-player-verdict[data-tone="allowed"], .hx-player-check[data-tone="allowed"] { color: var(--corn-ok); background: var(--corn-ok-soft); border-color: color-mix(in srgb, var(--corn-ok) 60%, transparent); }
|
|
46
|
+
.hx-player-verdict[data-tone="refused"], .hx-player-check[data-tone="refused"] { color: var(--corn-bad); background: color-mix(in srgb, var(--corn-removed) 16%, transparent); border-color: color-mix(in srgb, var(--corn-removed) 70%, transparent); }
|
|
47
|
+
.hx-player-verdict[data-tone="mismatch"], .hx-player-check[data-tone="mismatch"] { color: var(--corn-warn); background: color-mix(in srgb, var(--corn-changed) 16%, transparent); border-color: color-mix(in srgb, var(--corn-changed) 70%, transparent); }
|
|
48
|
+
.hx-player-verdict[data-tone="pending"] { opacity: 0.75; }
|
|
49
|
+
.hx-player-as { display: flex; align-items: center; gap: var(--corn-space-3); flex-wrap: wrap; font-size: var(--corn-text-sm); color: var(--corn-text-2); }
|
|
50
|
+
.hx-player-as-label { display: inline-flex; align-items: center; gap: var(--corn-space-2); }
|
|
51
|
+
.hx-player-as .hx-btn { padding: var(--corn-space-1) var(--corn-space-3); font-size: var(--corn-text-sm); }
|
|
52
|
+
.hx-player-as .hx-btn:disabled { opacity: 0.4; cursor: default; }
|
|
53
|
+
.hx-player-as-sum { margin-left: auto; font-size: var(--corn-text-xs); }
|
|
54
|
+
.hx-player-as[hidden], .hx-player-verdict[hidden], .hx-player-check[hidden] { display: none; }
|
|
55
|
+
.hx-rc-scroll { scroll-padding-block: calc(var(--corn-focus-width) + var(--corn-focus-offset) + var(--corn-space-1)); }
|
|
56
|
+
.hx-player-count { font-family: var(--corn-font-num); font-variant-numeric: tabular-nums; }
|
|
57
|
+
@container corn-box (max-width: 767px) {
|
|
58
|
+
.hx-player-controls .hx-btn { min-height: 44px; min-width: 44px; padding: 0 var(--corn-space-3); white-space: nowrap; }
|
|
59
|
+
/* On a phone the controls are glyphs, the names are said: ◀ ⏸ ▶ in a 44px row */
|
|
60
|
+
.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; }
|
|
61
|
+
.hx-player-prev::before, .hx-player-next::after, .hx-player-toggle::before { margin: 0; }
|
|
62
|
+
.hx-player-next-scenario { font-size: var(--corn-text-sm); }
|
|
63
|
+
.hx-player-controls { gap: var(--corn-space-2); }
|
|
64
|
+
}
|
|
65
|
+
/* ---------------------------------------------------------------------------
|
|
66
|
+
Target sizes (0.34 review, F57): a thumb target is 44x44 (hit area, the drawn size may be smaller), and a change row is
|
|
67
|
+
28px at a desk. Phone width or a coarse pointer. test/explorer/target-size.test.js holds this list.
|
|
68
|
+
--------------------------------------------------------------------------- */
|
|
69
|
+
.hx-change-row { min-height: 28px; }
|
|
70
|
+
@container corn-box (max-width: 767px) {
|
|
71
|
+
.hx-change-row, .hx-sc-row, .hx-step, .hx-rc-tab, .hx-player-speed, .hx-player .hx-close { min-height: 44px; }
|
|
72
|
+
.hx-player-speed, .hx-player .hx-close { min-width: 44px; }
|
|
73
|
+
}
|
|
74
|
+
@media (pointer: coarse) {
|
|
75
|
+
.hx-change-row, .hx-sc-row, .hx-step, .hx-rc-tab, .hx-player-speed, .hx-player .hx-close { min-height: 44px; }
|
|
76
|
+
.hx-player-speed, .hx-player .hx-close { min-width: 44px; }
|
|
77
|
+
}
|
|
78
|
+
/* ==== the review column (spec 0006, review-column.js): the changes, and the personas with the scenarios that apply to them ==============
|
|
79
|
+
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);
|
|
80
|
+
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. */
|
|
81
|
+
.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; }
|
|
82
|
+
.hx-review-column[hidden] { display: none; }
|
|
83
|
+
@container corn-box (max-width: 1023px) {
|
|
84
|
+
.hx-review-column { width: 320px; }
|
|
85
|
+
}
|
|
86
|
+
@container corn-box (min-width: 1280px) {
|
|
87
|
+
/* 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) */
|
|
88
|
+
.hx-stage:has(.forge-open) .hx-review-column { left: calc(var(--hx-forge-w) + 12px); }
|
|
89
|
+
}
|
|
90
|
+
@container corn-box (min-width: 768px) and (max-width: 1023px) {
|
|
91
|
+
/* 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 */
|
|
92
|
+
.hx-stage:has(.drawer-open) .hx-review-column { width: min(320px, calc(100% - 504px)); }
|
|
93
|
+
}
|
|
94
|
+
.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); }
|
|
95
|
+
.hx-rc-lists { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-4); }
|
|
96
|
+
/* 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 */
|
|
97
|
+
.hx-rc-section { display: flex; flex-direction: column; min-height: 0; }
|
|
98
|
+
/* review-column.js measures the scenarios and sets --hx-changes-max: 40% while the scenarios need the rest, more when they are few */
|
|
99
|
+
#rc-changes { flex: 0 1 auto; max-height: var(--hx-changes-max, 40%); }
|
|
100
|
+
#rc-scenarios { flex: 1 1 0; min-height: min(12em, var(--hx-scenarios-need, 12em)); }
|
|
101
|
+
.hx-change-list, .hx-rc-sbody { min-height: 0; overflow-y: auto; scroll-padding-block: var(--corn-space-2); }
|
|
102
|
+
.hx-rc-h { flex: none; }
|
|
103
|
+
.hx-rc-tabs { display: flex; gap: var(--corn-space-2); }
|
|
104
|
+
.hx-rc-tabs[hidden] { display: none; }
|
|
105
|
+
.hx-rc-tab { flex: 1; min-height: var(--hx-control-h); 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; }
|
|
106
|
+
.hx-rc-tab[aria-selected="true"] { background: var(--corn-accent); border-color: var(--corn-accent); color: var(--corn-text-on-accent); }
|
|
107
|
+
.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); }
|
|
108
|
+
.hx-rc-section[hidden] { display: none; }
|
|
109
|
+
.hx-rc-h { margin: 0 0 var(--corn-space-2); font-size: var(--corn-text-sm); font-weight: 700; color: var(--corn-text); }
|
|
110
|
+
.hx-rc-h [data-corn="count"] { color: var(--corn-text-3); font-variant-numeric: tabular-nums; }
|
|
111
|
+
.hx-rc-empty, .hx-rc-note, .hx-rc-coverage { margin: var(--corn-space-2) 0 0; line-height: 1.5; }
|
|
112
|
+
.hx-rc-coverage { color: var(--corn-text-2); }
|
|
113
|
+
.hx-change-list, .hx-sc-list, .hx-steps { margin: 0; padding: 0; list-style: none; }
|
|
114
|
+
.hx-change-list { display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
115
|
+
.hx-persona { margin-top: var(--corn-space-4); }
|
|
116
|
+
.hx-persona:first-of-type { margin-top: 0; }
|
|
117
|
+
.hx-persona-name { margin: 0 0 var(--corn-space-1); font-size: var(--corn-text-xs); font-weight: 600; letter-spacing: 0.02em; color: var(--corn-text-3); overflow-wrap: anywhere; } /* a persona's name in its own words (0.39.0), not a label: sentence case */
|
|
118
|
+
.hx-sc-list { display: flex; flex-direction: column; gap: var(--corn-space-1); }
|
|
119
|
+
.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; }
|
|
120
|
+
.hx-sc-row:hover { background: color-mix(in srgb, var(--corn-accent-hover) 18%, transparent); }
|
|
121
|
+
.hx-sc-caret { flex: none; width: 1em; color: var(--corn-text-3); }
|
|
122
|
+
.hx-sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
123
|
+
.hx-sc-title { font-weight: 600; overflow-wrap: anywhere; }
|
|
124
|
+
.hx-sc-meta { font-size: var(--corn-text-xs); color: var(--corn-text-3); }
|
|
125
|
+
.hx-sc-seen { flex: none; font-size: var(--corn-text-xs); color: var(--corn-added-text); white-space: nowrap; }
|
|
126
|
+
.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); }
|
|
127
|
+
.hx-steps[hidden] { display: none; }
|
|
128
|
+
.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; }
|
|
129
|
+
.hx-step:hover { background: var(--corn-line-soft); }
|
|
130
|
+
.hx-step[aria-current="step"] { border-left-color: var(--corn-accent-text); background: color-mix(in srgb, var(--corn-accent-hover) 22%, transparent); }
|
|
131
|
+
.hx-step-n { flex: none; min-width: 1.4em; color: var(--corn-accent-text); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
132
|
+
.hx-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
133
|
+
.hx-step-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--corn-space-3); }
|
|
134
|
+
.hx-step-who { color: var(--corn-text-2); font-weight: 600; }
|
|
135
|
+
.hx-step-where { font-weight: 600; overflow-wrap: anywhere; }
|
|
136
|
+
.hx-step-mark { display: inline-flex; align-items: center; gap: var(--corn-space-1); color: var(--corn-text-3); }
|
|
137
|
+
.hx-step-mark .hx-mark-dot { margin: 0; }
|
|
138
|
+
.hx-step-text { color: var(--corn-text-2); line-height: 1.4; overflow-wrap: anywhere; }
|
|
139
|
+
.hx-step-off { color: var(--corn-text-3); font-style: italic; }
|
|
140
|
+
.hx-step-verdict { align-self: flex-start; white-space: normal; text-align: right; max-width: 40%; overflow-wrap: anywhere; }
|
|
141
|
+
@container corn-box (max-width: 767px) {
|
|
142
|
+
/* The expanded proposal sheet: the column is its body, with no box of its own */
|
|
143
|
+
.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; }
|
|
144
|
+
.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; }
|
|
145
|
+
.hx-rc-scroll { padding: var(--corn-space-2) 0; }
|
|
146
|
+
.hx-rc-section[hidden] { display: none; }
|
|
147
|
+
/* 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) */
|
|
148
|
+
#rc-changes, #rc-scenarios { flex: none; max-height: none; min-height: 0; }
|
|
149
|
+
.hx-rc-lists { display: flex; flex-direction: column; }
|
|
150
|
+
.hx-change-list { display: flex; }
|
|
151
|
+
.hx-step { min-height: 44px; }
|
|
152
|
+
.hx-sc-row, .hx-rc-tab { min-height: 44px; }
|
|
153
|
+
.hx-step-verdict { max-width: 45%; }
|
|
154
|
+
}
|
|
155
|
+
@container corn-box (min-width: 768px) {
|
|
156
|
+
.hx-stage:has(.drawer-open) .hx-player { right: 504px; }
|
|
157
|
+
}
|
|
158
|
+
.hx-player-as, .hx-player-check { flex: 1 0 100%; }
|
|
159
|
+
.hx-player-speed[data-corn="control"] { color: var(--corn-text); }
|
|
160
|
+
.hx-rc-sub { margin: var(--corn-space-2) 0 var(--corn-space-1); font-size: var(--corn-text-sm); font-weight: 600; color: var(--corn-text); }
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* decision.css: the decision
|
|
3
|
+
* Approve and Send back, the line above Approve, the note that opens on Send back, the hold with Undo, a landing that waits (spec 0007).
|
|
4
|
+
* Read by corn-decision (D4).
|
|
5
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
6
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
7
|
+
*/
|
|
8
|
+
/* The review (review.js, TOPO-12): the status line and the note that opens on Send back. It is in the toolbar, just before Send back and
|
|
9
|
+
Approve (the note's Tab goes on to them); from 768px it takes a row of its own under the toolbar, on a phone it sits under the counts */
|
|
10
|
+
.hx-review { flex: 1 0 100%; order: 1; display: flex; flex-direction: column; gap: var(--corn-space-2); }
|
|
11
|
+
.hx-review[hidden], .hx-review:not(:has(> :not([hidden]))) { display: none; }
|
|
12
|
+
.hx-review-form { display: flex; flex-direction: column; gap: var(--corn-space-2); }
|
|
13
|
+
.hx-review-form[hidden] { display: none; }
|
|
14
|
+
.hx-review-label { color: var(--corn-text-3); font-size: var(--corn-text-xs); }
|
|
15
|
+
.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; }
|
|
16
|
+
.hx-review-note:focus { outline: var(--corn-focus-width) solid var(--corn-added-text); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
17
|
+
.hx-review-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2) var(--corn-space-3); }
|
|
18
|
+
.hx-btn--approve { border-color: color-mix(in srgb, var(--corn-added) 50%, transparent); color: var(--corn-added-text); }
|
|
19
|
+
.hx-btn--approve:hover { background: color-mix(in srgb, var(--corn-added) 20%, transparent); color: var(--corn-added-text); }
|
|
20
|
+
.hx-review-status { margin: 0; color: var(--corn-added-text); font-variant-numeric: tabular-nums; }
|
|
21
|
+
.hx-review-status[hidden], .hx-review-msg[hidden], .hx-review-line[hidden] { display: none; }
|
|
22
|
+
.hx-review-msg { margin: 0; padding: var(--corn-space-1) var(--corn-space-3); border-radius: var(--corn-radius-sm); background: color-mix(in srgb, var(--corn-removed) 12%, transparent); border: var(--corn-border) solid color-mix(in srgb, var(--corn-removed) 35%, transparent); color: var(--corn-bad); line-height: 1.4; }
|
|
23
|
+
.hx-review-line { margin: 0; color: var(--corn-text-2); line-height: 1.4; }
|
|
24
|
+
.hx-proposal-actions { display: flex; align-items: center; gap: var(--corn-space-3); }
|
|
25
|
+
.hx-proposal-actions { margin-left: auto; }
|
|
26
|
+
.hx-proposal-actions .hx-btn { height: var(--hx-control-h); justify-content: center; padding: 0 var(--corn-space-5); font-size: var(--corn-text-sm); font-weight: 500; }
|
|
27
|
+
.hx-proposal-actions .hx-btn--approve, .hx-proposal-actions .hx-btn--approve:hover { background: var(--corn-accent); border-color: var(--corn-accent); color: var(--corn-text-on-accent); font-weight: 600; }
|
|
28
|
+
.hx-proposal-actions .hx-btn:disabled { opacity: 0.4; cursor: default; }
|
|
29
|
+
@container corn-box (max-width: 767px) {
|
|
30
|
+
.hx-review { grid-column: 1 / -1; order: 3; }
|
|
31
|
+
.hx-proposal-actions { grid-column: 1 / -1; order: 4; display: grid; grid-template-columns: 1fr 1fr; margin-left: 0; gap: var(--corn-space-3); }
|
|
32
|
+
.hx-proposal-actions .hx-btn { height: auto; min-height: 44px; padding: var(--corn-space-2) var(--corn-space-3); white-space: normal; text-align: center; font-size: var(--corn-text-md); }
|
|
33
|
+
.hx-review .hx-btn { min-height: 44px; }
|
|
34
|
+
}
|
|
35
|
+
.hx-forge-cta .hx-btn--approve { flex: 1; }
|
|
36
|
+
@container corn-box (max-width: 767px) {
|
|
37
|
+
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-proposal-actions { order: 4; grid-template-columns: 1fr; }
|
|
38
|
+
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-proposal-actions .hx-btn--approve { display: none; }
|
|
39
|
+
}
|
|
40
|
+
.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); }
|
|
41
|
+
.hx-rc-foot .hx-review { flex: none; order: 0; }
|
|
42
|
+
.hx-rc-foot .hx-proposal-actions { margin-left: auto; }
|
|
43
|
+
@container corn-box (max-width: 767px) {
|
|
44
|
+
.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 */
|
|
45
|
+
.hx-rc-foot .hx-proposal-actions { margin-left: 0; width: 100%; }
|
|
46
|
+
}
|
|
47
|
+
.hx-decision-line { margin: 0; color: var(--corn-text-2); font-size: var(--corn-text-sm); line-height: 1.5; }
|
|
48
|
+
.hx-decision-line[hidden], .hx-review-ask[hidden], .hx-hold[hidden], .hx-review-landing[hidden], .hx-sent-edits[hidden] { display: none; }
|
|
49
|
+
.hx-review-ask { margin: 0; padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid color-mix(in srgb, var(--corn-warn) 55%, transparent); background: color-mix(in srgb, var(--corn-warn) 14%, transparent); color: var(--corn-text); line-height: 1.4; }
|
|
50
|
+
.hx-review-landing { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); color: var(--corn-text-2); }
|
|
51
|
+
.hx-review-landing p { margin: 0; line-height: 1.4; }
|
|
52
|
+
.hx-sent-edits { color: var(--corn-text-2); }
|
|
53
|
+
.hx-sent-edits summary { cursor: pointer; min-height: 24px; }
|
|
54
|
+
.hx-hold { height: 3px; border-radius: var(--corn-radius-sm); background: color-mix(in srgb, var(--corn-accent) 22%, transparent); overflow: hidden; }
|
|
55
|
+
.hx-hold-fill { display: block; height: 100%; width: 100%; background: var(--corn-accent); transform-origin: left center; animation-name: hx-hold-drain; animation-timing-function: linear; animation-fill-mode: forwards; }
|
|
56
|
+
@keyframes hx-hold-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
|
|
57
|
+
.hx-proposal-actions .hx-btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }
|
|
58
|
+
.hx-proposal-actions .hx-btn[data-holding="true"] { opacity: 1; font-variant-numeric: tabular-nums; }
|
|
59
|
+
.hx-review-undo[hidden] { display: none; }
|
|
60
|
+
@container corn-box (max-width: 767px) {
|
|
61
|
+
.hx-review-undo { min-height: 44px; min-width: 44px; order: 1; grid-column: 1 / -1; } /* a row of its own under Send back and Approve: never where the finger that pressed is */
|
|
62
|
+
.hx-review-landing .hx-btn { min-height: 44px; }
|
|
63
|
+
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-decision-line { display: none; } /* the note's sheet shows the send back line under the note, not Approve's */
|
|
64
|
+
}
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
.hx-hold { display: none; }
|
|
67
|
+
.hx-hold-fill { animation: none; }
|
|
68
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* dialogs.css: dialogs
|
|
3
|
+
* The review tokens dialog (review-tokens.js), the confirm dialog of the Work panel, and a proposal's mockup window (mockups.js). They
|
|
4
|
+
* become native <dialog> elements in a later step (D8); until then three of them are `position: fixed` over the window, each marked below.
|
|
5
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
6
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
7
|
+
*/
|
|
8
|
+
.hx-confirm-title, .hx-mockup-title { font-family: var(--corn-font-display); }
|
|
9
|
+
/* fixed (spec 0011 D8): a modal over the whole window, centred on it. It cannot be placed in a piece's box without changing the page; it becomes a native <dialog>, in the top layer, in a later step */
|
|
10
|
+
.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(100cqw - 32px)); max-height: calc(100 * var(--hx-vh, 1cqh) - 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 100cqmax var(--corn-scrim); }
|
|
11
|
+
.hx-mockup-dialog:focus { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
12
|
+
.hx-mockup-head { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-4); }
|
|
13
|
+
.hx-mockup-title { margin: 0; font-size: var(--corn-text-base); font-weight: 600; color: var(--corn-text); }
|
|
14
|
+
.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); }
|
|
15
|
+
.hx-mockup-img { display: block; max-width: 100%; height: auto; object-fit: contain; }
|
|
16
|
+
.hx-mockup-frame { display: block; width: 100%; height: min(560px, calc(100 * var(--hx-vh, 1cqh) - 140px)); border: 0; background: var(--corn-mockup-ground); }
|
|
17
|
+
/* fixed (spec 0011 D8): the scrim of a modal over the whole window; a native <dialog> and its ::backdrop take its place in a later step */
|
|
18
|
+
.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); }
|
|
19
|
+
.hx-confirm-scrim[hidden] { display: none; }
|
|
20
|
+
.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; }
|
|
21
|
+
.hx-confirm-title { margin: 0; font-size: var(--corn-text-lg); font-weight: 700; color: var(--corn-text); }
|
|
22
|
+
.hx-confirm-facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--corn-space-1) var(--corn-space-4); margin: 0; }
|
|
23
|
+
.hx-confirm-facts dt { color: var(--corn-text-3); }
|
|
24
|
+
.hx-confirm-facts dd { margin: 0; overflow-wrap: anywhere; color: var(--corn-text); }
|
|
25
|
+
.hx-confirm-checks { display: flex; flex-direction: column; gap: var(--corn-space-1); margin: 0; padding: 0; list-style: none; }
|
|
26
|
+
.hx-confirm-label { margin: 0; color: var(--corn-text-3); }
|
|
27
|
+
.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; }
|
|
28
|
+
.hx-confirm-pre:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
29
|
+
.hx-confirm-note { margin: 0; color: var(--corn-text-2); line-height: 1.5; }
|
|
30
|
+
.hx-confirm-actions { display: flex; justify-content: flex-end; gap: var(--corn-space-3); }
|
|
31
|
+
.hx-tokens-list { display: flex; flex-direction: column; gap: var(--corn-space-2); margin: 0; padding: 0; list-style: none; }
|
|
32
|
+
.hx-tokens-item { display: grid; grid-template-columns: 1fr auto; gap: calc(var(--corn-space-1) / 2) var(--corn-space-3); align-items: center; 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); }
|
|
33
|
+
.hx-tokens-item[data-state="revoked"], .hx-tokens-item[data-state="expired"] { opacity: 0.65; }
|
|
34
|
+
.hx-tokens-label { font-weight: 600; color: var(--corn-text); overflow-wrap: anywhere; }
|
|
35
|
+
.hx-tokens-meta { grid-column: 1; }
|
|
36
|
+
.hx-tokens-item .hx-btn { grid-column: 2; grid-row: 1 / span 2; }
|
|
37
|
+
.hx-tokens-row { display: flex; gap: var(--corn-space-3); align-items: center; }
|
|
38
|
+
.hx-tokens-row .hx-forge-input { flex: 1; }
|
|
39
|
+
.hx-tokens-form { display: grid; grid-template-columns: 1fr 5rem; gap: var(--corn-space-3); align-items: end; }
|
|
40
|
+
.hx-tokens-form .hx-btn { grid-column: 1 / -1; justify-self: start; }
|
|
41
|
+
.hx-confirm { scroll-padding-block: calc(var(--corn-focus-width) + var(--corn-focus-offset) + var(--corn-space-1)); }
|
|
42
|
+
@container corn-box (max-width: 767px) {
|
|
43
|
+
.hx-confirm .hx-btn, .hx-confirm .hx-forge-input, .hx-confirm .hx-forge-select { min-height: 44px; }
|
|
44
|
+
.hx-confirm .hx-btn { min-width: 44px; }
|
|
45
|
+
}
|
|
46
|
+
@media (pointer: coarse) {
|
|
47
|
+
.hx-confirm .hx-btn, .hx-confirm .hx-forge-input, .hx-confirm .hx-forge-select { min-height: 44px; }
|
|
48
|
+
.hx-confirm .hx-btn { min-width: 44px; }
|
|
49
|
+
}
|
|
50
|
+
.hx-confirm-title { font-size: var(--corn-text-lg); font-weight: 700; line-height: 1.25; letter-spacing: normal; }
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* header.css: the header (CF-41)
|
|
3
|
+
* The top bar of cornfield's page: the brand, the View switch (Map, Flow, House, Fit). The header's other parts have files of their own:
|
|
4
|
+
* layers.css (the Layers chip), search.css, work.css (the Work toggle), live.css, account.css. The header is cornfield's page shell's (corn-
|
|
5
|
+
* explorer, a later step); its box is the body, which page.css makes the `corn-box` container.
|
|
6
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
7
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
8
|
+
*/
|
|
9
|
+
/* Headings and titles take the display family (the same as the body unless a brand sets it) */
|
|
10
|
+
.hx-title { font-family: var(--corn-font-display); }
|
|
11
|
+
/* ==== the header (CF-41) ===============================================================================================
|
|
12
|
+
Left to right: the brand, the View switch (Map, Flow, House, Fit), the Layers chip, the live chip; at the right the search,
|
|
13
|
+
the Work toggle and the one account menu (account-menu.js). Everything reads the --corn-* tokens. From 768px it is a desktop
|
|
14
|
+
header; below it is a phone's: Map, Flow, House, a search icon and the account initial, with the Layers chip, the live chip
|
|
15
|
+
and Fit floating on the map (placed from the header's corner). The header has no backdrop-filter of its own: it sits above
|
|
16
|
+
the map, not over it, and one would keep its menus' .glass blur from working (they would show the map through). */
|
|
17
|
+
.hx-header {
|
|
18
|
+
position: relative;
|
|
19
|
+
flex: none;
|
|
20
|
+
height: 56px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
gap: var(--corn-space-3);
|
|
25
|
+
padding: 0 var(--corn-space-4);
|
|
26
|
+
z-index: 20;
|
|
27
|
+
background: var(--corn-surface-1);
|
|
28
|
+
border-bottom: var(--corn-border) solid var(--corn-line);
|
|
29
|
+
}
|
|
30
|
+
.hx-header-left, .hx-header-right { display: flex; align-items: center; gap: var(--corn-space-3); min-width: 0; }
|
|
31
|
+
.hx-header-right { flex: none; }
|
|
32
|
+
.hx-only-wide { display: none; }
|
|
33
|
+
.hx-only-mobile { display: inline-flex; }
|
|
34
|
+
/* The brand: logo and wordmark; a click resets the view */
|
|
35
|
+
.hx-brand { display: flex; align-items: center; gap: var(--corn-space-3); flex: none; min-width: var(--hx-control-h); min-height: var(--hx-control-h); padding: 0; border: 0; background: none; }
|
|
36
|
+
.hx-title { font-size: var(--corn-text-base); font-weight: 600; letter-spacing: -0.01em; color: var(--corn-text); }
|
|
37
|
+
.hx-mark { flex: none; }
|
|
38
|
+
.hx-mark-bg { fill: var(--corn-accent); }
|
|
39
|
+
.hx-mark-fg { fill: var(--corn-text-on-accent); }
|
|
40
|
+
.hx-mark-line { fill: none; stroke: var(--corn-text-on-accent); stroke-width: 1.5; }
|
|
41
|
+
/* The View switch: Map, Flow and House (aria-pressed says which is on), and Fit at its end */
|
|
42
|
+
.hx-view { display: inline-flex; align-items: center; flex: none; padding: calc(var(--corn-space-1) / 2); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); }
|
|
43
|
+
.hx-view-btn, .hx-view-fit { display: inline-flex; align-items: center; justify-content: center; height: var(--hx-seg-inner); border: 0; border-radius: var(--corn-radius-sm); background: transparent; color: var(--corn-text-2); font-size: var(--corn-text-sm); font-weight: 500; white-space: nowrap; }
|
|
44
|
+
.hx-view-btn { padding: 0 var(--corn-space-4); }
|
|
45
|
+
.hx-view-btn:hover, .hx-view-fit:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
46
|
+
.hx-view-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent); font-weight: 600; }
|
|
47
|
+
.hx-view-fit { width: var(--hx-seg-inner); margin-left: var(--corn-space-1); border-left: var(--corn-border) solid var(--corn-line); border-radius: 0 var(--corn-radius-sm) var(--corn-radius-sm) 0; color: var(--corn-text-3); }
|
|
48
|
+
@container corn-box (min-width: 768px) {
|
|
49
|
+
.hx-header { height: 52px; padding: 0 var(--corn-space-5); gap: var(--corn-space-5); }
|
|
50
|
+
.hx-header-left { gap: var(--corn-space-5); }
|
|
51
|
+
.hx-header-right { gap: var(--corn-space-3); }
|
|
52
|
+
.hx-brand { min-width: 0; min-height: var(--hx-control-h); }
|
|
53
|
+
.hx-only-wide { display: inline; }
|
|
54
|
+
.hx-only-mobile { display: none; }
|
|
55
|
+
/* A narrow desktop (768 to about 900 px, signed in): the search gives up width before it runs over the Layers chip; the left group
|
|
56
|
+
keeps its own (the right group shrinks, the search down to its min-width) */
|
|
57
|
+
.hx-header-left { flex: none; }
|
|
58
|
+
.hx-header-right { flex: 0 1 auto; min-width: 0; }
|
|
59
|
+
}
|
|
60
|
+
@container corn-box (max-width: 767px) {
|
|
61
|
+
/* Not for a desktop: the brand keeps its logo and shows its wordmark; with no wordmark the logo stands alone (the button keeps its name) */
|
|
62
|
+
.hx-title:not(:has([data-corn="brand-wordmark"])) { display: none; }
|
|
63
|
+
.hx-header { padding: 0 var(--corn-space-3); }
|
|
64
|
+
/* Too narrow for the row (320px, or a repo's longer words): the left scrolls sideways rather than run under the right.
|
|
65
|
+
The padding keeps the focus rings inside the scrolled box; what sits on the map is placed from the header, so it is not clipped */
|
|
66
|
+
.hx-header-left { gap: var(--corn-space-1); margin-inline: calc(var(--corn-space-1) * -1); padding: var(--corn-space-1); overflow-x: auto; scrollbar-width: none; }
|
|
67
|
+
.hx-header-left::-webkit-scrollbar { display: none; }
|
|
68
|
+
.hx-header-right { gap: var(--corn-space-1); }
|
|
69
|
+
.hx-view { padding: 0; }
|
|
70
|
+
.hx-view-btn { min-width: var(--hx-control-h); height: var(--hx-seg-inner); padding: 0 var(--corn-space-2); }
|
|
71
|
+
.hx-view-fit { position: absolute; top: calc(100% + var(--corn-space-4)); right: var(--corn-space-4); width: var(--hx-control-h); height: var(--hx-control-h); 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); }
|
|
72
|
+
}
|
|
73
|
+
/* A brand wordmark that does not fit leaves the logo (header-fit.js measures); a row that still scrolls shows it at its edge */
|
|
74
|
+
.hx-header-left[data-brand-short] .hx-title { display: none; }
|
|
75
|
+
.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); }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* layers.css: the Layers menu
|
|
3
|
+
* The Layers chip and its menu: the layer rows and their counts, the legend, the kinds key, the dots. Read by corn-layers (D4).
|
|
4
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
5
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
6
|
+
*/
|
|
7
|
+
.hx-menu-title { font-family: var(--corn-font-display); }
|
|
8
|
+
/* The Layers chip: "Layers · 13 of 20" */
|
|
9
|
+
.hx-layers-chip { display: inline-flex; align-items: center; gap: var(--corn-space-1); height: var(--hx-control-h); padding: 0 var(--corn-space-4); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-2); font-size: var(--corn-text-sm); white-space: nowrap; }
|
|
10
|
+
.hx-layers-chip:hover, .hx-layers-chip[aria-expanded="true"] { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
11
|
+
.hx-layers-count { color: var(--corn-text-3); }
|
|
12
|
+
.hx-layers-chip--dim { border-color: var(--corn-line-soft); }
|
|
13
|
+
.hx-layers-chip--dim, .hx-layers-chip--dim .hx-layers-count { color: var(--corn-text-3); }
|
|
14
|
+
@container corn-box (max-width: 767px) {
|
|
15
|
+
.hx-header .hx-layers { position: absolute; top: calc(100% + var(--corn-space-4)); left: var(--corn-space-4); }
|
|
16
|
+
.hx-layers-chip { height: var(--hx-control-h); padding: 0 var(--corn-space-5); border-radius: var(--corn-radius-pill); background: var(--corn-surface-1); box-shadow: var(--corn-shadow); }
|
|
17
|
+
}
|
|
18
|
+
.hx-toggle-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
19
|
+
.hx-menu-title { display: flex; align-items: center; justify-content: space-between; padding-bottom: calc(var(--corn-space-1) / 2); font-size: var(--corn-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--corn-text-3); }
|
|
20
|
+
.hx-menu-head { padding-bottom: var(--corn-space-2); border-bottom: var(--corn-border) solid var(--corn-line); margin-bottom: var(--corn-space-3); }
|
|
21
|
+
.hx-menu-links { display: flex; align-items: center; gap: var(--corn-space-3); text-transform: none; letter-spacing: 0; }
|
|
22
|
+
.hx-menu-section { padding-top: var(--corn-space-3); margin-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line); }
|
|
23
|
+
.hx-note { padding: var(--corn-space-2) var(--corn-space-3); margin-bottom: var(--corn-space-3); border-radius: var(--corn-radius-sm); background: var(--corn-hue-orange-soft); color: var(--corn-hue-orange-text); font-size: var(--corn-text-xs); line-height: 1.4; }
|
|
24
|
+
.hx-toggles { display: flex; flex-direction: column; gap: var(--corn-space-1); }
|
|
25
|
+
.hx-toggle-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: var(--corn-space-2) 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; transition: background 0.15s; }
|
|
26
|
+
.hx-toggle-row:hover { background: var(--corn-surface-3); }
|
|
27
|
+
.hx-toggle-row.is-off { background: color-mix(in srgb, var(--corn-ground) 40%, transparent); border-color: transparent; color: var(--corn-text-3); } /* off: dimmed by the fill, the text-3 colour and the dot, never by opacity on text */
|
|
28
|
+
.hx-toggle-label, .hx-toggle-meta { display: flex; align-items: center; gap: var(--corn-space-3); }
|
|
29
|
+
.hx-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; transition: transform 0.15s; }
|
|
30
|
+
.hx-toggle-row.is-off .hx-dot { transform: scale(0.75); opacity: 0.4; }
|
|
31
|
+
.hx-toggle-name { font-size: var(--corn-text-xs); font-weight: 500; color: var(--corn-text-2); }
|
|
32
|
+
.hx-toggle-row.is-off .hx-toggle-name { color: var(--corn-text-3); text-decoration: line-through; }
|
|
33
|
+
.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); }
|
|
34
|
+
.hx-toggle-row.is-off .hx-count { background: color-mix(in srgb, var(--corn-ground) 40%, transparent); color: var(--corn-text-3); }
|
|
35
|
+
.hx-tick { font-size: var(--corn-text-sm); font-weight: 700; color: var(--corn-ok); }
|
|
36
|
+
.hx-toggle-row.is-off .hx-tick { color: var(--corn-text-3); }
|
|
37
|
+
.hx-legend-row { display: flex; align-items: center; gap: var(--corn-space-3); padding: calc(var(--corn-space-1) / 2) 0; color: var(--corn-text-2); }
|
|
38
|
+
.hx-legend-row--split { justify-content: space-between; }
|
|
39
|
+
.hx-legend-label { display: flex; align-items: center; gap: var(--corn-space-3); font-weight: 500; }
|
|
40
|
+
.hx-legend-swatch { width: 16px; flex: none; display: inline-flex; justify-content: center; }
|
|
41
|
+
.hx-swatch-line { display: inline-block; width: 16px; height: 2px; border-radius: var(--corn-radius-xs); }
|
|
42
|
+
.hx-swatch-indigo { border-top-color: var(--corn-accent-text); }
|
|
43
|
+
.hx-legend-row .hx-mark-dot { margin-right: 0; }
|
|
44
|
+
/* Numbers shown as data take the number face (a brand sets --corn-font-num; digits in a pixel face misread) */
|
|
45
|
+
.hx-count, .hx-layers-count { font-family: var(--corn-font-num); font-variant-numeric: tabular-nums; }
|
|
46
|
+
@media (prefers-reduced-motion: reduce) {
|
|
47
|
+
.hx-dot { transition: none; animation: none; }
|
|
48
|
+
}
|
|
49
|
+
@container corn-box (max-width: 767px) {
|
|
50
|
+
.hx-toggle-row { min-height: 44px; }
|
|
51
|
+
}
|
|
52
|
+
@media (pointer: coarse) {
|
|
53
|
+
.hx-toggle-row { min-height: 44px; }
|
|
54
|
+
}
|
|
55
|
+
/* ---------------------------------------------------------------------------
|
|
56
|
+
Project layers and finer kinds (spec 0009): the Layers menu holds its title (with All and None) while the rows scroll, the Overlays heading,
|
|
57
|
+
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.
|
|
58
|
+
--------------------------------------------------------------------------- */
|
|
59
|
+
.hx-layers .hx-menu { display: flex; flex-direction: column; overflow: hidden; }
|
|
60
|
+
.hx-layers .hx-menu[hidden] { display: none; }
|
|
61
|
+
.hx-layers .hx-menu-head { flex: none; }
|
|
62
|
+
.hx-menu-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
|
|
63
|
+
.hx-overlays { margin-top: var(--corn-space-3); padding-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line); }
|
|
64
|
+
.hx-layer-note { font-size: var(--corn-text-2xs); }
|
|
65
|
+
.hx-kinds { padding: 0 var(--corn-space-3) var(--corn-space-1) var(--corn-space-5); }
|
|
66
|
+
.hx-kinds-btn { display: inline-flex; align-items: center; gap: var(--corn-space-1); }
|
|
67
|
+
.hx-kind-keys { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
68
|
+
.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); }
|
|
69
|
+
.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; }
|
|
70
|
+
.hx-kind-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
|
71
|
+
@container corn-box (max-width: 767px) {
|
|
72
|
+
/* On a phone the menu spans the screen, at most 70% of its height */
|
|
73
|
+
/* fixed (spec 0011 D8): the menu spans the window under the chip, placed from the window's edges; its anchor is the header's corner, which is outside the piece's box */
|
|
74
|
+
.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: 70cqh; }
|
|
75
|
+
/* 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 */
|
|
76
|
+
.hx-header:has(.hx-layers .hx-menu:not([hidden])) { z-index: 46; }
|
|
77
|
+
.hx-kinds-btn { min-height: 44px; }
|
|
78
|
+
}
|
|
79
|
+
/* ---------------------------------------------------------------------------
|
|
80
|
+
The Key (spec 0008 D7, edge-key.js): each kind of line drawn with its real style and end mark. The map says the kind by line style
|
|
81
|
+
and mark, never by colour alone, so the swatches are one ink; a `when` is told by ticks (cloud-model.js WHEN_STYLES)
|
|
82
|
+
--------------------------------------------------------------------------- */
|
|
83
|
+
.hx-legend-swatch--wide { width: 44px; justify-content: flex-start; color: var(--corn-text-2); }
|
|
84
|
+
.hx-key-line { display: block; overflow: visible; }
|
|
85
|
+
.hx-key-note { margin: var(--corn-space-1) 0 0; font-size: var(--corn-text-xs); }
|
|
86
|
+
/* A fill under 3:1 on the menu keeps its colour and gets an outline: the map's own (--corn-map-stroke, set inline as --hx-dot-ring) when the theme sets one */
|
|
87
|
+
.hx-dot.is-ringed { outline: var(--corn-border) solid var(--hx-dot-ring, var(--corn-text-3)); outline-offset: 0; }
|
|
88
|
+
/* The swatch before a kind's letters: the theme's --corn-map-kind-<type>-<kind>; decoration, the letters and the name stay */
|
|
89
|
+
.hx-kind-swatch { margin-inline-end: calc(var(--corn-space-1) * -1); }
|
|
90
|
+
.hx-kind-swatch.is-blank { visibility: hidden; }
|
|
91
|
+
/* A Layers row the review hid: its name with "hidden while reviewing" under it */
|
|
92
|
+
.hx-toggle-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* live.css: the live layer
|
|
3
|
+
* The live chip in the toolbar and its menu (live.js, spec 0029). A part of cornfield's page shell for now: it is not one of D4's pieces,
|
|
4
|
+
* and its chip sits in the header.
|
|
5
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
6
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
7
|
+
*/
|
|
8
|
+
@container corn-box (max-width: 767px) {
|
|
9
|
+
/* The live chip sits on the map too, left of Fit */
|
|
10
|
+
.hx-header .hx-live { position: absolute; top: calc(100% + var(--corn-space-4)); right: calc(var(--corn-space-4) + var(--corn-space-3) + var(--hx-control-h)); }
|
|
11
|
+
}
|
|
12
|
+
.hx-live-chip { max-width: 240px; min-width: 0; }
|
|
13
|
+
@container corn-box (min-width: 768px) {
|
|
14
|
+
.hx-live-chip-text { display: inline-block; min-width: 0; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
|
|
15
|
+
}
|
|
16
|
+
@container corn-box (min-width: 768px) and (max-width: 1023px) {
|
|
17
|
+
/* A narrow desktop (768 to 1023px): the header has no room for the chip's words beside a signed-in search, Work and account (a scenario's step
|
|
18
|
+
turns the live layer on, and the header ran 100px past the page). The chip is its dot, as on a phone; its line is in its menu and its name in aria-label */
|
|
19
|
+
.hx-live-chip-text { display: none; }
|
|
20
|
+
}
|
|
21
|
+
.hx-live-chip-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--corn-text-3); }
|
|
22
|
+
.hx-live[data-tone="ok"] .hx-live-chip-dot { background: var(--corn-ok); box-shadow: 0 0 calc(var(--corn-glow) * 0.75) color-mix(in srgb, var(--corn-ok) 70%, transparent); }
|
|
23
|
+
.hx-live[data-tone="stale"] .hx-live-chip-dot { background: var(--corn-changed); }
|
|
24
|
+
.hx-live[data-tone="error"] .hx-live-chip-dot { background: var(--corn-removed); box-shadow: 0 0 calc(var(--corn-glow) * 0.75) color-mix(in srgb, var(--corn-removed) 60%, transparent); }
|
|
25
|
+
.hx-live[data-tone="error"] .hx-live-chip { border-color: color-mix(in srgb, var(--corn-removed) 40%, transparent); }
|
|
26
|
+
.hx-menu--live { width: 320px; }
|
|
27
|
+
.hx-live-line { margin: 0 0 var(--corn-space-2); color: var(--corn-text-2); font-size: var(--corn-text-sm); line-height: 1.4; user-select: text; }
|
|
28
|
+
.hx-live-line--main { color: var(--corn-text); font-weight: 600; }
|
|
29
|
+
.hx-live-row { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); margin-top: var(--corn-space-3); }
|
|
30
|
+
.hx-live-tag { margin-left: var(--corn-space-2); padding: 0 var(--corn-space-1); border-radius: var(--corn-radius-xs); background: var(--corn-ok-soft); color: var(--corn-ok); font-size: var(--corn-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
31
|
+
.hx-live-photo { display: block; max-width: 100%; max-height: 180px; margin: var(--corn-space-2) 0; border-radius: var(--corn-radius-sm); object-fit: cover; }
|
|
32
|
+
.hx-live-list { margin: var(--corn-space-1) 0 0; padding: 0 0 0 var(--corn-space-1); list-style: none; font-size: var(--corn-text-sm); line-height: 1.6; }
|
|
33
|
+
/* The token field (live.js): shown while the live layer is off for want of a token */
|
|
34
|
+
.hx-live-token { margin: var(--corn-space-3) 0 var(--corn-space-1); padding-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line-soft); }
|
|
35
|
+
.hx-live-token-label { display: block; margin-bottom: var(--corn-space-1); color: var(--corn-text); font-size: var(--corn-text-sm); font-weight: 600; }
|
|
36
|
+
.hx-live-token-row { display: flex; gap: var(--corn-space-2); align-items: center; margin-bottom: var(--corn-space-2); }
|
|
37
|
+
.hx-live-token-input { flex: 1; min-width: 0; padding: var(--corn-space-2) var(--corn-space-3); font-size: var(--corn-text-sm); }
|
|
38
|
+
.hx-live-token-input:focus { outline: none; border-color: var(--corn-focus); }
|
|
39
|
+
.hx-live-help code { font-family: var(--corn-mono); font-size: var(--corn-text-2xs); color: var(--corn-text-2); overflow-wrap: anywhere; }
|
|
40
|
+
.hx-live-second { font-size: var(--corn-text-xs); }
|
|
41
|
+
.hx-live-buttons { display: inline-flex; gap: var(--corn-space-2); }
|
|
42
|
+
@container corn-box (max-width: 767px) {
|
|
43
|
+
/* On a phone the chip is its dot on the map (its line is in the menu), and the menu spans the screen under it */
|
|
44
|
+
.hx-live-chip { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: var(--corn-radius-pill); background: var(--corn-surface-1); box-shadow: var(--corn-shadow); }
|
|
45
|
+
/* fixed (spec 0011 D8): as the Layers menu: spans the window under the chip */
|
|
46
|
+
.hx-menu--live { position: fixed; top: calc(56px + var(--corn-space-4) + 44px); left: 12px; right: 12px; width: auto; max-width: none; }
|
|
47
|
+
}
|
|
48
|
+
:where(.hx-header) .hx-live-chip { height: var(--hx-control-h); }
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* map.css: the map
|
|
3
|
+
* The stage's contents: the map's canvases, the hint, the loading and error states, the marks of agent runs drawn over the map (runs-
|
|
4
|
+
* map.js). Read by corn-map (D4).
|
|
5
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
6
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
7
|
+
*/
|
|
8
|
+
@container corn-box (max-width: 767px) {
|
|
9
|
+
.hx-stage .hx-hint { top: 68px; }
|
|
10
|
+
}
|
|
11
|
+
#graph-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
|
|
12
|
+
#graph-canvas:active { cursor: grabbing; }
|
|
13
|
+
#label-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
|
|
14
|
+
/* The Canvas 2D that stands in for the map canvas when its WebGL2 shaders fail (renderer.js): same place, pointer goes through */
|
|
15
|
+
.hx-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
|
|
16
|
+
.hx-hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: var(--corn-space-2); max-width: 85cqw; padding: var(--corn-space-1) var(--corn-space-4); border-radius: var(--corn-radius-pill); font-size: var(--corn-text-2xs); color: var(--corn-text-2); pointer-events: none; z-index: 10; white-space: nowrap; }
|
|
17
|
+
.hx-hint span:last-child { overflow: hidden; text-overflow: ellipsis; }
|
|
18
|
+
@container corn-box (min-width: 640px) {
|
|
19
|
+
.hx-hint { font-size: var(--corn-text-xs); }
|
|
20
|
+
}
|
|
21
|
+
.hx-state { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--corn-text-3); font-size: var(--corn-text-md); z-index: 5; text-align: center; }
|
|
22
|
+
.hx-state--error { display: flex; flex-direction: column; align-items: center; gap: var(--corn-space-3); width: min(440px, calc(100cqw - 32px)); padding: var(--corn-space-6); border-radius: var(--corn-radius-lg); color: var(--corn-text-2); user-select: text; }
|
|
23
|
+
.hx-state--error strong { color: var(--corn-bad); font-size: var(--corn-text-lg); }
|
|
24
|
+
.hx-state--error p { font-size: var(--corn-text-sm); line-height: 1.5; }
|
|
25
|
+
.hx-state--error #error-message { font-family: var(--corn-mono); color: var(--corn-warn); word-break: break-word; }
|
|
26
|
+
#graph-canvas.is-drawing-edge { touch-action: none; }
|
|
27
|
+
#graph-canvas:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-width) * -1); }
|
|
28
|
+
.hx-run-overlay { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
|
|
29
|
+
.hx-run-overlay[hidden] { display: none; }
|
|
30
|
+
.hx-run-mark { position: absolute; width: 0; height: 0; --r: 14px; }
|
|
31
|
+
.hx-run-ring { position: absolute; left: calc(var(--r) * -1); top: calc(var(--r) * -1); width: calc(var(--r) * 2); height: calc(var(--r) * 2); box-sizing: border-box; border-radius: 50%; border: var(--corn-border-strong) solid var(--corn-added); }
|
|
32
|
+
/* In flight: the ring pulses outward and fades; when motion is reduced it is a still, slightly thicker ring */
|
|
33
|
+
.hx-run-mark--flight .hx-run-ring { animation: hx-run-pulse 1.8s ease-out infinite; }
|
|
34
|
+
@keyframes hx-run-pulse { 0% { transform: scale(0.9); opacity: 1; } 100% { transform: scale(1.55); opacity: 0.1; } }
|
|
35
|
+
.hx-run-overlay.is-static .hx-run-ring { animation: none; transform: none; opacity: 1; border-width: calc(var(--corn-border-strong) + var(--corn-border)); }
|
|
36
|
+
@media (prefers-reduced-motion: reduce) {
|
|
37
|
+
.hx-run-ring { animation: none !important; transform: none; opacity: 1; border-width: calc(var(--corn-border-strong) + var(--corn-border)); }
|
|
38
|
+
}
|
|
39
|
+
/* Collision: dashed, a sign and words; the same ring whether or not colour is seen */
|
|
40
|
+
.hx-run-mark--collision .hx-run-ring { border: calc(var(--corn-border-strong) + var(--corn-border)) dashed var(--corn-map-collision); animation: none; }
|
|
41
|
+
.hx-run-tag { position: absolute; left: 0; top: calc(var(--r) + 4px); transform: translateX(-50%); white-space: nowrap; padding: calc(var(--corn-space-1) / 2) var(--corn-space-2); border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-map-collision); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-map-collision); font-size: var(--corn-text-xs); font-weight: 700; }
|
|
42
|
+
.hx-run-swatch { display: inline-block; width: 14px; height: 14px; flex: none; box-sizing: border-box; border-radius: 50%; border: var(--corn-border-strong) solid var(--corn-added); }
|
|
43
|
+
.hx-run-swatch--collision { border: var(--corn-border-strong) dashed var(--corn-map-collision); }
|