@justai/core 0.34.1 → 0.35.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/index.js +50 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justai/core",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The framework-free heart of the persona shell
|
|
3
|
+
"version": "0.35.0",
|
|
4
|
+
"description": "The framework-free heart of the persona shell — the load-bearing behaviour (auth capture, reveal, ready) as plain strings, so Astro and Next inject the SAME logic instead of each re-writing it.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
package/src/index.js
CHANGED
|
@@ -135,6 +135,28 @@ export const XRAY_JS = `(() => {
|
|
|
135
135
|
// the kernel's centre on the screen as a point you can hold something against. Blue, because it
|
|
136
136
|
// is the one thing on this overlay that is not a boundary — it is a reference.
|
|
137
137
|
".xr-c{position:fixed;background:rgba(61,111,217,.55);pointer-events:none;z-index:2147483000}",
|
|
138
|
+
// ── THE ARMATURE, AND IT IS ON IN EVERY TEMPLATE ──────────────────────────────────────────
|
|
139
|
+
// queries: diagonals · armature · regulating lines · traces regulateurs · where should this sit
|
|
140
|
+
// harmonic armature · rabatment · why are there diagonals over my kernel
|
|
141
|
+
//
|
|
142
|
+
// The lines the frame ALREADY CONTAINS: its two corner diagonals, the eight half-diagonals from
|
|
143
|
+
// each corner to the midpoints of the two sides it does not touch, and the rabatments — fold the
|
|
144
|
+
// short side onto the long and mark where it lands. Charles Bouleau reverse-engineered this
|
|
145
|
+
// fourteen-line lattice out of Raphael, Velazquez and Vermeer (The Painter's Secret Geometry,
|
|
146
|
+
// 1963); Jay Hambidge had the same lattice in 1920 as dynamic symmetry. Every crossing is a
|
|
147
|
+
// place the rectangle itself proposes, which is why an edge that lands on one reads as chosen
|
|
148
|
+
// and an edge two pixels off reads as approximate.
|
|
149
|
+
//
|
|
150
|
+
// THE CENTRE CROSS WAS ALREADY TWO OF THE FOURTEEN and nobody had noticed: the midlines. This
|
|
151
|
+
// draws the other twelve, so the instrument stops being only a set of boundaries and starts
|
|
152
|
+
// being a set of PROPOSALS as well.
|
|
153
|
+
//
|
|
154
|
+
// It is blue, like the cross, because the fleet's own colour grammar here is warm-for-boundary
|
|
155
|
+
// and blue-for-reference. Fainter than the cross: the centre is one place, the armature is
|
|
156
|
+
// twelve lines, and twelve lines at the cross's weight is a drawing rather than a guide.
|
|
157
|
+
".xr-arm{position:fixed;pointer-events:none;z-index:2147483000;overflow:visible}",
|
|
158
|
+
".xr-arm path{fill:none;stroke:rgba(61,111,217,.3);stroke-width:1;vector-effect:non-scaling-stroke}",
|
|
159
|
+
".xr-arm path.rab{stroke:rgba(61,111,217,.22);stroke-dasharray:6 5}",
|
|
138
160
|
".xr-read{position:fixed;left:12px;bottom:12px;pointer-events:none;z-index:2147483001;",
|
|
139
161
|
"display:grid;grid-template-columns:auto 1fr;gap:2px 12px;padding:10px 12px;border-radius:10px;",
|
|
140
162
|
"background:rgba(20,22,28,.92);color:#f2f4f8;font:400 .78rem/1.35 ui-monospace,SFMono-Regular,Menlo,monospace}",
|
|
@@ -151,6 +173,13 @@ export const XRAY_JS = `(() => {
|
|
|
151
173
|
var act = mk("xr-f xr-act", "<i>action safe</i>");
|
|
152
174
|
var ttl = mk("xr-f xr-ttl", "<i>title safe</i>");
|
|
153
175
|
var cross = [0,1].map(() => mk("xr-c"));
|
|
176
|
+
var NS = "http://www.w3.org/2000/svg";
|
|
177
|
+
var arm = document.createElementNS(NS, "svg");
|
|
178
|
+
arm.setAttribute("class", "xr-arm");
|
|
179
|
+
var armMain = document.createElementNS(NS, "path");
|
|
180
|
+
var armRab = document.createElementNS(NS, "path"); armRab.setAttribute("class", "rab");
|
|
181
|
+
arm.appendChild(armMain); arm.appendChild(armRab);
|
|
182
|
+
document.body.appendChild(arm);
|
|
154
183
|
var read = mk("xr-read");
|
|
155
184
|
|
|
156
185
|
var row = (label) => {
|
|
@@ -191,6 +220,27 @@ export const XRAY_JS = `(() => {
|
|
|
191
220
|
cross.forEach((el, i) => { el.style.left = t[i][0] + "px"; el.style.top = t[i][1] + "px";
|
|
192
221
|
el.style.width = t[i][2] + "px"; el.style.height = t[i][3] + "px"; });
|
|
193
222
|
|
|
223
|
+
// The armature is drawn in the frame's own coordinates and laid over the frame exactly, so it
|
|
224
|
+
// moves and rescales with the kernel and never needs a number of its own.
|
|
225
|
+
var W = r.width, H = r.height;
|
|
226
|
+
arm.style.left = r.left + "px"; arm.style.top = r.top + "px";
|
|
227
|
+
arm.setAttribute("width", W); arm.setAttribute("height", H);
|
|
228
|
+
arm.setAttribute("viewBox", "0 0 " + W + " " + H);
|
|
229
|
+
var seg = (x1, y1, x2, y2) => "M" + x1 + " " + y1 + "L" + x2 + " " + y2;
|
|
230
|
+
var d = [seg(0, 0, W, H), seg(W, 0, 0, H)];
|
|
231
|
+
// Each corner reaches the midpoints of the two sides it does NOT lie on — eight lines, and the
|
|
232
|
+
// pairs of them that cross mark the thirds and the fifths without anybody dividing anything.
|
|
233
|
+
d.push(seg(0, 0, W, H / 2), seg(0, 0, W / 2, H));
|
|
234
|
+
d.push(seg(W, 0, 0, H / 2), seg(W, 0, W / 2, H));
|
|
235
|
+
d.push(seg(W, H, W / 2, 0), seg(W, H, 0, H / 2));
|
|
236
|
+
d.push(seg(0, H, W / 2, 0), seg(0, H, W, H / 2));
|
|
237
|
+
armMain.setAttribute("d", d.join(""));
|
|
238
|
+
// RABATMENT: fold the short side onto the long one. Where it lands is the square, and what is
|
|
239
|
+
// left over is the rectangle the frame is "made of" — in a golden frame, another golden frame.
|
|
240
|
+
var rab = W > H ? [seg(H, 0, H, H), seg(W - H, 0, W - H, H)]
|
|
241
|
+
: H > W ? [seg(0, W, W, W), seg(0, H - W, W, H - W)] : [];
|
|
242
|
+
armRab.setAttribute("d", rab.join(""));
|
|
243
|
+
|
|
194
244
|
var aw = app ? app.getBoundingClientRect().width : r.width;
|
|
195
245
|
put(R.viewport, Math.round(innerWidth) + " x " + Math.round(innerHeight));
|
|
196
246
|
put(R.column, px(aw), aw <= 640);
|