@justai/cuts 0.62.0 → 0.64.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 +3 -2
- package/src/AuthMount.astro +35 -0
- package/src/Toolbar.astro +16 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justai/cuts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.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": {
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"./FilePicker.astro": "./src/FilePicker.astro",
|
|
26
26
|
"./ActionList.astro": "./src/ActionList.astro",
|
|
27
27
|
"./ActionRow.astro": "./src/ActionRow.astro",
|
|
28
|
-
"./Files.astro": "./src/FilePicker.astro"
|
|
28
|
+
"./Files.astro": "./src/FilePicker.astro",
|
|
29
|
+
"./AuthMount.astro": "./src/AuthMount.astro"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"astro": ">=5"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
// ░░ AUTH MOUNT — the sign-in avatar, and the script that fills it, as ONE thing ░░
|
|
3
|
+
//
|
|
4
|
+
// queries: no avatar in the toolbar · sign in missing on files · the auth avatar never appears ·
|
|
5
|
+
// data-justai-auth is empty · how does a persona get sign-in · where does sdk.js come from ·
|
|
6
|
+
// why is the auth mount a component instead of two lines
|
|
7
|
+
//
|
|
8
|
+
// THE TWO HALVES CANNOT BE SEPARATED, WHICH IS WHY THIS IS A COMPONENT AND NOT A SNIPPET.
|
|
9
|
+
//
|
|
10
|
+
// Sign-in on a persona page is a mount point plus the SDK that fills it. Both are trivial, and that is
|
|
11
|
+
// exactly the problem: a surface hand-writing its own toolbar copies them BY HAND, and half a copy
|
|
12
|
+
// fails silently. `files` carried `<div data-justai-auth>` in precisely the right place and never
|
|
13
|
+
// loaded the script — so the div sat there, empty, for as long as anybody looked at it. Nothing
|
|
14
|
+
// errored. There is no avatar and no error to explain its absence, which is the worst shape a defect
|
|
15
|
+
// can take.
|
|
16
|
+
//
|
|
17
|
+
// Found 2026-07-31 by the founder noticing the avatar was simply not there. Measured across the
|
|
18
|
+
// ecosystem at that moment: the cut had both halves, `files` had one, `me` had neither, and `feed`
|
|
19
|
+
// had its own copy of both — four surfaces, three different answers to one question.
|
|
20
|
+
//
|
|
21
|
+
// So the pair ships as a unit. A surface either has sign-in or does not; it can no longer have half.
|
|
22
|
+
//
|
|
23
|
+
// WHY THE THREE SURFACES CANNOT JUST USE `Toolbar`: `/me`, `/files` and the feed carry navigation of
|
|
24
|
+
// their own — a vault link, a host link, a back-to-persona mark — so they hand-write the toolbar
|
|
25
|
+
// markup and always will. That is the same reason `personaScroll` moved down into @justai/core. What
|
|
26
|
+
// cannot be shared is the markup; what CAN be shared is every load-bearing piece inside it, and this
|
|
27
|
+
// is one of them.
|
|
28
|
+
//
|
|
29
|
+
// The origin is deliberately absolute. This is inherited from auth.justai.pro — one Google client for
|
|
30
|
+
// the whole ecosystem, sign in once and you are you on every persona — so the src is that host and
|
|
31
|
+
// never a local path, on every domain that mounts it.
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
<div data-justai-auth></div>
|
|
35
|
+
<script is:inline defer src="https://auth.justai.pro/sdk.js"></script>
|
package/src/Toolbar.astro
CHANGED
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
// persona's, so it comes from the persona. Omit it and the bust stays — adopting this is each
|
|
23
23
|
// persona's own decision, taken when its mark exists, and nothing moves in the fleet without it.
|
|
24
24
|
// Note what a mark cannot do: an <img> ignores `currentColor`, so `.active`'s accent never reaches
|
|
25
|
-
// it.
|
|
25
|
+
// it. It is not replaced with anything: the title strip already closes on this cut and opens off
|
|
26
|
+
// it, and a mark is an identity rather than a UI state. Slot presence adds `.tb-mark`, which the
|
|
27
|
+
// sizing rule uses.
|
|
26
28
|
// • langPicker — needs the persona's own locale data (the list must NOT live in the shared package —
|
|
27
29
|
// it bit us twice; see @justai/ui/locale) → a slot the persona fills with its <LangPicker/>.
|
|
28
30
|
// • navExtra — optional extra nav item after Posts (e.g. the timers' fullscreen button) → slot.
|
|
@@ -51,6 +53,7 @@ interface Props {
|
|
|
51
53
|
}
|
|
52
54
|
import BackToZone from "./BackToZone.astro";
|
|
53
55
|
const { sectionsLabel, profileLabel, kernelLabel, postsLabel, home = true, files = true, filesLabel = "Files" } = Astro.props;
|
|
56
|
+
import AuthMount from "./AuthMount.astro";
|
|
54
57
|
---
|
|
55
58
|
|
|
56
59
|
<header class="toolbar">
|
|
@@ -67,8 +70,7 @@ const { sectionsLabel, profileLabel, kernelLabel, postsLabel, home = true, files
|
|
|
67
70
|
in the fleet moves on the day this ships.
|
|
68
71
|
|
|
69
72
|
`tb-mark` is set from slot PRESENCE, not from a prop somebody could forget to keep in step. It
|
|
70
|
-
exists
|
|
71
|
-
"you are here" would never reach it. The class moves that signal to opacity instead. */}
|
|
73
|
+
exists so the sizing rule can find the image; it deliberately does NOT restyle the mark. */}
|
|
72
74
|
<a
|
|
73
75
|
class:list={["tb-nav", { "tb-mark": Astro.slots.has("profileIcon") }]}
|
|
74
76
|
id="navProfile"
|
|
@@ -121,13 +123,11 @@ const { sectionsLabel, profileLabel, kernelLabel, postsLabel, home = true, files
|
|
|
121
123
|
<div class="tb-right">
|
|
122
124
|
<slot name="toolbarRight" />
|
|
123
125
|
<slot name="langPicker" />
|
|
124
|
-
<
|
|
126
|
+
<AuthMount />
|
|
125
127
|
</div>
|
|
126
128
|
</div>
|
|
127
129
|
<div class="tb-title" id="tbTitle"><span class="tb-title-text" id="tbTitleText"></span></div>
|
|
128
130
|
</header>
|
|
129
|
-
<!-- justai auth — sign-in avatar menu, inherited from auth.justai.pro (the developer writes only the kernel) -->
|
|
130
|
-
<script is:inline defer src="https://auth.justai.pro/sdk.js"></script>
|
|
131
131
|
|
|
132
132
|
<style>
|
|
133
133
|
/* ---- app toolbar — sticky to the top of the active region (kernel + posts); it never
|
|
@@ -172,15 +172,16 @@ const { sectionsLabel, profileLabel, kernelLabel, postsLabel, home = true, files
|
|
|
172
172
|
.tb-nav:active { transform: scale(0.9); }
|
|
173
173
|
.tb-nav.active { color: var(--accent); }
|
|
174
174
|
|
|
175
|
-
/* A MARK
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
175
|
+
/* A MARK IS NOT DIMMED, AND THE PROFILE CUT DOES NOT NEED IT TO BE.
|
|
176
|
+
It shipped dimmed at rest for one version, on the reasoning that a mark cannot take `currentColor`
|
|
177
|
+
and so needed opacity to say "you are here". Both halves of that were true and the conclusion was
|
|
178
|
+
still wrong, because the state was already being said, louder: `titleFor` in @justai/core returns an
|
|
179
|
+
empty string for `profile`, so the title strip CLOSES on this cut and opens — 26px of layout, naming
|
|
180
|
+
where you are — the moment you leave it. Against that, tinting an icon adds nothing.
|
|
181
|
+
And the two are not the same kind of thing. The three stroke icons are generic glyphs whose colour IS
|
|
182
|
+
a UI state; a mark is an identity. A faded logo does not read as "not current", it reads as disabled.
|
|
183
|
+
So the mark stays itself. Press feedback is not lost: `.tb-nav:active`'s scale applies to it like any
|
|
184
|
+
other item. `.tb-mark` remains, because the sizing rule below still needs to know an image is here. */
|
|
184
185
|
/* The shell sizes the mark and says NOTHING about `display`, deliberately. Two files arrive for the two
|
|
185
186
|
themes — an SVG's internal `prefers-color-scheme` does not survive <img>, measured — and the persona
|
|
186
187
|
hides one with a media query. A `display: block` here would be two classes deep against the persona's
|