@graview/primitives 0.1.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/LICENSE +96 -0
- package/README.md +25 -0
- package/dist/arrange-bar.d.ts +49 -0
- package/dist/arrange-bar.d.ts.map +1 -0
- package/dist/arrange-bar.js +264 -0
- package/dist/arrange-bar.js.map +1 -0
- package/dist/chat.d.ts +46 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +343 -0
- package/dist/chat.js.map +1 -0
- package/dist/companion.d.ts +58 -0
- package/dist/companion.d.ts.map +1 -0
- package/dist/companion.js +433 -0
- package/dist/companion.js.map +1 -0
- package/dist/connections.d.ts +23 -0
- package/dist/connections.d.ts.map +1 -0
- package/dist/connections.js +100 -0
- package/dist/connections.js.map +1 -0
- package/dist/default-views.d.ts +35 -0
- package/dist/default-views.d.ts.map +1 -0
- package/dist/default-views.js +605 -0
- package/dist/default-views.js.map +1 -0
- package/dist/editable.d.ts +71 -0
- package/dist/editable.d.ts.map +1 -0
- package/dist/editable.js +225 -0
- package/dist/editable.js.map +1 -0
- package/dist/figure.d.ts +30 -0
- package/dist/figure.d.ts.map +1 -0
- package/dist/figure.js +66 -0
- package/dist/figure.js.map +1 -0
- package/dist/find.d.ts +5 -0
- package/dist/find.d.ts.map +1 -0
- package/dist/find.js +252 -0
- package/dist/find.js.map +1 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/installation.d.ts +17 -0
- package/dist/installation.d.ts.map +1 -0
- package/dist/installation.js +37 -0
- package/dist/installation.js.map +1 -0
- package/dist/ladder.d.ts +2 -0
- package/dist/ladder.d.ts.map +1 -0
- package/dist/ladder.js +53 -0
- package/dist/ladder.js.map +1 -0
- package/dist/lens/arranging.d.ts +41 -0
- package/dist/lens/arranging.d.ts.map +1 -0
- package/dist/lens/arranging.js +38 -0
- package/dist/lens/arranging.js.map +1 -0
- package/dist/lens/board.d.ts +146 -0
- package/dist/lens/board.d.ts.map +1 -0
- package/dist/lens/board.js +658 -0
- package/dist/lens/board.js.map +1 -0
- package/dist/lens/calendar-dates.d.ts +19 -0
- package/dist/lens/calendar-dates.d.ts.map +1 -0
- package/dist/lens/calendar-dates.js +55 -0
- package/dist/lens/calendar-dates.js.map +1 -0
- package/dist/lens/calendar-drawing.d.ts +59 -0
- package/dist/lens/calendar-drawing.d.ts.map +1 -0
- package/dist/lens/calendar-drawing.js +229 -0
- package/dist/lens/calendar-drawing.js.map +1 -0
- package/dist/lens/calendar-options.d.ts +107 -0
- package/dist/lens/calendar-options.d.ts.map +1 -0
- package/dist/lens/calendar-options.js +19 -0
- package/dist/lens/calendar-options.js.map +1 -0
- package/dist/lens/calendar-placing.d.ts +35 -0
- package/dist/lens/calendar-placing.d.ts.map +1 -0
- package/dist/lens/calendar-placing.js +113 -0
- package/dist/lens/calendar-placing.js.map +1 -0
- package/dist/lens/calendar-spans.d.ts +48 -0
- package/dist/lens/calendar-spans.d.ts.map +1 -0
- package/dist/lens/calendar-spans.js +146 -0
- package/dist/lens/calendar-spans.js.map +1 -0
- package/dist/lens/calendar-view.d.ts +34 -0
- package/dist/lens/calendar-view.d.ts.map +1 -0
- package/dist/lens/calendar-view.js +228 -0
- package/dist/lens/calendar-view.js.map +1 -0
- package/dist/lens/calendar.d.ts +43 -0
- package/dist/lens/calendar.d.ts.map +1 -0
- package/dist/lens/calendar.js +43 -0
- package/dist/lens/calendar.js.map +1 -0
- package/dist/lens/coverage.d.ts +183 -0
- package/dist/lens/coverage.d.ts.map +1 -0
- package/dist/lens/coverage.js +732 -0
- package/dist/lens/coverage.js.map +1 -0
- package/dist/lens/horizon.d.ts +14 -0
- package/dist/lens/horizon.d.ts.map +1 -0
- package/dist/lens/horizon.js +20 -0
- package/dist/lens/horizon.js.map +1 -0
- package/dist/lens/more.d.ts +16 -0
- package/dist/lens/more.d.ts.map +1 -0
- package/dist/lens/more.js +17 -0
- package/dist/lens/more.js.map +1 -0
- package/dist/lens/plan-lens.d.ts +17 -0
- package/dist/lens/plan-lens.d.ts.map +1 -0
- package/dist/lens/plan-lens.js +24 -0
- package/dist/lens/plan-lens.js.map +1 -0
- package/dist/lens/plan-state.d.ts +122 -0
- package/dist/lens/plan-state.d.ts.map +1 -0
- package/dist/lens/plan-state.js +152 -0
- package/dist/lens/plan-state.js.map +1 -0
- package/dist/lens/plan-view.d.ts +10 -0
- package/dist/lens/plan-view.d.ts.map +1 -0
- package/dist/lens/plan-view.js +576 -0
- package/dist/lens/plan-view.js.map +1 -0
- package/dist/lens/plan.d.ts +25 -0
- package/dist/lens/plan.d.ts.map +1 -0
- package/dist/lens/plan.js +25 -0
- package/dist/lens/plan.js.map +1 -0
- package/dist/lens/reach.d.ts +47 -0
- package/dist/lens/reach.d.ts.map +1 -0
- package/dist/lens/reach.js +67 -0
- package/dist/lens/reach.js.map +1 -0
- package/dist/lens/timeline.d.ts +137 -0
- package/dist/lens/timeline.d.ts.map +1 -0
- package/dist/lens/timeline.js +426 -0
- package/dist/lens/timeline.js.map +1 -0
- package/dist/markup.d.ts +23 -0
- package/dist/markup.d.ts.map +1 -0
- package/dist/markup.js +24 -0
- package/dist/markup.js.map +1 -0
- package/dist/places.d.ts +24 -0
- package/dist/places.d.ts.map +1 -0
- package/dist/places.js +227 -0
- package/dist/places.js.map +1 -0
- package/dist/popover.d.ts +28 -0
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +59 -0
- package/dist/popover.js.map +1 -0
- package/dist/primitives/index.d.ts +214 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +381 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/profile.d.ts +65 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +233 -0
- package/dist/profile.js.map +1 -0
- package/dist/quick-relations.d.ts +16 -0
- package/dist/quick-relations.d.ts.map +1 -0
- package/dist/quick-relations.js +183 -0
- package/dist/quick-relations.js.map +1 -0
- package/dist/relation-key.d.ts +44 -0
- package/dist/relation-key.d.ts.map +1 -0
- package/dist/relation-key.js +196 -0
- package/dist/relation-key.js.map +1 -0
- package/dist/seat.d.ts +137 -0
- package/dist/seat.d.ts.map +1 -0
- package/dist/seat.js +162 -0
- package/dist/seat.js.map +1 -0
- package/dist/seats.d.ts +21 -0
- package/dist/seats.d.ts.map +1 -0
- package/dist/seats.js +62 -0
- package/dist/seats.js.map +1 -0
- package/dist/seeding.d.ts +150 -0
- package/dist/seeding.d.ts.map +1 -0
- package/dist/seeding.js +538 -0
- package/dist/seeding.js.map +1 -0
- package/dist/shell.d.ts +74 -0
- package/dist/shell.d.ts.map +1 -0
- package/dist/shell.js +86 -0
- package/dist/shell.js.map +1 -0
- package/dist/theme.d.ts +50 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +1692 -0
- package/dist/theme.js.map +1 -0
- package/dist/wordmark.d.ts +15 -0
- package/dist/wordmark.d.ts.map +1 -0
- package/dist/wordmark.js +55 -0
- package/dist/wordmark.js.map +1 -0
- package/dist/workbench/activity.d.ts +75 -0
- package/dist/workbench/activity.d.ts.map +1 -0
- package/dist/workbench/activity.js +259 -0
- package/dist/workbench/activity.js.map +1 -0
- package/dist/workbench/agent-seat.d.ts +51 -0
- package/dist/workbench/agent-seat.d.ts.map +1 -0
- package/dist/workbench/agent-seat.js +112 -0
- package/dist/workbench/agent-seat.js.map +1 -0
- package/dist/workbench/answer-args.d.ts +31 -0
- package/dist/workbench/answer-args.d.ts.map +1 -0
- package/dist/workbench/answer-args.js +257 -0
- package/dist/workbench/answer-args.js.map +1 -0
- package/dist/workbench/back-out.d.ts +71 -0
- package/dist/workbench/back-out.d.ts.map +1 -0
- package/dist/workbench/back-out.js +238 -0
- package/dist/workbench/back-out.js.map +1 -0
- package/dist/workbench/following.d.ts +7 -0
- package/dist/workbench/following.d.ts.map +1 -0
- package/dist/workbench/following.js +26 -0
- package/dist/workbench/following.js.map +1 -0
- package/dist/workbench/index.d.ts +23 -0
- package/dist/workbench/index.d.ts.map +1 -0
- package/dist/workbench/index.js +23 -0
- package/dist/workbench/index.js.map +1 -0
- package/dist/workbench/inspector.d.ts +27 -0
- package/dist/workbench/inspector.d.ts.map +1 -0
- package/dist/workbench/inspector.js +745 -0
- package/dist/workbench/inspector.js.map +1 -0
- package/dist/workbench/standing.d.ts +16 -0
- package/dist/workbench/standing.d.ts.map +1 -0
- package/dist/workbench/standing.js +102 -0
- package/dist/workbench/standing.js.map +1 -0
- package/dist/workbench/trail.d.ts +35 -0
- package/dist/workbench/trail.d.ts.map +1 -0
- package/dist/workbench/trail.js +150 -0
- package/dist/workbench/trail.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { withMore } from "./more.js";
|
|
3
|
+
import { labelOf } from "@graview/core";
|
|
4
|
+
import { useArranging } from "./arranging.js";
|
|
5
|
+
import { useGraview } from "@graview/react";
|
|
6
|
+
import { hueFor } from "../default-views.js";
|
|
7
|
+
import { Chip, Panel, Roster } from "../primitives/index.js";
|
|
8
|
+
export const TIMELINE_REQUIRED_ROLES = ["start", "end"];
|
|
9
|
+
/**
|
|
10
|
+
* The slice of the axis worth drawing.
|
|
11
|
+
*
|
|
12
|
+
* A day runs 24 hours; a household's day happens between about seven and
|
|
13
|
+
* eight. Drawing the full extent spends two thirds of the height on empty
|
|
14
|
+
* night and squeezes everything legible into the middle — which is exactly
|
|
15
|
+
* what it did. The window comes from the data, padded, and never narrower
|
|
16
|
+
* than `minimum` so a sparse day does not zoom absurdly.
|
|
17
|
+
*/
|
|
18
|
+
export function activeWindow(spans, extent, { pad = 45, minimum = 480 } = {}) {
|
|
19
|
+
if (spans.length === 0)
|
|
20
|
+
return { start: 0, end: extent };
|
|
21
|
+
const earliest = Math.min(...spans.map((span) => span.start));
|
|
22
|
+
const latest = Math.max(...spans.map((span) => span.end));
|
|
23
|
+
let start = Math.max(0, earliest - pad);
|
|
24
|
+
let end = Math.min(extent, latest + pad);
|
|
25
|
+
const short = minimum - (end - start);
|
|
26
|
+
if (short > 0) {
|
|
27
|
+
start = Math.max(0, start - short / 2);
|
|
28
|
+
end = Math.min(extent, start + minimum);
|
|
29
|
+
}
|
|
30
|
+
/*
|
|
31
|
+
* Whole units, always.
|
|
32
|
+
*
|
|
33
|
+
* Centring a short window halves an odd number and hands the app's own
|
|
34
|
+
* formatter a fraction, which then renders "14:7.5". The household example never saw it
|
|
35
|
+
* because its formatter happened to floor; a third app's did not, and the
|
|
36
|
+
* fix belongs here rather than in every formatter that will ever exist.
|
|
37
|
+
*/
|
|
38
|
+
return { start: Math.floor(start), end: Math.ceil(end) };
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Assigns overlapping spans to side-by-side lanes.
|
|
42
|
+
*
|
|
43
|
+
* Greedy by start time, which is optimal for intervals and — more
|
|
44
|
+
* importantly — STABLE: the same spans always land in the same lanes, so an
|
|
45
|
+
* edit elsewhere does not reshuffle the column and destroy the picture you
|
|
46
|
+
* remember.
|
|
47
|
+
*/
|
|
48
|
+
export function assignLanes(spans) {
|
|
49
|
+
const ordered = [...spans].sort((a, b) => a.start - b.start || a.end - b.end || a.id.localeCompare(b.id));
|
|
50
|
+
const laneEnds = [];
|
|
51
|
+
const placed = ordered.map((span) => {
|
|
52
|
+
let lane = laneEnds.findIndex((end) => end <= span.start);
|
|
53
|
+
if (lane === -1) {
|
|
54
|
+
lane = laneEnds.length;
|
|
55
|
+
laneEnds.push(span.end);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
laneEnds[lane] = span.end;
|
|
59
|
+
}
|
|
60
|
+
return { ...span, lane, lanes: 1 };
|
|
61
|
+
});
|
|
62
|
+
const lanes = Math.max(1, laneEnds.length);
|
|
63
|
+
return placed.map((span) => ({ ...span, lanes }));
|
|
64
|
+
}
|
|
65
|
+
export class TimelineBindingError extends Error {
|
|
66
|
+
constructor(kind, missing) {
|
|
67
|
+
super(`The timeline lens needs ${missing.join(" and ")} for "${kind}". ` +
|
|
68
|
+
`Add them to the lens bindings: { ${kind}: { ${missing
|
|
69
|
+
.map((role) => `${role}: "<field name>"`)
|
|
70
|
+
.join(", ")} } }.`);
|
|
71
|
+
this.name = "TimelineBindingError";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Reads one node's span through the app's own field names.
|
|
76
|
+
*
|
|
77
|
+
* Returns null for a kind the lens was not told about — a graph carries kinds
|
|
78
|
+
* that are not on a timeline, and that is not an error.
|
|
79
|
+
*/
|
|
80
|
+
export function placeOnTimeline(node, bindings, schema) {
|
|
81
|
+
const roles = bindings[node.kind];
|
|
82
|
+
if (!roles)
|
|
83
|
+
return null;
|
|
84
|
+
/*
|
|
85
|
+
* A BINDING error and a MISSING VALUE are different things.
|
|
86
|
+
*
|
|
87
|
+
* Checking `roles[role] in record` conflated them: an app that never bound
|
|
88
|
+
* `start` and a node that simply has no start both looked the same, so one
|
|
89
|
+
* unplanned task threw for the whole view and took the week with it. A field
|
|
90
|
+
* that is optional in the schema is absent on ordinary nodes all the time,
|
|
91
|
+
* and that is data rather than a mistake.
|
|
92
|
+
*
|
|
93
|
+
* So the binding is checked against the BINDING — did the app name a field
|
|
94
|
+
* for each required role — and a node with no value for a bound field is
|
|
95
|
+
* simply not placeable, which is what `null` already means here.
|
|
96
|
+
*/
|
|
97
|
+
const record = node;
|
|
98
|
+
/*
|
|
99
|
+
* Three cases, and the old check collapsed two of them.
|
|
100
|
+
*
|
|
101
|
+
* 1. The role was never bound — a mistake in the declaration.
|
|
102
|
+
* 2. It was bound to a field the kind does not declare — also a mistake,
|
|
103
|
+
* and the one `graview check` reports as `lens-binding-missing-field`.
|
|
104
|
+
* 3. It was bound to a field this NODE happens not to have — ordinary
|
|
105
|
+
* data, because optional fields are absent all the time.
|
|
106
|
+
*
|
|
107
|
+
* Only the first two are errors. Treating the third as one meant a single
|
|
108
|
+
* unplanned task threw and took the whole week down with it. The schema is
|
|
109
|
+
* what separates 2 from 3; without one, the presence of the key is the best
|
|
110
|
+
* available guess and the old behaviour stands.
|
|
111
|
+
*/
|
|
112
|
+
const declared = schema?.tryDefinition(node.kind)?.fields.shape;
|
|
113
|
+
const missing = TIMELINE_REQUIRED_ROLES.filter((role) => {
|
|
114
|
+
const field = roles[role];
|
|
115
|
+
if (!field)
|
|
116
|
+
return true;
|
|
117
|
+
return declared ? !(field in declared) : !(field in record);
|
|
118
|
+
});
|
|
119
|
+
if (missing.length > 0)
|
|
120
|
+
throw new TimelineBindingError(node.kind, missing);
|
|
121
|
+
const start = Number(record[roles.start] ?? Number.NaN);
|
|
122
|
+
const end = Number(record[roles.end] ?? start);
|
|
123
|
+
if (!Number.isFinite(start))
|
|
124
|
+
return null;
|
|
125
|
+
const columnIds = [];
|
|
126
|
+
if (roles.columns) {
|
|
127
|
+
const value = record[roles.columns];
|
|
128
|
+
if (Array.isArray(value))
|
|
129
|
+
columnIds.push(...value.map(String));
|
|
130
|
+
}
|
|
131
|
+
if (roles.column) {
|
|
132
|
+
const value = record[roles.column];
|
|
133
|
+
if (value !== undefined && value !== null)
|
|
134
|
+
columnIds.push(String(value));
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
id: node.id,
|
|
138
|
+
kind: node.kind,
|
|
139
|
+
label: labelOf(schema?.tryDefinition(node.kind), node),
|
|
140
|
+
columnIds,
|
|
141
|
+
start,
|
|
142
|
+
end: Number.isFinite(end) ? Math.max(end, start) : start,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* A span's colour, given how it relates to the selection.
|
|
147
|
+
*
|
|
148
|
+
* Recession here is DESATURATION and a quieter edge, never text opacity: a
|
|
149
|
+
* dimmed span still has to be readable, and dropping opacity on small text
|
|
150
|
+
* composites it against whatever is behind and fails contrast silently. The
|
|
151
|
+
* label keeps its ink in all three states.
|
|
152
|
+
*/
|
|
153
|
+
function spanEmphasis(emphasis, hue) {
|
|
154
|
+
const tint = Math.round(hue);
|
|
155
|
+
// Opaque, over a hue wash, with both drawn from the theme: a cascaded bar
|
|
156
|
+
// has to OCCLUDE the one behind it, and the same wash has to read on paper
|
|
157
|
+
// and in the dark.
|
|
158
|
+
const wash = (alpha) => `linear-gradient(hsl(${tint} 55% var(--graview-tint-lightness) / ${alpha}), hsl(${tint} 55% var(--graview-tint-lightness) / ${alpha})), var(--graview-panel)`;
|
|
159
|
+
if (emphasis === "lit") {
|
|
160
|
+
return {
|
|
161
|
+
border: "1px solid var(--graview-accent)",
|
|
162
|
+
background: wash("calc(var(--graview-tint-alpha) * 1.15)"),
|
|
163
|
+
color: "var(--graview-ink)",
|
|
164
|
+
boxShadow: "0 0 16px -4px var(--graview-accent)",
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
if (emphasis === "dimmed") {
|
|
168
|
+
return {
|
|
169
|
+
border: "1px solid var(--graview-edge)",
|
|
170
|
+
background: wash("calc(var(--graview-tint-alpha) * 0.25)"),
|
|
171
|
+
color: "var(--graview-ink-muted)",
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
border: `1px solid hsl(${tint} 50% var(--graview-tint-lightness) / 0.42)`,
|
|
176
|
+
background: wash("var(--graview-tint-alpha)"),
|
|
177
|
+
color: "var(--graview-ink)",
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
/** Below this share of the window, a span is a moment rather than a duration. */
|
|
181
|
+
const MOMENT_RATIO = 0.045;
|
|
182
|
+
const GUTTER = 52;
|
|
183
|
+
/**
|
|
184
|
+
* The lens's aggregate view.
|
|
185
|
+
*
|
|
186
|
+
* At `full` fidelity it draws the grid; at `summary` one chip per column with
|
|
187
|
+
* its count; at `glyph` a single count. That is fidelity SWITCHING rather
|
|
188
|
+
* than scaling, which is what keeps a receded calendar legible instead of
|
|
189
|
+
* turning it into grey mush.
|
|
190
|
+
*/
|
|
191
|
+
export function TimelineView({ nodes, label, fidelity, mode, options, schema, selectedIds = [], implicated = [], flagged = [], }) {
|
|
192
|
+
// The selection reaches these; anything else in the week recedes while it
|
|
193
|
+
// stands. `selectedIds` stays supported for a host driving the lens
|
|
194
|
+
// directly, outside a scene.
|
|
195
|
+
const highlit = new Set([...implicated, ...selectedIds]);
|
|
196
|
+
const emphasisOf = (id) => highlit.size === 0 ? "plain" : highlit.has(id) ? "lit" : "dimmed";
|
|
197
|
+
// Something broken is marked where it IS. A problem you can only find
|
|
198
|
+
// through a list is a problem you have to go looking for.
|
|
199
|
+
const broken = new Set(flagged);
|
|
200
|
+
const spans = (nodes ?? [])
|
|
201
|
+
.map((node) => placeOnTimeline(node, options.bindings, schema))
|
|
202
|
+
.filter((span) => span !== null);
|
|
203
|
+
const hue = options.hueOf ?? ((span) => hueFor(span.kind));
|
|
204
|
+
if (fidelity === "glyph") {
|
|
205
|
+
return _jsx(Chip, { label: `${label ?? "Timeline"} · ${spans.length}`, hue: hueFor("timeline") });
|
|
206
|
+
}
|
|
207
|
+
if (fidelity === "summary") {
|
|
208
|
+
return (_jsx(Panel, { title: label ?? "Timeline", meta: `${spans.length} items`, tone: "muted", children: _jsx(Roster, { max: options.columns.length, items: options.columns.map((column) => ({
|
|
209
|
+
id: column.id,
|
|
210
|
+
label: `${column.label} ${spans.filter((s) => s.columnIds.includes(column.id)).length}`,
|
|
211
|
+
hue: hueFor(column.id),
|
|
212
|
+
})) }) }));
|
|
213
|
+
}
|
|
214
|
+
const format = options.format ?? String;
|
|
215
|
+
const window = activeWindow(spans, options.extent, {
|
|
216
|
+
...(options.minWindow === undefined ? {} : { minimum: options.minWindow }),
|
|
217
|
+
});
|
|
218
|
+
const range = window.end - window.start;
|
|
219
|
+
const pct = (at) => ((at - window.start) / range) * 100;
|
|
220
|
+
// Rules snapped to round numbers, so the labels read as times rather than
|
|
221
|
+
// as wherever the window happened to begin.
|
|
222
|
+
const tick = options.tick ?? Math.max(60, Math.round(range / 8 / 60) * 60);
|
|
223
|
+
const ticks = [];
|
|
224
|
+
for (let at = Math.ceil(window.start / tick) * tick; at <= window.end; at += tick) {
|
|
225
|
+
ticks.push(at);
|
|
226
|
+
}
|
|
227
|
+
// Lifted out, the week is the PAGE, not a card sitting on one.
|
|
228
|
+
const page = mode === "fullscreen";
|
|
229
|
+
return (_jsx(Panel, { title: label ?? "Timeline", meta: `${format(window.start)} – ${format(window.end)}`, style: { gap: 12, ...(page ? { flex: "1 1 auto", minHeight: 0, height: "100%" } : {}) }, children: _jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, children: [_jsx("div", { style: { display: "flex", paddingLeft: GUTTER, paddingBottom: 10 }, children: options.columns.map((column) => (_jsx("div", { style: {
|
|
230
|
+
flex: 1,
|
|
231
|
+
fontSize: "0.75rem",
|
|
232
|
+
letterSpacing: "0.18em",
|
|
233
|
+
textTransform: "uppercase",
|
|
234
|
+
textAlign: "center",
|
|
235
|
+
color: "var(--graview-ink-muted)",
|
|
236
|
+
}, children: column.label }, column.id))) }), _jsxs("div", { style: { position: "relative", flex: 1, minHeight: 0 }, children: [ticks.map((at, index) => (_jsx("div", { style: {
|
|
237
|
+
position: "absolute",
|
|
238
|
+
left: GUTTER - 8,
|
|
239
|
+
right: 0,
|
|
240
|
+
// The closing rule is drawn just INSIDE the grid: at a flat
|
|
241
|
+
// 100% its own single pixel sits below the box, which is
|
|
242
|
+
// still content the panel cannot show.
|
|
243
|
+
top: index === ticks.length - 1 ? "calc(100% - 1px)" : `${pct(at)}%`,
|
|
244
|
+
height: 1,
|
|
245
|
+
background: "var(--graview-edge)",
|
|
246
|
+
}, children: _jsx("span", { style: {
|
|
247
|
+
position: "absolute",
|
|
248
|
+
left: -(GUTTER - 8),
|
|
249
|
+
/*
|
|
250
|
+
* Every label is centred on its rule except the last, which
|
|
251
|
+
* SITS ON TOP of it.
|
|
252
|
+
*
|
|
253
|
+
* The final rule is at 100%, so a centred label hangs eight
|
|
254
|
+
* pixels below the grid — enough to make the panel's
|
|
255
|
+
* scroller report content it cannot show, which puts a
|
|
256
|
+
* scroll region on a calendar that fits. It also reads
|
|
257
|
+
* better: the last label is the end of the axis rather than
|
|
258
|
+
* something below it.
|
|
259
|
+
*/
|
|
260
|
+
...(index === ticks.length - 1 ? { bottom: 2 } : { top: -7 }),
|
|
261
|
+
width: GUTTER - 16,
|
|
262
|
+
textAlign: "right",
|
|
263
|
+
fontSize: "0.75rem",
|
|
264
|
+
letterSpacing: "0.06em",
|
|
265
|
+
color: "var(--graview-ink-faint)",
|
|
266
|
+
}, children: format(at) }) }, at))), _jsx("div", { style: { position: "absolute", inset: 0, left: GUTTER, display: "flex", gap: 4 }, children: options.columns.map((column) => (_jsx(Column, { spans: spans.filter((s) => s.columnIds.includes(column.id)), window: window, format: format, hue: hue, emphasisOf: emphasisOf, brokenIds: broken }, column.id))) })] })] }) }));
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* One column of the grid.
|
|
270
|
+
*
|
|
271
|
+
* Durations and moments are laid out differently, on purpose. A twenty-minute
|
|
272
|
+
* school run and an eight-hour shift are not the same kind of thing, and
|
|
273
|
+
* giving them the same treatment is why this was unreadable: the run got a
|
|
274
|
+
* two-pixel sliver with a truncated label, and stole width from the shift
|
|
275
|
+
* while it was at it. Durations get the column; moments get a strip of their
|
|
276
|
+
* own, as time-stamped markers.
|
|
277
|
+
*/
|
|
278
|
+
function Column({ spans, window, format, hue, emphasisOf, brokenIds, }) {
|
|
279
|
+
const range = window.end - window.start;
|
|
280
|
+
const pct = (at) => ((at - window.start) / range) * 100;
|
|
281
|
+
const isMoment = (span) => (span.end - span.start) / range < MOMENT_RATIO;
|
|
282
|
+
const durations = assignLanes(spans.filter((span) => !isMoment(span)));
|
|
283
|
+
const moments = [...spans.filter(isMoment)].sort((a, b) => a.start - b.start);
|
|
284
|
+
const laneCount = Math.max(1, ...durations.map((span) => span.lanes));
|
|
285
|
+
return (_jsxs("div", { style: { position: "relative", flex: 1, minWidth: 0 }, children: [durations.map((span) => {
|
|
286
|
+
// Durations get the WHOLE column. Reserving a third of it for the
|
|
287
|
+
// moment strip left each of three concurrent lanes about forty pixels
|
|
288
|
+
// wide, which is why every label read "caregiv…". Moments are a dot
|
|
289
|
+
// and a time; they overlay at the right edge instead.
|
|
290
|
+
const width = 100 / laneCount;
|
|
291
|
+
const height = Math.max(1.6, pct(span.end) - pct(span.start));
|
|
292
|
+
return (_jsx("div", { "data-graview-span": span.id, "data-graview-pick": span.id, "data-graview-emphasis": emphasisOf(span.id), title: `${span.label} · ${format(span.start)}–${format(span.end)}`, style: {
|
|
293
|
+
position: "absolute",
|
|
294
|
+
top: `${pct(span.start)}%`,
|
|
295
|
+
height: `${height}%`,
|
|
296
|
+
left: `${span.lane * width}%`,
|
|
297
|
+
width: `${width}%`,
|
|
298
|
+
padding: "0 2px 2px 0",
|
|
299
|
+
boxSizing: "border-box",
|
|
300
|
+
}, children: _jsx("div", { style: {
|
|
301
|
+
height: "100%",
|
|
302
|
+
minHeight: 15,
|
|
303
|
+
borderRadius: 6,
|
|
304
|
+
padding: "3px 6px",
|
|
305
|
+
fontSize: "0.75rem",
|
|
306
|
+
lineHeight: 1.25,
|
|
307
|
+
overflow: "hidden",
|
|
308
|
+
// Two lines beats one truncated one at these widths.
|
|
309
|
+
display: "-webkit-box",
|
|
310
|
+
WebkitLineClamp: 2,
|
|
311
|
+
WebkitBoxOrient: "vertical",
|
|
312
|
+
...spanEmphasis(emphasisOf(span.id), hue(span)),
|
|
313
|
+
...(brokenIds.has(span.id)
|
|
314
|
+
? {
|
|
315
|
+
// A warn-coloured spine down the leading edge: visible
|
|
316
|
+
// at a glance across a whole week, and it does not
|
|
317
|
+
// touch the label's contrast.
|
|
318
|
+
borderLeft: "3px solid var(--graview-warn)",
|
|
319
|
+
paddingLeft: 4,
|
|
320
|
+
}
|
|
321
|
+
: {}),
|
|
322
|
+
}, children: height >= 3.4 ? span.label : null }) }, span.id));
|
|
323
|
+
}), moments.map((span) => {
|
|
324
|
+
const emphasis = emphasisOf(span.id);
|
|
325
|
+
return (_jsxs("div", { "data-graview-span": span.id, "data-graview-pick": span.id, "data-graview-emphasis": emphasis, "data-graview-moment": "", title: `${span.label} · ${format(span.start)}`, style: {
|
|
326
|
+
position: "absolute",
|
|
327
|
+
top: `${pct(span.start)}%`,
|
|
328
|
+
right: 0,
|
|
329
|
+
// The whole column at most: the name gives way before the time and the dot do.
|
|
330
|
+
maxWidth: "100%",
|
|
331
|
+
boxSizing: "border-box",
|
|
332
|
+
transform: "translateY(-50%)",
|
|
333
|
+
display: "flex",
|
|
334
|
+
alignItems: "center",
|
|
335
|
+
justifyContent: "flex-end",
|
|
336
|
+
gap: 5,
|
|
337
|
+
// A real target: this is a node, and clicking it is the primary
|
|
338
|
+
// way to reach one. At 17 pixels tall it was under every
|
|
339
|
+
// guideline there is, and felt like it.
|
|
340
|
+
minHeight: 24,
|
|
341
|
+
padding: "0 4px 0 8px",
|
|
342
|
+
borderRadius: 999,
|
|
343
|
+
// A small plate so the marker stays readable over whatever block
|
|
344
|
+
// it happens to sit on.
|
|
345
|
+
background: "linear-gradient(90deg, transparent, var(--graview-ground) 35%)",
|
|
346
|
+
}, children: [_jsx("span", { style: {
|
|
347
|
+
fontSize: "0.6875rem",
|
|
348
|
+
letterSpacing: "0.04em",
|
|
349
|
+
whiteSpace: "nowrap",
|
|
350
|
+
color: emphasis === "lit" ? "var(--graview-accent)" : "var(--graview-ink-faint)",
|
|
351
|
+
}, children: format(span.start) }), _jsx("span", { style: {
|
|
352
|
+
fontSize: "0.75rem",
|
|
353
|
+
minWidth: 0,
|
|
354
|
+
overflow: "hidden",
|
|
355
|
+
textOverflow: "ellipsis",
|
|
356
|
+
whiteSpace: "nowrap",
|
|
357
|
+
color: emphasis === "dimmed" ? "var(--graview-ink-faint)" : "var(--graview-ink)",
|
|
358
|
+
}, children: span.label }), _jsx("span", { style: {
|
|
359
|
+
width: 7,
|
|
360
|
+
height: 7,
|
|
361
|
+
borderRadius: 999,
|
|
362
|
+
flex: "0 0 auto",
|
|
363
|
+
background: brokenIds.has(span.id)
|
|
364
|
+
? "var(--graview-warn)"
|
|
365
|
+
: emphasis === "dimmed"
|
|
366
|
+
? "var(--graview-edge)"
|
|
367
|
+
: `hsl(${Math.round(hue(span))} 60% var(--graview-tint-lightness))`,
|
|
368
|
+
boxShadow: brokenIds.has(span.id)
|
|
369
|
+
? "0 0 0 3px var(--graview-warn)"
|
|
370
|
+
: emphasis === "lit"
|
|
371
|
+
? "0 0 0 3px var(--graview-accent-dim)"
|
|
372
|
+
: emphasis === "dimmed"
|
|
373
|
+
? undefined
|
|
374
|
+
: `0 0 8px hsl(${Math.round(hue(span))} 60% var(--graview-tint-lightness) / 0.45)`,
|
|
375
|
+
} })] }, span.id));
|
|
376
|
+
})] }));
|
|
377
|
+
}
|
|
378
|
+
export function createTimelineLens(options) {
|
|
379
|
+
/*
|
|
380
|
+
* A real COMPONENT, not a method that happens to call hooks.
|
|
381
|
+
*
|
|
382
|
+
* `View` is rendered as `<lens.View />`, so it is a component — but written
|
|
383
|
+
* as a method on an object literal it looked like one to the hooks lint rule
|
|
384
|
+
* and needed a disable in three files. A disable repeated three times is a
|
|
385
|
+
* rule telling you something, and what it was telling us is that this wanted
|
|
386
|
+
* to be a component.
|
|
387
|
+
*/
|
|
388
|
+
function Bound(props) {
|
|
389
|
+
// The SCHEMA comes from the provider: `ViewProps` carries none, so a lens
|
|
390
|
+
// rendered through the registry ran without it and every schema-aware
|
|
391
|
+
// decision inside quietly took its fallback path.
|
|
392
|
+
const { store } = useGraview();
|
|
393
|
+
const bound = Object.keys(options.bindings);
|
|
394
|
+
const { nodes, bar } = useArranging(props, {
|
|
395
|
+
...(options.arranging !== undefined ? { allow: options.arranging } : {}),
|
|
396
|
+
lensAllows: { group: false },
|
|
397
|
+
...(options.arrangedBy ? { arrangedBy: options.arrangedBy } : {}),
|
|
398
|
+
...(bound[0] ? { kind: (props.nodes ?? []).find((node) => bound.includes(String(node.kind)))?.kind ?? bound[0] } : {}),
|
|
399
|
+
});
|
|
400
|
+
const view = _jsx(TimelineView, { schema: store.schema, ...props, nodes: nodes, options: options });
|
|
401
|
+
return withMore(props, store.schema, bar ? (_jsxs("div", { style: { display: "grid", gap: 6, height: "100%", minHeight: 0, gridTemplateRows: "auto 1fr" }, children: [bar, view] })) : (view));
|
|
402
|
+
}
|
|
403
|
+
return {
|
|
404
|
+
name: "timeline",
|
|
405
|
+
requiredRoles: [...TIMELINE_REQUIRED_ROLES],
|
|
406
|
+
bindings: options.bindings,
|
|
407
|
+
options,
|
|
408
|
+
/*
|
|
409
|
+
* The SCHEMA comes from the provider, not from the caller.
|
|
410
|
+
*
|
|
411
|
+
* `ViewProps` carries no schema — the registry never passes one — so a
|
|
412
|
+
* lens rendered through the registry ran without it and every
|
|
413
|
+
* schema-aware decision inside quietly took its fallback path. In the
|
|
414
|
+
* timeline that meant an optional field absent on one node looked exactly
|
|
415
|
+
* like a role nobody bound, and a single unplanned task threw for the
|
|
416
|
+
* whole view.
|
|
417
|
+
*/
|
|
418
|
+
View: Bound,
|
|
419
|
+
place(nodes, schema) {
|
|
420
|
+
return nodes
|
|
421
|
+
.map((node) => placeOnTimeline(node, options.bindings, schema))
|
|
422
|
+
.filter((span) => span !== null);
|
|
423
|
+
},
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
//# sourceMappingURL=timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../src/lens/timeline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,OAAO,EAA2E,MAAM,eAAe,CAAC;AACjH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAkB,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7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EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;QAClG,OAAO,QAAQ,CACb,KAAK,EACL,KAAK,CAAC,MAAM,EACZ,GAAG,CAAC,CAAC,CAAC,CACJ,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAChG,GAAG,EACH,IAAI,IACD,CACP,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,aAAa,EAAE,CAAC,GAAG,uBAAuB,CAAC;QAC3C,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,OAAO;QACP;;;;;;;;;WASG;QACH,IAAI,EAAE,KAAK;QACX,KAAK,CAAC,KAAK,EAAE,MAAM;YACjB,OAAO,KAAK;iBACT,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAI,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;iBACjE,MAAM,CAAC,CAAC,IAAI,EAAsB,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QACzD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/markup.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DECLARED MARKUP, handed to the DOM once.
|
|
3
|
+
*
|
|
4
|
+
* A brand's logo and a kind's figure are both vector art the installation
|
|
5
|
+
* declares, and both reach the DOM as `dangerouslySetInnerHTML` — which
|
|
6
|
+
* React 19 decides to re-apply by comparing the PROP OBJECT to the last one
|
|
7
|
+
* by identity. Written inline, `{{ __html: art }}` is a new object on every
|
|
8
|
+
* render, so the art was torn out and parsed again every time anything on
|
|
9
|
+
* the screen moved: thirty-four times for a single click on the ground.
|
|
10
|
+
*
|
|
11
|
+
* The wasted parsing is the smaller half. A double-click only pairs if both
|
|
12
|
+
* clicks land on the SAME node, and the re-render the first click caused had
|
|
13
|
+
* already replaced it — so double-clicking a district on its figure selected
|
|
14
|
+
* the card and went nowhere, while double-clicking the same card an inch to
|
|
15
|
+
* the left travelled into it.
|
|
16
|
+
*
|
|
17
|
+
* One hook rather than a `useMemo` at each of the five call sites, because
|
|
18
|
+
* the next person to write innerHTML will copy whichever they find.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useMarkup(html: string | undefined): {
|
|
21
|
+
readonly __html: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
//# sourceMappingURL=markup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markup.d.ts","sourceRoot":"","sources":["../src/markup.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAE3F"}
|
package/dist/markup.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* DECLARED MARKUP, handed to the DOM once.
|
|
4
|
+
*
|
|
5
|
+
* A brand's logo and a kind's figure are both vector art the installation
|
|
6
|
+
* declares, and both reach the DOM as `dangerouslySetInnerHTML` — which
|
|
7
|
+
* React 19 decides to re-apply by comparing the PROP OBJECT to the last one
|
|
8
|
+
* by identity. Written inline, `{{ __html: art }}` is a new object on every
|
|
9
|
+
* render, so the art was torn out and parsed again every time anything on
|
|
10
|
+
* the screen moved: thirty-four times for a single click on the ground.
|
|
11
|
+
*
|
|
12
|
+
* The wasted parsing is the smaller half. A double-click only pairs if both
|
|
13
|
+
* clicks land on the SAME node, and the re-render the first click caused had
|
|
14
|
+
* already replaced it — so double-clicking a district on its figure selected
|
|
15
|
+
* the card and went nowhere, while double-clicking the same card an inch to
|
|
16
|
+
* the left travelled into it.
|
|
17
|
+
*
|
|
18
|
+
* One hook rather than a `useMemo` at each of the five call sites, because
|
|
19
|
+
* the next person to write innerHTML will copy whichever they find.
|
|
20
|
+
*/
|
|
21
|
+
export function useMarkup(html) {
|
|
22
|
+
return useMemo(() => (html === undefined || html === "" ? undefined : { __html: html }), [html]);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=markup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markup.js","sourceRoot":"","sources":["../src/markup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,SAAS,CAAC,IAAwB;IAChD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AACnG,CAAC"}
|
package/dist/places.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AnySchema } from "@graview/core";
|
|
2
|
+
/**
|
|
3
|
+
* THE NAMED PLACES, as pills.
|
|
4
|
+
*
|
|
5
|
+
* A group view registered with a title is somewhere to go: "Who tends what"
|
|
6
|
+
* over the gardeners, "What grows where" over the plots. Each pill is the
|
|
7
|
+
* stop that shows it — the group in focus, on the ground — and is pressed
|
|
8
|
+
* while you are there. Nothing renders for an app with no named places, so
|
|
9
|
+
* the bar of an app that never registered a lens is exactly as it was.
|
|
10
|
+
*
|
|
11
|
+
* This exists because a lens was only reachable by focusing the group it
|
|
12
|
+
* was registered on: click into one member and the picture was gone, with
|
|
13
|
+
* nothing on the screen to say it had ever been there.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* The named pictures over the graph, as pills — or, `compact`, as one
|
|
17
|
+
* select. Eight pills wrapped to four rows on a phone-width embed and took
|
|
18
|
+
* half its height before the picture began; a select says the same eight
|
|
19
|
+
* places in one row and opens to the same stops.
|
|
20
|
+
*/
|
|
21
|
+
export declare function Places<S extends AnySchema>({ compact }?: {
|
|
22
|
+
compact?: boolean;
|
|
23
|
+
}): import("react").JSX.Element | null;
|
|
24
|
+
//# sourceMappingURL=places.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"places.d.ts","sourceRoot":"","sources":["../src/places.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAS,MAAM,eAAe,CAAC;AAKtD;;;;;;;;;;;;GAYG;AACH;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,OAAe,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,sCA+P1F"}
|