@salilvnair/dui 1.0.7 → 1.0.8

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.
Files changed (152) hide show
  1. package/dist/assets/DuiShowcase-C18KoqHP.css +1 -0
  2. package/dist/assets/{DuiShowcase-CSkP-vdJ.js → DuiShowcase-DwihGCxO.js} +1377 -1359
  3. package/dist/assets/{index-DQdlwLhi.js → index-D9rPjVPP.js} +2 -2
  4. package/dist/chunks/{daakia-icons-BpwUOdSO.js → daakia-icons-DYLRx0Yi.js} +1096 -1053
  5. package/dist/chunks/daakia-icons-DYLRx0Yi.js.map +1 -0
  6. package/dist/chunks/doc-path-D2_JUEIe.js +695 -0
  7. package/dist/chunks/doc-path-D2_JUEIe.js.map +1 -0
  8. package/dist/icons/daakia-icons.d.ts +24 -0
  9. package/dist/index.html +1 -1
  10. package/dist/index.js +20939 -17293
  11. package/dist/index.js.map +1 -1
  12. package/dist/lib/components/button/AIButtonView.d.ts +10 -1
  13. package/dist/lib/components/button/ActionButtonView.d.ts +42 -0
  14. package/dist/lib/components/button/BookmarkButtonView.d.ts +10 -1
  15. package/dist/lib/components/button/FabView.d.ts +10 -1
  16. package/dist/lib/components/button/FollowButtonView.d.ts +10 -1
  17. package/dist/lib/components/button/HoldToConfirmView.d.ts +10 -1
  18. package/dist/lib/components/button/LikeButtonView.d.ts +10 -1
  19. package/dist/lib/components/button/MorphingIconButtonView.d.ts +10 -1
  20. package/dist/lib/components/button/SegmentedView.d.ts +10 -1
  21. package/dist/lib/components/button/ThemeToggleView.d.ts +10 -1
  22. package/dist/lib/components/button/VoteWidgetView.d.ts +10 -1
  23. package/dist/lib/components/chips/ChipView.d.ts +32 -1
  24. package/dist/lib/components/chips/CommandChipView.d.ts +10 -1
  25. package/dist/lib/components/display/BadgeChipView.d.ts +25 -0
  26. package/dist/lib/components/display/DonutView.d.ts +35 -0
  27. package/dist/lib/components/display/EmptyStateView.d.ts +33 -1
  28. package/dist/lib/components/display/FileBrowserView.d.ts +143 -0
  29. package/dist/lib/components/display/FileBrowserView.test.d.ts +1 -0
  30. package/dist/lib/components/display/FindingCardView.d.ts +36 -0
  31. package/dist/lib/components/display/FlameGraphView.d.ts +32 -0
  32. package/dist/lib/components/display/GroupHeaderView.d.ts +28 -0
  33. package/dist/lib/components/display/IssueCardSkeletonView.d.ts +28 -0
  34. package/dist/lib/components/display/IssueCardView.d.ts +40 -0
  35. package/dist/lib/components/display/LaneChartView.d.ts +46 -0
  36. package/dist/lib/components/display/LineDiffView.d.ts +25 -0
  37. package/dist/lib/components/display/PriorityMarkView.d.ts +20 -0
  38. package/dist/lib/components/display/SetupOptionView.d.ts +56 -0
  39. package/dist/lib/components/display/SunburstView.d.ts +32 -0
  40. package/dist/lib/components/display/SwimlaneChartView.d.ts +48 -0
  41. package/dist/lib/components/display/TableSkeletonView.d.ts +34 -0
  42. package/dist/lib/components/display/hierarchy-layout.d.ts +114 -0
  43. package/dist/lib/components/display/hierarchy-layout.test.d.ts +1 -0
  44. package/dist/lib/components/display/lane-scale.d.ts +67 -0
  45. package/dist/lib/components/display/lane-scale.test.d.ts +1 -0
  46. package/dist/lib/components/display/line-diff.d.ts +42 -0
  47. package/dist/lib/components/input/AvatarUploadView.d.ts +10 -1
  48. package/dist/lib/components/input/CalendarView.d.ts +10 -1
  49. package/dist/lib/components/input/CascaderView.d.ts +10 -1
  50. package/dist/lib/components/input/ChatInputView.d.ts +10 -1
  51. package/dist/lib/components/input/CheckboxView.d.ts +10 -1
  52. package/dist/lib/components/input/ChecklistView.d.ts +10 -1
  53. package/dist/lib/components/input/ColorPickerView.d.ts +10 -1
  54. package/dist/lib/components/input/ComboBoxView.d.ts +10 -1
  55. package/dist/lib/components/input/DateInputView.d.ts +10 -1
  56. package/dist/lib/components/input/DateRangePickerView.d.ts +10 -1
  57. package/dist/lib/components/input/DateTimeInputView.d.ts +10 -1
  58. package/dist/lib/components/input/DialKnobInputView.d.ts +10 -1
  59. package/dist/lib/components/input/DurationInputView.d.ts +10 -1
  60. package/dist/lib/components/input/EditorView.d.ts +8 -0
  61. package/dist/lib/components/input/EditorView.shell.d.ts +9 -1
  62. package/dist/lib/components/input/EmojiPickerView.d.ts +10 -1
  63. package/dist/lib/components/input/FeedbackWidgetView.d.ts +10 -1
  64. package/dist/lib/components/input/FileDropzoneView.d.ts +10 -1
  65. package/dist/lib/components/input/FilterInputView.d.ts +25 -0
  66. package/dist/lib/components/input/FloatingLabelInputView.d.ts +10 -1
  67. package/dist/lib/components/input/FormDataTableView.d.ts +10 -1
  68. package/dist/lib/components/input/GhostTypingPlaceholderView.d.ts +10 -1
  69. package/dist/lib/components/input/HiddenKeyValueItemView.d.ts +10 -1
  70. package/dist/lib/components/input/HighlightedInputView.d.ts +12 -1
  71. package/dist/lib/components/input/IconPickerView.d.ts +10 -1
  72. package/dist/lib/components/input/InlineEditTextView.d.ts +10 -1
  73. package/dist/lib/components/input/InviteInputView.d.ts +10 -1
  74. package/dist/lib/components/input/KeyValueTableRowView.d.ts +10 -1
  75. package/dist/lib/components/input/KeyValueTableView.d.ts +10 -1
  76. package/dist/lib/components/input/MarkdownEditorView.d.ts +30 -0
  77. package/dist/lib/components/input/MaskedInputView.d.ts +10 -1
  78. package/dist/lib/components/input/MentionInputView.d.ts +10 -1
  79. package/dist/lib/components/input/MergedInputView.d.ts +10 -1
  80. package/dist/lib/components/input/NpsSurveyView.d.ts +10 -1
  81. package/dist/lib/components/input/OtpInputView.d.ts +10 -1
  82. package/dist/lib/components/input/PhoneInputView.d.ts +10 -1
  83. package/dist/lib/components/input/PickerView.d.ts +10 -1
  84. package/dist/lib/components/input/PriorityPickerView.d.ts +10 -1
  85. package/dist/lib/components/input/RadioCardView.d.ts +10 -1
  86. package/dist/lib/components/input/RadioGroupView.d.ts +10 -1
  87. package/dist/lib/components/input/RangeSliderView.d.ts +10 -1
  88. package/dist/lib/components/input/RatingView.d.ts +10 -1
  89. package/dist/lib/components/input/RichTextToolbarView.d.ts +10 -1
  90. package/dist/lib/components/input/RoleSelectView.d.ts +10 -1
  91. package/dist/lib/components/input/SearchFieldView.d.ts +33 -0
  92. package/dist/lib/components/input/SegmentedControlView.d.ts +20 -1
  93. package/dist/lib/components/input/SelectInputView.d.ts +32 -1
  94. package/dist/lib/components/input/SelectTextInputView.d.ts +12 -1
  95. package/dist/lib/components/input/ShortcutRecorderView.d.ts +10 -1
  96. package/dist/lib/components/input/SliderView.d.ts +10 -1
  97. package/dist/lib/components/input/SpectrumSliderView.d.ts +10 -1
  98. package/dist/lib/components/input/StepperInputView.d.ts +10 -1
  99. package/dist/lib/components/input/SwatchPickerView.d.ts +38 -0
  100. package/dist/lib/components/input/SwitchGroupView.d.ts +10 -1
  101. package/dist/lib/components/input/TabView.d.ts +10 -1
  102. package/dist/lib/components/input/TagInputView.d.ts +10 -1
  103. package/dist/lib/components/input/TextInputView.d.ts +9 -0
  104. package/dist/lib/components/input/ThemeCardSelectorView.d.ts +10 -1
  105. package/dist/lib/components/input/TimeWheelView.d.ts +10 -1
  106. package/dist/lib/components/input/TimeZoneSelectView.d.ts +40 -0
  107. package/dist/lib/components/input/TimeZoneSelectView.test.d.ts +1 -0
  108. package/dist/lib/components/input/TogglePillView.d.ts +51 -0
  109. package/dist/lib/components/input/ToggleSwitchView.d.ts +10 -1
  110. package/dist/lib/components/input/TransferListView.d.ts +10 -1
  111. package/dist/lib/components/input/TreeSelectView.d.ts +10 -1
  112. package/dist/lib/components/input/WizardStepperView.d.ts +10 -1
  113. package/dist/lib/components/input/doc-path.d.ts +52 -0
  114. package/dist/lib/components/input/doc-path.test.d.ts +1 -0
  115. package/dist/lib/components/input/markdown-serialise.d.ts +23 -0
  116. package/dist/lib/components/input/select-position.test.d.ts +1 -0
  117. package/dist/lib/components/layout/PathBreadcrumbView.d.ts +67 -0
  118. package/dist/lib/components/layout/PathBreadcrumbView.test.d.ts +1 -0
  119. package/dist/lib/components/layout/SplitPanelView.d.ts +26 -1
  120. package/dist/lib/components/modal/ActionSheetView.d.ts +10 -1
  121. package/dist/lib/components/modal/AlertDialogView.d.ts +10 -1
  122. package/dist/lib/components/modal/BottomSheetView.d.ts +10 -1
  123. package/dist/lib/components/modal/CommandPaletteView.d.ts +10 -1
  124. package/dist/lib/components/modal/ContextMenuView.d.ts +19 -1
  125. package/dist/lib/components/modal/DrawerView.d.ts +10 -1
  126. package/dist/lib/components/modal/InfoPopupView.d.ts +13 -1
  127. package/dist/lib/components/modal/ModalView.d.ts +19 -3
  128. package/dist/lib/components/modal/NotificationCenterView.d.ts +10 -1
  129. package/dist/lib/components/modal/PopoverView.d.ts +10 -1
  130. package/dist/lib/components/modal/SheetView.d.ts +31 -0
  131. package/dist/lib/components/modal/SpotlightTourView.d.ts +10 -1
  132. package/dist/lib/components/modal/StackedToastDeckView.d.ts +10 -1
  133. package/dist/lib/components/modal/sheet-drag.d.ts +60 -0
  134. package/dist/lib/components/modal/sheet-drag.test.d.ts +1 -0
  135. package/dist/lib/components/tabs/PilledTabView.d.ts +10 -1
  136. package/dist/lib/components/tabs/TabBarView.d.ts +10 -1
  137. package/dist/lib/components/tabs/UnderlineTabsView.d.ts +41 -0
  138. package/dist/lib/components/testid.test.d.ts +1 -0
  139. package/dist/lib/core/IconSize.d.ts +37 -0
  140. package/dist/lib/core/TerminalPalette.d.ts +81 -0
  141. package/dist/lib/core/TerminalPaletteFile.d.ts +61 -0
  142. package/dist/lib/core/TerminalPaletteFile.test.d.ts +1 -0
  143. package/dist/lib/index.d.ts +65 -0
  144. package/dist/monaco-setup.js +589 -493
  145. package/dist/monaco-setup.js.map +1 -1
  146. package/dist/style.css +1 -1
  147. package/dist/theme/editor.js +1 -1
  148. package/package.json +5 -3
  149. package/dist/assets/DuiShowcase-CRLG9S4N.css +0 -1
  150. package/dist/chunks/EditorView.shell-DWGMOgiy.js +0 -510
  151. package/dist/chunks/EditorView.shell-DWGMOgiy.js.map +0 -1
  152. package/dist/chunks/daakia-icons-BpwUOdSO.js.map +0 -1
@@ -1,6 +1,15 @@
1
1
  import { DuiSize, DuiRadius, DuiWidth, DuiFontStyle } from '../../core/DuiTypes';
2
2
  export type AIButtonAction = 'generate' | 'fuzz' | 'explain' | 'fix' | 'ask' | 'suggest';
3
3
  export interface AIButtonViewProps {
4
+ /**
5
+ * A stable hook for tests and automation.
6
+ *
7
+ * Lands on this component's root element as `data-testid`. Worth setting on
8
+ * anything a test drives: several dui inputs render a `contenteditable` div
9
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
10
+ * `getByRole` reliably finds.
11
+ */
12
+ testId?: string;
4
13
  action?: AIButtonAction;
5
14
  label?: string;
6
15
  onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
@@ -17,4 +26,4 @@ export interface AIButtonViewProps {
17
26
  color?: string;
18
27
  fontStyle?: DuiFontStyle;
19
28
  }
20
- export declare function AIButtonView({ action, label, onClick, loading, disabled, size, compact, accentColor, className, width, borderRadius, color, fontStyle, }: AIButtonViewProps): import("react").JSX.Element;
29
+ export declare function AIButtonView({ testId, action, label, onClick, loading, disabled, size, compact, accentColor, className, width, borderRadius, color, fontStyle, }: AIButtonViewProps): import("react").JSX.Element;
@@ -0,0 +1,42 @@
1
+ import { ReactNode } from 'react';
2
+ import { DuiSize, DuiRadius, DuiWidth, DuiFontStyle } from '../../core/DuiTypes';
3
+ export interface ActionButtonViewProps {
4
+ /**
5
+ * A stable hook for tests and automation.
6
+ *
7
+ * Lands on this component's root element as `data-testid`. Worth setting on
8
+ * anything a test drives: several dui inputs render a `contenteditable` div
9
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
10
+ * `getByRole` reliably finds.
11
+ */
12
+ testId?: string;
13
+ label?: ReactNode;
14
+ children?: ReactNode;
15
+ /**
16
+ * Rendered before the label.
17
+ *
18
+ * A function receives the size's own icon size, which is how it ends up
19
+ * identical to the sparkle on an `AIButtonView` beside it — passing a node
20
+ * with a hand-picked size is how two buttons in one row come to disagree by
21
+ * a pixel.
22
+ */
23
+ icon?: ReactNode | ((iconSize: number) => ReactNode);
24
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
25
+ disabled?: boolean;
26
+ title?: string;
27
+ /** Falls back to the DuiProvider size when omitted. */
28
+ size?: DuiSize;
29
+ /**
30
+ * The tone the fill, border and text are mixed from.
31
+ *
32
+ * Defaults to the provider's colour rather than to the AI accent: this
33
+ * button belongs to whatever surface it sits on.
34
+ */
35
+ accentColor?: string;
36
+ className?: string;
37
+ width?: DuiWidth;
38
+ borderRadius?: DuiRadius | number;
39
+ color?: string;
40
+ fontStyle?: DuiFontStyle;
41
+ }
42
+ export declare function ActionButtonView({ testId, label, children, icon, onClick, disabled, title, size, accentColor, className, width, borderRadius, color, fontStyle, }: ActionButtonViewProps): import("react").JSX.Element;
@@ -1,5 +1,14 @@
1
1
  import { DuiSize } from '../../core/DuiTypes';
2
2
  export interface BookmarkButtonViewProps {
3
+ /**
4
+ * A stable hook for tests and automation.
5
+ *
6
+ * Lands on this component's root element as `data-testid`. Worth setting on
7
+ * anything a test drives: several dui inputs render a `contenteditable` div
8
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
9
+ * `getByRole` reliably finds.
10
+ */
11
+ testId?: string;
3
12
  saved: boolean;
4
13
  onChange: (saved: boolean) => void;
5
14
  size?: DuiSize;
@@ -7,4 +16,4 @@ export interface BookmarkButtonViewProps {
7
16
  className?: string;
8
17
  }
9
18
  /** Animated bookmark/save toggle button. */
10
- export declare function BookmarkButtonView({ saved, onChange, size, color, className, }: BookmarkButtonViewProps): import("react").JSX.Element;
19
+ export declare function BookmarkButtonView({ testId, saved, onChange, size, color, className, }: BookmarkButtonViewProps): import("react").JSX.Element;
@@ -6,6 +6,15 @@ export interface FabAction {
6
6
  onClick: () => void;
7
7
  }
8
8
  export interface FabViewProps {
9
+ /**
10
+ * A stable hook for tests and automation.
11
+ *
12
+ * Lands on this component's root element as `data-testid`. Worth setting on
13
+ * anything a test drives: several dui inputs render a `contenteditable` div
14
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
15
+ * `getByRole` reliably finds.
16
+ */
17
+ testId?: string;
9
18
  icon?: ReactNode;
10
19
  /** Extended FAB: renders `label` beside the icon. */
11
20
  label?: string;
@@ -17,4 +26,4 @@ export interface FabViewProps {
17
26
  color?: string;
18
27
  className?: string;
19
28
  }
20
- export declare function FabView({ icon, label, onClick, actions, position, size, color, className, }: FabViewProps): import("react").JSX.Element;
29
+ export declare function FabView({ testId, icon, label, onClick, actions, position, size, color, className, }: FabViewProps): import("react").JSX.Element;
@@ -1,5 +1,14 @@
1
1
  import { DuiSize } from '../../core/DuiTypes';
2
2
  export interface FollowButtonViewProps {
3
+ /**
4
+ * A stable hook for tests and automation.
5
+ *
6
+ * Lands on this component's root element as `data-testid`. Worth setting on
7
+ * anything a test drives: several dui inputs render a `contenteditable` div
8
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
9
+ * `getByRole` reliably finds.
10
+ */
11
+ testId?: string;
3
12
  following: boolean;
4
13
  onChange: (following: boolean) => void;
5
14
  size?: DuiSize;
@@ -7,4 +16,4 @@ export interface FollowButtonViewProps {
7
16
  className?: string;
8
17
  }
9
18
  /** Follow/following state-toggle button — swaps label + style, "Unfollow" on hover while following. */
10
- export declare function FollowButtonView({ following, onChange, size, color, className, }: FollowButtonViewProps): import("react").JSX.Element;
19
+ export declare function FollowButtonView({ testId, following, onChange, size, color, className, }: FollowButtonViewProps): import("react").JSX.Element;
@@ -1,6 +1,15 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  import { DuiSize } from '../../core/DuiTypes';
3
3
  export interface HoldToConfirmViewProps {
4
+ /**
5
+ * A stable hook for tests and automation.
6
+ *
7
+ * Lands on this component's root element as `data-testid`. Worth setting on
8
+ * anything a test drives: several dui inputs render a `contenteditable` div
9
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
10
+ * `getByRole` reliably finds.
11
+ */
12
+ testId?: string;
4
13
  children: ReactNode;
5
14
  onConfirm: () => void;
6
15
  /** Hold duration in ms required to trigger. Default 900. */
@@ -11,4 +20,4 @@ export interface HoldToConfirmViewProps {
11
20
  style?: CSSProperties;
12
21
  }
13
22
  /** Press-and-hold with a radial fill that must complete before the destructive action fires. */
14
- export declare function HoldToConfirmView({ children, onConfirm, duration, size, color, className, style, }: HoldToConfirmViewProps): import("react").JSX.Element;
23
+ export declare function HoldToConfirmView({ testId, children, onConfirm, duration, size, color, className, style, }: HoldToConfirmViewProps): import("react").JSX.Element;
@@ -1,5 +1,14 @@
1
1
  import { DuiSize } from '../../core/DuiTypes';
2
2
  export interface LikeButtonViewProps {
3
+ /**
4
+ * A stable hook for tests and automation.
5
+ *
6
+ * Lands on this component's root element as `data-testid`. Worth setting on
7
+ * anything a test drives: several dui inputs render a `contenteditable` div
8
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
9
+ * `getByRole` reliably finds.
10
+ */
11
+ testId?: string;
3
12
  liked: boolean;
4
13
  onChange: (liked: boolean) => void;
5
14
  count?: number;
@@ -8,4 +17,4 @@ export interface LikeButtonViewProps {
8
17
  className?: string;
9
18
  }
10
19
  /** Animated heart/like toggle button — pop animation on like. */
11
- export declare function LikeButtonView({ liked, onChange, count, size, color, className, }: LikeButtonViewProps): import("react").JSX.Element;
20
+ export declare function LikeButtonView({ testId, liked, onChange, count, size, color, className, }: LikeButtonViewProps): import("react").JSX.Element;
@@ -2,6 +2,15 @@ import { CSSProperties } from 'react';
2
2
  import { DuiSize } from '../../core/DuiTypes';
3
3
  export type MorphIconPreset = 'play-pause' | 'menu-close' | 'sun-moon';
4
4
  export interface MorphingIconButtonViewProps {
5
+ /**
6
+ * A stable hook for tests and automation.
7
+ *
8
+ * Lands on this component's root element as `data-testid`. Worth setting on
9
+ * anything a test drives: several dui inputs render a `contenteditable` div
10
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
11
+ * `getByRole` reliably finds.
12
+ */
13
+ testId?: string;
5
14
  preset: MorphIconPreset;
6
15
  active: boolean;
7
16
  onClick: () => void;
@@ -11,4 +20,4 @@ export interface MorphingIconButtonViewProps {
11
20
  style?: CSSProperties;
12
21
  }
13
22
  /** The icon itself SVG-path-morphs between two states instead of a crossfade/swap. */
14
- export declare function MorphingIconButtonView({ preset, active, onClick, size, color, className, style, }: MorphingIconButtonViewProps): import("react").JSX.Element;
23
+ export declare function MorphingIconButtonView({ testId, preset, active, onClick, size, color, className, style, }: MorphingIconButtonViewProps): import("react").JSX.Element;
@@ -6,6 +6,15 @@ export interface SegmentedOption {
6
6
  icon?: ReactNode;
7
7
  }
8
8
  export interface SegmentedViewProps {
9
+ /**
10
+ * A stable hook for tests and automation.
11
+ *
12
+ * Lands on this component's root element as `data-testid`. Worth setting on
13
+ * anything a test drives: several dui inputs render a `contenteditable` div
14
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
15
+ * `getByRole` reliably finds.
16
+ */
17
+ testId?: string;
9
18
  options: SegmentedOption[];
10
19
  value: string;
11
20
  onChange: (id: string) => void;
@@ -14,4 +23,4 @@ export interface SegmentedViewProps {
14
23
  className?: string;
15
24
  style?: CSSProperties;
16
25
  }
17
- export declare function SegmentedView({ options, value, onChange, size, accentColor, className, style, }: SegmentedViewProps): import("react").JSX.Element;
26
+ export declare function SegmentedView({ testId, options, value, onChange, size, accentColor, className, style, }: SegmentedViewProps): import("react").JSX.Element;
@@ -1,5 +1,14 @@
1
1
  import { IconButtonSize } from './IconButtonView';
2
2
  export interface ThemeToggleViewProps {
3
+ /**
4
+ * A stable hook for tests and automation.
5
+ *
6
+ * Lands on this component's root element as `data-testid`. Worth setting on
7
+ * anything a test drives: several dui inputs render a `contenteditable` div
8
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
9
+ * `getByRole` reliably finds.
10
+ */
11
+ testId?: string;
3
12
  theme: 'dark' | 'light';
4
13
  onToggle: () => void;
5
14
  size?: IconButtonSize;
@@ -9,4 +18,4 @@ export interface ThemeToggleViewProps {
9
18
  }
10
19
  /** Sun/moon icon-swap button — no app-specific theme logic, just renders
11
20
  * the icon for the *current* theme and calls onToggle on click. */
12
- export declare function ThemeToggleView({ theme, onToggle, size, sunColor, moonColor, className, }: ThemeToggleViewProps): import("react").JSX.Element;
21
+ export declare function ThemeToggleView({ testId, theme, onToggle, size, sunColor, moonColor, className, }: ThemeToggleViewProps): import("react").JSX.Element;
@@ -1,6 +1,15 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { DuiSize } from '../../core/DuiTypes';
3
3
  export interface VoteWidgetViewProps {
4
+ /**
5
+ * A stable hook for tests and automation.
6
+ *
7
+ * Lands on this component's root element as `data-testid`. Worth setting on
8
+ * anything a test drives: several dui inputs render a `contenteditable` div
9
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
10
+ * `getByRole` reliably finds.
11
+ */
12
+ testId?: string;
4
13
  score: number;
5
14
  userVote: 'up' | 'down' | null;
6
15
  onVote: (vote: 'up' | 'down' | null) => void;
@@ -10,4 +19,4 @@ export interface VoteWidgetViewProps {
10
19
  style?: CSSProperties;
11
20
  }
12
21
  /** Upvote/downvote counter control. */
13
- export declare function VoteWidgetView({ score, userVote, onVote, size, color, className, style, }: VoteWidgetViewProps): import("react").JSX.Element;
22
+ export declare function VoteWidgetView({ testId, score, userVote, onVote, size, color, className, style, }: VoteWidgetViewProps): import("react").JSX.Element;
@@ -3,6 +3,15 @@ import { DuiSize } from '../../core/DuiTypes';
3
3
  /** `'xs'` is a sub-sm alias kept for dense protocol badges. */
4
4
  export type ChipViewSize = 'xs' | DuiSize;
5
5
  export interface ChipViewProps {
6
+ /**
7
+ * A stable hook for tests and automation.
8
+ *
9
+ * Lands on this component's root element as `data-testid`. Worth setting on
10
+ * anything a test drives: several dui inputs render a `contenteditable` div
11
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
12
+ * `getByRole` reliably finds.
13
+ */
14
+ testId?: string;
6
15
  label: string;
7
16
  /** Leading glyph — pass a DUI icon component (e.g. `<TargetGoalIcon size={12} />`),
8
17
  * never an emoji. Sized/colored by the caller; the chip just positions it. */
@@ -16,9 +25,31 @@ export interface ChipViewProps {
16
25
  /** true = rounded-full (default), false = token border-radius */
17
26
  rounded?: boolean;
18
27
  onClick?: () => void;
28
+ /**
29
+ * Makes the chip removable: a dismiss control **inside** the chip, after the
30
+ * label.
31
+ *
32
+ * Inside, not beside. A remove button placed next to the chip is a second
33
+ * object that has to be kept aligned to it, and it comes apart the moment the
34
+ * row wraps or the size changes — so the chip owns it.
35
+ */
36
+ onRemove?: () => void;
37
+ /** Screen-reader name for the dismiss control. Defaults to `Remove <label>`. */
38
+ removeLabel?: string;
39
+ /**
40
+ * Cap the label and end it with an ellipsis past that width.
41
+ *
42
+ * A tag, a filename or a header value can be arbitrarily long, and one long
43
+ * chip in a wrapping row otherwise stretches the whole way across and pushes
44
+ * every chip after it onto a line of its own. The full text stays in the
45
+ * tooltip, which is what makes truncating it safe.
46
+ */
47
+ maxLabelWidth?: number | string;
19
48
  /** Filled background instead of translucent */
20
49
  active?: boolean;
21
50
  className?: string;
22
51
  style?: CSSProperties;
52
+ /** Tooltip. Defaults to the label. */
53
+ title?: string;
23
54
  }
24
- export declare function ChipView({ label, icon, color, bg, size, rounded, onClick, active, className, style, }: ChipViewProps): import("react").JSX.Element;
55
+ export declare function ChipView({ testId, label, icon, color, bg, size, rounded, onClick, onRemove, removeLabel, maxLabelWidth, active, className, style, title, }: ChipViewProps): import("react").JSX.Element;
@@ -1,6 +1,15 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { DuiSize } from '../../core/DuiTypes';
3
3
  export interface CommandChipViewProps {
4
+ /**
5
+ * A stable hook for tests and automation.
6
+ *
7
+ * Lands on this component's root element as `data-testid`. Worth setting on
8
+ * anything a test drives: several dui inputs render a `contenteditable` div
9
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
10
+ * `getByRole` reliably finds.
11
+ */
12
+ testId?: string;
4
13
  /** The command text — also what is copied to the clipboard on click. */
5
14
  command: string;
6
15
  /** DUI size — shares the SAME height/padding/font tokens as ButtonView, so a
@@ -25,4 +34,4 @@ export interface CommandChipViewProps {
25
34
  * the same `size`. Degrades to a plain, selectable pill when the Clipboard API
26
35
  * is unavailable (non-secure context).
27
36
  */
28
- export declare function CommandChipView({ command, size, color, copiedLabel, copyable, className, style, }: CommandChipViewProps): import("react").JSX.Element;
37
+ export declare function CommandChipView({ testId, command, size, color, copiedLabel, copyable, className, style, }: CommandChipViewProps): import("react").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export type BadgeChipSize = '2xs' | 'xs' | 'sm' | 'md';
3
+ export interface BadgeChipViewProps {
4
+ children: ReactNode;
5
+ /**
6
+ * The chip's colour, used for text, fill, border and the top highlight.
7
+ *
8
+ * One value rather than a palette per part: a chip whose border and text
9
+ * disagree stops reading as a single object, and every call site that has
10
+ * tried to tune them separately has produced something worse.
11
+ */
12
+ tone?: string;
13
+ size?: BadgeChipSize;
14
+ /**
15
+ * Drop the tint and the border, keeping only the text.
16
+ *
17
+ * For a chip in a dense row where a dozen of them would be more border than
18
+ * content — the colour still carries the meaning.
19
+ */
20
+ plain?: boolean;
21
+ title?: string;
22
+ className?: string;
23
+ style?: CSSProperties;
24
+ }
25
+ export declare function BadgeChipView({ children, tone, size, plain, title, className, style, }: BadgeChipViewProps): import("react").JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { CSSProperties } from 'react';
2
+ import { DonutSlice } from './hierarchy-layout';
3
+ export interface DonutViewProps {
4
+ items: {
5
+ name: string;
6
+ value: number;
7
+ color?: string;
8
+ meta?: unknown;
9
+ }[];
10
+ size?: number;
11
+ /** Ring thickness as a fraction of the radius. */
12
+ thickness?: number;
13
+ /** Slices past this are rolled into one named remainder. */
14
+ maxSlices?: number;
15
+ accentColor?: string;
16
+ format?: (value: number) => string;
17
+ /** Draw the name/value list beside the ring. */
18
+ legend?: boolean;
19
+ centerLabel?: string;
20
+ onSelect?: (slice: DonutSlice) => void;
21
+ className?: string;
22
+ style?: CSSProperties;
23
+ }
24
+ /**
25
+ * One level of a whole, as a ring.
26
+ *
27
+ * For the case a sunburst over-serves: a flat breakdown where the question is
28
+ * "how much of this is that", not "what is inside it". A leak report opens on
29
+ * one of these because the first thing worth knowing is whether the heap has
30
+ * one owner or fifty.
31
+ *
32
+ * The tail is rolled into a named remainder rather than dropped — see
33
+ * donutLayout. A gap in a chart that claims to be a whole reads as a bug.
34
+ */
35
+ export declare function DonutView({ items, size, thickness, maxSlices, accentColor, format, legend, centerLabel, onSelect, className, style, }: DonutViewProps): import("react").JSX.Element;
@@ -2,6 +2,20 @@ export interface EmptyStateAction {
2
2
  label: string;
3
3
  onClick: () => void;
4
4
  }
5
+ export interface EmptyStateHint {
6
+ /**
7
+ * The control this describes.
8
+ *
9
+ * A node rather than a string so it can be the ACTUAL icon. Naming a glyph
10
+ * in words — "eye", "arrow" — asks the reader to translate a description
11
+ * back into the thing they will click, which is exactly the work the icon
12
+ * was supposed to save. A key name like `Ctrl+K` is still fine here; the
13
+ * point is that the hint shows whatever the button shows.
14
+ */
15
+ key: React.ReactNode;
16
+ /** What it does. */
17
+ text: string;
18
+ }
5
19
  export interface EmptyStateViewProps {
6
20
  icon?: React.ReactNode;
7
21
  title: string;
@@ -10,5 +24,23 @@ export interface EmptyStateViewProps {
10
24
  accentColor?: string;
11
25
  compact?: boolean;
12
26
  className?: string;
27
+ /**
28
+ * Sit the icon in a tinted medallion instead of floating it.
29
+ *
30
+ * A small glyph at half opacity in the middle of a large empty pane reads as
31
+ * something that failed to load. Giving it a ground turns the same icon into
32
+ * a deliberate mark, which is the difference between "nothing here yet" and
33
+ * "something is broken" — and an empty state's whole job is to say the first
34
+ * one convincingly.
35
+ */
36
+ variant?: 'plain' | 'medallion';
37
+ /**
38
+ * What you could do next, as key/description pairs.
39
+ *
40
+ * An empty state is the one moment the reader has attention to spare and
41
+ * nothing to read, so it is the cheapest place to teach the two or three
42
+ * gestures the view depends on.
43
+ */
44
+ hints?: EmptyStateHint[];
13
45
  }
14
- export declare function EmptyStateView({ icon, title, message, action, accentColor, compact, className, }: EmptyStateViewProps): import("react").JSX.Element;
46
+ export declare function EmptyStateView({ icon, title, message, action, accentColor, compact, className, variant, hints, }: EmptyStateViewProps): import("react").JSX.Element;
@@ -0,0 +1,143 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { DuiSize } from '../../core/DuiTypes';
3
+ /**
4
+ * A directory listing — the rows a file manager shows.
5
+ *
6
+ * `FileListView` is a list of things being uploaded: it has progress bars and
7
+ * a remove button, and every row is going the same way. This is the other
8
+ * shape entirely — entries already exist somewhere, some are folders you
9
+ * descend into, some are files you act on, and some you can see but not touch.
10
+ *
11
+ * The row actions are supplied rather than fixed, because what you can do with
12
+ * a file depends on where it lives. A listing from a pod offers "open" and
13
+ * "download"; one from a bucket might offer a signed link; the table should not
14
+ * have to know. `show` on an action is how a row ends up with fewer buttons
15
+ * than its neighbour, which is the affordance doing the talking: a file with no
16
+ * open action is a file nothing here can render.
17
+ */
18
+ export type FileBrowserKind = 'file' | 'dir' | 'link' | 'other';
19
+ export type FileBrowserTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'accent';
20
+ export interface FileBrowserEntry {
21
+ id: string;
22
+ name: string;
23
+ kind: FileBrowserKind;
24
+ /** Rendered by `formatSize`; omit where a size is meaningless (a folder). */
25
+ size?: number;
26
+ /** Free text — whatever the source calls a date. Not parsed. */
27
+ modified?: string;
28
+ /** Secondary column for a folder: `142 items`, `38 files`. */
29
+ detail?: string;
30
+ /** Short type badge — `csv`, `properties`, `binary`. */
31
+ badge?: string;
32
+ badgeTone?: FileBrowserTone;
33
+ /** Where a symlink points. Shown after the name. */
34
+ linkTarget?: string;
35
+ /**
36
+ * Visible but untouchable, with the reason.
37
+ *
38
+ * Kept in the list rather than filtered out: a listing that silently shows
39
+ * one fewer entry than the directory holds is worse than one showing a
40
+ * locked row, because only the second tells you to go and look at why.
41
+ */
42
+ disabledReason?: string;
43
+ }
44
+ export interface FileBrowserAction {
45
+ id: string;
46
+ /** Rendered inside a square button; supply a sized icon. */
47
+ icon: ReactNode;
48
+ /** Tooltip and accessible name. Required — an icon with no name is a rebus. */
49
+ label: string;
50
+ tone?: FileBrowserTone;
51
+ /** Return false to leave this row without the action. */
52
+ show?: (entry: FileBrowserEntry) => boolean;
53
+ }
54
+ export interface FileBrowserViewProps {
55
+ entries: FileBrowserEntry[];
56
+ /** Selecting a row. Single click, the way a file manager behaves. */
57
+ onSelect?: (entry: FileBrowserEntry) => void;
58
+ /**
59
+ * Briefly mark one row.
60
+ *
61
+ * For arriving from somewhere else — a search result, a deep link — where
62
+ * the row you came for is one of forty and the eye has no idea which. The
63
+ * caller clears it; a highlight that never fades becomes a second, competing
64
+ * selection.
65
+ */
66
+ highlightId?: string;
67
+ /** Hide the size column. A search hit has no size to show, and a column of
68
+ * em dashes is worse than no column. */
69
+ showSize?: boolean;
70
+ /** Hide the modified column, for the same reason. */
71
+ showModified?: boolean;
72
+ /** Tighter rows and smaller chips, for a list inside a dialog. */
73
+ dense?: boolean;
74
+ /**
75
+ * The literal a search matched on, highlighted wherever it appears.
76
+ *
77
+ * Pass the plain text, not the glob or the regex that was typed — this is
78
+ * for the eye, and `*invoice*` highlighted literally would find nothing.
79
+ * When a row's name is a whole path, the directory in front of the filename
80
+ * dims at the same time: three weights on one line — dim ancestry, the
81
+ * matched run, the rest of the name — say WHY this row is a result, which a
82
+ * uniform grey path never does.
83
+ */
84
+ match?: string;
85
+ /** A folder was opened, or a file activated. */
86
+ onOpen?: (entry: FileBrowserEntry) => void;
87
+ /**
88
+ * Right-click on a row.
89
+ *
90
+ * The row actions are the two or three verbs worth a permanent icon; a file
91
+ * manager has always had more than that, and putting the rest on every row
92
+ * would bury the ones people use. The caller gets the entry and the event so
93
+ * it can put a menu where the pointer is.
94
+ */
95
+ onContextMenu?: (entry: FileBrowserEntry, e: React.MouseEvent) => void;
96
+ /**
97
+ * Right-click on the list itself, away from any row.
98
+ *
99
+ * The empty area below the last row is still the directory, and a file
100
+ * manager has always let you act on it there — "search here", "refresh",
101
+ * "download all of this". Without a handler the browser's own menu appears
102
+ * instead, offering Copy and Select All over a list that has neither.
103
+ */
104
+ onEmptyContextMenu?: (e: React.MouseEvent) => void;
105
+ actions?: FileBrowserAction[];
106
+ onAction?: (actionId: string, entry: FileBrowserEntry) => void;
107
+ /** Offer a `..` row. Omit `onParent` at the root rather than disabling it. */
108
+ onParent?: () => void;
109
+ selectedId?: string;
110
+ /**
111
+ * The wash on the selected row. Defaults to the neutral one below.
112
+ *
113
+ * Selection is a state, not an event, so it does not take the view's accent:
114
+ * a list where the selected row wears the same colour as every meaningful
115
+ * badge on it has nowhere left to go when something actually needs saying.
116
+ */
117
+ selectionColor?: string;
118
+ /** The wash on the arriving row. Defaults to the amber below. */
119
+ flashColor?: string;
120
+ /** Shown in place of the rows when there are none. */
121
+ emptyText?: ReactNode;
122
+ /**
123
+ * The listing is on its way.
124
+ *
125
+ * Draws column-aligned placeholder rows instead of the empty state, because
126
+ * "nothing here" and "not here yet" are different answers and only one of
127
+ * them is worth reading. The component draws it rather than the caller: the
128
+ * column widths are known here and nowhere else, and a skeleton whose
129
+ * columns do not line up with the table it precedes makes the real rows look
130
+ * like they jumped.
131
+ */
132
+ loading?: boolean;
133
+ /** A summary line under the rows — counts, the command that ran. */
134
+ footer?: ReactNode;
135
+ showHeader?: boolean;
136
+ size?: DuiSize;
137
+ accentColor?: string;
138
+ className?: string;
139
+ style?: CSSProperties;
140
+ }
141
+ /** Three significant figures, so a column of sizes lines up and reads. */
142
+ export declare function formatSize(bytes?: number): string;
143
+ export declare function FileBrowserView({ entries, onOpen, onContextMenu, onEmptyContextMenu, onSelect, highlightId, showSize, showModified, dense, actions, onAction, onParent, selectedId, match, selectionColor, flashColor, emptyText, loading, footer, showHeader, size, accentColor, className, style, }: FileBrowserViewProps): import("react").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export type FindingSeverity = 'critical' | 'warning' | 'info' | 'success';
3
+ export interface FindingCardViewProps {
4
+ severity: FindingSeverity;
5
+ title: ReactNode;
6
+ /** Small monospace label after the title — a rule id, a category, a source. */
7
+ meta?: ReactNode;
8
+ /** One or two sentences. What was found, with the numbers that matter. */
9
+ detail?: ReactNode;
10
+ /** Anything structured — a stack, a table, a chart. Sits below the detail. */
11
+ children?: ReactNode;
12
+ /** What to do about it. Rendered apart from the detail, because it is advice. */
13
+ remediation?: ReactNode;
14
+ /** Buttons on the right of the header — Ask AI, dismiss, open. */
15
+ actions?: ReactNode;
16
+ /** Colour override; otherwise the severity decides. */
17
+ color?: string;
18
+ className?: string;
19
+ style?: CSSProperties;
20
+ }
21
+ /**
22
+ * A diagnostic finding: something was detected, here is what and what to do.
23
+ *
24
+ * Distinct from a callout or a banner, which announce a state. A finding is the
25
+ * output of a rule, and it always has the same four parts in the same order —
26
+ * severity, what was found, the evidence, what to change. Fixing that order in
27
+ * a component is most of the value: a reader who has seen one finding knows
28
+ * where to look in every other one, and a rule author cannot accidentally bury
29
+ * the remediation.
30
+ *
31
+ * The severity paints a left edge rather than filling the card. A wall of
32
+ * findings where each is a block of tinted background is exhausting to read and
33
+ * makes the critical one no easier to spot than the rest; a 3px edge is enough
34
+ * to sort them by eye and leaves the content on the ordinary surface.
35
+ */
36
+ export declare function FindingCardView({ severity, title, meta, detail, children, remediation, actions, color, className, style, }: FindingCardViewProps): import("react").JSX.Element;
@@ -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;