@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.
Files changed (160) hide show
  1. package/dist/assets/DuiShowcase-BOtwgwbq.css +1 -0
  2. package/dist/assets/{DuiShowcase-CSkP-vdJ.js → DuiShowcase-Bl4Oi2Vw.js} +1377 -1359
  3. package/dist/assets/index-Dylj6yGs.css +10 -0
  4. package/dist/assets/{index-DQdlwLhi.js → index-ROymQLGX.js} +2 -2
  5. package/dist/chunks/{daakia-icons-BpwUOdSO.js → daakia-icons-DYLRx0Yi.js} +1096 -1053
  6. package/dist/chunks/daakia-icons-DYLRx0Yi.js.map +1 -0
  7. package/dist/chunks/doc-path-CS9-ZNht.js +696 -0
  8. package/dist/chunks/doc-path-CS9-ZNht.js.map +1 -0
  9. package/dist/icons/daakia-icons.d.ts +24 -0
  10. package/dist/index.html +2 -2
  11. package/dist/index.js +23515 -19113
  12. package/dist/index.js.map +1 -1
  13. package/dist/lib/components/button/AIButtonView.d.ts +10 -1
  14. package/dist/lib/components/button/ActionButtonView.d.ts +42 -0
  15. package/dist/lib/components/button/BookmarkButtonView.d.ts +10 -1
  16. package/dist/lib/components/button/FabView.d.ts +10 -1
  17. package/dist/lib/components/button/FollowButtonView.d.ts +10 -1
  18. package/dist/lib/components/button/HoldToConfirmView.d.ts +10 -1
  19. package/dist/lib/components/button/LikeButtonView.d.ts +10 -1
  20. package/dist/lib/components/button/MorphingIconButtonView.d.ts +10 -1
  21. package/dist/lib/components/button/SegmentedView.d.ts +10 -1
  22. package/dist/lib/components/button/ThemeToggleView.d.ts +10 -1
  23. package/dist/lib/components/button/VoteWidgetView.d.ts +10 -1
  24. package/dist/lib/components/chips/ChipView.d.ts +32 -1
  25. package/dist/lib/components/chips/CommandChipView.d.ts +10 -1
  26. package/dist/lib/components/display/BadgeChipView.d.ts +51 -0
  27. package/dist/lib/components/display/DonutView.d.ts +35 -0
  28. package/dist/lib/components/display/EmptyStateView.d.ts +33 -1
  29. package/dist/lib/components/display/FileBrowserView.d.ts +143 -0
  30. package/dist/lib/components/display/FileBrowserView.test.d.ts +1 -0
  31. package/dist/lib/components/display/FindingCardView.d.ts +36 -0
  32. package/dist/lib/components/display/FlameGraphView.d.ts +32 -0
  33. package/dist/lib/components/display/GroupHeaderView.d.ts +28 -0
  34. package/dist/lib/components/display/IssueCardSkeletonView.d.ts +28 -0
  35. package/dist/lib/components/display/IssueCardView.d.ts +40 -0
  36. package/dist/lib/components/display/LaneChartView.d.ts +46 -0
  37. package/dist/lib/components/display/LineDiffView.d.ts +25 -0
  38. package/dist/lib/components/display/LoadingStateView.d.ts +61 -0
  39. package/dist/lib/components/display/PriorityMarkView.d.ts +20 -0
  40. package/dist/lib/components/display/SetupOptionView.d.ts +56 -0
  41. package/dist/lib/components/display/SunburstView.d.ts +32 -0
  42. package/dist/lib/components/display/SwimlaneChartView.d.ts +48 -0
  43. package/dist/lib/components/display/TableSkeletonView.d.ts +34 -0
  44. package/dist/lib/components/display/badge-chip-skins.d.ts +496 -0
  45. package/dist/lib/components/display/badge-chip.test.d.ts +1 -0
  46. package/dist/lib/components/display/hierarchy-layout.d.ts +114 -0
  47. package/dist/lib/components/display/hierarchy-layout.test.d.ts +1 -0
  48. package/dist/lib/components/display/lane-scale.d.ts +67 -0
  49. package/dist/lib/components/display/lane-scale.test.d.ts +1 -0
  50. package/dist/lib/components/display/line-diff.d.ts +42 -0
  51. package/dist/lib/components/input/AvatarUploadView.d.ts +10 -1
  52. package/dist/lib/components/input/CalendarView.d.ts +10 -1
  53. package/dist/lib/components/input/CascaderView.d.ts +10 -1
  54. package/dist/lib/components/input/ChatInputView.d.ts +10 -1
  55. package/dist/lib/components/input/CheckboxView.d.ts +10 -1
  56. package/dist/lib/components/input/ChecklistView.d.ts +10 -1
  57. package/dist/lib/components/input/ColorPickerView.d.ts +10 -1
  58. package/dist/lib/components/input/ComboBoxView.d.ts +10 -1
  59. package/dist/lib/components/input/DateInputView.d.ts +10 -1
  60. package/dist/lib/components/input/DateRangePickerView.d.ts +10 -1
  61. package/dist/lib/components/input/DateTimeInputView.d.ts +10 -1
  62. package/dist/lib/components/input/DialKnobInputView.d.ts +10 -1
  63. package/dist/lib/components/input/DurationInputView.d.ts +10 -1
  64. package/dist/lib/components/input/EditorView.d.ts +8 -0
  65. package/dist/lib/components/input/EditorView.shell.d.ts +9 -1
  66. package/dist/lib/components/input/EmojiPickerView.d.ts +10 -1
  67. package/dist/lib/components/input/FeedbackWidgetView.d.ts +10 -1
  68. package/dist/lib/components/input/FileDropzoneView.d.ts +10 -1
  69. package/dist/lib/components/input/FilterInputView.d.ts +25 -0
  70. package/dist/lib/components/input/FloatingLabelInputView.d.ts +10 -1
  71. package/dist/lib/components/input/FormDataTableView.d.ts +10 -1
  72. package/dist/lib/components/input/GhostTypingPlaceholderView.d.ts +10 -1
  73. package/dist/lib/components/input/HiddenKeyValueItemView.d.ts +10 -1
  74. package/dist/lib/components/input/HighlightedInputView.d.ts +12 -1
  75. package/dist/lib/components/input/IconPickerView.d.ts +10 -1
  76. package/dist/lib/components/input/InlineEditTextView.d.ts +10 -1
  77. package/dist/lib/components/input/InviteInputView.d.ts +10 -1
  78. package/dist/lib/components/input/KeyValueTableRowView.d.ts +10 -1
  79. package/dist/lib/components/input/KeyValueTableView.d.ts +10 -1
  80. package/dist/lib/components/input/MarkdownEditorView.d.ts +30 -0
  81. package/dist/lib/components/input/MaskedInputView.d.ts +10 -1
  82. package/dist/lib/components/input/MentionInputView.d.ts +10 -1
  83. package/dist/lib/components/input/MergedInputView.d.ts +10 -1
  84. package/dist/lib/components/input/NpsSurveyView.d.ts +10 -1
  85. package/dist/lib/components/input/OtpInputView.d.ts +10 -1
  86. package/dist/lib/components/input/PhoneInputView.d.ts +10 -1
  87. package/dist/lib/components/input/PickerView.d.ts +10 -1
  88. package/dist/lib/components/input/PriorityPickerView.d.ts +10 -1
  89. package/dist/lib/components/input/RadioCardView.d.ts +10 -1
  90. package/dist/lib/components/input/RadioGroupView.d.ts +10 -1
  91. package/dist/lib/components/input/RangeSliderView.d.ts +10 -1
  92. package/dist/lib/components/input/RatingView.d.ts +10 -1
  93. package/dist/lib/components/input/RichTextToolbarView.d.ts +10 -1
  94. package/dist/lib/components/input/RoleSelectView.d.ts +10 -1
  95. package/dist/lib/components/input/SearchFieldView.d.ts +72 -0
  96. package/dist/lib/components/input/SegmentedControlView.d.ts +20 -1
  97. package/dist/lib/components/input/SelectInputView.d.ts +32 -1
  98. package/dist/lib/components/input/SelectTextInputView.d.ts +12 -1
  99. package/dist/lib/components/input/ShortcutRecorderView.d.ts +10 -1
  100. package/dist/lib/components/input/SliderView.d.ts +10 -1
  101. package/dist/lib/components/input/SpectrumSliderView.d.ts +10 -1
  102. package/dist/lib/components/input/StepperInputView.d.ts +10 -1
  103. package/dist/lib/components/input/SwatchPickerView.d.ts +38 -0
  104. package/dist/lib/components/input/SwitchGroupView.d.ts +10 -1
  105. package/dist/lib/components/input/TabView.d.ts +10 -1
  106. package/dist/lib/components/input/TagInputView.d.ts +10 -1
  107. package/dist/lib/components/input/TextInputView.d.ts +9 -0
  108. package/dist/lib/components/input/ThemeCardSelectorView.d.ts +10 -1
  109. package/dist/lib/components/input/TimeWheelView.d.ts +10 -1
  110. package/dist/lib/components/input/TimeZoneSelectView.d.ts +40 -0
  111. package/dist/lib/components/input/TimeZoneSelectView.test.d.ts +1 -0
  112. package/dist/lib/components/input/TogglePillView.d.ts +51 -0
  113. package/dist/lib/components/input/ToggleSwitchView.d.ts +10 -1
  114. package/dist/lib/components/input/TransferListView.d.ts +10 -1
  115. package/dist/lib/components/input/TreeSelectView.d.ts +10 -1
  116. package/dist/lib/components/input/WizardStepperView.d.ts +10 -1
  117. package/dist/lib/components/input/doc-path.d.ts +52 -0
  118. package/dist/lib/components/input/doc-path.test.d.ts +1 -0
  119. package/dist/lib/components/input/markdown-serialise.d.ts +39 -0
  120. package/dist/lib/components/input/markdown-serialise.test.d.ts +1 -0
  121. package/dist/lib/components/input/select-position.test.d.ts +1 -0
  122. package/dist/lib/components/layout/PathBreadcrumbView.d.ts +67 -0
  123. package/dist/lib/components/layout/PathBreadcrumbView.test.d.ts +1 -0
  124. package/dist/lib/components/layout/SplitPanelView.d.ts +26 -1
  125. package/dist/lib/components/modal/ActionSheetView.d.ts +10 -1
  126. package/dist/lib/components/modal/AlertDialogView.d.ts +10 -1
  127. package/dist/lib/components/modal/BottomSheetView.d.ts +10 -1
  128. package/dist/lib/components/modal/CommandPaletteView.d.ts +10 -1
  129. package/dist/lib/components/modal/ContextMenuView.d.ts +19 -1
  130. package/dist/lib/components/modal/DrawerView.d.ts +10 -1
  131. package/dist/lib/components/modal/InfoPopupView.d.ts +13 -1
  132. package/dist/lib/components/modal/ModalView.d.ts +19 -3
  133. package/dist/lib/components/modal/NotificationCenterView.d.ts +10 -1
  134. package/dist/lib/components/modal/PopoverView.d.ts +10 -1
  135. package/dist/lib/components/modal/SheetView.d.ts +31 -0
  136. package/dist/lib/components/modal/SpotlightTourView.d.ts +10 -1
  137. package/dist/lib/components/modal/StackedToastDeckView.d.ts +10 -1
  138. package/dist/lib/components/modal/sheet-drag.d.ts +60 -0
  139. package/dist/lib/components/modal/sheet-drag.test.d.ts +1 -0
  140. package/dist/lib/components/tabs/PilledTabView.d.ts +10 -1
  141. package/dist/lib/components/tabs/TabBarView.d.ts +10 -1
  142. package/dist/lib/components/tabs/UnderlineTabsView.d.ts +41 -0
  143. package/dist/lib/components/testid.test.d.ts +1 -0
  144. package/dist/lib/core/DuiContext.d.ts +4 -2
  145. package/dist/lib/core/DuiTypes.d.ts +8 -0
  146. package/dist/lib/core/IconSize.d.ts +45 -0
  147. package/dist/lib/core/TerminalPalette.d.ts +81 -0
  148. package/dist/lib/core/TerminalPaletteFile.d.ts +61 -0
  149. package/dist/lib/core/TerminalPaletteFile.test.d.ts +1 -0
  150. package/dist/lib/index.d.ts +70 -0
  151. package/dist/monaco-setup.js +589 -493
  152. package/dist/monaco-setup.js.map +1 -1
  153. package/dist/style.css +1 -1
  154. package/dist/theme/editor.js +1 -1
  155. package/package.json +5 -3
  156. package/dist/assets/DuiShowcase-CRLG9S4N.css +0 -1
  157. package/dist/assets/index-kr_HUJjf.css +0 -10
  158. package/dist/chunks/EditorView.shell-DWGMOgiy.js +0 -510
  159. package/dist/chunks/EditorView.shell-DWGMOgiy.js.map +0 -1
  160. package/dist/chunks/daakia-icons-BpwUOdSO.js.map +0 -1
@@ -1,6 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { DuiSize } from '../../core/DuiTypes';
3
3
  export interface BottomSheetViewProps {
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
  open: boolean;
5
14
  onClose: () => void;
6
15
  title?: string;
@@ -11,4 +20,4 @@ export interface BottomSheetViewProps {
11
20
  className?: string;
12
21
  }
13
22
  /** Mobile-style sheet — drag the handle down past a threshold, or fling it, to dismiss. */
14
- export declare function BottomSheetView({ open, onClose, title, children, heightRatio, size, className, }: BottomSheetViewProps): import('react').ReactPortal | null;
23
+ export declare function BottomSheetView({ testId, open, onClose, title, children, heightRatio, size, className, }: BottomSheetViewProps): import('react').ReactPortal | null;
@@ -10,6 +10,15 @@ export interface PaletteCommand {
10
10
  action: () => void;
11
11
  }
12
12
  export interface CommandPaletteViewProps {
13
+ /**
14
+ * A stable hook for tests and automation.
15
+ *
16
+ * Lands on this component's root element as `data-testid`. Worth setting on
17
+ * anything a test drives: several dui inputs render a `contenteditable` div
18
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
19
+ * `getByRole` reliably finds.
20
+ */
21
+ testId?: string;
13
22
  open: boolean;
14
23
  onClose: () => void;
15
24
  commands: PaletteCommand[];
@@ -18,4 +27,4 @@ export interface CommandPaletteViewProps {
18
27
  accentColor?: string;
19
28
  }
20
29
  /** Cmd-K style launcher: fuzzy filter + ↑/↓/Enter/Esc keyboard navigation. */
21
- export declare function CommandPaletteView({ open, onClose, commands, placeholder, emptyText, accentColor, }: CommandPaletteViewProps): import('react').ReactPortal | null;
30
+ export declare function CommandPaletteView({ testId, open, onClose, commands, placeholder, emptyText, accentColor, }: CommandPaletteViewProps): import('react').ReactPortal | null;
@@ -1,6 +1,15 @@
1
1
  export interface ContextMenuItem {
2
2
  id: string;
3
3
  label: string;
4
+ /**
5
+ * A line under the label, for a menu whose entries need explaining.
6
+ *
7
+ * Most items do not want one — a menu of verbs reads faster without a
8
+ * paragraph under each. It earns its place where choosing wrongly costs
9
+ * something and the label alone cannot say so: an action that pauses a
10
+ * process, or one that is unavailable and owes the reader a reason.
11
+ */
12
+ description?: string;
4
13
  icon?: React.ReactNode;
5
14
  iconColor?: string;
6
15
  shortcut?: string;
@@ -12,6 +21,15 @@ export interface ContextMenuItem {
12
21
  }
13
22
  export type ContextMenuWidth = 'auto' | 'sm' | 'md' | 'lg' | number;
14
23
  export interface ContextMenuViewProps {
24
+ /**
25
+ * A stable hook for tests and automation.
26
+ *
27
+ * Lands on this component's root element as `data-testid`. Worth setting on
28
+ * anything a test drives: several dui inputs render a `contenteditable` div
29
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
30
+ * `getByRole` reliably finds.
31
+ */
32
+ testId?: string;
15
33
  items: ContextMenuItem[];
16
34
  anchorEl: HTMLElement | null;
17
35
  open: boolean;
@@ -25,4 +43,4 @@ export interface ContextMenuViewProps {
25
43
  };
26
44
  align?: 'auto' | 'left' | 'right';
27
45
  }
28
- export declare function ContextMenuView({ items, anchorEl, open, onClose, width, rounded, matchAnchorWidth, position, align, }: ContextMenuViewProps): import('react').ReactPortal | null;
46
+ export declare function ContextMenuView({ testId, items, anchorEl, open, onClose, width, rounded, matchAnchorWidth, position, align, }: ContextMenuViewProps): import('react').ReactPortal | null;
@@ -2,6 +2,15 @@ import { ReactNode } from 'react';
2
2
  import { DuiSize } from '../../core/DuiTypes';
3
3
  export type DrawerEdge = 'left' | 'right' | 'top' | 'bottom';
4
4
  export interface DrawerViewProps {
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
  open: boolean;
6
15
  onClose: () => void;
7
16
  edge?: DrawerEdge;
@@ -12,4 +21,4 @@ export interface DrawerViewProps {
12
21
  duiSize?: DuiSize;
13
22
  className?: string;
14
23
  }
15
- export declare function DrawerView({ open, onClose, edge, title, children, size, duiSize, className, }: DrawerViewProps): import('react').ReactPortal | null;
24
+ export declare function DrawerView({ testId, open, onClose, edge, title, children, size, duiSize, className, }: DrawerViewProps): import('react').ReactPortal | null;
@@ -12,6 +12,18 @@ export interface InfoPopupViewProps {
12
12
  footer?: string;
13
13
  wikiLabel?: string;
14
14
  wikiHref?: string;
15
+ /**
16
+ * Open the docs in the host app instead of the browser.
17
+ *
18
+ * `wikiHref` assumes the documentation is a URL. An app whose docs are a
19
+ * panel of its own has nowhere to point one -- and inside an embedded host
20
+ * (a VS Code webview, an iframe with no top-level navigation) an anchor to
21
+ * an internal route does nothing at all, silently. Given this, the footer
22
+ * becomes a button and the app decides what "open the wiki" means.
23
+ *
24
+ * Takes precedence over `wikiHref` when both are given.
25
+ */
26
+ onWikiOpen?: () => void;
15
27
  width?: number;
16
28
  }
17
- export declare function InfoPopupView({ open, onClose, anchorEl, title, description, items, footer, wikiLabel, wikiHref, width, }: InfoPopupViewProps): import('react').ReactPortal | null;
29
+ export declare function InfoPopupView({ open, onClose, anchorEl, title, description, items, footer, wikiLabel, wikiHref, onWikiOpen, width, }: InfoPopupViewProps): import('react').ReactPortal | null;
@@ -1,13 +1,29 @@
1
- export type ModalSize = 'sm' | 'md' | 'lg' | 'xl';
1
+ export type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
2
2
  /**
3
3
  * 'popout' — centered overlay with backdrop, portalled to document.body (default)
4
4
  * 'inline' — bare card with no backdrop, no portal; parent controls positioning
5
5
  */
6
6
  export type ModalMode = 'popout' | 'inline';
7
7
  export interface ModalViewProps {
8
+ /**
9
+ * A stable hook for tests and automation.
10
+ *
11
+ * Lands on this component's root element as `data-testid`. Worth setting on
12
+ * anything a test drives: several dui inputs render a `contenteditable` div
13
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
14
+ * `getByRole` reliably finds.
15
+ */
16
+ testId?: string;
8
17
  open: boolean;
9
18
  onClose: () => void;
10
- title?: string;
19
+ /**
20
+ * Rendered in the header at title weight.
21
+ *
22
+ * A node rather than a string, so a header can carry two registers on one
23
+ * line — a subject and a quieter label for what you are doing to it — which
24
+ * a single styled string cannot express.
25
+ */
26
+ title?: React.ReactNode;
11
27
  /** Secondary text shown below the title in the header */
12
28
  subtitle?: React.ReactNode;
13
29
  /** Node rendered to the left of the title block — e.g. a coloured icon circle */
@@ -47,4 +63,4 @@ export interface ModalViewProps {
47
63
  /** Extra styles merged onto the body div (e.g. flex column layout for nested flex children) */
48
64
  bodyStyle?: React.CSSProperties;
49
65
  }
50
- export declare function ModalView({ open, onClose, title, subtitle, headerIcon, children, footerLeft, footerRight, size, showCloseIcon, headerColor, headerGradient, headerRight, noPadding, elevated, mode, maxHeight, height, bodyStyle, }: ModalViewProps): import("react").JSX.Element | null;
66
+ export declare function ModalView({ testId, open, onClose, title, subtitle, headerIcon, children, footerLeft, footerRight, size, showCloseIcon, headerColor, headerGradient, headerRight, noPadding, elevated, mode, maxHeight, height, bodyStyle, }: ModalViewProps): import("react").JSX.Element | null;
@@ -10,6 +10,15 @@ export interface NotificationItem {
10
10
  onClick?: () => void;
11
11
  }
12
12
  export interface NotificationCenterViewProps {
13
+ /**
14
+ * A stable hook for tests and automation.
15
+ *
16
+ * Lands on this component's root element as `data-testid`. Worth setting on
17
+ * anything a test drives: several dui inputs render a `contenteditable` div
18
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
19
+ * `getByRole` reliably finds.
20
+ */
21
+ testId?: string;
13
22
  notifications: NotificationItem[];
14
23
  onMarkAllRead?: () => void;
15
24
  size?: DuiSize;
@@ -17,4 +26,4 @@ export interface NotificationCenterViewProps {
17
26
  className?: string;
18
27
  }
19
28
  /** Bell icon + dropdown notification list, unread-count badge. */
20
- export declare function NotificationCenterView({ notifications, onMarkAllRead, size, color, className, }: NotificationCenterViewProps): import("react").JSX.Element;
29
+ export declare function NotificationCenterView({ testId, notifications, onMarkAllRead, size, color, className, }: NotificationCenterViewProps): import("react").JSX.Element;
@@ -2,6 +2,15 @@ import { ReactNode } from 'react';
2
2
  import { DuiSize, DuiRadius } from '../../core/DuiTypes';
3
3
  export type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
4
4
  export interface PopoverViewProps {
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
  open: boolean;
6
15
  onClose: () => void;
7
16
  anchorEl: HTMLElement | null;
@@ -17,4 +26,4 @@ export interface PopoverViewProps {
17
26
  * shared conceptually with SelectInputView's dropdown / InfoPopupView, but
18
27
  * exposed as a standalone component for any custom popover content.
19
28
  */
20
- export declare function PopoverView({ open, onClose, anchorEl, children, placement, size, borderRadius, color, className, }: PopoverViewProps): import('react').ReactPortal | null;
29
+ export declare function PopoverView({ testId, open, onClose, anchorEl, children, placement, size, borderRadius, color, className, }: PopoverViewProps): import('react').ReactPortal | null;
@@ -0,0 +1,31 @@
1
+ import { ReactNode } from 'react';
2
+ import { SheetEdge } from './sheet-drag';
3
+ export type { SheetEdge };
4
+ export interface SheetViewProps {
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;
14
+ open: boolean;
15
+ onClose: () => void;
16
+ /** Which edge it comes in from. */
17
+ edge?: SheetEdge;
18
+ /** Width for `left`/`right`, height for `top`/`bottom`. */
19
+ size?: number | string;
20
+ title?: ReactNode;
21
+ /** Replaces the whole title row, for a header that is more than a string. */
22
+ header?: ReactNode;
23
+ footer?: ReactNode;
24
+ /** The handle, and the drag with it. On by default. */
25
+ handle?: boolean;
26
+ /** Clicking the backdrop closes it. On by default. */
27
+ backdropClose?: boolean;
28
+ children?: ReactNode;
29
+ className?: string;
30
+ }
31
+ export declare function SheetView({ testId, open, onClose, edge, size, title, header, footer, handle, backdropClose, children, className, }: SheetViewProps): import('react').ReactPortal | null;
@@ -6,6 +6,15 @@ export interface SpotlightTourStep {
6
6
  content: string;
7
7
  }
8
8
  export interface SpotlightTourViewProps {
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
  open: boolean;
10
19
  steps: SpotlightTourStep[];
11
20
  stepIndex: number;
@@ -15,4 +24,4 @@ export interface SpotlightTourViewProps {
15
24
  size?: DuiSize;
16
25
  color?: string;
17
26
  }
18
- export declare function SpotlightTourView({ open, steps, stepIndex, onNext, onPrev, onClose, size, color, }: SpotlightTourViewProps): import('react').ReactPortal | null;
27
+ export declare function SpotlightTourView({ testId, open, steps, stepIndex, onNext, onPrev, onClose, size, color, }: SpotlightTourViewProps): import('react').ReactPortal | null;
@@ -6,6 +6,15 @@ export interface ToastDeckEntry {
6
6
  color?: string;
7
7
  }
8
8
  export interface StackedToastDeckViewProps {
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
  toasts: ToastDeckEntry[];
10
19
  onDismiss: (id: string) => void;
11
20
  size?: DuiSize;
@@ -14,4 +23,4 @@ export interface StackedToastDeckViewProps {
14
23
  style?: CSSProperties;
15
24
  }
16
25
  /** Toasts don't stack vertically — older ones shrink and recede behind the newest like a card deck; click to fan out. */
17
- export declare function StackedToastDeckView({ toasts, onDismiss, size, width, className, style, }: StackedToastDeckViewProps): import("react").JSX.Element;
26
+ export declare function StackedToastDeckView({ testId, toasts, onDismiss, size, width, className, style, }: StackedToastDeckViewProps): import("react").JSX.Element;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * The geometry behind a sheet you can throw away.
3
+ *
4
+ * Kept apart from the component because it is the half that can be wrong in a
5
+ * way nobody notices: a sheet that dismisses at the wrong moment feels
6
+ * unreliable rather than broken, and that is exactly the kind of thing a test
7
+ * catches and a demo does not.
8
+ */
9
+ export type SheetEdge = 'bottom' | 'top' | 'left' | 'right';
10
+ /** Which way a sheet on this edge travels when it leaves. */
11
+ export declare function axisOf(edge: SheetEdge): 'x' | 'y';
12
+ /**
13
+ * How far the pointer has dragged the sheet *towards its own edge*.
14
+ *
15
+ * Never negative. Dragging a bottom sheet upwards does not lift it off the
16
+ * bottom of the screen — the sheet is already against that edge, and letting it
17
+ * move would open a gap under it that has nothing in it. Pulling the other way
18
+ * is a no-op, which is what every native sheet does.
19
+ */
20
+ export declare function travel(edge: SheetEdge, dx: number, dy: number): number;
21
+ /** The way a sheet on this edge is pulled *away* from its edge — i.e. wider. */
22
+ export declare function opposite(edge: SheetEdge): SheetEdge;
23
+ /**
24
+ * How wide a sheet becomes when its handle is pulled away from the edge.
25
+ *
26
+ * The same handle does both, and which one it is doing is decided by direction
27
+ * alone: towards the edge it came from is "throw it back out", away from it is
28
+ * "I want more room". Nothing else on a sheet is a natural place to put a
29
+ * resize grip, and a second one beside the first would be two 4px targets
30
+ * doing different things a few pixels apart.
31
+ *
32
+ * Clamped at both ends: below `MIN_SIZE` the sheet is a strip with no content
33
+ * in it, and past `MAX_RATIO` of the window it has covered the thing it is a
34
+ * detail view *of*.
35
+ */
36
+ export declare const MIN_SIZE = 320;
37
+ export declare const MAX_RATIO = 0.96;
38
+ export declare function grownTo(from: number, pulled: number, viewport: number): number;
39
+ /** The `transform` for a sheet dragged `moved` pixels off its edge. */
40
+ export declare function offsetStyle(edge: SheetEdge, moved: number): string;
41
+ /** Past this share of its own size, a released sheet keeps going. */
42
+ export declare const DISMISS_RATIO = 0.3;
43
+ /**
44
+ * Fast enough that it was thrown, in pixels per millisecond.
45
+ *
46
+ * A flick is a short, fast drag — it never crosses the distance threshold, and
47
+ * without this it springs back, which reads as the sheet refusing to close.
48
+ * 0.5px/ms is about 500px in a second: brisk, not twitchy.
49
+ */
50
+ export declare const FLING_SPEED = 0.5;
51
+ /**
52
+ * Does the sheet leave, or spring back?
53
+ *
54
+ * Either far enough or fast enough. Requiring both would mean a slow deliberate
55
+ * drag all the way across still bounced back; requiring distance alone loses
56
+ * the flick, which is how people actually dismiss these.
57
+ */
58
+ export declare function shouldDismiss(moved: number, size: number, speed?: number): boolean;
59
+ /** Pixels per millisecond, guarding the zero-duration case. */
60
+ export declare function speedOf(moved: number, ms: number): number;
@@ -0,0 +1 @@
1
+ export {};
@@ -3,6 +3,15 @@ export interface PilledTab {
3
3
  label: string;
4
4
  }
5
5
  export interface PilledTabViewProps {
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
  tabs: PilledTab[];
7
16
  activeId: string;
8
17
  onChange: (id: string) => void;
@@ -16,4 +25,4 @@ export interface PilledTabViewProps {
16
25
  className?: string;
17
26
  style?: React.CSSProperties;
18
27
  }
19
- export declare function PilledTabView({ tabs, activeId, onChange, accentColor, mode, className, style, }: PilledTabViewProps): import("react").JSX.Element;
28
+ export declare function PilledTabView({ testId, tabs, activeId, onChange, accentColor, mode, className, style, }: PilledTabViewProps): import("react").JSX.Element;
@@ -33,6 +33,15 @@ export interface TabBarTab {
33
33
  preview?: ReactNode;
34
34
  }
35
35
  export interface TabBarViewProps {
36
+ /**
37
+ * A stable hook for tests and automation.
38
+ *
39
+ * Lands on this component's root element as `data-testid`. Worth setting on
40
+ * anything a test drives: several dui inputs render a `contenteditable` div
41
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
42
+ * `getByRole` reliably finds.
43
+ */
44
+ testId?: string;
36
45
  tabs: TabBarTab[];
37
46
  activeTabId: string;
38
47
  onTabClick: (id: string) => void;
@@ -53,4 +62,4 @@ export interface TabBarViewProps {
53
62
  height?: number;
54
63
  className?: string;
55
64
  }
56
- export declare function TabBarView({ tabs, activeTabId, onTabClick, onTabClose, onAddTab, onTabContextMenu, renamingId, renameValue, onRenameChange, onRenameCommit, onRenameCancel, accentColor, size, height, className, }: TabBarViewProps): import("react").JSX.Element;
65
+ export declare function TabBarView({ testId, tabs, activeTabId, onTabClick, onTabClose, onAddTab, onTabContextMenu, renamingId, renameValue, onRenameChange, onRenameCommit, onRenameCancel, accentColor, size, height, className, }: TabBarViewProps): import("react").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { ReactNode, CSSProperties } from 'react';
2
+ export interface UnderlineTab {
3
+ id: string;
4
+ label: string;
5
+ icon?: ReactNode;
6
+ /** A count beside the label — how many rows are behind this tab. */
7
+ count?: number | string;
8
+ disabled?: boolean;
9
+ }
10
+ export interface UnderlineTabsViewProps {
11
+ /**
12
+ * A stable hook for tests and automation.
13
+ *
14
+ * Lands on this component's root element as `data-testid`. Worth setting on
15
+ * anything a test drives: several dui inputs render a `contenteditable` div
16
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
17
+ * `getByRole` reliably finds.
18
+ */
19
+ testId?: string;
20
+ tabs: UnderlineTab[];
21
+ activeId: string;
22
+ onChange: (id: string) => void;
23
+ accentColor?: string;
24
+ /** Draw the hairline the tabs sit on. On by default. */
25
+ rule?: boolean;
26
+ className?: string;
27
+ style?: CSSProperties;
28
+ }
29
+ /**
30
+ * Sections within one view, marked by an underline.
31
+ *
32
+ * The second level of navigation, under a window's own tabs: Board, New issue,
33
+ * Insights, Repository. Underline rather than pill because these are places
34
+ * inside the same thing, and a row of filled pills competes with the window
35
+ * tabs above it for "which of these is the tab bar".
36
+ *
37
+ * A count sits inside the tab rather than beside it, and takes the accent only
38
+ * on the active one — so an inactive section still reports its size without
39
+ * pulling the eye off the section you are in.
40
+ */
41
+ export declare function UnderlineTabsView({ testId, tabs, activeId, onChange, accentColor, rule, className, style, }: UnderlineTabsViewProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -5,11 +5,11 @@ import { DuiConfig, DuiSize, DuiRadius, DuiWidth, DuiFontStyle } from './DuiType
5
5
  * Every prop is optional and falls back to its system default when omitted.
6
6
  *
7
7
  * @example
8
- * <DuiProvider size="sm" borderRadius="lg" activeColor="var(--color-primary)">
8
+ * <DuiProvider size="sm" borderRadius="lg" chipVariant="quiet">
9
9
  * <ButtonView>Save</ButtonView>
10
10
  * </DuiProvider>
11
11
  */
12
- export declare function DuiProvider({ size, width, borderRadius, color, defaultColor, activeColor, fontStyle, children, }: {
12
+ export declare function DuiProvider({ size, width, borderRadius, color, defaultColor, activeColor, fontStyle, chipVariant, children, }: {
13
13
  size?: DuiSize;
14
14
  width?: DuiWidth;
15
15
  borderRadius?: DuiRadius | number;
@@ -17,6 +17,8 @@ export declare function DuiProvider({ size, width, borderRadius, color, defaultC
17
17
  defaultColor?: string;
18
18
  activeColor?: string;
19
19
  fontStyle?: DuiFontStyle;
20
+ /** The look every `BadgeChipView` in the subtree takes. */
21
+ chipVariant?: string;
20
22
  children: ReactNode;
21
23
  }): import("react").JSX.Element;
22
24
  /**
@@ -26,4 +26,12 @@ export interface DuiConfig {
26
26
  activeColor?: string;
27
27
  /** Font style applied to all text within the DUI subtree. */
28
28
  fontStyle?: DuiFontStyle;
29
+ /**
30
+ * Which of `BadgeChipView`'s looks every chip takes.
31
+ *
32
+ * The one setting that changes a mark appearing in twenty screens at once,
33
+ * which is why it is here rather than argued at each call site. A chip that
34
+ * needs to differ still says `variant` itself.
35
+ */
36
+ chipVariant?: string;
29
37
  }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * How big an icon is, decided by what it is doing rather than by eye.
3
+ *
4
+ * A survey of one panel found fourteen distinct sizes across a hundred and
5
+ * sixty-nine icons. Most of those clustered sensibly — the same handful of
6
+ * numbers doing the same handful of jobs — but the tail was one-offs, and
7
+ * worse, the same SLOT sometimes rendered at two sizes depending on state: a
8
+ * tab whose icon was 12px normally and 11px when locked, so the row twitched
9
+ * as permissions changed.
10
+ *
11
+ * Naming the roles is what stops that. A number picked at the call site is a
12
+ * number nobody can check; a role can be read against its neighbours.
13
+ *
14
+ * The values are the ones already dominant in the product — this is a name for
15
+ * what was mostly happening, not a new scale imposed on it.
16
+ */
17
+ export declare const IconSize: {
18
+ /** Inside a badge or chip, where the text is 8px. */
19
+ readonly chip: 9;
20
+ /** Beside text in a dense row — a caption, a hint, a status word. */
21
+ readonly inline: 11;
22
+ /** The common one: row actions, menu entries, buttons. */
23
+ readonly action: 12;
24
+ /** A list item's kind marker, where the icon identifies the row. */
25
+ readonly item: 13;
26
+ /** The leading glyph of a file or table row, and headers of that weight. */
27
+ readonly row: 15;
28
+ /** Back arrows, tab-strip marks — navigation rather than action. */
29
+ readonly nav: 16;
30
+ /** A clickable square standing on its own, like a select-all box. */
31
+ readonly control: 19;
32
+ /** A state the panel is reporting, at the size of the thing it interrupts. */
33
+ readonly state: 20;
34
+ /** The empty-state medallion. */
35
+ readonly medallion: 22;
36
+ /**
37
+ * The subject of a screen that has nothing else on it.
38
+ *
39
+ * A panel-filling loading or empty state is not a row and should not be
40
+ * drawn like one: at `medallion` inside an 800px-tall empty tab the glyph
41
+ * reads as a typo rather than as the thing being waited for.
42
+ */
43
+ readonly hero: 34;
44
+ };
45
+ export type IconRole = keyof typeof IconSize;
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Terminal palettes, for both grounds.
3
+ *
4
+ * The sixteen ANSI slots are a compatibility table, not a design. Left at
5
+ * their defaults a shell renders `ls` in fluorescent green on pure blue, and
6
+ * `LS_COLORS` leans on exactly those slots — which is why an ordinary listing
7
+ * comes back looking like a 1988 BBS.
8
+ *
9
+ * ── What a palette owns, and what it does not ──
10
+ *
11
+ * It owns the sixteen colours and the FOREGROUND, because the two have to be
12
+ * chosen together: a palette's plain text is the tone everything else is
13
+ * contrasted against, and taking it from elsewhere gives you a bright white
14
+ * body under muted syntax, which reads as unfinished.
15
+ *
16
+ * It does NOT own the background. The terminal should look like part of the
17
+ * panel it sits in rather than a themed box dropped into it, so the ground
18
+ * comes from the surface and these adapt to it.
19
+ *
20
+ * ── Why each has a light variant ──
21
+ *
22
+ * Because the same colours do not work on both. Tokyo Night's `#9ece6a` green
23
+ * is legible on `#16161e` and nearly invisible on white; a light palette needs
24
+ * darker, more saturated ink for the same contrast. Every entry here is the
25
+ * published light counterpart of its dark one, not a mechanical darkening.
26
+ */
27
+ export interface TerminalAnsi {
28
+ foreground: string;
29
+ black: string;
30
+ red: string;
31
+ green: string;
32
+ yellow: string;
33
+ blue: string;
34
+ magenta: string;
35
+ cyan: string;
36
+ white: string;
37
+ brightBlack: string;
38
+ brightRed: string;
39
+ brightGreen: string;
40
+ brightYellow: string;
41
+ brightBlue: string;
42
+ brightMagenta: string;
43
+ brightCyan: string;
44
+ brightWhite: string;
45
+ cursor: string;
46
+ selectionBackground: string;
47
+ }
48
+ export interface TerminalPalette {
49
+ id: string;
50
+ label: string;
51
+ /** The colour that stands for this palette in a picker. */
52
+ swatch: string;
53
+ dark: TerminalAnsi;
54
+ light: TerminalAnsi;
55
+ /**
56
+ * The light half was computed, not authored.
57
+ *
58
+ * Worth carrying because it is worth SAYING: a derived variant is legible
59
+ * rather than designed, and a reader deciding whether to keep a theme should
60
+ * know which they are looking at.
61
+ */
62
+ lightDerived?: boolean;
63
+ }
64
+ /**
65
+ * Six, in the order they suit reading a shell.
66
+ *
67
+ * All are palettes people already recognise from their own editors, which is
68
+ * the point: a terminal in someone else's tool should be able to look like the
69
+ * one they configured for themselves.
70
+ */
71
+ export declare const TERMINAL_PALETTES: TerminalPalette[];
72
+ /**
73
+ * A palette resolved for the ground it will sit on.
74
+ *
75
+ * The background is passed in rather than chosen: whoever owns the surface
76
+ * knows what colour it is, and a terminal that picks its own would stop
77
+ * matching the panel the moment the panel changed.
78
+ */
79
+ export declare function resolveTerminalTheme(palette: TerminalPalette, mode: 'dark' | 'light', background: string): Record<string, string>;
80
+ /** Which variant a surface wants, from the colour of the surface itself. */
81
+ export declare function groundMode(background: string): 'dark' | 'light';