@thebuoyant-tsdev/mui-ts-library 1.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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.de.md +224 -0
  3. package/README.md +224 -0
  4. package/dist/components/confirm-dialog/ConfirmDialog.types.d.ts +21 -0
  5. package/dist/components/confirm-dialog/ConfirmDialogProvider.d.ts +5 -0
  6. package/dist/components/gantt-chart/GanttChart.constants.d.ts +11 -0
  7. package/dist/components/gantt-chart/GanttChart.d.ts +7 -0
  8. package/dist/components/gantt-chart/GanttChart.store.d.ts +28 -0
  9. package/dist/components/gantt-chart/GanttChart.types.d.ts +119 -0
  10. package/dist/components/gantt-chart/GanttDeleteDialog.d.ts +9 -0
  11. package/dist/components/gantt-chart/GanttTaskDialog.d.ts +11 -0
  12. package/dist/components/gantt-chart/GanttTaskPanel.d.ts +21 -0
  13. package/dist/components/gantt-chart/GanttTimeline.d.ts +19 -0
  14. package/dist/components/gantt-chart/GanttTimelineHeader.d.ts +17 -0
  15. package/dist/components/gantt-chart/GanttToolbar.d.ts +7 -0
  16. package/dist/components/gantt-chart/util/gantt-chart.util.d.ts +80 -0
  17. package/dist/components/json-editor/JsonEditor.d.ts +2 -0
  18. package/dist/components/json-editor/JsonEditor.types.d.ts +60 -0
  19. package/dist/components/json-editor/JsonEditorContent.d.ts +17 -0
  20. package/dist/components/json-editor/JsonEditorFooter.d.ts +13 -0
  21. package/dist/components/json-editor/JsonEditorToolbar.d.ts +11 -0
  22. package/dist/components/password-strength-meter/PasswordStrengthMeter.d.ts +2 -0
  23. package/dist/components/password-strength-meter/PasswordStrengthMeter.types.d.ts +56 -0
  24. package/dist/components/password-strength-meter/util/password-strength.util.d.ts +2 -0
  25. package/dist/components/rich-text-editor/RichTextEditor.d.ts +2 -0
  26. package/dist/components/rich-text-editor/RichTextEditor.types.d.ts +72 -0
  27. package/dist/components/rich-text-editor/RichTextEditorColorPicker.d.ts +12 -0
  28. package/dist/components/rich-text-editor/RichTextEditorContent.d.ts +9 -0
  29. package/dist/components/rich-text-editor/RichTextEditorFooter.d.ts +11 -0
  30. package/dist/components/rich-text-editor/RichTextEditorLinkDialog.d.ts +10 -0
  31. package/dist/components/rich-text-editor/RichTextEditorToolbar.d.ts +10 -0
  32. package/dist/components/rich-text-editor/util/rich-text-editor.util.d.ts +9 -0
  33. package/dist/components/sql-editor/SqlEditor.d.ts +2 -0
  34. package/dist/components/sql-editor/SqlEditor.types.d.ts +73 -0
  35. package/dist/components/sql-editor/SqlEditorContent.d.ts +23 -0
  36. package/dist/components/sql-editor/SqlEditorFooter.d.ts +13 -0
  37. package/dist/components/sql-editor/SqlEditorToolbar.d.ts +12 -0
  38. package/dist/components/tag-selection/TagSelection.d.ts +2 -0
  39. package/dist/components/tag-selection/TagSelection.store.d.ts +12 -0
  40. package/dist/components/tag-selection/TagSelection.types.d.ts +41 -0
  41. package/dist/components/tag-selection/TagSelectionAutocomplete.d.ts +18 -0
  42. package/dist/components/tag-selection/TagSelectionChip.d.ts +10 -0
  43. package/dist/components/tag-selection/TagSelectionSelectedTags.d.ts +13 -0
  44. package/dist/index.cjs +230 -0
  45. package/dist/index.d.ts +14 -0
  46. package/dist/index.js +43753 -0
  47. package/package.json +175 -0
@@ -0,0 +1,21 @@
1
+ import { type RefObject, type UIEventHandler } from "react";
2
+ import type { GanttTask, GanttTaskStatus } from "./GanttChart.types";
3
+ type GanttTaskPanelProps = {
4
+ scrollRef: RefObject<HTMLDivElement | null>;
5
+ onScroll: UIEventHandler<HTMLDivElement>;
6
+ panelWidth: number;
7
+ onTaskClick?: (task: GanttTask) => void;
8
+ onAddTask?: (task: GanttTask) => void;
9
+ onEditTask?: (task: GanttTask) => void;
10
+ onDeleteTask?: (task: GanttTask) => void;
11
+ onStatusChange?: (task: GanttTask, status: GanttTaskStatus) => void;
12
+ onTasksChange?: (tasks: GanttTask[]) => void;
13
+ enableBuiltinDialogs?: boolean;
14
+ onTaskCreated?: (task: GanttTask) => void;
15
+ onTaskUpdated?: (task: GanttTask) => void;
16
+ onTaskDeleted?: (taskId: string) => void;
17
+ inlineEdit?: boolean;
18
+ virtualizeRows?: boolean;
19
+ };
20
+ export declare function GanttTaskPanel({ scrollRef, onScroll, panelWidth, onTaskClick, onAddTask, onEditTask, onDeleteTask, onStatusChange, onTasksChange, enableBuiltinDialogs, onTaskCreated, onTaskUpdated, onTaskDeleted, inlineEdit, virtualizeRows, }: GanttTaskPanelProps): import("react/jsx-runtime").JSX.Element;
21
+ export {};
@@ -0,0 +1,19 @@
1
+ import { type RefObject, type UIEventHandler } from "react";
2
+ import type { GanttTask, GanttTaskStatus } from "./GanttChart.types";
3
+ type GanttTimelineProps = {
4
+ scrollRef: RefObject<HTMLDivElement | null>;
5
+ onScroll: UIEventHandler<HTMLDivElement>;
6
+ onTaskClick?: (task: GanttTask) => void;
7
+ onMilestoneClick?: (task: GanttTask) => void;
8
+ draggable?: boolean;
9
+ resizable?: boolean;
10
+ progressDraggable?: boolean;
11
+ showCriticalPath?: boolean;
12
+ virtualizeRows?: boolean;
13
+ onTaskMoved?: (task: GanttTask, newStart: Date, newEnd: Date) => void;
14
+ onTaskResized?: (task: GanttTask, newEnd: Date) => void;
15
+ onTasksChange?: (tasks: GanttTask[]) => void;
16
+ onStatusChange?: (task: GanttTask, status: GanttTaskStatus) => void;
17
+ };
18
+ export declare function GanttTimeline({ scrollRef, onScroll, onTaskClick, onMilestoneClick, draggable, resizable, progressDraggable, showCriticalPath, virtualizeRows, onTaskMoved, onTaskResized, onTasksChange, onStatusChange, }: GanttTimelineProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,17 @@
1
+ export type HeaderColumn = {
2
+ key: string;
3
+ label: string;
4
+ width: number;
5
+ isWeekend?: boolean;
6
+ };
7
+ export type HeaderGroup = {
8
+ key: string;
9
+ label: string;
10
+ width: number;
11
+ };
12
+ type GanttTimelineHeaderProps = {
13
+ columns: HeaderColumn[];
14
+ groups?: HeaderGroup[];
15
+ };
16
+ export declare function GanttTimelineHeader({ columns, groups }: GanttTimelineHeaderProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { GanttToolbarConfig } from "./GanttChart.types";
2
+ type GanttToolbarProps = {
3
+ onScrollToToday?: () => void;
4
+ config: Required<GanttToolbarConfig>;
5
+ };
6
+ export declare function GanttToolbar({ onScrollToToday, config }: GanttToolbarProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,80 @@
1
+ import type { GanttTask, GanttTaskNode, GanttTimeScale } from "../GanttChart.types";
2
+ export type TimelineRange = {
3
+ start: Date;
4
+ end: Date;
5
+ };
6
+ /**
7
+ * Standardbereich = aktuelles Quartal. Hat der Task-Set Daten außerhalb dieses Quartals,
8
+ * wird der Bereich auf beiden Seiten mit einem Monat Puffer erweitert — er wird nie verkleinert.
9
+ */
10
+ export declare function getTimelineRange(tasks: GanttTask[]): TimelineRange;
11
+ export declare function getDisplayRange(timelineRange: TimelineRange, timeScale: GanttTimeScale): TimelineRange;
12
+ export type TaskPosition = {
13
+ left: number;
14
+ width: number;
15
+ };
16
+ /**
17
+ * Berechnet Left und Width eines Balkens relativ zur gesamten Timeline.
18
+ * Meilensteine (isMilestone=true) erhalten eine Mindestbreite von 0,
19
+ * da sie als Punkt/Raute statt als Balken gerendert werden.
20
+ */
21
+ export declare function calculateTaskPosition(task: GanttTask, range: TimelineRange): TaskPosition;
22
+ /**
23
+ * Baut aus einer flachen Task-Liste einen verschachtelten Baum auf.
24
+ * Voraussetzung: parentId referenziert eine id, die in derselben Liste vorhanden ist.
25
+ */
26
+ export declare function buildTaskTree(tasks: GanttTask[]): GanttTaskNode[];
27
+ /**
28
+ * Gibt die sichtbare, geordnete Flachliste zurück, abhängig davon welche
29
+ * Knoten aufgeklappt sind. Root-Tasks sind immer sichtbar.
30
+ */
31
+ export declare function getVisibleTasks(nodes: GanttTaskNode[], expandedIds: Set<string>): GanttTaskNode[];
32
+ export declare function startOfMonth(date: Date): Date;
33
+ export declare function endOfMonth(date: Date): Date;
34
+ export declare function addMonths(date: Date, months: number): Date;
35
+ export declare function addDays(date: Date, days: number): Date;
36
+ /**
37
+ * Verschiebt alle Finish-to-Start-Nachfolger des geänderten Tasks um dasselbe Zeit-Delta.
38
+ * Läuft via BFS durch den Abhängigkeitsgraphen — zyklische Abhängigkeiten werden durch
39
+ * das `visited`-Set abgefangen.
40
+ */
41
+ export declare function cascadeDateUpdate(tasks: GanttTask[], changedTaskId: string, deltaMs: number): GanttTask[];
42
+ /**
43
+ * Gibt alle Monatsersten zwischen start und end zurück.
44
+ * Wird für den Timeline-Header benötigt.
45
+ */
46
+ export declare function getMonthsInRange(range: TimelineRange): Date[];
47
+ /** Gibt den Montag der Woche zurück, die das gegebene Datum enthält (ISO 8601). */
48
+ export declare function startOfWeek(date: Date): Date;
49
+ /**
50
+ * Berechnet die ISO-8601-Kalenderwoche.
51
+ * Woche 1 = die Woche mit dem ersten Donnerstag des Jahres.
52
+ */
53
+ export declare function getISOWeekNumber(date: Date): number;
54
+ /** Gibt alle Wochenanfänge (Montage) zwischen start und end zurück. */
55
+ export declare function getWeeksInRange(range: TimelineRange): Date[];
56
+ /** Gibt alle Tage (Mitternacht) zwischen start und end zurück (inklusive). */
57
+ export declare function getDaysInRange(range: TimelineRange): Date[];
58
+ export type QuarterLabel = {
59
+ key: string;
60
+ label: string;
61
+ start: Date;
62
+ };
63
+ export declare function startOfQuarter(date: Date): Date;
64
+ export declare function endOfQuarter(date: Date): Date;
65
+ /**
66
+ * Gibt alle Quartalsstarts zwischen start und end zurück.
67
+ * Beginnt immer am Quartalsbeginn, der start enthält.
68
+ */
69
+ export declare function getQuartersInRange(range: TimelineRange): QuarterLabel[];
70
+ /**
71
+ * Berechnet den kritischen Pfad: alle Tasks, von denen aus über Finish-to-Start-Abhängigkeiten
72
+ * das globale Projektende erreichbar ist.
73
+ *
74
+ * Algorithmus: Für jeden Task wird per DFS (mit Memoization) das späteste Enddatum berechnet,
75
+ * das über seine Nachfolger-Kette erreichbar ist. Tasks, deren Wert dem globalen Maximum
76
+ * entspricht, bilden den kritischen Pfad.
77
+ *
78
+ * Zirkuläre Abhängigkeiten werden durch einen `inStack`-Guard abgefangen.
79
+ */
80
+ export declare function computeCriticalPath(tasks: GanttTask[]): Set<string>;
@@ -0,0 +1,2 @@
1
+ import { type JsonEditorProps } from "./JsonEditor.types";
2
+ export declare function JsonEditor({ value, onChange, onValidChange, placeholder, height, width, disabled, readonly, error, helperText, name, indent, showLineNumbers, showLineColumn, showValidation, toolbarConfig, translation, highlightColors, onBlur, onFocus, }: JsonEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,60 @@
1
+ export type JsonEditorToolbarConfig = {
2
+ showFormat?: boolean;
3
+ showCompact?: boolean;
4
+ showCopy?: boolean;
5
+ showClear?: boolean;
6
+ showUndoRedo?: boolean;
7
+ };
8
+ export declare const DEFAULT_JSON_EDITOR_TOOLBAR_CONFIG: Required<JsonEditorToolbarConfig>;
9
+ export type JsonEditorTranslation = {
10
+ format: string;
11
+ compact: string;
12
+ copy: string;
13
+ copySuccess: string;
14
+ clear: string;
15
+ undo: string;
16
+ redo: string;
17
+ lineColumn: string;
18
+ validJson: string;
19
+ invalidJson: string;
20
+ };
21
+ export declare const DEFAULT_JSON_EDITOR_TRANSLATION: JsonEditorTranslation;
22
+ export type JsonEditorHighlightColors = {
23
+ /** JSON property names. Default: theme primary.main (bold). */
24
+ propertyName?: string;
25
+ /** String values. Default: theme success.main. */
26
+ string?: string;
27
+ /** Number values. Default: theme warning.main. */
28
+ number?: string;
29
+ /** Boolean values (true/false). Default: theme info.main. */
30
+ boolean?: string;
31
+ /** Null values. Default: theme text.secondary. */
32
+ null?: string;
33
+ };
34
+ export type JsonEditorProps = {
35
+ value?: string;
36
+ onChange?: (json: string) => void;
37
+ onValidChange?: (isValid: boolean) => void;
38
+ placeholder?: string;
39
+ /** Total height (toolbar + content). Numbers → px. "auto" → fills surrounding flex container. */
40
+ height?: number | string;
41
+ /** Width. Numbers → px. Default → 100%. */
42
+ width?: number | string;
43
+ disabled?: boolean;
44
+ readonly?: boolean;
45
+ error?: boolean;
46
+ helperText?: string;
47
+ /** Name for native form submission via hidden input. */
48
+ name?: string;
49
+ /** Indentation spaces used by the Format button. Default: 2. */
50
+ indent?: number;
51
+ showLineNumbers?: boolean;
52
+ showLineColumn?: boolean;
53
+ /** Shows a Valid / Invalid JSON indicator in the footer. */
54
+ showValidation?: boolean;
55
+ toolbarConfig?: JsonEditorToolbarConfig;
56
+ translation?: Partial<JsonEditorTranslation>;
57
+ highlightColors?: JsonEditorHighlightColors;
58
+ onBlur?: () => void;
59
+ onFocus?: () => void;
60
+ };
@@ -0,0 +1,17 @@
1
+ import { EditorView } from "@codemirror/view";
2
+ import type { JsonEditorHighlightColors } from "./JsonEditor.types";
3
+ type JsonEditorContentProps = {
4
+ value?: string;
5
+ onChange?: (json: string) => void;
6
+ placeholder?: string;
7
+ disabled?: boolean;
8
+ readonly?: boolean;
9
+ showLineNumbers?: boolean;
10
+ highlightColors?: JsonEditorHighlightColors;
11
+ onViewReady: (view: EditorView | null) => void;
12
+ onCursorChange: (line: number, col: number) => void;
13
+ onBlur?: () => void;
14
+ onFocus?: () => void;
15
+ };
16
+ export declare function JsonEditorContent({ value, onChange, placeholder, disabled, readonly, showLineNumbers, highlightColors, onViewReady, onCursorChange, onBlur, onFocus, }: JsonEditorContentProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { JsonEditorTranslation } from "./JsonEditor.types";
2
+ type JsonEditorFooterProps = {
3
+ helperText?: string;
4
+ error?: boolean;
5
+ showLineColumn?: boolean;
6
+ showValidation?: boolean;
7
+ isValid: boolean;
8
+ cursorLine: number;
9
+ cursorCol: number;
10
+ translation: JsonEditorTranslation;
11
+ };
12
+ export declare function JsonEditorFooter({ helperText, error, showLineColumn, showValidation, isValid, cursorLine, cursorCol, translation: t, }: JsonEditorFooterProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { EditorView } from "@codemirror/view";
2
+ import type { JsonEditorToolbarConfig, JsonEditorTranslation } from "./JsonEditor.types";
3
+ type JsonEditorToolbarProps = {
4
+ viewRef: React.MutableRefObject<EditorView | null>;
5
+ toolbarConfig: Required<JsonEditorToolbarConfig>;
6
+ translation: JsonEditorTranslation;
7
+ indent: number;
8
+ disabled?: boolean;
9
+ };
10
+ export declare function JsonEditorToolbar({ viewRef, toolbarConfig: tc, translation: t, indent, disabled, }: JsonEditorToolbarProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { PasswordStrengthMeterProps } from "./PasswordStrengthMeter.types";
2
+ export declare function PasswordStrengthMeter({ value, name, inputRef, disabled, error, helperText, autoComplete, showPasswordAdornment, showMeter, showSummary, inputSize, translation, meterColors, passwordMinLength, checkColors, onPasswordChange, }: PasswordStrengthMeterProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,56 @@
1
+ import type React from "react";
2
+ export type StrengthScore = 0 | 1 | 2 | 3 | 4;
3
+ export type MeterStatus = "weak" | "ok" | "good" | "very good";
4
+ export type StrengthResult = {
5
+ score: StrengthScore;
6
+ percent: number;
7
+ meterStatus: MeterStatus;
8
+ length: number;
9
+ hasLower: boolean;
10
+ hasUpper: boolean;
11
+ hasDigit: boolean;
12
+ hasSymbol: boolean;
13
+ };
14
+ export type CheckColors = {
15
+ failure: string;
16
+ success: string;
17
+ };
18
+ export type MeterColors = {
19
+ weak: string;
20
+ ok: string;
21
+ good: string;
22
+ veryGood: string;
23
+ };
24
+ export type PasswordStrengthMeterTranslation = {
25
+ label: string;
26
+ summaryHeaderLabel: string;
27
+ summaryMinChars: string;
28
+ summaryCapitalLetter: string;
29
+ summaryLowerCaseLetter: string;
30
+ summaryNumber: string;
31
+ summarySpecialChar: string;
32
+ showPasswordLabel: string;
33
+ hidePasswordLabel: string;
34
+ meterAriaLabel: string;
35
+ };
36
+ export declare const DEFAULT_PASSWORD_TRANSLATIONS: PasswordStrengthMeterTranslation;
37
+ export declare const DEFAULT_METER_COLORS: MeterColors;
38
+ export declare const DEFAULT_CHECK_COLORS: CheckColors;
39
+ export type PasswordStrengthMeterProps = {
40
+ value?: string;
41
+ name?: string;
42
+ inputRef?: React.Ref<HTMLInputElement>;
43
+ disabled?: boolean;
44
+ error?: boolean;
45
+ helperText?: string;
46
+ autoComplete?: string;
47
+ showPasswordAdornment?: boolean;
48
+ showMeter?: boolean;
49
+ showSummary?: boolean;
50
+ inputSize?: "small" | "medium";
51
+ translation?: Partial<PasswordStrengthMeterTranslation>;
52
+ meterColors?: Partial<MeterColors>;
53
+ passwordMinLength?: number;
54
+ checkColors?: CheckColors;
55
+ onPasswordChange?: (password: string, strengthResult: StrengthResult) => void;
56
+ };
@@ -0,0 +1,2 @@
1
+ import type { StrengthResult } from "../PasswordStrengthMeter.types";
2
+ export declare function scorePassword(password: string, passwordMinLength: number): StrengthResult;
@@ -0,0 +1,2 @@
1
+ import { type RichTextEditorProps } from "./RichTextEditor.types";
2
+ export declare function RichTextEditor({ value, onChange, placeholder, outputFormat, height, width, showCharacterCount, maxCharacters, toolbarConfig, disabled, readonly, name, error, helperText, translation, onBlur, onFocus, }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,72 @@
1
+ export type RichTextEditorOutputFormat = "html" | "json";
2
+ export type RichTextEditorToolbarConfig = {
3
+ showBold?: boolean;
4
+ showItalic?: boolean;
5
+ showUnderline?: boolean;
6
+ showStrike?: boolean;
7
+ showHeading1?: boolean;
8
+ showHeading2?: boolean;
9
+ showHeading3?: boolean;
10
+ showBulletList?: boolean;
11
+ showOrderedList?: boolean;
12
+ showBlockquote?: boolean;
13
+ showCodeBlock?: boolean;
14
+ showLink?: boolean;
15
+ showHorizontalRule?: boolean;
16
+ showTextColor?: boolean;
17
+ showHighlight?: boolean;
18
+ showUndoRedo?: boolean;
19
+ showClearFormat?: boolean;
20
+ };
21
+ export declare const DEFAULT_RICH_TEXT_EDITOR_TOOLBAR_CONFIG: Required<RichTextEditorToolbarConfig>;
22
+ export type RichTextEditorTranslation = {
23
+ bold: string;
24
+ italic: string;
25
+ underline: string;
26
+ strike: string;
27
+ heading1: string;
28
+ heading2: string;
29
+ heading3: string;
30
+ bulletList: string;
31
+ orderedList: string;
32
+ blockquote: string;
33
+ codeBlock: string;
34
+ link: string;
35
+ horizontalRule: string;
36
+ textColor: string;
37
+ removeTextColor: string;
38
+ highlight: string;
39
+ removeHighlight: string;
40
+ undo: string;
41
+ redo: string;
42
+ clearFormat: string;
43
+ linkDialogTitle: string;
44
+ linkDialogUrlLabel: string;
45
+ linkDialogSave: string;
46
+ linkDialogCancel: string;
47
+ linkDialogRemove: string;
48
+ characterCount: string;
49
+ characterCountMax: string;
50
+ };
51
+ export declare const DEFAULT_RICH_TEXT_EDITOR_TRANSLATION: RichTextEditorTranslation;
52
+ export type RichTextEditorProps = {
53
+ value?: string;
54
+ onChange?: (value: string) => void;
55
+ placeholder?: string;
56
+ outputFormat?: RichTextEditorOutputFormat;
57
+ /** Gesamthöhe des Editors (Toolbar + Inhalt). Zahlen → px. "auto" → füllt den umgebenden Flex-Container. */
58
+ height?: number | string;
59
+ /** Breite des Editors. Zahlen → px. "auto" oder leer → 100% des Elternelements. */
60
+ width?: number | string;
61
+ showCharacterCount?: boolean;
62
+ maxCharacters?: number;
63
+ toolbarConfig?: RichTextEditorToolbarConfig;
64
+ disabled?: boolean;
65
+ readonly?: boolean;
66
+ name?: string;
67
+ error?: boolean;
68
+ helperText?: string;
69
+ translation?: Partial<RichTextEditorTranslation>;
70
+ onBlur?: () => void;
71
+ onFocus?: () => void;
72
+ };
@@ -0,0 +1,12 @@
1
+ type RichTextEditorColorPickerProps = {
2
+ anchorEl: HTMLElement | null;
3
+ open: boolean;
4
+ onClose: () => void;
5
+ mode: "textColor" | "highlight";
6
+ activeColor?: string | null;
7
+ onSelectColor: (color: string) => void;
8
+ onRemoveColor: () => void;
9
+ removeLabel: string;
10
+ };
11
+ export declare function RichTextEditorColorPicker({ anchorEl, open, onClose, mode, activeColor, onSelectColor, onRemoveColor, removeLabel, }: RichTextEditorColorPickerProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type Editor } from "@tiptap/react";
2
+ type RichTextEditorContentProps = {
3
+ editor: Editor | null;
4
+ error?: boolean;
5
+ disabled?: boolean;
6
+ readonly?: boolean;
7
+ };
8
+ export declare function RichTextEditorContent({ editor, error, disabled, readonly, }: RichTextEditorContentProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type RichTextEditorTranslation } from "./RichTextEditor.types";
2
+ type RichTextEditorFooterProps = {
3
+ helperText?: string;
4
+ error?: boolean;
5
+ showCharacterCount?: boolean;
6
+ charCount: number;
7
+ maxCharacters?: number;
8
+ translation: RichTextEditorTranslation;
9
+ };
10
+ export declare function RichTextEditorFooter({ helperText, error, showCharacterCount, charCount, maxCharacters, translation: t, }: RichTextEditorFooterProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import { type Editor } from "@tiptap/react";
2
+ import { type RichTextEditorTranslation } from "./RichTextEditor.types";
3
+ type RichTextEditorLinkDialogProps = {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ editor: Editor;
7
+ translation: RichTextEditorTranslation;
8
+ };
9
+ export declare function RichTextEditorLinkDialog({ open, onClose, editor, translation: t, }: RichTextEditorLinkDialogProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { type Editor } from "@tiptap/react";
2
+ import { type RichTextEditorTranslation, type RichTextEditorToolbarConfig } from "./RichTextEditor.types";
3
+ type RichTextEditorToolbarProps = {
4
+ editor: Editor | null;
5
+ toolbarConfig: Required<RichTextEditorToolbarConfig>;
6
+ translation: RichTextEditorTranslation;
7
+ disabled?: boolean;
8
+ };
9
+ export declare function RichTextEditorToolbar({ editor, toolbarConfig: tc, translation: t, disabled, }: RichTextEditorToolbarProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Prüft ob ein TipTap-HTML-String inhaltlich leer ist (nur leere Tags, kein sichtbarer Text).
3
+ */
4
+ export declare function isRichTextEditorEmpty(html: string): boolean;
5
+ /**
6
+ * Wandelt einen TipTap-JSON-String in einen lesbaren HTML-String um —
7
+ * nur für Display-Zwecke ohne Editor-Instanz verwendbar.
8
+ */
9
+ export declare function richTextJsonToHtml(json: string): string;
@@ -0,0 +1,2 @@
1
+ import { type SqlEditorProps } from "./SqlEditor.types";
2
+ export declare function SqlEditor({ value, onChange, placeholder, height, width, disabled, readonly, error, helperText, name, dialect, showLineNumbers, showLineColumn, showErrorCount, toolbarConfig, translation, highlightColors, schema, onExecute, onLint, onBlur, onFocus, }: SqlEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,73 @@
1
+ export type SqlLintError = {
2
+ line: number;
3
+ col?: number;
4
+ message: string;
5
+ severity?: "error" | "warning" | "info";
6
+ };
7
+ export type SqlEditorToolbarConfig = {
8
+ showFormat?: boolean;
9
+ showCopy?: boolean;
10
+ showClear?: boolean;
11
+ showExecute?: boolean;
12
+ showUndoRedo?: boolean;
13
+ };
14
+ export declare const DEFAULT_SQL_EDITOR_TOOLBAR_CONFIG: Required<SqlEditorToolbarConfig>;
15
+ export type SqlEditorTranslation = {
16
+ format: string;
17
+ copy: string;
18
+ copySuccess: string;
19
+ clear: string;
20
+ execute: string;
21
+ undo: string;
22
+ redo: string;
23
+ lineColumn: string;
24
+ errorCount: string;
25
+ };
26
+ export declare const DEFAULT_SQL_EDITOR_TRANSLATION: SqlEditorTranslation;
27
+ export type SqlEditorDialect = "standard" | "mysql" | "postgresql" | "sqlite" | "mssql";
28
+ export type SqlColumn = {
29
+ name: string;
30
+ type?: string;
31
+ };
32
+ export type SqlTable = {
33
+ name: string;
34
+ columns?: SqlColumn[];
35
+ };
36
+ export type SqlSchema = {
37
+ tables: SqlTable[];
38
+ };
39
+ export type SqlEditorHighlightColors = {
40
+ /** SQL keywords like SELECT, FROM, WHERE. Default: theme primary.main (bold). */
41
+ keyword?: string;
42
+ /** String literals like 'value'. Default: theme success.main (bold). */
43
+ string?: string;
44
+ /** Identifiers: table names, column names, aliases. Default: theme info.main. */
45
+ identifier?: string;
46
+ };
47
+ export type SqlEditorProps = {
48
+ value?: string;
49
+ onChange?: (sql: string) => void;
50
+ placeholder?: string;
51
+ /** Total height (toolbar + content). Numbers → px. "auto" → fills surrounding flex container. */
52
+ height?: number | string;
53
+ /** Width. Numbers → px. Default → 100%. */
54
+ width?: number | string;
55
+ disabled?: boolean;
56
+ readonly?: boolean;
57
+ error?: boolean;
58
+ helperText?: string;
59
+ /** Name for native form submission via hidden input. */
60
+ name?: string;
61
+ dialect?: SqlEditorDialect;
62
+ showLineNumbers?: boolean;
63
+ showLineColumn?: boolean;
64
+ showErrorCount?: boolean;
65
+ toolbarConfig?: SqlEditorToolbarConfig;
66
+ translation?: Partial<SqlEditorTranslation>;
67
+ highlightColors?: SqlEditorHighlightColors;
68
+ schema?: SqlSchema;
69
+ onExecute?: (sql: string) => void;
70
+ onLint?: (sql: string) => Promise<SqlLintError[]> | SqlLintError[];
71
+ onBlur?: () => void;
72
+ onFocus?: () => void;
73
+ };
@@ -0,0 +1,23 @@
1
+ import { EditorView } from "@codemirror/view";
2
+ import type { SqlEditorDialect, SqlLintError, SqlSchema } from "./SqlEditor.types";
3
+ type SqlEditorContentProps = {
4
+ value?: string;
5
+ onChange?: (sql: string) => void;
6
+ placeholder?: string;
7
+ disabled?: boolean;
8
+ readonly?: boolean;
9
+ showLineNumbers?: boolean;
10
+ dialect?: SqlEditorDialect;
11
+ keywordColor?: string;
12
+ stringColor?: string;
13
+ identifierColor?: string;
14
+ schema?: SqlSchema;
15
+ onLint?: (sql: string) => Promise<SqlLintError[]> | SqlLintError[];
16
+ onDiagnosticsChange?: (count: number) => void;
17
+ onViewReady: (view: EditorView | null) => void;
18
+ onCursorChange: (line: number, col: number) => void;
19
+ onBlur?: () => void;
20
+ onFocus?: () => void;
21
+ };
22
+ export declare function SqlEditorContent({ value, onChange, placeholder, disabled, readonly, showLineNumbers, dialect, keywordColor, stringColor, identifierColor, schema, onLint, onDiagnosticsChange, onViewReady, onCursorChange, onBlur, onFocus, }: SqlEditorContentProps): import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { SqlEditorTranslation } from "./SqlEditor.types";
2
+ type SqlEditorFooterProps = {
3
+ helperText?: string;
4
+ error?: boolean;
5
+ showLineColumn?: boolean;
6
+ showErrorCount?: boolean;
7
+ diagnosticsCount: number;
8
+ cursorLine: number;
9
+ cursorCol: number;
10
+ translation: SqlEditorTranslation;
11
+ };
12
+ export declare function SqlEditorFooter({ helperText, error, showLineColumn, showErrorCount, diagnosticsCount, cursorLine, cursorCol, translation: t, }: SqlEditorFooterProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { EditorView } from "@codemirror/view";
2
+ import type { SqlEditorDialect, SqlEditorToolbarConfig, SqlEditorTranslation } from "./SqlEditor.types";
3
+ type SqlEditorToolbarProps = {
4
+ viewRef: React.MutableRefObject<EditorView | null>;
5
+ toolbarConfig: Required<SqlEditorToolbarConfig>;
6
+ translation: SqlEditorTranslation;
7
+ dialect: SqlEditorDialect;
8
+ disabled?: boolean;
9
+ onExecute?: (sql: string) => void;
10
+ };
11
+ export declare function SqlEditorToolbar({ viewRef, toolbarConfig: tc, translation: t, dialect, disabled, onExecute, }: SqlEditorToolbarProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { TagSelectionProps } from "./TagSelection.types";
2
+ export declare function TagSelection({ tags, showSelectedTags, showSelectedTagsLabel, showAutoComplete, translation, inputSize, chipSize, disabled, loading, maxTags, allowCreate, maxVisibleChips, popoverPlacement, listboxMaxHeight, onTagSelect, onTagDelete, onTagsChange, onSearchChange, onTagCreate, }: TagSelectionProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { TagSelectionItem } from "./TagSelection.types";
2
+ export type TagSelectionStoreState = {
3
+ tags: TagSelectionItem[];
4
+ searchValue: string;
5
+ setTags: (tags: TagSelectionItem[]) => void;
6
+ setSearchValue: (searchValue: string) => void;
7
+ selectTag: (tagId: string) => void;
8
+ deleteTag: (tagId: string) => void;
9
+ addTag: (tag: TagSelectionItem) => void;
10
+ };
11
+ export type TagSelectionStore = ReturnType<typeof createTagSelectionStore>;
12
+ export declare function createTagSelectionStore(initialTags: TagSelectionItem[]): import("zustand").StoreApi<TagSelectionStoreState>;