visualproof 0.4.3 → 0.5.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/README.md +16 -7
- package/dist/assets/latex/visualproof.sty +19 -9
- package/dist/assets/tips/tour-agent.webp +0 -0
- package/dist/assets/tips/tour-arrange.webp +0 -0
- package/dist/assets/tips/tour-artwork.webp +0 -0
- package/dist/assets/tips/tour-checks.webp +0 -0
- package/dist/assets/tips/tour-keys.webp +0 -0
- package/dist/assets/tips/tour-library.webp +0 -0
- package/dist/assets/tips/tour-project.webp +0 -0
- package/dist/assets/tips/tour-review.webp +0 -0
- package/dist/assets/tips/tour-share.webp +0 -0
- package/dist/assets/tips/tour-source.webp +0 -0
- package/dist/assets/tips/tour-target.webp +0 -0
- package/dist/assets/tips/tour-view.webp +0 -0
- package/dist/assets/tips/tour.json +117 -112
- package/dist/assets/tips/tour.webp +0 -0
- package/dist/mcp/visualproof-mcp.mjs +7 -3
- package/dist/server/access.js +37 -1
- package/dist/server/accesspage.js +130 -0
- package/dist/server/agent.js +11 -5
- package/dist/server/agentlibrary.js +1 -1
- package/dist/server/agentviews.js +1 -1
- package/dist/server/artcmd.js +1 -1
- package/dist/server/askfollow.js +1 -4
- package/dist/server/buildwatch.js +133 -0
- package/dist/server/deploy.js +844 -0
- package/dist/server/doctor.js +15 -3
- package/dist/server/events.js +20 -5
- package/dist/server/export.js +17 -4
- package/dist/server/fetchurl.js +30 -13
- package/dist/server/film.js +1 -1
- package/dist/server/history.js +3 -1
- package/dist/server/historyapi.js +100 -50
- package/dist/server/historythread.js +206 -0
- package/dist/server/hover.js +8 -0
- package/dist/server/identity.js +25 -1
- package/dist/server/library.js +10 -3
- package/dist/server/live.js +206 -28
- package/dist/server/lostfound.js +3 -2
- package/dist/server/main.js +361 -50
- package/dist/server/poppler.js +48 -10
- package/dist/server/renames.js +10 -5
- package/dist/server/review.js +32 -2
- package/dist/server/reviewapi.js +1 -1
- package/dist/server/status.js +144 -50
- package/dist/server/talk.js +7 -2
- package/dist/server/usage.js +51 -0
- package/dist/server/views.js +21 -7
- package/dist/shared/board.js +2 -1
- package/dist/shared/collab.js +14 -8
- package/dist/shared/deploy.js +35 -0
- package/dist/shared/doc/latex.js +5 -3
- package/dist/shared/doc/outline.js +6 -3
- package/dist/shared/layout.js +297 -70
- package/dist/shared/libm.js +366 -0
- package/dist/shared/library.js +11 -6
- package/dist/shared/palette.js +1 -1
- package/dist/shared/review.js +7 -5
- package/dist/shared/search.js +7 -3
- package/dist/shared/separate.js +556 -32
- package/dist/shared/views.js +8 -1
- package/dist/web/bundle/app.js +3595 -1520
- package/dist/web/bundle/edges.js +44 -16
- package/dist/web/bundle/layout.js +1026 -80
- package/dist/web/index.html +2 -2
- package/dist/web/src/artwork.js +25 -4
- package/dist/web/src/axiomring.js +42 -0
- package/dist/web/src/bundles.js +52 -16
- package/dist/web/src/canvas.js +109 -54
- package/dist/web/src/overview.js +4 -1
- package/dist/web/src/past.js +28 -0
- package/dist/web/src/scene.js +13 -12
- package/dist/web/src/selection.js +47 -4
- package/dist/web/src/status.js +32 -2
- package/dist/web/src/theme.js +108 -0
- package/dist/web/style.css +181 -45
- package/docs/agent-api/following.md +1 -1
- package/docs/agent-api/history.md +3 -0
- package/docs/agent-api/library.md +1 -1
- package/docs/agent-api/requests.md +4 -1
- package/docs/agent-api/views.md +1 -1
- package/package.json +1 -1
package/dist/web/index.html
CHANGED
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
<div id="tm-list" class="glass" role="dialog" aria-label="What changed since" hidden></div>
|
|
135
135
|
<div id="tm-kept" class="glass" hidden></div>
|
|
136
136
|
<div id="trust-pop" class="glass" role="dialog" aria-label="Trust without review" hidden></div>
|
|
137
|
-
<div id="hint" class="hint" hidden></div>
|
|
137
|
+
<div id="hint" class="hint" role="status" aria-live="polite" hidden></div>
|
|
138
138
|
<div id="mode-tip" class="mode-tip glass" role="tooltip" hidden></div>
|
|
139
139
|
<!-- the review strip, wherever the review has a focus: one line of progress -->
|
|
140
140
|
<div id="lensbar" class="glass" hidden>
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
<!-- what is trusted without review: the review's, the same on every board -->
|
|
186
186
|
<div id="trust-list" class="glass side-pop" role="dialog" aria-label="Trusted without review" hidden></div>
|
|
187
187
|
|
|
188
|
-
<aside id="panel" class="glass"></aside>
|
|
188
|
+
<aside id="panel" class="glass" aria-label="The panel"></aside>
|
|
189
189
|
<aside id="activity" class="glass" aria-label="Activity"></aside>
|
|
190
190
|
<!-- what was said of declarations the graph no longer has, and the migrations: in Activity's place,
|
|
191
191
|
opened from the build-status popover (web/src/lostfound.ts) -->
|
package/dist/web/src/artwork.js
CHANGED
|
@@ -221,9 +221,10 @@ export function wrapText(text, width, measure) {
|
|
|
221
221
|
}
|
|
222
222
|
/** The notes as the board shows them, written with `ctx` in the screen's pixels — over the board in a
|
|
223
223
|
* PNG, recorded into an SVG: the leader to a declaration and its diamond, the leader to an open card,
|
|
224
|
-
* the mark (its icon, its dot over it as far as it has turned into one) and the card with its text
|
|
225
|
-
* `glyph` draws an icon's glyph, which is SVG: a PNG has it as a picture,
|
|
226
|
-
|
|
224
|
+
* the mark (its icon, its dot over it as far as it has turned into one) and the card with its text
|
|
225
|
+
* and the files it carries. `glyph` draws an icon's glyph, which is SVG: a PNG has it as a picture,
|
|
226
|
+
* an SVG as it is; `image` a file's drawing, a data URL: a PNG decodes it, an SVG holds it. */
|
|
227
|
+
export function drawNotes(ctx, notes, font, glyph, image = () => { }) {
|
|
227
228
|
for (const n of notes) {
|
|
228
229
|
ctx.save();
|
|
229
230
|
if (n.decl) {
|
|
@@ -305,7 +306,7 @@ export function drawNotes(ctx, notes, font, glyph) {
|
|
|
305
306
|
ctx.textBaseline = "alphabetic";
|
|
306
307
|
ctx.font = `12.5px ${font}`;
|
|
307
308
|
ctx.fillStyle = c.textColour;
|
|
308
|
-
const lh = 12.5 * 1.45, bottom = c.y + c.h - 6 - (c.by ? 20 : 0);
|
|
309
|
+
const lh = 12.5 * 1.45, bottom = Math.min(c.y + c.h - 6 - (c.by ? 20 : 0), c.textBottom ?? Infinity);
|
|
309
310
|
let y = c.y + 7 + 12.8;
|
|
310
311
|
for (const line of wrapText(c.text, c.w - 22, (t) => ctx.measureText(t).width)) {
|
|
311
312
|
if (y > bottom + 1)
|
|
@@ -313,6 +314,26 @@ export function drawNotes(ctx, notes, font, glyph) {
|
|
|
313
314
|
ctx.fillText(line, c.x + 12, y);
|
|
314
315
|
y += lh;
|
|
315
316
|
}
|
|
317
|
+
// the files it carries, under its text: each its box, its drawing, its words
|
|
318
|
+
for (const f of c.files ?? []) {
|
|
319
|
+
ctx.fillStyle = f.bg;
|
|
320
|
+
roundRect(ctx, f.x, f.y, f.w, f.h, 6);
|
|
321
|
+
ctx.fill();
|
|
322
|
+
ctx.strokeStyle = c.edge;
|
|
323
|
+
ctx.lineWidth = 1;
|
|
324
|
+
ctx.stroke();
|
|
325
|
+
if (f.image)
|
|
326
|
+
image(f.image.src, f.image.x, f.image.y, f.image.w, f.image.h);
|
|
327
|
+
for (const w of f.words) {
|
|
328
|
+
ctx.font = `${w.weight} ${w.px}px ${font}`;
|
|
329
|
+
ctx.fillStyle = w.colour;
|
|
330
|
+
// as many lines as its box holds, each on the middle of its line
|
|
331
|
+
const most = Math.max(1, Math.round(w.h / w.line));
|
|
332
|
+
wrapText(w.text, w.w + 0.5, (t) => ctx.measureText(t).width)
|
|
333
|
+
.slice(0, most)
|
|
334
|
+
.forEach((line, k) => ctx.fillText(line, w.x, w.y + k * w.line + (w.line + w.px * 0.7) / 2));
|
|
335
|
+
}
|
|
336
|
+
}
|
|
316
337
|
if (c.by) {
|
|
317
338
|
ctx.font = `11px ${font}`;
|
|
318
339
|
ctx.fillStyle = c.byColour;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// An axiom is a ring (CanvasSpec, "Colour schemes and the legend", the owner's decision of
|
|
2
|
+
// 2026-10-18): every axiom on the board — the project's, or outside it — is drawn with a ring of its
|
|
3
|
+
// own colour around its point, a gap apart, in both schemes and every artwork style, so that it is
|
|
4
|
+
// told by its shape where its colour is not told apart (the Kind palette's axiom red and structure
|
|
5
|
+
// green are one colour to a deuteranope). The legend's swatch, the panel's, a card's, the search's
|
|
6
|
+
// and the hover's dots are ringed the same way (style.css, `.dot.axiom`).
|
|
7
|
+
//
|
|
8
|
+
// Its colour is the point's: it says nothing the point does not, and stays apart from the marks the
|
|
9
|
+
// board draws round points, which are the accent's (the selection, the pointer), the readers' own
|
|
10
|
+
// colours (others' selections), gold (a target's star, a key's diamond), the labels' grey (a pin)
|
|
11
|
+
// and a past build's amber and teal. Those stand outside it, a gap further out, and an axiom's name
|
|
12
|
+
// is written beyond it.
|
|
13
|
+
/** The gap between a point's edge and its ring, and the ring's width, in px: wide enough to see at
|
|
14
|
+
* the smallest point (1.3 px), narrow enough not to read as a mark of its own. */
|
|
15
|
+
export const AXIOM_GAP = 1.5;
|
|
16
|
+
export const AXIOM_W = 1.5;
|
|
17
|
+
/** the ring's middle past the point's edge: the renderer's ring offset (gl/renderer.ts, `circle`) */
|
|
18
|
+
export const AXIOM_AT = AXIOM_GAP + AXIOM_W / 2;
|
|
19
|
+
/** how far the ring reaches past the point's edge */
|
|
20
|
+
export const AXIOM_OUT = AXIOM_GAP + AXIOM_W;
|
|
21
|
+
/** a lit point's radius, in points (web/src/canvas.ts, `point`) */
|
|
22
|
+
export const LIT = 1.4;
|
|
23
|
+
/** Whether a declaration of `kind` is drawn ringed: an axiom, of the project or outside it. */
|
|
24
|
+
export function ringed(kind) {
|
|
25
|
+
return kind === "axiom";
|
|
26
|
+
}
|
|
27
|
+
/** How much further out the marks round a point of `kind` go (the pointer's ring, a pin's, a past
|
|
28
|
+
* build's), in px: outside its axiom's ring. */
|
|
29
|
+
export function outside(kind) {
|
|
30
|
+
return ringed(kind) ? AXIOM_OUT : 0;
|
|
31
|
+
}
|
|
32
|
+
/** The radius of the selection's ring and of the others' round a point of `kind` whose radius is
|
|
33
|
+
* `dotR` px, lit as a pick is: clear of its axiom's ring by 2.5 px at every zoom. */
|
|
34
|
+
export function pickRadius(dotR, kind) {
|
|
35
|
+
const base = Math.max(7, dotR + 4);
|
|
36
|
+
return ringed(kind) ? Math.max(base, LIT * dotR + AXIOM_OUT + 2.5) : base;
|
|
37
|
+
}
|
|
38
|
+
/** A declaration's dot on the page (style.css, `.dot`): its colour's class — the outside world's
|
|
39
|
+
* for one outside the project — and, an axiom, its ring. */
|
|
40
|
+
export function kindDot(kind, ext) {
|
|
41
|
+
return `k-${ext ? "external" : kind}${ringed(kind) ? " axiom" : ""}`;
|
|
42
|
+
}
|
package/dist/web/src/bundles.js
CHANGED
|
@@ -29,10 +29,22 @@ export function units(S, k, minPx) {
|
|
|
29
29
|
}
|
|
30
30
|
return out;
|
|
31
31
|
}
|
|
32
|
-
/** Edges between units, counted. `keep` filters nodes (hidden externals, say).
|
|
32
|
+
/** Edges between units, counted. `keep` filters nodes (hidden externals, say). The pairs come in
|
|
33
|
+
* the order each is first met (by the node that uses, then its edges), counted in a hash table of
|
|
34
|
+
* typed arrays: a Map keyed by a · 2^22 + b, numbers past the small integers, took a second and a
|
|
35
|
+
* half a zoom step on NavierStokesAndEuler's 5 million edges, and the overview's edges lagged that
|
|
36
|
+
* long behind a zoom (CanvasSpec, "Edges"). */
|
|
33
37
|
export function aggregate(g, unit, sites, keep) {
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
let size = 1024;
|
|
39
|
+
let slot = new Int32Array(size).fill(-1);
|
|
40
|
+
let A = new Int32Array(256), B = new Int32Array(256), w = new Int32Array(256);
|
|
41
|
+
let n = 0;
|
|
42
|
+
// the pair's slot: its two ids mixed, every bit of them reaching the low ones the slot is read from
|
|
43
|
+
const at = (a, b) => {
|
|
44
|
+
let h = Math.imul(a, 0x9e3779b1) ^ Math.imul(b, 0x85ebca77);
|
|
45
|
+
h = Math.imul(h ^ (h >>> 16), 0x7feb352d);
|
|
46
|
+
return (h ^ (h >>> 15)) & (size - 1);
|
|
47
|
+
};
|
|
36
48
|
for (let u = 0; u < g.n; u++) {
|
|
37
49
|
if (!keep(u))
|
|
38
50
|
continue;
|
|
@@ -46,21 +58,45 @@ export function aggregate(g, unit, sites, keep) {
|
|
|
46
58
|
const b = unit[v];
|
|
47
59
|
if (a === b)
|
|
48
60
|
continue;
|
|
49
|
-
|
|
50
|
-
|
|
61
|
+
let h = at(a, b);
|
|
62
|
+
for (;;) {
|
|
63
|
+
const k = slot[h];
|
|
64
|
+
if (k < 0)
|
|
65
|
+
break;
|
|
66
|
+
if (A[k] === a && B[k] === b)
|
|
67
|
+
break;
|
|
68
|
+
h = (h + 1) & (size - 1);
|
|
69
|
+
}
|
|
70
|
+
if (slot[h] >= 0) {
|
|
71
|
+
w[slot[h]]++;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (n === A.length) {
|
|
75
|
+
const grow = (x) => {
|
|
76
|
+
const y = new Int32Array(2 * x.length);
|
|
77
|
+
y.set(x);
|
|
78
|
+
return y;
|
|
79
|
+
};
|
|
80
|
+
[A, B, w] = [grow(A), grow(B), grow(w)];
|
|
81
|
+
}
|
|
82
|
+
A[n] = a;
|
|
83
|
+
B[n] = b;
|
|
84
|
+
w[n] = 1;
|
|
85
|
+
slot[h] = n++;
|
|
86
|
+
// at most half full: grown, and every pair put again
|
|
87
|
+
if (2 * n > size) {
|
|
88
|
+
size *= 2;
|
|
89
|
+
slot = new Int32Array(size).fill(-1);
|
|
90
|
+
for (let k = 0; k < n; k++) {
|
|
91
|
+
let j = at(A[k], B[k]);
|
|
92
|
+
while (slot[j] >= 0)
|
|
93
|
+
j = (j + 1) & (size - 1);
|
|
94
|
+
slot[j] = k;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
51
97
|
}
|
|
52
98
|
}
|
|
53
|
-
|
|
54
|
-
const out = { n, a: new Int32Array(n), b: new Int32Array(n), w: new Int32Array(n) };
|
|
55
|
-
let k = 0;
|
|
56
|
-
for (const [key, w] of counts) {
|
|
57
|
-
const a = Math.floor(key / W);
|
|
58
|
-
out.a[k] = a;
|
|
59
|
-
out.b[k] = key - a * W;
|
|
60
|
-
out.w[k] = w;
|
|
61
|
-
k++;
|
|
62
|
-
}
|
|
63
|
-
return out;
|
|
99
|
+
return { n, a: A.slice(0, n), b: B.slice(0, n), w: w.slice(0, n) };
|
|
64
100
|
}
|
|
65
101
|
/** Indices of the `cap` highest scores among `idx` (all of them if there are fewer), in no
|
|
66
102
|
* particular order. Linear time: a selection, not a sort. */
|
package/dist/web/src/canvas.js
CHANGED
|
@@ -10,18 +10,20 @@
|
|
|
10
10
|
// folds the reader's selected visitor opens are the reader's alone.
|
|
11
11
|
import { SITE_BODY, SITE_STMT } from "../../shared/graph.js";
|
|
12
12
|
import { rgba } from "./gl/gl.js";
|
|
13
|
-
import { FLAG_DASHED, FLAG_GLOW, FLAG_HALO, FLAG_RADIAL, FLAG_SHADED, Renderer, UNIT_DOT, UNIT_WORLD, bundle, bundlePath, circle, segment } from "./gl/renderer.js";
|
|
13
|
+
import { BUNDLE_STRIDE, FLAG_DASHED, FLAG_GLOW, FLAG_HALO, FLAG_RADIAL, FLAG_SHADED, Renderer, UNIT_DOT, UNIT_WORLD, bundle, bundlePath, circle, segment } from "./gl/renderer.js";
|
|
14
14
|
import { joinChains, pathOf } from "./bundles.js";
|
|
15
15
|
import { EdgeQueue } from "./edgequeue.js";
|
|
16
|
-
import { DIM, aim, blendPoints, ease, weightGap, zoomPoint } from "./overview.js";
|
|
16
|
+
import { DIM, OVERVIEW_CROWD, aim, blendPoints, ease, weightGap, zoomPoint } from "./overview.js";
|
|
17
17
|
import { MODE_SITES } from "../../shared/viewgraph.js";
|
|
18
18
|
import { escapeHtml } from "./highlight.js";
|
|
19
19
|
import { ART_DISPLAY, ART_SANS, ART_SERIF, spacedWidth, writeNames } from "./halo.js";
|
|
20
20
|
import { artNameId } from "../../shared/collab.js";
|
|
21
21
|
import { dragKeyHeld, dragMoves, menuClick } from "./drag.js";
|
|
22
22
|
import { Motion } from "./motion.js";
|
|
23
|
-
import {
|
|
23
|
+
import { onThemeChange, reducedMotion } from "./theme.js";
|
|
24
|
+
import { clusterTroubles, ST_APPROVED, ST_COMMENTED, ST_TRUSTED, ST_UNREVIEWED, STATUSES } from "./status.js";
|
|
24
25
|
import { LEAF_R, Scene } from "./scene.js";
|
|
26
|
+
import { AXIOM_AT, AXIOM_OUT, AXIOM_W, kindDot, LIT, outside, pickRadius, ringed } from "./axiomring.js";
|
|
25
27
|
import { markWords, PAST_CHANGED, PAST_GHOST, PAST_RENAMED } from "./past.js";
|
|
26
28
|
import { clearOfBoxes } from "./visitors.js";
|
|
27
29
|
import { openFor, placeVisits, planOn, visitChain, visitWorld } from "./visits.js";
|
|
@@ -85,6 +87,7 @@ export function themeOf(v) {
|
|
|
85
87
|
pin: rgba(v("--label")),
|
|
86
88
|
edgeFrom: rgba(v("--edge-from")),
|
|
87
89
|
edgeTo: rgba(v("--edge-to")),
|
|
90
|
+
edgeCrowd: Math.max(0, parseFloat(v("--edge-crowd")) || 0),
|
|
88
91
|
kind,
|
|
89
92
|
ext: rgba(v("--k-external")),
|
|
90
93
|
lit: rgba(v("--accent")),
|
|
@@ -108,6 +111,14 @@ function sameTarget(a, b) {
|
|
|
108
111
|
return a.c === b.c;
|
|
109
112
|
return a.k === b.k;
|
|
110
113
|
}
|
|
114
|
+
/** How much fainter each of `n` edges drawn at once is, beyond what every theme does, where more than
|
|
115
|
+
* `from` are: (from / n)^crowd, the theme's `crowd` (Theme.edgeCrowd; 1 for a crowd of 0). Edges
|
|
116
|
+
* that cross add up towards the colour of their mix, at full opacity once enough of them do: on the
|
|
117
|
+
* light ground a dense bundle reads as ink, on the dark one as light — the orange and the blue of
|
|
118
|
+
* hundreds of edges a pink-white haze. The dark theme has them step back as they grow many. */
|
|
119
|
+
export function crowdFade(n, from, crowd) {
|
|
120
|
+
return crowd > 0 && n > from ? (from / n) ** crowd : 1;
|
|
121
|
+
}
|
|
111
122
|
/** A colour at `k` of its opacity. */
|
|
112
123
|
const fade = (c, k) => [c[0], c[1], c[2], c[3] * k];
|
|
113
124
|
/** How many lit declarations the board gives a card at zoom `k`: a card's name is what an artwork
|
|
@@ -119,22 +130,6 @@ const CARD_CAP = 180;
|
|
|
119
130
|
/** position ids kept past the scene's for the visitors and their temporary clusters, whose edges are
|
|
120
131
|
* bundled through them (web/src/visits.ts, visitChain) */
|
|
121
132
|
const VISIT_SLOTS = 256;
|
|
122
|
-
/** A file cluster's own build trouble, as a Status code (failed, building, sorry), or -1: what its
|
|
123
|
-
* outline shows in the Status scheme. Trouble inherited from below (blocked, out of date because
|
|
124
|
-
* something under it changed) is left out, so that one failure does not ring every file above it. */
|
|
125
|
-
function troubleOf(f) {
|
|
126
|
-
switch (f?.state) {
|
|
127
|
-
case "failed":
|
|
128
|
-
case "unbuilt":
|
|
129
|
-
return ST_FAILED;
|
|
130
|
-
case "building":
|
|
131
|
-
return ST_BUILDING;
|
|
132
|
-
case "sorry":
|
|
133
|
-
return ST_SORRY;
|
|
134
|
-
default:
|
|
135
|
-
return -1;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
133
|
/** A late zoom point is caught up at up to this many times the zoom's own pace: the drawn blend moves
|
|
139
134
|
* by at most CATCH_UP · |Δz| of weight in a frame where the camera zoomed by Δz zoom points. */
|
|
140
135
|
const CATCH_UP = 2;
|
|
@@ -203,7 +198,8 @@ export class GraphCanvas {
|
|
|
203
198
|
sceneDirty = true;
|
|
204
199
|
anim = null;
|
|
205
200
|
repSeen = -1;
|
|
206
|
-
/** each
|
|
201
|
+
/** each cluster's own build trouble (status.ts, clusterTroubles), -1 for none: its outline in the
|
|
202
|
+
* Status scheme */
|
|
207
203
|
clusterTrouble = new Int8Array(0);
|
|
208
204
|
files = new Map();
|
|
209
205
|
/** how the layout on show clusters: a file's own build trouble outlines its cluster only when
|
|
@@ -302,6 +298,8 @@ export class GraphCanvas {
|
|
|
302
298
|
overviewStyled = "";
|
|
303
299
|
overviewStyle = 0;
|
|
304
300
|
overviewDrawn = "";
|
|
301
|
+
/** counts the themes the board has been drawn in (setTheme): the overview's drawing is of one */
|
|
302
|
+
themeSerial = 0;
|
|
305
303
|
/** the reader's visitors (setVisitors), and those of them selected (ringed as a selected point is) */
|
|
306
304
|
visitors = [];
|
|
307
305
|
visitorSel = [];
|
|
@@ -342,11 +340,9 @@ export class GraphCanvas {
|
|
|
342
340
|
return;
|
|
343
341
|
}
|
|
344
342
|
this.theme = readTheme();
|
|
345
|
-
// light or dark changed (the reader's choice,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
this.invalidate();
|
|
349
|
-
}).observe(document.documentElement, { attributes: true, attributeFilter: ["data-theme"] });
|
|
343
|
+
// light or dark changed (the reader's choice, the system's, an artwork's look): the colours are
|
|
344
|
+
// read again
|
|
345
|
+
onThemeChange(() => this.setTheme(readTheme()));
|
|
350
346
|
new ResizeObserver(() => this.resize()).observe(this.canvas);
|
|
351
347
|
this.resize();
|
|
352
348
|
this.bindInput();
|
|
@@ -376,6 +372,13 @@ export class GraphCanvas {
|
|
|
376
372
|
request() {
|
|
377
373
|
this.dirty = true;
|
|
378
374
|
}
|
|
375
|
+
/** The board's colours are `th` now (the theme on show changed): everything is drawn again in them,
|
|
376
|
+
* the overview's edges too, whose drawing is otherwise kept while what it shows is the same. */
|
|
377
|
+
setTheme(th) {
|
|
378
|
+
this.theme = th;
|
|
379
|
+
this.themeSerial++;
|
|
380
|
+
this.invalidate();
|
|
381
|
+
}
|
|
379
382
|
/** Without a browser (ExportSpec decision 21): draw until nothing more comes — the scene at rest,
|
|
380
383
|
* the overview's points chosen and blended, nothing asking for another frame — at most `most`
|
|
381
384
|
* frames; whether it came to rest. */
|
|
@@ -609,12 +612,9 @@ export class GraphCanvas {
|
|
|
609
612
|
recomputeStates() {
|
|
610
613
|
if (!this.layout)
|
|
611
614
|
return;
|
|
612
|
-
|
|
613
|
-
//
|
|
614
|
-
|
|
615
|
-
if (this.clustering !== "module")
|
|
616
|
-
return;
|
|
617
|
-
this.layout.clusters.forEach((c, k) => (this.clusterTrouble[k] = troubleOf(this.files.get(c.key))));
|
|
615
|
+
// in the file layout a cluster is a module (or a directory of them); under namespaces none has
|
|
616
|
+
// an outline of its own
|
|
617
|
+
this.clusterTrouble = clusterTroubles(this.layout.clusters, this.clustering, this.files);
|
|
618
618
|
}
|
|
619
619
|
setLayout(layout, places, foldedKeys, clustering) {
|
|
620
620
|
this.layout = layout;
|
|
@@ -1417,6 +1417,11 @@ export class GraphCanvas {
|
|
|
1417
1417
|
this.cam = { ...cam };
|
|
1418
1418
|
this.request();
|
|
1419
1419
|
}
|
|
1420
|
+
/** The camera where it is gliding to, at once (reduced motion: GuideSpec decision 4). */
|
|
1421
|
+
arrive() {
|
|
1422
|
+
if (this.camGoal)
|
|
1423
|
+
this.jumpTo(this.camGoal);
|
|
1424
|
+
}
|
|
1420
1425
|
/** Zoom by `f` around the middle of the unobstructed area (the zoom buttons, + and -). */
|
|
1421
1426
|
zoomBy(f) {
|
|
1422
1427
|
const cx = this.insets.left + (this.w - this.insets.left - this.insets.right) / 2;
|
|
@@ -1477,8 +1482,11 @@ export class GraphCanvas {
|
|
|
1477
1482
|
}
|
|
1478
1483
|
this.animate({ x, y, k }, dur);
|
|
1479
1484
|
}
|
|
1480
|
-
/** The camera carried to `goal` over `dur` ms, easing in and out
|
|
1485
|
+
/** The camera carried to `goal` over `dur` ms, easing in and out; with reduced motion there at
|
|
1486
|
+
* once (theme.ts, reducedMotion): a flight, a fit, the zoom buttons, an artwork's frame closing in. */
|
|
1481
1487
|
animate(goal, dur) {
|
|
1488
|
+
if (reducedMotion())
|
|
1489
|
+
return this.jumpTo(goal);
|
|
1482
1490
|
if (this.anim)
|
|
1483
1491
|
cancelAnimationFrame(this.anim);
|
|
1484
1492
|
const { x, y, k } = goal;
|
|
@@ -2045,7 +2053,9 @@ export class GraphCanvas {
|
|
|
2045
2053
|
sel.clear();
|
|
2046
2054
|
if (act && this.edges.length && this.art?.edges !== "none") {
|
|
2047
2055
|
const count = this.edges.length / 3;
|
|
2048
|
-
|
|
2056
|
+
// the theme's own fading (crowdFade) from fewer: a selection's edges are bundled into few
|
|
2057
|
+
// trunks, a hundred of them already one bright band
|
|
2058
|
+
const fade = (count < 250 ? 1 : Math.max(0.25, Math.sqrt(250 / count))) * crowdFade(count, 100, th.edgeCrowd);
|
|
2049
2059
|
const width = count > 4000 ? 1 : 1.6;
|
|
2050
2060
|
const rep = S.nodeRep;
|
|
2051
2061
|
const id = (i) => (rep[i] >= 0 ? rep[i] : S.nc + i);
|
|
@@ -2076,8 +2086,13 @@ export class GraphCanvas {
|
|
|
2076
2086
|
continue;
|
|
2077
2087
|
if (style === "stars") {
|
|
2078
2088
|
const x = this.px[i], y = this.py[i];
|
|
2089
|
+
// an axiom is a ring here too (web/src/axiomring.ts), round its star
|
|
2090
|
+
const ring = ringed(this.g.nodes[i].kind);
|
|
2079
2091
|
if (this.g.isExt(i)) {
|
|
2080
|
-
|
|
2092
|
+
const faint = [0.72, 0.77, 0.88, 0.4 * dim];
|
|
2093
|
+
circle(dots, x, y, 0.6, UNIT_DOT, faint);
|
|
2094
|
+
if (ring)
|
|
2095
|
+
circle(dots, x, y, 0.6, UNIT_DOT, [0, 0, 0, 0], faint, AXIOM_W, 0, AXIOM_AT);
|
|
2081
2096
|
continue;
|
|
2082
2097
|
}
|
|
2083
2098
|
const c = this.colorOf(i);
|
|
@@ -2085,6 +2100,8 @@ export class GraphCanvas {
|
|
|
2085
2100
|
const k = 0.65 + 1.15 * (Math.log1p(this.g.inStart[i + 1] - this.g.inStart[i]) / Math.log1p(most));
|
|
2086
2101
|
circle(glow, x, y, k * 3.4, UNIT_DOT, fade(star, 0.2), null, 0, FLAG_GLOW);
|
|
2087
2102
|
circle(dots, x, y, k, UNIT_DOT, star);
|
|
2103
|
+
if (ring)
|
|
2104
|
+
circle(dots, x, y, k, UNIT_DOT, [0, 0, 0, 0], star, AXIOM_W, 0, AXIOM_AT);
|
|
2088
2105
|
continue;
|
|
2089
2106
|
}
|
|
2090
2107
|
if (style === "cells") {
|
|
@@ -2096,10 +2113,11 @@ export class GraphCanvas {
|
|
|
2096
2113
|
if (style === "stars")
|
|
2097
2114
|
this.constellations(figures, act);
|
|
2098
2115
|
// a pinned point carries a thin ring: where it is was chosen by hand. Nothing else rings a
|
|
2099
|
-
// point but a past graph's marks; status is the Status
|
|
2116
|
+
// point but a past graph's marks and an axiom's own ring, inside them; status is the Status
|
|
2117
|
+
// scheme's (decided 2026-10-08)
|
|
2100
2118
|
for (let i = 0; i < this.g.n; i++) {
|
|
2101
2119
|
if (this.visibleNode(i) && S.isPinned(i))
|
|
2102
|
-
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], th.pin, 1, 0, 2.5);
|
|
2120
|
+
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], th.pin, 1, 0, 2.5 + outside(this.g.nodes[i].kind));
|
|
2103
2121
|
}
|
|
2104
2122
|
// on a past graph, what changed since and what was renamed since have a ring of their own
|
|
2105
2123
|
const M = this.pastMarks;
|
|
@@ -2108,11 +2126,12 @@ export class GraphCanvas {
|
|
|
2108
2126
|
if (!(M[i] & (PAST_CHANGED | PAST_RENAMED)) || !this.visibleNode(i))
|
|
2109
2127
|
continue;
|
|
2110
2128
|
const faded = act && !act[i] ? 0.45 : 1;
|
|
2129
|
+
const out = outside(this.g.nodes[i].kind);
|
|
2111
2130
|
if (M[i] & PAST_CHANGED)
|
|
2112
|
-
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], fade(th.tmChanged, faded), 1.6, 0, 2.2);
|
|
2131
|
+
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], fade(th.tmChanged, faded), 1.6, 0, 2.2 + out);
|
|
2113
2132
|
// a rename is the lighter news: its ring is thinner and fainter than a change's
|
|
2114
2133
|
if (M[i] & PAST_RENAMED)
|
|
2115
|
-
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], fade(th.tmRenamed, 0.7 * faded), 1.1, 0, M[i] & PAST_CHANGED ? 4.4 : 2.2);
|
|
2134
|
+
circle(rings, this.px[i], this.py[i], 1, UNIT_DOT, [0, 0, 0, 0], fade(th.tmRenamed, 0.7 * faded), 1.1, 0, (M[i] & PAST_CHANGED ? 4.4 : 2.2) + out);
|
|
2116
2135
|
}
|
|
2117
2136
|
}
|
|
2118
2137
|
/** Of a cluster, its top-level namespace's hue among the cells' (CELL_HUES, by their size); the
|
|
@@ -2206,20 +2225,32 @@ export class GraphCanvas {
|
|
|
2206
2225
|
// own colour. Lit, it is drawn lit as any point is, its mark a ring around it: a faint point read
|
|
2207
2226
|
// as one left out of the selection
|
|
2208
2227
|
const m = this.pastMarks?.[i] ?? 0;
|
|
2228
|
+
// an axiom is a ring (the owner's decision of 2026-10-18: web/src/axiomring.ts): round its point
|
|
2229
|
+
// a gap apart, in the point's colour, lit or not, outside the project too; a past mark outside it
|
|
2230
|
+
const kind = this.g.nodes[i].kind;
|
|
2231
|
+
const ring = ringed(kind);
|
|
2209
2232
|
if (lit) {
|
|
2210
|
-
|
|
2233
|
+
// the lit point's halo of the canvas's colour is the ring's gap
|
|
2234
|
+
circle(L, x, y, LIT, UNIT_DOT, c, this.theme.bg, 1.5, 0, 0.75);
|
|
2235
|
+
if (ring)
|
|
2236
|
+
circle(L, x, y, LIT, UNIT_DOT, [0, 0, 0, 0], c, AXIOM_W, 0, AXIOM_AT);
|
|
2211
2237
|
if (m & PAST_GHOST)
|
|
2212
|
-
circle(L, x, y,
|
|
2238
|
+
circle(L, x, y, LIT, UNIT_DOT, [0, 0, 0, 0], this.theme.tmGone, 1.3, 0, 2.6 + outside(kind));
|
|
2213
2239
|
return;
|
|
2214
2240
|
}
|
|
2215
2241
|
if (m & PAST_GHOST) {
|
|
2216
2242
|
circle(L, x, y, 1, UNIT_DOT, a(0.28 * alpha), fade(this.theme.tmGone, alpha), 1.5, 0, -0.4);
|
|
2243
|
+
if (ring)
|
|
2244
|
+
circle(L, x, y, 1, UNIT_DOT, [0, 0, 0, 0], a(0.5 * alpha), AXIOM_W, 0, AXIOM_AT);
|
|
2217
2245
|
return;
|
|
2218
2246
|
}
|
|
2219
2247
|
if (this.g.isExt(i))
|
|
2220
2248
|
circle(L, x, y, 0.8, UNIT_DOT, [0, 0, 0, 0], a(alpha), 1.3, 0, -0.6);
|
|
2221
2249
|
else
|
|
2222
2250
|
circle(L, x, y, 1, UNIT_DOT, a(alpha));
|
|
2251
|
+
// round a point of one, so that the ring of one outside the project stands where a dot's would
|
|
2252
|
+
if (ring)
|
|
2253
|
+
circle(L, x, y, 1, UNIT_DOT, [0, 0, 0, 0], a(alpha), AXIOM_W, 0, AXIOM_AT);
|
|
2223
2254
|
}
|
|
2224
2255
|
draw() {
|
|
2225
2256
|
if (!this.scene)
|
|
@@ -2474,7 +2505,7 @@ export class GraphCanvas {
|
|
|
2474
2505
|
const p = Q.points.get(point);
|
|
2475
2506
|
return { looks: p.looks, index: Q.indexOf(p), w, scale: dimNow / (p.dim ? DIM : 1) };
|
|
2476
2507
|
});
|
|
2477
|
-
const drawn = `${this.overviewStyle}|${dim}|${W.map((x) => `${Q.points.get(x.point).serial}:${x.w.toFixed(3)}`).join(",")}`;
|
|
2508
|
+
const drawn = `${this.themeSerial}|${this.overviewStyle}|${dim}|${W.map((x) => `${Q.points.get(x.point).serial}:${x.w.toFixed(3)}`).join(",")}`;
|
|
2478
2509
|
if (drawn === this.overviewDrawn)
|
|
2479
2510
|
return;
|
|
2480
2511
|
this.overviewDrawn = drawn;
|
|
@@ -2489,6 +2520,15 @@ export class GraphCanvas {
|
|
|
2489
2520
|
[c1[0], c1[1], c1[2], c1[3]] = [to[0], to[1], to[2], (styled ? to[3] : 1) * alpha];
|
|
2490
2521
|
bundlePath(L, P.path, 8 * j, P.len[j], beta, width, c0, c1);
|
|
2491
2522
|
});
|
|
2523
|
+
// the theme's own fading with their number (crowdFade), from the number at which the overview's
|
|
2524
|
+
// choice starts fading them (web/src/overview.ts, looksOf)
|
|
2525
|
+
const k = crowdFade(L.count, OVERVIEW_CROWD, this.theme.edgeCrowd);
|
|
2526
|
+
if (k < 1)
|
|
2527
|
+
for (let n = 0; n < L.count; n++) {
|
|
2528
|
+
const o = n * BUNDLE_STRIDE;
|
|
2529
|
+
L.data[o + 15] *= k;
|
|
2530
|
+
L.data[o + 19] *= k;
|
|
2531
|
+
}
|
|
2492
2532
|
}
|
|
2493
2533
|
/** The colours of a bundled edge from `a` to `b` (ids of the scene's clusters, and of its
|
|
2494
2534
|
* declarations past them), from the end that uses: the theme's; an artwork's cells', from one
|
|
@@ -2521,7 +2561,7 @@ export class GraphCanvas {
|
|
|
2521
2561
|
circle(C, S.cwx[t.c], S.cwy[t.c], S.drawnR[t.c], UNIT_WORLD, [a[0], a[1], a[2], shut ? 0 : 0.05], [a[0], a[1], a[2], 0.9], 2, 0, shut ? 3 : 0, 6);
|
|
2522
2562
|
}
|
|
2523
2563
|
else if (this.visibleNode(t.i)) {
|
|
2524
|
-
circle(P, this.px[t.i], this.py[t.i], 1, UNIT_DOT, [0, 0, 0, 0], [a[0], a[1], a[2], 0.95], 2, 0, 3.5);
|
|
2564
|
+
circle(P, this.px[t.i], this.py[t.i], 1, UNIT_DOT, [0, 0, 0, 0], [a[0], a[1], a[2], 0.95], 2, 0, 3.5 + outside(this.g.nodes[t.i].kind));
|
|
2525
2565
|
}
|
|
2526
2566
|
}
|
|
2527
2567
|
/** Text: cluster labels, labels of folded clusters, names up close. */
|
|
@@ -2596,14 +2636,17 @@ export class GraphCanvas {
|
|
|
2596
2636
|
// hidden, its room kept
|
|
2597
2637
|
const nameAt = (i, text, w, force = false) => {
|
|
2598
2638
|
const [sx, sy] = this.toScreen(this.px[i], this.py[i]);
|
|
2599
|
-
|
|
2639
|
+
// an axiom's name stands clear of its ring (web/src/axiomring.ts), its halo too, lit or not
|
|
2640
|
+
const kind = this.g.nodes[i].kind;
|
|
2641
|
+
const off = ringed(kind) ? outside(kind) + 1 + (this.active?.[i] ? (LIT - 1) * dotR : 0) : 0;
|
|
2642
|
+
const x0 = sx + dotR + 2 + off, y0 = sy - 7, x1 = x0 + w + 2, y1 = sy + 5;
|
|
2600
2643
|
if (!force && !free(x0, y0, x1, y1))
|
|
2601
2644
|
return false;
|
|
2602
2645
|
take(x0, y0, x1, y1);
|
|
2603
2646
|
const id = art ? artNameId("decl", this.g.nodes[i].name) : "";
|
|
2604
2647
|
if (hidden(id))
|
|
2605
2648
|
return false;
|
|
2606
|
-
write(text, sx + dotR + 3, sy + 3.5, id);
|
|
2649
|
+
write(text, sx + dotR + 3 + off, sy + 3.5, id);
|
|
2607
2650
|
return true;
|
|
2608
2651
|
};
|
|
2609
2652
|
const shown = (i) => {
|
|
@@ -2977,8 +3020,10 @@ export class GraphCanvas {
|
|
|
2977
3020
|
continue;
|
|
2978
3021
|
if (this.visibleNode(i)) {
|
|
2979
3022
|
const [sx, sy] = this.toScreen(this.px[i], this.py[i]);
|
|
3023
|
+
// an axiom's: outside its ring (web/src/axiomring.ts)
|
|
3024
|
+
const out = outside(this.g.nodes[i].kind) * 0.71;
|
|
2980
3025
|
if (onScreen(sx, sy, 12))
|
|
2981
|
-
diamond(sx - dotR - R * 0.4, sy - dotR - R * 0.3, R);
|
|
3026
|
+
diamond(sx - dotR - out - R * 0.4, sy - dotR - out - R * 0.3, R);
|
|
2982
3027
|
continue;
|
|
2983
3028
|
}
|
|
2984
3029
|
const c = S.nodeRep[i];
|
|
@@ -3030,7 +3075,7 @@ export class GraphCanvas {
|
|
|
3030
3075
|
if (this.visibleNode(i)) {
|
|
3031
3076
|
const [sx, sy] = this.toScreen(this.px[i], this.py[i]);
|
|
3032
3077
|
if (onScreen(sx, sy, 30))
|
|
3033
|
-
mark(sx, sy,
|
|
3078
|
+
mark(sx, sy, pickRadius(dotR, this.g.nodes[i].kind), m);
|
|
3034
3079
|
continue;
|
|
3035
3080
|
}
|
|
3036
3081
|
const c = S.nodeRep[i];
|
|
@@ -3174,8 +3219,16 @@ export class GraphCanvas {
|
|
|
3174
3219
|
const c = this.scheme === "status" ? th.status[v.status] ?? th.status[ST_UNREVIEWED] : v.kind === "external" ? th.ext : th.kind[v.kind] ?? th.ext;
|
|
3175
3220
|
ctx.fillStyle = css(th.bg);
|
|
3176
3221
|
ctx.beginPath();
|
|
3177
|
-
ctx.arc(x, y, R + 3, 0, 2 * Math.PI);
|
|
3222
|
+
ctx.arc(x, y, R + 3 + (v.axiom ? AXIOM_OUT : 0), 0, 2 * Math.PI);
|
|
3178
3223
|
ctx.fill();
|
|
3224
|
+
// an axiom's ring (web/src/axiomring.ts), solid in its colour outside the visitor's dashed one
|
|
3225
|
+
if (v.axiom) {
|
|
3226
|
+
ctx.lineWidth = AXIOM_W;
|
|
3227
|
+
ctx.strokeStyle = css(c, 0.9);
|
|
3228
|
+
ctx.beginPath();
|
|
3229
|
+
ctx.arc(x, y, R + 1.75 + AXIOM_AT, 0, 2 * Math.PI);
|
|
3230
|
+
ctx.stroke();
|
|
3231
|
+
}
|
|
3179
3232
|
ctx.fillStyle = css(c, 0.9);
|
|
3180
3233
|
ctx.beginPath();
|
|
3181
3234
|
ctx.arc(x, y, R - 1.5, 0, 2 * Math.PI);
|
|
@@ -3278,7 +3331,7 @@ export class GraphCanvas {
|
|
|
3278
3331
|
return null;
|
|
3279
3332
|
if (this.visibleNode(i)) {
|
|
3280
3333
|
const [x, y] = this.toScreen(this.px[i], this.py[i]);
|
|
3281
|
-
return [x, y, dotR + 4, -1 - i];
|
|
3334
|
+
return [x, y, dotR + 4 + outside(this.g.nodes[i].kind), -1 - i];
|
|
3282
3335
|
}
|
|
3283
3336
|
const c = S.nodeRep[i];
|
|
3284
3337
|
if (c < 0 || !this.clusterVisible(c))
|
|
@@ -3357,7 +3410,8 @@ export class GraphCanvas {
|
|
|
3357
3410
|
drawSelection(dotR) {
|
|
3358
3411
|
const S = this.scene;
|
|
3359
3412
|
const k = this.cam.k;
|
|
3360
|
-
|
|
3413
|
+
/** round a point, clear of an axiom's ring */
|
|
3414
|
+
const pointR = (i) => pickRadius(dotR, this.g.nodes[i].kind);
|
|
3361
3415
|
/** a folded cluster's ring: round its card while it has one, else round its body */
|
|
3362
3416
|
const body = (c) => {
|
|
3363
3417
|
const b = this.clusterBoxes.get(c);
|
|
@@ -3375,7 +3429,7 @@ export class GraphCanvas {
|
|
|
3375
3429
|
if (W.vrep[t.k] >= 0)
|
|
3376
3430
|
return this.clusterVisible(W.vrep[t.k]) ? body(W.vrep[t.k]) : null;
|
|
3377
3431
|
const [x, y] = this.toScreen(W.vx[t.k], W.vy[t.k]);
|
|
3378
|
-
return { x, y, r: this.visitorR() + 5 };
|
|
3432
|
+
return { x, y, r: this.visitorR() + 5 + (this.visitors[t.k]?.axiom ? AXIOM_OUT : 0) };
|
|
3379
3433
|
}
|
|
3380
3434
|
if (t.kind === "node") {
|
|
3381
3435
|
if (t.i < 0 || t.i >= this.g.n)
|
|
@@ -3383,7 +3437,7 @@ export class GraphCanvas {
|
|
|
3383
3437
|
if (!this.visibleNode(t.i))
|
|
3384
3438
|
return S.nodeRep[t.i] < 0 ? null : body(S.nodeRep[t.i]);
|
|
3385
3439
|
const [x, y] = this.toScreen(this.px[t.i], this.py[t.i]);
|
|
3386
|
-
return { x, y, r: pointR };
|
|
3440
|
+
return { x, y, r: pointR(t.i) };
|
|
3387
3441
|
}
|
|
3388
3442
|
if (t.c < 0 || t.c >= S.nc || !this.clusterVisible(t.c))
|
|
3389
3443
|
return null;
|
|
@@ -3551,10 +3605,10 @@ export class GraphCanvas {
|
|
|
3551
3605
|
this.leaders = [];
|
|
3552
3606
|
this.clusterBoxes.clear();
|
|
3553
3607
|
// the selection has no card, but nothing covers its rings either (drawSelection)
|
|
3554
|
-
const lr = Math.max(7, dotR + 4) + 4;
|
|
3555
3608
|
for (const i of chosen) {
|
|
3556
3609
|
if (!this.visibleNode(i))
|
|
3557
3610
|
continue;
|
|
3611
|
+
const lr = pickRadius(dotR, this.g.nodes[i].kind) + 4;
|
|
3558
3612
|
const [lx, ly] = this.toScreen(this.px[i], this.py[i]);
|
|
3559
3613
|
grid.add(lx - lr, ly - lr, lx + lr, ly + lr);
|
|
3560
3614
|
}
|
|
@@ -3564,8 +3618,9 @@ export class GraphCanvas {
|
|
|
3564
3618
|
if (r.width && r.height)
|
|
3565
3619
|
grid.add(r.left - box0.left, r.top - box0.top, r.right - box0.left, r.bottom - box0.top);
|
|
3566
3620
|
// the lit points themselves
|
|
3567
|
-
const pr = Math.max(3, dotR) + 2;
|
|
3568
3621
|
for (const i of activeDots) {
|
|
3622
|
+
// an axiom's ring with it
|
|
3623
|
+
const pr = Math.max(3, dotR) + 2 + outside(this.g.nodes[i].kind);
|
|
3569
3624
|
const [x, y] = this.toScreen(this.px[i], this.py[i]);
|
|
3570
3625
|
grid.add(x - pr, y - pr, x + pr, y + pr);
|
|
3571
3626
|
}
|
|
@@ -3636,7 +3691,7 @@ export class GraphCanvas {
|
|
|
3636
3691
|
// its dot has its point's colour, in the scheme in force (style.css, .card.s-*); nothing else on
|
|
3637
3692
|
// a card tells of its status
|
|
3638
3693
|
const st = this.scheme === "status" ? ` ss s-${STATUSES[this.statusCode[i] ?? ST_UNREVIEWED]}` : "";
|
|
3639
|
-
el.className = `card
|
|
3694
|
+
el.className = `card ${kindDot(v.kind, g.isExt(i))}${st}${this.targetList.includes(i) ? " target" : this.keyList.includes(i) ? " key" : ""}`;
|
|
3640
3695
|
el.dataset.node = String(i);
|
|
3641
3696
|
// on a past graph, its marks against now: a renamed one's name now among them
|
|
3642
3697
|
const marks = this.pastMarks?.[i] ?? 0;
|
package/dist/web/src/overview.js
CHANGED
|
@@ -237,7 +237,7 @@ export class OverviewModel {
|
|
|
237
237
|
const Y = (id) => (id < nc ? S.cwy[id] : S.nwy[id - nc]);
|
|
238
238
|
// many bundles share the screen: the more there are, the fainter each; with a selection the
|
|
239
239
|
// overview steps back so the selection's own edges read
|
|
240
|
-
const crowd = Math.min(1, Math.sqrt(
|
|
240
|
+
const crowd = Math.min(1, Math.sqrt(OVERVIEW_CROWD / Math.max(1, n)));
|
|
241
241
|
const fade = (ask.dim ? DIM : 1) * crowd;
|
|
242
242
|
// few edges in view (zoomed in): even a single one clearly visible
|
|
243
243
|
const floor = 0.05 + 0.3 * Math.min(1, Math.max(0, (1200 - nIn) / 900));
|
|
@@ -265,6 +265,9 @@ export class OverviewModel {
|
|
|
265
265
|
return looks;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
+
/** The number of bundles past which the more there are, the fainter each (looksOf); a theme's own
|
|
269
|
+
* fading with their number starts there too (web/src/canvas.ts, crowdFade). */
|
|
270
|
+
export const OVERVIEW_CROWD = 400;
|
|
268
271
|
/** How much a selection dims the overview, so that its own edges read, the rest still seen faintly:
|
|
269
272
|
* on the board and in an artwork alike (the owner's decision of 2026-10-15; 0.12 before). */
|
|
270
273
|
export const DIM = 0.3;
|