@issuegraph/viewer 0.3.0 → 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/dist/document.d.ts +152 -0
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +185 -2
- package/dist/document.js.map +1 -1
- package/dist/element.d.ts +11 -0
- package/dist/element.d.ts.map +1 -1
- package/dist/element.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +51 -50
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +364 -168
- package/dist/layout.js.map +1 -1
- package/dist/mount.d.ts +13 -0
- package/dist/mount.d.ts.map +1 -1
- package/dist/mount.js +69 -1
- package/dist/mount.js.map +1 -1
- package/dist/navigation.d.ts +14 -0
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +20 -0
- package/dist/navigation.js.map +1 -1
- package/dist/parts.d.ts +285 -2
- package/dist/parts.d.ts.map +1 -1
- package/dist/parts.js +781 -63
- package/dist/parts.js.map +1 -1
- package/dist/projections/graph.d.ts +10 -0
- package/dist/projections/graph.d.ts.map +1 -1
- package/dist/projections/graph.js +413 -326
- package/dist/projections/graph.js.map +1 -1
- package/dist/projections/linear.d.ts +90 -0
- package/dist/projections/linear.d.ts.map +1 -1
- package/dist/projections/linear.js +213 -31
- package/dist/projections/linear.js.map +1 -1
- package/dist/projections/tree.d.ts.map +1 -1
- package/dist/projections/tree.js +26 -3
- package/dist/projections/tree.js.map +1 -1
- package/dist/styles.d.ts +10 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +803 -132
- package/dist/styles.js.map +1 -1
- package/dist/theme.d.ts +5 -6
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +72 -7
- package/dist/theme.js.map +1 -1
- package/dist/vocabulary.d.ts +39 -0
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +27 -0
- package/dist/vocabulary.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AA4BH,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;AAU9E,OAAO,EAAE,YAAY,EACnB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,6EAA6E;AAC7E,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,gFAAgF;AAChF,+EAA+E;AAC/E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,WAAW;AACX,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEzF,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChF,iFAAiF;AACjF,8EAA8E;AAC9E,qDAAqD;AACrD,+EAA+E;AAC/E,yEAAyE;AACzE,6DAA6D;AAC7D,6EAA6E;AAC7E,2EAA2E;AAC3E,qEAAqE;AACrE,2EAA2E;AAC3E,qBAAqB;AACrB,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,0EAA0E;AAC1E,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,QAAQ,EACR,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/layout.d.ts
CHANGED
|
@@ -46,6 +46,15 @@ export interface NodeBox {
|
|
|
46
46
|
/** The slot this node belongs to, when it is on the spine. */
|
|
47
47
|
readonly rank: number | null;
|
|
48
48
|
readonly held: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The runner is working this one NOW.
|
|
51
|
+
*
|
|
52
|
+
* §16b gives it the top station on the spine, above rank 1, because "what is
|
|
53
|
+
* running" and "what is next" are the same question asked one step apart —
|
|
54
|
+
* and a NOW row rendered above the canvas, which is what shipped, is off the
|
|
55
|
+
* one line the whole sequence is supposed to read down.
|
|
56
|
+
*/
|
|
57
|
+
readonly now?: boolean;
|
|
49
58
|
}
|
|
50
59
|
export interface Point {
|
|
51
60
|
readonly x: number;
|
|
@@ -62,22 +71,53 @@ export interface GraphLayout {
|
|
|
62
71
|
/** The free vertical channels arcs route through. */
|
|
63
72
|
readonly leftChannel: number;
|
|
64
73
|
readonly rightChannel: number;
|
|
74
|
+
/**
|
|
75
|
+
* The x of the spine LINE — the one vertical the whole sequence reads off.
|
|
76
|
+
* Stations are centred on it and the cards sit to its right.
|
|
77
|
+
*/
|
|
78
|
+
readonly spineLineX: number;
|
|
79
|
+
/** Where the spine line starts and ends, so it spans the stations and no more. */
|
|
80
|
+
readonly spineTop: number;
|
|
81
|
+
readonly spineBottom: number;
|
|
82
|
+
/** The x each of the three column headings is set at. */
|
|
83
|
+
readonly columnX: Readonly<Record<Column, number>>;
|
|
84
|
+
/**
|
|
85
|
+
* The slot leads the canvas draws NOWHERE — runner-held, and blocking nothing
|
|
86
|
+
* on the spine, so they explain nothing about the order. They are the graph's
|
|
87
|
+
* half of §16a's footer group, and the projection renders them beneath the
|
|
88
|
+
* stage as that group rather than on a column.
|
|
89
|
+
*/
|
|
90
|
+
readonly footer: readonly string[];
|
|
91
|
+
/** Whether this layout is the in-column preview or the full-width picture. */
|
|
92
|
+
readonly compact: boolean;
|
|
65
93
|
}
|
|
66
94
|
/**
|
|
67
|
-
* How wide a drawn label runs
|
|
68
|
-
* with.
|
|
95
|
+
* How wide a drawn label runs.
|
|
69
96
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
97
|
+
* NOTHING TRUNCATES ANY MORE, and this is what replaced the function that did.
|
|
98
|
+
* A node is an HTML card whose title wraps, so the question stopped being "how
|
|
99
|
+
* much of this fits on one line" and became "how many lines does this need" —
|
|
100
|
+
* which is what {@link layoutGraph} asks it, to give a card a height before
|
|
101
|
+
* anything is rendered. `fitLabel` went with the truncation it existed to
|
|
102
|
+
* perform: §16b's acceptance is that nothing truncates that the design draws in
|
|
103
|
+
* full, and a helper that shortens a title had no caller left.
|
|
104
|
+
*
|
|
105
|
+
* IT IS A CEILING, per character class rather than a flat average — see
|
|
106
|
+
* `labelWidth`. A card that reserves slightly too much leaves a gap; one that
|
|
107
|
+
* reserves too little is overlapped by the next rank.
|
|
76
108
|
*/
|
|
77
109
|
export declare function measureLabel(theme: Theme, label: string): number;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Lay a document out. Pure: coordinates depend only on the document, the theme
|
|
112
|
+
* and the size.
|
|
113
|
+
*
|
|
114
|
+
* COMPACT IS A SIZE, NOT A DEGRADED MODE. §16b is explicit that at a settings
|
|
115
|
+
* column's width the arcs and both gutters cannot be drawn legibly, so the
|
|
116
|
+
* in-column case is a spine-only preview with an expand affordance rather than
|
|
117
|
+
* the same picture squeezed. Expressed as a zero-width gutter, so exactly one
|
|
118
|
+
* layout computes both and the spine's own geometry cannot differ between them.
|
|
119
|
+
*/
|
|
120
|
+
export declare function layoutGraph(document: NormalizedDocument, theme: Theme, compact?: boolean): GraphLayout;
|
|
81
121
|
export interface EdgeGeometry {
|
|
82
122
|
/** The SVG path. Always a quadratic through one of the free channels. */
|
|
83
123
|
readonly d: string;
|
|
@@ -86,44 +126,5 @@ export interface EdgeGeometry {
|
|
|
86
126
|
/** Radians. Orients the terminal marker along the path's own tangent. */
|
|
87
127
|
readonly endAngle: number;
|
|
88
128
|
}
|
|
89
|
-
/**
|
|
90
|
-
* The geometry for one edge, derived entirely from the two boxes' bounds.
|
|
91
|
-
*
|
|
92
|
-
* Returns `null` when either end has no box — which `normalizeDocument` has
|
|
93
|
-
* already made impossible for a kept edge, so a `null` here means a caller
|
|
94
|
-
* built a layout from a different document than the edge came from. Refusing is
|
|
95
|
-
* better than drawing at coordinates nobody computed.
|
|
96
|
-
*/
|
|
97
129
|
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;
|
|
122
|
-
/** The box enclosing a together unit's members, padded clear of their bounds. */
|
|
123
|
-
export declare function enclosureBounds(layout: GraphLayout, members: readonly string[], theme: Theme): {
|
|
124
|
-
x: number;
|
|
125
|
-
y: number;
|
|
126
|
-
width: number;
|
|
127
|
-
height: number;
|
|
128
|
-
} | null;
|
|
129
130
|
//# sourceMappingURL=layout.d.ts.map
|
package/dist/layout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAoB,KAAK,KAAK,EAAgB,MAAM,YAAY,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAe7C,CAAC;AAEH,mCAAmC;AACnC,MAAM,MAAM,MAAM,GAAG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