@justai/cuts 0.108.0 → 0.109.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justai/cuts",
3
- "version": "0.108.0",
3
+ "version": "0.109.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": {
@@ -40,7 +40,7 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "@justai/core": "^0.20.0",
43
+ "@justai/core": "^0.21.0",
44
44
  "@justai/ui": "^0",
45
45
  "@justai/atrium": "^0.1.9"
46
46
  }
package/src/Base.astro CHANGED
@@ -33,7 +33,7 @@ import { dir as dirOf } from "@justai/ui/locale";
33
33
  import "./ground.css";
34
34
  // The load-bearing behaviour is framework-free and lives in @justai/core, so `feed` (Next) injects the
35
35
  // SAME strings instead of hand-copying them. This binding just decides where they go in an Astro head.
36
- import { AUTH_CAPTURE_JS, CONSENT_JS, JS_CLASS_JS, REVEAL_CSS, analyticsJs, consentCopy } from "@justai/core";
36
+ import { AUTH_CAPTURE_JS, CONSENT_JS, JS_CLASS_JS, REVEAL_CSS, XRAY_JS, analyticsJs, consentCopy } from "@justai/core";
37
37
  // The consent ask IS a confirmation — a moment of trust — so it rides the fleet's ONE dialog
38
38
  // rather than keeping a private dialect. One anatomy for "are you sure?" and "may I count you?".
39
39
  import ConfirmSheet from "./ConfirmSheet.astro";
@@ -98,6 +98,18 @@ const localePath = (l: string) => (l === defaultLocale ? "/" : `/${l}/`);
98
98
  silently — no error, the visitor simply lands back signed out. */}
99
99
  <script is:inline set:html={AUTH_CAPTURE_JS} />
100
100
  <script is:inline set:html={JS_CLASS_JS} />
101
+ {/* queries: design grid · x-ray · ?xray · safe area · debug overlay · see the layout ·
102
+ is my content inside the safe area · layout debugging
103
+ THE X-RAY, AVAILABLE ON EVERY PERSONA AND OFF ON ALL OF THEM. Open any page with `?xray` and
104
+ the shell's design grid appears over it: the kernel's frame, the two safe areas, the centre
105
+ crosshairs, and every number the layout depends on with a verdict on each.
106
+ Here rather than in each persona because it is the SHELL's geometry it measures — the column,
107
+ the gutter, the sticky bar's landing — and a debug instrument that has to be installed per
108
+ repo is one nobody has when they need it.
109
+ It is glasses, not a renovation: nothing is added to the page's own elements, the overlay is
110
+ fixed and reads `#kernel`'s rect, and `pointer-events` is none throughout. And it costs
111
+ nothing when off — the script returns on its second line unless the flag is there. */}
112
+ <script is:inline set:html={XRAY_JS} />
101
113
  {/* Reveal only after a page marks itself ready — gated behind .js so the page is always visible
102
114
  if JS is off, and no scroll flash before we position at the Kernel. This style is a TRAP as
103
115
  much as a feature, and the warning must stay beside it: ANY page using this layout without a
package/src/XRay.astro ADDED
@@ -0,0 +1,39 @@
1
+ ---
2
+ // ── THE X-RAY — the shell's own design grid, on demand ─────────────────────────────────────────
3
+ //
4
+ // queries: design grid · safe area · title safe · action safe · edge of frame · debug overlay ·
5
+ // xray · ?xray · how do I see the grid · is my content inside the safe area · layout
6
+ // debugging · why is the column off centre · does the kernel overlap the toolbar ·
7
+ // horizontal bleed · developing a persona
8
+ //
9
+ // ── WHAT IT IS FOR ─────────────────────────────────────────────────────────────────────────────
10
+ //
11
+ // Open any persona with `?xray` and its skeleton appears: the kernel's own frame, the two safe
12
+ // areas, the centre crosshairs, an 8px rhythm, and every number the layout depends on with a
13
+ // verdict on each. It draws OVER the real page — you look through the persona's own controls and
14
+ // see whether they sit inside the safe areas or cross them.
15
+ //
16
+ // It began as a canary-only feature, which was the smaller idea. The founder's: this is a debug
17
+ // instrument, so it belongs to the framework and to every persona that mounts the shell. Whoever is
18
+ // building a persona now has the same view the canaries have, on their own work, at any width, at
19
+ // any moment — without adding a line to their repo.
20
+ //
21
+ // ── WHAT IT COSTS WHEN IT IS OFF: NOTHING ──────────────────────────────────────────────────────
22
+ //
23
+ // No markup, no stylesheet, no listeners. This component renders ONE small inline script that reads
24
+ // the URL and returns immediately unless the flag is there. Everything else — the CSS, the DOM, the
25
+ // resize listener — is built inside that branch. A debug feature that is only free when a
26
+ // developer remembers to remove it is a debug feature that ships.
27
+ //
28
+ // ── WHY A URL PARAMETER ────────────────────────────────────────────────────────────────────────
29
+ //
30
+ // It survives a share, a bug report and a device that is not the one you are sitting at: a
31
+ // screenshot of `?xray` IS the measurement, and the person who took it did not have to install
32
+ // anything. A keyboard shortcut would be invisible to everybody who was not told about it.
33
+ //
34
+ // `xray` is spelled once, here, and read from `location.search` so `?xray`, `?xray=1` and
35
+ // `&xray` all work — a flag somebody has to spell exactly right is one they will spell wrong.
36
+ import { XRAY_JS } from "@justai/core";
37
+ ---
38
+
39
+ <script is:inline set:html={XRAY_JS} />