@justai/cuts 0.113.0 → 0.115.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/package.json +3 -3
- package/src/Toolbar.astro +45 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justai/cuts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.115.0",
|
|
4
4
|
"description": "A persona's named parts \u2014 the page shell that holds them, and the cuts themselves.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@justai/core": "^0.
|
|
45
|
-
"@justai/ui": "^0",
|
|
44
|
+
"@justai/core": "^0.25.0",
|
|
45
|
+
"@justai/ui": "^0.15.0",
|
|
46
46
|
"@justai/atrium": "^0.1.9"
|
|
47
47
|
}
|
|
48
48
|
}
|
package/src/Toolbar.astro
CHANGED
|
@@ -328,8 +328,52 @@ import AuthMount from "./AuthMount.astro";
|
|
|
328
328
|
@media (min-width: 640px) { .toolbar { margin-inline: -28px; padding-inline: 28px; } }
|
|
329
329
|
/* icons row + the scroll-reactive title strip below it */
|
|
330
330
|
.tb-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
331
|
+
/* queries: --tb-strip · the title strip's height · the toolbar changes height · 26px ·
|
|
332
|
+
* the kernel is 26px short · the game frame does not reach the fold
|
|
333
|
+
*
|
|
334
|
+
* ── THE ONE NUMBER THAT MAKES THIS ROW'S HEIGHT A MOVING TARGET, DECLARED SO IT CAN BE READ ──
|
|
335
|
+
*
|
|
336
|
+
* The strip opens and closes over 0.35s, so `.toolbar`'s height is anywhere in a 26px range at any
|
|
337
|
+
* given moment — and anything that measures the row and feeds a LAYOUT with it is sampling an
|
|
338
|
+
* animation. `--shell-top` did exactly that and the kernel's height came out 26px short whenever
|
|
339
|
+
* the page happened to be measured with the strip open, which is to say whenever somebody opened
|
|
340
|
+
* the persona at #kernel. It reads as a strip of the next section showing above the fold.
|
|
341
|
+
*
|
|
342
|
+
* So the number is a custom property rather than a literal: this rule uses it, and @justai/core's
|
|
343
|
+
* `personaScroll` reads it to compute the row's EXPANDED height without waiting for or racing the
|
|
344
|
+
* transition — `toolbar - strip` is the row, and the row plus this is what the bar will be. One
|
|
345
|
+
* declaration, two readers, and nothing samples a moving value. */
|
|
346
|
+
.toolbar { --tb-strip: 26px; }
|
|
347
|
+
/* queries: the bar grows after load · why does the strip animate on arrival · data-motion ·
|
|
348
|
+
* first paint animation · can this transition wait for the first interaction
|
|
349
|
+
*
|
|
350
|
+
* ── THE TRANSITION IS ALSO A DAMPER, WHICH IS WHY IT CANNOT SIMPLY WAIT ─────────────────────
|
|
351
|
+
*
|
|
352
|
+
* The founder asked the obvious and right question: *"şu geçiş süresi güzel — ama neden bu özellik
|
|
353
|
+
* kullanıcının ilk interaction'ından sonra aktif edilmiyor?"* A persona lands on its kernel, so the
|
|
354
|
+
* strip's correct state on the first frame is open; animating into it grows the bar 26px just after
|
|
355
|
+
* the page appears, which is a glitch nobody asked for.
|
|
356
|
+
*
|
|
357
|
+
* IT WAS TRIED, AND IT BREAKS SOMETHING ELSE. Gated behind a `data-motion` flag set on the first
|
|
358
|
+
* pointer/key/wheel, the strip snaps open during the landing — and that 26px arrives in a SINGLE
|
|
359
|
+
* frame, inside `#below`, while the scroll spy is deciding which cut is active. That is the
|
|
360
|
+
* bistable oscillator `personaScroll` documents at length: the spy measures a page its own output
|
|
361
|
+
* moved. Measured: with the gate in place, `#navProfile` no longer navigates — the page re-asserts
|
|
362
|
+
* the kernel and stays. The 0.35s is not only easing; it is what keeps that step out of one frame.
|
|
363
|
+
*
|
|
364
|
+
* SO THE HEIGHT IS NEVER READ INSTEAD. `--shell-top` is computed as `row + --tb-strip` — the row
|
|
365
|
+
* being the bar minus whatever the strip currently is, which is the same number at every frame of
|
|
366
|
+
* the transition. Nothing samples the animation, so nothing depends on when it was sampled.
|
|
367
|
+
*
|
|
368
|
+
* The real fix for the founder's question is a toolbar whose height does not change at all: reserve
|
|
369
|
+
* the strip's space always and fade only its content. That removes the feedback at the source and
|
|
370
|
+
* makes the gate free — and it is a fleet-wide design decision about how the bar looks at the
|
|
371
|
+
* profile, so it is his to take rather than one to slip in. */
|
|
331
372
|
.tb-title { display: flex; align-items: center; height: 0; overflow: hidden; opacity: 0; transition: height 0.35s var(--ease-out), opacity 0.25s var(--ease-out); }
|
|
332
|
-
|
|
373
|
+
/* The fallback is not decoration: the token is declared on `.toolbar` and consumed here, which is
|
|
374
|
+
a different selector — so the framework's own token spec reads it as ungrounded and is right to.
|
|
375
|
+
A rule that silently collapses to `height: 0` would close the strip and say nothing. */
|
|
376
|
+
.tb-title.show { height: 26px; height: var(--tb-strip, 26px); opacity: 1; }
|
|
333
377
|
.tb-title-text { font-size: var(--fs-sm); font-weight: 600; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.16s var(--ease-out); }
|
|
334
378
|
.tb-title-text.fade { opacity: 0; }
|
|
335
379
|
/* nav lives on the left, beside the back affordance — the middle is intentionally empty */
|