@issuegraph/viewer 0.1.1 → 0.2.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 CHANGED
@@ -5,7 +5,7 @@ Render an [Issuegraph](https://github.com/autnmy/issuegraph) document as a **wor
5
5
  The innermost UI layer, and the whole of its contract:
6
6
 
7
7
  ```
8
- in { issues, edges, order } + a projection choice
8
+ in { issues, edges, order, cycles } + a projection choice
9
9
  out onSelect, onHover
10
10
  never fetching, mutation, auth, persistence, or a host's vocabulary
11
11
  ```
@@ -49,12 +49,15 @@ const document = {
49
49
  slots: [{ rank: 1, lead: '102', members: ['102'], ready: true, holds: [] }],
50
50
  excluded: [{ key: '106', canonical: '105', reason: 'duplicate-of' }],
51
51
  },
52
+ cycles: [],
52
53
  };
53
54
  ```
54
55
 
55
56
  **The order is an input, never something this computes.** `@issuegraph/derive` owns the derivation; a second implementation here would be a mirror whose input space drifts. Everything the viewer draws was given to it — including titles and deep links, because knowing a tracker's URL shape is exactly the knowledge this layer must not carry.
56
57
 
57
- `normalizeDocument` never throws. A hand-built document is untrusted input, so a dangling edge is dropped with a diagnostic rather than taking the render down.
58
+ **So is the cycle answer.** `cycles` is the `blocked-by` cycles the document contains, as the host's reader found them — a host fed by [`@issuegraph/reader`](../reader) passes `Model.cycles` verbatim, and a hand-built document passes `[]`. The graph refusal's `cycle` badge on a component capsule is that answer relayed, never a walk over the edges here: this document carries only the edges it can draw (a `together-with` the order does not group is dropped), so a local walk is a picture of the graph, not the graph, and it disagreed with the reader's on a cycle running through a together unit while both were on one screen. It is required rather than optional because a badge that is simply absent reads as "no cycle"; `[]` says none, and omission is a type error. A member the document does not carry is dropped from the cycle with a diagnostic.
59
+
60
+ `normalizeDocument` never throws on a document of the declared shape. A hand-built document is untrusted input, so a dangling edge is dropped with a diagnostic rather than taking the render down. A missing field is not a document: `order` absent has always thrown, and `cycles` absent throws the same way — a plain-JavaScript host migrating from `0.1.x` adds the field.
58
61
 
59
62
  **A deep link is checked, not just escaped.** `url` is the one field that becomes an executable surface in the DOM, so only `http:`, `https:`, `mailto:` and relative values are linked — a `javascript:` or `data:` value is dropped with a diagnostic. Escaping the attribute would not have stopped it.
60
63
 
@@ -66,12 +69,14 @@ const document = {
66
69
  | `graph` | what surrounds this issue — the spine with gutters and arcs. Bounded; see below. |
67
70
  | `tree` | where this work came from — the `decomposed-from` hierarchy. |
68
71
 
69
- **Held slots keep their position.** A hold the graph itself imposes renders *inline at the rank the work would have taken*, with `—` for the rank and a dashed station, because "why isn't my P1 running" has to be answerable in place. A hold the runner or tracker imposes is not a fact about the work, earns no rank slot, and collapses into a footer group with duplicates.
72
+ **Held slots keep their position.** A hold the graph itself imposes renders *inline at the rank the work would have taken*, with `—` for the rank and a dashed station, because "why isn't my P1 running" has to be answerable in place. A hold the runner or tracker imposes is not a fact about the work, earns no rank slot, and collapses into a footer group with duplicates. A hold's optional `code` and `subject` — the reader's machine-readable cause and the issue it names — are published as `data-code` and `data-subject` beside `data-family`, and omitted rather than emptied when the host stated neither; the viewer interprets neither and renders `reason` verbatim as before.
70
73
 
71
74
  **The rail sits on the canvas, not above it.** Ranks and readiness stations are HTML — SVG text is not selectable, not reflowable and announces poorly — but they are the labels *for* the spine nodes, so each row is positioned at the coordinates the layout computed for its own node. One stage carries both at the layout's own size, so one SVG unit is one CSS pixel and the two cannot drift; it scrolls rather than shrinking, because shrinking would silently break that alignment.
72
75
 
73
76
  **The graph refuses rather than degrades.** Past 60 nodes it stops drawing and shows connected components as capsules — size, blocking count, cycle flag, chain depth — and past 300 it shows clusters only. Each refusal names the next move. A refusal with a route forward reads as competence; a hairball reads as a bug.
74
77
 
78
+ **A row's badges are budgeted; the order is not.** The linear and tree projections draw every row at any size — that is the promise the refusal routes a reader to — so what they bound is the relationships *per row*: past `ROW_BADGE_BUDGET` (12) a row draws the first twelve in the format's field order, `blocked-by` first, and one `+N more relationships` chip carrying `data-omitted`, its name in its visible text because ARIA prohibits naming a generic span. Nothing is cut silently, and the chip carries no edge identity because it names no single edge; an omitted edge is still selectable, since the drawn-check answers from the document before it consults the markup.
79
+
75
80
  ## The edge grammar
76
81
 
77
82
  Every relationship is separable on **four** channels — dash, terminal marker, glyph, and hue — so removing colour entirely leaves all five distinguishable. That is asserted as a property of the table, not claimed about the rendering.
@@ -86,7 +91,11 @@ Every relationship is separable on **four** channels — dash, terminal marker,
86
91
 
87
92
  The `together-with` **connector** lives in this layer, declared deliberately: a click target cannot be added from outside without the viewer knowing where members are.
88
93
 
89
- **Two identities, not one.** Every focusable element carries `data-ig-key`, and exactly one element per key does — otherwise focus lands on whichever the renderer emitted first. The enclosure and its connector are decoration painted *behind* the nodes, so they carry `data-ig-group` instead and stay out of the focus index while remaining clickable: `mountViewer` reads both, so a pointer on either still names its slot.
94
+ **Two identities, not one.** Every focusable element carries `data-ig-key`, and exactly one element per key does — otherwise focus lands on whichever the renderer emitted first. Everything that names an **edge** an ordinary edge path, its terminal marker, and a `together-with` enclosure and connector — carries `data-ig-group` instead, so it stays out of the focus index while remaining clickable: `mountViewer` reads both, so a pointer on either is answered.
95
+
96
+ **They name different subjects, and a host must not assume an issue key.** The enclosure names its **slot** — its `data-ig-group` is the slot's lead, so clicking it selects the unit. Every **edge** mark names the edge itself, with the identity `edgeIdentity` derives, which is exactly the `id` `@issuegraph/store` gives the matching `StoredEdge` — so `findEdge(document, key)` resolves it. That covers all five relationships: the four drawn as arcs, on both the stroke and the arrowhead that caps it, and `together-with` on its connector. One connector is drawn per declared `together-with` edge rather than per adjacent member, because a group is joined by pointing at any existing member (§4.3.7) and a star would otherwise publish a pair the document never declared.
97
+
98
+ So `onSelect` reports **either** an issue key or an edge identity. Distinguish them the way you already hold your data — an issue key is a key in the document you passed in — rather than by parsing the string. Selecting an edge deliberately does **not** move the keyboard tab stop: `navigable` lists issues, and focus is left where the reader put it.
90
99
 
91
100
  ## Theming
92
101
 
@@ -8,14 +8,27 @@
8
8
  * competence; a hairball reads as a bug.
9
9
  *
10
10
  * Components are undirected — every relationship connects, whatever its
11
- * direction — while the depth and cycle questions are asked of `blocked-by`
12
- * alone, because that is the only field that orders anything.
11
+ * direction — while the depth question is asked of `blocked-by` alone, because
12
+ * that is the only field that orders anything.
13
+ *
14
+ * THE CYCLE QUESTION IS NOT ASKED HERE AT ALL. It is answered by the host —
15
+ * `ViewerDocument.cycles`, the reader's own §6.6 stuck groups — and this module
16
+ * only reads which components those cycles touch. It used to walk the edges for
17
+ * the answer itself, and that walk disagreed with the host's on a cycle running
18
+ * through a together unit: the reader contracts a unit to one vertex and this
19
+ * document does not even carry every together edge, so the two were bound to
20
+ * differ, and both were on one screen. One answer, given, is the rule this
21
+ * package already applies to the order; the cycle badge follows it.
13
22
  */
14
23
  import type { NormalizedDocument } from './document.ts';
15
24
  export interface Cluster {
16
25
  /** Members in the document's own key order, so the output is deterministic. */
17
26
  readonly members: readonly string[];
18
27
  readonly blockedByEdges: number;
28
+ /**
29
+ * Whether the host's `cycles` name any member of this component. The host's
30
+ * answer, relayed — never derived from the edges here.
31
+ */
19
32
  readonly hasCycle: boolean;
20
33
  /** The longest `blocked-by` chain, in edges. `0` when nothing blocks. */
21
34
  readonly chainDepth: number;
@@ -1 +1 @@
1
- {"version":3,"file":"clusters.d.ts","sourceRoot":"","sources":["../src/clusters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,WAAW,OAAO;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAkID,kFAAkF;AAClF,wBAAgB,UAAU,CACxB,QAAQ,EAAE,kBAAkB;AAC5B;;;;;;;GAOG;AACH,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC1B,SAAS,OAAO,EAAE,CAyCpB"}
1
+ {"version":3,"file":"clusters.d.ts","sourceRoot":"","sources":["../src/clusters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,WAAW,OAAO;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAuID,kFAAkF;AAClF,wBAAgB,UAAU,CACxB,QAAQ,EAAE,kBAAkB;AAC5B;;;;;;;GAOG;AACH,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC1B,SAAS,OAAO,EAAE,CAiDpB"}
package/dist/clusters.js CHANGED
@@ -8,8 +8,17 @@
8
8
  * competence; a hairball reads as a bug.
9
9
  *
10
10
  * Components are undirected — every relationship connects, whatever its
11
- * direction — while the depth and cycle questions are asked of `blocked-by`
12
- * alone, because that is the only field that orders anything.
11
+ * direction — while the depth question is asked of `blocked-by` alone, because
12
+ * that is the only field that orders anything.
13
+ *
14
+ * THE CYCLE QUESTION IS NOT ASKED HERE AT ALL. It is answered by the host —
15
+ * `ViewerDocument.cycles`, the reader's own §6.6 stuck groups — and this module
16
+ * only reads which components those cycles touch. It used to walk the edges for
17
+ * the answer itself, and that walk disagreed with the host's on a cycle running
18
+ * through a together unit: the reader contracts a unit to one vertex and this
19
+ * document does not even carry every together edge, so the two were bound to
20
+ * differ, and both were on one screen. One answer, given, is the rule this
21
+ * package already applies to the order; the cycle badge follows it.
13
22
  */
14
23
  function connectedComponents(document, drawn) {
15
24
  const adjacency = new Map();
@@ -67,19 +76,25 @@ function connectedComponents(document, drawn) {
67
76
  return components;
68
77
  }
69
78
  /**
70
- * The longest `blocked-by` chain inside one component, and whether that
71
- * component contains a cycle.
79
+ * The longest `blocked-by` chain inside one component, in edges.
72
80
  *
73
81
  * A cycle makes "longest chain" undefined, so the walk reports the depth it
74
- * reached over the acyclic part and says a cycle exists rather than looping or
75
- * inventing a number. Both facts are useful to a reader; a hang is not.
82
+ * reached over the acyclic part rather than looping or inventing a number.
83
+ *
84
+ * IT MEETS BACK-EDGES AND PUBLISHES NOTHING ABOUT THEM. Skipping the edge that
85
+ * closes a loop is what makes this walk TERMINATE and its number finite; it is
86
+ * not a cycle answer, and it must not be read as one — whether a component
87
+ * contains a cycle is the host's `cycles`, read in `clustersOf` below. A raw
88
+ * loop this walk steps over (through a closed issue, say) can be one the
89
+ * reader does not report, and a stuck unit the reader does report can be one
90
+ * this walk cannot see. Two answers to one question is the defect this module
91
+ * was rewritten to remove.
76
92
  */
77
- function depthAndCycle(members, blockedBy) {
93
+ function chainDepthOf(members, blockedBy) {
78
94
  const memo = new Map();
79
95
  const onPath = new Set();
80
- let hasCycle = false;
81
96
  // The edges the discovery pass refused to follow, keyed `from\u0000to` so a
82
- // cycle through one member does not suppress that member's other edges.
97
+ // loop through one member does not suppress that member's other edges.
83
98
  const backEdges = new Set();
84
99
  // ITERATIVE, NOT RECURSIVE. This runs on the graph's REFUSAL path, which is
85
100
  // reached precisely because the component is large — so a per-node call frame
@@ -100,12 +115,11 @@ function depthAndCycle(members, blockedBy) {
100
115
  onPath.add(frame.key);
101
116
  for (const next of blockedBy.get(frame.key) ?? []) {
102
117
  if (onPath.has(next)) {
103
- hasCycle = true;
104
- // REMEMBER WHICH EDGE CLOSED THE CYCLE, not just that one did. The
105
- // collecting pass below walks the same adjacency and has no other
106
- // way to tell a back-edge from an ordinary one, so it counted this
107
- // edge against a memo that was never written — `?? 0` — and every
108
- // cycle came out one edge too long. Measured: a two-node cycle
118
+ // REMEMBER WHICH EDGE CLOSED THE LOOP. The collecting pass below
119
+ // walks the same adjacency and has no other way to tell a back-edge
120
+ // from an ordinary one, so it counted this edge against a memo that
121
+ // was never written `?? 0` and every loop came out one edge too
122
+ // long. Measured: a two-node cycle
109
123
  // published `chainDepth: 2` beside its cycle badge when the longest
110
124
  // acyclic chain through it is one edge, and a three-node cycle
111
125
  // published 3 for a chain of two.
@@ -135,7 +149,7 @@ function depthAndCycle(members, blockedBy) {
135
149
  let depth = 0;
136
150
  for (const member of members)
137
151
  depth = Math.max(depth, memo.get(member) ?? 0);
138
- return { depth, hasCycle };
152
+ return depth;
139
153
  }
140
154
  /** Every component the document declares, largest first, then by first member. */
141
155
  export function clustersOf(document,
@@ -158,6 +172,12 @@ drawn) {
158
172
  else
159
173
  existing.push(edge.to);
160
174
  }
175
+ // Every issue the host reports as inside a `blocked-by` cycle. Read off the
176
+ // document, which already narrowed the host's cycles to the keys it carries.
177
+ const stuck = new Set();
178
+ for (const cycle of document.cycles)
179
+ for (const member of cycle)
180
+ stuck.add(member);
161
181
  const clusters = connectedComponents(document, drawn).map((members) => {
162
182
  // SUMMED OFF THE ADJACENCY ABOVE, NOT RE-FILTERED PER COMPONENT. This used to
163
183
  // scan the WHOLE edge array once per component, which is quadratic in exactly
@@ -174,8 +194,11 @@ drawn) {
174
194
  let blockedByEdges = 0;
175
195
  for (const member of members)
176
196
  blockedByEdges += blockedBy.get(member)?.length ?? 0;
177
- const { depth, hasCycle } = depthAndCycle(members, blockedBy);
178
- return { members, blockedByEdges, hasCycle, chainDepth: depth };
197
+ // THE HOST'S ANSWER, LOOKED UP never re-derived. A cycle the reader
198
+ // found touches this component when any member of it is a member here; the
199
+ // set is built once above, so the whole pass stays linear.
200
+ const hasCycle = members.some((member) => stuck.has(member));
201
+ return { members, blockedByEdges, hasCycle, chainDepth: chainDepthOf(members, blockedBy) };
179
202
  });
180
203
  // CODE UNITS, NOT `localeCompare`. This package promises deterministic
181
204
  // rendering, and `locale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C,CAAC;QACvB,KAAK,MAAM,MAAM,IAAI,OAAO;YAAE,cAAc,IAAI,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC;QACnF,sEAAsE;QACtE,2EAA2E;QAC3E,2DAA2D;QAC3D,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;IAC7F,CAAC,CAAC,CAAC;IAEH,uEAAuE;IACvE,+EAA+E;IAC/E,yEAAyE;IACzE,4EAA4E;IAC5E,4EAA4E;IAC5E,6EAA6E;IAC7E,8DAA8D;IAC9D,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC5B,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM;YAAE,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACtF,MAAM,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAChC,MAAM,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACjC,OAAO,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -14,10 +14,12 @@
14
14
  * source. The viewer derives no order, resolves no reference, and reads no
15
15
  * tracker — everything it draws was given to it.
16
16
  *
17
- * `normalizeDocument` is the one entry point. It never throws: a document
18
- * assembled by hand is untrusted input, not a contract, and a renderer that
19
- * dies on a dangling edge is worse than one that draws what it can and says
20
- * what it dropped.
17
+ * `normalizeDocument` is the one entry point. It never throws on a document of
18
+ * the declared shape: a document assembled by hand is untrusted input, not a
19
+ * contract, and a renderer that dies on a dangling edge is worse than one that
20
+ * draws what it can and says what it dropped. A MISSING FIELD IS OUTSIDE THAT
21
+ * PROMISE — `order` absent has always thrown, and `cycles` absent throws the
22
+ * same way — because a document without one is a type error, not a document.
21
23
  */
22
24
  import { type EdgeField } from '@issuegraph/core';
23
25
  /**
@@ -68,6 +70,23 @@ export interface ViewerHold {
68
70
  readonly family: HoldFamily;
69
71
  /** Human-readable, host-authored. The viewer renders it verbatim. */
70
72
  readonly reason: string;
73
+ /**
74
+ * The machine-readable cause, host-authored like `reason`. A host fed by
75
+ * `@issuegraph/reader` supplies its `ReadinessHold.code`; the viewer
76
+ * publishes whatever it is given as `data-code` and interprets none of it,
77
+ * because the vocabulary is the reader's and this layer restates nothing.
78
+ * OPTIONAL BY DESIGN: a hold the tracker or runner imposes has no reader
79
+ * code, and inventing one would be a second vocabulary.
80
+ */
81
+ readonly code?: string | undefined;
82
+ /**
83
+ * The issue the cause names — the open blocker, the claimed peer, the unready
84
+ * member — when it names one, as the document's own key for it. Published as
85
+ * `data-subject` so a host can turn the sentence into a link or a filter
86
+ * facet; the viewer draws it as text and links nothing (it has no URL shape
87
+ * to link with — see `ViewerIssue.url`).
88
+ */
89
+ readonly subject?: string | undefined;
71
90
  }
72
91
  /** One issue the document knows about. */
73
92
  export interface ViewerIssue {
@@ -137,11 +156,34 @@ export interface ViewerOrder {
137
156
  readonly slots: readonly ViewerSlot[];
138
157
  readonly excluded: readonly ViewerExclusion[];
139
158
  }
159
+ /**
160
+ * One `blocked-by` cycle, as the host's reader found it: every member key, in
161
+ * whatever order the host supplied. A cycle of one is a self-loop.
162
+ *
163
+ * ONCE NORMALISED IT IS THE MEMBERS THIS DOCUMENT CARRIES, which need not be
164
+ * a closed ring: a document that is a slice of the graph — a window, a focus
165
+ * — keeps the members it draws and drops the rest, exactly as it does for the
166
+ * edges. A cycle is still a stuck group, and a member of one is still stuck.
167
+ */
168
+ export type ViewerCycle = readonly string[];
140
169
  /** Everything the viewer draws. */
141
170
  export interface ViewerDocument {
142
171
  readonly issues: readonly ViewerIssue[];
143
172
  readonly edges: readonly ViewerEdge[];
144
173
  readonly order: ViewerOrder;
174
+ /**
175
+ * The `blocked-by` cycles the document contains, AS THE HOST DERIVED THEM.
176
+ * A host fed by `@issuegraph/reader` passes `Model.cycles` verbatim — the
177
+ * spec's §6.6 stuck groups; a hand-assembled document passes `[]`.
178
+ *
179
+ * REQUIRED, LIKE `order`, AND FOR THE SAME REASON: the viewer derives no
180
+ * cycle, as it derives no order — the edges here are the ones it can draw,
181
+ * not the graph, so a walk over them is a mirror whose input space drifts
182
+ * (see `clusters.ts`). And a badge that is simply absent reads as "no
183
+ * cycle", so an answer a host forgot to pass must not render as one: `[]`
184
+ * says none, and omission is a type error.
185
+ */
186
+ readonly cycles: readonly ViewerCycle[];
145
187
  }
146
188
  /**
147
189
  * A normalised document plus an index over it. The index exists so no
@@ -152,6 +194,12 @@ export interface NormalizedDocument {
152
194
  readonly issues: readonly ViewerIssue[];
153
195
  readonly edges: readonly ViewerEdge[];
154
196
  readonly order: ViewerOrder;
197
+ /**
198
+ * The host's cycles, narrowed to the keys this document carries. Every
199
+ * member here is present in `byKey`; a cycle none of whose members are is
200
+ * not here at all.
201
+ */
202
+ readonly cycles: readonly ViewerCycle[];
155
203
  /** Key -> issue. Every edge and slot member below is present here. */
156
204
  readonly byKey: ReadonlyMap<string, ViewerIssue>;
157
205
  /** Key -> the edges touching it, in document order. */
@@ -183,8 +231,9 @@ export interface NormalizeResult {
183
231
  /**
184
232
  * Read a document into the shape every projection consumes.
185
233
  *
186
- * Deterministic and total: the same input always produces the same output, and
187
- * no input produces a throw. Call it once per render and pass the result down.
234
+ * Deterministic and total over the declared shape: the same input always
235
+ * produces the same output, and no document produces a throw. Call it once per
236
+ * render and pass the result down.
188
237
  */
189
238
  export declare function normalizeDocument(input: ViewerDocument): NormalizeResult;
190
239
  //# sourceMappingURL=document.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../src/document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAEL,KAAK,SAAS,EAGf,MAAM,kBAAkB,CAAC;AAE1B;;;;;GAKG;AACH,MAAM,MAAM,cAAc;AACxB,iFAAiF;AAC/E;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AACpF,sEAAsE;GACpE;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAC/D;;;;GAIG;GACD;IACE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC,CAAC;AAEN,wEAAwE;AACxE,MAAM,MAAM,UAAU;AACpB;;;;;GAKG;AACD,OAAO;AACT;;;;GAIG;GACD,SAAS,CAAC;AAEd,iEAAiE;AACjE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,0CAA0C;AAC1C,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,QAAQ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5B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IACxC,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACjD,uDAAuD;IACvD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC,CAAC;IAC7D,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvD;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAqTD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,eAAe,CAoDxE"}
package/dist/document.js CHANGED
@@ -14,10 +14,12 @@
14
14
  * source. The viewer derives no order, resolves no reference, and reads no
15
15
  * tracker — everything it draws was given to it.
16
16
  *
17
- * `normalizeDocument` is the one entry point. It never throws: a document
18
- * assembled by hand is untrusted input, not a contract, and a renderer that
19
- * dies on a dangling edge is worse than one that draws what it can and says
20
- * what it dropped.
17
+ * `normalizeDocument` is the one entry point. It never throws on a document of
18
+ * the declared shape: a document assembled by hand is untrusted input, not a
19
+ * contract, and a renderer that dies on a dangling edge is worse than one that
20
+ * draws what it can and says what it dropped. A MISSING FIELD IS OUTSIDE THAT
21
+ * PROMISE — `order` absent has always thrown, and `cycles` absent throws the
22
+ * same way — because a document without one is a type error, not a document.
21
23
  */
22
24
  import { EDGE_CARDINALITY, isEdgeField, isSymmetricEdgeField, } from '@issuegraph/core';
23
25
  /**
@@ -250,11 +252,59 @@ function normalizeSlots(slots, byKey, diagnostics) {
250
252
  }
251
253
  return { kept, placed };
252
254
  }
255
+ /**
256
+ * A cycle survives with the members this document carries; an unknown member
257
+ * is dropped from it with a diagnostic, and a cycle left with no member is
258
+ * dropped whole. The host's ORDER of members is kept — it is the reader's own
259
+ * sorted order, and re-sorting it here would be a second opinion about a
260
+ * value this layer only relays.
261
+ *
262
+ * NOT VALIDATED AGAINST THE EDGES. The host's reader saw the whole graph; this
263
+ * document may carry a slice of it, so a cycle whose closing edge is absent
264
+ * here is still a cycle the reader found, and refusing it would make the badge
265
+ * depend on which edges the host chose to draw — the drift the field exists to
266
+ * remove.
267
+ */
268
+ function normalizeCycles(cycles, byKey, diagnostics) {
269
+ const kept = [];
270
+ cycles.forEach((cycle, index) => {
271
+ // AN EMPTY CYCLE IS THE HOST'S MISTAKE, NOT THIS DOCUMENT'S. The reader never
272
+ // emits one — a stuck group has at least one member — so it is reported as
273
+ // what it is rather than as a slice that happened to carry none of it.
274
+ if (cycle.length === 0) {
275
+ diagnostics.push(`cycle at index ${String(index)} is empty and was dropped`);
276
+ return;
277
+ }
278
+ // A MEMBER IS NAMED ONCE PER CYCLE, and the dedupe runs BEFORE the carry
279
+ // test so a repeated unknown key is reported once. A hand-built cycle can
280
+ // repeat a key, and the count `clustersOf` derives from it would then read
281
+ // one issue as two. First occurrence wins, as everywhere else in this reader.
282
+ const seen = new Set();
283
+ const members = cycle.filter((member) => {
284
+ if (seen.has(member)) {
285
+ diagnostics.push(`cycle member ${member} is named twice in one cycle; the repeat was dropped`);
286
+ return false;
287
+ }
288
+ seen.add(member);
289
+ if (byKey.has(member))
290
+ return true;
291
+ diagnostics.push(`cycle member ${member} is not an issue in this document and was dropped from the cycle`);
292
+ return false;
293
+ });
294
+ if (members.length === 0) {
295
+ diagnostics.push(`cycle at index ${String(index)} names no issue in this document and was dropped`);
296
+ return;
297
+ }
298
+ kept.push(Object.freeze(members));
299
+ });
300
+ return kept;
301
+ }
253
302
  /**
254
303
  * Read a document into the shape every projection consumes.
255
304
  *
256
- * Deterministic and total: the same input always produces the same output, and
257
- * no input produces a throw. Call it once per render and pass the result down.
305
+ * Deterministic and total over the declared shape: the same input always
306
+ * produces the same output, and no document produces a throw. Call it once per
307
+ * render and pass the result down.
258
308
  */
259
309
  export function normalizeDocument(input) {
260
310
  const diagnostics = [];
@@ -292,11 +342,13 @@ export function normalizeDocument(input) {
292
342
  const isolated = issues
293
343
  .filter((issue) => !placed.has(issue.key) && (edgesOf.get(issue.key) ?? []).length === 0)
294
344
  .map((issue) => issue.key);
345
+ const cycles = normalizeCycles(input.cycles, byKey, diagnostics);
295
346
  return Object.freeze({
296
347
  document: Object.freeze({
297
348
  issues: Object.freeze(issues),
298
349
  edges: Object.freeze(edges),
299
350
  order: Object.freeze({ slots: Object.freeze(slots), excluded: Object.freeze(excluded) }),
351
+ cycles: Object.freeze(cycles),
300
352
  byKey,
301
353
  edgesOf,
302
354
  isolated: Object.freeze(isolated),
@@ -1 +1 @@
1
- {"version":3,"file":"document.js","sourceRoot":"","sources":["../src/document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EACL,gBAAgB,EAEhB,WAAW,EACX,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAsK1B;;;;;;;;;;;;GAYG;AACH,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAEtF,SAAS,UAAU,CAAC,GAAW;IAC7B,4EAA4E;IAC5E,4EAA4E;I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E,CAAC;YACxF,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;YAC7B,KAAK;YACL,OAAO;YACP,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;YACjC,eAAe;SAChB,CAAC;QACF,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;KACxC,CAAC,CAAC;AACL,CAAC"}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The innermost layer of the Issuegraph UI, and the whole of its contract:
5
5
  *
6
- * in {issues, edges, order} + a projection choice
6
+ * in {issues, edges, order, cycles} + a projection choice
7
7
  * out onSelect, onHover
8
8
  * never fetching, mutation, auth, persistence, or a host's vocabulary
9
9
  *
@@ -19,9 +19,20 @@
19
19
  * because a published package can add an export later and can never take one
20
20
  * back.
21
21
  *
22
+ * ONE OF THOSE CONSUMERS IS `@issuegraph/editor`, which is why the markup
23
+ * grammar and the component summary are on the surface at all. Layer 2 draws
24
+ * edit affordances as overlays on this layer and refuses the canvas on this
25
+ * layer's budgets, and it composes through this file or not at all — its own
26
+ * README states the rule: what a sibling does not export gets exported
27
+ * deliberately, never reached past. The alternative for each was a second
28
+ * implementation out there: a second HTML escaper over untrusted document text,
29
+ * and a second components/depth pass whose input space drifts from this
30
+ * one. `svg`, `materialize` and the mount-side element types stay internal —
31
+ * nothing owes them yet.
32
+ *
22
33
  * @see https://github.com/autnmy/issuegraph/blob/main/SPEC.md
23
34
  */
24
- export type { HoldFamily, NormalizeResult, NormalizedDocument, RankProvenance, ViewerDocument, ViewerEdge, ViewerExclusion, ViewerHold, ViewerIssue, ViewerOrder, ViewerSlot, } from './document.ts';
35
+ export type { HoldFamily, NormalizeResult, NormalizedDocument, RankProvenance, ViewerCycle, ViewerDocument, ViewerEdge, ViewerExclusion, ViewerHold, ViewerIssue, ViewerOrder, ViewerSlot, } from './document.ts';
25
36
  export { normalizeDocument } from './document.ts';
26
37
  export type { Projection, Scene } from './scene.ts';
27
38
  export { KEY_ATTRIBUTE } from './scene.ts';
@@ -37,4 +48,9 @@ export { viewerStylesheet } from './styles.ts';
37
48
  export type { EdgeDash, EdgeTerminal, EdgeTreatment, OrderingEffect } from './vocabulary.ts';
38
49
  export { EDGE_TREATMENTS, dashArrayFor, treatmentFor } from './vocabulary.ts';
39
50
  export { CLUSTER_ONLY_BUDGET, GRAPH_NODE_BUDGET } from './projections/graph.ts';
51
+ export { ROW_BADGE_BUDGET } from './parts.ts';
52
+ export type { Cluster } from './clusters.ts';
53
+ export { clustersOf } from './clusters.ts';
54
+ export type { AttrValue, ElementSpec, SpecChild } from './element.ts';
55
+ export { element, renderMarkup } from './element.ts';
40
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,YAAY,EACV,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,UAAU,EACV,eAAe,EACf,UAAU,EACV,WAAW,EACX,WAAW,EACX,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,YAAY,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,s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MAAM,YAAY,CAAC;AAEzC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9E,YAAY,EACV,UAAU,EACV,WAAW,EACX,KAAK,EACL,aAAa,EACb,SAAS,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EACnB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The innermost layer of the Issuegraph UI, and the whole of its contract:
5
5
  *
6
- * in {issues, edges, order} + a projection choice
6
+ * in {issues, edges, order, cycles} + a projection choice
7
7
  * out onSelect, onHover
8
8
  * never fetching, mutation, auth, persistence, or a host's vocabulary
9
9
  *
@@ -19,6 +19,17 @@
19
19
  * because a published package can add an export later and can never take one
20
20
  * back.
21
21
  *
22
+ * ONE OF THOSE CONSUMERS IS `@issuegraph/editor`, which is why the markup
23
+ * grammar and the component summary are on the surface at all. Layer 2 draws
24
+ * edit affordances as overlays on this layer and refuses the canvas on this
25
+ * layer's budgets, and it composes through this file or not at all — its own
26
+ * README states the rule: what a sibling does not export gets exported
27
+ * deliberately, never reached past. The alternative for each was a second
28
+ * implementation out there: a second HTML escaper over untrusted document text,
29
+ * and a second components/depth pass whose input space drifts from this
30
+ * one. `svg`, `materialize` and the mount-side element types stay internal —
31
+ * nothing owes them yet.
32
+ *
22
33
  * @see https://github.com/autnmy/issuegraph/blob/main/SPEC.md
23
34
  */
24
35
  export { normalizeDocument } from "./document.js";
@@ -30,4 +41,7 @@ export { resolveTheme, COLOR_TOKENS, METRIC_TOKENS, THEME_TOKENS, TYPE_TOKENS, d
30
41
  export { viewerStylesheet } from "./styles.js";
31
42
  export { EDGE_TREATMENTS, dashArrayFor, treatmentFor } from "./vocabulary.js";
32
43
  export { CLUSTER_ONLY_BUDGET, GRAPH_NODE_BUDGET } from "./projections/graph.js";
44
+ export { ROW_BADGE_BUDGET } from "./parts.js";
45
+ export { clustersOf } from "./clusters.js";
46
+ export { element, renderMarkup } from "./element.js";
33
47
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAeH,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQ3C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS9E,OAAO,EAAE,YAAY,EACnB,YAAY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95
95
  * better than drawing at coordinates nobody computed.
96
96
  */
97
97
  export declare function edgeGeometry(layout: GraphLayout, edge: ViewerEdge): EdgeGeometry | null;
98
+ /**
99
+ * The path joining two members of one together unit, clear of every member box.
100
+ *
101
+ * ONE CONNECTOR PER DECLARED EDGE, which is why this takes two keys rather than
102
+ * a position in the member list. A group is joined by pointing at any existing
103
+ * member (§4.3.7), so `2 together-with 1` plus `3 together-with 1` is an
104
+ * ordinary STAR whose members lay out as three consecutive rows — and a
105
+ * connector drawn between adjacent rows would claim a `2`–`3` relationship the
106
+ * document never declares while leaving the real `1`–`3` edge undrawable.
107
+ *
108
+ * TWO ROUTES, and the branch is the whole of it. Members of a slot are placed
109
+ * consecutively in one column, so an edge between NEIGHBOURING rows crosses
110
+ * only the gap between them and is drawn straight. An edge that spans a row —
111
+ * which only a star can produce — would run through the node between them, so
112
+ * it is routed out to a lane in the enclosure's own padding. The lane sits left
113
+ * of `x`, and every member box in a column starts at exactly `x`, so the
114
+ * vertical run is provably outside every occupied x-range rather than merely
115
+ * looking clear.
116
+ *
117
+ * Endpoints come from measured bounds on both routes, per the kit's
118
+ * implementation note: a hit target derived from an eyeballed offset drifts the
119
+ * first time the type scale moves.
120
+ */
121
+ export declare function connectorPath(layout: GraphLayout, members: readonly string[], from: string, to: string, theme: Theme): string | null;
98
122
  /** The box enclosing a together unit's members, padded clear of their bounds. */
99
123
  export declare function enclosureBounds(layout: GraphLayout, members: readonly string[], theme: Theme): {
100
124
  x: number;