@moderneinc/react-charts 1.2.0-next.2f2ee2 → 1.2.0-next.313329
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/dist/components/chrono-chart/chrono-chart.component.d.ts +7 -0
- package/dist/components/chrono-chart/chrono-chart.types.d.ts +61 -1
- package/dist/components/chrono-chart/components/category-table.component.d.ts +10 -0
- package/dist/components/chrono-chart/components/category-table.types.d.ts +25 -0
- package/dist/components/chrono-chart/utils/data-transformer.d.ts +32 -0
- package/dist/components/morph-chart/hooks/shared/computations.d.ts +12 -10
- package/dist/components/morph-chart/hooks/shared/types.d.ts +7 -5
- package/dist/components/morph-chart/hooks/use-morph-chart.hook.d.ts +4 -1
- package/dist/components/morph-chart/morph-chart.types.d.ts +10 -0
- package/dist/components/morph-chart/utils/accordion-generator.d.ts +102 -0
- package/dist/components/morph-chart/utils/gsap-orchestrator.d.ts +55 -16
- package/dist/components/morph-chart/utils/slinky-3d-generator.d.ts +35 -0
- package/dist/components/morph-chart/utils/svg-slinky-generator.d.ts +25 -0
- package/dist/components/timeline-chart/timeline-chart.types.d.ts +23 -0
- package/dist/index.cjs +76 -76
- package/dist/index.js +11785 -11055
- package/dist/theme/timeline-defaults.d.ts +33 -1
- package/package.json +6 -2
|
@@ -3,12 +3,20 @@ export type TimelineEvent = {
|
|
|
3
3
|
date: Date;
|
|
4
4
|
timestamp: number;
|
|
5
5
|
eventName: string;
|
|
6
|
+
/**
|
|
7
|
+
* Optional color for the event marker.
|
|
8
|
+
* If not provided, defaults to #2F42FF (Digital Blue 500).
|
|
9
|
+
* Accepts any valid CSS color string.
|
|
10
|
+
*/
|
|
11
|
+
color?: string;
|
|
6
12
|
[key: string]: unknown;
|
|
7
13
|
};
|
|
8
14
|
export type TimelineSelection = {
|
|
9
15
|
start: number | null;
|
|
10
16
|
end: number | null;
|
|
11
17
|
};
|
|
18
|
+
export type DragHandleType = 'start' | 'end' | 'body' | null;
|
|
19
|
+
type DragHandleVariant = 'arrow' | 'grip';
|
|
12
20
|
export type TimelineChartSlotProps = {
|
|
13
21
|
/** Props for the header container (Stack) */
|
|
14
22
|
header?: StackProps;
|
|
@@ -26,6 +34,10 @@ export type TimelineChartSlotProps = {
|
|
|
26
34
|
event?: BoxProps;
|
|
27
35
|
/** Props for the selection highlight overlay (Box) */
|
|
28
36
|
selection?: BoxProps;
|
|
37
|
+
/** Props for the start drag handle (Box) */
|
|
38
|
+
startHandle?: BoxProps;
|
|
39
|
+
/** Props for the end drag handle (Box) */
|
|
40
|
+
endHandle?: BoxProps;
|
|
29
41
|
/** Props for the hover tooltip container (Box) */
|
|
30
42
|
tooltip?: BoxProps;
|
|
31
43
|
/** Props for the tooltip event name Typography component */
|
|
@@ -59,6 +71,10 @@ export type TimelineChartProps = {
|
|
|
59
71
|
monthLabelCount?: number;
|
|
60
72
|
/** Enable zoom with mouse wheel */
|
|
61
73
|
enableZoom?: boolean;
|
|
74
|
+
/** Drag handle style variant (default: 'arrow') */
|
|
75
|
+
dragHandleVariant?: DragHandleVariant;
|
|
76
|
+
/** Color for drag handles (default: '#4B5563' for arrow, '#9CA3AF' for grip) */
|
|
77
|
+
dragHandleColor?: string;
|
|
62
78
|
/** Show header title and instructions (default: true) */
|
|
63
79
|
showHeader?: boolean;
|
|
64
80
|
/** Custom title for the header */
|
|
@@ -102,12 +118,14 @@ export type UseTimelineChartProps = {
|
|
|
102
118
|
export type UseTimelineChartReturn = {
|
|
103
119
|
isDragging: boolean;
|
|
104
120
|
dragStart: number | null;
|
|
121
|
+
dragHandleType: DragHandleType;
|
|
105
122
|
internalSelectedRange: TimelineSelection;
|
|
106
123
|
internalVisibleRange: TimelineSelection;
|
|
107
124
|
hoveredEvent: TimelineEvent | null;
|
|
108
125
|
minDate: number;
|
|
109
126
|
maxDate: number;
|
|
110
127
|
timeSpan: number;
|
|
128
|
+
timelineContainerRef: React.RefObject<HTMLDivElement>;
|
|
111
129
|
getPositionFromTimestamp: (timestamp: number) => number;
|
|
112
130
|
getTimestampFromPosition: (x: number, containerWidth: number) => number;
|
|
113
131
|
handleMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
@@ -115,9 +133,13 @@ export type UseTimelineChartReturn = {
|
|
|
115
133
|
handleMouseUp: () => void;
|
|
116
134
|
handleWheel: (e: React.WheelEvent<HTMLDivElement>) => void;
|
|
117
135
|
handleDoubleClick: () => void;
|
|
136
|
+
handleStartHandleMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
137
|
+
handleEndHandleMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
138
|
+
handleSelectionBodyMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
118
139
|
setHoveredEvent: (event: TimelineEvent | null) => void;
|
|
119
140
|
getEventsInRange: () => TimelineEvent[];
|
|
120
141
|
resetZoom: () => void;
|
|
142
|
+
showHandles: boolean;
|
|
121
143
|
};
|
|
122
144
|
export type TimelineSelectedEventsProps = {
|
|
123
145
|
/** Array of selected events to display */
|
|
@@ -131,3 +153,4 @@ export type TimelineSelectedEventsProps = {
|
|
|
131
153
|
/** Primary color for event items */
|
|
132
154
|
primaryColor?: string;
|
|
133
155
|
};
|
|
156
|
+
export {};
|