@thebuoyant-tsdev/mui-ts-library 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.de.md CHANGED
@@ -17,6 +17,8 @@ Eine typsichere React-Komponentenbibliothek auf Basis von **TypeScript** und **M
17
17
  | [`RichTextEditor`](#richtexteditor) | WYSIWYG-Editor (TipTap v3) mit Toolbar, Link-Dialog, Textfarbe, Hervorhebung, Wörter-Zähler, Vollbild-Modus, Markdown-Einfügen, Tabellen-Bearbeitung, Bild-Embed und Emoji-Picker | [Vollständiges Manual →](user-manuals/RichTextEditor.de.md) |
18
18
  | [`SqlEditor`](#sqleditor) | SQL-Code-Editor (CodeMirror 6) mit Syntax-Highlighting, Multi-Dialekt, Autocomplete, Linting und `Cmd+Enter`-Ausführen-Shortcut | [Vollständiges Manual →](user-manuals/SqlEditor.de.md) |
19
19
  | [`JsonEditor`](#jsoneditor) | JSON-Code-Editor (CodeMirror 6) mit Echtzeit-Validierung, Format- und Komprimieren-Schaltfläche sowie optionaler Minimap | [Vollständiges Manual →](user-manuals/JsonEditor.de.md) |
20
+ | [`SunburstChart`](#sunburstchart) | D3 v7 hierarchisches Chart — konzentrische Ringe, Ctrl+Click-Zoom, Donut-Modus, eigene Farben, MUI-Theme-Integration. Erste der D3-Chart-Familie. | [Vollständiges Manual →](user-manuals/SunburstChart.de.md) |
21
+ | [`ChordChart`](#chordchart) | D3 v7 Fluss-Chart — Arc-Gruppen verbunden durch Bänder, Hover-Highlight, gerichtet/ungerichtet, MUI-Theme-Integration | [Vollständiges Manual →](user-manuals/ChordChart.de.md) |
20
22
 
21
23
  ---
22
24
 
@@ -52,6 +54,8 @@ Die App wie gewohnt in MUI's `ThemeProvider` einschließen. `ConfirmDialog` ben
52
54
 
53
55
  ### ConfirmDialog
54
56
 
57
+ Ersetzt jedes manuelle `open/setOpen`-State-Muster durch einen einzigen `await confirm(...)`-Aufruf. Eliminiert Boilerplate bei Lösch-Bestätigungen, destruktiven Aktionen und allen Flows, die vor dem Fortfahren eine Nutzerzustimmung benötigen — mit optionalem Countdown-Auto-Confirm und Enter = Bestätigen.
58
+
55
59
  ```tsx
56
60
  import { ConfirmDialogProvider, useConfirm } from '@thebuoyant-tsdev/mui-ts-library';
57
61
 
@@ -72,6 +76,8 @@ if (ok) handleDelete();
72
76
 
73
77
  ### GanttChart
74
78
 
79
+ Interaktive Projekt-Timeline für Planung und Aufgaben-Tracking. Einsetzbar in Projektmanagement-Dashboards, Sprint-Planern und Ressourcenansichten — mit Drag & Drop, Größenänderung, Ctrl+Scroll-Zoom, Meilensteinen, Abhängigkeiten und Heute-Chip.
80
+
75
81
  ```tsx
76
82
  import { GanttChart } from '@thebuoyant-tsdev/mui-ts-library';
77
83
  import type { GanttTask } from '@thebuoyant-tsdev/mui-ts-library';
@@ -90,6 +96,8 @@ const tasks: GanttTask[] = [
90
96
 
91
97
  ### TagSelection
92
98
 
99
+ Multi-Select-Eingabe mit Autocomplete für Tag- und Label-Verwaltung. Ideal für Filter-UIs, Content-Tagging, Skill-Auswahl und alle Szenarien, in denen Nutzer aus einer vordefinierten Liste wählen oder neue Einträge erstellen sollen.
100
+
93
101
  ```tsx
94
102
  import { TagSelection } from '@thebuoyant-tsdev/mui-ts-library';
95
103
  import type { TagSelectionItem } from '@thebuoyant-tsdev/mui-ts-library';
@@ -108,6 +116,8 @@ const tags: TagSelectionItem[] = [
108
116
 
109
117
  ### PasswordStrengthMeter
110
118
 
119
+ Passwort-Eingabe mit Echtzeit-Stärke-Feedback. Konzipiert für Registrierungs- und Passwort-Änderungs-Flows, bei denen Nutzer zu sicheren Passwörtern geführt werden sollen — mit animiertem Stärke-Meter, segmentierten Balken und einer Live-Anforderungs-Checkliste.
120
+
111
121
  ```tsx
112
122
  import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
113
123
 
@@ -124,6 +134,8 @@ import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
124
134
 
125
135
  ### RichTextEditor
126
136
 
137
+ Vollständiger WYSIWYG-Editor für formatierte Langtexte. Ideal für CMS-Felder, E-Mail-Templates, Kommentarbereiche und alle Eingaben, die mehr als ein einfaches `<textarea>` benötigen — mit Toolbar, Tabellen, Bild-Embed, Emoji-Picker, Vollbild und Markdown-Einfügen.
138
+
127
139
  ```tsx
128
140
  import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
129
141
 
@@ -139,6 +151,8 @@ import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
139
151
 
140
152
  ### SqlEditor
141
153
 
154
+ SQL-Code-Editor mit Syntax-Highlighting, dialektbewusstem Autocomplete und Inline-Linting. Konzipiert für Developer-Tools, Datenbank-Clients und Admin-Panels — mit `Cmd+Enter`-Shortcut, Multi-Dialekt-Support (MySQL, PostgreSQL, SQLite, MSSQL) und Schema-basiertem Autocomplete.
155
+
142
156
  ```tsx
143
157
  import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
144
158
 
@@ -156,6 +170,8 @@ import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
156
170
 
157
171
  ### JsonEditor
158
172
 
173
+ JSON-Code-Editor mit Echtzeit-Validierung, Formatierung und optionaler Minimap. Ideal für Konfigurations-Panels, API-Explorer und Developer-Tools — mit sofortigen Fehler-Markierungen, Format- und Komprimieren-Buttons sowie Cursorpositionsanzeige.
174
+
159
175
  ```tsx
160
176
  import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
161
177
 
@@ -171,25 +187,98 @@ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
171
187
 
172
188
  ---
173
189
 
190
+ ### SunburstChart
191
+
192
+ Hierarchische Datenvisualisierung als konzentrische Ringe — Wurzel im Zentrum, jede Tiefenebene bildet einen Ring. Perfekt für Budget-Aufschlüsselungen, Org-Charts, Dateisystemgrößen und alle Daten, die sowohl hierarchisch als auch proportional sind. Ctrl+Click zum Drill-down in ein Segment.
193
+
194
+ ```tsx
195
+ import { SunburstChart } from '@thebuoyant-tsdev/mui-ts-library';
196
+ import type { SunburstChartData } from '@thebuoyant-tsdev/mui-ts-library';
197
+
198
+ const data: SunburstChartData = {
199
+ id: 'root', name: 'Budget',
200
+ children: [
201
+ { id: 'eng', name: 'Engineering', children: [
202
+ { id: 'fe', name: 'Frontend', value: 480 },
203
+ { id: 'be', name: 'Backend', value: 620 },
204
+ ]},
205
+ { id: 'sales', name: 'Vertrieb', value: 890 },
206
+ ],
207
+ };
208
+
209
+ <SunburstChart
210
+ data={data}
211
+ size={500}
212
+ onSegmentClick={(info) => console.log(info.path, info.value)}
213
+ />
214
+ ```
215
+
216
+ **Zoom:** `Ctrl+Click` → Drill-down · `Ctrl+Doppelklick` → Zoom out · `Escape` → Reset
217
+
218
+ → [Vollständige Dokumentation](user-manuals/SunburstChart.de.md)
219
+
220
+ ---
221
+
222
+ ### ChordChart
223
+
224
+ Fluss- und Beziehungsvisualisierung zwischen benannten Gruppen als Kreisdiagramm. Ideal für Abhängigkeitskarten, Migrationsflüsse, Handelsbeziehungen und alle Quelle→Ziel-Daten mit numerischem Gewicht. Hover über eine Gruppe hebt deren Verbindungen hervor, Klick löst Callbacks aus.
225
+
226
+ ```tsx
227
+ import { ChordChart } from '@thebuoyant-tsdev/mui-ts-library';
228
+ import type { ChordChartData } from '@thebuoyant-tsdev/mui-ts-library';
229
+
230
+ const data: ChordChartData[] = [
231
+ { source: 'Frontend', target: 'Backend', value: 45 },
232
+ { source: 'Backend', target: 'Frontend', value: 20 },
233
+ { source: 'Backend', target: 'DevOps', value: 35 },
234
+ ];
235
+
236
+ <ChordChart
237
+ data={data}
238
+ size={500}
239
+ onGroupClick={(info) => console.log(info.name, info.valueOut)}
240
+ onChordClick={(info) => console.log(info.source.name, '→', info.target.name)}
241
+ />
242
+ ```
243
+
244
+ → [Vollständige Dokumentation](user-manuals/ChordChart.de.md)
245
+
246
+ ---
247
+
174
248
  ## TypeScript
175
249
 
176
250
  Alle Typen und Defaults werden direkt exportiert — kein separates `@types/...`-Paket nötig.
177
251
 
178
252
  ```tsx
179
253
  import type {
180
- GanttTask,
181
- ConfirmDialogOptions,
182
- JsonEditorHighlightColors,
183
- SqlEditorProps,
184
- RichTextEditorTranslation,
185
- } from '@thebuoyant-tsdev/mui-ts-library';
186
- ```
254
+ // ConfirmDialog
255
+ ConfirmDialogOptions, ConfirmDialogSeverity,
187
256
 
188
- ---
257
+ // GanttChart
258
+ GanttTask, GanttTranslations, GanttTheme, GanttToolbarConfig,
259
+
260
+ // TagSelection
261
+ TagSelectionItem,
262
+
263
+ // PasswordStrengthMeter
264
+ CustomRequirement, StrengthResult,
265
+
266
+ // RichTextEditor
267
+ RichTextEditorToolbarConfig, RichTextEditorTranslation,
189
268
 
190
- ## Entwicklung
269
+ // SqlEditor
270
+ SqlEditorDialect, SqlEditorTranslation, SqlEditorToolbarConfig,
191
271
 
192
- Für lokales Setup, Storybook, Tests und Publish-Anleitung: [DEVELOPMENT.md](DEVELOPMENT.md).
272
+ // JsonEditor
273
+ JsonEditorHighlightColors, JsonEditorTranslation, JsonEditorToolbarConfig,
274
+
275
+ // SunburstChart
276
+ SunburstChartData, SunburstSegmentInfo, SunburstZoomInfo,
277
+
278
+ // ChordChart
279
+ ChordChartData, ChordGroupInfo, ChordInfo, ChordSortBy,
280
+ } from '@thebuoyant-tsdev/mui-ts-library';
281
+ ```
193
282
 
194
283
  ---
195
284
 
package/README.md CHANGED
@@ -17,6 +17,8 @@ A type-safe React component library built on **TypeScript** and **MUI (Material
17
17
  | [`RichTextEditor`](#richtexteditor) | WYSIWYG editor (TipTap v3) with toolbar, link dialog, text color, highlight, word count, fullscreen mode, Markdown paste, table editing, image embed, and emoji picker | [Full Manual →](user-manuals/RichTextEditor.md) |
18
18
  | [`SqlEditor`](#sqleditor) | SQL code editor (CodeMirror 6) with syntax highlighting, multi-dialect, autocomplete, linting, and `Cmd+Enter` execute shortcut | [Full Manual →](user-manuals/SqlEditor.md) |
19
19
  | [`JsonEditor`](#jsoneditor) | JSON code editor (CodeMirror 6) with real-time validation, Format, Compact buttons, and optional minimap | [Full Manual →](user-manuals/JsonEditor.md) |
20
+ | [`SunburstChart`](#sunburstchart) | D3 v7 hierarchical chart — concentric rings, Ctrl+Click zoom, donut mode, custom colors, MUI theme integration. First of the D3 Charts family. | [Full Manual →](user-manuals/SunburstChart.md) |
21
+ | [`ChordChart`](#chordchart) | D3 v7 flow chart — arc groups connected by ribbons, hover highlight, directed/undirected, MUI theme integration | [Full Manual →](user-manuals/ChordChart.md) |
20
22
 
21
23
  ---
22
24
 
@@ -52,6 +54,8 @@ Wrap your app in MUI's `ThemeProvider` as usual. `ConfirmDialog` additionally re
52
54
 
53
55
  ### ConfirmDialog
54
56
 
57
+ Replace every manual `open/setOpen` state pattern with a single `await confirm(...)` call. Eliminates boilerplate from delete confirmations, destructive actions, and any flow that needs user approval before proceeding — with optional countdown auto-confirm and `Enter` = confirm shortcut.
58
+
55
59
  ```tsx
56
60
  import { ConfirmDialogProvider, useConfirm } from '@thebuoyant-tsdev/mui-ts-library';
57
61
 
@@ -72,6 +76,8 @@ if (ok) handleDelete();
72
76
 
73
77
  ### GanttChart
74
78
 
79
+ An interactive project timeline for planning and tracking tasks. Use it in project management dashboards, sprint planners, or resource views where teams need to see schedules, milestones, dependencies, and progress at a glance — with drag & drop, resize, and Ctrl+Scroll zoom built in.
80
+
75
81
  ```tsx
76
82
  import { GanttChart } from '@thebuoyant-tsdev/mui-ts-library';
77
83
  import type { GanttTask } from '@thebuoyant-tsdev/mui-ts-library';
@@ -90,6 +96,8 @@ const tasks: GanttTask[] = [
90
96
 
91
97
  ### TagSelection
92
98
 
99
+ Multi-select input with autocomplete for tag and label management. Best suited for filter UIs, content tagging, skill selection, and any scenario where users pick from a predefined list or create new items on the fly.
100
+
93
101
  ```tsx
94
102
  import { TagSelection } from '@thebuoyant-tsdev/mui-ts-library';
95
103
  import type { TagSelectionItem } from '@thebuoyant-tsdev/mui-ts-library';
@@ -108,6 +116,8 @@ const tags: TagSelectionItem[] = [
108
116
 
109
117
  ### PasswordStrengthMeter
110
118
 
119
+ Password input with real-time strength feedback. Designed for registration flows and password-change screens where you want to guide users toward secure passwords with an animated strength bar, segmented segments, and a live requirements checklist.
120
+
111
121
  ```tsx
112
122
  import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
113
123
 
@@ -124,6 +134,8 @@ import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
124
134
 
125
135
  ### RichTextEditor
126
136
 
137
+ Full-featured WYSIWYG editor for long-form formatted content. Best for CMS fields, email templates, comment boxes, and any input that needs more than a plain `<textarea>` — with toolbar, tables, image embed, emoji picker, fullscreen, and Markdown paste support.
138
+
127
139
  ```tsx
128
140
  import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
129
141
 
@@ -139,6 +151,8 @@ import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
139
151
 
140
152
  ### SqlEditor
141
153
 
154
+ SQL code editor with syntax highlighting, dialect-aware autocomplete, and inline linting. Designed for developer tools, database clients, and admin panels where users write and execute SQL queries — with `Cmd+Enter` shortcut, multi-dialect support (MySQL, PostgreSQL, SQLite, MSSQL), and schema-based autocomplete.
155
+
142
156
  ```tsx
143
157
  import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
144
158
 
@@ -156,6 +170,8 @@ import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
156
170
 
157
171
  ### JsonEditor
158
172
 
173
+ JSON code editor with real-time validation, formatting, and an optional minimap. Ideal for configuration panels, API explorers, and developer tools where users need to view, edit, paste, or validate JSON — with instant error markers, Format and Compact buttons, and cursor-position display.
174
+
159
175
  ```tsx
160
176
  import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
161
177
 
@@ -171,25 +187,98 @@ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
171
187
 
172
188
  ---
173
189
 
190
+ ### SunburstChart
191
+
192
+ Hierarchical data visualization as concentric rings — root at the center, each depth level forms one ring. Perfect for budget breakdowns, org charts, file system usage, and any data that is both hierarchical and proportional. Ctrl+Click to drill down into any segment.
193
+
194
+ ```tsx
195
+ import { SunburstChart } from '@thebuoyant-tsdev/mui-ts-library';
196
+ import type { SunburstChartData } from '@thebuoyant-tsdev/mui-ts-library';
197
+
198
+ const data: SunburstChartData = {
199
+ id: 'root', name: 'Budget',
200
+ children: [
201
+ { id: 'eng', name: 'Engineering', children: [
202
+ { id: 'fe', name: 'Frontend', value: 480 },
203
+ { id: 'be', name: 'Backend', value: 620 },
204
+ ]},
205
+ { id: 'sales', name: 'Sales', value: 890 },
206
+ ],
207
+ };
208
+
209
+ <SunburstChart
210
+ data={data}
211
+ size={500}
212
+ onSegmentClick={(info) => console.log(info.path, info.value)}
213
+ />
214
+ ```
215
+
216
+ **Zoom:** `Ctrl+Click` → drill down · `Ctrl+Double-click` → zoom out · `Escape` → reset
217
+
218
+ → [Full documentation](user-manuals/SunburstChart.md)
219
+
220
+ ---
221
+
222
+ ### ChordChart
223
+
224
+ Flow and relationship visualization between named groups as a circular diagram. Ideal for dependency maps, migration flows, trade relationships, and any source→target data with a numeric weight. Hover any group to highlight its connections, click to trigger callbacks.
225
+
226
+ ```tsx
227
+ import { ChordChart } from '@thebuoyant-tsdev/mui-ts-library';
228
+ import type { ChordChartData } from '@thebuoyant-tsdev/mui-ts-library';
229
+
230
+ const data: ChordChartData[] = [
231
+ { source: 'Frontend', target: 'Backend', value: 45 },
232
+ { source: 'Backend', target: 'Frontend', value: 20 },
233
+ { source: 'Backend', target: 'DevOps', value: 35 },
234
+ ];
235
+
236
+ <ChordChart
237
+ data={data}
238
+ size={500}
239
+ onGroupClick={(info) => console.log(info.name, info.valueOut)}
240
+ onChordClick={(info) => console.log(info.source.name, '→', info.target.name)}
241
+ />
242
+ ```
243
+
244
+ → [Full documentation](user-manuals/ChordChart.md)
245
+
246
+ ---
247
+
174
248
  ## TypeScript
175
249
 
176
250
  All types and defaults are exported directly — no separate `@types/...` package needed.
177
251
 
178
252
  ```tsx
179
253
  import type {
180
- GanttTask,
181
- ConfirmDialogOptions,
182
- JsonEditorHighlightColors,
183
- SqlEditorProps,
184
- RichTextEditorTranslation,
185
- } from '@thebuoyant-tsdev/mui-ts-library';
186
- ```
254
+ // ConfirmDialog
255
+ ConfirmDialogOptions, ConfirmDialogSeverity,
187
256
 
188
- ---
257
+ // GanttChart
258
+ GanttTask, GanttTranslations, GanttTheme, GanttToolbarConfig,
259
+
260
+ // TagSelection
261
+ TagSelectionItem,
262
+
263
+ // PasswordStrengthMeter
264
+ CustomRequirement, StrengthResult,
265
+
266
+ // RichTextEditor
267
+ RichTextEditorToolbarConfig, RichTextEditorTranslation,
189
268
 
190
- ## Development
269
+ // SqlEditor
270
+ SqlEditorDialect, SqlEditorTranslation, SqlEditorToolbarConfig,
191
271
 
192
- For local setup, Storybook, tests, and publishing instructions, see [DEVELOPMENT.md](DEVELOPMENT.md).
272
+ // JsonEditor
273
+ JsonEditorHighlightColors, JsonEditorTranslation, JsonEditorToolbarConfig,
274
+
275
+ // SunburstChart
276
+ SunburstChartData, SunburstSegmentInfo, SunburstZoomInfo,
277
+
278
+ // ChordChart
279
+ ChordChartData, ChordGroupInfo, ChordInfo, ChordSortBy,
280
+ } from '@thebuoyant-tsdev/mui-ts-library';
281
+ ```
193
282
 
194
283
  ---
195
284
 
@@ -0,0 +1,5 @@
1
+ import { type ChordChartProps } from "./ChordChart.types";
2
+ export declare function ChordChart({ data, size, innerRadius, ringThickness, padAngle, ribbonPadAngle, sortSubgroups, sortChords, chartColors, showGroupLabels, labelOffset, ribbonOpacity, ribbonBlendMode, directed, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, onGroupClick, onChordClick, disabled, }: ChordChartProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare namespace ChordChart {
4
+ var displayName: string;
5
+ }
@@ -0,0 +1,80 @@
1
+ export type ChordSortBy = 'ascending' | 'descending' | 'none';
2
+ /** A single directed or undirected flow between two named groups */
3
+ export type ChordChartData = {
4
+ source: string;
5
+ target: string;
6
+ value: number;
7
+ };
8
+ /** Callback payload for a click on a group arc */
9
+ export type ChordGroupInfo = {
10
+ /** Group name */
11
+ name: string;
12
+ /** Zero-based index in the sorted names array */
13
+ index: number;
14
+ /** Total outgoing flow from this group */
15
+ valueOut: number;
16
+ /** Total incoming flow into this group */
17
+ valueIn: number;
18
+ };
19
+ /** Callback payload for a click on a ribbon (chord) */
20
+ export type ChordInfo = {
21
+ source: {
22
+ name: string;
23
+ index: number;
24
+ value: number;
25
+ };
26
+ target: {
27
+ name: string;
28
+ index: number;
29
+ value: number;
30
+ };
31
+ };
32
+ export type ChordChartTranslation = {
33
+ /** Shown when data is empty */
34
+ noData: string;
35
+ };
36
+ export declare const DEFAULT_CHORD_CHART_TRANSLATION: ChordChartTranslation;
37
+ export type ChordChartProps = {
38
+ /** Array of directed or undirected flows — `{ source, target, value }` */
39
+ data: ChordChartData[];
40
+ /** Width and height of the SVG in pixels (default: 500) */
41
+ size?: number;
42
+ /** Inner radius of the arc ring in px — auto-computed when omitted */
43
+ innerRadius?: number;
44
+ /** Thickness of the arc ring in px (default: 20) */
45
+ ringThickness?: number;
46
+ /** Padding angle between arc groups in radians (auto-computed when omitted) */
47
+ padAngle?: number;
48
+ /** Padding angle inside ribbons in radians (auto-computed when omitted) */
49
+ ribbonPadAngle?: number;
50
+ /** Sort order for subgroups within each arc (default: 'descending') */
51
+ sortSubgroups?: ChordSortBy;
52
+ /** Sort order for ribbons (default: 'descending') */
53
+ sortChords?: ChordSortBy;
54
+ /** Custom color palette — falls back to MUI theme palette when omitted */
55
+ chartColors?: string[];
56
+ /** Show group name labels outside the arc ring (default: true) */
57
+ showGroupLabels?: boolean;
58
+ /** Gap between arc outer edge and label text in px (default: 6) */
59
+ labelOffset?: number;
60
+ /** Opacity of ribbons — 0 to 1 (default: 0.75) */
61
+ ribbonOpacity?: number;
62
+ /** CSS mix-blend-mode for ribbons (default: 'multiply') */
63
+ ribbonBlendMode?: React.CSSProperties['mixBlendMode'];
64
+ /** When true, ribbons are directional arrows (default: true) */
65
+ directed?: boolean;
66
+ /** Decimal places for values in tooltip (default: 0) */
67
+ valueDecimalCount?: number;
68
+ /** Decimal separator (default: '.') */
69
+ valueDecimalSeparator?: string;
70
+ /** Thousands separator (default: ',') */
71
+ valueThousandsSeparator?: string;
72
+ /** Fired on click of a group arc */
73
+ onGroupClick?: (info: ChordGroupInfo, event: React.MouseEvent<SVGGElement>) => void;
74
+ /** Fired on click of a ribbon */
75
+ onChordClick?: (info: ChordInfo, event: React.MouseEvent<SVGPathElement>) => void;
76
+ /** Disables all interactions (default: false) */
77
+ disabled?: boolean;
78
+ /** Override translation strings */
79
+ translation?: Partial<ChordChartTranslation>;
80
+ };
@@ -0,0 +1,5 @@
1
+ import { type SunburstChartProps } from "./SunburstChart.types";
2
+ export declare function SunburstChart({ data, size, showSegmentLabels, innerRadius, sortBy, chartColors, showRootLabel, onSegmentClick, onZoomChange, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, disabled, }: SunburstChartProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare namespace SunburstChart {
4
+ var displayName: string;
5
+ }
@@ -0,0 +1,65 @@
1
+ export type SunburstSortBy = 'value' | 'name';
2
+ export type SunburstChartData = {
3
+ id: string;
4
+ name: string;
5
+ value?: number;
6
+ children?: SunburstChartData[];
7
+ };
8
+ export type SunburstSegmentInfo = {
9
+ /** Node ID — direct access, same as `data.id` */
10
+ id: string;
11
+ name: string;
12
+ /** D3 aggregate value — sum of all descendant leaf values */
13
+ value: number | null;
14
+ /** Percentage of root total — `(value / root.value) * 100` */
15
+ percentage: number;
16
+ depth: number;
17
+ /** Breadcrumb path from root — array of node names */
18
+ path: string[];
19
+ /** Breadcrumb path from root — array of node IDs (for backend linking) */
20
+ pathIds: string[];
21
+ childrenCount: number;
22
+ /** Original data node as passed to the chart */
23
+ data: SunburstChartData;
24
+ };
25
+ export type SunburstZoomInfo = {
26
+ /** The node that is now the focus center */
27
+ focusNode: SunburstSegmentInfo;
28
+ /** True when zoom has been reset to root */
29
+ isRoot: boolean;
30
+ };
31
+ export type SunburstChartTranslation = {
32
+ /** Shown when data has no children and no value */
33
+ noData: string;
34
+ };
35
+ export declare const DEFAULT_SUNBURST_CHART_TRANSLATION: SunburstChartTranslation;
36
+ export type SunburstChartProps = {
37
+ /** Hierarchical data tree — root node with optional nested children */
38
+ data: SunburstChartData;
39
+ /** Width and height of the SVG in pixels (default: 500) */
40
+ size?: number;
41
+ /** Show name labels on segments (default: true) */
42
+ showSegmentLabels?: boolean;
43
+ /** Inner hole radius in px — 0 = solid sunburst, > 0 = donut style (default: 0) */
44
+ innerRadius?: number;
45
+ /** Sort segments by value (largest first) or by name (default: 'value') */
46
+ sortBy?: SunburstSortBy;
47
+ /** Custom color palette for top-level segments — falls back to MUI theme palette */
48
+ chartColors?: string[];
49
+ /** Show the root node name in the center (default: true) */
50
+ showRootLabel?: boolean;
51
+ /** Fired on single-click on any segment */
52
+ onSegmentClick?: (info: SunburstSegmentInfo, event: React.MouseEvent<SVGPathElement | SVGCircleElement>) => void;
53
+ /** Fired when zoom focus changes (Ctrl+Click in/out, Escape reset) */
54
+ onZoomChange?: (zoom: SunburstZoomInfo) => void;
55
+ /** Decimal places for value display in tooltips (default: 0) */
56
+ valueDecimalCount?: number;
57
+ /** Decimal separator for values (default: '.') */
58
+ valueDecimalSeparator?: string;
59
+ /** Thousands separator for values (default: ',') */
60
+ valueThousandsSeparator?: string;
61
+ /** Disables all interactions (default: false) */
62
+ disabled?: boolean;
63
+ /** Override any translation string */
64
+ translation?: Partial<SunburstChartTranslation>;
65
+ };