@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 { CSSProperties } from 'react';
2
2
  import { DuiSize } from '../../core/DuiTypes';
3
3
  export interface SpectrumSliderViewProps {
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
  value: number;
5
14
  min?: number;
6
15
  max?: number;
@@ -13,4 +22,4 @@ export interface SpectrumSliderViewProps {
13
22
  style?: CSSProperties;
14
23
  }
15
24
  /** The slider track is a live rendered gradient spectrum; the handle shows a magnified live-color preview bubble while dragging. */
16
- export declare function SpectrumSliderView({ value, min, max, onChange, gradient, width, size, className, style, }: SpectrumSliderViewProps): import("react").JSX.Element;
25
+ export declare function SpectrumSliderView({ testId, value, min, max, onChange, gradient, width, size, className, style, }: SpectrumSliderViewProps): import("react").JSX.Element;
@@ -1,6 +1,15 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { DuiSize, DuiRadius } from '../../core/DuiTypes';
3
3
  export interface StepperInputViewProps {
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
  value: number;
5
14
  onChange: (value: number) => void;
6
15
  min?: number;
@@ -13,4 +22,4 @@ export interface StepperInputViewProps {
13
22
  className?: string;
14
23
  style?: CSSProperties;
15
24
  }
16
- export declare function StepperInputView({ value, onChange, min, max, step, disabled, size, borderRadius, color, className, style, }: StepperInputViewProps): import("react").JSX.Element;
25
+ export declare function StepperInputView({ testId, value, onChange, min, max, step, disabled, size, borderRadius, color, className, style, }: StepperInputViewProps): import("react").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { CSSProperties } from 'react';
2
+ export interface SwatchOption {
3
+ id: string;
4
+ /** Shown as the tooltip and the accessible name — never as visible text. */
5
+ label: string;
6
+ /** The one colour that stands for this option. */
7
+ color: string;
8
+ }
9
+ export interface SwatchPickerViewProps {
10
+ /**
11
+ * A stable hook for tests and automation.
12
+ *
13
+ * Lands on this component's root element as `data-testid`. Worth setting on
14
+ * anything a test drives: several dui inputs render a `contenteditable` div
15
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
16
+ * `getByRole` reliably finds.
17
+ */
18
+ testId?: string;
19
+ options: SwatchOption[];
20
+ value: string;
21
+ onChange: (id: string) => void;
22
+ size?: number;
23
+ /**
24
+ * Draw each option's first letter inside its swatch.
25
+ *
26
+ * Colour alone is enough to CHOOSE by and not enough to NAME by: pointing
27
+ * someone at "the blue one" fails the moment two palettes are both blue, and
28
+ * a tooltip only helps a reader who already went looking. The initial makes
29
+ * the row sayable out loud without turning it back into a list of words.
30
+ *
31
+ * Needs room — below about 14px the letter is a smudge — so the swatch is
32
+ * given a floor when this is on.
33
+ */
34
+ initials?: boolean;
35
+ className?: string;
36
+ style?: CSSProperties;
37
+ }
38
+ export declare function SwatchPickerView({ testId, options, value, onChange, size, initials, className, style, }: SwatchPickerViewProps): import("react").JSX.Element;
@@ -8,6 +8,15 @@ export interface SwitchGroupItem {
8
8
  disabled?: boolean;
9
9
  }
10
10
  export interface SwitchGroupViewProps {
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;
11
20
  title?: string;
12
21
  items: SwitchGroupItem[];
13
22
  /** Set of currently-enabled item values. */
@@ -18,4 +27,4 @@ export interface SwitchGroupViewProps {
18
27
  className?: string;
19
28
  style?: CSSProperties;
20
29
  }
21
- export declare function SwitchGroupView({ title, items, checked, onChange, size, color, className, style, }: SwitchGroupViewProps): import("react").JSX.Element;
30
+ export declare function SwitchGroupView({ testId, title, items, checked, onChange, size, color, className, style, }: SwitchGroupViewProps): import("react").JSX.Element;
@@ -19,6 +19,15 @@ export interface TabItem {
19
19
  }
20
20
  export type TabVariant = 'pill' | 'underline' | 'chip' | 'picker';
21
21
  export interface TabViewProps {
22
+ /**
23
+ * A stable hook for tests and automation.
24
+ *
25
+ * Lands on this component's root element as `data-testid`. Worth setting on
26
+ * anything a test drives: several dui inputs render a `contenteditable` div
27
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
28
+ * `getByRole` reliably finds.
29
+ */
30
+ testId?: string;
22
31
  tabs: TabItem[];
23
32
  activeTab: string;
24
33
  onChange: (id: string) => void;
@@ -35,4 +44,4 @@ export interface TabViewProps {
35
44
  activeColor?: string;
36
45
  fontStyle?: DuiFontStyle;
37
46
  }
38
- export declare function TabView({ tabs, activeTab, onChange, size, variant, accentColor, className, width, borderRadius, color, activeColor, fontStyle, }: TabViewProps): import("react").JSX.Element;
47
+ export declare function TabView({ testId, tabs, activeTab, onChange, size, variant, accentColor, className, width, borderRadius, color, activeColor, fontStyle, }: TabViewProps): import("react").JSX.Element;
@@ -1,4 +1,13 @@
1
1
  export interface TagInputViewProps {
2
+ /**
3
+ * A stable hook for tests and automation.
4
+ *
5
+ * Lands on this component's root element as `data-testid`. Worth setting on
6
+ * anything a test drives: several dui inputs render a `contenteditable` div
7
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
8
+ * `getByRole` reliably finds.
9
+ */
10
+ testId?: string;
2
11
  tags: string[];
3
12
  onChange: (tags: string[]) => void;
4
13
  placeholder?: string;
@@ -7,4 +16,4 @@ export interface TagInputViewProps {
7
16
  disabled?: boolean;
8
17
  className?: string;
9
18
  }
10
- export declare function TagInputView({ tags, onChange, placeholder, accentColor, maxTags, disabled, className, }: TagInputViewProps): import("react").JSX.Element;
19
+ export declare function TagInputView({ testId, tags, onChange, placeholder, accentColor, maxTags, disabled, className, }: TagInputViewProps): import("react").JSX.Element;
@@ -28,6 +28,15 @@ export interface TextInputViewProps extends Omit<InputHTMLAttributes<HTMLInputEl
28
28
  /** When true: no border, transparent bg, no focus ring — for embedding inside containers that supply their own chrome */
29
29
  naked?: boolean;
30
30
  width?: DuiWidth;
31
+ /**
32
+ * Styles for the inner `<input>`, where `style` reaches only the box.
33
+ *
34
+ * `style` is the container's — its border, height and width — so a caller
35
+ * setting `fontSize` there was styling the wrapper and watching the text
36
+ * ignore it. A title being renamed in place wants its own type size while
37
+ * keeping everything else this control brings.
38
+ */
39
+ inputStyle?: React.CSSProperties;
31
40
  borderRadius?: DuiRadius | number;
32
41
  /** Text color override */
33
42
  color?: string;
@@ -10,9 +10,18 @@ export interface ThemeOption {
10
10
  };
11
11
  }
12
12
  export interface ThemeCardSelectorViewProps {
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
  options: ThemeOption[];
14
23
  value: string;
15
24
  onChange: (value: string) => void;
16
25
  className?: string;
17
26
  }
18
- export declare function ThemeCardSelectorView({ options, value, onChange, className, }: ThemeCardSelectorViewProps): import("react").JSX.Element;
27
+ export declare function ThemeCardSelectorView({ testId, options, value, onChange, className, }: ThemeCardSelectorViewProps): import("react").JSX.Element;
@@ -5,6 +5,15 @@ export interface TimeWheelValue {
5
5
  meridiem?: 'AM' | 'PM';
6
6
  }
7
7
  export interface TimeWheelViewProps {
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
  value: TimeWheelValue;
9
18
  onChange: (value: TimeWheelValue) => void;
10
19
  use24Hour?: boolean;
@@ -18,4 +27,4 @@ export interface TimeWheelViewProps {
18
27
  className?: string;
19
28
  style?: React.CSSProperties;
20
29
  }
21
- export declare function TimeWheelView({ value, onChange, use24Hour, minuteStep, size, width, borderRadius, color, visibleRows, disabled, className, style, }: TimeWheelViewProps): import("react").JSX.Element;
30
+ export declare function TimeWheelView({ testId, value, onChange, use24Hour, minuteStep, size, width, borderRadius, color, visibleRows, disabled, className, style, }: TimeWheelViewProps): import("react").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { SelectInputSize } from './SelectInputView';
2
+ /** The browser's own zone, e.g. `America/Chicago`. */
3
+ export declare function localTimeZone(): string;
4
+ /** The zones this runtime knows, common ones first. Falls back to a short list. */
5
+ export declare function timeZoneList(): string[];
6
+ /** How far `timeZone` sits from UTC at `date`, in milliseconds. */
7
+ export declare function zoneOffsetMs(date: Date, timeZone: string): number;
8
+ /**
9
+ * A wall-clock `YYYY-MM-DDTHH:mm` read in `timeZone`, as an instant.
10
+ *
11
+ * Twice, because the offset itself depends on the instant: the first pass uses
12
+ * the offset at the guessed time, and near a daylight-saving change that guess
13
+ * can land on the wrong side of the transition. Re-deriving the offset at the
14
+ * corrected instant settles it.
15
+ */
16
+ export declare function zonedToUtcMs(local: string, timeZone: string): number;
17
+ /** An instant as a `YYYY-MM-DDTHH:mm` wall-clock reading in `timeZone`. */
18
+ export declare function utcMsToZoned(ms: number, timeZone: string): string;
19
+ /** `UTC+05:30`, the way an offset is usually written. */
20
+ export declare function offsetLabel(timeZone: string, at?: Date): string;
21
+ export interface TimeZoneSelectViewProps {
22
+ /**
23
+ * A stable hook for tests and automation.
24
+ *
25
+ * Lands on this component's root element as `data-testid`. Worth setting on
26
+ * anything a test drives: several dui inputs render a `contenteditable` div
27
+ * with a decorative placeholder span, which neither `getByPlaceholder` nor
28
+ * `getByRole` reliably finds.
29
+ */
30
+ testId?: string;
31
+ value: string;
32
+ onChange: (timeZone: string) => void;
33
+ size?: SelectInputSize;
34
+ width?: string | number;
35
+ color?: string;
36
+ disabled?: boolean;
37
+ className?: string;
38
+ style?: React.CSSProperties;
39
+ }
40
+ export declare function TimeZoneSelectView({ testId, value, onChange, size, width, color, disabled, className, style, }: TimeZoneSelectViewProps): import("react").JSX.Element;
@@ -0,0 +1,51 @@
1
+ import { ReactNode, CSSProperties } from 'react';
2
+ export type TogglePillVariant = 'default' | 'go';
3
+ export interface TogglePillViewProps {
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
+ children: ReactNode;
14
+ /** A glyph before the label. */
15
+ icon?: ReactNode;
16
+ /** Lit in the accent, with a tinted ground and a matching border. */
17
+ active?: boolean;
18
+ /**
19
+ * A number after the label — how many filters are on, how many are selected.
20
+ *
21
+ * Bold rather than a second chip: a count inside its own pill turns one
22
+ * control into two objects, and a toolbar of them stops being scannable.
23
+ */
24
+ count?: number | string;
25
+ /**
26
+ * `go` fills the pill solid.
27
+ *
28
+ * For the one pill in a row that commits rather than toggles — Run, Apply,
29
+ * Export. It reads as a button among switches, which is what it is.
30
+ */
31
+ variant?: TogglePillVariant;
32
+ accentColor?: string;
33
+ disabled?: boolean;
34
+ title?: string;
35
+ onClick?: () => void;
36
+ className?: string;
37
+ style?: CSSProperties;
38
+ }
39
+ /**
40
+ * A toolbar pill: a small bordered control that is either on or off.
41
+ *
42
+ * The unit a dense toolbar is built from, where a segmented control would be
43
+ * wrong. A segmented control says "these are the choices, pick one"; a row of
44
+ * pills says "each of these is a thing you can turn on", which is what a view
45
+ * switch, a filter toggle and a grouping selector actually are — they are not
46
+ * one set, and boxing them into one implies a relationship that is not there.
47
+ *
48
+ * Off is a plain border on the panel, not a grey fill: a toolbar where every
49
+ * pill has a background is a wall, and the lit one no longer stands out.
50
+ */
51
+ export declare function TogglePillView({ testId, children, icon, active, count, variant, accentColor, disabled, title, onClick, className, style, }: TogglePillViewProps): import("react").JSX.Element;
@@ -2,6 +2,15 @@ import { DuiSize } from '../../core/DuiTypes';
2
2
  /** Accepts all 4 canonical sizes (maps to DuiToggle tokens). */
3
3
  export type ToggleSwitchSize = DuiSize;
4
4
  export interface ToggleSwitchViewProps {
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
  checked: boolean;
6
15
  onChange: (checked: boolean) => void;
7
16
  disabled?: boolean;
@@ -16,4 +25,4 @@ export interface ToggleSwitchViewProps {
16
25
  /** Label text color override */
17
26
  color?: string;
18
27
  }
19
- export declare function ToggleSwitchView({ checked, onChange, disabled, size, accentColor, label, labelPosition, className, activeColor, color, }: ToggleSwitchViewProps): import("react").JSX.Element;
28
+ export declare function ToggleSwitchView({ testId, checked, onChange, disabled, size, accentColor, label, labelPosition, className, activeColor, color, }: ToggleSwitchViewProps): import("react").JSX.Element;
@@ -5,6 +5,15 @@ export interface TransferItem {
5
5
  label: string;
6
6
  }
7
7
  export interface TransferListViewProps {
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
  items: TransferItem[];
9
18
  /** Values currently on the right ("selected") side. */
10
19
  value: string[];
@@ -18,4 +27,4 @@ export interface TransferListViewProps {
18
27
  className?: string;
19
28
  style?: CSSProperties;
20
29
  }
21
- export declare function TransferListView({ items, value, onChange, leftTitle, rightTitle, size, borderRadius, color, height, className, style, }: TransferListViewProps): import("react").JSX.Element;
30
+ export declare function TransferListView({ testId, items, value, onChange, leftTitle, rightTitle, size, borderRadius, color, height, className, style, }: TransferListViewProps): import("react").JSX.Element;
@@ -6,6 +6,15 @@ export interface TreeSelectNode {
6
6
  children?: TreeSelectNode[];
7
7
  }
8
8
  export interface TreeSelectViewProps {
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
  nodes: TreeSelectNode[];
10
19
  /** Checked node ids. */
11
20
  value: string[];
@@ -16,4 +25,4 @@ export interface TreeSelectViewProps {
16
25
  style?: CSSProperties;
17
26
  }
18
27
  /** Checkbox-driven hierarchical select — tri-state parent checkboxes over a folder-style tree. */
19
- export declare function TreeSelectView({ nodes, value, onChange, size, color, className, style, }: TreeSelectViewProps): import("react").JSX.Element;
28
+ export declare function TreeSelectView({ testId, nodes, value, onChange, size, color, className, style, }: TreeSelectViewProps): import("react").JSX.Element;
@@ -6,6 +6,15 @@ export interface WizardStep {
6
6
  description?: string;
7
7
  }
8
8
  export interface WizardStepperViewProps {
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
  steps: WizardStep[];
10
19
  activeStep: string;
11
20
  completedSteps?: string[];
@@ -16,4 +25,4 @@ export interface WizardStepperViewProps {
16
25
  style?: CSSProperties;
17
26
  }
18
27
  /** Multi-step form wizard progress header — numbered step indicator pattern. Distinct from `StepperInputView` (numeric +/-). */
19
- export declare function WizardStepperView({ steps, activeStep, completedSteps, onStepClick, size, color, className, style, }: WizardStepperViewProps): import("react").JSX.Element;
28
+ export declare function WizardStepperView({ testId, steps, activeStep, completedSteps, onStepClick, size, color, className, style, }: WizardStepperViewProps): import("react").JSX.Element;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The path to whatever the cursor is sitting on.
3
+ *
4
+ * Reading a value out of a response and then writing the expression that
5
+ * selects it is a transcription job: you can see `id` on screen and still have
6
+ * to count array indices and retype four ancestor names to say where it lives.
7
+ * Right-click, and the editor says it.
8
+ *
9
+ * ── Why a scanner rather than a parse ──
10
+ *
11
+ * `JSON.parse` gives a tree with no offsets, so it cannot answer "which node is
12
+ * at character 4,812". It also refuses the case this is most useful in: a body
13
+ * being edited is malformed for as long as you are typing it, and a feature
14
+ * that stops working while you type is one you stop reaching for. A scanner
15
+ * tracks the enclosing stack as it goes and can answer from wherever it got to,
16
+ * whether or not the rest of the document is well formed.
17
+ */
18
+ /**
19
+ * The JSONPath of the value at `offset`, in the `$.a.b[0].c` dialect every
20
+ * JSONPath implementation accepts.
21
+ *
22
+ * On a key, the path names that key — asking for the path of `"total"` and
23
+ * getting its parent's path back would be the wrong answer to the obvious
24
+ * question.
25
+ */
26
+ export declare function jsonPathAt(text: string, offset: number): string | undefined;
27
+ /**
28
+ * Every level from the root down to the cursor.
29
+ *
30
+ * The innermost path is the one usually wanted and not the one always wanted:
31
+ * standing on `id` you may want the object that holds it, or the array, or the
32
+ * collection above that — and each is a different assertion to write. Offering
33
+ * the whole chain costs one submenu and saves re-deriving an ancestor by hand.
34
+ */
35
+ export declare function jsonPathLevels(text: string, offset: number): string[];
36
+ /**
37
+ * The XPath of the element containing `offset`.
38
+ *
39
+ * Attributes and text nodes resolve to their element rather than to
40
+ * `/a/b/@id` or `/a/b/text()`: the element is what the path is nearly always
41
+ * wanted for, and a path that sometimes ends in an attribute is one you have
42
+ * to check before pasting.
43
+ */
44
+ export declare function xPathAt(text: string, offset: number): string | undefined;
45
+ /**
46
+ * Every enclosing element, outermost first.
47
+ *
48
+ * The same reason as JSON, and more often wanted: an XPath is usually written
49
+ * against a container — `/order/items` — rather than against the leaf you
50
+ * happened to right-click.
51
+ */
52
+ export declare function xPathLevels(text: string, offset: number): string[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ /**
2
+ * HTML back to Markdown.
3
+ *
4
+ * The rich view is a `contenteditable` rendering of the Markdown document, so
5
+ * every edit has to come back the other way. This is the half where fidelity is
6
+ * lost if it is lost at all, which is why it is written out rather than pulled
7
+ * in: a dependency here is a dependency whose idea of "close enough" you inherit.
8
+ *
9
+ * It handles exactly what the toolbar can produce and what `marked` renders from
10
+ * the Markdown it is given: headings, paragraphs, bold, italic, strikethrough,
11
+ * inline and block code, links, images, bullet, ordered and task lists,
12
+ * blockquotes, tables and rules. Anything else — raw HTML somebody pasted — is
13
+ * reduced to its text, because silently emitting HTML into a Markdown document
14
+ * makes the next round trip worse, not better.
15
+ */
16
+ /**
17
+ * Characters that would otherwise turn plain text into markup.
18
+ *
19
+ * Escaped only where they would ACTUALLY be markup, which is narrower than
20
+ * "at the start of a line" and the difference matters.
21
+ *
22
+ * CommonMark needs a space after the marker: `# Title` is a heading, `#14` is
23
+ * the text `#14`. Escaping the second produced `\#14`, which renders as `#14`
24
+ * and so looked right — while GitHub quietly stopped linking it to issue 14. A
25
+ * reference typed into a comment box arrived dead on github.com and dead in
26
+ * dkgh, for a heading nobody was writing.
27
+ *
28
+ * Same rule for the list markers: `- item` is a bullet, `-5` is a number.
29
+ * `>` is the exception — a blockquote needs no space, so it always escapes.
30
+ */
31
+ export declare function escapeText(text: string): string;
32
+ /**
33
+ * Turn a contenteditable's HTML into Markdown.
34
+ *
35
+ * Blank blocks are dropped and runs of blank lines collapsed to one, because a
36
+ * contenteditable emits `<p><br></p>` freely and a document that grows two
37
+ * blank lines every time you press Enter is not one anybody would keep using.
38
+ */
39
+ export declare function htmlToMarkdown(html: string): string;
@@ -0,0 +1,67 @@
1
+ import { DuiSize } from '../../core/DuiTypes';
2
+ /**
3
+ * A filesystem path, as a chain of jump targets or as the string it always was.
4
+ *
5
+ * `BreadcrumbView` is the right component for a trail of pages, where each
6
+ * label is prose and the whole thing is read rather than typed. A PATH is a
7
+ * different object: it has a canonical text form people already know, and the
8
+ * fastest way to reach one you know is to type it rather than click five
9
+ * ancestors. Splitting a slash-separated string is also not the caller's job
10
+ * to repeat everywhere it shows a path.
11
+ *
12
+ * So the control has two states over one value. Double-click — or press Enter
13
+ * on the focused chain — swaps the segments for an input holding the raw path;
14
+ * Enter commits, Escape puts the chain back untouched.
15
+ */
16
+ export interface PathBreadcrumbViewProps {
17
+ /** An absolute, slash-separated path. `/` renders as a single root segment. */
18
+ path: string;
19
+ /** A segment was clicked; the argument is the absolute path of that segment. */
20
+ onNavigate?: (path: string) => void;
21
+ /**
22
+ * A path was typed and committed.
23
+ *
24
+ * Omit to make the control read-only: with no handler there is nothing for
25
+ * editing to do, so the double-click does not arm and the affordance is not
26
+ * advertised.
27
+ */
28
+ onSubmit?: (path: string) => void;
29
+ /**
30
+ * Editing started or stopped.
31
+ *
32
+ * The chain sizes itself to its segments; the text field wants room to type
33
+ * a path into. Only the layout around this control can give it that room, so
34
+ * it has to be told which of the two it is currently holding.
35
+ */
36
+ onEditingChange?: (editing: boolean) => void;
37
+ /**
38
+ * Drive editing from outside, for a caller that owns a bigger hit area.
39
+ *
40
+ * The chain is as wide as its segments, which leaves most of the bar it sits
41
+ * in dead to a double-click — you have to hit the text. A caller that wants
42
+ * the whole strip to arm editing needs to be able to say so, and this makes
43
+ * the control optionally controlled: pass it and you own the state, omit it
44
+ * and it keeps its own.
45
+ */
46
+ editing?: boolean;
47
+ /** Label for the leading `/`. Some filesystems want a share or drive name. */
48
+ rootLabel?: string;
49
+ /** Collapse the middle into `…` past this many segments. Default 5. */
50
+ maxVisible?: number;
51
+ size?: DuiSize;
52
+ /** Colour of the segment the path currently ends at. */
53
+ color?: string;
54
+ className?: string;
55
+ placeholder?: string;
56
+ }
57
+ export declare function PathBreadcrumbView({ path, onNavigate, onSubmit, onEditingChange, editing: editingProp, rootLabel, maxVisible, size, color, className, placeholder, }: PathBreadcrumbViewProps): import("react").JSX.Element;
58
+ /**
59
+ * `/var/lib/app` into segments that each address a real directory.
60
+ *
61
+ * Exported because the caller almost always needs the same walk for its own
62
+ * navigation, and two implementations of "what is the parent of this" drift.
63
+ */
64
+ export declare function splitPath(path: string, rootLabel?: string): {
65
+ label: string;
66
+ path: string;
67
+ }[];
@@ -22,6 +22,31 @@ export interface SplitPanelViewProps {
22
22
  onResizeEnd?: (split: number) => void;
23
23
  /** Fired when the handle is clicked without dragging (e.g. to collapse/expand) */
24
24
  onHandleClick?: () => void;
25
+ /**
26
+ * Show only the first panel — no second panel, no handle, no divider.
27
+ *
28
+ * The reason to use this instead of rendering `first` on its own is that the
29
+ * tree keeps its shape. `first` stays the same element in the same position
30
+ * whether or not the second panel is showing, so React reconciles it rather
31
+ * than unmounting it.
32
+ *
33
+ * A caller that instead swaps between `<>{content}</>` and
34
+ * `<SplitPanelView first={content} />` moves that subtree to a new position
35
+ * on every toggle, so React tears it down and builds it again — and any
36
+ * state inside it goes with it: a parsed file, a scroll position, a
37
+ * half-filled form. It looks like a layout prop and behaves like a data one.
38
+ */
39
+ collapsed?: boolean;
40
+ /**
41
+ * Which panel `collapsed` hides. Defaults to the second.
42
+ *
43
+ * A split that can only collapse one side is half a component: a details pane
44
+ * on the right collapses second, a sidebar or a facet rail on the left
45
+ * collapses first. Without this a left-hand caller has to swap `first` and
46
+ * `second` — which puts the panel on the wrong side — or drop the split, and
47
+ * lose the state the collapse existed to preserve.
48
+ */
49
+ collapsedSide?: 'first' | 'second';
25
50
  /**
26
51
  * Tooltip shown on pill hover. Pass `null` to suppress.
27
52
  * Defaults to "Double-click to reset Alt+/ / Drag to resize" with a styled kbd badge.
@@ -30,4 +55,4 @@ export interface SplitPanelViewProps {
30
55
  style?: React.CSSProperties;
31
56
  className?: string;
32
57
  }
33
- export declare function SplitPanelView({ direction, first, second, defaultSplit, split: splitProp, minFirst, minSecond, minFirstPct, minSecondPct, accentColor, onResize, onResizeEnd, onHandleClick, pillTooltip, style, className, }: SplitPanelViewProps): import("react").JSX.Element;
58
+ export declare function SplitPanelView({ direction, first, second, defaultSplit, split: splitProp, minFirst, minSecond, minFirstPct, minSecondPct, accentColor, onResize, onResizeEnd, onHandleClick, pillTooltip, collapsed, collapsedSide, style, className, }: SplitPanelViewProps): import("react").JSX.Element;
@@ -8,6 +8,15 @@ export interface ActionSheetItem {
8
8
  onClick: () => void;
9
9
  }
10
10
  export interface ActionSheetViewProps {
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;
11
20
  open: boolean;
12
21
  onClose: () => void;
13
22
  title?: string;
@@ -16,4 +25,4 @@ export interface ActionSheetViewProps {
16
25
  size?: DuiSize;
17
26
  className?: string;
18
27
  }
19
- export declare function ActionSheetView({ open, onClose, title, items, cancelLabel, size, className, }: ActionSheetViewProps): import('react').ReactPortal | null;
28
+ export declare function ActionSheetView({ testId, open, onClose, title, items, cancelLabel, size, className, }: ActionSheetViewProps): import('react').ReactPortal | null;
@@ -1,5 +1,14 @@
1
1
  import { DuiSize } from '../../core/DuiTypes';
2
2
  export interface AlertDialogViewProps {
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
  open: boolean;
4
13
  title: string;
5
14
  message: string;
@@ -12,4 +21,4 @@ export interface AlertDialogViewProps {
12
21
  className?: string;
13
22
  }
14
23
  /** Pre-built confirm/cancel dialog with danger styling — the standard "Are you sure?" pattern. */
15
- export declare function AlertDialogView({ open, title, message, confirmLabel, cancelLabel, danger, onConfirm, onCancel, size, className, }: AlertDialogViewProps): import('react').ReactPortal | null;
24
+ export declare function AlertDialogView({ testId, open, title, message, confirmLabel, cancelLabel, danger, onConfirm, onCancel, size, className, }: AlertDialogViewProps): import('react').ReactPortal | null;