cornfield 0.42.0 → 0.44.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/color.js +38 -8
- package/core/contrast.js +70 -5
- package/core/delta-e.js +66 -0
- package/core/layers.js +8 -0
- package/core/map-tokens.js +83 -0
- package/core/schema.js +29 -7
- package/core/strings.js +2 -0
- package/core/validate.js +4 -2
- package/explorer/capped.js +6 -5
- package/explorer/cloud-model.js +10 -7
- package/explorer/css-color.js +99 -0
- package/explorer/diff-marks.js +3 -1
- package/explorer/edge-key.js +59 -0
- package/explorer/explorer.css +116 -64
- package/explorer/flows.js +0 -2
- package/explorer/forge-panel.js +2 -3
- package/explorer/glyphs.js +130 -0
- package/explorer/house-model.js +2 -2
- package/explorer/index.html +3 -17
- package/explorer/keyboard-model.js +4 -1
- package/explorer/keyboard.js +14 -2
- package/explorer/kind-letters.js +9 -5
- package/explorer/labels.js +33 -34
- package/explorer/layers.js +93 -34
- package/explorer/main.js +3 -2
- package/explorer/map-style.js +13 -71
- package/explorer/panels.js +92 -7
- package/explorer/render.js +2 -2
- package/explorer/renderer-canvas2d.js +169 -26
- package/explorer/renderer-webgl.js +51 -17
- package/explorer/scene.js +67 -48
- package/explorer/selection-model.js +150 -0
- package/explorer/selection-view.js +36 -0
- package/explorer/shaders.js +76 -13
- package/explorer/spatial.js +7 -4
- package/explorer/state.js +4 -0
- package/explorer/tokens.css +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module explorer/edge-key
|
|
3
|
+
*
|
|
4
|
+
* The Key in the Layers menu (spec 0008 D7): each kind of line drawn as the map draws it, with its real style and end mark, not a coloured dot.
|
|
5
|
+
* A pure function of the constants the renderers draw from (scene.js ARROW, END_SHAPES, USAGE_DASH, PROPOSED_DASH), so the Key and the map
|
|
6
|
+
* cannot drift apart. Every word here is fixed text: nothing from the map reaches it.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { ARROW, END_SHAPES, PROPOSED_DASH, USAGE_DASH } from './scene.js';
|
|
10
|
+
|
|
11
|
+
const W = 44; // the swatch's width and height (px)
|
|
12
|
+
const H = 16;
|
|
13
|
+
const MID = H / 2;
|
|
14
|
+
const X0 = 2;
|
|
15
|
+
const TIP = W - 3;
|
|
16
|
+
|
|
17
|
+
/** The end mark of each family, as SVG path data with its tip at (tx, MID), in the same units the map draws it in (ARROW, END_SHAPES) */
|
|
18
|
+
const mark = (kind, tx) => {
|
|
19
|
+
const back = ARROW.length * Math.cos(ARROW.spread);
|
|
20
|
+
const side = ARROW.length * Math.sin(ARROW.spread);
|
|
21
|
+
if (kind === 'triangle') return `<path d="M${tx} ${MID} L${tx - back} ${MID - side} L${tx - back} ${MID + side} Z" fill="currentColor"/>`;
|
|
22
|
+
if (kind === 'chevron') return `<path d="M${tx - back} ${MID - side} L${tx} ${MID} L${tx - back} ${MID + side}" fill="none" stroke="currentColor" stroke-width="${END_SHAPES.strokeWidth}"/>`;
|
|
23
|
+
if (kind === 'bar') return `<path d="M${tx - 1} ${MID - END_SHAPES.barHalf} V${MID + END_SHAPES.barHalf}" fill="none" stroke="currentColor" stroke-width="${END_SHAPES.strokeWidth}"/>`;
|
|
24
|
+
if (kind === 'diamond') {
|
|
25
|
+
const h = END_SHAPES.diamondHalf;
|
|
26
|
+
const a = END_SHAPES.diamondAcross;
|
|
27
|
+
return `<path d="M${tx} ${MID} L${tx - h} ${MID - a} L${tx - 2 * h} ${MID} L${tx - h} ${MID + a} Z" fill="none" stroke="currentColor" stroke-width="${END_SHAPES.strokeWidth}"/>`;
|
|
28
|
+
}
|
|
29
|
+
return '';
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** A swatch: a line of `width`, with `dash` (or solid), an end mark, and `ticks` across its middle */
|
|
33
|
+
export function keySwatch({ end = null, dash = null, width = 1.6, ticks = 0 } = {}) {
|
|
34
|
+
const stop = end ? TIP - (end === 'triangle' || end === 'chevron' ? 1 : end === 'diamond' ? 2 * END_SHAPES.diamondHalf : 1) : TIP;
|
|
35
|
+
const line = `<path d="M${X0} ${MID} H${stop}" fill="none" stroke="currentColor" stroke-width="${width}"${dash ? ` stroke-dasharray="${dash.join(' ')}"` : ''}/>`;
|
|
36
|
+
let tickPaths = '';
|
|
37
|
+
for (let i = 0; i < ticks; i++) {
|
|
38
|
+
const x = (X0 + stop) / 2 + (i - (ticks - 1) / 2) * END_SHAPES.tickGap;
|
|
39
|
+
tickPaths += `<path d="M${x} ${MID - END_SHAPES.tickHalf} V${MID + END_SHAPES.tickHalf}" fill="none" stroke="currentColor" stroke-width="${END_SHAPES.tickWidth}"/>`;
|
|
40
|
+
}
|
|
41
|
+
return `<svg class="hx-key-line" data-corn="swatch" viewBox="0 0 ${W} ${H}" width="${W}" height="${H}" aria-hidden="true" focusable="false">${line}${tickPaths}${end ? mark(end, TIP) : ''}</svg>`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The rows of the Key: [swatch options, the words] */
|
|
45
|
+
export const KEY_ROWS = Object.freeze([
|
|
46
|
+
[{ width: 1.4 }, 'Owns: a parent and what it holds'],
|
|
47
|
+
[{ dash: USAGE_DASH, width: 1.6 }, 'Uses loosely: dotted'],
|
|
48
|
+
[{ dash: PROPOSED_DASH, end: 'chevron' }, 'Proposed, not built: dashed, with its kind’s mark'],
|
|
49
|
+
[{ end: 'chevron' }, 'Data: flow, reads, writes (towards the page is a read)'],
|
|
50
|
+
[{ end: 'triangle' }, 'Services: calls, triggers, delivers'],
|
|
51
|
+
[{ end: 'bar' }, 'Places: runs on'],
|
|
52
|
+
[{ end: 'diamond' }, 'Tokens: uses, extends'],
|
|
53
|
+
]);
|
|
54
|
+
|
|
55
|
+
/** The Key's markup (the section's own title and its rows) */
|
|
56
|
+
export function edgeKeyHtml() {
|
|
57
|
+
const rows = KEY_ROWS.map(([opts, words]) => `<div class="hx-legend-row"><span class="hx-legend-swatch hx-legend-swatch--wide">${keySwatch(opts)}</span><span>${words}</span></div>`).join('');
|
|
58
|
+
return `<div class="hx-menu-title" data-corn="menu-title"><span>Key</span></div>${rows}<p class="hx-faint hx-key-note">A line says its kind in words when it is lit.</p>`;
|
|
59
|
+
}
|
package/explorer/explorer.css
CHANGED
|
@@ -93,47 +93,47 @@ h1, h2, h3, p { margin: 0; }
|
|
|
93
93
|
.hx-only-mobile { display: inline-flex; }
|
|
94
94
|
|
|
95
95
|
/* The brand: logo and wordmark; a click resets the view */
|
|
96
|
-
.hx-brand { display: flex; align-items: center; gap: var(--corn-space-3); flex: none; min-width:
|
|
97
|
-
.hx-title { font-size: var(--corn-text-base); font-weight:
|
|
96
|
+
.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; }
|
|
97
|
+
.hx-title { font-size: var(--corn-text-base); font-weight: 600; letter-spacing: -0.01em; color: var(--corn-text); }
|
|
98
98
|
.hx-mark { flex: none; }
|
|
99
99
|
.hx-mark-bg { fill: var(--corn-accent); }
|
|
100
100
|
.hx-mark-fg { fill: var(--corn-text-on-accent); }
|
|
101
101
|
.hx-mark-line { fill: none; stroke: var(--corn-text-on-accent); stroke-width: 1.5; }
|
|
102
102
|
|
|
103
103
|
/* The View switch: Map, Flow and House (aria-pressed says which is on), and Fit at its end */
|
|
104
|
-
.hx-view { display: inline-flex; align-items: center; flex: none; padding: var(--corn-space-1); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); }
|
|
105
|
-
.hx-view-btn, .hx-view-fit { display: inline-flex; align-items: center; justify-content: center; height:
|
|
104
|
+
.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); }
|
|
105
|
+
.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; }
|
|
106
106
|
.hx-view-btn { padding: 0 var(--corn-space-4); }
|
|
107
107
|
.hx-view-btn:hover, .hx-view-fit:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
108
108
|
.hx-view-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent); font-weight: 600; }
|
|
109
|
-
.hx-view-fit { width:
|
|
109
|
+
.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); }
|
|
110
110
|
|
|
111
111
|
/* The Layers chip: "Layers · 13 of 20" */
|
|
112
|
-
.hx-layers-chip { display: inline-flex; align-items: center; gap: var(--corn-space-1); height:
|
|
112
|
+
.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; }
|
|
113
113
|
.hx-layers-chip:hover, .hx-layers-chip[aria-expanded="true"] { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
114
114
|
.hx-layers-count { color: var(--corn-text-3); }
|
|
115
115
|
.hx-layers-chip--dim { border-color: var(--corn-line-soft); }
|
|
116
116
|
.hx-layers-chip--dim, .hx-layers-chip--dim .hx-layers-count { color: var(--corn-text-3); }
|
|
117
117
|
|
|
118
118
|
/* Search: the field with its key hint (a desktop's), an icon on a phone */
|
|
119
|
-
.hx-search { display: none; align-items: center; gap: var(--corn-space-3); width: 260px; min-width: 120px; height:
|
|
119
|
+
.hx-search { display: none; align-items: center; gap: var(--corn-space-3); width: 260px; min-width: 120px; height: var(--hx-control-h); 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
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); }
|
|
124
124
|
.hx-kbd { flex: none; padding: 0 var(--corn-space-1); border-radius: var(--corn-radius-xs); border: var(--corn-border) solid var(--corn-line); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); color: var(--corn-text-3); }
|
|
125
125
|
.hx-search:focus-within .hx-kbd { display: none; }
|
|
126
|
-
.hx-hdr-icon { align-items: center; justify-content: center; width:
|
|
126
|
+
.hx-hdr-icon { align-items: center; justify-content: center; width: var(--hx-control-h); height: var(--hx-control-h); padding: 0; border: 0; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text-2); }
|
|
127
127
|
.hx-hdr-icon:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
128
128
|
|
|
129
129
|
/* The Work toggle: opens the Work panel (forge-panel.js says in the tag which pull request is lit) */
|
|
130
|
-
.hx-work { display: inline-flex; align-items: center; gap: var(--corn-space-2); height:
|
|
130
|
+
.hx-work { display: inline-flex; align-items: center; gap: var(--corn-space-2); 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); 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
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
|
-
.hx-account-btn { display: inline-flex; align-items: center; gap: var(--corn-space-3); height:
|
|
136
|
+
.hx-account-btn { display: inline-flex; align-items: center; gap: var(--corn-space-3); height: var(--hx-control-h); 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
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; }
|
|
@@ -145,11 +145,11 @@ h1, h2, h3, p { margin: 0; }
|
|
|
145
145
|
.hx-account-row { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); padding: var(--corn-space-1) var(--corn-space-4); }
|
|
146
146
|
.hx-account-label { color: var(--corn-text-2); }
|
|
147
147
|
.hx-account-seg { display: inline-flex; padding: calc(var(--corn-space-1) / 2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); }
|
|
148
|
-
.hx-account-seg-btn { height:
|
|
148
|
+
.hx-account-seg-btn { height: var(--hx-seg-inner); padding: 0 var(--corn-space-3); border: 0; border-radius: var(--corn-radius-xs); background: transparent; color: var(--corn-text-2); font-size: var(--corn-text-xs); font-weight: 500; }
|
|
149
149
|
.hx-account-seg-btn:hover { color: var(--corn-text); }
|
|
150
150
|
.hx-account-seg-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent); font-weight: 600; }
|
|
151
|
-
.hx-account-select { display: block; width: calc(100% - var(--corn-space-5)); height:
|
|
152
|
-
.hx-account-item { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); width: 100%; min-height:
|
|
151
|
+
.hx-account-select { display: block; width: calc(100% - var(--corn-space-5)); height: var(--hx-control-h); margin: 0 var(--corn-space-3); padding: 0 var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); }
|
|
152
|
+
.hx-account-item { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); width: 100%; min-height: var(--hx-control-h); padding: 0 var(--corn-space-4); border: 0; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text); font-size: var(--corn-text-sm); text-align: left; text-decoration: none; }
|
|
153
153
|
.hx-account-item:hover { background: var(--corn-surface-3); }
|
|
154
154
|
.hx-account-item--sub { padding-left: var(--corn-space-6); color: var(--corn-text-2); }
|
|
155
155
|
.hx-account-item svg { flex: none; color: var(--corn-text-3); }
|
|
@@ -174,7 +174,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
174
174
|
.hx-header { height: 52px; padding: 0 var(--corn-space-5); gap: var(--corn-space-5); }
|
|
175
175
|
.hx-header-left { gap: var(--corn-space-5); }
|
|
176
176
|
.hx-header-right { gap: var(--corn-space-3); }
|
|
177
|
-
.hx-brand { min-width: 0; min-height:
|
|
177
|
+
.hx-brand { min-width: 0; min-height: var(--hx-control-h); }
|
|
178
178
|
.hx-only-wide { display: inline; }
|
|
179
179
|
.hx-only-mobile { display: none; }
|
|
180
180
|
.hx-search { display: flex; flex: 0 1 260px; width: auto; }
|
|
@@ -193,21 +193,21 @@ h1, h2, h3, p { margin: 0; }
|
|
|
193
193
|
.hx-header-left::-webkit-scrollbar { display: none; }
|
|
194
194
|
.hx-header-right { gap: var(--corn-space-1); }
|
|
195
195
|
.hx-view { padding: 0; }
|
|
196
|
-
.hx-view-btn { min-width:
|
|
197
|
-
.hx-view-fit { position: absolute; top: calc(100% + var(--corn-space-4)); right: var(--corn-space-4); width:
|
|
196
|
+
.hx-view-btn { min-width: var(--hx-control-h); height: var(--hx-seg-inner); padding: 0 var(--corn-space-2); }
|
|
197
|
+
.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); }
|
|
198
198
|
.hx-header .hx-layers { position: absolute; top: calc(100% + var(--corn-space-4)); left: var(--corn-space-4); }
|
|
199
|
-
.hx-layers-chip { height:
|
|
199
|
+
.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); }
|
|
200
200
|
/* The live chip sits on the map too, left of Fit */
|
|
201
|
-
.hx-header .hx-live { position: absolute; top: calc(100% + var(--corn-space-4)); right: calc(var(--corn-space-4) + var(--corn-space-3) +
|
|
202
|
-
.hx-work { height:
|
|
201
|
+
.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)); }
|
|
202
|
+
.hx-work { height: var(--hx-control-h); min-width: var(--hx-control-h); justify-content: center; padding: 0 var(--corn-space-3); }
|
|
203
203
|
.hx-forge-lit { display: none; }
|
|
204
|
-
.hx-account-btn { width:
|
|
204
|
+
.hx-account-btn { width: var(--hx-control-h); height: var(--hx-control-h); justify-content: center; padding: 0; border: 0; background: none; }
|
|
205
205
|
.hx-account-caret { display: none; }
|
|
206
206
|
.hx-avatar { width: 28px; height: 28px; }
|
|
207
207
|
.hx-menu.hx-account-menu { width: min(300px, calc(100vw - 24px)); }
|
|
208
|
-
.hx-account-item, .hx-account-row { min-height:
|
|
209
|
-
.hx-account-seg-btn { height:
|
|
210
|
-
.hx-account-select { height:
|
|
208
|
+
.hx-account-item, .hx-account-row { min-height: var(--hx-control-h); }
|
|
209
|
+
.hx-account-seg-btn { height: var(--hx-seg-inner); padding: 0 var(--corn-space-4); }
|
|
210
|
+
.hx-account-select { height: var(--hx-control-h); }
|
|
211
211
|
.hx-stage .hx-hint { top: 68px; }
|
|
212
212
|
}
|
|
213
213
|
/* ==== end of the header ============================================================================================ */
|
|
@@ -299,8 +299,6 @@ h1, h2, h3, p { margin: 0; }
|
|
|
299
299
|
.hx-legend-label { display: flex; align-items: center; gap: var(--corn-space-3); font-weight: 500; }
|
|
300
300
|
.hx-legend-swatch { width: 16px; flex: none; display: inline-flex; justify-content: center; }
|
|
301
301
|
.hx-swatch-line { display: inline-block; width: 16px; height: 2px; border-radius: var(--corn-radius-xs); }
|
|
302
|
-
.hx-swatch-solid { background: color-mix(in srgb, var(--corn-text) 55%, transparent); }
|
|
303
|
-
.hx-swatch-dashed { height: 0; background: none; border-top: var(--corn-border-strong) dashed var(--corn-text-2); }
|
|
304
302
|
.hx-swatch-indigo { border-top-color: var(--corn-accent-text); }
|
|
305
303
|
|
|
306
304
|
/* ---- stage: canvas, hint, states --------------------------------------------------------- */
|
|
@@ -344,11 +342,10 @@ h1, h2, h3, p { margin: 0; }
|
|
|
344
342
|
}
|
|
345
343
|
.hx-drawer-handle { display: flex; justify-content: center; padding: var(--corn-space-3) 0 var(--corn-space-1); }
|
|
346
344
|
.hx-drawer-handle span { width: 48px; height: 6px; border-radius: var(--corn-radius-pill); background: var(--corn-surface-3); }
|
|
347
|
-
.hx-drawer-body { flex: 1; display: flex; flex-direction: column; gap: var(--corn-space-5); padding:
|
|
348
|
-
@media (min-width: 640px) { .hx-drawer-body { padding: var(--corn-space-6); } }
|
|
345
|
+
.hx-drawer-body { flex: 1; display: flex; flex-direction: column; gap: var(--corn-space-5); padding: var(--corn-panel-pad); overflow-y: auto; user-select: text; }
|
|
349
346
|
.hx-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--corn-space-3); }
|
|
350
347
|
.hx-drawer-title { font-size: var(--corn-text-lg); font-weight: 700; color: var(--corn-text); overflow-wrap: anywhere; }
|
|
351
|
-
.hx-close { width:
|
|
348
|
+
.hx-close { width: var(--hx-control-h); height: var(--hx-control-h); flex: none; border: 0; border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text-3); font-weight: 700; font-size: var(--corn-text-base); }
|
|
352
349
|
.hx-close:hover { color: var(--corn-text); }
|
|
353
350
|
.hx-lead { font-size: var(--corn-text-base); line-height: 1.5; color: var(--corn-text-2); }
|
|
354
351
|
|
|
@@ -369,7 +366,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
369
366
|
.hx-file { padding: calc(var(--corn-space-1) / 2) 0; }
|
|
370
367
|
|
|
371
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); }
|
|
372
|
-
.hx-sandbox-title { display: flex; align-items: center; justify-content: space-between; font-size: var(--corn-text-
|
|
369
|
+
.hx-sandbox-title { display: flex; align-items: center; justify-content: space-between; font-size: var(--corn-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--corn-text-3); }
|
|
373
370
|
.hx-sandbox-name { display: flex; align-items: center; gap: var(--corn-space-2); }
|
|
374
371
|
.hx-sandbox-stage { min-height: 90px; display: flex; align-items: center; justify-content: center; padding: var(--corn-space-5); border-radius: var(--corn-radius-sm); border: var(--corn-border) dashed var(--corn-surface-2); background: var(--corn-ground); overflow-x: auto; }
|
|
375
372
|
.hx-sandbox-controls { display: flex; flex-direction: column; gap: var(--corn-space-2); padding-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line); font-size: var(--corn-text-xs); }
|
|
@@ -385,7 +382,7 @@ h1, h2, h3, p { margin: 0; }
|
|
|
385
382
|
.hx-chip--danger, .hx-chip--success, .hx-chip--warning { color: var(--corn-ground); }
|
|
386
383
|
|
|
387
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); }
|
|
388
|
-
.hx-open { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: var(--corn-space-2); min-height:
|
|
385
|
+
.hx-open { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: var(--corn-space-2); min-height: var(--hx-control-h); 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; }
|
|
389
386
|
.hx-open:hover { background: var(--corn-accent-hover); }
|
|
390
387
|
|
|
391
388
|
/* ---- proposals (proposal.js): picker, bar, marks, panel rows ----------------------------------- */
|
|
@@ -408,13 +405,13 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
408
405
|
.hx-proposal-message { color: var(--corn-text-2); }
|
|
409
406
|
.hx-proposal-bar.is-error .hx-proposal-message { color: var(--corn-bad); }
|
|
410
407
|
.hx-proposal-count:focus-visible, .hx-proposal-mode:focus-visible, .hx-seg-btn:focus-visible, .hx-change-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
411
|
-
.hx-proposal-summary { margin-top: var(--corn-space-2); color: var(--corn-text-2); line-height: 1.
|
|
408
|
+
.hx-proposal-summary { margin-top: var(--corn-space-2); color: var(--corn-text-2); line-height: 1.5; }
|
|
412
409
|
|
|
413
410
|
/* Before / Diff / After */
|
|
414
411
|
.hx-seg { display: inline-flex; padding: calc(var(--corn-space-1) / 2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); }
|
|
415
|
-
.hx-seg-btn { height:
|
|
412
|
+
.hx-seg-btn { height: var(--hx-seg-inner); padding: 0 var(--corn-space-4); border: 0; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text-3); font-size: var(--corn-text-sm); font-weight: 500; }
|
|
416
413
|
.hx-seg-btn:hover { color: var(--corn-text); }
|
|
417
|
-
.hx-seg-btn.is-on, .hx-seg-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent);
|
|
414
|
+
.hx-seg-btn.is-on, .hx-seg-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent); } /* the weight does not change: a heavier word is wider, and Edit and the rest of the bar would move */
|
|
418
415
|
|
|
419
416
|
.hx-proposal-errors { margin-top: var(--corn-space-2); padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); background: color-mix(in srgb, var(--corn-removed) 10%, transparent); border: var(--corn-border) solid color-mix(in srgb, var(--corn-removed) 30%, transparent); color: var(--corn-text-2); }
|
|
420
417
|
.hx-proposal-errors summary { cursor: pointer; color: var(--corn-bad); font-weight: 600; }
|
|
@@ -460,9 +457,9 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
460
457
|
|
|
461
458
|
|
|
462
459
|
|
|
463
|
-
.hx-player .hx-close { width:
|
|
460
|
+
.hx-player .hx-close { width: var(--hx-control-h); height: var(--hx-control-h); font-size: var(--corn-text-sm); }
|
|
464
461
|
|
|
465
|
-
.hx-player-speed { flex: none; height:
|
|
462
|
+
.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; }
|
|
466
463
|
.hx-player-speed:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
467
464
|
.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; }
|
|
468
465
|
.hx-player-who { color: var(--corn-text-2); font-weight: 600; }
|
|
@@ -506,7 +503,7 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
506
503
|
.hx-whatif-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2); }
|
|
507
504
|
.hx-whatif-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--corn-space-1); }
|
|
508
505
|
.hx-whatif-edit { display: flex; align-items: center; gap: var(--corn-space-3); }
|
|
509
|
-
.hx-whatif-edit-text { flex: 1; min-width: 0; line-height: 1.
|
|
506
|
+
.hx-whatif-edit-text { flex: 1; min-width: 0; line-height: 1.4; }
|
|
510
507
|
.hx-whatif-step { display: flex; align-items: flex-start; gap: var(--corn-space-2); padding: var(--corn-space-1); border-radius: var(--corn-radius-sm); }
|
|
511
508
|
.hx-whatif-step.is-current { background: color-mix(in srgb, var(--corn-edit) 18%, transparent); }
|
|
512
509
|
.hx-whatif-num { flex: none; width: 22px; height: 22px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--corn-edit) 30%, transparent); color: var(--corn-text); font-size: var(--corn-text-xs); font-weight: 700; cursor: pointer; }
|
|
@@ -547,10 +544,10 @@ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid v
|
|
|
547
544
|
the current mode (a button that opens the switcher), the note when it is open, and Send back and Approve full
|
|
548
545
|
width, each 44px tall. */
|
|
549
546
|
.hx-proposal-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-3) var(--corn-space-4); }
|
|
550
|
-
.hx-proposal-name { flex: 0 1 auto; min-width: 0; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
547
|
+
.hx-proposal-name { flex: 0 1 auto; min-width: 0; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--corn-text); } /* its size and weight are the shared panel title's ("panel head" at the end of this file) */
|
|
551
548
|
.hx-proposal-counts { display: contents; }
|
|
552
549
|
.hx-proposal-chip { display: inline-flex; align-items: center; flex-wrap: wrap; color: var(--corn-text-2); font-size: var(--corn-text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
553
|
-
.hx-proposal-count { display: inline-flex; align-items: center; padding: var(--corn-space-1) var(--corn-space-2); border: 0; border-radius: var(--corn-radius-sm); background: none; color: inherit; font: inherit; white-space: inherit; cursor: pointer; }
|
|
550
|
+
.hx-proposal-count { display: inline-flex; align-items: center; min-height: var(--hx-control-h); padding: var(--corn-space-1) var(--corn-space-2); border: 0; border-radius: var(--corn-radius-sm); background: none; color: inherit; font: inherit; white-space: inherit; cursor: pointer; }
|
|
554
551
|
.hx-proposal-count:hover { color: var(--corn-text); text-decoration: underline; }
|
|
555
552
|
.hx-proposal-peek { display: none; margin: 0; }
|
|
556
553
|
.hx-proposal-chip .hx-mark-dot { margin: 0 var(--corn-space-2) 0 0; }
|
|
@@ -558,18 +555,18 @@ h2.hx-proposal-name { margin: 0; }
|
|
|
558
555
|
.hx-proposal-sep { margin: 0 var(--corn-space-2); color: var(--corn-text-3); }
|
|
559
556
|
.hx-proposal-mode { display: none; }
|
|
560
557
|
.hx-proposal-tools, .hx-proposal-actions { display: flex; align-items: center; gap: var(--corn-space-3); }
|
|
561
|
-
.hx-proposal-tools .hx-btn { height:
|
|
558
|
+
.hx-proposal-tools .hx-btn { height: var(--hx-control-h); font-size: var(--corn-text-sm); font-weight: 500; }
|
|
562
559
|
#proposal-edit.hx-btn--active { background: var(--corn-edit-text); border-color: var(--corn-edit); color: var(--corn-ground); }
|
|
563
560
|
.hx-proposal-actions { margin-left: auto; }
|
|
564
|
-
.hx-proposal-actions .hx-btn { height:
|
|
561
|
+
.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; }
|
|
565
562
|
.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; }
|
|
566
563
|
.hx-proposal-actions .hx-btn:disabled { opacity: 0.4; cursor: default; }
|
|
567
564
|
.hx-proposal-more { position: relative; }
|
|
568
|
-
.hx-proposal-more .hx-btn--icon { width:
|
|
565
|
+
.hx-proposal-more .hx-btn--icon { width: var(--hx-control-h); height: var(--hx-control-h); border-color: transparent; background: none; color: var(--corn-text-3); }
|
|
569
566
|
.hx-proposal-more .hx-btn--icon:hover, .hx-proposal-more .hx-btn--icon[aria-expanded="true"] { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
570
567
|
.hx-proposal-more-menu { position: absolute; top: 100%; right: 0; z-index: 20; display: flex; flex-direction: column; min-width: 160px; margin-top: var(--corn-space-2); padding: var(--corn-space-2); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); box-shadow: var(--corn-shadow); }
|
|
571
568
|
.hx-proposal-more-menu[hidden] { display: none; }
|
|
572
|
-
.hx-proposal-more-menu .hx-btn { width: 100%; height:
|
|
569
|
+
.hx-proposal-more-menu .hx-btn { width: 100%; height: var(--hx-control-h); border-color: transparent; background: none; color: var(--corn-text-2); font-size: var(--corn-text-sm); }
|
|
573
570
|
.hx-proposal-more-menu .hx-btn:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
574
571
|
|
|
575
572
|
@media (max-width: 767px) {
|
|
@@ -583,13 +580,13 @@ h2.hx-proposal-name { margin: 0; }
|
|
|
583
580
|
.hx-proposal-mode[aria-expanded="true"]::after { transform: rotate(180deg); }
|
|
584
581
|
.hx-seg, .hx-review { grid-column: 1 / -1; order: 3; }
|
|
585
582
|
.hx-proposal-bar:not([data-mode-open="true"]) .hx-seg { display: none; }
|
|
586
|
-
.hx-seg-btn { flex: 1; height:
|
|
583
|
+
.hx-seg-btn { flex: 1; height: var(--hx-seg-inner); font-size: var(--corn-text-md); }
|
|
587
584
|
.hx-proposal-actions { grid-column: 1 / -1; order: 4; display: grid; grid-template-columns: 1fr 1fr; margin-left: 0; gap: var(--corn-space-3); }
|
|
588
585
|
.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); }
|
|
589
586
|
.hx-proposal-tools { order: 5; }
|
|
590
587
|
.hx-proposal-tools .hx-btn { height: auto; min-height: 44px; padding: 0 var(--corn-space-5); font-size: var(--corn-text-md); }
|
|
591
588
|
.hx-proposal-more { display: contents; }
|
|
592
|
-
.hx-proposal-more .hx-btn--icon { order: 6; width:
|
|
589
|
+
.hx-proposal-more .hx-btn--icon { order: 6; width: var(--hx-control-h); height: var(--hx-control-h); }
|
|
593
590
|
.hx-proposal-more-menu { position: static; grid-column: 1 / -1; order: 7; box-shadow: none; }
|
|
594
591
|
.hx-proposal-more-menu .hx-btn { height: auto; min-height: 44px; font-size: var(--corn-text-md); }
|
|
595
592
|
.hx-review .hx-btn, .hx-whatif .hx-btn { min-height: 44px; }
|
|
@@ -670,6 +667,9 @@ h2.hx-proposal-name { margin: 0; }
|
|
|
670
667
|
/* ---- the live layer (live.js, spec 0029): the chip in the toolbar, its menu, and its part of the node panel ---- */
|
|
671
668
|
.hx-live-chip { max-width: 240px; min-width: 0; }
|
|
672
669
|
@media (min-width: 768px) { .hx-live-chip-text { display: inline-block; min-width: 0; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; } }
|
|
670
|
+
/* 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
|
|
671
|
+
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 */
|
|
672
|
+
@media (min-width: 768px) and (max-width: 1023px) { .hx-live-chip-text { display: none; } }
|
|
673
673
|
.hx-live-chip-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--corn-text-3); }
|
|
674
674
|
.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); }
|
|
675
675
|
.hx-live[data-tone="stale"] .hx-live-chip-dot { background: var(--corn-changed); }
|
|
@@ -679,7 +679,7 @@ h2.hx-proposal-name { margin: 0; }
|
|
|
679
679
|
.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; }
|
|
680
680
|
.hx-live-line--main { color: var(--corn-text); font-weight: 600; }
|
|
681
681
|
.hx-live-row { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); margin-top: var(--corn-space-3); }
|
|
682
|
-
.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.
|
|
682
|
+
.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; }
|
|
683
683
|
.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; }
|
|
684
684
|
.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; }
|
|
685
685
|
/* The token field (live.js): shown while the live layer is off for want of a token */
|
|
@@ -714,12 +714,6 @@ h2.hx-proposal-name { margin: 0; }
|
|
|
714
714
|
.hx-player-as[hidden], .hx-player-verdict[hidden], .hx-player-check[hidden] { display: none; }
|
|
715
715
|
|
|
716
716
|
/* ---- cloud nodes (spec 0031, CLOUD-06): the panel's badges, plan and Used by; the `when` line styles -- */
|
|
717
|
-
/* The `when` swatches mirror cloud-model.js WHEN_STYLES (run solid, deploy dashed, renew dotted; red, amber, violet) */
|
|
718
|
-
.hx-swatch-when { width: 18px; height: 2px; border-radius: 0; color: var(--corn-text-2); background: currentColor; }
|
|
719
|
-
.hx-swatch-when--run { color: var(--corn-removed); }
|
|
720
|
-
.hx-swatch-when--deploy { color: var(--corn-changed); background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 8px); }
|
|
721
|
-
.hx-swatch-when--renew { color: var(--corn-edit); background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px); }
|
|
722
|
-
.hx-swatch-when--plain { color: var(--corn-text-2); } /* the legend: the map draws every call in the calls colour, so only the pattern is the key */
|
|
723
717
|
.hx-cloud-browser { color: var(--corn-text-3); font-size: var(--corn-text-sm); }
|
|
724
718
|
|
|
725
719
|
/* ---- a panel glyph (MAP-01) ----------------------------------------------------------------------
|
|
@@ -761,8 +755,7 @@ h2.hx-proposal-name { margin: 0; }
|
|
|
761
755
|
.hx-forge[data-sheet-state="peek"] .hx-forge-head { padding-bottom: 0; border-bottom: 0; }
|
|
762
756
|
.hx-forge[data-sheet-state="peek"] .hx-forge-head .hx-btn { display: none; }
|
|
763
757
|
}
|
|
764
|
-
.hx-forge-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-4); padding:
|
|
765
|
-
@media (min-width: 640px) { .hx-forge-body { padding: var(--corn-space-6) calc(var(--corn-space-5) + var(--corn-space-1)); } }
|
|
758
|
+
.hx-forge-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-4); padding: var(--corn-panel-pad); overflow-y: auto; user-select: text; font-size: var(--corn-text-sm); }
|
|
766
759
|
.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); }
|
|
767
760
|
.hx-forge-head .hx-drawer-title { flex: 1; min-width: 0; }
|
|
768
761
|
.hx-forge-status, .hx-forge-rate { font-size: var(--corn-text-xs); line-height: 1.5; }
|
|
@@ -770,7 +763,7 @@ h2.hx-proposal-name { margin: 0; }
|
|
|
770
763
|
/* The tabs, in the order of the loop: underlined here, pills that scroll sideways on a phone (below) */
|
|
771
764
|
.hx-forge-tabs { display: flex; gap: calc(var(--corn-space-1) / 2); margin: 0 calc(var(--corn-space-4) * -1); padding: 0 var(--corn-space-4); border-bottom: var(--corn-border) solid var(--corn-line); overflow-x: auto; scrollbar-width: none; }
|
|
772
765
|
.hx-forge-tabs::-webkit-scrollbar { display: none; }
|
|
773
|
-
.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; }
|
|
766
|
+
.hx-forge-tab { flex: none; display: inline-flex; align-items: baseline; min-height: var(--hx-control-h); 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; }
|
|
774
767
|
.hx-forge-tab:hover { color: var(--corn-text); }
|
|
775
768
|
.hx-forge-tab[aria-pressed="true"] { border-bottom-color: var(--corn-accent); color: var(--corn-text); font-weight: 600; }
|
|
776
769
|
.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); }
|
|
@@ -976,7 +969,6 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
976
969
|
.hx-kicker [data-corn="badge"] { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
|
|
977
970
|
#drawer-host { white-space: pre; } /* the kicker is a flex row, which drops a leading space: keep " · host" */
|
|
978
971
|
.hx-diffpill { margin-left: var(--corn-space-3); padding: 0 var(--corn-space-3); border-radius: var(--corn-radius-pill); border: var(--corn-border) dashed var(--corn-added); color: var(--corn-added-text); font-size: var(--corn-text-xs); }
|
|
979
|
-
.hx-drawer-id .hx-drawer-title { font-size: var(--corn-text-xl); font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
|
|
980
972
|
.hx-drawer-id .hx-drawer-title.hx-mono { font-family: var(--corn-mono); }
|
|
981
973
|
.hx-facts { display: flex; flex-direction: column; gap: var(--corn-space-2); }
|
|
982
974
|
.hx-fact { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--corn-space-4); }
|
|
@@ -1011,7 +1003,7 @@ a.hx-forge-row:hover, button.hx-forge-row:hover { background: var(--corn-surface
|
|
|
1011
1003
|
.hx-diff-v { min-width: 0; overflow-wrap: anywhere; }
|
|
1012
1004
|
.hx-drawer .hx-why { margin: 0; }
|
|
1013
1005
|
.hx-drawer-foot .hx-open[hidden], .hx-drawer-foot .hx-foot-btn[hidden] { display: none; }
|
|
1014
|
-
.hx-foot-btn { min-height:
|
|
1006
|
+
.hx-foot-btn { min-height: var(--hx-control-h); padding: 0 var(--corn-space-4); justify-content: center; }
|
|
1015
1007
|
@media (max-width: 767px) {
|
|
1016
1008
|
/* a phone: the sheet's actions are full width at the foot, each a 44px target */
|
|
1017
1009
|
.hx-drawer-foot { flex-direction: column; }
|
|
@@ -1164,8 +1156,7 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1164
1156
|
.hx-forge-empty { line-height: 1.5; }
|
|
1165
1157
|
|
|
1166
1158
|
/* 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 */
|
|
1167
|
-
.hx-forge-body { --hx-forge-pad:
|
|
1168
|
-
@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)); } }
|
|
1159
|
+
.hx-forge-body { --hx-forge-pad: var(--corn-panel-pad); --hx-forge-padx: var(--corn-panel-pad); }
|
|
1169
1160
|
.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 */
|
|
1170
1161
|
.hx-forge-top .hx-forge-tabs { margin: 0 calc(var(--hx-forge-padx) * -1); padding: 0 var(--hx-forge-padx); }
|
|
1171
1162
|
/* 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 */
|
|
@@ -1201,7 +1192,7 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1201
1192
|
/* On a phone the list is in the search bar, under the sheets (the dock, 45): while it is open the bar is over them, so a proposal's or the
|
|
1202
1193
|
Work sheet never covers rows of it. Without :has() the list stays under the sheets, as the bar always was */
|
|
1203
1194
|
.hx-mobile-search:has(.hx-search-results:not([hidden])) { z-index: 46; }
|
|
1204
|
-
.hx-search-group-title { position: sticky; top: 0; display: flex; justify-content: space-between; gap: var(--corn-space-3); padding: var(--corn-space-2) var(--corn-space-3) var(--corn-space-1); background: var(--corn-ground); color: var(--corn-text-3); font-size: var(--corn-text-2xs); font-weight:
|
|
1195
|
+
.hx-search-group-title { position: sticky; top: 0; display: flex; justify-content: space-between; gap: var(--corn-space-3); padding: var(--corn-space-2) var(--corn-space-3) var(--corn-space-1); background: var(--corn-ground); color: var(--corn-text-3); font-size: var(--corn-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
1205
1196
|
.hx-search-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--corn-space-3); width: 100%; min-height: 28px; padding: var(--corn-space-1) var(--corn-space-3); border: 0; border-left: var(--corn-border-strong) solid transparent; background: none; color: var(--corn-text); font: inherit; text-align: left; cursor: pointer; }
|
|
1206
1197
|
.hx-search-row:hover, .hx-search-row:focus-visible { background: var(--corn-surface-3); }
|
|
1207
1198
|
.hx-search-row[aria-current="true"] { border-left-color: var(--corn-accent); background: var(--corn-accent-soft); }
|
|
@@ -1245,19 +1236,19 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1245
1236
|
.hx-rc-h { flex: none; }
|
|
1246
1237
|
.hx-rc-tabs { display: flex; gap: var(--corn-space-2); }
|
|
1247
1238
|
.hx-rc-tabs[hidden] { display: none; }
|
|
1248
|
-
.hx-rc-tab { flex: 1; min-height:
|
|
1239
|
+
.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; }
|
|
1249
1240
|
.hx-rc-tab[aria-selected="true"] { background: var(--corn-accent); border-color: var(--corn-accent); color: var(--corn-text-on-accent); }
|
|
1250
1241
|
.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); }
|
|
1251
1242
|
.hx-rc-section[hidden] { display: none; }
|
|
1252
|
-
.hx-rc-h { margin: 0 0 var(--corn-space-2); font-size: var(--corn-text-sm); font-weight:
|
|
1243
|
+
.hx-rc-h { margin: 0 0 var(--corn-space-2); font-size: var(--corn-text-sm); font-weight: 700; color: var(--corn-text); }
|
|
1253
1244
|
.hx-rc-h [data-corn="count"] { color: var(--corn-text-3); font-variant-numeric: tabular-nums; }
|
|
1254
|
-
.hx-rc-empty, .hx-rc-note, .hx-rc-coverage { margin: var(--corn-space-2) 0 0; line-height: 1.
|
|
1245
|
+
.hx-rc-empty, .hx-rc-note, .hx-rc-coverage { margin: var(--corn-space-2) 0 0; line-height: 1.5; }
|
|
1255
1246
|
.hx-rc-coverage { color: var(--corn-text-2); }
|
|
1256
1247
|
.hx-change-list, .hx-sc-list, .hx-steps { margin: 0; padding: 0; list-style: none; }
|
|
1257
1248
|
.hx-change-list { display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
1258
1249
|
.hx-persona { margin-top: var(--corn-space-4); }
|
|
1259
1250
|
.hx-persona:first-of-type { margin-top: 0; }
|
|
1260
|
-
.hx-persona-name { margin: 0 0 var(--corn-space-1); font-size: var(--corn-text-xs); font-weight:
|
|
1251
|
+
.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 */
|
|
1261
1252
|
.hx-sc-list { display: flex; flex-direction: column; gap: var(--corn-space-1); }
|
|
1262
1253
|
.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; }
|
|
1263
1254
|
.hx-sc-row:hover { background: color-mix(in srgb, var(--corn-accent-hover) 18%, transparent); }
|
|
@@ -1421,8 +1412,36 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1421
1412
|
.hx-dock > .hx-drawer[data-sheet-state="expanded"], .hx-dock > .hx-forge[data-sheet-state="expanded"] { max-height: min(var(--hx-sheet-cap, 60dvh), 60dvh); }
|
|
1422
1413
|
}
|
|
1423
1414
|
|
|
1415
|
+
/* ---------------------------------------------------------------------------
|
|
1416
|
+
The node panel's lines (spec 0008 D5 and D6): the lit lines by kind, the switch, and Frame them
|
|
1417
|
+
--------------------------------------------------------------------------- */
|
|
1418
|
+
.hx-lines { display: flex; flex-direction: column; gap: var(--corn-space-2); }
|
|
1419
|
+
.hx-lines .hx-chips { padding-top: 0; }
|
|
1420
|
+
.hx-lines-kind { display: inline-flex; align-items: baseline; gap: var(--corn-space-1); min-height: 28px; padding: 0 var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-pill); background: none; color: var(--corn-text-2); font: inherit; font-size: var(--corn-text-xs); font-weight: 600; cursor: pointer; }
|
|
1421
|
+
.hx-lines-kind:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
1422
|
+
.hx-lines-kind[aria-pressed="true"] { border-color: var(--corn-accent); background: var(--corn-accent-soft); color: var(--corn-accent-text); }
|
|
1423
|
+
.hx-lines-kind:focus-visible, .hx-lines-switch input:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
1424
|
+
.hx-lines-count { font-variant-numeric: tabular-nums; color: var(--corn-text-3); }
|
|
1425
|
+
.hx-lines-list { display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--corn-space-1) / 2); }
|
|
1426
|
+
.hx-lines-list .hx-linkbtn { margin-left: 0; text-align: left; overflow-wrap: anywhere; }
|
|
1427
|
+
.hx-lines-switch { display: flex; align-items: center; gap: var(--corn-space-2); min-height: 28px; font-size: var(--corn-text-sm); color: var(--corn-text-2); cursor: pointer; }
|
|
1428
|
+
.hx-lines-reach { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-3); font-size: var(--corn-text-sm); color: var(--corn-text-2); font-variant-numeric: tabular-nums; }
|
|
1429
|
+
@media (max-width: 767px), (pointer: coarse) {
|
|
1430
|
+
.hx-lines-kind, .hx-lines-switch, .hx-lines-list .hx-linkbtn, .hx-lines-reach .hx-btn { min-height: 44px; }
|
|
1431
|
+
.hx-lines-kind { align-items: center; } /* in a 44px chip the words sit in the middle, not at the top */
|
|
1432
|
+
.hx-lines-switch input { width: 24px; height: 24px; }
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
/* ---------------------------------------------------------------------------
|
|
1436
|
+
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
|
|
1437
|
+
and mark, never by colour alone, so the swatches are one ink; a `when` is told by ticks (cloud-model.js WHEN_STYLES)
|
|
1438
|
+
--------------------------------------------------------------------------- */
|
|
1439
|
+
.hx-legend-swatch--wide { width: 44px; justify-content: flex-start; color: var(--corn-text-2); }
|
|
1440
|
+
.hx-key-line { display: block; overflow: visible; }
|
|
1441
|
+
.hx-key-note { margin: var(--corn-space-1) 0 0; font-size: var(--corn-text-xs); }
|
|
1442
|
+
|
|
1424
1443
|
/* ===== Spec 0007: the decision. The line above Approve, the question asked in place, the hold with Undo, a landing that waits, what a send back carried ===== */
|
|
1425
|
-
.hx-decision-line { margin: 0; color: var(--corn-text-2); font-size: var(--corn-text-sm); line-height: 1.
|
|
1444
|
+
.hx-decision-line { margin: 0; color: var(--corn-text-2); font-size: var(--corn-text-sm); line-height: 1.5; }
|
|
1426
1445
|
.hx-decision-line[hidden], .hx-review-ask[hidden], .hx-hold[hidden], .hx-review-landing[hidden], .hx-sent-edits[hidden] { display: none; }
|
|
1427
1446
|
.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; }
|
|
1428
1447
|
.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); }
|
|
@@ -1447,3 +1466,36 @@ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(
|
|
|
1447
1466
|
.hx-whatif-row [aria-disabled="true"] { opacity: 0.55; cursor: default; }
|
|
1448
1467
|
.hx-runner-dot { display: inline-block; width: 8px; height: 8px; margin-left: var(--corn-space-1); border-radius: 50%; background: var(--corn-warn); vertical-align: middle; }
|
|
1449
1468
|
.hx-runner-dot[hidden] { display: none; }
|
|
1469
|
+
/* ---- Layers menu: a dot's outline and a kind's swatch (issue #229) ---- */
|
|
1470
|
+
/* 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 */
|
|
1471
|
+
.hx-dot.is-ringed { outline: var(--corn-border) solid var(--hx-dot-ring, var(--corn-text-3)); outline-offset: 0; }
|
|
1472
|
+
/* The swatch before a kind's letters: the theme's --corn-map-kind-<type>-<kind>; decoration, the letters and the name stay */
|
|
1473
|
+
.hx-kind-swatch { margin-inline-end: calc(var(--corn-space-1) * -1); }
|
|
1474
|
+
.hx-kind-swatch.is-blank { visibility: hidden; }
|
|
1475
|
+
/* ---- end: Layers menu dots ---- */
|
|
1476
|
+
|
|
1477
|
+
/* ==== one panel head, one control height, one title (issue #200, F53 of the 0.34 design review) ==========================================
|
|
1478
|
+
The measured scatter was values that sit between two steps, or that three places chose differently: a panel title of 14, 15 and 20px, controls of
|
|
1479
|
+
24 to 36px in one bar, paddings of 20 and 24px on two panels that sit side by side. They now share the tokens --corn-control-height,
|
|
1480
|
+
--corn-panel-pad and --corn-panel-head-height (docs/theming.md, "Density"). No rule here is more specific than one class (an ancestor is in :where()),
|
|
1481
|
+
so a theme's [data-corn] rule, loaded later, still wins.
|
|
1482
|
+
The rules read --hx-control-h, the token on a desk and never under 44px on a phone: a brand that sets --corn-control-height on :root (which also
|
|
1483
|
+
overrides tokens.css's phone value) cannot take a phone's targets under 44px; one that sets it higher than 44px gets its height on a phone too.
|
|
1484
|
+
A segmented control (View, Before / Diff / After, the theme choice) is the control height outside; its buttons are that less the frame
|
|
1485
|
+
(the padding and the two borders), or the full height on a phone, where each button is the 44px target and the frame is outside it. */
|
|
1486
|
+
:root { --hx-control-h: var(--corn-control-height); }
|
|
1487
|
+
@media (max-width: 767px) { :root { --hx-control-h: max(44px, var(--corn-control-height)); } }
|
|
1488
|
+
:root { --hx-seg-inner: calc(var(--hx-control-h) - var(--corn-space-1) - 2 * var(--corn-border)); }
|
|
1489
|
+
@media (max-width: 767px) { :root { --hx-seg-inner: var(--hx-control-h); } }
|
|
1490
|
+
|
|
1491
|
+
/* The title of a panel: the Work panel, the node panel, the proposal bar, a detail in the Work panel and a dialog are one style. A node's name is long and
|
|
1492
|
+
often a path, so it wraps (overflow-wrap) in this size rather than being set larger than the panel's own words. */
|
|
1493
|
+
.hx-drawer-title, .hx-forge-detail-title, .hx-forge-notes-title, .hx-confirm-title, .hx-proposal-name { font-size: var(--corn-text-lg); font-weight: 700; line-height: 1.25; letter-spacing: normal; }
|
|
1494
|
+
|
|
1495
|
+
/* The head of a panel: its title row. The Work panel and the node panel start at one edge (the padding is --corn-panel-pad) and the head is at least this tall */
|
|
1496
|
+
.hx-forge-head, .hx-drawer-head { min-height: var(--corn-panel-head-height); }
|
|
1497
|
+
|
|
1498
|
+
/* The controls of a bar that had no height of their own */
|
|
1499
|
+
/* (the waiting line's Answer is in the proposal bar too, so it is the bar's height; it is a strip's action elsewhere, at its own size) */
|
|
1500
|
+
:where(.hx-forge-head, .hx-player-controls, .hx-player-as, .hx-proposal-bar .hx-waiting-line) .hx-btn, :where(.hx-header) .hx-live-chip { height: var(--hx-control-h); }
|
|
1501
|
+
/* ==== end of the panel head and control height ============================================================================================ */
|
package/explorer/flows.js
CHANGED
|
@@ -142,8 +142,6 @@ export function renderFlowLegend() {
|
|
|
142
142
|
<span>Data Flow</span>
|
|
143
143
|
</div>
|
|
144
144
|
${Object.values(FLOW_STYLES).map((s) => row(`<span data-corn="swatch" class="hx-swatch-line" style="background:${themed(s.color, state.theme)}"></span>`, s.label)).join('')}
|
|
145
|
-
${row('<span data-corn="swatch" class="hx-swatch-line hx-swatch-solid"></span>', '<span class="hx-faint">Solid: live today</span>')}
|
|
146
|
-
${row('<span data-corn="swatch" class="hx-swatch-line hx-swatch-dashed"></span>', '<span class="hx-faint">Dashed: proposed</span>')}
|
|
147
145
|
</div>`;
|
|
148
146
|
}
|
|
149
147
|
|
package/explorer/forge-panel.js
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
import { state, nodeById, escHtml, touchScene, onSceneTouch } from './state.js';
|
|
70
70
|
import { render, isNodeVisible } from './render.js';
|
|
71
71
|
import { selectNode, repaintThreads } from './panels.js';
|
|
72
|
-
import { announce
|
|
72
|
+
import { announce } from './keyboard.js';
|
|
73
73
|
import { trapTab } from './focusables.js';
|
|
74
74
|
import { isPhone, registerSheet, expandSheet, collapseSheet, showSheet, refreshStubs } from './sheets.js';
|
|
75
75
|
import { relativeTime } from './review-model.js';
|
|
@@ -2349,8 +2349,7 @@ function onClick(e) {
|
|
|
2349
2349
|
if (nodeBtn) {
|
|
2350
2350
|
const node = nodeById(nodeBtn.dataset.forgeNode);
|
|
2351
2351
|
if (!node) return;
|
|
2352
|
-
selectNode(node);
|
|
2353
|
-
centreOn(node);
|
|
2352
|
+
selectNode(node, { frame: true });
|
|
2354
2353
|
if (isPhone()) collapseSheet('forge'); // the map and the node's sheet are what is wanted now
|
|
2355
2354
|
announce(`${node.label}, ${node.type}`);
|
|
2356
2355
|
return;
|