@justai/cuts 0.81.0 → 0.83.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.81.0",
3
+ "version": "0.83.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": {
@@ -37,7 +37,7 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@justai/core": "^0.11.0",
40
+ "@justai/core": "^0.12.0",
41
41
  "@justai/ui": "^0",
42
42
  "@justai/atrium": "^0.1.9"
43
43
  }
@@ -103,6 +103,13 @@ interface Props {
103
103
  bio?: string;
104
104
  /** The small print under the bio — what it costs, what it keeps. */
105
105
  meta?: string;
106
+ /** The child's own colours for its avatar well. Genuinely per-child taste: /me is a dark vault,
107
+ * /files is a light sheet of paper. */
108
+ avatarBg?: string;
109
+ avatarBgLight?: string;
110
+ avatarPad?: string;
111
+ /** The cover behind the profile. Defaults to the host persona's accent, which is the point. */
112
+ cover?: string;
106
113
  /** The host persona's face, if the page already resolved it server-side. Otherwise `childFace()`
107
114
  * fills it in at runtime from /api/face — see @justai/core. */
108
115
  host?: { name?: string; avatar?: string; accent?: string };
@@ -121,6 +128,10 @@ const {
121
128
  child, name, bio, meta, host,
122
129
  parentHref = "/#kernel", parentLabel = "Home",
123
130
  sectionsLabel = "Sections", profileLabel, kernelLabel, face = "page",
131
+ avatarBg = "linear-gradient(160deg, #1f2740, #11141f)",
132
+ avatarBgLight = "linear-gradient(160deg, #f4f6fb, #fff)",
133
+ avatarPad = "15px",
134
+ cover = "linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #000))",
124
135
  } = Astro.props;
125
136
  // `page` is the default because it is the face a child shows when nobody asked for one — somebody
126
137
  // typed the address. A guest is always ASKED for, which is why the caller names it.
@@ -140,15 +151,25 @@ const chrome = face === "page";
140
151
  it IS the page, so it wears the whole persona shape. */}
141
152
  {chrome ? (
142
153
  <>
154
+ {/* queries: pnName pnHandle pnMeta · the child persona shows the wrong name · host identity
155
+ in a child's profile · why are there spans in these strings
156
+ THE IDS ARE THE CONTRACT, and they are here rather than in each child because both
157
+ children were already doing this identically.
158
+ A child persona ADOPTS ITS HOST'S IDENTITY at runtime: the page is built once and mounted
159
+ on every persona's host, so the name, the handle and the small print cannot be known at
160
+ build time. They are rendered as spans with stable ids and rewritten by `childFace()` in
161
+ @justai/core once /api/face answers. What the server renders is the honest fallback — the
162
+ child's own words, correct if the lookup never returns. */}
143
163
  <Profile
144
- name={name}
145
- handle={`@${child}`}
146
- bio={bio}
147
- meta={meta}
164
+ name={`<span id="pnName">${name}</span><span class="pro" id="pnFacet"></span>`}
165
+ handle={`<span id="pnHandle">@${child}</span>`}
166
+ bio={bio ? `<span id="pnBio">${bio}</span>` : undefined}
167
+ meta={`<span id="pnMeta">${meta ?? ""}</span>`}
148
168
  kernelLabel={name}
149
- avatarBg="#fff"
150
- avatarPad="14px"
151
- cover="linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #000))"
169
+ avatarBg={avatarBg}
170
+ avatarBgLight={avatarBgLight}
171
+ avatarPad={avatarPad}
172
+ cover={cover}
152
173
  >
153
174
  <Fragment slot="avatar"><slot name="mark" /></Fragment>
154
175
  </Profile>
@@ -166,6 +187,13 @@ const chrome = face === "page";
166
187
  <slot name="langPicker" slot="langPicker" />
167
188
  </Toolbar>
168
189
  <section class="cut kernel" id="kernel"><slot /></section>
190
+ {/* queries: where does the footer go · z-foot · content after the kernel
191
+ AFTER the kernel, still inside `.below`. The kernel is `min-height: 100dvh`, so anything
192
+ placed in its flow sits inside that screenful rather than below it — measured when
193
+ /files' footer was swept into the default slot and jumped 465px up the page. A named
194
+ slot is the difference between "after the kernel" and "at the end of the kernel", and
195
+ only the child knows which it meant. */}
196
+ <slot name="foot" />
169
197
  </div>
170
198
  </>
171
199
  ) : (