@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
@@ -0,0 +1,496 @@
1
+ /**
2
+ * Fifty ways to draw the same chip.
3
+ *
4
+ * The chip started as one look — a raised face with a light top edge, a dark
5
+ * inner bottom edge and a drop shadow. That reads well alone in a dense
6
+ * monospace row and badly in a line of five, where every chip looks like a
7
+ * button you could press and none of them are. Rather than argue the point
8
+ * once and bake in a second opinion, the look is a value.
9
+ *
10
+ * Each entry here is DATA, not a style function, and that is deliberate: the
11
+ * same table drives the component and the gallery that photographs it, so the
12
+ * sheet you choose from cannot drift from what the app renders.
13
+ *
14
+ * ── What a skin may and may not decide ──
15
+ *
16
+ * It decides the surface: fill, border, corner, depth, and how the text is set
17
+ * — caps or not, mono or not, weight, tracking. It does NOT decide the chip's
18
+ * height or font size; those come from `size`, so a row of chips in different
19
+ * skins still lines up on one baseline. A skin that wanted to be taller would
20
+ * be a different size, not a different skin.
21
+ *
22
+ * ── Where they come from ──
23
+ *
24
+ * Several are modelled on chips people already know from the web — Material's
25
+ * assist and filter chips, MUI's filled and outlined, Ant's tag, a GitHub
26
+ * label, a Tailwind badge with its inset ring, an Atlassian lozenge. They are
27
+ * named for what they look like rather than who ships them, with the lineage
28
+ * in the note, because the point is to recognise the shape, not to clone a
29
+ * product.
30
+ */
31
+ /** Where the fill comes from, when it is not a percentage of the tone. */
32
+ export type ChipFill = number | 'neutral' | 'surface' | 'sunken';
33
+ export interface ChipSkin {
34
+ id: string;
35
+ /** What to call it in a picker. */
36
+ label: string;
37
+ /** One line: what it is, and where the shape is from. */
38
+ note: string;
39
+ fill?: ChipFill;
40
+ /** Border strength as a percentage of the tone. */
41
+ border?: number;
42
+ borderWidth?: number;
43
+ borderStyle?: 'solid' | 'dashed';
44
+ /**
45
+ * A saturated fill, as a percentage of the tone, with ink on top instead of
46
+ * the tone in the text. `ink` says which way the text goes.
47
+ */
48
+ solid?: number;
49
+ ink?: 'dark' | 'light';
50
+ /** An inset ring, the Tailwind badge trick: a border that costs no layout. */
51
+ ring?: number;
52
+ /** Corner. A number is px; `pill` is fully round; omitted takes the size's. */
53
+ radius?: number | 'pill';
54
+ /** Raised like the original, or sunk into the surface. */
55
+ depth?: 'raised' | 'inset' | 'lift';
56
+ /** Uppercase, and mono. Both default true — a label, not a sentence. */
57
+ caps?: boolean;
58
+ mono?: boolean;
59
+ weight?: number;
60
+ /** Letter-spacing in em. */
61
+ tracking?: number;
62
+ /** Added to the size's horizontal padding. */
63
+ padX?: number;
64
+ /** A tone-coloured dot before the text. */
65
+ dot?: boolean;
66
+ /** Square brackets around the text, which is the box. */
67
+ brackets?: boolean;
68
+ /** A rule under the text instead of a box around it. */
69
+ underline?: boolean;
70
+ /** A 2px tone edge on the left, square corners. */
71
+ rail?: boolean;
72
+ /** No box at all: the colour carries it. */
73
+ bare?: boolean;
74
+ }
75
+ export declare const BADGE_CHIP_SKINS: readonly [{
76
+ readonly id: "embossed";
77
+ readonly label: "Embossed";
78
+ readonly note: "The original: lit top edge, dark inner bottom, drop shadow.";
79
+ readonly fill: 20;
80
+ readonly border: 42;
81
+ readonly depth: "raised";
82
+ }, {
83
+ readonly id: "flat";
84
+ readonly label: "Flat tint";
85
+ readonly note: "Fill and text, nothing else.";
86
+ readonly fill: 22;
87
+ }, {
88
+ readonly id: "soft";
89
+ readonly label: "Soft";
90
+ readonly note: "A lighter tint, still boxed.";
91
+ readonly fill: 14;
92
+ readonly radius: 6;
93
+ }, {
94
+ readonly id: "quiet";
95
+ readonly label: "Quiet";
96
+ readonly note: "Soft fill with a soft hairline. No depth.";
97
+ readonly fill: 12;
98
+ readonly border: 28;
99
+ }, {
100
+ readonly id: "tint-strong";
101
+ readonly label: "Strong tint";
102
+ readonly note: "The tint turned up, no border.";
103
+ readonly fill: 34;
104
+ }, {
105
+ readonly id: "ghost";
106
+ readonly label: "Ghost";
107
+ readonly note: "A neutral wash; the tone lives in the text.";
108
+ readonly fill: "neutral";
109
+ }, {
110
+ readonly id: "surface";
111
+ readonly label: "Surface";
112
+ readonly note: "The panel surface with a hairline, like a small card.";
113
+ readonly fill: "surface";
114
+ readonly border: 22;
115
+ }, {
116
+ readonly id: "recessed";
117
+ readonly label: "Recessed";
118
+ readonly note: "A well in the surface rather than a raised face.";
119
+ readonly fill: "sunken";
120
+ readonly depth: "inset";
121
+ }, {
122
+ readonly id: "solid";
123
+ readonly label: "Solid";
124
+ readonly note: "Full tone with dark ink. The loudest of them.";
125
+ readonly solid: 100;
126
+ readonly ink: "dark";
127
+ }, {
128
+ readonly id: "solid-soft";
129
+ readonly label: "Solid, softened";
130
+ readonly note: "The tone at three quarters.";
131
+ readonly solid: 74;
132
+ readonly ink: "dark";
133
+ }, {
134
+ readonly id: "solid-muted";
135
+ readonly label: "Solid, muted";
136
+ readonly note: "Half tone with light text.";
137
+ readonly solid: 52;
138
+ readonly ink: "light";
139
+ }, {
140
+ readonly id: "solid-pill";
141
+ readonly label: "Solid pill";
142
+ readonly note: "Full tone, fully round.";
143
+ readonly solid: 100;
144
+ readonly ink: "dark";
145
+ readonly radius: "pill";
146
+ }, {
147
+ readonly id: "hairline";
148
+ readonly label: "Hairline";
149
+ readonly note: "Outline only, no fill.";
150
+ readonly border: 48;
151
+ }, {
152
+ readonly id: "outline-strong";
153
+ readonly label: "Strong outline";
154
+ readonly note: "A heavier rule, still hollow.";
155
+ readonly border: 62;
156
+ readonly borderWidth: 1.5;
157
+ }, {
158
+ readonly id: "outline-dashed";
159
+ readonly label: "Dashed outline";
160
+ readonly note: "Hollow and provisional — good for a draft state.";
161
+ readonly border: 55;
162
+ readonly borderStyle: "dashed";
163
+ }, {
164
+ readonly id: "outline-tinted";
165
+ readonly label: "Tinted outline";
166
+ readonly note: "A hairline over a faint wash.";
167
+ readonly fill: 9;
168
+ readonly border: 44;
169
+ }, {
170
+ readonly id: "ring";
171
+ readonly label: "Inset ring";
172
+ readonly note: "The border drawn inside, so the box never grows.";
173
+ readonly fill: 10;
174
+ readonly ring: 26;
175
+ readonly radius: 6;
176
+ }, {
177
+ readonly id: "rect";
178
+ readonly label: "Square";
179
+ readonly note: "No corner at all.";
180
+ readonly fill: 16;
181
+ readonly border: 30;
182
+ readonly radius: 0;
183
+ }, {
184
+ readonly id: "tag";
185
+ readonly label: "Tag";
186
+ readonly note: "Two-pixel corners. Terminal-ish.";
187
+ readonly fill: 16;
188
+ readonly border: 34;
189
+ readonly radius: 2;
190
+ }, {
191
+ readonly id: "rounded";
192
+ readonly label: "Rounded";
193
+ readonly note: "Six-pixel corners, the web default.";
194
+ readonly fill: 16;
195
+ readonly border: 30;
196
+ readonly radius: 6;
197
+ }, {
198
+ readonly id: "rounded-lg";
199
+ readonly label: "Rounded, large";
200
+ readonly note: "Ten pixels: a rounded rectangle, clearly.";
201
+ readonly fill: 16;
202
+ readonly border: 30;
203
+ readonly radius: 10;
204
+ }, {
205
+ readonly id: "pill";
206
+ readonly label: "Pill";
207
+ readonly note: "Fully round, tinted.";
208
+ readonly fill: 18;
209
+ readonly radius: "pill";
210
+ readonly padX: 2;
211
+ }, {
212
+ readonly id: "pill-outline";
213
+ readonly label: "Pill, outlined";
214
+ readonly note: "Fully round and hollow.";
215
+ readonly border: 46;
216
+ readonly radius: "pill";
217
+ readonly padX: 2;
218
+ }, {
219
+ readonly id: "pill-quiet";
220
+ readonly label: "Pill, quiet";
221
+ readonly note: "Round, faint fill, faint edge.";
222
+ readonly fill: 11;
223
+ readonly border: 26;
224
+ readonly radius: "pill";
225
+ readonly padX: 2;
226
+ }, {
227
+ readonly id: "mui-filled";
228
+ readonly label: "Filled, sentence case";
229
+ readonly note: "MUI’s filled chip: round, tinted, not shouted.";
230
+ readonly fill: 16;
231
+ readonly radius: "pill";
232
+ readonly padX: 3;
233
+ readonly caps: false;
234
+ readonly mono: false;
235
+ readonly weight: 500;
236
+ readonly tracking: 0;
237
+ }, {
238
+ readonly id: "mui-outlined";
239
+ readonly label: "Outlined, sentence case";
240
+ readonly note: "MUI’s outlined chip.";
241
+ readonly border: 40;
242
+ readonly radius: "pill";
243
+ readonly padX: 3;
244
+ readonly caps: false;
245
+ readonly mono: false;
246
+ readonly weight: 500;
247
+ readonly tracking: 0;
248
+ }, {
249
+ readonly id: "mui-solid";
250
+ readonly label: "Filled solid, sentence case";
251
+ readonly note: "MUI’s coloured chip, ink on tone.";
252
+ readonly solid: 100;
253
+ readonly ink: "dark";
254
+ readonly radius: "pill";
255
+ readonly padX: 3;
256
+ readonly caps: false;
257
+ readonly mono: false;
258
+ readonly weight: 500;
259
+ readonly tracking: 0;
260
+ }, {
261
+ readonly id: "m3-assist";
262
+ readonly label: "Assist";
263
+ readonly note: "Material 3 assist chip: 8px corner, surface, thin outline.";
264
+ readonly fill: "surface";
265
+ readonly border: 26;
266
+ readonly radius: 8;
267
+ readonly padX: 2;
268
+ readonly caps: false;
269
+ readonly mono: false;
270
+ readonly weight: 500;
271
+ readonly tracking: 0;
272
+ }, {
273
+ readonly id: "m3-filter";
274
+ readonly label: "Filter";
275
+ readonly note: "Material 3 filter chip: 8px corner, tinted, no outline.";
276
+ readonly fill: 20;
277
+ readonly radius: 8;
278
+ readonly padX: 2;
279
+ readonly caps: false;
280
+ readonly mono: false;
281
+ readonly weight: 500;
282
+ readonly tracking: 0;
283
+ }, {
284
+ readonly id: "m3-input";
285
+ readonly label: "Input";
286
+ readonly note: "Material 3 input chip: outlined over a faint wash.";
287
+ readonly fill: 8;
288
+ readonly border: 34;
289
+ readonly radius: 8;
290
+ readonly padX: 2;
291
+ readonly caps: false;
292
+ readonly mono: false;
293
+ readonly weight: 500;
294
+ readonly tracking: 0;
295
+ }, {
296
+ readonly id: "m3-elevated";
297
+ readonly label: "Elevated";
298
+ readonly note: "Material 3 elevated chip: a card shadow, no outline.";
299
+ readonly fill: "surface";
300
+ readonly radius: 8;
301
+ readonly depth: "lift";
302
+ readonly padX: 2;
303
+ readonly caps: false;
304
+ readonly mono: false;
305
+ readonly weight: 500;
306
+ readonly tracking: 0;
307
+ }, {
308
+ readonly id: "ant-tag";
309
+ readonly label: "Tag, light";
310
+ readonly note: "Ant Design’s tag: 2px corner, pale fill, tone border.";
311
+ readonly fill: 10;
312
+ readonly border: 38;
313
+ readonly radius: 2;
314
+ readonly caps: false;
315
+ readonly mono: false;
316
+ readonly weight: 400;
317
+ readonly tracking: 0;
318
+ }, {
319
+ readonly id: "github-label";
320
+ readonly label: "Issue label";
321
+ readonly note: "A GitHub label: round, tinted, tone border.";
322
+ readonly fill: 18;
323
+ readonly border: 30;
324
+ readonly radius: "pill";
325
+ readonly padX: 2;
326
+ readonly caps: false;
327
+ readonly mono: false;
328
+ readonly weight: 500;
329
+ readonly tracking: 0;
330
+ }, {
331
+ readonly id: "stripe-badge";
332
+ readonly label: "Dashboard badge";
333
+ readonly note: "Stripe’s badge: 4px corner, pale, quiet weight.";
334
+ readonly fill: 13;
335
+ readonly radius: 4;
336
+ readonly caps: false;
337
+ readonly mono: false;
338
+ readonly weight: 500;
339
+ readonly tracking: 0;
340
+ }, {
341
+ readonly id: "linear-badge";
342
+ readonly label: "Tracker badge";
343
+ readonly note: "Linear’s: surface fill, neutral edge, tone text.";
344
+ readonly fill: "surface";
345
+ readonly border: 18;
346
+ readonly radius: 4;
347
+ readonly caps: false;
348
+ readonly mono: false;
349
+ readonly weight: 500;
350
+ readonly tracking: 0;
351
+ }, {
352
+ readonly id: "shadcn-outline";
353
+ readonly label: "Outline, round";
354
+ readonly note: "shadcn’s outline badge.";
355
+ readonly border: 42;
356
+ readonly radius: "pill";
357
+ readonly padX: 2;
358
+ readonly caps: false;
359
+ readonly mono: false;
360
+ readonly weight: 500;
361
+ readonly tracking: 0;
362
+ }, {
363
+ readonly id: "shadcn-solid";
364
+ readonly label: "Default, round";
365
+ readonly note: "shadcn’s default badge, ink on tone.";
366
+ readonly solid: 100;
367
+ readonly ink: "dark";
368
+ readonly radius: "pill";
369
+ readonly padX: 2;
370
+ readonly caps: false;
371
+ readonly mono: false;
372
+ readonly weight: 500;
373
+ readonly tracking: 0;
374
+ }, {
375
+ readonly id: "bootstrap";
376
+ readonly label: "Badge, square-ish";
377
+ readonly note: "Bootstrap’s badge: 4px corner, solid.";
378
+ readonly solid: 92;
379
+ readonly ink: "dark";
380
+ readonly radius: 4;
381
+ readonly caps: false;
382
+ readonly mono: false;
383
+ readonly weight: 600;
384
+ readonly tracking: 0;
385
+ }, {
386
+ readonly id: "bootstrap-pill";
387
+ readonly label: "Badge, pill";
388
+ readonly note: "Bootstrap’s rounded-pill badge.";
389
+ readonly solid: 92;
390
+ readonly ink: "dark";
391
+ readonly radius: "pill";
392
+ readonly padX: 2;
393
+ readonly caps: false;
394
+ readonly mono: false;
395
+ readonly weight: 600;
396
+ readonly tracking: 0;
397
+ }, {
398
+ readonly id: "lozenge";
399
+ readonly label: "Lozenge";
400
+ readonly note: "Atlassian’s: tiny, bold, uppercase, 3px corner.";
401
+ readonly fill: 26;
402
+ readonly radius: 3;
403
+ readonly weight: 700;
404
+ readonly tracking: 0.06;
405
+ }, {
406
+ readonly id: "tailwind-badge";
407
+ readonly label: "Ring badge";
408
+ readonly note: "A Tailwind badge: pale fill, inset ring, 6px corner.";
409
+ readonly fill: 11;
410
+ readonly ring: 22;
411
+ readonly radius: 6;
412
+ readonly caps: false;
413
+ readonly mono: false;
414
+ readonly weight: 500;
415
+ readonly tracking: 0;
416
+ }, {
417
+ readonly id: "chakra-subtle";
418
+ readonly label: "Subtle";
419
+ readonly note: "Chakra’s subtle tag: 6px corner, tinted, sentence case.";
420
+ readonly fill: 18;
421
+ readonly radius: 6;
422
+ readonly caps: false;
423
+ readonly mono: false;
424
+ readonly weight: 500;
425
+ readonly tracking: 0;
426
+ }, {
427
+ readonly id: "notion-pill";
428
+ readonly label: "Property pill";
429
+ readonly note: "A Notion property: round, flat tint, no edge.";
430
+ readonly fill: 24;
431
+ readonly radius: "pill";
432
+ readonly padX: 2;
433
+ readonly caps: false;
434
+ readonly mono: false;
435
+ readonly weight: 400;
436
+ readonly tracking: 0;
437
+ }, {
438
+ readonly id: "dot";
439
+ readonly label: "Dot and text";
440
+ readonly note: "A state mark, then the word. No box.";
441
+ readonly bare: true;
442
+ readonly dot: true;
443
+ readonly weight: 600;
444
+ readonly tracking: 0.05;
445
+ }, {
446
+ readonly id: "dot-pill";
447
+ readonly label: "Dot in a pill";
448
+ readonly note: "The mark inside a neutral round box.";
449
+ readonly fill: "neutral";
450
+ readonly radius: "pill";
451
+ readonly padX: 3;
452
+ readonly dot: true;
453
+ readonly caps: false;
454
+ readonly mono: false;
455
+ readonly weight: 500;
456
+ readonly tracking: 0;
457
+ }, {
458
+ readonly id: "dot-outline";
459
+ readonly label: "Dot, outlined";
460
+ readonly note: "The mark inside a hollow round box.";
461
+ readonly border: 34;
462
+ readonly radius: "pill";
463
+ readonly padX: 3;
464
+ readonly dot: true;
465
+ readonly caps: false;
466
+ readonly mono: false;
467
+ readonly weight: 500;
468
+ readonly tracking: 0;
469
+ }, {
470
+ readonly id: "rail";
471
+ readonly label: "Left rail";
472
+ readonly note: "Square, with the tone as an edge down the left.";
473
+ readonly fill: 13;
474
+ readonly rail: true;
475
+ }, {
476
+ readonly id: "underline";
477
+ readonly label: "Underline";
478
+ readonly note: "A rule under the word instead of a box.";
479
+ readonly bare: true;
480
+ readonly underline: true;
481
+ }, {
482
+ readonly id: "bracketed";
483
+ readonly label: "Bracketed";
484
+ readonly note: "No box; the brackets are the box.";
485
+ readonly bare: true;
486
+ readonly brackets: true;
487
+ }, {
488
+ readonly id: "text";
489
+ readonly label: "Text only";
490
+ readonly note: "The colour, and nothing else.";
491
+ readonly bare: true;
492
+ }];
493
+ export type BadgeChipVariant = (typeof BADGE_CHIP_SKINS)[number]['id'];
494
+ /** Looked up by id, for the component and for anything that lists them. */
495
+ export declare const CHIP_SKIN_BY_ID: Record<string, ChipSkin>;
496
+ export declare const DEFAULT_CHIP_VARIANT: BadgeChipVariant;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Layout maths for the hierarchical charts.
3
+ *
4
+ * Kept apart from the components because this is the part that can be wrong in
5
+ * ways nobody sees: an arc that is two degrees short, a row whose widths do not
6
+ * sum to the parent, a depth that quietly drops the deepest frames. A chart
7
+ * that renders is not a chart that is correct, so the arithmetic is separated
8
+ * out where it can be checked.
9
+ */
10
+ /** A node in anything hierarchical — a heap, a stack, a filesystem. */
11
+ export interface HierarchyNode {
12
+ name: string;
13
+ /** Own size. Ignored when there are children — the parent is their sum. */
14
+ value?: number;
15
+ children?: HierarchyNode[];
16
+ /** Anything the caller wants back on the laid-out slice. */
17
+ meta?: unknown;
18
+ }
19
+ /** One laid-out ring segment. Angles are radians, clockwise from 12 o'clock. */
20
+ export interface SunburstSlice {
21
+ name: string;
22
+ value: number;
23
+ depth: number;
24
+ startAngle: number;
25
+ endAngle: number;
26
+ /** Share of the whole, 0–1. Useful for labelling and for hiding slivers. */
27
+ share: number;
28
+ meta?: unknown;
29
+ }
30
+ /** One laid-out flame-graph cell. x and width are fractions of the total, 0–1. */
31
+ export interface FlameCell {
32
+ name: string;
33
+ value: number;
34
+ depth: number;
35
+ x: number;
36
+ width: number;
37
+ meta?: unknown;
38
+ }
39
+ /**
40
+ * A node's total, computed once.
41
+ *
42
+ * A leaf is its own value; a parent is the sum of its children, and its own
43
+ * `value` is ignored rather than added. Adding both is the classic way to get
44
+ * a chart whose slices exceed the circle: every level double-counts, and the
45
+ * error compounds with depth so it looks fine at the top and absurd at the
46
+ * bottom.
47
+ */
48
+ export declare function totalOf(node: HierarchyNode): number;
49
+ /**
50
+ * Lay a hierarchy out as concentric rings.
51
+ *
52
+ * The root occupies the full circle and is not emitted — it is the hole in the
53
+ * middle, and drawing it would put a disc over the labels. Children divide
54
+ * their parent's arc in the order given, so a caller that wants them biggest
55
+ * first sorts before calling; this does not reorder, because for a stack the
56
+ * order IS the meaning.
57
+ *
58
+ * `minShare` drops slices too thin to see. They are dropped rather than
59
+ * merged into a sibling, and their arc is left empty: a "other" wedge invents
60
+ * a thing that is not in the data, and stretching the survivors to fill the
61
+ * gap would misstate every remaining share.
62
+ */
63
+ export declare function sunburstLayout(root: HierarchyNode, opts?: {
64
+ maxDepth?: number;
65
+ minShare?: number;
66
+ }): SunburstSlice[];
67
+ /**
68
+ * Lay a hierarchy out as a flame graph.
69
+ *
70
+ * Same arithmetic as the sunburst, unrolled: each level is a row, a child's
71
+ * width is its share of the parent's width, and children sit directly beneath
72
+ * the parent they came from. The root is emitted here — in a flame graph it is
73
+ * the base everything stands on, and leaving it out makes the first real row
74
+ * look like it floats.
75
+ */
76
+ export declare function flameLayout(root: HierarchyNode, opts?: {
77
+ maxDepth?: number;
78
+ minWidth?: number;
79
+ }): FlameCell[];
80
+ /** One laid-out donut segment. */
81
+ export interface DonutSlice {
82
+ name: string;
83
+ value: number;
84
+ startAngle: number;
85
+ endAngle: number;
86
+ share: number;
87
+ meta?: unknown;
88
+ }
89
+ /**
90
+ * A single ring, with the tail rolled up.
91
+ *
92
+ * Unlike the sunburst this DOES gather what it drops, into an explicit
93
+ * "other" slice — a flat breakdown of a whole is read as a whole, and a
94
+ * missing wedge there reads as a rendering bug rather than as a decision.
95
+ * The rolled-up slice is named, so nobody mistakes it for a real category.
96
+ */
97
+ export declare function donutLayout(items: {
98
+ name: string;
99
+ value: number;
100
+ meta?: unknown;
101
+ }[], opts?: {
102
+ maxSlices?: number;
103
+ otherLabel?: string;
104
+ }): DonutSlice[];
105
+ /**
106
+ * An SVG arc path for a ring segment.
107
+ *
108
+ * Written out rather than pulled from a library because it is twenty lines and
109
+ * the alternative is a dependency in a component library. The full-circle case
110
+ * is special: an arc from an angle back to the same angle draws nothing, so a
111
+ * lone 100% slice would vanish — which is exactly the case a donut of one
112
+ * dominant thing produces.
113
+ */
114
+ export declare function arcPath(cx: number, cy: number, rInner: number, rOuter: number, startAngle: number, endAngle: number): string;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Time-to-pixel maths for the lane charts.
3
+ *
4
+ * Separated for the same reason as the hierarchy layout: a chart that renders
5
+ * is not a chart that is correct. A segment one pixel wide when it should be
6
+ * forty, a lane whose last event falls off the right edge, two lanes that
7
+ * disagree about where "now" is — all of them look like a drawing and none of
8
+ * them look like a bug.
9
+ */
10
+ export interface Span {
11
+ /** Start, in whatever unit the caller is using. Milliseconds, usually. */
12
+ from: number;
13
+ to: number;
14
+ }
15
+ /** A span placed on the axis, as fractions of the width. */
16
+ export interface PlacedSpan {
17
+ x: number;
18
+ width: number;
19
+ /** True when the span was cut by the window rather than ending inside it. */
20
+ clippedStart: boolean;
21
+ clippedEnd: boolean;
22
+ }
23
+ /**
24
+ * The window every lane shares.
25
+ *
26
+ * Computed once from all lanes rather than per lane, because a shared axis is
27
+ * the entire point: two lanes scaled independently put simultaneous events in
28
+ * different places, which is worse than not drawing them at all.
29
+ */
30
+ export declare function windowOf(spans: Span[]): Span | null;
31
+ /**
32
+ * Place a span on the axis, clipped to the window.
33
+ *
34
+ * Returns null when the span is entirely outside, so a caller can drop it
35
+ * rather than draw a zero-width rectangle at the edge — which reads as an
36
+ * event that happened at the boundary and did not.
37
+ */
38
+ export declare function place(span: Span, win: Span): PlacedSpan | null;
39
+ /** A single instant on the axis, for a marker. */
40
+ export declare function placeAt(at: number, win: Span): number | null;
41
+ /**
42
+ * A polyline through a series, in fractions of width and height.
43
+ *
44
+ * y is inverted here — 0 is the top in screen space and the highest value
45
+ * should be highest on screen. Doing that at the call site is how a chart ends
46
+ * up upside down in one lane and not the others.
47
+ */
48
+ export declare function polyline(points: {
49
+ at: number;
50
+ value: number;
51
+ }[], win: Span, opts?: {
52
+ min?: number;
53
+ max?: number;
54
+ }): {
55
+ x: number;
56
+ y: number;
57
+ }[];
58
+ /** An SVG path for a polyline already in fractions, scaled to a box. */
59
+ export declare function pathFor(pts: {
60
+ x: number;
61
+ y: number;
62
+ }[], w: number, h: number): string;
63
+ /** The same polyline closed to the baseline, for an area fill. */
64
+ export declare function areaFor(pts: {
65
+ x: number;
66
+ y: number;
67
+ }[], w: number, h: number): string;
@@ -0,0 +1 @@
1
+ export {};