@justai/cuts 0.86.0 → 0.88.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 +2 -2
  2. package/src/Toolbar.astro +51 -35
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justai/cuts",
3
- "version": "0.86.0",
3
+ "version": "0.88.0",
4
4
  "description": "A persona's named parts — the page shell that holds them, and the cuts themselves.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -37,7 +37,7 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@justai/core": "^0.12.0",
40
+ "@justai/core": "^0.13.0",
41
41
  "@justai/ui": "^0",
42
42
  "@justai/atrium": "^0.1.9"
43
43
  }
package/src/Toolbar.astro CHANGED
@@ -94,6 +94,26 @@ interface Props {
94
94
  // registry stores it, the catalog draws it. There was nothing to decide; there was only something
95
95
  // to look up.
96
96
  //
97
+ // ── AND THE `<img>` FALLBACK IS THE WORSE OF THE TWO ANSWERS ────────────────────────────────
98
+ //
99
+ // queries: the persona icon has a background in the toolbar · a filled tile in the row ·
100
+ // the mark looks like a little card · toolbarMark
101
+ //
102
+ // `icon.svg` is a TILE — a squircle ground with the mark on it, drawn for an avatar well or a Home
103
+ // Screen. Dropped into the row as an `<img>` it keeps that ground, and becomes the only object in
104
+ // a line of four inks with a background behind it. Correct enough to ship and wrong to look at,
105
+ // which is why it took a founder opening two personas side by side to name it.
106
+ //
107
+ // THE RIGHT ANSWER IS qr'S, and it is derive-never-redraw: pass `profileIcon` an INLINE svg made
108
+ // from the same `icon.svg` with its ground removed and its ids namespaced —
109
+ //
110
+ // import iconSvg from "../../public/icon.svg?raw";
111
+ // import { toolbarMark } from "@justai/core";
112
+ // <Fragment slot="profileIcon" set:html={toolbarMark(iconSvg, { id: "qr" })} />
113
+ //
114
+ // The `<img>` stays as the fallback because a persona that has not done this should still show
115
+ // its own face rather than a stranger's bust — but it is the floor, not the destination.
116
+ //
97
117
  // The `profileIcon` slot still wins when a persona passes one — an inline SVG can take
98
118
  // `currentColor` where an <img> cannot, which is why qr passes its mark rather than pointing at it.
99
119
  avatar?: string;
@@ -349,51 +369,47 @@ import AuthMount from "./AuthMount.astro";
349
369
  So the difference stays, and it is a difference in ink rather than in box: mark ~19px, glyphs ~14.3px
350
370
  inside the same 19px. If the row is ever to read level, the way there is to grow the GLYPHS, not to
351
371
  shrink the identity. */
352
- .tb-nav.tb-mark :global(img) { width: 19px; height: 19px; }
353
-
354
- /* ── WHATEVER IS FIRST IN THE ROW READS AT 20; EVERYTHING AFTER IT AT 19 ────────────────────
372
+ /* ── EVERY ICON READS AT 20 ─────────────────────────────────────────────────────────────────
355
373
  *
356
- * queries: toolbar icon sizes · why is the first icon bigger · 20 and 19 · first position
374
+ * queries: toolbar icon size · 20 · why is my icon smaller than the others · 26.67 · the mark
375
+ * looks small · icon ink
357
376
  *
358
- * The founder's rule, with app.zone's own mark as the reference every icon is measured against.
359
- * It is POSITIONAL, not about which icon happens to be there — the row is saying that the first
360
- * thing in it is not one of the sections, and that is true whatever fills the slot:
377
+ * The founder's rule, and it is about the DRAWING rather than the box: an icon's picture hits 20
378
+ * on its longer side, whichever side its design naturally uses. A bolt is tall and narrow and hits
379
+ * 20 on its height; a folder hits it on its width. The container is whatever that takes.
361
380
  *
362
- * a persona `BackToZone` — the way out to app.zone
363
- * a child persona the parent's face — the way up
364
- * app.zone itself its OWN mark, because there is no way out of the zone from the zone
381
+ * One number, two boxes, because a viewBox is not a drawing:
365
382
  *
366
- * Written structurally for that reason. `BackToZone` sizes itself; when it is absent the nav group
367
- * becomes the first child of `.tb-left`, and its first item is what a person sees first. Expressed
368
- * as a selector rather than a list of ids, a fourth arrangement is right without anyone editing
369
- * this file — which is what "positional" has to mean to be worth the words.
383
+ * a MARK fills its own viewBox → a 20px box puts 20px on screen
384
+ * a GLYPH sits inside 18 of 24 (0.75) → 20 / 0.75 = 26.67px
370
385
  *
371
- * Measured across nine live surfaces first: `home` was 20 on eleven personas and 19 on qr, which
372
- * had overridden it; the three children's parent icon was 19; auth's was 19 because I set it there
373
- * an hour earlier having read the drift backwards; app.zone's own mark was 19 while being the
374
- * first thing in its row. `BackToZone`'s default was right the whole time.
386
+ * A persona whose mark does NOT fill its viewBox needs its own number, and that is where the
387
+ * confusion came from: those marks looked small in the same box as everything else because their
388
+ * drawing occupies less of it. The box is derived — 20 divided by how much of the viewBox the
389
+ * drawing uses — so a redraw changes it, and the comment beside each one says so.
375
390
  *
376
- * The first slot always holds a MARK — a drawing that fills its own viewBox — so a 20px box is
377
- * 20px of ink. A glyph there would need 26.67 to read the same, and if one ever lands in that slot
378
- * this rule is where the exception belongs. */
379
- .tb-left > .tb-nav-group:first-child > .tb-nav:first-child :global(svg),
380
- .tb-left > .tb-nav-group:first-child > .tb-nav:first-child :global(img) { width: 20px; height: 20px; }
391
+ * (This replaced a 19-with-a-20-in-front rule that lasted an afternoon. The distinction was real —
392
+ * the first slot is not one of the sections — but it is said by POSITION and the -7px pull above,
393
+ * not by a pixel of size nobody can see and everybody can drift.) */
394
+ .tb-nav.tb-mark :global(img) { width: 20px; height: 20px; }
381
395
 
382
- /* ── AND IT STARTS WHERE BackToZone STARTS ──────────────────────────────────────────────────
396
+ /* ── THE FIRST POSITION STARTS WHERE THE ROW STARTS ─────────────────────────────────────────
383
397
  *
384
- * queries: the first icon is further in on a child persona · the row starts in a different place ·
385
- * navParent inset · margin-inline-start -7px
398
+ * queries: the first icon is further in on a child persona · navParent inset · -7px ·
399
+ * the row starts in a different place
386
400
  *
387
- * `BackToZone` pulls itself 7px left so the row begins flush with the bar's edge rather than a
388
- * tap target's worth inside it. Anything standing in the first position has the same job and needs
389
- * the same pull — measured on a live child before this landed: the parent's face sat 26px from the
390
- * bar's edge where a persona's way out sits at 17. Nine pixels, and the founder saw it by opening
391
- * one and then the other.
401
+ * `BackToZone` pulls itself 7px left so the row begins flush with the bar's edge rather than a tap
402
+ * target's worth inside it. Anything standing in the first position has the same job and needs the
403
+ * same pull — measured on a live child, the parent's face sat 26px from the bar's edge where a
404
+ * persona's way out sits at 17. Nine pixels, found by eye before any probe looked: a person moving
405
+ * between two surfaces sees a difference no single page can show.
392
406
  *
393
- * Same selector as the size above, for the same reason: the first slot is a POSITION, and its two
394
- * properties should be decided in one place or they will drift apart again. */
407
+ * POSITION IS WHAT MAKES THE FIRST SLOT DIFFERENT — not size. Every icon reads at 20; what says
408
+ * "this one is the way out rather than a section" is where it sits, flush to the edge, before the
409
+ * group. Structural for that reason: BackToZone sizes and pulls itself, and when it is absent the
410
+ * nav group becomes the first child of `.tb-left` and its first item inherits the job. */
395
411
  .tb-left > .tb-nav-group:first-child > .tb-nav:first-child { margin-inline-start: -7px; }
396
- .tb-nav :global(svg) { width: 19px; height: 19px; }
412
+ .tb-nav :global(svg) { width: 20px; height: 20px; }
397
413
 
398
414
  /* ── EQUAL INK, TWO BOXES ────────────────────────────────────────────────────────────────────
399
415
  *
@@ -416,7 +432,7 @@ import AuthMount from "./AuthMount.astro";
416
432
  * app.zone settled it, qr arrived at the identical number, and qr's own comment says why it is
417
433
  * here: *"otherwise every persona has to remember to carry it, which is precisely the thing the
418
434
  * shared shell exists to prevent."* */
419
- .tb-nav:not(.tb-mark) :global(svg) { width: 25.33px; height: 25.33px; }
435
+ .tb-nav:not(.tb-mark) :global(svg) { width: 26.67px; height: 26.67px; }
420
436
 
421
437
  /* THE BUBBLE HANGS. Its silhouette's centre measures 1.05px below the line the other three sit on
422
438
  (39.05 against 38.0) because the tail is part of the shape and pulls the box down with it — the