@thebuoyant-tsdev/mui-ts-library 2.2.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
@@ -18,6 +18,7 @@ Eine typsichere React-Komponentenbibliothek auf Basis von **TypeScript** und **M
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
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) |
21
22
 
22
23
  ---
23
24
 
@@ -53,6 +54,8 @@ Die App wie gewohnt in MUI's `ThemeProvider` einschließen. `ConfirmDialog` ben
53
54
 
54
55
  ### ConfirmDialog
55
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
+
56
59
  ```tsx
57
60
  import { ConfirmDialogProvider, useConfirm } from '@thebuoyant-tsdev/mui-ts-library';
58
61
 
@@ -73,6 +76,8 @@ if (ok) handleDelete();
73
76
 
74
77
  ### GanttChart
75
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
+
76
81
  ```tsx
77
82
  import { GanttChart } from '@thebuoyant-tsdev/mui-ts-library';
78
83
  import type { GanttTask } from '@thebuoyant-tsdev/mui-ts-library';
@@ -91,6 +96,8 @@ const tasks: GanttTask[] = [
91
96
 
92
97
  ### TagSelection
93
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
+
94
101
  ```tsx
95
102
  import { TagSelection } from '@thebuoyant-tsdev/mui-ts-library';
96
103
  import type { TagSelectionItem } from '@thebuoyant-tsdev/mui-ts-library';
@@ -109,6 +116,8 @@ const tags: TagSelectionItem[] = [
109
116
 
110
117
  ### PasswordStrengthMeter
111
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
+
112
121
  ```tsx
113
122
  import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
114
123
 
@@ -125,6 +134,8 @@ import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
125
134
 
126
135
  ### RichTextEditor
127
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
+
128
139
  ```tsx
129
140
  import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
130
141
 
@@ -140,6 +151,8 @@ import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
140
151
 
141
152
  ### SqlEditor
142
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
+
143
156
  ```tsx
144
157
  import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
145
158
 
@@ -157,6 +170,8 @@ import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
157
170
 
158
171
  ### JsonEditor
159
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
+
160
175
  ```tsx
161
176
  import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
162
177
 
@@ -174,6 +189,8 @@ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
174
189
 
175
190
  ### SunburstChart
176
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
+
177
194
  ```tsx
178
195
  import { SunburstChart } from '@thebuoyant-tsdev/mui-ts-library';
179
196
  import type { SunburstChartData } from '@thebuoyant-tsdev/mui-ts-library';
@@ -202,25 +219,66 @@ const data: SunburstChartData = {
202
219
 
203
220
  ---
204
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
+
205
248
  ## TypeScript
206
249
 
207
250
  Alle Typen und Defaults werden direkt exportiert — kein separates `@types/...`-Paket nötig.
208
251
 
209
252
  ```tsx
210
253
  import type {
211
- GanttTask,
212
- ConfirmDialogOptions,
213
- JsonEditorHighlightColors,
214
- SqlEditorProps,
215
- RichTextEditorTranslation,
216
- } from '@thebuoyant-tsdev/mui-ts-library';
217
- ```
254
+ // ConfirmDialog
255
+ ConfirmDialogOptions, ConfirmDialogSeverity,
218
256
 
219
- ---
257
+ // GanttChart
258
+ GanttTask, GanttTranslations, GanttTheme, GanttToolbarConfig,
259
+
260
+ // TagSelection
261
+ TagSelectionItem,
262
+
263
+ // PasswordStrengthMeter
264
+ CustomRequirement, StrengthResult,
265
+
266
+ // RichTextEditor
267
+ RichTextEditorToolbarConfig, RichTextEditorTranslation,
220
268
 
221
- ## Entwicklung
269
+ // SqlEditor
270
+ SqlEditorDialect, SqlEditorTranslation, SqlEditorToolbarConfig,
222
271
 
223
- 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
+ ```
224
282
 
225
283
  ---
226
284
 
package/README.md CHANGED
@@ -18,6 +18,7 @@ A type-safe React component library built on **TypeScript** and **MUI (Material
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
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) |
21
22
 
22
23
  ---
23
24
 
@@ -53,6 +54,8 @@ Wrap your app in MUI's `ThemeProvider` as usual. `ConfirmDialog` additionally re
53
54
 
54
55
  ### ConfirmDialog
55
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
+
56
59
  ```tsx
57
60
  import { ConfirmDialogProvider, useConfirm } from '@thebuoyant-tsdev/mui-ts-library';
58
61
 
@@ -73,6 +76,8 @@ if (ok) handleDelete();
73
76
 
74
77
  ### GanttChart
75
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
+
76
81
  ```tsx
77
82
  import { GanttChart } from '@thebuoyant-tsdev/mui-ts-library';
78
83
  import type { GanttTask } from '@thebuoyant-tsdev/mui-ts-library';
@@ -91,6 +96,8 @@ const tasks: GanttTask[] = [
91
96
 
92
97
  ### TagSelection
93
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
+
94
101
  ```tsx
95
102
  import { TagSelection } from '@thebuoyant-tsdev/mui-ts-library';
96
103
  import type { TagSelectionItem } from '@thebuoyant-tsdev/mui-ts-library';
@@ -109,6 +116,8 @@ const tags: TagSelectionItem[] = [
109
116
 
110
117
  ### PasswordStrengthMeter
111
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
+
112
121
  ```tsx
113
122
  import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
114
123
 
@@ -125,6 +134,8 @@ import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
125
134
 
126
135
  ### RichTextEditor
127
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
+
128
139
  ```tsx
129
140
  import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
130
141
 
@@ -140,6 +151,8 @@ import { RichTextEditor } from '@thebuoyant-tsdev/mui-ts-library';
140
151
 
141
152
  ### SqlEditor
142
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
+
143
156
  ```tsx
144
157
  import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
145
158
 
@@ -157,6 +170,8 @@ import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
157
170
 
158
171
  ### JsonEditor
159
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
+
160
175
  ```tsx
161
176
  import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
162
177
 
@@ -174,6 +189,8 @@ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
174
189
 
175
190
  ### SunburstChart
176
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
+
177
194
  ```tsx
178
195
  import { SunburstChart } from '@thebuoyant-tsdev/mui-ts-library';
179
196
  import type { SunburstChartData } from '@thebuoyant-tsdev/mui-ts-library';
@@ -202,25 +219,66 @@ const data: SunburstChartData = {
202
219
 
203
220
  ---
204
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
+
205
248
  ## TypeScript
206
249
 
207
250
  All types and defaults are exported directly — no separate `@types/...` package needed.
208
251
 
209
252
  ```tsx
210
253
  import type {
211
- GanttTask,
212
- ConfirmDialogOptions,
213
- JsonEditorHighlightColors,
214
- SqlEditorProps,
215
- RichTextEditorTranslation,
216
- } from '@thebuoyant-tsdev/mui-ts-library';
217
- ```
254
+ // ConfirmDialog
255
+ ConfirmDialogOptions, ConfirmDialogSeverity,
218
256
 
219
- ---
257
+ // GanttChart
258
+ GanttTask, GanttTranslations, GanttTheme, GanttToolbarConfig,
259
+
260
+ // TagSelection
261
+ TagSelectionItem,
262
+
263
+ // PasswordStrengthMeter
264
+ CustomRequirement, StrengthResult,
265
+
266
+ // RichTextEditor
267
+ RichTextEditorToolbarConfig, RichTextEditorTranslation,
220
268
 
221
- ## Development
269
+ // SqlEditor
270
+ SqlEditorDialect, SqlEditorTranslation, SqlEditorToolbarConfig,
222
271
 
223
- 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
+ ```
224
282
 
225
283
  ---
226
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
+ };