@moderneinc/react-charts 1.2.0-next.4d0411 → 1.2.0-next.6a7b47
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 +64 -2
- 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/d3-stacked-area-chart/d3-stacked-area-chart.types.d.ts +6 -0
- package/dist/components/d3-stacked-area-chart/hooks/use-d3-stacked-area.hook.d.ts +2 -1
- 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 +6 -1
- package/dist/components/morph-chart/morph-chart.types.d.ts +21 -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 +17 -0
- package/dist/index.cjs +57 -57
- package/dist/index.js +11790 -11100
- package/dist/theme/timeline-defaults.d.ts +33 -1
- package/package.json +5 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Selection } from 'd3-selection';
|
|
2
|
+
export interface SvgSlinkyConfig {
|
|
3
|
+
categories: Array<{
|
|
4
|
+
name: string;
|
|
5
|
+
color: string;
|
|
6
|
+
seatCount: number;
|
|
7
|
+
}>;
|
|
8
|
+
centerX: number;
|
|
9
|
+
centerY: number;
|
|
10
|
+
radius: number;
|
|
11
|
+
innerRadius: number;
|
|
12
|
+
arcAngle: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create SVG slinky coils
|
|
16
|
+
*/
|
|
17
|
+
export declare function createSvgSlinky(container: Selection<SVGGElement, unknown, null, undefined>, config: SvgSlinkyConfig, instanceId: string): {
|
|
18
|
+
slinkyGroup: Selection<SVGGElement, unknown, null, undefined>;
|
|
19
|
+
cleanup: () => void;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Animate SVG slinky closing - stacks rings vertically into a bar on the right
|
|
23
|
+
* Uses staggered animation phases to create realistic slinky walking effect
|
|
24
|
+
*/
|
|
25
|
+
export declare function animateSvgSlinkyCompression(slinkyGroup: Selection<SVGGElement, unknown, null, undefined>, timeline: gsap.core.Timeline, startTime: string, duration: number, targetX: number, targetY: number): void;
|
|
@@ -15,6 +15,8 @@ export type TimelineSelection = {
|
|
|
15
15
|
start: number | null;
|
|
16
16
|
end: number | null;
|
|
17
17
|
};
|
|
18
|
+
export type DragHandleType = 'start' | 'end' | 'body' | null;
|
|
19
|
+
type DragHandleVariant = 'arrow' | 'grip';
|
|
18
20
|
export type TimelineChartSlotProps = {
|
|
19
21
|
/** Props for the header container (Stack) */
|
|
20
22
|
header?: StackProps;
|
|
@@ -32,6 +34,10 @@ export type TimelineChartSlotProps = {
|
|
|
32
34
|
event?: BoxProps;
|
|
33
35
|
/** Props for the selection highlight overlay (Box) */
|
|
34
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;
|
|
35
41
|
/** Props for the hover tooltip container (Box) */
|
|
36
42
|
tooltip?: BoxProps;
|
|
37
43
|
/** Props for the tooltip event name Typography component */
|
|
@@ -65,6 +71,10 @@ export type TimelineChartProps = {
|
|
|
65
71
|
monthLabelCount?: number;
|
|
66
72
|
/** Enable zoom with mouse wheel */
|
|
67
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;
|
|
68
78
|
/** Show header title and instructions (default: true) */
|
|
69
79
|
showHeader?: boolean;
|
|
70
80
|
/** Custom title for the header */
|
|
@@ -108,12 +118,14 @@ export type UseTimelineChartProps = {
|
|
|
108
118
|
export type UseTimelineChartReturn = {
|
|
109
119
|
isDragging: boolean;
|
|
110
120
|
dragStart: number | null;
|
|
121
|
+
dragHandleType: DragHandleType;
|
|
111
122
|
internalSelectedRange: TimelineSelection;
|
|
112
123
|
internalVisibleRange: TimelineSelection;
|
|
113
124
|
hoveredEvent: TimelineEvent | null;
|
|
114
125
|
minDate: number;
|
|
115
126
|
maxDate: number;
|
|
116
127
|
timeSpan: number;
|
|
128
|
+
timelineContainerRef: React.RefObject<HTMLDivElement>;
|
|
117
129
|
getPositionFromTimestamp: (timestamp: number) => number;
|
|
118
130
|
getTimestampFromPosition: (x: number, containerWidth: number) => number;
|
|
119
131
|
handleMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
@@ -121,9 +133,13 @@ export type UseTimelineChartReturn = {
|
|
|
121
133
|
handleMouseUp: () => void;
|
|
122
134
|
handleWheel: (e: React.WheelEvent<HTMLDivElement>) => void;
|
|
123
135
|
handleDoubleClick: () => void;
|
|
136
|
+
handleStartHandleMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
137
|
+
handleEndHandleMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
138
|
+
handleSelectionBodyMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
124
139
|
setHoveredEvent: (event: TimelineEvent | null) => void;
|
|
125
140
|
getEventsInRange: () => TimelineEvent[];
|
|
126
141
|
resetZoom: () => void;
|
|
142
|
+
showHandles: boolean;
|
|
127
143
|
};
|
|
128
144
|
export type TimelineSelectedEventsProps = {
|
|
129
145
|
/** Array of selected events to display */
|
|
@@ -137,3 +153,4 @@ export type TimelineSelectedEventsProps = {
|
|
|
137
153
|
/** Primary color for event items */
|
|
138
154
|
primaryColor?: string;
|
|
139
155
|
};
|
|
156
|
+
export {};
|