@floless/app 0.128.1 → 0.129.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.
@@ -4,14 +4,71 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Steel Filter</title>
7
+ <!-- Mirrors the shell's light/dark choice onto this document's <html> — see web/frame-theme.js for
8
+ why it reads localStorage rather than being poked by the parent. Classic, non-deferred and in
9
+ <head> on purpose: the attribute has to land before first paint or a light user sees a dark flash. -->
10
+ <script src="./frame-theme.js"></script>
7
11
  <style>
8
- :root{--bg:#0f172a;--panel:#1e293b;--line:#334155;--text:#e2e8f0;--mut:#94a3b8;--brand:#3b82f6}
12
+ /* THE CHROME follows the app theme; THE DRAWING SURFACE does not — the two halves of this palette.
13
+ Everything a user reads as app furniture (header, filter rail, buttons, popovers, tooltips,
14
+ scrollbars) is themed below. The stage is deliberately dark in BOTH themes: the linework is
15
+ painted in PALETTE (bright blue/cyan/amber/mint, see the script) over a raster context held at
16
+ opacity .28, both of which are tuned for a dark ground and become unreadable on white. Flipping
17
+ the stage means re-deriving that whole drawing palette — a separate piece of work, and #602's
18
+ reporter names keeping it dark as the acceptable choice as long as it is a deliberate one.
19
+ One carve-out, and it is the same rule rather than an exception to it: the EMPTY state has no
20
+ linework on it, so nothing there justifies a dark ground and #empty follows the theme. */
21
+ :root{
22
+ color-scheme:dark; /* so the UA-drawn bits we do not style (selection, the pre-CSS canvas) agree */
23
+ --bg:#0f172a;--panel:#1e293b;--line:#334155;--text:#e2e8f0;--mut:#94a3b8;--brand:#3b82f6;
24
+ --brand-ink:#fff; /* text/glyphs on a --brand fill */
25
+ --brand-hover:#2f6fe0;
26
+ --btn:#334155; /* secondary button fill, and the option-row hover that matches it */
27
+ --btn-hover:#475569;
28
+ --ctrl-border:#475569; /* button, field and checkbox borders */
29
+ --scroll:#475569;--scroll-hover:#5b6b85;
30
+ --shadow-lg:0 8px 24px rgba(0,0,0,.5); /* popovers */
31
+ /* The tooltip keeps its own, SMALLER treatment on purpose: it is the same control on four surfaces
32
+ (steel-editor.html, vector-editor.html, vector-3d.html all ship 0 8px 22px), so folding it into
33
+ --shadow-lg would silently de-sync this one page from the other three. */
34
+ --shadow-tip:0 8px 22px rgba(0,0,0,.5);
35
+ --warn:#f59e0b;--ok:#34d399;--err:#f87171;
36
+ --cyan:#22d3ee;--cyan-soft:rgba(34,211,238,.10);
37
+ --empty-bg:#0f172a; /* the empty state covers the stage — in dark, the stage's own colour */
38
+ /* THE DARK ISLAND. The stage keeps its own furniture, in BOTH themes: a light zoom bar over a dark
39
+ drawing would put --text (near-black in light) on a --btn fill nobody re-tinted, and its shadow
40
+ would vanish. Pinning them here is also what makes the dark region read as a deliberate viewer
41
+ rather than a pane that failed to repaint. */
42
+ --stage:#0f172a;--stage-text:#e2e8f0;--stage-panel:#1e293b;--stage-line:#334155;
43
+ --stage-btn:#334155;--stage-btn-hover:#475569;--stage-ctrl:#475569;
44
+ --stage-shadow:0 4px 14px rgba(0,0,0,.45);
45
+ --banner-shadow:0 -4px 18px rgba(0,0,0,.45); /* the conflict bar, thrown UPWARD from the page foot */
46
+ }
47
+ /* Light — the same slate/blue ramp as the shell's [data-theme="light"] (web/app.css), re-expressed
48
+ in this page's token names because a standalone page does not load app.css. No new colours: every
49
+ value here is app.css's own light token or the -700/-800 stop of a ramp it already uses on light. */
50
+ [data-theme="light"]{
51
+ color-scheme:light;
52
+ --bg:#fff;--panel:#f1f5f9;--line:#cbd5e1;--text:#0f172a;--mut:#475569;--brand:#2563eb;
53
+ --brand-hover:#1d4ed8;
54
+ --btn:#e2e8f0;--btn-hover:#cbd5e1;--ctrl-border:#94a3b8;
55
+ --scroll:#cbd5e1;--scroll-hover:#94a3b8;
56
+ --shadow-lg:0 8px 24px rgba(15,23,42,.14);--shadow-tip:0 8px 22px rgba(15,23,42,.14);
57
+ /* Every state colour steps DOWN the ramp, amber included. Amber 500 measures 1.96:1 on --panel,
58
+ and --warn is the "Unsaved ●" dot — the only signal that work is at risk — so keeping it would
59
+ have hidden exactly the state a user must not miss. app.css's light block does the same
60
+ (`.trace .lvl.warn { color: #d97706 }`); this goes one stop further to clear AA at 11-12px. */
61
+ --warn:#b45309;--ok:#15803d;--err:#b91c1c;
62
+ --cyan:#155e75;--cyan-soft:rgba(21,94,117,.10);
63
+ --empty-bg:var(--panel); /* no drawing to justify a dark ground — see #empty */
64
+ --banner-shadow:0 -4px 18px rgba(15,23,42,.14);
65
+ }
9
66
  /* Theme EVERY scrollbar — no native white default may leak (panels, popovers, modal lists). */
10
- *{scrollbar-width:thin;scrollbar-color:#475569 transparent}
67
+ *{scrollbar-width:thin;scrollbar-color:var(--scroll) transparent}
11
68
  *::-webkit-scrollbar{width:10px;height:10px}
12
69
  *::-webkit-scrollbar-track{background:transparent}
13
- *::-webkit-scrollbar-thumb{background:#475569;border-radius:6px;border:2px solid transparent;background-clip:content-box}
14
- *::-webkit-scrollbar-thumb:hover{background:#5b6b85;background-clip:content-box}
70
+ *::-webkit-scrollbar-thumb{background:var(--scroll);border-radius:6px;border:2px solid transparent;background-clip:content-box}
71
+ *::-webkit-scrollbar-thumb:hover{background:var(--scroll-hover);background-clip:content-box}
15
72
  *::-webkit-scrollbar-corner{background:transparent}
16
73
  *{box-sizing:border-box}
17
74
  html,body{height:100%}
@@ -19,14 +76,14 @@ body{margin:0;background:var(--bg);color:var(--text);font:13px system-ui,-apple-
19
76
  header{display:flex;align-items:center;gap:14px;padding:8px 14px;background:var(--panel);border-bottom:1px solid var(--line);flex:none}
20
77
  header b{font-size:14px} header .sp{flex:1}
21
78
  .stat{color:var(--mut);font-size:12px} .stat b{color:var(--text)}
22
- .stat.dirty b{color:#f59e0b} .stat.saved b{color:#34d399} .stat.err b{color:#f87171}
79
+ .stat.dirty b{color:var(--warn)} .stat.saved b{color:var(--ok)} .stat.err b{color:var(--err)}
23
80
  /* Save conflict — the model moved under us. Needs its OWN rule: the other states colour a nested <b>,
24
81
  and this text has none, so without this it rendered in muted grey, indistinguishable from idle. Same
25
82
  cyan "non-default, click to act" chip the sibling editors use — no new colour. */
26
- .stat.conflict{color:#22d3ee;border:1px solid #22d3ee;background:rgba(34,211,238,.10);border-radius:4px;padding:1px 6px;cursor:pointer}
27
- button{background:#334155;color:var(--text);border:1px solid #475569;border-radius:6px;padding:5px 10px;cursor:pointer;font:13px system-ui}
28
- button:hover{background:#475569} button:disabled{opacity:.5;cursor:default}
29
- button.primary{background:var(--brand);border-color:var(--brand);color:#fff} button.primary:hover{background:#2f6fe0}
83
+ .stat.conflict{color:var(--cyan);border:1px solid var(--cyan);background:var(--cyan-soft);border-radius:4px;padding:1px 6px;cursor:pointer}
84
+ button{background:var(--btn);color:var(--text);border:1px solid var(--ctrl-border);border-radius:6px;padding:5px 10px;cursor:pointer;font:13px system-ui}
85
+ button:hover{background:var(--btn-hover)} button:disabled{opacity:.5;cursor:default}
86
+ button.primary{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)} button.primary:hover{background:var(--brand-hover)}
30
87
  button:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
31
88
  /* Sheet switcher — a themed combobox, NOT a native <select>.
32
89
  A <select>'s CLOSED state takes styling fine; its arrow and its option list do not. Those are drawn
@@ -39,14 +96,14 @@ button:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
39
96
  beats the UA's own [hidden] rule by ORIGIN, so without this `sheetCombo.hidden = true` would quietly
40
97
  do nothing. Higher specificity than `.sheet-combo` above, so no !important is needed. */
41
98
  .sheet-combo[hidden]{display:none}
42
- /* Darker than the page's action buttons on purpose (they are #334155): this reads as a FIELD you pick
99
+ /* Set apart from the page's action buttons on purpose (they are --btn): this reads as a FIELD you pick
43
100
  from rather than a button you press — the distinction the native <select> used to carry for free. */
44
101
  /* appearance:none is inert here — the background/border rules below already de-nativize the button in
45
102
  every engine we ship to — but it is stated rather than assumed: `appearance: auto` on this control is
46
103
  the exact signature the QA pass matched on when it caught the <select>, and leaving it reading `auto`
47
104
  would make the next such pass re-raise a defect that is gone. NOT the same case as the checkbox
48
105
  below, whose appearance:none is load-bearing (drop it and a white native box comes back). */
49
- .sheet-trigger{display:inline-flex;align-items:center;gap:6px;min-width:200px;max-width:320px;-webkit-appearance:none;appearance:none;background:var(--bg);border:1px solid #475569;border-radius:6px;padding:5px 8px;font:600 13px system-ui}
106
+ .sheet-trigger{display:inline-flex;align-items:center;gap:6px;min-width:200px;max-width:320px;-webkit-appearance:none;appearance:none;background:var(--bg);border:1px solid var(--ctrl-border);border-radius:6px;padding:5px 8px;font:600 13px system-ui}
50
107
  .sheet-trigger:hover,.sheet-trigger.open{background:var(--bg);border-color:var(--brand)}
51
108
  .sheet-trigger-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
52
109
  .sheet-caret{color:var(--mut);flex:none;transition:transform .15s}
@@ -54,7 +111,7 @@ button:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
54
111
  /* Panel treatment matched to #eye below (8px radius, 0 8px 24px) — this page's own popover idiom, not
55
112
  app.css's larger one, so the two PANEL popovers on this surface read as one family. (#tooltip keeps
56
113
  the smaller cross-page treatment on purpose — it is the same control on four surfaces.) */
57
- .sheet-popover{position:absolute;top:calc(100% + 4px);left:0;min-width:100%;width:max-content;max-width:400px;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.5);z-index:60;animation:sheet-in .14s ease-out}
114
+ .sheet-popover{position:absolute;top:calc(100% + 4px);left:0;min-width:100%;width:max-content;max-width:400px;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow-lg);z-index:60;animation:sheet-in .14s ease-out}
58
115
  /* NOT the same case as .sheet-combo[hidden] above, and the asymmetry is worth naming: .sheet-popover
59
116
  declares no `display`, so the UA [hidden] rule already applies unopposed and this is redundant TODAY.
60
117
  It stays as insurance — the moment anyone gives this panel a `display`, its absence becomes the same
@@ -66,14 +123,14 @@ button:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
66
123
  must stay on the trigger for aria-activedescendant to mean anything, and a focusable row also left
67
124
  focus on <body> when the row was clicked and then hidden. So this needs its own cursor/font. */
68
125
  .sheet-option{display:block;width:100%;cursor:pointer;background:transparent;border:none;border-left:2px solid transparent;border-radius:4px;padding:6px 8px;text-align:left;font:13px system-ui;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
69
- .sheet-option:hover,.sheet-option.highlighted{background:#334155}
126
+ .sheet-option:hover,.sheet-option.highlighted{background:var(--btn)}
70
127
  /* Left-border accent for the current sheet — the shared .wf-option.selected convention, not a tick glyph. */
71
128
  .sheet-option.selected{border-left-color:var(--brand);color:var(--brand)}
72
129
  /* Mirrors app.css's .sr-only. Needed here because this page does not load app.css, and the sheet
73
130
  switcher has no VISIBLE label beside it the way the workflow/project pickers do. */
74
131
  .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
75
132
  /* Themed tooltip — replaces native title= so no light OS tooltip leaks onto the dark theme. */
76
- #tooltip{position:fixed;z-index:80;background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:5px 8px;font-size:11.5px;line-height:1.35;color:var(--text);pointer-events:none;max-width:260px;box-shadow:0 8px 22px rgba(0,0,0,.5);opacity:0;transition:opacity .12s}
133
+ #tooltip{position:fixed;z-index:80;background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:5px 8px;font-size:11.5px;line-height:1.35;color:var(--text);pointer-events:none;max-width:260px;box-shadow:var(--shadow-tip);opacity:0;transition:opacity .12s}
77
134
  #tooltip.show{opacity:1}
78
135
  #app{display:flex;flex:1;min-height:0}
79
136
  #panel{width:300px;flex:0 0 300px;background:var(--panel);border-right:1px solid var(--line);padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:18px}
@@ -84,10 +141,10 @@ button:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
84
141
  .facet{border-top:1px solid var(--line);padding-top:14px}
85
142
  #modes label,.opts label{display:flex;align-items:center;gap:8px;font-size:12px;padding:4px 0;cursor:pointer;color:var(--text)}
86
143
  .opts label em{margin-left:auto;color:var(--mut);font-style:normal;font-size:11px}
87
- .opts .sw{width:12px;height:12px;border-radius:3px;flex:0 0 12px;border:1px solid var(--line)}
144
+ .opts .sw{width:12px;height:12px;border-radius:3px;flex:0 0 12px;border:1px solid var(--ctrl-border)}
88
145
  .opts label.textlayer{opacity:.55;cursor:default}
89
146
  /* Fully custom checkbox — the native unchecked widget is a white/grey square that breaks the dark baseline. */
90
- input[type=checkbox]{-webkit-appearance:none;appearance:none;width:14px;height:14px;flex:none;border:1px solid #475569;border-radius:3px;background:transparent;cursor:pointer;margin:0;vertical-align:middle}
147
+ input[type=checkbox]{-webkit-appearance:none;appearance:none;width:14px;height:14px;flex:none;border:1px solid var(--ctrl-border);border-radius:3px;background:transparent;cursor:pointer;margin:0;vertical-align:middle}
91
148
  input[type=checkbox]:checked{background:var(--brand);border-color:var(--brand);background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4l3 3 5-5' stroke='%23fff' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center}
92
149
  input:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
93
150
  /* FORCED COLORS (Windows High Contrast): the OS overrides every authored colour, so the custom fill and
@@ -102,6 +159,12 @@ input:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
102
159
  border:revert;background:revert;background-image:none}
103
160
  }
104
161
  .facet.dim{opacity:.4} .facet.dim .opts,.facet.dim .acts{pointer-events:none}
162
+ /* Two light-only corrections. An UNCHECKED checkbox here is a bare 1px ring on transparent, which
163
+ on the light rail all but disappears — app.css fills its own checkbox for the same reason, so the
164
+ transparent one is the outlier. And .textlayer's .55 is not symmetric across grounds: it composites
165
+ to 4.7:1 on the dark panel but 3.8:1 on the light one, and these rows still carry a live checkbox. */
166
+ [data-theme="light"] input[type=checkbox]{background:var(--bg)}
167
+ [data-theme="light"] .opts label.textlayer{opacity:.7}
105
168
  .hint{color:var(--mut);font-size:11px;line-height:1.5}
106
169
  /* #count is the footer's only child since #603 took the Fit/Zoom buttons out of the rail, so the
107
170
  flex row that used to wrap around them is gone with them — as are #count's width:100% and
@@ -110,7 +173,7 @@ input:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
110
173
  footer{margin-top:auto;border-top:1px solid var(--line);padding-top:12px}
111
174
  #count{font-size:11px;color:var(--mut)}
112
175
  #count b{color:var(--text)}
113
- #stage{flex:1;position:relative;background:var(--bg);min-width:0}
176
+ #stage{flex:1;position:relative;background:var(--stage);min-width:0}
114
177
  #canvas{width:100%;height:100%;cursor:grab;touch-action:none;display:block}
115
178
  #canvas.dragging{cursor:grabbing}
116
179
  #canvas image.bg{opacity:.28;pointer-events:none}
@@ -119,8 +182,14 @@ footer{margin-top:auto;border-top:1px solid var(--line);padding-top:12px}
119
182
  /* Raster-less baked sheets cannot retain the confidential background. Keep their full vector sheet as
120
183
  an explicit, non-interactive fallback; raster-backed sheets mount selected vectors only. */
121
184
  #canvas .el.is-context{opacity:.2;pointer-events:none}
122
- #empty{position:absolute;inset:0;display:none;align-items:center;justify-content:center;padding:40px;text-align:center;color:var(--mut)}
185
+ #empty{position:absolute;inset:0;display:none;align-items:center;justify-content:center;padding:40px;text-align:center;background:var(--empty-bg);color:var(--mut)}
123
186
  #empty.show{display:flex}
187
+ /* Fit / Zoom steel have nothing to act on while the empty state is up, and this page's rule is to
188
+ HIDE a dead control rather than show it inert. Doing that also settles what the bar should look
189
+ like there: it wears the stage's dark furniture (see :root), and #empty.show covers the stage —
190
+ so on a light theme it was a dark pill floating on a light pane, an artifact of two correct
191
+ decisions meeting. `~` and not a descendant selector: they are siblings inside #stage. */
192
+ #empty.show ~ #zoombar{display:none}
124
193
  #empty>div{max-width:44ch}
125
194
  #empty h1{margin:0;font-size:16px;font-weight:600;color:var(--text)}
126
195
  #empty .empty-body{margin:8px 0 0;line-height:1.55;color:var(--mut)}
@@ -174,16 +243,17 @@ body.publication-blocked #empty{position:static;flex:1}
174
243
  96px cap the bar wraps first, "Fit" keeps its full 35.5px untruncated, and only "Zoom steel"
175
244
  ellipsises (scrollWidth 84 vs clientWidth 77). A button now moves to its own line before it
176
245
  shrinks, so the ellipsis is the second line of defence, not the first. */
177
- #zoombar{position:absolute;left:12px;bottom:12px;max-width:calc(100% - 24px);overflow:hidden;display:flex;flex-wrap:wrap;gap:6px;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:6px 8px;box-shadow:0 4px 14px rgba(0,0,0,.45)}
178
- #zoombar button{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
246
+ #zoombar{position:absolute;left:12px;bottom:12px;max-width:calc(100% - 24px);overflow:hidden;display:flex;flex-wrap:wrap;gap:6px;background:var(--stage-panel);border:1px solid var(--stage-line);border-radius:8px;padding:6px 8px;box-shadow:var(--stage-shadow)}
247
+ #zoombar button{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:var(--stage-btn);border-color:var(--stage-ctrl);color:var(--stage-text)}
248
+ #zoombar button:hover{background:var(--stage-btn-hover)}
179
249
  /* eyedropper popover */
180
- #eye{position:fixed;display:none;z-index:50;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:10px;box-shadow:0 8px 24px rgba(0,0,0,.5);min-width:210px}
250
+ #eye{position:fixed;display:none;z-index:50;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:10px;box-shadow:var(--shadow-lg);min-width:210px}
181
251
  #eye.show{display:block}
182
252
  #eye .ehead{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--mut);margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}
183
253
  #eye .erow{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:12px}
184
254
  #eye .erow .k{color:var(--mut);min-width:72px;flex:none}
185
255
  #eye .erow .v{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
186
- #eye .erow .sw{width:12px;height:12px;border-radius:3px;border:1px solid var(--line);flex:none}
256
+ #eye .erow .sw{width:12px;height:12px;border-radius:3px;border:1px solid var(--ctrl-border);flex:none}
187
257
  #eye .erow button{font-size:11px;padding:2px 7px}
188
258
  #eye .eall{margin-top:8px;width:100%}
189
259
  </style>
@@ -378,9 +448,12 @@ function showChangedBanner(message, opts){
378
448
  if(kind === 'document') lastBanner = message;
379
449
  const bar = document.createElement('div');
380
450
  bar.id = 'conflictBanner';
451
+ // The bar keeps its saturated blue skin in BOTH themes — it is an alert, and it earns its prominence
452
+ // by not being the page's own surface. Its SHADOW is themed, because that one is not a choice: an
453
+ // 18px black glow thrown up a white page is the artifact, not the emphasis.
381
454
  bar.style.cssText = 'position:fixed;bottom:0;left:0;right:0;z-index:50;display:flex;align-items:center;gap:10px;'
382
455
  + 'padding:10px 16px;background:#1e40af;color:#e0f2fe;font:13px system-ui;border-top:1px solid #3b82f6;'
383
- + 'box-shadow:0 -4px 18px rgba(0,0,0,.45)';
456
+ + 'box-shadow:var(--banner-shadow)';
384
457
  const msg = document.createElement('span'); msg.style.cssText = 'flex:1';
385
458
  msg.textContent = message
386
459
  || 'This model changed somewhere else since you opened it — your save didn’t go through. '
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.128.1",
3
+ "version": "0.129.0",
4
4
  "type": "module",
5
5
  "description": "Thin localhost host for floless.app — serves web/ and shells the aware CLI. No engine, no LLM.",
6
6
  "bin": {