@crewlethq/ui 0.121.1 → 0.123.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 +45 -2
- package/dist/Charts/StackedRing.d.ts +40 -0
- package/dist/Charts/TimeSeries.d.ts +8 -1
- package/dist/Charts/index.d.ts +2 -0
- package/dist/Charts/index.js +1 -1
- package/dist/{Charts-UJKADWXE.css → Charts-4VQ7T3GB.css} +85 -0
- package/dist/DataGrid/DataGrid.d.ts +11 -1
- package/dist/DataGrid/index.d.ts +1 -1
- package/dist/DataGrid/index.js +1 -1
- package/dist/{DataGrid-7KUUYSHA.css → DataGrid-KAFVH4B3.css} +3 -1
- package/dist/DeepWorkCard/index.js +2 -2
- package/dist/Fullscreen/FullscreenToggle.d.ts +21 -0
- package/dist/Fullscreen/index.d.ts +2 -0
- package/dist/Fullscreen/index.js +11 -1
- package/dist/GraphCanvas/GraphCanvas.d.ts +268 -0
- package/dist/GraphCanvas/index.d.ts +9 -0
- package/dist/GraphCanvas/index.js +21 -0
- package/dist/GraphCanvas/layout.d.ts +231 -0
- package/dist/GraphCanvas/reach.d.ts +27 -0
- package/dist/GraphCanvas/walk.d.ts +21 -0
- package/dist/GraphCanvas-UZPZRP6S.css +793 -0
- package/dist/IconTile/IconTile.d.ts +26 -18
- package/dist/IconTile/index.d.ts +1 -1
- package/dist/IconTile/index.js +1 -1
- package/dist/IconTile-6OSCIHYU.css +112 -0
- package/dist/ObjectHeader/ObjectHeader.d.ts +17 -2
- package/dist/ObjectHeader/index.d.ts +2 -2
- package/dist/ObjectHeader/index.js +1 -1
- package/dist/{ObjectHeader-5RK5YAUK.css → ObjectHeader-BH7OBEAL.css} +12 -0
- package/dist/OpenInAppCard/index.js +2 -2
- package/dist/OrgTable/index.js +5 -5
- package/dist/PropertyList/index.js +2 -2
- package/dist/ReviewList/index.js +2 -2
- package/dist/RichEditor/index.js +1 -1
- package/dist/SetupWizard/index.js +2 -2
- package/dist/StatusLegend/StatusLegend.d.ts +1 -1
- package/dist/StatusLegend/index.js +1 -1
- package/dist/{StatusLegend-HVMKJQFY.css → StatusLegend-DMSTS2NG.css} +9 -0
- package/dist/TreeGrid/index.js +2 -2
- package/dist/{chunk-W5XCNEZC.js → chunk-3JLG6KRU.js} +23 -2
- package/dist/{chunk-65AMIQSW.js → chunk-4PEPSGCZ.js} +4 -2
- package/dist/{chunk-AGVGX52B.js → chunk-7XYU5PSQ.js} +1 -1
- package/dist/{chunk-5LIWAA7S.js → chunk-CXFMNOPV.js} +15 -6
- package/dist/chunk-DSBKVP73.js +2138 -0
- package/dist/{chunk-3RKS3DLF.js → chunk-ENYHABQJ.js} +1 -1
- package/dist/{chunk-S2ZUAI6C.js → chunk-EWJOBD25.js} +2 -2
- package/dist/{chunk-KZTR3V2P.js → chunk-J44ZIWGH.js} +11 -3
- package/dist/{chunk-X5YI6QLW.js → chunk-NOKZULW3.js} +1 -1
- package/dist/{chunk-ZOMTCEHR.js → chunk-OFNJE4BN.js} +6 -1
- package/dist/{chunk-75O3HCCD.js → chunk-T4TKY4VZ.js} +1 -1
- package/dist/chunk-VRVNLJUA.js +46 -0
- package/dist/{chunk-MNTN5ESE.js → chunk-ZY5322MJ.js} +77 -3
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +42 -41
- package/dist/index.js +42 -41
- package/dist/styles.css +1137 -154
- package/package.json +3 -3
- package/dist/IconTile-G52XZVR4.css +0 -33
- package/dist/chunk-3LI4TRUR.js +0 -22
- package/dist/{Editor-JCAYNXQX.js → Editor-SBHTMAEK.js} +1 -1
- package/dist/{chunk-WLL3PFI3.js → chunk-2DZV4PHK.js} +1 -1
- package/dist/{chunk-4Z3AGYOB.js → chunk-P42LNYRX.js} +1 -1
- /package/dist/{chunk-33NGH63Z.js → chunk-QV3WVNRA.js} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { GRAPH_CANVAS_DETAIL_ZOOM, GRAPH_CANVAS_FIT_FLOOR, GRAPH_CANVAS_FLOW_LIMIT, GRAPH_CANVAS_LABELS, GRAPH_CANVAS_NARROW_WIDTH, GRAPH_CANVAS_OPEN_ZOOM, GRAPH_EDGE_FAMILIES, GRAPH_ORDER_SWEEPS, GraphCanvas, graphItemKey, graphNeighbourhood, graphReach, graphStep, graphTrunks, graphWindow, layoutGraph, routeGraphEdges } from '../chunk-DSBKVP73.js';
|
|
2
|
+
import '../chunk-MY374UUD.js';
|
|
3
|
+
import '../chunk-L6HUVA33.js';
|
|
4
|
+
import '../chunk-3JLG6KRU.js';
|
|
5
|
+
import '../chunk-GKHZSNIV.js';
|
|
6
|
+
import '../chunk-X4HBZSXA.js';
|
|
7
|
+
import '../chunk-XLMURU75.js';
|
|
8
|
+
import '../chunk-WSIJDWUG.js';
|
|
9
|
+
import '../chunk-VBBLHS2Y.js';
|
|
10
|
+
import '../chunk-M2M6ZD7P.js';
|
|
11
|
+
import '../chunk-XSPCITPN.js';
|
|
12
|
+
import '../chunk-X5YI6E5X.js';
|
|
13
|
+
import '../chunk-TDFLCUBE.js';
|
|
14
|
+
import '../chunk-HXVMXH6U.js';
|
|
15
|
+
import '../chunk-L72URIHR.js';
|
|
16
|
+
import '../chunk-HTS5RJ7S.js';
|
|
17
|
+
import '../chunk-FIX72ZEC.js';
|
|
18
|
+
import '../chunk-EDPMHSLZ.js';
|
|
19
|
+
import '../chunk-4ITETIGZ.js';
|
|
20
|
+
import '../chunk-RRRK2KB6.js';
|
|
21
|
+
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The layout of a layered map, as pure functions: lanes read left to right,
|
|
3
|
+
* bands stacked under each other, groups inside a lane, and orthogonal edges.
|
|
4
|
+
*
|
|
5
|
+
* ONE ROW GRID PER BAND. Every card is the same size and stands in a cell of
|
|
6
|
+
* its band's grid, a group's header takes a row of its own, and an empty lane
|
|
7
|
+
* keeps the rows its message needs. Because every lane of a band shares the
|
|
8
|
+
* rows, the gaps between rows are free of cards in every lane at once, so an
|
|
9
|
+
* edge that crosses a lane runs along a gap and never through a card.
|
|
10
|
+
*
|
|
11
|
+
* LANES ARE INPUT. Nothing here assigns ranks: a cycle is an edge drawn back
|
|
12
|
+
* across a lane, and the order inside a lane is a fixed number of barycentric
|
|
13
|
+
* sweeps, ties broken by the caller's order, so the same input always gives
|
|
14
|
+
* the same picture.
|
|
15
|
+
*/
|
|
16
|
+
import type { CanvasPoint, CanvasRect } from '../Canvas/geometry.js';
|
|
17
|
+
/** A band of lanes, top to bottom; its lanes read left to right. */
|
|
18
|
+
export interface GraphLayoutBand {
|
|
19
|
+
id: string;
|
|
20
|
+
/** Whether the band draws a title above its lane headers. */
|
|
21
|
+
titled: boolean;
|
|
22
|
+
/** The ids of its lanes, in reading order. */
|
|
23
|
+
lanes: readonly string[];
|
|
24
|
+
}
|
|
25
|
+
export interface GraphLayoutNode {
|
|
26
|
+
id: string;
|
|
27
|
+
lane: string;
|
|
28
|
+
group?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The column of its lane it stands in, from 0, for a lane wider than one
|
|
31
|
+
* column whose columns mean something (a depth: what calls stands left of
|
|
32
|
+
* what is called). Read for a lane that holds no groups; elsewhere the lane
|
|
33
|
+
* fills row by row.
|
|
34
|
+
*/
|
|
35
|
+
column?: number | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface GraphLayoutGroup {
|
|
38
|
+
id: string;
|
|
39
|
+
lane: string;
|
|
40
|
+
}
|
|
41
|
+
/** An edge from the entry that relies to the entry relied on. */
|
|
42
|
+
export interface GraphLayoutEdge {
|
|
43
|
+
id: string;
|
|
44
|
+
from: string;
|
|
45
|
+
to: string;
|
|
46
|
+
}
|
|
47
|
+
/** The sizes the layout is drawn at, measured from the stylesheet. */
|
|
48
|
+
export interface GraphMetrics {
|
|
49
|
+
cardWidth: number;
|
|
50
|
+
cardHeight: number;
|
|
51
|
+
/** The channel between two columns, where vertical runs of edges go. */
|
|
52
|
+
gutter: number;
|
|
53
|
+
/** The gap between two rows, where horizontal runs of edges go. */
|
|
54
|
+
rowGap: number;
|
|
55
|
+
/** The room a lane's header takes above its first row. */
|
|
56
|
+
laneHead: number;
|
|
57
|
+
/** The room a titled band's title takes above its lane headers. */
|
|
58
|
+
bandHead: number;
|
|
59
|
+
/** The space between two bands. */
|
|
60
|
+
bandGap: number;
|
|
61
|
+
/** How far a lane's panel reaches past its cards. */
|
|
62
|
+
lanePad: number;
|
|
63
|
+
/** The space around the whole map. */
|
|
64
|
+
margin: number;
|
|
65
|
+
}
|
|
66
|
+
export interface GraphLayoutInput {
|
|
67
|
+
bands: readonly GraphLayoutBand[];
|
|
68
|
+
nodes: readonly GraphLayoutNode[];
|
|
69
|
+
groups?: readonly GraphLayoutGroup[] | undefined;
|
|
70
|
+
/** Whether a group is drawn open. A closed group is one summary card. */
|
|
71
|
+
open: (groupId: string) => boolean;
|
|
72
|
+
/** The edges drawn at rest. */
|
|
73
|
+
edges: readonly GraphLayoutEdge[];
|
|
74
|
+
/** The edges that decide the order inside a lane: `edges` unless given, so hiding a line never moves a card. */
|
|
75
|
+
ordering?: readonly GraphLayoutEdge[] | undefined;
|
|
76
|
+
/** How many columns a lane asks for, by lane id. Unlisted lanes ask for one. */
|
|
77
|
+
laneColumns?: ReadonlyMap<string, number> | undefined;
|
|
78
|
+
/** The height an empty lane's message takes, by lane id. Unlisted lanes keep one row. */
|
|
79
|
+
emptyHeights?: ReadonlyMap<string, number> | undefined;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* What stands in a cell: an entry, a closed group's summary, an open group's
|
|
83
|
+
* header row, or the message of an empty lane.
|
|
84
|
+
*/
|
|
85
|
+
export type GraphItemKind = 'node' | 'summary' | 'head' | 'empty';
|
|
86
|
+
export interface GraphItem extends CanvasRect {
|
|
87
|
+
/** Unique across kinds: see [graphItemKey]. */
|
|
88
|
+
key: string;
|
|
89
|
+
kind: GraphItemKind;
|
|
90
|
+
/** The entry's id, the group's id, or the lane's id for an empty lane. */
|
|
91
|
+
id: string;
|
|
92
|
+
lane: string;
|
|
93
|
+
band: number;
|
|
94
|
+
/** The first column and row it covers, in its band's grid. */
|
|
95
|
+
col: number;
|
|
96
|
+
row: number;
|
|
97
|
+
cols: number;
|
|
98
|
+
rows: number;
|
|
99
|
+
}
|
|
100
|
+
export interface GraphLanePlaced {
|
|
101
|
+
id: string;
|
|
102
|
+
band: number;
|
|
103
|
+
/** The first column, and how many it spans. */
|
|
104
|
+
col: number;
|
|
105
|
+
span: number;
|
|
106
|
+
rows: number;
|
|
107
|
+
/** Its panel: the header and every row, with its padding. */
|
|
108
|
+
panel: CanvasRect;
|
|
109
|
+
/** Its header's box, above the first row. */
|
|
110
|
+
head: CanvasRect;
|
|
111
|
+
/** Its items, in reading order, which is the order the keyboard walks. */
|
|
112
|
+
items: string[];
|
|
113
|
+
/** How many entries it holds, closed groups' members included. */
|
|
114
|
+
count: number;
|
|
115
|
+
}
|
|
116
|
+
export interface GraphBandPlaced {
|
|
117
|
+
id: string;
|
|
118
|
+
index: number;
|
|
119
|
+
/** Its title's box, for a titled band. */
|
|
120
|
+
title: CanvasRect | null;
|
|
121
|
+
rowsTop: number;
|
|
122
|
+
rows: number;
|
|
123
|
+
}
|
|
124
|
+
export interface GraphGroupPlaced {
|
|
125
|
+
id: string;
|
|
126
|
+
lane: string;
|
|
127
|
+
open: boolean;
|
|
128
|
+
/** The box drawn round an open group's header and members; a closed group draws its summary instead. */
|
|
129
|
+
box: CanvasRect | null;
|
|
130
|
+
/** Its members' ids, in drawn order. */
|
|
131
|
+
members: string[];
|
|
132
|
+
}
|
|
133
|
+
/** One drawn edge. Several edges between the same two items are one route. */
|
|
134
|
+
export interface GraphRoute {
|
|
135
|
+
key: string;
|
|
136
|
+
from: string;
|
|
137
|
+
to: string;
|
|
138
|
+
/** The edges it draws. */
|
|
139
|
+
edges: string[];
|
|
140
|
+
points: CanvasPoint[];
|
|
141
|
+
/** The path, ending at the arrowhead's base. */
|
|
142
|
+
d: string;
|
|
143
|
+
/** The arrowhead, as a closed path. */
|
|
144
|
+
arrow: string;
|
|
145
|
+
/** The box round every point, for drawing only the routes near the view. */
|
|
146
|
+
box: CanvasRect;
|
|
147
|
+
}
|
|
148
|
+
export interface GraphLayout {
|
|
149
|
+
bounds: CanvasRect;
|
|
150
|
+
metrics: GraphMetrics;
|
|
151
|
+
columns: number;
|
|
152
|
+
bands: GraphBandPlaced[];
|
|
153
|
+
lanes: GraphLanePlaced[];
|
|
154
|
+
laneById: ReadonlyMap<string, GraphLanePlaced>;
|
|
155
|
+
items: GraphItem[];
|
|
156
|
+
itemByKey: ReadonlyMap<string, GraphItem>;
|
|
157
|
+
/** The item an entry is drawn as: its own card, or its closed group's summary. */
|
|
158
|
+
itemOfNode: ReadonlyMap<string, string>;
|
|
159
|
+
groups: GraphGroupPlaced[];
|
|
160
|
+
groupById: ReadonlyMap<string, GraphGroupPlaced>;
|
|
161
|
+
routes: GraphRoute[];
|
|
162
|
+
/** The route each at-rest edge is drawn by. */
|
|
163
|
+
routeOfEdge: ReadonlyMap<string, string>;
|
|
164
|
+
/** What routing another set of edges needs: see [routeGraphEdges]. */
|
|
165
|
+
grid: GraphGrid;
|
|
166
|
+
}
|
|
167
|
+
/** The streets and cells edges are routed through. */
|
|
168
|
+
export interface GraphGrid {
|
|
169
|
+
/** Each column's left edge. */
|
|
170
|
+
colX: readonly number[];
|
|
171
|
+
/** Each vertical channel's centre: channel `c` is left of column `c`, the last one right of the last column. */
|
|
172
|
+
channelX: readonly number[];
|
|
173
|
+
/** Every horizontal street, top to bottom. */
|
|
174
|
+
streets: readonly GraphStreet[];
|
|
175
|
+
/** Each band's own streets, as indices into `streets`, top to bottom. */
|
|
176
|
+
bandStreets: readonly (readonly number[])[];
|
|
177
|
+
/** The street in the gap above each band after the first, by the band's index. */
|
|
178
|
+
gapStreets: ReadonlyMap<number, number>;
|
|
179
|
+
/** Whether a cell holds anything, by band: `occupied[band][row * columns + col]`. */
|
|
180
|
+
occupied: readonly Uint8Array[];
|
|
181
|
+
bandRows: readonly number[];
|
|
182
|
+
bandRowsTop: readonly number[];
|
|
183
|
+
}
|
|
184
|
+
export interface GraphStreet {
|
|
185
|
+
y: number;
|
|
186
|
+
/** The band whose rows it runs between, or -1 for the gap between two bands. */
|
|
187
|
+
band: number;
|
|
188
|
+
/** For the gap between two bands, the lower band's index; -1 otherwise. */
|
|
189
|
+
gap: number;
|
|
190
|
+
/** Whether a group box's edge runs beside it in a column, by column: a run there would double that edge. */
|
|
191
|
+
dirty: Uint8Array;
|
|
192
|
+
/** Whether it runs through an empty lane's message in a column, by column. */
|
|
193
|
+
blocked: Uint8Array;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* HOW MANY ORDERING SWEEPS: four each way. On the suite's fixtures the
|
|
197
|
+
* crossings stopped falling at eight (twelve drew the same maps), and each
|
|
198
|
+
* sweep is linear in the entries and edges.
|
|
199
|
+
*/
|
|
200
|
+
export declare const GRAPH_ORDER_SWEEPS = 8;
|
|
201
|
+
/** An item's key, unique across kinds even when an entry, a group and a lane share an id. */
|
|
202
|
+
export declare function graphItemKey(kind: GraphItemKind, id: string): string;
|
|
203
|
+
/**
|
|
204
|
+
* Lays out a map. Throws on input that cannot be drawn: an entry or a group in
|
|
205
|
+
* a lane no band lists, an entry in a group of another lane, or a repeated id.
|
|
206
|
+
*/
|
|
207
|
+
export declare function layoutGraph(input: GraphLayoutInput, metrics: GraphMetrics): GraphLayout;
|
|
208
|
+
/**
|
|
209
|
+
* Routes a set of edges over a layout that is already placed, such as the
|
|
210
|
+
* edges a selection reveals: each pair of drawn items once, in its own tracks.
|
|
211
|
+
*/
|
|
212
|
+
export declare function routeGraphEdges(layout: GraphLayout, edges: readonly GraphLayoutEdge[]): GraphRoute[];
|
|
213
|
+
/** Every line between two lanes of a kind that is not drawn one by one, as one line with its count. */
|
|
214
|
+
export interface GraphTrunk {
|
|
215
|
+
/** The two lanes, upper then lower: `services>runtime`. */
|
|
216
|
+
key: string;
|
|
217
|
+
from: string;
|
|
218
|
+
to: string;
|
|
219
|
+
/** How many edges it stands for. */
|
|
220
|
+
count: number;
|
|
221
|
+
d: string;
|
|
222
|
+
/** Where its count is written: the middle of its run. */
|
|
223
|
+
label: CanvasPoint;
|
|
224
|
+
box: CanvasRect;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The trunks of a set of edges: one per pair of lanes in neighbouring bands,
|
|
228
|
+
* straight down where the two panels overlap and stepped through the gap
|
|
229
|
+
* between the bands where they do not. Edges inside one band have no trunk.
|
|
230
|
+
*/
|
|
231
|
+
export declare function graphTrunks(layout: Pick<GraphLayout, 'laneById'>, edges: readonly GraphLayoutEdge[], laneOf: (node: string) => string | undefined): GraphTrunk[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a selected entry reaches along the edges, as a pure function the map
|
|
3
|
+
* and its caller share, so the count a screen says ("14 entries depend on
|
|
4
|
+
* orders-db") is the set the map lights.
|
|
5
|
+
*/
|
|
6
|
+
import type { GraphLayoutEdge } from './layout.js';
|
|
7
|
+
/**
|
|
8
|
+
* Which way a trace walks. Edges point from the entry that relies to the one
|
|
9
|
+
* relied on, so `up` is what depends on the start, `down` is what the start
|
|
10
|
+
* depends on, and `both` is the two together.
|
|
11
|
+
*/
|
|
12
|
+
export type GraphTraceDirection = 'up' | 'down' | 'both';
|
|
13
|
+
export interface GraphReach {
|
|
14
|
+
/** Every entry reached, the start included, with its distance in hops. */
|
|
15
|
+
nodes: ReadonlyMap<string, number>;
|
|
16
|
+
/** The edges the walk took. */
|
|
17
|
+
edges: ReadonlySet<string>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Walks from `from` along `edges` in `direction`, at most `depth` hops
|
|
21
|
+
* (`Infinity` for no limit). Breadth first, so each entry's distance is its
|
|
22
|
+
* shortest; an edge is taken when its far end is within the limit, which
|
|
23
|
+
* includes an edge closing a cycle back onto an entry already reached.
|
|
24
|
+
*/
|
|
25
|
+
export declare function graphReach(edges: readonly GraphLayoutEdge[], from: string, direction: GraphTraceDirection, depth: number): GraphReach;
|
|
26
|
+
/** The entries one edge away from `id`, either way, and the edges that touch it. */
|
|
27
|
+
export declare function graphNeighbourhood(edges: readonly GraphLayoutEdge[], id: string): GraphReach;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The keyboard walk over a laid out map, as a pure function of the layout.
|
|
3
|
+
*
|
|
4
|
+
* The arrows move the way they point. Up and Down move along a lane's column
|
|
5
|
+
* and on into the band above or below; Left and Right move to the next column
|
|
6
|
+
* of the lane, then to the item nearest in height in the lane beside; Home
|
|
7
|
+
* and End go to a lane's ends, and with Control or Command to the map's. An
|
|
8
|
+
* empty lane is a stop too, so its message is read.
|
|
9
|
+
*/
|
|
10
|
+
import type { GraphLayout } from './layout.js';
|
|
11
|
+
export interface GraphStepKey {
|
|
12
|
+
key: string;
|
|
13
|
+
ctrlKey?: boolean;
|
|
14
|
+
metaKey?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The item a key moves to from `from`, `null` for a key the walk owns that
|
|
18
|
+
* goes nowhere from here (so it is still swallowed), and `undefined` for a key
|
|
19
|
+
* that is not the walk's.
|
|
20
|
+
*/
|
|
21
|
+
export declare function graphStep(layout: GraphLayout, from: string, event: GraphStepKey): string | null | undefined;
|