@salilvnair/dui 1.0.7 → 1.0.9
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/assets/DuiShowcase-BOtwgwbq.css +1 -0
- package/dist/assets/{DuiShowcase-CSkP-vdJ.js → DuiShowcase-Bl4Oi2Vw.js} +1377 -1359
- package/dist/assets/index-Dylj6yGs.css +10 -0
- package/dist/assets/{index-DQdlwLhi.js → index-ROymQLGX.js} +2 -2
- package/dist/chunks/{daakia-icons-BpwUOdSO.js → daakia-icons-DYLRx0Yi.js} +1096 -1053
- package/dist/chunks/daakia-icons-DYLRx0Yi.js.map +1 -0
- package/dist/chunks/doc-path-CS9-ZNht.js +696 -0
- package/dist/chunks/doc-path-CS9-ZNht.js.map +1 -0
- package/dist/icons/daakia-icons.d.ts +24 -0
- package/dist/index.html +2 -2
- package/dist/index.js +23515 -19113
- package/dist/index.js.map +1 -1
- package/dist/lib/components/button/AIButtonView.d.ts +10 -1
- package/dist/lib/components/button/ActionButtonView.d.ts +42 -0
- package/dist/lib/components/button/BookmarkButtonView.d.ts +10 -1
- package/dist/lib/components/button/FabView.d.ts +10 -1
- package/dist/lib/components/button/FollowButtonView.d.ts +10 -1
- package/dist/lib/components/button/HoldToConfirmView.d.ts +10 -1
- package/dist/lib/components/button/LikeButtonView.d.ts +10 -1
- package/dist/lib/components/button/MorphingIconButtonView.d.ts +10 -1
- package/dist/lib/components/button/SegmentedView.d.ts +10 -1
- package/dist/lib/components/button/ThemeToggleView.d.ts +10 -1
- package/dist/lib/components/button/VoteWidgetView.d.ts +10 -1
- package/dist/lib/components/chips/ChipView.d.ts +32 -1
- package/dist/lib/components/chips/CommandChipView.d.ts +10 -1
- package/dist/lib/components/display/BadgeChipView.d.ts +51 -0
- package/dist/lib/components/display/DonutView.d.ts +35 -0
- package/dist/lib/components/display/EmptyStateView.d.ts +33 -1
- package/dist/lib/components/display/FileBrowserView.d.ts +143 -0
- package/dist/lib/components/display/FileBrowserView.test.d.ts +1 -0
- package/dist/lib/components/display/FindingCardView.d.ts +36 -0
- package/dist/lib/components/display/FlameGraphView.d.ts +32 -0
- package/dist/lib/components/display/GroupHeaderView.d.ts +28 -0
- package/dist/lib/components/display/IssueCardSkeletonView.d.ts +28 -0
- package/dist/lib/components/display/IssueCardView.d.ts +40 -0
- package/dist/lib/components/display/LaneChartView.d.ts +46 -0
- package/dist/lib/components/display/LineDiffView.d.ts +25 -0
- package/dist/lib/components/display/LoadingStateView.d.ts +61 -0
- package/dist/lib/components/display/PriorityMarkView.d.ts +20 -0
- package/dist/lib/components/display/SetupOptionView.d.ts +56 -0
- package/dist/lib/components/display/SunburstView.d.ts +32 -0
- package/dist/lib/components/display/SwimlaneChartView.d.ts +48 -0
- package/dist/lib/components/display/TableSkeletonView.d.ts +34 -0
- package/dist/lib/components/display/badge-chip-skins.d.ts +496 -0
- package/dist/lib/components/display/badge-chip.test.d.ts +1 -0
- package/dist/lib/components/display/hierarchy-layout.d.ts +114 -0
- package/dist/lib/components/display/hierarchy-layout.test.d.ts +1 -0
- package/dist/lib/components/display/lane-scale.d.ts +67 -0
- package/dist/lib/components/display/lane-scale.test.d.ts +1 -0
- package/dist/lib/components/display/line-diff.d.ts +42 -0
- package/dist/lib/components/input/AvatarUploadView.d.ts +10 -1
- package/dist/lib/components/input/CalendarView.d.ts +10 -1
- package/dist/lib/components/input/CascaderView.d.ts +10 -1
- package/dist/lib/components/input/ChatInputView.d.ts +10 -1
- package/dist/lib/components/input/CheckboxView.d.ts +10 -1
- package/dist/lib/components/input/ChecklistView.d.ts +10 -1
- package/dist/lib/components/input/ColorPickerView.d.ts +10 -1
- package/dist/lib/components/input/ComboBoxView.d.ts +10 -1
- package/dist/lib/components/input/DateInputView.d.ts +10 -1
- package/dist/lib/components/input/DateRangePickerView.d.ts +10 -1
- package/dist/lib/components/input/DateTimeInputView.d.ts +10 -1
- package/dist/lib/components/input/DialKnobInputView.d.ts +10 -1
- package/dist/lib/components/input/DurationInputView.d.ts +10 -1
- package/dist/lib/components/input/EditorView.d.ts +8 -0
- package/dist/lib/components/input/EditorView.shell.d.ts +9 -1
- package/dist/lib/components/input/EmojiPickerView.d.ts +10 -1
- package/dist/lib/components/input/FeedbackWidgetView.d.ts +10 -1
- package/dist/lib/components/input/FileDropzoneView.d.ts +10 -1
- package/dist/lib/components/input/FilterInputView.d.ts +25 -0
- package/dist/lib/components/input/FloatingLabelInputView.d.ts +10 -1
- package/dist/lib/components/input/FormDataTableView.d.ts +10 -1
- package/dist/lib/components/input/GhostTypingPlaceholderView.d.ts +10 -1
- package/dist/lib/components/input/HiddenKeyValueItemView.d.ts +10 -1
- package/dist/lib/components/input/HighlightedInputView.d.ts +12 -1
- package/dist/lib/components/input/IconPickerView.d.ts +10 -1
- package/dist/lib/components/input/InlineEditTextView.d.ts +10 -1
- package/dist/lib/components/input/InviteInputView.d.ts +10 -1
- package/dist/lib/components/input/KeyValueTableRowView.d.ts +10 -1
- package/dist/lib/components/input/KeyValueTableView.d.ts +10 -1
- package/dist/lib/components/input/MarkdownEditorView.d.ts +30 -0
- package/dist/lib/components/input/MaskedInputView.d.ts +10 -1
- package/dist/lib/components/input/MentionInputView.d.ts +10 -1
- package/dist/lib/components/input/MergedInputView.d.ts +10 -1
- package/dist/lib/components/input/NpsSurveyView.d.ts +10 -1
- package/dist/lib/components/input/OtpInputView.d.ts +10 -1
- package/dist/lib/components/input/PhoneInputView.d.ts +10 -1
- package/dist/lib/components/input/PickerView.d.ts +10 -1
- package/dist/lib/components/input/PriorityPickerView.d.ts +10 -1
- package/dist/lib/components/input/RadioCardView.d.ts +10 -1
- package/dist/lib/components/input/RadioGroupView.d.ts +10 -1
- package/dist/lib/components/input/RangeSliderView.d.ts +10 -1
- package/dist/lib/components/input/RatingView.d.ts +10 -1
- package/dist/lib/components/input/RichTextToolbarView.d.ts +10 -1
- package/dist/lib/components/input/RoleSelectView.d.ts +10 -1
- package/dist/lib/components/input/SearchFieldView.d.ts +72 -0
- package/dist/lib/components/input/SegmentedControlView.d.ts +20 -1
- package/dist/lib/components/input/SelectInputView.d.ts +32 -1
- package/dist/lib/components/input/SelectTextInputView.d.ts +12 -1
- package/dist/lib/components/input/ShortcutRecorderView.d.ts +10 -1
- package/dist/lib/components/input/SliderView.d.ts +10 -1
- package/dist/lib/components/input/SpectrumSliderView.d.ts +10 -1
- package/dist/lib/components/input/StepperInputView.d.ts +10 -1
- package/dist/lib/components/input/SwatchPickerView.d.ts +38 -0
- package/dist/lib/components/input/SwitchGroupView.d.ts +10 -1
- package/dist/lib/components/input/TabView.d.ts +10 -1
- package/dist/lib/components/input/TagInputView.d.ts +10 -1
- package/dist/lib/components/input/TextInputView.d.ts +9 -0
- package/dist/lib/components/input/ThemeCardSelectorView.d.ts +10 -1
- package/dist/lib/components/input/TimeWheelView.d.ts +10 -1
- package/dist/lib/components/input/TimeZoneSelectView.d.ts +40 -0
- package/dist/lib/components/input/TimeZoneSelectView.test.d.ts +1 -0
- package/dist/lib/components/input/TogglePillView.d.ts +51 -0
- package/dist/lib/components/input/ToggleSwitchView.d.ts +10 -1
- package/dist/lib/components/input/TransferListView.d.ts +10 -1
- package/dist/lib/components/input/TreeSelectView.d.ts +10 -1
- package/dist/lib/components/input/WizardStepperView.d.ts +10 -1
- package/dist/lib/components/input/doc-path.d.ts +52 -0
- package/dist/lib/components/input/doc-path.test.d.ts +1 -0
- package/dist/lib/components/input/markdown-serialise.d.ts +39 -0
- package/dist/lib/components/input/markdown-serialise.test.d.ts +1 -0
- package/dist/lib/components/input/select-position.test.d.ts +1 -0
- package/dist/lib/components/layout/PathBreadcrumbView.d.ts +67 -0
- package/dist/lib/components/layout/PathBreadcrumbView.test.d.ts +1 -0
- package/dist/lib/components/layout/SplitPanelView.d.ts +26 -1
- package/dist/lib/components/modal/ActionSheetView.d.ts +10 -1
- package/dist/lib/components/modal/AlertDialogView.d.ts +10 -1
- package/dist/lib/components/modal/BottomSheetView.d.ts +10 -1
- package/dist/lib/components/modal/CommandPaletteView.d.ts +10 -1
- package/dist/lib/components/modal/ContextMenuView.d.ts +19 -1
- package/dist/lib/components/modal/DrawerView.d.ts +10 -1
- package/dist/lib/components/modal/InfoPopupView.d.ts +13 -1
- package/dist/lib/components/modal/ModalView.d.ts +19 -3
- package/dist/lib/components/modal/NotificationCenterView.d.ts +10 -1
- package/dist/lib/components/modal/PopoverView.d.ts +10 -1
- package/dist/lib/components/modal/SheetView.d.ts +31 -0
- package/dist/lib/components/modal/SpotlightTourView.d.ts +10 -1
- package/dist/lib/components/modal/StackedToastDeckView.d.ts +10 -1
- package/dist/lib/components/modal/sheet-drag.d.ts +60 -0
- package/dist/lib/components/modal/sheet-drag.test.d.ts +1 -0
- package/dist/lib/components/tabs/PilledTabView.d.ts +10 -1
- package/dist/lib/components/tabs/TabBarView.d.ts +10 -1
- package/dist/lib/components/tabs/UnderlineTabsView.d.ts +41 -0
- package/dist/lib/components/testid.test.d.ts +1 -0
- package/dist/lib/core/DuiContext.d.ts +4 -2
- package/dist/lib/core/DuiTypes.d.ts +8 -0
- package/dist/lib/core/IconSize.d.ts +45 -0
- package/dist/lib/core/TerminalPalette.d.ts +81 -0
- package/dist/lib/core/TerminalPaletteFile.d.ts +61 -0
- package/dist/lib/core/TerminalPaletteFile.test.d.ts +1 -0
- package/dist/lib/index.d.ts +70 -0
- package/dist/monaco-setup.js +589 -493
- package/dist/monaco-setup.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/editor.js +1 -1
- package/package.json +5 -3
- package/dist/assets/DuiShowcase-CRLG9S4N.css +0 -1
- package/dist/assets/index-kr_HUJjf.css +0 -10
- package/dist/chunks/EditorView.shell-DWGMOgiy.js +0 -510
- package/dist/chunks/EditorView.shell-DWGMOgiy.js.map +0 -1
- package/dist/chunks/daakia-icons-BpwUOdSO.js.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { HierarchyNode, FlameCell } from './hierarchy-layout';
|
|
3
|
+
export interface FlameGraphViewProps {
|
|
4
|
+
root: HierarchyNode;
|
|
5
|
+
width?: number;
|
|
6
|
+
/** Height of one row. */
|
|
7
|
+
rowHeight?: number;
|
|
8
|
+
maxDepth?: number;
|
|
9
|
+
/** Cells narrower than this fraction of the width are not drawn. */
|
|
10
|
+
minWidth?: number;
|
|
11
|
+
accentColor?: string;
|
|
12
|
+
format?: (value: number) => string;
|
|
13
|
+
/** Click a frame to make it the new root. */
|
|
14
|
+
onZoom?: (cell: FlameCell) => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Merged stacks, as stacked bars.
|
|
20
|
+
*
|
|
21
|
+
* The standard way to read a profile: width is how much of the sample a frame
|
|
22
|
+
* accounts for, and a frame sits on top of its caller. A wide plateau near the
|
|
23
|
+
* top is where the time or the memory actually is; a tall narrow spire is deep
|
|
24
|
+
* but cheap, and the eye can tell those apart instantly in a way it cannot
|
|
25
|
+
* from a call tree.
|
|
26
|
+
*
|
|
27
|
+
* Drawn as DOM rather than canvas so a frame can carry a title, be clicked and
|
|
28
|
+
* be found by the browser's own search. A merged thread dump is hundreds of
|
|
29
|
+
* cells, not the hundreds of thousands a CPU profile produces, and that is
|
|
30
|
+
* comfortably inside what the DOM handles.
|
|
31
|
+
*/
|
|
32
|
+
export declare function FlameGraphView({ root, width, rowHeight, maxDepth, minWidth, accentColor, format, onZoom, className, style, }: FlameGraphViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export interface GroupHeaderViewProps {
|
|
3
|
+
/** The group's name. Set in small caps, because it is a label not a heading. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** How many are in it. */
|
|
6
|
+
count?: number | string;
|
|
7
|
+
/**
|
|
8
|
+
* What the group is worth knowing at a glance — a chip, a count of the ones
|
|
9
|
+
* that need attention.
|
|
10
|
+
*
|
|
11
|
+
* Sits after the rule, hard right, so a column of group headers puts every
|
|
12
|
+
* summary in the same place and the eye can run straight down them.
|
|
13
|
+
*/
|
|
14
|
+
summary?: ReactNode;
|
|
15
|
+
/** Tints the name — for the pile nobody owns. */
|
|
16
|
+
tone?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The line above a group of things.
|
|
22
|
+
*
|
|
23
|
+
* Name, size, a rule that eats the remaining width, and the one fact about the
|
|
24
|
+
* group worth carrying. The rule is what makes a stack of these read as
|
|
25
|
+
* sections rather than as a list with bold entries in it, and it costs nothing
|
|
26
|
+
* — it is the leftover space, drawn.
|
|
27
|
+
*/
|
|
28
|
+
export declare function GroupHeaderView({ name, count, summary, tone, className, style, }: GroupHeaderViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface IssueCardSkeletonViewProps {
|
|
3
|
+
/** Leave room for the evidence strip, when the board shows screenshots. */
|
|
4
|
+
media?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* How long the title bar is, 0–1.
|
|
7
|
+
*
|
|
8
|
+
* Varied by the caller across a grid so the placeholder reads as a list of
|
|
9
|
+
* different things rather than a printed pattern — a wall of identical bars
|
|
10
|
+
* looks like a rendering bug, which is the opposite of reassuring.
|
|
11
|
+
*/
|
|
12
|
+
titleFill?: number;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* An issue card that has not arrived yet.
|
|
18
|
+
*
|
|
19
|
+
* Deliberately the twin of IssueCardView: same padding, radius, gaps and row
|
|
20
|
+
* order, so the real card lands exactly where the placeholder stood and the
|
|
21
|
+
* grid does not jump under a cursor already on its way to a click.
|
|
22
|
+
*
|
|
23
|
+
* A skeleton rather than a spinner because the shape is the information — a
|
|
24
|
+
* reader can see a board is coming, roughly how much of it, and start moving
|
|
25
|
+
* before the data lands. A centred spinner says only "wait", and a centred
|
|
26
|
+
* panel that takes over the whole view says "something is wrong".
|
|
27
|
+
*/
|
|
28
|
+
export declare function IssueCardSkeletonView({ media, titleFill, className, style, }: IssueCardSkeletonViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export interface IssueCardViewProps {
|
|
3
|
+
/** The identifier, shown as given — `#41`, `PROJ-8`. */
|
|
4
|
+
reference?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
/**
|
|
7
|
+
* The chips beside the reference — module, environment, whatever classifies
|
|
8
|
+
* this one. Rendered by the caller so it can use the same chip component the
|
|
9
|
+
* rest of the screen uses.
|
|
10
|
+
*/
|
|
11
|
+
chips?: ReactNode;
|
|
12
|
+
/** Evidence: a screenshot strip, a thumbnail. Sits under the title. */
|
|
13
|
+
media?: ReactNode;
|
|
14
|
+
/** The left of the footer: an avatar, or the word for having no owner. */
|
|
15
|
+
owner?: ReactNode;
|
|
16
|
+
/** Beside the owner: priority, state. */
|
|
17
|
+
mark?: ReactNode;
|
|
18
|
+
/** The right of the footer: age, comment count, a stale chip. */
|
|
19
|
+
meta?: ReactNode;
|
|
20
|
+
/** Lift the card — selected, or dragged over. */
|
|
21
|
+
selected?: boolean;
|
|
22
|
+
accentColor?: string;
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
tooltip?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* One tracked item on a board — an issue, a ticket.
|
|
30
|
+
*
|
|
31
|
+
* The order is the whole component: reference and classification, then the
|
|
32
|
+
* sentence, then the evidence, then who and when. A reader who has scanned one
|
|
33
|
+
* card knows where to look on every other one, which is the only reason a board
|
|
34
|
+
* beats a table.
|
|
35
|
+
*
|
|
36
|
+
* The title is never truncated. A card whose sentence ends in an ellipsis makes
|
|
37
|
+
* you open the item to find out whether you cared, which is precisely the work
|
|
38
|
+
* the board existed to save; cards in a row may be different heights instead.
|
|
39
|
+
*/
|
|
40
|
+
export declare function IssueCardView({ reference, title, chips, media, owner, mark, meta, selected, accentColor, onClick, tooltip, className, style, }: IssueCardViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { Span } from './lane-scale';
|
|
3
|
+
export interface LaneSeries {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
points: {
|
|
7
|
+
at: number;
|
|
8
|
+
value: number;
|
|
9
|
+
}[];
|
|
10
|
+
color?: string;
|
|
11
|
+
/** Fill under the line. Off for a series read as a level rather than a volume. */
|
|
12
|
+
filled?: boolean;
|
|
13
|
+
/** Right-hand readout — usually the latest or peak value, already formatted. */
|
|
14
|
+
readout?: string;
|
|
15
|
+
/** Draw as ticks rising from the baseline instead of a line: events, not a level. */
|
|
16
|
+
kind?: 'line' | 'ticks';
|
|
17
|
+
}
|
|
18
|
+
export interface LaneMarker {
|
|
19
|
+
at: number;
|
|
20
|
+
label?: string;
|
|
21
|
+
color?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LaneChartViewProps {
|
|
24
|
+
series: LaneSeries[];
|
|
25
|
+
markers?: LaneMarker[];
|
|
26
|
+
laneHeight?: number;
|
|
27
|
+
/** Clamp the axis instead of deriving it from the data. */
|
|
28
|
+
window?: Span;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Several measurements over one time axis.
|
|
34
|
+
*
|
|
35
|
+
* Telemetry read as a stack of lanes rather than one chart with many lines:
|
|
36
|
+
* heap in megabytes and CPU in percent share no y scale, and overlaying them
|
|
37
|
+
* forces either two axes or a normalisation that makes both meaningless.
|
|
38
|
+
* Separate lanes keep each series in its own units and still let the eye run
|
|
39
|
+
* a vertical line down the stack, which is the actual question — what else was
|
|
40
|
+
* happening when this happened.
|
|
41
|
+
*
|
|
42
|
+
* The axis is shared and computed across every series, for the same reason the
|
|
43
|
+
* swimlane's is: lanes scaled independently put simultaneous events in
|
|
44
|
+
* different columns.
|
|
45
|
+
*/
|
|
46
|
+
export declare function LaneChartView({ series, markers, laneHeight, window: fixedWindow, className, style, }: LaneChartViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface LineDiffViewProps {
|
|
3
|
+
left: string;
|
|
4
|
+
right: string;
|
|
5
|
+
leftLabel?: string;
|
|
6
|
+
rightLabel?: string;
|
|
7
|
+
/** Shown beside the label — e.g. a filename, or "not present". */
|
|
8
|
+
leftNote?: string;
|
|
9
|
+
rightNote?: string;
|
|
10
|
+
/** A fixed height, or omit to fill a flex parent. */
|
|
11
|
+
height?: number | string;
|
|
12
|
+
/** Adds a "+n / −n" tally to each header. */
|
|
13
|
+
showTally?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Colour of the two header labels.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to error on the left and success on the right, which is the
|
|
18
|
+
* convention every diff uses: what left had and right does not is a removal.
|
|
19
|
+
*/
|
|
20
|
+
leftTone?: string;
|
|
21
|
+
rightTone?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
export declare function LineDiffView({ left, right, leftLabel, rightLabel, leftNote, rightNote, height, showTally, leftTone, rightTone, className, style, }: LineDiffViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export interface LoadingStateViewProps {
|
|
3
|
+
/**
|
|
4
|
+
* The thing being waited for, drawn large.
|
|
5
|
+
*
|
|
6
|
+
* Deliberately the subject rather than a generic spinner: a reader glancing
|
|
7
|
+
* at the screen learns what is happening from the icon before they read a
|
|
8
|
+
* word of it.
|
|
9
|
+
*/
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
title: string;
|
|
12
|
+
message?: string;
|
|
13
|
+
accentColor?: string;
|
|
14
|
+
/** Matches EmptyStateView, so the two swap without the layout moving. */
|
|
15
|
+
compact?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The medallion's box, in px.
|
|
18
|
+
*
|
|
19
|
+
* Defaulted from `compact`, and worth overriding in one case: a state that
|
|
20
|
+
* owns a whole panel rather than sitting inside a list. 54px centred in an
|
|
21
|
+
* empty tab reads as something that failed to load rather than as the
|
|
22
|
+
* subject of the screen. Pair it with a larger icon — `IconSize.hero`.
|
|
23
|
+
*/
|
|
24
|
+
medallionSize?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Seconds after which the wait stops being ordinary.
|
|
27
|
+
*
|
|
28
|
+
* A cluster on the other side of the world, behind a VPN, answers in seconds
|
|
29
|
+
* rather than milliseconds — and the reader cannot tell that from a hang. At
|
|
30
|
+
* this point the component says so itself instead of leaving them to guess.
|
|
31
|
+
* 0 disables it.
|
|
32
|
+
*/
|
|
33
|
+
slowAfterSeconds?: number;
|
|
34
|
+
/** What to say once it has been slow. Replaces `message`. */
|
|
35
|
+
slowMessage?: string;
|
|
36
|
+
/** Offered only once the wait has gone long — Cancel, Try again, Go back. */
|
|
37
|
+
action?: {
|
|
38
|
+
label: string;
|
|
39
|
+
onClick: () => void;
|
|
40
|
+
};
|
|
41
|
+
/** Shown under the message: what is being fetched, step by step. */
|
|
42
|
+
hints?: {
|
|
43
|
+
key: ReactNode;
|
|
44
|
+
text: string;
|
|
45
|
+
}[];
|
|
46
|
+
className?: string;
|
|
47
|
+
style?: CSSProperties;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Waiting, said properly.
|
|
51
|
+
*
|
|
52
|
+
* The shape of EmptyStateView with a pulse and a clock. It exists because the
|
|
53
|
+
* alternative everywhere was a line of grey text — "Loading pods…", "Loading
|
|
54
|
+
* namespaces…" — which says nothing about what is being waited for, nothing
|
|
55
|
+
* about how long it has been, and looks identical whether the answer is a
|
|
56
|
+
* hundred milliseconds away or never coming.
|
|
57
|
+
*
|
|
58
|
+
* Three things it does that a spinner cannot: it names the subject, it changes
|
|
59
|
+
* its mind after a while, and it eventually offers a way out.
|
|
60
|
+
*/
|
|
61
|
+
export declare function LoadingStateView({ icon, title, message, accentColor, compact, medallionSize, slowAfterSeconds, slowMessage, action, hints, className, style, }: LoadingStateViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type PriorityMarkLevel = 'urgent' | 'high' | 'medium' | 'low' | 'none';
|
|
3
|
+
export interface PriorityMarkViewProps {
|
|
4
|
+
level: PriorityMarkLevel;
|
|
5
|
+
/** Show the word as well as the ring. On by default. */
|
|
6
|
+
showLabel?: boolean;
|
|
7
|
+
/** Override the word — for a tracker that calls Urgent something else. */
|
|
8
|
+
label?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A priority, as a ring and a word.
|
|
14
|
+
*
|
|
15
|
+
* A ring rather than a filled dot, because status is already a filled dot
|
|
16
|
+
* everywhere else and the two sit side by side on the same row — two solid
|
|
17
|
+
* dots in different palettes read as one broken thing. The ring is the whole
|
|
18
|
+
* distinction, and it survives being 7px.
|
|
19
|
+
*/
|
|
20
|
+
export declare function PriorityMarkView({ level, showLabel, label, className, style, }: PriorityMarkViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export interface SetupOptionViewProps {
|
|
3
|
+
/** The route's name — `winget`, `Homebrew`, `Sign in with a browser`. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** A short marker beside the title: `recommended`, `apt`, `needs admin`. */
|
|
6
|
+
tag?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Lift it as the one to pick.
|
|
9
|
+
*
|
|
10
|
+
* Exactly one option in a set should carry this. A screen where every card is
|
|
11
|
+
* highlighted has no recommendation on it, only decoration.
|
|
12
|
+
*/
|
|
13
|
+
recommended?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The command to run, shown with a copy button — never a button that runs it.
|
|
16
|
+
*
|
|
17
|
+
* Installing software and authenticating are the reader's actions. A one-click
|
|
18
|
+
* "do it for me" here would be running an installer, or driving a credential
|
|
19
|
+
* flow, on somebody's behalf.
|
|
20
|
+
*/
|
|
21
|
+
command?: string;
|
|
22
|
+
/** The language for the command block. Shell by default. */
|
|
23
|
+
language?: string;
|
|
24
|
+
/**
|
|
25
|
+
* What a reader needs in order to choose THIS one over the one beside it —
|
|
26
|
+
* not what the command does, which the command already says.
|
|
27
|
+
*/
|
|
28
|
+
note?: ReactNode;
|
|
29
|
+
/** A control in the header: a link out, a picker, a button. */
|
|
30
|
+
action?: ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* The route's own controls, where a command is not the thing to show — a
|
|
33
|
+
* field to type into, a list to choose from.
|
|
34
|
+
*
|
|
35
|
+
* Sits where the command would, so a set of cards mixing the two still lines
|
|
36
|
+
* up: name, the thing you interact with, then the one line about when to
|
|
37
|
+
* pick it.
|
|
38
|
+
*/
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
accentColor?: string;
|
|
41
|
+
className?: string;
|
|
42
|
+
style?: CSSProperties;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* One way to get something set up, among several.
|
|
46
|
+
*
|
|
47
|
+
* The shape every install or sign-in screen converges on: a name, the exact
|
|
48
|
+
* thing to run, and one line on when to pick it. Fixing that order in a
|
|
49
|
+
* component keeps a grid of routes scannable — a reader compares the same part
|
|
50
|
+
* of each card rather than re-reading whole paragraphs to find the command.
|
|
51
|
+
*
|
|
52
|
+
* The card never performs the route itself. It shows what to run and lets the
|
|
53
|
+
* reader run it, which is the only honest arrangement for actions that install
|
|
54
|
+
* software or reach a credential store.
|
|
55
|
+
*/
|
|
56
|
+
export declare function SetupOptionView({ title, tag, recommended, command, language, note, action, children, accentColor, className, style, }: SetupOptionViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { HierarchyNode, SunburstSlice } from './hierarchy-layout';
|
|
3
|
+
export interface SunburstViewProps {
|
|
4
|
+
root: HierarchyNode;
|
|
5
|
+
size?: number;
|
|
6
|
+
/** Rings drawn outward from the centre. */
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
/** Slices thinner than this share of the whole are dropped. */
|
|
9
|
+
minShare?: number;
|
|
10
|
+
accentColor?: string;
|
|
11
|
+
/** Format the value for the centre label and tooltips. */
|
|
12
|
+
format?: (value: number) => string;
|
|
13
|
+
/** Shown in the hole when nothing is hovered. */
|
|
14
|
+
centerLabel?: string;
|
|
15
|
+
onSelect?: (slice: SunburstSlice) => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A hierarchy as concentric rings.
|
|
21
|
+
*
|
|
22
|
+
* The profiler's idiom for "what is big and what is inside it": each ring is a
|
|
23
|
+
* level, each slice is sized by its share, and a child sits inside the arc of
|
|
24
|
+
* its parent. Reading outward from the centre follows containment, which is
|
|
25
|
+
* what a treemap makes you infer from adjacency instead.
|
|
26
|
+
*
|
|
27
|
+
* Hue is derived from depth and position rather than from a palette, so a
|
|
28
|
+
* hierarchy of any width gets distinguishable neighbours without the caller
|
|
29
|
+
* supplying colours. Lightness falls with depth, which is what makes the
|
|
30
|
+
* nesting legible at a glance — outer rings recede.
|
|
31
|
+
*/
|
|
32
|
+
export declare function SunburstView({ root, size, maxDepth, minShare, accentColor, format, centerLabel, onSelect, className, style, }: SunburstViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { Span } from './lane-scale';
|
|
3
|
+
export interface SwimlaneSegment extends Span {
|
|
4
|
+
/** What state this stretch was in. Drives the colour via `colors`. */
|
|
5
|
+
state: string;
|
|
6
|
+
/** Anything the caller wants back on hover or click. */
|
|
7
|
+
meta?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface SwimlaneRow {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
segments: SwimlaneSegment[];
|
|
13
|
+
}
|
|
14
|
+
export interface SwimlaneMarker {
|
|
15
|
+
at: number;
|
|
16
|
+
label?: string;
|
|
17
|
+
color?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SwimlaneChartViewProps {
|
|
20
|
+
rows: SwimlaneRow[];
|
|
21
|
+
/** state → colour. A state with no entry is drawn in the muted default. */
|
|
22
|
+
colors: Record<string, string>;
|
|
23
|
+
/** Vertical marks across every lane — a dump taken, a GC, a deploy. */
|
|
24
|
+
markers?: SwimlaneMarker[];
|
|
25
|
+
rowHeight?: number;
|
|
26
|
+
/** Width of the label gutter. */
|
|
27
|
+
labelWidth?: number;
|
|
28
|
+
/** Clamp the axis instead of deriving it from the data. */
|
|
29
|
+
window?: Span;
|
|
30
|
+
format?: (span: Span) => string;
|
|
31
|
+
onSelect?: (row: SwimlaneRow, segment: SwimlaneSegment) => void;
|
|
32
|
+
className?: string;
|
|
33
|
+
style?: CSSProperties;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Entities on a shared timeline, coloured by what they were doing.
|
|
37
|
+
*
|
|
38
|
+
* Threads by state, connections by lifetime, pods by phase — the shape is the
|
|
39
|
+
* same whenever the question is "what was each of these doing, and did they do
|
|
40
|
+
* it at the same time". The vertical alignment IS the information: three rows
|
|
41
|
+
* turning red within the same 40ms is a lock, and no table of states will ever
|
|
42
|
+
* show that.
|
|
43
|
+
*
|
|
44
|
+
* Every lane shares one axis, computed across all rows. Scaling lanes
|
|
45
|
+
* independently would put simultaneous events in different columns, which
|
|
46
|
+
* destroys the only thing this chart is for.
|
|
47
|
+
*/
|
|
48
|
+
export declare function SwimlaneChartView({ rows, colors, markers, rowHeight, labelWidth, window: fixedWindow, format, onSelect, className, style, }: SwimlaneChartViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface TableSkeletonColumn {
|
|
3
|
+
/**
|
|
4
|
+
* A number is a fixed pixel width; a string is used as-is.
|
|
5
|
+
*
|
|
6
|
+
* `'flex'` takes the remaining space, which is how the name column in a file
|
|
7
|
+
* list behaves — the one column whose width is not known in advance.
|
|
8
|
+
*/
|
|
9
|
+
width: number | string | 'flex';
|
|
10
|
+
/** Draw this cell's bar shorter than its column, as real content usually is. */
|
|
11
|
+
fill?: number;
|
|
12
|
+
align?: 'left' | 'right';
|
|
13
|
+
}
|
|
14
|
+
export interface TableSkeletonViewProps {
|
|
15
|
+
columns: TableSkeletonColumn[];
|
|
16
|
+
/** Height of one row, matching the table this stands in for. */
|
|
17
|
+
rowHeight?: number;
|
|
18
|
+
/** Fixed row count. Omit to fill the available height. */
|
|
19
|
+
rows?: number;
|
|
20
|
+
/** A small square before the first column — a file or status icon. */
|
|
21
|
+
leadingIcon?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Fraction of the measured height to fill. Default 1.
|
|
24
|
+
*
|
|
25
|
+
* A placeholder that reaches the last pixel of the panel is claiming the
|
|
26
|
+
* list is exactly as long as the window, and when the real rows turn out to
|
|
27
|
+
* be fewer the whole thing appears to collapse. Filling part of the space
|
|
28
|
+
* says "a list is coming" without promising how much of one.
|
|
29
|
+
*/
|
|
30
|
+
fill?: number;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
}
|
|
34
|
+
export declare function TableSkeletonView({ columns, rowHeight, rows, leadingIcon, fill, className, style, }: TableSkeletonViewProps): import("react").JSX.Element;
|