@justai/cuts 0.156.0 → 0.157.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 +1 -1
- package/src/Preroll.astro +16 -0
- package/src/behaviour/preroll.ts +10 -2
package/package.json
CHANGED
package/src/Preroll.astro
CHANGED
|
@@ -457,6 +457,22 @@ const primary = storeRows[0]?.url;
|
|
|
457
457
|
* container, and layout containment makes it the containing block for FIXED descendants too — a
|
|
458
458
|
* fixed overlay written inside it would be clipped to the frame it is meant to surround. */
|
|
459
459
|
html[data-stage="playing"] { overflow: hidden; }
|
|
460
|
+
/* queries: oyun başlayınca toolbar gitsin · the toolbar hides while playing · full screen game ·
|
|
461
|
+
* tam ekran oyun · ipad oyun ekranı · the hud is under the toolbar
|
|
462
|
+
*
|
|
463
|
+
* ── WHILE A GAME PLAYS, THE TOOLBAR STEPS OUT AND THE GAME TAKES THE WHOLE SCREEN ──────────────
|
|
464
|
+
*
|
|
465
|
+
* The founder, 2026-10-22, on an iPad and a phone: the game's own money, day and full-screen keys
|
|
466
|
+
* were crowded by the bar above them. So while the stage is `playing` the bar's sticky slot leaves
|
|
467
|
+
* the flow and the game kernel grows by exactly what it gave up — the whole painted screen. The
|
|
468
|
+
* moment the game announces `paused` (its own pause key, the tab hidden, leaving full screen) the
|
|
469
|
+
* attribute goes and the bar comes back with the page as it was. The protocol is unchanged: the
|
|
470
|
+
* game says what the player is doing, and this is only what the shell does with it. */
|
|
471
|
+
html[data-stage="playing"] .tb-slot { display: none; }
|
|
472
|
+
/* What the shell takes above the kernel is nothing, while it plays: the one number the game
|
|
473
|
+
* kernel's height law and its landing offset both read (@justai/ui base.css). `!important` because
|
|
474
|
+
* the shell measures the bar and writes the number inline on the root — and the bar is gone. */
|
|
475
|
+
html[data-stage="playing"] { --shell-top: 0px !important; }
|
|
460
476
|
/* queries: theater mode · where did the dim layer go · dark theme while playing
|
|
461
477
|
*
|
|
462
478
|
* ── THE THEATER IS THE PERSONA'S OWN DARK THEME, NOT A LAYER ────────────────────────────────
|
package/src/behaviour/preroll.ts
CHANGED
|
@@ -180,8 +180,11 @@ if (root && root.dataset.door === "store") {
|
|
|
180
180
|
const el = document.getElementById(id);
|
|
181
181
|
if (el) el.toggleAttribute("inert", playing);
|
|
182
182
|
}
|
|
183
|
-
// The page is locked, so make sure what it is locked ON is the stage
|
|
184
|
-
|
|
183
|
+
// The page is locked, so make sure what it is locked ON is the stage — the whole of it, now
|
|
184
|
+
// that the toolbar has stepped out (see Preroll.astro). On pause the bar is back, and the
|
|
185
|
+
// kernel lands under it again by its own scroll-margin.
|
|
186
|
+
if (playing) (document.getElementById("kernel") ?? stage).scrollIntoView({ block: "start" });
|
|
187
|
+
else document.getElementById("kernel")?.scrollIntoView({ block: "start" });
|
|
185
188
|
// queries: space does nothing · keyboard not reaching the game · input bind · focus
|
|
186
189
|
//
|
|
187
190
|
// AND THE KEYBOARD GOES WITH THE STAGE. The play press happened in THIS document, so this
|
|
@@ -245,6 +248,11 @@ if (root && root.dataset.door === "store") {
|
|
|
245
248
|
document.addEventListener("justai:pause-request", () => askPause("chrome"));
|
|
246
249
|
document.addEventListener("justai:fullscreen-request", () =>
|
|
247
250
|
(stage as any).requestFullscreen?.().catch(() => {}));
|
|
251
|
+
// Leaving full screen is leaving the game for a moment: it pauses, and with the pause the
|
|
252
|
+
// toolbar comes back — the same way back as the game's own pause key.
|
|
253
|
+
document.addEventListener("fullscreenchange", () => {
|
|
254
|
+
if (!document.fullscreenElement && document.documentElement.dataset.stage === "playing") askPause("fullscreen");
|
|
255
|
+
});
|
|
248
256
|
document.addEventListener("visibilitychange", () => {
|
|
249
257
|
if (document.hidden && document.documentElement.dataset.stage === "playing") askPause("hidden");
|
|
250
258
|
});
|