@crewlethq/ui 0.38.0 → 0.40.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 +79 -3
- package/dist/AgentHandoffPanel/index.js +3 -3
- package/dist/AppShell/AppShell.d.ts +13 -2
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-NDU4XMGF.css → AppShell-NPSWZ3XW.css} +45 -4
- package/dist/ArtifactBar/index.js +6 -5
- package/dist/{ArtifactBar-FWPBBKQ5.css → ArtifactBar-6PGWGKN2.css} +13 -1
- package/dist/ArtifactCard/index.js +2 -2
- package/dist/AuthLayout/index.js +2 -2
- package/dist/AvatarPicker/index.js +10 -6
- package/dist/Card/Card.d.ts +14 -2
- package/dist/Card/index.js +1 -1
- package/dist/{Card-G2ZGT5Z6.css → Card-JR2UPQH7.css} +20 -0
- package/dist/CatalogTile/CatalogTile.d.ts +47 -0
- package/dist/CatalogTile/index.d.ts +3 -0
- package/dist/CatalogTile/index.js +3 -0
- package/dist/CatalogTile-XL4XLFUH.css +135 -0
- package/dist/CharacterPicker/index.js +2 -2
- package/dist/Charts/Histogram.d.ts +71 -0
- package/dist/Charts/index.d.ts +2 -0
- package/dist/Charts/index.js +1 -1
- package/dist/{Charts-MBJG72BS.css → Charts-TZ744HT6.css} +118 -0
- package/dist/CodeBlock/index.js +1 -1
- package/dist/{CodeBlock-GYNJ2HI6.css → CodeBlock-N5ETJF24.css} +13 -0
- package/dist/CommandPalette/index.js +3 -3
- package/dist/CommentThread/index.js +3 -3
- package/dist/Composer/index.js +2 -2
- package/dist/DataGrid/DataGrid.d.ts +267 -0
- package/dist/DataGrid/index.d.ts +3 -0
- package/dist/DataGrid/index.js +7 -0
- package/dist/DataGrid-AQKPJD7W.css +482 -0
- package/dist/DataTable/index.js +2 -2
- package/dist/DataView/index.js +4 -4
- package/dist/DatasetSource/DatasetSource.d.ts +7 -1
- package/dist/DatasetSource/index.js +1 -1
- package/dist/HuePicker/index.js +11 -4
- package/dist/LayersList/index.js +2 -2
- package/dist/LinkInterstitial/index.js +2 -2
- package/dist/List/List.d.ts +8 -0
- package/dist/List/index.js +1 -1
- package/dist/{List-MYJIV6MP.css → List-YHLIZFK4.css} +46 -0
- package/dist/ListInput/ListInput.d.ts +9 -1
- package/dist/ListInput/index.js +2 -2
- package/dist/LockedLabel/LockedLabel.d.ts +34 -0
- package/dist/LockedLabel/index.d.ts +3 -0
- package/dist/LockedLabel/index.js +3 -0
- package/dist/LockedLabel-VQEGEB7G.css +16 -0
- package/dist/MarkdownEditor/index.js +8 -5
- package/dist/MergeConflicts/index.js +11 -5
- package/dist/Modal/index.js +1 -1
- package/dist/{Modal-7MWRCWAI.css → Modal-TOEWHDCQ.css} +5 -0
- package/dist/ObjectHeader/index.js +1 -1
- package/dist/{ObjectHeader-D7GU7QNI.css → ObjectHeader-ZOS22FKX.css} +7 -8
- package/dist/PageNote/PageNote.d.ts +14 -0
- package/dist/PageNote/index.d.ts +3 -0
- package/dist/PageNote/index.js +2 -0
- package/dist/PageNote-RHLXH3ML.css +12 -0
- package/dist/PropertyList/PropertyList.d.ts +88 -0
- package/dist/PropertyList/index.d.ts +3 -0
- package/dist/PropertyList/index.js +7 -0
- package/dist/PropertyList-SCYM66LL.css +96 -0
- package/dist/RelatedRow/RelatedRow.d.ts +27 -0
- package/dist/RelatedRow/index.d.ts +3 -0
- package/dist/RelatedRow/index.js +9 -0
- package/dist/RelatedRow-2FVS6QQA.css +6 -0
- package/dist/RichEditor/index.js +1 -1
- package/dist/SectionFrame/SectionFrame.d.ts +76 -0
- package/dist/SectionFrame/index.d.ts +3 -0
- package/dist/SectionFrame/index.js +7 -0
- package/dist/SectionFrame-M62UUVFQ.css +164 -0
- package/dist/SegmentedControl/index.js +11 -4
- package/dist/SettingsTable/SettingsTable.d.ts +66 -0
- package/dist/SettingsTable/index.d.ts +3 -0
- package/dist/SettingsTable/index.js +3 -0
- package/dist/SettingsTable-6DUFAFXG.css +160 -0
- package/dist/ShareDialog/index.js +2 -2
- package/dist/SheetColumnEditor/index.js +7 -6
- package/dist/SheetGrid/index.js +3 -3
- package/dist/SidebarNav/SidebarNav.d.ts +35 -2
- package/dist/SidebarNav/index.js +2 -1
- package/dist/{SidebarNav-7SGUZYKK.css → SidebarNav-YI74SPDC.css} +10 -0
- package/dist/StatCard/index.js +1 -1
- package/dist/{StatCard-4T7TMWMN.css → StatCard-HAA3F5GX.css} +8 -3
- package/dist/StatGroup/index.js +1 -1
- package/dist/{StatGroup-DOFHX5QJ.css → StatGroup-ZMW7VQWP.css} +27 -0
- package/dist/Switcher/index.js +2 -2
- package/dist/Tabs/Tabs.d.ts +55 -1
- package/dist/Tabs/fold.d.ts +54 -0
- package/dist/Tabs/index.d.ts +1 -1
- package/dist/Tabs/index.js +9 -2
- package/dist/Tabs/roving.d.ts +3 -3
- package/dist/{Tabs-WIF7457H.css → Tabs-S7F4RWAN.css} +77 -0
- package/dist/TagsInput/index.js +1 -1
- package/dist/ThemeGallery/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +12 -5
- package/dist/TileGrid/TileGrid.d.ts +33 -0
- package/dist/TileGrid/index.d.ts +3 -0
- package/dist/TileGrid/index.js +2 -0
- package/dist/TileGrid-I6LNYD2H.css +52 -0
- package/dist/VersionCompare/index.js +12 -5
- package/dist/{chunk-B5J23C73.js → chunk-2PEXZ7L4.js} +1 -1
- package/dist/{chunk-S27UBCVX.js → chunk-2VOHUGUA.js} +2 -2
- package/dist/{chunk-XBURIXHO.js → chunk-3TXY3PJZ.js} +1 -1
- package/dist/{chunk-2QZ2VPHR.js → chunk-4OK4DX3V.js} +2 -2
- package/dist/chunk-4RKTZSEW.js +64 -0
- package/dist/{chunk-ECGGQX2H.js → chunk-A44YHLCQ.js} +2 -2
- package/dist/{chunk-F4LPQA4E.js → chunk-BA32AVKS.js} +1 -1
- package/dist/chunk-CV4NES3P.js +9 -0
- package/dist/{chunk-PPHTIKZO.js → chunk-E4BOVKNJ.js} +1 -1
- package/dist/{chunk-W7PAIVAP.js → chunk-E7QLG3PG.js} +30 -9
- package/dist/{chunk-RKKO7QHH.js → chunk-EGMQURBR.js} +5 -4
- package/dist/{chunk-GMW4ZHST.js → chunk-EX22Q5SH.js} +2 -2
- package/dist/{chunk-A23KDROH.js → chunk-FXBGEANQ.js} +1 -1
- package/dist/{chunk-4L2BWSHR.js → chunk-GFYQKMQZ.js} +2 -2
- package/dist/{chunk-HG5VF3TZ.js → chunk-HMVQQEHW.js} +91 -2
- package/dist/{chunk-IPWU6ERC.js → chunk-HQJ24WPM.js} +4 -2
- package/dist/{chunk-SVGARBDY.js → chunk-IAGYPTEJ.js} +2 -2
- package/dist/{chunk-ZK3VYY7L.js → chunk-INHXF2CL.js} +24 -11
- package/dist/chunk-INVSUFJK.js +71 -0
- package/dist/{chunk-6NNY5WBF.js → chunk-JKAGN4V4.js} +1 -1
- package/dist/{chunk-4LRAJXHL.js → chunk-JSWOXRRE.js} +1 -1
- package/dist/{chunk-DYB66CNM.js → chunk-KKNHMXTE.js} +6 -3
- package/dist/{chunk-UWRBD2YO.js → chunk-KNHUBHFX.js} +1 -1
- package/dist/{chunk-ZMDYQ2HH.js → chunk-KWWP3D7M.js} +1 -1
- package/dist/{chunk-46RL3E54.js → chunk-M6NQ4XGK.js} +1 -1
- package/dist/{chunk-PT6WKXKW.js → chunk-MMPKN7WV.js} +1 -1
- package/dist/{chunk-NRBAXRWE.js → chunk-N3TFYBN3.js} +1 -1
- package/dist/chunk-NNTO3TNC.js +9 -0
- package/dist/{chunk-DS2C73RJ.js → chunk-NZWX27J7.js} +2 -2
- package/dist/{chunk-VGE3G3T4.js → chunk-ODOJJGXH.js} +1 -1
- package/dist/chunk-OHGH7O6T.js +19 -0
- package/dist/{chunk-4ISUIS6F.js → chunk-OOC7Q67K.js} +1 -1
- package/dist/{chunk-BT5H2THK.js → chunk-OUD75UB2.js} +1 -1
- package/dist/chunk-PCT47E7O.js +48 -0
- package/dist/{chunk-X3UYTAOG.js → chunk-PFZOFAQ6.js} +1 -1
- package/dist/{chunk-YQG4PZGC.js → chunk-QRKT4XTT.js} +2 -2
- package/dist/{chunk-BJI3RFXG.js → chunk-S4DREXGM.js} +1 -1
- package/dist/{chunk-GDDE4UM7.js → chunk-SEC2GR2V.js} +1 -1
- package/dist/{chunk-YEVG2X5R.js → chunk-SNQRGH4A.js} +1 -1
- package/dist/chunk-T6MXORP5.js +116 -0
- package/dist/{chunk-OTCXRJ7D.js → chunk-U2XAJONO.js} +1 -1
- package/dist/{chunk-3ZUINC7C.js → chunk-WYYCPV46.js} +6 -1
- package/dist/chunk-X4IXXLWM.js +306 -0
- package/dist/{chunk-PAQXOP2M.js → chunk-XGBUUQDU.js} +2 -2
- package/dist/chunk-XIDD7PJO.js +416 -0
- package/dist/{chunk-XO7PUL4F.js → chunk-YPTTSJPM.js} +1 -1
- package/dist/chunk-ZUTUI27P.js +21 -0
- package/dist/generated/index.d.ts +9 -0
- package/dist/generated/index.js +83 -74
- package/dist/index.js +83 -74
- package/dist/styles.css +1627 -104
- package/package.json +3 -3
- package/dist/chunk-7SDUKCNW.js +0 -141
- package/dist/{Editor-QV4JP242.js → Editor-IRDQ3JDZ.js} +1 -1
- package/dist/{chunk-JZPK4IXR.js → chunk-3PR65I3H.js} +2 -2
- package/dist/{chunk-ETVEGR2Y.js → chunk-ISA2O2BK.js} +1 -1
- /package/dist/{chunk-4QQ3MND5.js → chunk-S3QTFUJX.js} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface HistogramBar {
|
|
3
|
+
/** The bucket's start, epoch milliseconds. It is also the bar's key. */
|
|
4
|
+
t: number;
|
|
5
|
+
/** How many things fell in the bucket. */
|
|
6
|
+
v: number;
|
|
7
|
+
/**
|
|
8
|
+
* How many of `v` failed, where the caller has the split. Drawn as the
|
|
9
|
+
* danger-toned foot of the same fill, so the column's height is still the
|
|
10
|
+
* bucket's whole count. Absent draws the plain fill, because a split the
|
|
11
|
+
* data did not carry is not a split of zero.
|
|
12
|
+
*/
|
|
13
|
+
part?: number | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface HistogramProps {
|
|
16
|
+
bars: HistogramBar[];
|
|
17
|
+
/** What the chart is, as the name of its group: "Turns that ended over the window". */
|
|
18
|
+
label: string;
|
|
19
|
+
/**
|
|
20
|
+
* The total and what it is a total of, read in place of the picture:
|
|
21
|
+
* "212 turns in this window". Required, and never summed here: the caller
|
|
22
|
+
* knows whether the bars cover the whole window or only the rows it holds,
|
|
23
|
+
* and a number whose scope is guessed is wrong on the second caller.
|
|
24
|
+
*/
|
|
25
|
+
summary: string;
|
|
26
|
+
/** A bar's own sentence, for its tooltip and its accessible name. */
|
|
27
|
+
formatTitle: (bar: HistogramBar, index: number) => string;
|
|
28
|
+
/**
|
|
29
|
+
* A tick's label, which turns the axis on. Left out, the chart draws no
|
|
30
|
+
* dates, for a strip narrower than its own labels.
|
|
31
|
+
*/
|
|
32
|
+
formatTick?: ((bar: HistogramBar, index: number) => string) | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Narrow the window to one bar. Given, every bar is a button; left out, the
|
|
35
|
+
* bars are a picture and take no tab stop.
|
|
36
|
+
*/
|
|
37
|
+
onSelect?: ((bar: HistogramBar, index: number) => void) | undefined;
|
|
38
|
+
/** The plot's height in pixels. */
|
|
39
|
+
height?: number | undefined;
|
|
40
|
+
/** What the chart says in place of the bars when it has none. */
|
|
41
|
+
emptyLabel?: ReactNode;
|
|
42
|
+
className?: string | undefined;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Which bars get a label: the first, the last, and an even whole stride
|
|
46
|
+
* between, so a seven-day window reads every other day rather than gaps of
|
|
47
|
+
* two, one, two and one days (which reads as days missing from the data).
|
|
48
|
+
* The stride is the smallest whole number of bars that keeps the labels at or
|
|
49
|
+
* under five, preferring one that lands exactly on the last bar; where none
|
|
50
|
+
* does, a label nearer the last one than half a stride gives way to it.
|
|
51
|
+
*/
|
|
52
|
+
export declare function histogramTicks(bars: number): number[];
|
|
53
|
+
/**
|
|
54
|
+
* A log's own time axis: where in a window things happened, which a page of
|
|
55
|
+
* rows cannot say.
|
|
56
|
+
*
|
|
57
|
+
* THE SLOT IS THE CONTROL AND THE FILL INSIDE IT IS THE BAR. The fill takes
|
|
58
|
+
* the column proportion `StackedColumns` uses, so one bucket and ninety draw
|
|
59
|
+
* with the same geometry, while the click target stays the whole slot.
|
|
60
|
+
*
|
|
61
|
+
* THE HEIGHT IS THE TRUE RATIO, with a floor in pixels rather than percent:
|
|
62
|
+
* a percentage floor grows with the panel and draws a bucket of 4 and one of
|
|
63
|
+
* 400 at the same height. An empty bucket stands one pixel under the smallest
|
|
64
|
+
* real count, because a zero-height element is invisible and an empty stretch
|
|
65
|
+
* would read as a gap in the chart rather than a quiet stretch in the data.
|
|
66
|
+
*
|
|
67
|
+
* A BUTTON WHEN IT DOES SOMETHING AND A DIV WHEN IT DOES NOT: a keyboard
|
|
68
|
+
* reader tabbing through eighty inert controls is worse served than one told
|
|
69
|
+
* there is nothing to operate.
|
|
70
|
+
*/
|
|
71
|
+
export declare function Histogram({ bars, label, summary, formatTitle, formatTick, onSelect, height, emptyLabel, className, }: HistogramProps): import("react").JSX.Element;
|
package/dist/Charts/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export { StackedBar } from './StackedBar.js';
|
|
|
8
8
|
export type { StackedBarProps, StackedSegment } from './StackedBar.js';
|
|
9
9
|
export { ActivityStrip } from './ActivityStrip.js';
|
|
10
10
|
export type { ActivityBucket, ActivityStripProps } from './ActivityStrip.js';
|
|
11
|
+
export { Histogram, histogramTicks } from './Histogram.js';
|
|
12
|
+
export type { HistogramBar, HistogramProps } from './Histogram.js';
|
|
11
13
|
export { TimeSeries, Sparkline } from './TimeSeries.js';
|
|
12
14
|
export type { Series, SeriesPoint, SparklineProps, TimeSeriesProps } from './TimeSeries.js';
|
|
13
15
|
export { StackedColumns, niceScale } from './StackedColumns.js';
|
package/dist/Charts/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ActivityStrip, BarList, ChartEmpty, ChartTooltip, DATA_COLORS, DATA_COLOR_OTHER, Legend, Sparkline, StackedBar, StackedColumns, TimeSeries, dataColor, niceScale, useChartHover } from '../chunk-
|
|
1
|
+
export { ActivityStrip, BarList, ChartEmpty, ChartTooltip, DATA_COLORS, DATA_COLOR_OTHER, Histogram, Legend, Sparkline, StackedBar, StackedColumns, TimeSeries, dataColor, histogramTicks, niceScale, useChartHover } from '../chunk-HMVQQEHW.js';
|
|
2
2
|
import '../chunk-BZFWDIV6.js';
|
|
3
3
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -978,3 +978,121 @@
|
|
|
978
978
|
transform: translateY(-50%);
|
|
979
979
|
pointer-events: none;
|
|
980
980
|
}
|
|
981
|
+
|
|
982
|
+
/* ─── Histogram, a log's own time axis ─────────────────────────── */
|
|
983
|
+
|
|
984
|
+
/*
|
|
985
|
+
* Time runs left to right on this axis in every writing direction, as it does
|
|
986
|
+
* on every chart, and the ticks are placed on physical sides to match.
|
|
987
|
+
*/
|
|
988
|
+
.crewlet-histogram {
|
|
989
|
+
display: flex;
|
|
990
|
+
flex-direction: column;
|
|
991
|
+
min-width: 0;
|
|
992
|
+
direction: ltr;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
/* The plot's bottom border is the axis line the ticks hang under. */
|
|
996
|
+
.crewlet-histogram__plot {
|
|
997
|
+
display: flex;
|
|
998
|
+
align-items: flex-end;
|
|
999
|
+
gap: 1px;
|
|
1000
|
+
width: 100%;
|
|
1001
|
+
height: var(--crewlet-histogram-height, 96px);
|
|
1002
|
+
padding: var(--spacing-1) 0;
|
|
1003
|
+
border-bottom: 1px solid var(--color-border-hover);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
/* The slot is the control, and the whole of it is the target. */
|
|
1007
|
+
.crewlet-histogram__bar {
|
|
1008
|
+
all: unset;
|
|
1009
|
+
flex: 1 1 0;
|
|
1010
|
+
min-width: 2px;
|
|
1011
|
+
height: 100%;
|
|
1012
|
+
display: flex;
|
|
1013
|
+
align-items: flex-end;
|
|
1014
|
+
justify-content: center;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
button.crewlet-histogram__bar {
|
|
1018
|
+
cursor: pointer;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
/* A slot draws no edge, so its ring stands off it. `all: unset` takes the
|
|
1022
|
+
baseline ring away; this states it again at a weight the reset cannot
|
|
1023
|
+
out-rank. */
|
|
1024
|
+
.crewlet-histogram__bar:focus-visible {
|
|
1025
|
+
outline: 2px solid var(--color-focus);
|
|
1026
|
+
outline-offset: 2px;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/*
|
|
1030
|
+
* A count is data, so it is drawn in the data ramp; the accent is kept for the
|
|
1031
|
+
* bar the reader is pointing at, the selection a click is about to make. The
|
|
1032
|
+
* fill stacks from its foot, so the failed share sits at its bottom. Floors in
|
|
1033
|
+
* pixels: an empty bucket at two, the smallest real count at three.
|
|
1034
|
+
*/
|
|
1035
|
+
.crewlet-histogram__fill {
|
|
1036
|
+
display: flex;
|
|
1037
|
+
flex-direction: column;
|
|
1038
|
+
justify-content: flex-end;
|
|
1039
|
+
overflow: hidden;
|
|
1040
|
+
width: 63%;
|
|
1041
|
+
min-width: 2px;
|
|
1042
|
+
max-width: var(--spacing-7);
|
|
1043
|
+
height: var(--crewlet-histogram-fill, 0%);
|
|
1044
|
+
min-height: 3px;
|
|
1045
|
+
background: var(--color-data-1);
|
|
1046
|
+
border-radius: var(--radius-sm) var(--radius-sm) 0 0;
|
|
1047
|
+
transition: background var(--motion-duration-fast) var(--motion-easing-default);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.crewlet-histogram__part {
|
|
1051
|
+
display: block;
|
|
1052
|
+
width: 100%;
|
|
1053
|
+
height: var(--crewlet-histogram-part, 0%);
|
|
1054
|
+
background: var(--color-feedback-danger);
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
button.crewlet-histogram__bar:hover > .crewlet-histogram__fill,
|
|
1058
|
+
button.crewlet-histogram__bar:focus-visible > .crewlet-histogram__fill {
|
|
1059
|
+
background: var(--color-brand-accent);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/* An empty bucket is a visible floor in the tone an axis is ruled in:
|
|
1063
|
+
present, and plainly not a quantity. */
|
|
1064
|
+
.crewlet-histogram__bar[data-empty] > .crewlet-histogram__fill {
|
|
1065
|
+
min-height: 2px;
|
|
1066
|
+
background: var(--color-border-strong);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
button.crewlet-histogram__bar[data-empty]:hover > .crewlet-histogram__fill,
|
|
1070
|
+
button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fill {
|
|
1071
|
+
background: var(--color-border-strong-hover);
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/*
|
|
1075
|
+
* The dates under the bars. Absolutely placed, so a tick sits over the bucket
|
|
1076
|
+
* it names; the row states its own height because absolutely placed children
|
|
1077
|
+
* contribute none.
|
|
1078
|
+
*/
|
|
1079
|
+
.crewlet-histogram__axis {
|
|
1080
|
+
position: relative;
|
|
1081
|
+
height: calc(var(--font-size-2xs) * var(--font-line-height-normal));
|
|
1082
|
+
margin-top: 2px;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
.crewlet-histogram__tick {
|
|
1086
|
+
position: absolute;
|
|
1087
|
+
top: 0;
|
|
1088
|
+
font-size: var(--font-size-2xs);
|
|
1089
|
+
color: var(--color-text-tertiary);
|
|
1090
|
+
font-variant-numeric: tabular-nums;
|
|
1091
|
+
white-space: nowrap;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1095
|
+
.crewlet-histogram__fill {
|
|
1096
|
+
transition: none;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
package/dist/CodeBlock/index.js
CHANGED
|
@@ -16,6 +16,19 @@
|
|
|
16
16
|
min-width: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/*
|
|
20
|
+
* A BLOCK THAT IS A CARD'S CONTENT IS THAT CARD'S SURFACE. Placed straight in
|
|
21
|
+
* a card (with `padding="none"`), it gives up its own edge, corner and ground,
|
|
22
|
+
* so the card's head rule is the only line over the code and there is no box
|
|
23
|
+
* inside a box. In a padded body it stays a well, which is what tells code
|
|
24
|
+
* from the prose beside it.
|
|
25
|
+
*/
|
|
26
|
+
.crewlet-card > .crewlet-codeblock {
|
|
27
|
+
border: 0;
|
|
28
|
+
border-radius: var(--radius-none);
|
|
29
|
+
background: transparent;
|
|
30
|
+
}
|
|
31
|
+
|
|
19
32
|
.crewlet-codeblock__header {
|
|
20
33
|
display: flex;
|
|
21
34
|
align-items: center;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { CommandPalette } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { CommandPalette } from '../chunk-XGBUUQDU.js';
|
|
2
|
+
import '../chunk-IAGYPTEJ.js';
|
|
3
3
|
import '../chunk-7KHM2FZH.js';
|
|
4
|
-
import '../chunk-SMBKXWML.js';
|
|
5
4
|
import '../chunk-TYONQSOK.js';
|
|
5
|
+
import '../chunk-SMBKXWML.js';
|
|
6
6
|
import '../chunk-BHHIIK3M.js';
|
|
7
7
|
import '../chunk-PQADV6P6.js';
|
|
8
8
|
import '../chunk-OMV5W53A.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { COMMENT_THREAD_LABELS, CommentThread } from '../chunk-
|
|
1
|
+
export { COMMENT_THREAD_LABELS, CommentThread } from '../chunk-MMPKN7WV.js';
|
|
2
2
|
import '../chunk-CI3VPIJN.js';
|
|
3
3
|
import '../chunk-3CZ7XAVY.js';
|
|
4
4
|
import '../chunk-EUCC37WY.js';
|
|
5
5
|
import '../chunk-5AQBPHZD.js';
|
|
6
6
|
import '../chunk-PZKHBB7D.js';
|
|
7
7
|
import '../chunk-PWG3VHRQ.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-SMBKXWML.js';
|
|
8
|
+
import '../chunk-ISA2O2BK.js';
|
|
10
9
|
import '../chunk-TYONQSOK.js';
|
|
10
|
+
import '../chunk-SMBKXWML.js';
|
|
11
11
|
import '../chunk-BHHIIK3M.js';
|
|
12
12
|
import '../chunk-PQADV6P6.js';
|
|
13
13
|
import '../chunk-OG6CL3EB.js';
|
package/dist/Composer/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { COMPOSER_COUNTER_AT, Composer } from '../chunk-
|
|
2
|
-
import '../chunk-SMBKXWML.js';
|
|
1
|
+
export { COMPOSER_COUNTER_AT, Composer } from '../chunk-ISA2O2BK.js';
|
|
3
2
|
import '../chunk-TYONQSOK.js';
|
|
3
|
+
import '../chunk-SMBKXWML.js';
|
|
4
4
|
import '../chunk-PQADV6P6.js';
|
|
5
5
|
import '../chunk-4FQT6ZAY.js';
|
|
6
6
|
import '../chunk-NUZHC6MM.js';
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { type MouseEvent as ReactMouseEvent, type KeyboardEvent as ReactKeyboardEvent, type ReactNode, type Ref } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* What activated a row: a click, a key on the row's overlay, or the
|
|
4
|
+
* application's own keymap driving the cursor (a native `KeyboardEvent`).
|
|
5
|
+
* Each carries the modifier keys a handler reads to open in a new tab.
|
|
6
|
+
*/
|
|
7
|
+
export type DataGridActivationEvent = ReactMouseEvent | ReactKeyboardEvent | KeyboardEvent;
|
|
8
|
+
/** One column of a [DataGrid]. */
|
|
9
|
+
export interface DataGridColumn<T> {
|
|
10
|
+
key: string;
|
|
11
|
+
header: ReactNode;
|
|
12
|
+
cell: (row: T) => ReactNode;
|
|
13
|
+
/** The value sorted on. Omit to make the column unsortable. */
|
|
14
|
+
sortValue?: ((row: T) => string | number | null | undefined) | undefined;
|
|
15
|
+
align?: 'left' | 'right' | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The column's name where `header` cannot carry one: a glyph head, or none
|
|
18
|
+
* at all. Drawn by the card layout a grid takes on a phone, where every value
|
|
19
|
+
* names itself, and said to assistive technology over a glyph head.
|
|
20
|
+
*/
|
|
21
|
+
label?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* A column of ROW ACTIONS: every cell is a control that names itself (a
|
|
24
|
+
* "Revoke" button, an icon button with its own label). On the phone's card
|
|
25
|
+
* such a cell draws no name beside it, since the control is its own name;
|
|
26
|
+
* its head stays empty, since a word over a column of buttons says nothing
|
|
27
|
+
* the buttons do not.
|
|
28
|
+
*/
|
|
29
|
+
action?: boolean | undefined;
|
|
30
|
+
/** Shrink to content (up to a fifth of the grid) and never wrap. */
|
|
31
|
+
shrink?: boolean | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* On a grid drawn with `phoneRows="compact"`, a cell of the row's FIRST line
|
|
34
|
+
* (what the row is: a key, a title), where every other cell is a fact about
|
|
35
|
+
* it on the line under.
|
|
36
|
+
*/
|
|
37
|
+
phoneLead?: boolean | undefined;
|
|
38
|
+
/** Left off the compact phone row, whose contract is two lines. */
|
|
39
|
+
phoneOmit?: boolean | undefined;
|
|
40
|
+
/** An exact track, in place of the computed one. */
|
|
41
|
+
width?: string | undefined;
|
|
42
|
+
/** Hidden unless the column set (`cols`) names it. */
|
|
43
|
+
optional?: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* The narrowest a FLEXIBLE column may be drawn: its track is
|
|
46
|
+
* `minmax(floor, 1fr)` rather than `minmax(0, 1fr)`. For the column that is
|
|
47
|
+
* the point of the list (a title, a name), which at zero gave way to every
|
|
48
|
+
* content-sized column beside it.
|
|
49
|
+
*/
|
|
50
|
+
floor?: string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The order this column GIVES WAY in when the grid cannot draw every column
|
|
53
|
+
* at its size: the lowest number goes first, and a column without one never
|
|
54
|
+
* goes. A grid that cannot fit drops columns rather than cutting them off at
|
|
55
|
+
* its clipped edge, and says which it dropped.
|
|
56
|
+
*/
|
|
57
|
+
drop?: number | undefined;
|
|
58
|
+
}
|
|
59
|
+
/** One column a reader may turn on or off, as a [ColumnChooser] offers it. */
|
|
60
|
+
export interface ColumnChoice {
|
|
61
|
+
key: string;
|
|
62
|
+
label: string;
|
|
63
|
+
/** Off until the column set names it. */
|
|
64
|
+
optional?: boolean | undefined;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The choices a chooser offers, DERIVED from the columns a grid draws, so a
|
|
68
|
+
* column added to a grid appears in its menu with no second edit. The cell
|
|
69
|
+
* renderers are never called: a name and a flag are properties of the column.
|
|
70
|
+
*/
|
|
71
|
+
export declare function columnChoicesOf<T>(columns: readonly DataGridColumn<T>[]): ColumnChoice[];
|
|
72
|
+
/** One box in a [ChooserList]. */
|
|
73
|
+
export interface ChooserItem<K extends string = string> {
|
|
74
|
+
key: K;
|
|
75
|
+
label: ReactNode;
|
|
76
|
+
checked: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface ChooserListProps<K extends string = string> {
|
|
79
|
+
/** The heading above the boxes, which also names the group. */
|
|
80
|
+
label: string;
|
|
81
|
+
items: readonly ChooserItem<K>[];
|
|
82
|
+
onToggle: (key: K) => void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A short checklist of what a view shows, in two columns under a quiet
|
|
86
|
+
* heading: the columns a grid draws ([ColumnChooser]), the facts a card
|
|
87
|
+
* carries. Native checkboxes in a named group, each row its box's label, so
|
|
88
|
+
* the whole row takes the pointer.
|
|
89
|
+
*/
|
|
90
|
+
export declare function ChooserList<K extends string = string>({ label, items, onToggle }: ChooserListProps<K>): import("react").JSX.Element | null;
|
|
91
|
+
export interface ColumnChooserProps {
|
|
92
|
+
choices: readonly ColumnChoice[];
|
|
93
|
+
/** The column set as it stands (`key,key`), empty for the default set. */
|
|
94
|
+
value: string;
|
|
95
|
+
onChange: (cols: string) => void;
|
|
96
|
+
/** The heading above the boxes. */
|
|
97
|
+
label?: string | undefined;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The checkbox list a reader chooses a grid's columns with.
|
|
101
|
+
*
|
|
102
|
+
* AN EMPTY VALUE IS THE DEFAULT SET, NOT AN EMPTY GRID, as [DataGrid] reads
|
|
103
|
+
* it, so the boxes show the default until somebody moves one. It writes the
|
|
104
|
+
* DECLARATION order, never the click order: the value carries an order as well
|
|
105
|
+
* as a selection, and a value built from the order boxes were ticked in would
|
|
106
|
+
* rearrange the grid with every tick.
|
|
107
|
+
*/
|
|
108
|
+
export declare function ColumnChooser({ choices, value, onChange, label }: ColumnChooserProps): import("react").JSX.Element;
|
|
109
|
+
/** A group of rows, as a grouped answer sends it: its own count and a page of rows. */
|
|
110
|
+
export interface DataGridBand<T> {
|
|
111
|
+
key: string;
|
|
112
|
+
label: ReactNode;
|
|
113
|
+
/** The group value's own mark, drawn before the label (a sibling, so no ellipsis eats it). */
|
|
114
|
+
mark?: ReactNode;
|
|
115
|
+
/** The count over the WHOLE group, where the source gave one. */
|
|
116
|
+
total?: number | undefined;
|
|
117
|
+
rows: T[];
|
|
118
|
+
/**
|
|
119
|
+
* The bands INSIDE this one, where the answer was grouped twice: a band
|
|
120
|
+
* carries rows OR sub-bands, never both, as the answer arrives.
|
|
121
|
+
*/
|
|
122
|
+
bands?: DataGridBand<T>[] | undefined;
|
|
123
|
+
/** A per-band aggregate line, or the way to what the band did not fit. */
|
|
124
|
+
footer?: ReactNode;
|
|
125
|
+
}
|
|
126
|
+
/** The words a grid says, for an application that says them otherwise. */
|
|
127
|
+
export interface DataGridLabels {
|
|
128
|
+
/** "Hidden to fit: Due and Updated". */
|
|
129
|
+
hiddenToFit: (names: string) => string;
|
|
130
|
+
loadMore: string;
|
|
131
|
+
showEveryColumn: string;
|
|
132
|
+
/** Joins the last two names of a list: "Due and Updated". */
|
|
133
|
+
and: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* What an application drives a grid's cursor with. The grid binds no keys of
|
|
137
|
+
* its own: an application with a keymap decides which of several grids on a
|
|
138
|
+
* screen a keystroke is for, and moves that one.
|
|
139
|
+
*/
|
|
140
|
+
export interface DataGridHandle {
|
|
141
|
+
/** Moves the cursor row by `by` rows, clamped, and scrolls it into view. */
|
|
142
|
+
step: (by: number) => void;
|
|
143
|
+
/** Activates the cursor row, as a click on it would. False when there is none. */
|
|
144
|
+
activate: (event: ReactKeyboardEvent | KeyboardEvent) => boolean;
|
|
145
|
+
/** How many rows the grid draws, its bands' rows included. */
|
|
146
|
+
rowCount: () => number;
|
|
147
|
+
}
|
|
148
|
+
export interface DataGridProps<T> {
|
|
149
|
+
rows?: T[] | undefined;
|
|
150
|
+
bands?: DataGridBand<T>[] | undefined;
|
|
151
|
+
columns: DataGridColumn<T>[];
|
|
152
|
+
rowKey: (row: T) => string;
|
|
153
|
+
/** A plain click, or Enter on the cursor row. The row is still a link when `rowHref` is given. */
|
|
154
|
+
onRowActivate?: ((row: T, event: DataGridActivationEvent) => void) | undefined;
|
|
155
|
+
/** The row's object's page: a real link stretched over the row, so a new tab and copying it work. */
|
|
156
|
+
rowHref?: ((row: T) => string) | undefined;
|
|
157
|
+
/** The row the reader is on (the object a page or a side panel shows): tinted and announced as current. */
|
|
158
|
+
isSelected?: ((row: T) => boolean) | undefined;
|
|
159
|
+
isFailed?: ((row: T) => boolean) | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* The sort as `key` or `-key` (descending), empty for the rows' own order.
|
|
162
|
+
* Controlled, so an application keeps it where it keeps state (an address).
|
|
163
|
+
*/
|
|
164
|
+
sort?: string | undefined;
|
|
165
|
+
/** A sortable head pressed: ascending, then descending, then unsorted. */
|
|
166
|
+
onSortChange?: ((sort: string) => void) | undefined;
|
|
167
|
+
/** The rows arrive ordered by their source (a paged answer ordered over the whole set). */
|
|
168
|
+
serverSorted?: boolean | undefined;
|
|
169
|
+
/** The column set as `key,key`, in the order to draw it; empty for every column not `optional`. */
|
|
170
|
+
cols?: string | undefined;
|
|
171
|
+
/** The way back from a column set: drawn as "Show every column" while one is set. */
|
|
172
|
+
onColsChange?: ((cols: string) => void) | undefined;
|
|
173
|
+
/** What an empty grid says, and the one control that is its next step. */
|
|
174
|
+
empty?: {
|
|
175
|
+
title: ReactNode;
|
|
176
|
+
hint?: ReactNode;
|
|
177
|
+
icon?: ReactNode;
|
|
178
|
+
action?: ReactNode;
|
|
179
|
+
} | undefined;
|
|
180
|
+
footer?: ReactNode;
|
|
181
|
+
onLoadMore?: (() => void) | undefined;
|
|
182
|
+
/** "40 of 312 loaded": what an export would actually contain. */
|
|
183
|
+
loadedNote?: string | undefined;
|
|
184
|
+
/**
|
|
185
|
+
* HOW A ROW IS DRAWN ON A PHONE, where there are no columns: `labelled` (a
|
|
186
|
+
* card of one named line per value, which every grid can take) or `compact`
|
|
187
|
+
* (two lines with no names: the lead cells, then every other value as a run
|
|
188
|
+
* of marks, for a list scanned by the dozen).
|
|
189
|
+
*/
|
|
190
|
+
phoneRows?: 'labelled' | 'compact' | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* The grid is a card's body: no edge, corner or ground of its own and one
|
|
193
|
+
* rule above its head. A grid straight in a `Card` is flush without this.
|
|
194
|
+
*/
|
|
195
|
+
flush?: boolean | undefined;
|
|
196
|
+
/** For an application driving the cursor from its own keymap. */
|
|
197
|
+
handleRef?: Ref<DataGridHandle> | undefined;
|
|
198
|
+
/** The reader pressed inside the grid: which grid the keyboard means. */
|
|
199
|
+
onPointerDown?: (() => void) | undefined;
|
|
200
|
+
labels?: Partial<DataGridLabels> | undefined;
|
|
201
|
+
/** What the table is, for assistive technology: its card's title, by id or in words. */
|
|
202
|
+
'aria-label'?: string | undefined;
|
|
203
|
+
'aria-labelledby'?: string | undefined;
|
|
204
|
+
className?: string | undefined;
|
|
205
|
+
}
|
|
206
|
+
/** `-updated` as `{key: "updated", desc: true}`. */
|
|
207
|
+
export declare function parseGridSort(raw: string): {
|
|
208
|
+
key: string;
|
|
209
|
+
desc: boolean;
|
|
210
|
+
} | null;
|
|
211
|
+
/** What the fit has decided for one set of columns, at one width. */
|
|
212
|
+
export interface GridFit {
|
|
213
|
+
/** The column set it was decided for. */
|
|
214
|
+
readonly set: string;
|
|
215
|
+
/** The grid's width when it last decided. */
|
|
216
|
+
readonly width: number;
|
|
217
|
+
/** The keys it dropped, in the order it dropped them. */
|
|
218
|
+
readonly dropped: readonly string[];
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* The next fit, or null when this one stands. PURE, so the rules are held
|
|
222
|
+
* without a layout engine:
|
|
223
|
+
*
|
|
224
|
+
* - the grid GREW past the width columns were dropped at: start again from all
|
|
225
|
+
* of them (the next pass drops again only what still does not fit);
|
|
226
|
+
* - the tracks OVERRUN the grid: drop the visible column with the lowest
|
|
227
|
+
* `drop`, if there is one;
|
|
228
|
+
* - otherwise remember a narrower width, so growing back past it re-tries.
|
|
229
|
+
*/
|
|
230
|
+
export declare function fitGridColumns({ fit, width, overflows, visible, }: {
|
|
231
|
+
fit: GridFit;
|
|
232
|
+
width: number;
|
|
233
|
+
overflows: boolean;
|
|
234
|
+
visible: readonly {
|
|
235
|
+
key: string;
|
|
236
|
+
drop?: number | undefined;
|
|
237
|
+
}[];
|
|
238
|
+
}): GridFit | null;
|
|
239
|
+
/**
|
|
240
|
+
* A list as columns: sortable heads, optional and give-way columns, bands for
|
|
241
|
+
* a grouped answer, a row link stretched over each row, and a card per row on
|
|
242
|
+
* a phone.
|
|
243
|
+
*
|
|
244
|
+
* ONE TRACK LIST, ON THE GRID. The head, the bands and every row are
|
|
245
|
+
* `subgrid` passthroughs, so a head cell and a cell twenty rows down size the
|
|
246
|
+
* same track; each row being its own grid sized its columns against its own
|
|
247
|
+
* cells alone, and no value sat under the head that named it.
|
|
248
|
+
*
|
|
249
|
+
* A SHRINK COLUMN IS CAPPED (`fit-content(20%)`): `max-content` grows without
|
|
250
|
+
* a ceiling and grid resolves it before any flexible column, so one long value
|
|
251
|
+
* starved the title to zero and still overflowed.
|
|
252
|
+
*
|
|
253
|
+
* COLUMNS THAT DO NOT FIT GIVE WAY IN ORDER (`drop`), measured after every
|
|
254
|
+
* commit in a layout effect so the intermediate shapes never paint, and the
|
|
255
|
+
* foot names what the width took. Not on a phone, where a row is a card.
|
|
256
|
+
*
|
|
257
|
+
* THE ROW'S LINK IS AN OVERLAY, NOT THE ROW: a row that was an anchor made
|
|
258
|
+
* every linking cell an anchor inside an anchor, and the parser closes the
|
|
259
|
+
* outer one at the inner, so the row stopped being clickable from that cell
|
|
260
|
+
* on. Stretched over the row it keeps a real href, and the cells' own links
|
|
261
|
+
* and buttons sit above it.
|
|
262
|
+
*
|
|
263
|
+
* The grid makes no scrollport of its own (`overflow: clip`), which is what
|
|
264
|
+
* lets its head stick against the page's scroller; an application whose
|
|
265
|
+
* scroller carries a sticky bar sets `--crewlet-data-grid-sticky-top`.
|
|
266
|
+
*/
|
|
267
|
+
export declare function DataGrid<T>({ rows, bands, columns, rowKey, onRowActivate, rowHref, isSelected, isFailed, sort: sortRaw, onSortChange, serverSorted, cols: colsRaw, onColsChange, empty, footer, onLoadMore, loadedNote, phoneRows, flush, handleRef, onPointerDown, labels, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, className, }: DataGridProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './DataGrid.css';
|
|
2
|
+
export { ChooserList, ColumnChooser, DataGrid, columnChoicesOf, fitGridColumns, parseGridSort } from './DataGrid.js';
|
|
3
|
+
export type { ColumnChoice, ChooserItem, ChooserListProps, ColumnChooserProps, DataGridActivationEvent, DataGridBand, DataGridColumn, DataGridHandle, DataGridLabels, DataGridProps, GridFit, } from './DataGrid.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ChooserList, ColumnChooser, DataGrid, columnChoicesOf, fitGridColumns, parseGridSort } from '../chunk-XIDD7PJO.js';
|
|
2
|
+
import '../chunk-RA2ULG6H.js';
|
|
3
|
+
import '../chunk-PQADV6P6.js';
|
|
4
|
+
import '../chunk-RTPQDNW3.js';
|
|
5
|
+
import '../chunk-OG6CL3EB.js';
|
|
6
|
+
import '../chunk-BZFWDIV6.js';
|
|
7
|
+
import '../chunk-ODEQTPFM.js';
|