@justai/cuts 0.129.4 → 0.129.5
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 +1 -1
- package/src/Toolbar.astro +28 -11
package/package.json
CHANGED
package/src/Toolbar.astro
CHANGED
|
@@ -457,10 +457,14 @@ import AuthMount from "./AuthMount.astro";
|
|
|
457
457
|
* Opacity and pointer-events here; the INERT that takes them out of the tab order is set in the
|
|
458
458
|
* script, because CSS cannot. The transition matters more than it looks: chrome that snaps away
|
|
459
459
|
* reads as breaking, chrome that withdraws reads as dimming the house lights. */
|
|
460
|
+
/* QUIET, NOT DEAD. The first version faded the row to 16% and made it inert - a locked door.
|
|
461
|
+
* The founder's better idea: leave everything enabled, and USING any of it pauses the game -
|
|
462
|
+
* *"gitti chats'e tikladi. game state playing ise otomatik oyunu pause eder. daha smooth bir
|
|
463
|
+
* deneyim."* One tap instead of pause-then-tap, and the whole row becomes the way back. */
|
|
460
464
|
:global(html[data-stage="playing"]) .tb-nav-group,
|
|
461
465
|
:global(html[data-stage="playing"]) .tb-right,
|
|
462
466
|
:global(html[data-stage="playing"]) .tb-title {
|
|
463
|
-
opacity: 0.
|
|
467
|
+
opacity: 0.5;
|
|
464
468
|
transition: opacity 0.4s var(--ease-out);
|
|
465
469
|
}
|
|
466
470
|
/* icon-only section nav — current cut highlighted */
|
|
@@ -628,16 +632,29 @@ import AuthMount from "./AuthMount.astro";
|
|
|
628
632
|
// Both or neither — see the props above. When both are set the strip names the SECTIONS; core's
|
|
629
633
|
// default, which names the persona and its handle, is left entirely alone otherwise. Nothing here
|
|
630
634
|
// reproduces that default, which is the point: `.pname` and `.handle` stay core's business.
|
|
631
|
-
// ── the stage: the row
|
|
632
|
-
// queries: toolbar during a game ·
|
|
633
|
-
//
|
|
634
|
-
//
|
|
635
|
-
//
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
635
|
+
// ── the stage: the row stays LIVE, and using it pauses the game ───────────────────────────
|
|
636
|
+
// queries: toolbar during a game · tapping posts while playing · auto pause · data-stage-silent
|
|
637
|
+
//
|
|
638
|
+
// The row went inert for one version and the founder unlocked it: every control stays enabled,
|
|
639
|
+
// and touching ANY of them while a game is playing asks the game to pause first — so a player who
|
|
640
|
+
// reaches for the posts mid-flight gets a paused gull and the feed, in one tap. The event is not
|
|
641
|
+
// blocked: the action proceeds naturally while the pause lands beside it (a locked page still
|
|
642
|
+
// scrolls programmatically, so even the hash navigation works before the unlock).
|
|
643
|
+
//
|
|
644
|
+
// Declarative seam, as asked: an element that must NOT pause the game opts out by carrying
|
|
645
|
+
// `data-stage-silent` — on itself or any ancestor. Everything else pauses by default, because a
|
|
646
|
+
// rule with a default and an opt-out survives a fleet; a per-element opt-in is the third copy
|
|
647
|
+
// that forgets.
|
|
648
|
+
document.querySelector(".toolbar")?.addEventListener(
|
|
649
|
+
"click",
|
|
650
|
+
(e) => {
|
|
651
|
+
if (document.documentElement.dataset.stage !== "playing") return;
|
|
652
|
+
const hit = (e.target as Element | null)?.closest?.("a, button, select, [role=button]");
|
|
653
|
+
if (!hit || hit.closest("[data-stage-silent]")) return;
|
|
654
|
+
document.dispatchEvent(new CustomEvent("justai:pause-request"));
|
|
655
|
+
},
|
|
656
|
+
true,
|
|
657
|
+
);
|
|
641
658
|
|
|
642
659
|
const bar = document.querySelector(".toolbar") as HTMLElement | null;
|
|
643
660
|
const kt = bar?.dataset.kernelTitle;
|