@justai/cuts 0.97.0 → 0.99.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/ChildPersona.astro +1 -1
- package/src/Posts.astro +15 -3
- package/src/Sheet.astro +2 -1
- package/src/tagline.js +58 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justai/cuts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.99.0",
|
|
4
4
|
"description": "A persona's named parts — the page shell that holds them, and the cuts themselves.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"./ActionRow.astro": "./src/ActionRow.astro",
|
|
29
29
|
"./Files.astro": "./src/FilePicker.astro",
|
|
30
30
|
"./AuthMount.astro": "./src/AuthMount.astro",
|
|
31
|
-
"./ChildPersona.astro": "./src/ChildPersona.astro"
|
|
31
|
+
"./ChildPersona.astro": "./src/ChildPersona.astro",
|
|
32
|
+
"./tagline.js": "./src/tagline.js"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
35
|
"astro": ">=5"
|
package/src/ChildPersona.astro
CHANGED
|
@@ -223,7 +223,7 @@ const chrome = face === "page";
|
|
|
223
223
|
* child's own `.pp .x` rule ties with this one and wins on order, so a child that needs to differ
|
|
224
224
|
* still can, without !important and without knowing anything about this file. */
|
|
225
225
|
|
|
226
|
-
.pp { min-height: 100vh; min-height: 100dvh; } /* the
|
|
226
|
+
.pp { min-height: 100vh; min-height: 100dvh; } /* the pair survives — see @justai/astro-config */
|
|
227
227
|
.pp a { color: inherit; text-decoration: none; }
|
|
228
228
|
|
|
229
229
|
/* the column — the fleet's one presentation at every width */
|
package/src/Posts.astro
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
import { tagline } from "./tagline.js";
|
|
2
3
|
// ░░ POSTS cut — a persona's feed, revealed by scrolling past the Kernel. ░░
|
|
3
4
|
//
|
|
4
5
|
// The feed's markup, its styling, AND its runtime loader were byte-near-identical across every persona
|
|
@@ -50,7 +51,14 @@
|
|
|
50
51
|
interface Props {
|
|
51
52
|
handle: string; // the persona KEY — the feed query (?persona=) and the "is this reply mine?" test
|
|
52
53
|
name: string; // the persona's display name; rendered RAW, so a name may carry markup (justai's ".pro")
|
|
53
|
-
|
|
54
|
+
// queries: footer prop · made to matter · the tagline is not in my locale files
|
|
55
|
+
//
|
|
56
|
+
// THE HOUSE LINE IS THE HOUSE'S, and it moved here on 2026-08-04. It was thirteen strings in every
|
|
57
|
+
// persona's locale files — ~195 copies of one sentence nobody would want to differ, and it had
|
|
58
|
+
// already drifted in one of them without anything being able to notice. Pass `lang` and this cut
|
|
59
|
+
// says it; pass `footer` only to say something else on purpose. See `tagline.js`.
|
|
60
|
+
lang?: string; // BCP-47 code of the page; picks the house tagline
|
|
61
|
+
footer?: string; // an override — the persona saying something other than the house line
|
|
54
62
|
avatarBg?: string; // post-avatar tile background (default #fff)
|
|
55
63
|
avatarBgLight?: string; // light-scheme override for that tile (a dark gradient must invert, not stay dark)
|
|
56
64
|
// Which file is THIS persona's face in the feed. Defaults to /icon.svg, which every persona serves at its
|
|
@@ -73,7 +81,11 @@ interface Props {
|
|
|
73
81
|
// the ground. The page's own media query is reliable, so the page picks the file and the file stays dumb.
|
|
74
82
|
avatarSrcDark?: string;
|
|
75
83
|
}
|
|
76
|
-
const { handle, name, footer, avatarBg, avatarBgLight, avatarSrc, avatarBare, avatarSrcDark } = Astro.props;
|
|
84
|
+
const { handle, name, lang, footer, avatarBg, avatarBgLight, avatarSrc, avatarBare, avatarSrcDark } = Astro.props;
|
|
85
|
+
// The override wins where it is given; otherwise the family's own line, in this page's language.
|
|
86
|
+
// `Astro.currentLocale` is the fallback for a caller that passes neither, so an older persona that
|
|
87
|
+
// has not been bumped yet still closes its feed in the right language rather than in English.
|
|
88
|
+
const foot = footer ?? tagline(lang ?? Astro.currentLocale ?? "en");
|
|
77
89
|
const vars = [
|
|
78
90
|
avatarBg && `--feed-av-bg:${avatarBg}`,
|
|
79
91
|
avatarBgLight && `--feed-av-bg-light:${avatarBgLight}`,
|
|
@@ -93,7 +105,7 @@ const vars = [
|
|
|
93
105
|
<!-- filled at runtime by the loader below (lazy, on Posts-cut intersection) — single source: the console -->
|
|
94
106
|
<div id="feed"></div>
|
|
95
107
|
<footer class="z-foot">
|
|
96
|
-
<a href="https://justai.pro">justai.pro</a> · {
|
|
108
|
+
<a href="https://justai.pro">justai.pro</a> · {foot}
|
|
97
109
|
{/* the change-your-mind door: hidden until the shell's consent script labels + reveals it
|
|
98
110
|
(Base owns the behavior and the localized label; this cut only owns the placement). On a
|
|
99
111
|
page with no analytics — and so no consent banner — it simply never appears. */}
|
package/src/Sheet.astro
CHANGED
|
@@ -328,7 +328,8 @@ const doneIsOurs = doneDefault || done === true;
|
|
|
328
328
|
literal here is the fleet's real width, not a historical one: it was 768 for an afternoon and
|
|
329
329
|
the sheet quietly rendered at 768 on a 640 fleet, which is how that was found. */
|
|
330
330
|
width: min(100%, var(--sheet-width, var(--column, 640px)));
|
|
331
|
-
|
|
331
|
+
/* dvh is Chromium 108+; the fallback above it survives because the build has targets. */
|
|
332
|
+
max-height: min(92vh, 100vh - 24px);
|
|
332
333
|
max-height: min(92dvh, 100dvh - 24px);
|
|
333
334
|
/* The material the fleet already agreed reads as legible glass (ConfirmSheet, 93%). */
|
|
334
335
|
background: color-mix(in srgb, var(--bg) 93%, transparent);
|
package/src/tagline.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// THE HOUSE LINE — one sentence, thirteen languages, one copy.
|
|
2
|
+
//
|
|
3
|
+
// queries: made to matter · footer tagline · the line under justai.pro · footer string · why is the
|
|
4
|
+
// tagline not in my locale files · anlam katmak için · tagline translations · footer prop
|
|
5
|
+
//
|
|
6
|
+
// ── 195 COPIES OF ONE SENTENCE ──────────────────────────────────────────────────────────────────
|
|
7
|
+
//
|
|
8
|
+
// "made to matter" closes every persona's feed, and until 2026-08-04 it lived in each persona's own
|
|
9
|
+
// thirteen locale files: thirteen strings × fifteen personas, ~195 copies of a line nobody would ever
|
|
10
|
+
// want to differ. It had already drifted — one persona's footer read "Speech to Text · app.zone",
|
|
11
|
+
// which is not the house line at all, and nothing anywhere could have noticed.
|
|
12
|
+
//
|
|
13
|
+
// The founder named it while a fourteenth copy was being written: *"neden su footer de justai web
|
|
14
|
+
// framework componenti olarak girmez ki? su tekrar eden code lardan kurtulmamiz lazim."* A line the
|
|
15
|
+
// whole family says together belongs to the family.
|
|
16
|
+
//
|
|
17
|
+
// ── WHY A TABLE HERE RATHER THAN A PROP FROM THE PERSONA ────────────────────────────────────────
|
|
18
|
+
//
|
|
19
|
+
// The rule this repo already keeps: a component brings its own ground. A cut that needs a sentence
|
|
20
|
+
// and asks its host for it has pushed thirteen translations into every host, which is the same
|
|
21
|
+
// duplication wearing an interface. So the sentence lives with the component that renders it, and the
|
|
22
|
+
// persona hands over only the one thing it alone knows — which language this page is in.
|
|
23
|
+
//
|
|
24
|
+
// A persona may still override it. `stt` is why: whether its divergence is deliberate or an old
|
|
25
|
+
// accident, taking the escape hatch away would decide that question by deleting it.
|
|
26
|
+
|
|
27
|
+
/** The tagline, by BCP-47 code. `en` is the fallback for anything unlisted. */
|
|
28
|
+
export const TAGLINE = {
|
|
29
|
+
en: "made to matter",
|
|
30
|
+
tr: "anlam katmak için",
|
|
31
|
+
de: "made to matter",
|
|
32
|
+
es: "hecha para importar",
|
|
33
|
+
fr: "créé pour compter",
|
|
34
|
+
it: "fatto per contare",
|
|
35
|
+
nl: "gemaakt om ertoe te doen",
|
|
36
|
+
pt: "feita para importar",
|
|
37
|
+
ru: "создан, чтобы быть нужным",
|
|
38
|
+
ja: "意味あるものへ",
|
|
39
|
+
zh: "为打动人心而生",
|
|
40
|
+
ar: "صُنعت لتترك أثرًا",
|
|
41
|
+
hi: "जो मायने रखने के लिए बना है",
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The line for a language, however it arrives.
|
|
46
|
+
*
|
|
47
|
+
* `de` genuinely answers "made to matter" — that is the translation the fleet shipped, not a hole in
|
|
48
|
+
* this table, and it is written out rather than left to fall through so nobody "fixes" it by adding a
|
|
49
|
+
* German line that no persona ever displayed.
|
|
50
|
+
*
|
|
51
|
+
* A region tag is taken off before the lookup (`pt-BR` → `pt`): a visitor whose browser says
|
|
52
|
+
* `en-GB` should not drop to the fallback that happens to be the same string, because the day the
|
|
53
|
+
* fallback changes that coincidence stops holding.
|
|
54
|
+
*/
|
|
55
|
+
export function tagline(lang) {
|
|
56
|
+
const key = String(lang || "en").toLowerCase().split("-")[0];
|
|
57
|
+
return TAGLINE[key] ?? TAGLINE.en;
|
|
58
|
+
}
|