@justai/cuts 0.76.0 → 0.77.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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/Toolbar.astro +71 -7
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justai/cuts",
3
- "version": "0.76.0",
4
- "description": "A persona's named parts \u2014 the page shell that holds them, and the cuts themselves.",
3
+ "version": "0.77.0",
4
+ "description": "A persona's named parts — the page shell that holds them, and the cuts themselves.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
7
7
  "type": "git",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@justai/core": "^0.10.0",
40
- "@justai/ui": "^0.4.0",
40
+ "@justai/ui": "^0",
41
41
  "@justai/atrium": "^0.1.9"
42
42
  }
43
43
  }
package/src/Toolbar.astro CHANGED
@@ -163,14 +163,47 @@ import AuthMount from "./AuthMount.astro";
163
163
  margin-inline: calc(-1 * max(var(--edge, 16px), env(safe-area-inset-left))) calc(-1 * max(var(--edge, 16px), env(safe-area-inset-right)));
164
164
  padding-block: max(8px, env(safe-area-inset-top)) 8px;
165
165
  padding-inline: max(var(--edge, 16px), env(safe-area-inset-left)) max(var(--edge, 16px), env(safe-area-inset-right));
166
- background: color-mix(in srgb, var(--bg) 70%, transparent);
167
- backdrop-filter: blur(22px) saturate(1.5);
168
- -webkit-backdrop-filter: blur(22px) saturate(1.5);
169
- /* a very faint hairline always; it firms up once content scrolls under the bar */
170
- border-block-end: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
171
- transition: border-color 0.3s var(--ease-out);
166
+
167
+ /* ── THE BAR IS A SHELF, NOT A TINT ──────────────────────────────────────────────────────
168
+ *
169
+ * queries: the toolbar reads as a black strip · why is the bar darker in dark than in light ·
170
+ * the bar looks flat against the column · toolbar material · --toolbar-bg
171
+ *
172
+ * It used to derive its fill from `--bg` — `color-mix(--bg 70%, transparent)` under a blur.
173
+ * One declaration, but it meant two different things: `--bg` is a near-white in light and #000
174
+ * in dark, so the same rule read "lighten a near-white a little" on one ground and "pull a
175
+ * lifted surface to pure black" on the other. Measured against the column it sits on: **-6 in
176
+ * light, -17 in dark.** That asymmetry was a by-product of the token, never a decision.
177
+ *
178
+ * So it takes the CARD's material instead, and the light comes from above like everything else:
179
+ * an opaque fill with a shadow cast downward, and the page sliding under it. The fill is opaque
180
+ * ON PURPOSE — the blur was inert in light anyway, because the column is 92% opaque and there is
181
+ * nothing behind it to refract.
182
+ *
183
+ * WHY IT IS HERE NOW. app.zone settled this, qr copied it verbatim — same two hex values, same
184
+ * two shadows — and BOTH left a comment saying it belongs in cuts. Two consumers is the
185
+ * promotion trigger, and the note the second one wrote is the specification:
186
+ *
187
+ * "the right end state is cuts reading `var(--toolbar-bg, <its current expression>)`,
188
+ * after which these four declarations delete themselves and the tokens alone do the work."
189
+ *
190
+ * The token remains the seam: a persona whose ground is genuinely different sets `--toolbar-bg`
191
+ * and `--toolbar-shadow` and this rule steps aside. */
192
+ background: var(--toolbar-bg, #1e202a);
193
+ box-shadow: var(--toolbar-shadow, 0 2px 12px -2px rgba(0, 0, 0, 0.55));
194
+ /* No hairline: it was the only thing separating the bar from the column, and the shadow does
195
+ that now. A line under an OPAQUE shelf reads as a seam rather than as a separation. */
196
+ border-block-end: none;
197
+ }
198
+ @media (prefers-color-scheme: light) {
199
+ .toolbar {
200
+ background: var(--toolbar-bg, #fbfcfe);
201
+ box-shadow: var(--toolbar-shadow, 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 20px -8px rgba(16, 24, 40, 0.16));
202
+ }
172
203
  }
173
- .toolbar.stuck { border-block-end-color: var(--border); }
204
+ /* `.stuck` is still set by the script below and still means "content is under the bar" — it simply
205
+ has nothing to paint now that the shelf is opaque and always shadowed. Kept because the class is
206
+ part of this cut's contract and a consumer may hang its own behaviour on it. */
174
207
  @media (min-width: 768px) { .toolbar { margin-inline: -28px; padding-inline: 28px; } }
175
208
  /* icons row + the scroll-reactive title strip below it */
176
209
  .tb-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
@@ -219,6 +252,37 @@ import AuthMount from "./AuthMount.astro";
219
252
  shrink the identity. */
220
253
  .tb-nav.tb-mark :global(img) { width: 19px; height: 19px; }
221
254
  .tb-nav :global(svg) { width: 19px; height: 19px; }
255
+
256
+ /* ── EQUAL INK, TWO BOXES ────────────────────────────────────────────────────────────────────
257
+ *
258
+ * queries: the toolbar icons are not the same size · the mark looks bigger than the glyphs ·
259
+ * the row is not level · 25.33px
260
+ *
261
+ * The paragraph above ends by naming the way out — *"grow the GLYPHS, not the identity"* — and
262
+ * this is that, arriving from the two repos that measured it.
263
+ *
264
+ * "19px" means two different things in this row. A Lucide glyph is drawn in a 24 viewBox with its
265
+ * ink between 3 and 21, so a 19px box puts **14.25px** of ink on screen; a mark runs to the edge
266
+ * of its own viewBox and puts **18.65px**. The mark therefore reads about a third larger, which is
267
+ * exactly what it did — and while the mark was still coloured, colour carried part of that
268
+ * difference. Now that it is monochrome at rest, the size gap is the only thing left and it shows.
269
+ *
270
+ * 19 × 24/18 = 25.33px is the box at which a glyph's INK measures 19px, the same 19px the mark
271
+ * occupies. `:not(.tb-mark)` is not a special case — it is the same rule read the other way: a
272
+ * glyph carries padding inside its viewBox and a mark does not, so equal ink needs unequal boxes.
273
+ *
274
+ * app.zone settled it, qr arrived at the identical number, and qr's own comment says why it is
275
+ * here: *"otherwise every persona has to remember to carry it, which is precisely the thing the
276
+ * shared shell exists to prevent."* */
277
+ .tb-nav:not(.tb-mark) :global(svg) { width: 25.33px; height: 25.33px; }
278
+
279
+ /* THE BUBBLE HANGS. Its silhouette's centre measures 1.05px below the line the other three sit on
280
+ (39.05 against 38.0) because the tail is part of the shape and pulls the box down with it — the
281
+ glyph is centred while the thing you SEE is not. A pixel is inside the noise on most rows; on
282
+ four icons at one size sharing one baseline it is the only thing left that is not level.
283
+ Nudged rather than redrawn, and `transform` on the svg never collides with the press feedback:
284
+ `.tb-nav:active`'s scale lives on the anchor. Both repos carry this verbatim. */
285
+ #navPosts :global(svg) { transform: translateY(-1px); }
222
286
  </style>
223
287
 
224
288
  <script>