@moderneinc/react-charts 1.5.2-next.f8b5a8 → 1.6.0-next.ebd481

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.
@@ -101,6 +101,22 @@ export type CampaignTimelineProps = {
101
101
  * @default true
102
102
  */
103
103
  snapToEvents?: boolean;
104
+ /**
105
+ * False makes the chart display-only: no playhead, no slider role, input
106
+ * ignored, `onTimeChange` never fires. Flags stay clickable - this disables
107
+ * scrubbing, not selection.
108
+ * @default true
109
+ */
110
+ enableScrubbing?: boolean;
111
+ /**
112
+ * Whether the campaign has finished. Complete graphs the span of its own
113
+ * data; incomplete runs to wall-clock now, so elapsed silence occupies width.
114
+ *
115
+ * NOTE: wall-clock is read once per instance - the edge does not advance on
116
+ * its own. Pass `horizonEnd` on an interval for that.
117
+ * @default true
118
+ */
119
+ complete?: boolean;
104
120
  /**
105
121
  * How far data is known - typically the last status refresh. The line stops
106
122
  * here and the rest is hatched: unrefreshed, not empty. Defaults to no hatch.
@@ -109,7 +125,9 @@ export type CampaignTimelineProps = {
109
125
  /**
110
126
  * Extends the x-domain to at least this time, so the chart can show
111
127
  * wall-clock time past the last refresh. Never shrinks the domain: a value
112
- * earlier than the last data point has no effect.
128
+ * earlier than the last data point has no effect - including under
129
+ * `complete={false}`, which sets a floor for the right edge rather than
130
+ * overriding one.
113
131
  */
114
132
  horizonEnd?: number;
115
133
  /** Ids of events drawn in the selected state. */
@@ -7,13 +7,15 @@ type UseCampaignTimelineProps = {
7
7
  defaultTime?: number;
8
8
  onTimeChange?: (time: number, reason: PlayheadChangeReason) => void;
9
9
  snapToEvents: boolean;
10
+ enableScrubbing: boolean;
11
+ complete: boolean;
10
12
  now?: number;
11
13
  horizonEnd?: number;
12
14
  width?: number;
13
15
  fontFamily: string;
14
16
  formatDate?: (timestamp: number) => string;
15
17
  };
16
- export declare const useCampaignTimeline: ({ events, burndown, time, defaultTime, onTimeChange, snapToEvents, now, horizonEnd, width: widthProp, fontFamily, formatDate }: UseCampaignTimelineProps) => {
18
+ export declare const useCampaignTimeline: ({ events, burndown, time, defaultTime, onTimeChange, snapToEvents, enableScrubbing, complete, now, horizonEnd, width: widthProp, fontFamily, formatDate }: UseCampaignTimelineProps) => {
17
19
  containerRef: import('react').RefObject<HTMLDivElement>;
18
20
  width: number;
19
21
  plotWidth: number;