@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Toolbar.astro +28 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justai/cuts",
3
- "version": "0.129.4",
3
+ "version": "0.129.5",
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": {
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.16; pointer-events: none;
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's whole part is to withdraw and come back ──────────────────────────
632
- // queries: toolbar during a game · the nav is unreachable while playing
633
- // The nav fades by CSS; inert is what CSS cannot do — out of the tab order and the accessibility
634
- // tree, so a keyboard or a screen reader is not walking chrome the player left. The game draws
635
- // its own pause and fullscreen — see the markup comment above for the decision.
636
- document.addEventListener("justai:stage", (e: any) => {
637
- const playing = e?.detail?.mode === "playing";
638
- document.querySelector(".tb-nav-group")?.toggleAttribute("inert", playing);
639
- document.querySelector(".tb-right")?.toggleAttribute("inert", playing);
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;