@justai/cuts 0.108.0 → 0.110.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 +2 -2
- package/src/BackToZone.astro +22 -21
- package/src/Base.astro +13 -1
- package/src/XRay.astro +39 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justai/cuts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.110.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.
|
|
43
|
+
"@justai/core": "^0.21.0",
|
|
44
44
|
"@justai/ui": "^0",
|
|
45
45
|
"@justai/atrium": "^0.1.9"
|
|
46
46
|
}
|
package/src/BackToZone.astro
CHANGED
|
@@ -49,29 +49,33 @@ interface Props {
|
|
|
49
49
|
const { apex = "app.zone" } = Astro.props;
|
|
50
50
|
const href = `https://${apex}`;
|
|
51
51
|
|
|
52
|
-
// queries: the home mark is missing arms ·
|
|
53
|
-
//
|
|
52
|
+
// queries: the home mark is missing arms · the mark is the wrong size · 36px · scoped styles do
|
|
53
|
+
// not apply · set:html · data-astro-cid
|
|
54
54
|
//
|
|
55
|
-
// ── THE
|
|
55
|
+
// ── THE MARKS ARE ELEMENTS, NOT STRINGS, AND BOTH DETOURS ARE WORTH KEEPING ────────────────
|
|
56
56
|
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
57
|
+
// For one version these were HTML strings handed over with `set:html`, to work around app.zone's
|
|
58
|
+
// mark losing three of its four paths. That was the wrong fix for a defect with a different cause:
|
|
59
|
+
// the paths had been deleted from the SOURCE by a careless regex during an unrelated edit, and no
|
|
60
|
+
// amount of changing how they were rendered was ever going to bring them back.
|
|
61
61
|
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
// the
|
|
65
|
-
//
|
|
62
|
+
// Worse, the workaround broke something real. `set:html` injects markup that Astro never sees, so it
|
|
63
|
+
// carries no `data-astro-cid-*` — and every scoped rule in this file stopped matching it, including
|
|
64
|
+
// the one that sizes the mark. The row's 20px mark rendered at its natural size: 36.6px beside four
|
|
65
|
+
// 20px glyphs, caught by the shell's ink spec exactly as the missing arms had been.
|
|
66
66
|
//
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
// Elements again. The ternary was never the problem.
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
<a class="home" href={href} data-home aria-label={apex} title={apex}>
|
|
71
|
+
{apex === "pin.games" ? (
|
|
72
|
+
<svg class="pgmark" viewBox="287 266 482 491" aria-hidden="true">
|
|
70
73
|
<rect class="arm a1" x="130" y="469" width="400" height="86" rx="43" transform="rotate(90 330 512)"/>
|
|
71
74
|
<rect class="arm a2" x="317.3" y="363" width="455.5" height="86" rx="43" transform="rotate(26.25 545 406)"/>
|
|
72
75
|
<rect class="arm a3" x="317.3" y="575" width="455.5" height="86" rx="43" transform="rotate(-26.25 545 618)"/>
|
|
73
|
-
</svg
|
|
74
|
-
|
|
76
|
+
</svg>
|
|
77
|
+
) : (
|
|
78
|
+
<svg class="azmark" viewBox="-8.5 0 928 928" aria-hidden="true">
|
|
75
79
|
<path class="arm a1" d="M360.365 0C372.599 0 382.517 9.91778 382.517 22.152V97.7555C382.517 109.99 372.599 119.907 360.365 119.907H203.398C157.082 119.907 119.537 157.453 119.537 203.769V353.64C119.537 370.244 106.077 383.704 89.4732 383.704H22.152C9.91778 383.704 0 373.786 0 361.552V175.633C0 78.6337 78.6338 0 175.634 0H360.365Z"/>
|
|
76
80
|
<path class="arm a2" d="M550.635 2.37305C538.401 2.37305 528.483 12.2908 528.483 24.525V100.129C528.483 112.363 538.401 122.28 550.635 122.28H707.602C753.918 122.28 791.463 159.826 791.463 206.142V356.013C791.463 372.617 804.923 386.077 821.527 386.077H888.848C901.082 386.077 911 376.159 911 363.925V178.006C911 81.0068 832.366 2.37305 735.366 2.37305H550.635Z"/>
|
|
77
81
|
<path class="arm a3" d="M550.635 928.009C538.401 928.009 528.483 918.092 528.483 905.857V830.254C528.483 818.02 538.401 808.102 550.635 808.102H707.602C753.918 808.102 791.463 770.556 791.463 724.241V574.369C791.463 557.765 804.923 544.305 821.527 544.305H888.848C901.082 544.305 911 554.223 911 566.457V752.376C911 849.376 832.366 928.009 735.366 928.009H550.635Z"/>
|
|
@@ -83,11 +87,8 @@ const AZ_MARK = `<svg class="azmark" viewBox="-8.5 0 928 928" aria-hidden="true"
|
|
|
83
87
|
<linearGradient id="azHome3" x1="425.634" y1="1029.67" x2="904.671" y2="550.635" gradientUnits="userSpaceOnUse"><stop stop-color="#F8C24A"/><stop offset="1" stop-color="#EFA229"/></linearGradient>
|
|
84
88
|
<linearGradient id="azHome4" x1="450.555" y1="993.674" x2="6.32921" y2="550.635" gradientUnits="userSpaceOnUse"><stop stop-color="#5285DC"/><stop offset="1" stop-color="#2E62C6"/></linearGradient>
|
|
85
89
|
</defs>
|
|
86
|
-
</svg
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<a class="home" href={href} data-home aria-label={apex} title={apex}>
|
|
90
|
-
<Fragment set:html={apex === "pin.games" ? PG_MARK : AZ_MARK} />
|
|
90
|
+
</svg>
|
|
91
|
+
)}
|
|
91
92
|
</a>
|
|
92
93
|
|
|
93
94
|
<style>
|
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} />
|