awesome-timeline-react 0.7.0 → 0.9.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.md CHANGED
@@ -186,17 +186,17 @@ summarizes the **child events** that point at it via `props.parentEventId`:
186
186
 
187
187
  ```tsx
188
188
  const rows = [
189
- { id: "order", name: "Order #1001" }, // parent row
190
- { id: "weld", name: "Weld", parentId: "order" }, // child rows
191
- { id: "paint", name: "Paint", parentId: "order" },
189
+ { id: "group", name: "Group #1001" }, // parent row
190
+ { id: "s1", name: "Step 1", parentId: "group" }, // child rows
191
+ { id: "s2", name: "Step 2", parentId: "group" },
192
192
  ];
193
193
 
194
194
  const events = [
195
195
  // the parent's startTime/endTime are derived — supplied values are just a
196
196
  // fallback shown until it has children
197
- { id: "P", rowId: "order", startTime: 0, endTime: 0, props: { isGroupParent: true, label: "Order #1001" } },
198
- { id: "w", rowId: "weld", startTime: t1, endTime: t2, props: { parentEventId: "P" } },
199
- { id: "p", rowId: "paint", startTime: t3, endTime: t4, props: { parentEventId: "P" } },
197
+ { id: "P", rowId: "group", startTime: 0, endTime: 0, props: { isGroupParent: true, label: "Group #1001" } },
198
+ { id: "a", rowId: "s1", startTime: t1, endTime: t2, props: { parentEventId: "P" } },
199
+ { id: "b", rowId: "s2", startTime: t3, endTime: t4, props: { parentEventId: "P" } },
200
200
  ];
201
201
  ```
202
202
 
@@ -13,15 +13,15 @@ export declare type AnimationConfig = boolean | {
13
13
  };
14
14
 
15
15
  /**
16
- * Assigns a vertical lane (stacking order) to each window-visible event of a
17
- * single row: interval partitioning, so a row opens exactly as many lanes as
18
- * its peak concurrency and NO event is ever laid over another.
16
+ * Assigns a vertical lane (stacking order) to every event of a single row:
17
+ * interval partitioning, so a row opens exactly as many lanes as its peak
18
+ * concurrency and NO event is ever laid over another.
19
19
  *
20
20
  * Each event takes the lowest lane whose last event has already ended; if every
21
21
  * lane is still busy it opens a new one. Semantics:
22
22
  *
23
- * - Events outside [windowStart, windowEnd] are skipped and do not influence
24
- * lane assignment at all.
23
+ * - Every event counts, visible or not, so an event keeps its lane while the
24
+ * window pans.
25
25
  * - Touching events (prev.endTime === next.startTime) do not overlap, so they
26
26
  * share a lane.
27
27
  * - Lowest-free-lane means the assignment is deterministic, and a row with N
@@ -36,7 +36,7 @@ export declare type AnimationConfig = boolean | {
36
36
  * `rowEvents` must already be filtered to one row and sorted with
37
37
  * helpers/sort-events (startTime asc, endTime asc).
38
38
  */
39
- export declare const assignLanes: (rowEvents: EventType[], windowStart: number, windowEnd: number) => LaneResult;
39
+ export declare const assignLanes: (rowEvents: EventType[]) => LaneResult;
40
40
 
41
41
  /** Eligibility: same expression as the legacy Event component's render guard.
42
42
  * A group-parent (summary) event is never resizable — its span is derived from
@@ -457,6 +457,8 @@ export declare type Geometry = {
457
457
  /** Derive the full Geometry from the resolved theme's geometry tokens. */
458
458
  export declare const geometryFromTheme: (theme: ResolvedTheme) => Geometry;
459
459
 
460
+ declare type HeaderToken = "headerBackground" | "headerTextColor" | "headerBorderColor" | "headerShadow" | "borderColor";
461
+
460
462
  export declare type HitTarget = {
461
463
  kind: "event" | "static";
462
464
  event: EventType;
@@ -655,7 +657,7 @@ export declare type ResizePreview = {
655
657
  direction: "left" | "right";
656
658
  };
657
659
 
658
- declare type ResolvedTheme = Required<Omit<Theme, "font">> & Pick<Theme, "font">;
660
+ declare type ResolvedTheme = Required<Omit<Theme, "font" | HeaderToken>> & Pick<Theme, "font" | HeaderToken>;
659
661
  export { ResolvedTheme }
660
662
  export { ResolvedTheme as ResolvedTheme_alias_1 }
661
663
 
@@ -680,8 +682,8 @@ export { RowType as RowType_alias_1 }
680
682
  * frame — React never reconciles individual event motion.
681
683
  *
682
684
  * Lane assignment (and therefore row height) is computed lazily per row, only
683
- * when that row is queried for the current window. Bursts of patches against
684
- * off-screen rows cost nothing beyond an index update.
685
+ * when that row is queried. Bursts of patches against off-screen rows cost
686
+ * nothing beyond an index update.
685
687
  */
686
688
  export declare class SceneStore {
687
689
  private rowIndexes;
@@ -739,7 +741,10 @@ export declare class SceneStore {
739
741
  getRow(rowId: string): RowType | undefined;
740
742
  getRowEvents(rowId: string): EventType[];
741
743
  getRowStaticEvents(rowId: string): EventType[];
742
- getLanes(rowId: string, windowStart: number, windowEnd: number): LaneResult;
744
+ /** Lanes over ALL the row's events, not just those in view: a lane assignment that followed the
745
+ * window re-packed the row on every pan frame, so bars jumped between lanes as others scrolled in
746
+ * and out. The row is as tall as its peak overlap anywhere. */
747
+ getLanes(rowId: string): LaneResult;
743
748
  /**
744
749
  * Report the per-row label heights measured against the live DOM header
745
750
  * (key: rowId, value: the minimum row height the wrapped label needs,
@@ -748,15 +753,15 @@ export declare class SceneStore {
748
753
  * labels is a no-op and can't feed back into an infinite render loop.
749
754
  */
750
755
  setLabelMinHeights(heights: Map<string, number>): void;
751
- getRowHeight(rowId: string, windowStart: number, windowEnd: number): number;
756
+ getRowHeight(rowId: string): number;
752
757
  /** Extra top offset for a row's lanes: when a tall label grows the row past what its lanes need,
753
758
  * the lanes sit centred in it rather than hugging the top with the surplus all below. */
754
- getLaneInset(rowId: string, windowStart: number, windowEnd: number): number;
759
+ getLaneInset(rowId: string): number;
755
760
  /**
756
761
  * y offset of each row's top edge (content coordinates, before scroll) plus
757
762
  * the total content height — drives both drawing and the scroll spacer.
758
763
  */
759
- getRowOffsets(windowStart: number, windowEnd: number): {
764
+ getRowOffsets(): {
760
765
  offsetOf: Map<string, number>;
761
766
  totalHeight: number;
762
767
  };
@@ -842,6 +847,15 @@ declare type Theme = {
842
847
  * "rgba(0,0,0,0.22)"). Also tints the header tree connector lines if no
843
848
  * gridColor contrast is desired. */
844
849
  groupShadowColor?: string;
850
+ /** the row-header column and the time bar: background, text, their borders and the column's row
851
+ * dividers, and the column's shadow onto the rows ("none" for none). Unset, the stylesheet's
852
+ * dark header with yellow borders applies. */
853
+ headerBackground?: string;
854
+ headerTextColor?: string;
855
+ headerBorderColor?: string;
856
+ headerShadow?: string;
857
+ /** the frame around the rows; unset, the stylesheet's black applies */
858
+ borderColor?: string;
845
859
  };
846
860
  export { Theme }
847
861
  export { Theme as Theme_alias_1 }
@@ -883,11 +897,19 @@ export { Timeline as Timeline_alias_1 }
883
897
 
884
898
  export declare const TimelineCanvas: () => React_2.JSX.Element;
885
899
 
900
+ /**
901
+ * Configurable time-bar rows: a day row over 8-hour blocks instead of hours.
902
+ * The bottom row uses `{ stepSeconds: 8 * 3600 }` with a custom `format`. Grid
903
+ * lines and drop snapping stay on the hour grid, independent of the time-bar
904
+ * rows.
905
+ */
906
+ export declare const TimelineCustomTimeBar: () => React_2.JSX.Element;
907
+
886
908
  /**
887
909
  * Per-event drop-target restriction (`props.droppableRowIds`). The blue event
888
- * can only be dropped onto Welder/CNC (drag it elsewhere → not-allowed cursor,
910
+ * can only be dropped onto Track A/C (drag it elsewhere → not-allowed cursor,
889
911
  * snaps back). The green event is unrestricted. The red event is *misconfigured*
890
- * — it sits on Paint but its droppableRowIds doesn't include Paint, so the
912
+ * — it sits on Track D but its droppableRowIds doesn't include Track D, so the
891
913
  * library records `metadata.droppableError`; click "Inspect" to see it.
892
914
  */
893
915
  export declare const TimelineDroppableRows: () => React_2.JSX.Element;
@@ -983,6 +1005,8 @@ export declare const TimelinePrimary: () => React_2.JSX.Element;
983
1005
  declare type TimelineProps = {
984
1006
  rows: RowType[];
985
1007
  events: EventType[];
1008
+ /** background bands, drawn under the events at full row height in `theme.staticEventFill`, or in
1009
+ * the band's own `props.style.fill` */
986
1010
  staticEvents?: EventType[];
987
1011
  startDate: Date;
988
1012
  endDate: Date;
@@ -1023,9 +1047,9 @@ declare type TimelineProps = {
1023
1047
  showRTIndicator?: boolean;
1024
1048
  eventsResize?: boolean;
1025
1049
  /** draw 45° diagonal stripes on the slice of an event bar that overlaps a
1026
- * static event (e.g. an off-shift/downtime band) on the same row. This gives
1050
+ * static event (e.g. a band of unavailable time) on the same row. This gives
1027
1051
  * a visible cause for a bar that looks "too wide" because it spans
1028
- * non-working time. Stripe color is `theme.overlapStripeColor`. Default
1052
+ * that band. Stripe color is `theme.overlapStripeColor`. Default
1029
1053
  * false (no striping). */
1030
1054
  stripeOverlap?: boolean;
1031
1055
  showEventPrompt?: boolean;
@@ -1033,6 +1057,9 @@ declare type TimelineProps = {
1033
1057
  panZoom?: PanZoomConfig;
1034
1058
  /** configure each row's unit/label in the two-row time bar */
1035
1059
  timeBar?: TimeBarConfig;
1060
+ /** draw the two-row time bar above the rows (default true). Off, the timeline is just its rows —
1061
+ * e.g. a secondary strip kept in step with a main timeline through `onWindowChange`/`setWindow`. */
1062
+ showTimeBar?: boolean;
1036
1063
  /** layout animations: true (default), false to disable, or durations */
1037
1064
  animations?: AnimationConfig;
1038
1065
  };
@@ -1080,6 +1107,11 @@ export declare class TimelineRenderer {
1080
1107
  */
1081
1108
  export declare const TimelineRowHeaderSlot: () => React_2.JSX.Element;
1082
1109
 
1110
+ /** A second, headerless timeline under the main one, kept on the same window both ways: a shared
1111
+ * pool (who holds each unit, stacked into lanes) and a level row whose coloured background bands
1112
+ * are per-event static fills, with drops drawn as triangles. */
1113
+ export declare const TimelineSecondaryStrip: () => React_2.JSX.Element;
1114
+
1083
1115
  /**
1084
1116
  * Selection: `selectable` turns on click selection. A plain click selects one
1085
1117
  * event (it lifts with a shadow while every other event dims); Cmd/Ctrl+click
@@ -1090,14 +1122,6 @@ export declare const TimelineRowHeaderSlot: () => React_2.JSX.Element;
1090
1122
  */
1091
1123
  export declare const TimelineSelectable: () => React_2.JSX.Element;
1092
1124
 
1093
- /**
1094
- * Configurable time-bar rows: a day row over 8-hour "shift" blocks instead of
1095
- * hours. The bottom row uses `{ stepSeconds: 8 * 3600 }` with a custom
1096
- * `format`. Grid lines and drop snapping stay on the hour grid, independent of
1097
- * the time-bar rows.
1098
- */
1099
- export declare const TimelineShiftBar: () => React_2.JSX.Element;
1100
-
1101
1125
  /**
1102
1126
  * 10k events across 500 rows with a fake websocket pushing 200 random
1103
1127
  * event moves every 100ms through the imperative handle — zero React
@@ -1106,12 +1130,12 @@ export declare const TimelineShiftBar: () => React_2.JSX.Element;
1106
1130
  export declare const TimelineStreaming10k: () => React_2.JSX.Element;
1107
1131
 
1108
1132
  /**
1109
- * `stripeOverlap`: where an event bar overlaps a static event (an off-shift /
1110
- * downtime band) on the same row, its overlapping slice is hatched with 45°
1111
- * stripes so an over-wide bar has a visible cause (spec §6.4 — "why is my 2h op
1112
- * 14h wide?"). Toggle it to compare. Row 1's op straddles the band (striped over
1113
- * the gap only); row 2's op starts at the band's end (no overlap → no stripes),
1114
- * modelling a "continuous / no-straddle" op that shifted whole. Stripe color is
1133
+ * `stripeOverlap`: where an event bar overlaps a static event (a band of
1134
+ * unavailable time) on the same row, its overlapping slice is hatched with 45°
1135
+ * stripes so an over-wide bar has a visible cause. Toggle it to compare. Row 1's
1136
+ * task straddles the band (striped over the band only); row 2's task starts at
1137
+ * the band's end (no overlap → no stripes), the shape of a task that may not be
1138
+ * split and so moved past the band whole. Stripe color is
1115
1139
  * `theme.overlapStripeColor`.
1116
1140
  */
1117
1141
  export declare const TimelineStripedOverlap: () => React_2.JSX.Element;
@@ -13,15 +13,15 @@ export declare type AnimationConfig = boolean | {
13
13
  };
14
14
 
15
15
  /**
16
- * Assigns a vertical lane (stacking order) to each window-visible event of a
17
- * single row: interval partitioning, so a row opens exactly as many lanes as
18
- * its peak concurrency and NO event is ever laid over another.
16
+ * Assigns a vertical lane (stacking order) to every event of a single row:
17
+ * interval partitioning, so a row opens exactly as many lanes as its peak
18
+ * concurrency and NO event is ever laid over another.
19
19
  *
20
20
  * Each event takes the lowest lane whose last event has already ended; if every
21
21
  * lane is still busy it opens a new one. Semantics:
22
22
  *
23
- * - Events outside [windowStart, windowEnd] are skipped and do not influence
24
- * lane assignment at all.
23
+ * - Every event counts, visible or not, so an event keeps its lane while the
24
+ * window pans.
25
25
  * - Touching events (prev.endTime === next.startTime) do not overlap, so they
26
26
  * share a lane.
27
27
  * - Lowest-free-lane means the assignment is deterministic, and a row with N
@@ -36,7 +36,7 @@ export declare type AnimationConfig = boolean | {
36
36
  * `rowEvents` must already be filtered to one row and sorted with
37
37
  * helpers/sort-events (startTime asc, endTime asc).
38
38
  */
39
- export declare const assignLanes: (rowEvents: EventType[], windowStart: number, windowEnd: number) => LaneResult;
39
+ export declare const assignLanes: (rowEvents: EventType[]) => LaneResult;
40
40
 
41
41
  /** Eligibility: same expression as the legacy Event component's render guard.
42
42
  * A group-parent (summary) event is never resizable — its span is derived from
@@ -457,6 +457,8 @@ export declare type Geometry = {
457
457
  /** Derive the full Geometry from the resolved theme's geometry tokens. */
458
458
  export declare const geometryFromTheme: (theme: ResolvedTheme) => Geometry;
459
459
 
460
+ declare type HeaderToken = "headerBackground" | "headerTextColor" | "headerBorderColor" | "headerShadow" | "borderColor";
461
+
460
462
  export declare type HitTarget = {
461
463
  kind: "event" | "static";
462
464
  event: EventType;
@@ -655,7 +657,7 @@ export declare type ResizePreview = {
655
657
  direction: "left" | "right";
656
658
  };
657
659
 
658
- declare type ResolvedTheme = Required<Omit<Theme, "font">> & Pick<Theme, "font">;
660
+ declare type ResolvedTheme = Required<Omit<Theme, "font" | HeaderToken>> & Pick<Theme, "font" | HeaderToken>;
659
661
  export { ResolvedTheme }
660
662
  export { ResolvedTheme as ResolvedTheme_alias_1 }
661
663
 
@@ -680,8 +682,8 @@ export { RowType as RowType_alias_1 }
680
682
  * frame — React never reconciles individual event motion.
681
683
  *
682
684
  * Lane assignment (and therefore row height) is computed lazily per row, only
683
- * when that row is queried for the current window. Bursts of patches against
684
- * off-screen rows cost nothing beyond an index update.
685
+ * when that row is queried. Bursts of patches against off-screen rows cost
686
+ * nothing beyond an index update.
685
687
  */
686
688
  export declare class SceneStore {
687
689
  private rowIndexes;
@@ -739,7 +741,10 @@ export declare class SceneStore {
739
741
  getRow(rowId: string): RowType | undefined;
740
742
  getRowEvents(rowId: string): EventType[];
741
743
  getRowStaticEvents(rowId: string): EventType[];
742
- getLanes(rowId: string, windowStart: number, windowEnd: number): LaneResult;
744
+ /** Lanes over ALL the row's events, not just those in view: a lane assignment that followed the
745
+ * window re-packed the row on every pan frame, so bars jumped between lanes as others scrolled in
746
+ * and out. The row is as tall as its peak overlap anywhere. */
747
+ getLanes(rowId: string): LaneResult;
743
748
  /**
744
749
  * Report the per-row label heights measured against the live DOM header
745
750
  * (key: rowId, value: the minimum row height the wrapped label needs,
@@ -748,15 +753,15 @@ export declare class SceneStore {
748
753
  * labels is a no-op and can't feed back into an infinite render loop.
749
754
  */
750
755
  setLabelMinHeights(heights: Map<string, number>): void;
751
- getRowHeight(rowId: string, windowStart: number, windowEnd: number): number;
756
+ getRowHeight(rowId: string): number;
752
757
  /** Extra top offset for a row's lanes: when a tall label grows the row past what its lanes need,
753
758
  * the lanes sit centred in it rather than hugging the top with the surplus all below. */
754
- getLaneInset(rowId: string, windowStart: number, windowEnd: number): number;
759
+ getLaneInset(rowId: string): number;
755
760
  /**
756
761
  * y offset of each row's top edge (content coordinates, before scroll) plus
757
762
  * the total content height — drives both drawing and the scroll spacer.
758
763
  */
759
- getRowOffsets(windowStart: number, windowEnd: number): {
764
+ getRowOffsets(): {
760
765
  offsetOf: Map<string, number>;
761
766
  totalHeight: number;
762
767
  };
@@ -842,6 +847,15 @@ declare type Theme = {
842
847
  * "rgba(0,0,0,0.22)"). Also tints the header tree connector lines if no
843
848
  * gridColor contrast is desired. */
844
849
  groupShadowColor?: string;
850
+ /** the row-header column and the time bar: background, text, their borders and the column's row
851
+ * dividers, and the column's shadow onto the rows ("none" for none). Unset, the stylesheet's
852
+ * dark header with yellow borders applies. */
853
+ headerBackground?: string;
854
+ headerTextColor?: string;
855
+ headerBorderColor?: string;
856
+ headerShadow?: string;
857
+ /** the frame around the rows; unset, the stylesheet's black applies */
858
+ borderColor?: string;
845
859
  };
846
860
  export { Theme }
847
861
  export { Theme as Theme_alias_1 }
@@ -883,11 +897,19 @@ export { Timeline as Timeline_alias_1 }
883
897
 
884
898
  export declare const TimelineCanvas: () => React_2.JSX.Element;
885
899
 
900
+ /**
901
+ * Configurable time-bar rows: a day row over 8-hour blocks instead of hours.
902
+ * The bottom row uses `{ stepSeconds: 8 * 3600 }` with a custom `format`. Grid
903
+ * lines and drop snapping stay on the hour grid, independent of the time-bar
904
+ * rows.
905
+ */
906
+ export declare const TimelineCustomTimeBar: () => React_2.JSX.Element;
907
+
886
908
  /**
887
909
  * Per-event drop-target restriction (`props.droppableRowIds`). The blue event
888
- * can only be dropped onto Welder/CNC (drag it elsewhere → not-allowed cursor,
910
+ * can only be dropped onto Track A/C (drag it elsewhere → not-allowed cursor,
889
911
  * snaps back). The green event is unrestricted. The red event is *misconfigured*
890
- * — it sits on Paint but its droppableRowIds doesn't include Paint, so the
912
+ * — it sits on Track D but its droppableRowIds doesn't include Track D, so the
891
913
  * library records `metadata.droppableError`; click "Inspect" to see it.
892
914
  */
893
915
  export declare const TimelineDroppableRows: () => React_2.JSX.Element;
@@ -983,6 +1005,8 @@ export declare const TimelinePrimary: () => React_2.JSX.Element;
983
1005
  declare type TimelineProps = {
984
1006
  rows: RowType[];
985
1007
  events: EventType[];
1008
+ /** background bands, drawn under the events at full row height in `theme.staticEventFill`, or in
1009
+ * the band's own `props.style.fill` */
986
1010
  staticEvents?: EventType[];
987
1011
  startDate: Date;
988
1012
  endDate: Date;
@@ -1023,9 +1047,9 @@ declare type TimelineProps = {
1023
1047
  showRTIndicator?: boolean;
1024
1048
  eventsResize?: boolean;
1025
1049
  /** draw 45° diagonal stripes on the slice of an event bar that overlaps a
1026
- * static event (e.g. an off-shift/downtime band) on the same row. This gives
1050
+ * static event (e.g. a band of unavailable time) on the same row. This gives
1027
1051
  * a visible cause for a bar that looks "too wide" because it spans
1028
- * non-working time. Stripe color is `theme.overlapStripeColor`. Default
1052
+ * that band. Stripe color is `theme.overlapStripeColor`. Default
1029
1053
  * false (no striping). */
1030
1054
  stripeOverlap?: boolean;
1031
1055
  showEventPrompt?: boolean;
@@ -1033,6 +1057,9 @@ declare type TimelineProps = {
1033
1057
  panZoom?: PanZoomConfig;
1034
1058
  /** configure each row's unit/label in the two-row time bar */
1035
1059
  timeBar?: TimeBarConfig;
1060
+ /** draw the two-row time bar above the rows (default true). Off, the timeline is just its rows —
1061
+ * e.g. a secondary strip kept in step with a main timeline through `onWindowChange`/`setWindow`. */
1062
+ showTimeBar?: boolean;
1036
1063
  /** layout animations: true (default), false to disable, or durations */
1037
1064
  animations?: AnimationConfig;
1038
1065
  };
@@ -1080,6 +1107,11 @@ export declare class TimelineRenderer {
1080
1107
  */
1081
1108
  export declare const TimelineRowHeaderSlot: () => React_2.JSX.Element;
1082
1109
 
1110
+ /** A second, headerless timeline under the main one, kept on the same window both ways: a shared
1111
+ * pool (who holds each unit, stacked into lanes) and a level row whose coloured background bands
1112
+ * are per-event static fills, with drops drawn as triangles. */
1113
+ export declare const TimelineSecondaryStrip: () => React_2.JSX.Element;
1114
+
1083
1115
  /**
1084
1116
  * Selection: `selectable` turns on click selection. A plain click selects one
1085
1117
  * event (it lifts with a shadow while every other event dims); Cmd/Ctrl+click
@@ -1090,14 +1122,6 @@ export declare const TimelineRowHeaderSlot: () => React_2.JSX.Element;
1090
1122
  */
1091
1123
  export declare const TimelineSelectable: () => React_2.JSX.Element;
1092
1124
 
1093
- /**
1094
- * Configurable time-bar rows: a day row over 8-hour "shift" blocks instead of
1095
- * hours. The bottom row uses `{ stepSeconds: 8 * 3600 }` with a custom
1096
- * `format`. Grid lines and drop snapping stay on the hour grid, independent of
1097
- * the time-bar rows.
1098
- */
1099
- export declare const TimelineShiftBar: () => React_2.JSX.Element;
1100
-
1101
1125
  /**
1102
1126
  * 10k events across 500 rows with a fake websocket pushing 200 random
1103
1127
  * event moves every 100ms through the imperative handle — zero React
@@ -1106,12 +1130,12 @@ export declare const TimelineShiftBar: () => React_2.JSX.Element;
1106
1130
  export declare const TimelineStreaming10k: () => React_2.JSX.Element;
1107
1131
 
1108
1132
  /**
1109
- * `stripeOverlap`: where an event bar overlaps a static event (an off-shift /
1110
- * downtime band) on the same row, its overlapping slice is hatched with 45°
1111
- * stripes so an over-wide bar has a visible cause (spec §6.4 — "why is my 2h op
1112
- * 14h wide?"). Toggle it to compare. Row 1's op straddles the band (striped over
1113
- * the gap only); row 2's op starts at the band's end (no overlap → no stripes),
1114
- * modelling a "continuous / no-straddle" op that shifted whole. Stripe color is
1133
+ * `stripeOverlap`: where an event bar overlaps a static event (a band of
1134
+ * unavailable time) on the same row, its overlapping slice is hatched with 45°
1135
+ * stripes so an over-wide bar has a visible cause. Toggle it to compare. Row 1's
1136
+ * task straddles the band (striped over the band only); row 2's task starts at
1137
+ * the band's end (no overlap → no stripes), the shape of a task that may not be
1138
+ * split and so moved past the band whole. Stripe color is
1115
1139
  * `theme.overlapStripeColor`.
1116
1140
  */
1117
1141
  export declare const TimelineStripedOverlap: () => React_2.JSX.Element;
package/dist/index.css CHANGED
@@ -7,6 +7,8 @@
7
7
  color: white;
8
8
  box-sizing: border-box;
9
9
  box-shadow: 4px 0px 20px black;
10
+ position: relative;
11
+ z-index: 2;
10
12
  }
11
13
  .main-wrapper {
12
14
  position: relative;
@@ -76,6 +78,8 @@
76
78
  background-color: rgb(39, 36, 36);
77
79
  color: white;
78
80
  box-sizing: border-box;
81
+ position: relative;
82
+ z-index: 2;
79
83
  }
80
84
  .empty-block {
81
85
  width: 100px;
@@ -85,6 +89,7 @@
85
89
  }
86
90
  .rt-line {
87
91
  position: absolute;
92
+ z-index: 3;
88
93
  height: calc(100% - 24px);
89
94
  top: 24px;
90
95
  width: 2px;
@@ -93,6 +98,7 @@
93
98
  }
94
99
  .rt-arrow {
95
100
  position: absolute;
101
+ z-index: 3;
96
102
  top: 0px;
97
103
  width: 0;
98
104
  height: 0;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/style.css","../src/components/style.css"],"sourcesContent":[".rows-header-wrapper {\n width: 100px;\n height: fit-content;\n border-right: 1px solid yellow;\n background-color: rgb(39, 36, 36);\n color: white;\n box-sizing: border-box;\n box-shadow: 4px 0px 20px black;\n}\n\n.main-wrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n}\n\n.body-wrapper {\n display: flex;\n flex-direction: row;\n border-left: 1px solid black;\n border-bottom: 1px solid black;\n border-right: 1px solid black;\n width: 100%;\n overflow: auto;\n box-sizing: border-box;\n}\n",".row-header {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100px;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n/* The label wraps to as many lines as it needs; the row height is grown to\n fit it (see SceneStore.setLabelMinHeights) so wrapped labels stay vertically\n centered instead of overflowing into the next row. */\n.row-header-label {\n width: 100%;\n text-align: center;\n white-space: normal;\n overflow-wrap: break-word;\n word-break: break-word;\n}\n\n/* Custom row-header content (the `renderRowLabel` slot). Fills the fixed-width cell and the row's\n (dynamic) height so the content can size itself to the space it's given. */\n.row-header-custom {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n}\n\n/* base look of an event pill — used by the drag ghost */\n.event {\n position: absolute;\n height: 20px;\n border: 1px solid black;\n z-index: 1;\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n border-radius: 5px;\n box-shadow: inset 0px 0px 5px gray;\n}\n\n.event-prompt {\n position: absolute;\n display: none;\n z-index: 3;\n}\n\n.time-bar {\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 50px;\n min-height: 50px;\n border: 1px solid yellow;\n background-color: rgb(39, 36, 36);\n color: white;\n box-sizing: border-box;\n}\n\n.empty-block {\n width: 100px;\n min-width: 100px;\n border-right: 1px solid yellow;\n box-sizing: border-box;\n}\n\n.rt-line {\n position: absolute;\n height: calc(100% - 24px);\n top: 24px;\n width: 2px;\n box-sizing: border-box;\n border-right: dotted 2px red;\n}\n\n.rt-arrow {\n position: absolute;\n top: 0px;\n width: 0;\n height: 0;\n border-left: 15px solid transparent;\n border-right: 15px solid transparent;\n\n border-top: 26px solid red;\n}\n\n.canvas-time-bar {\n height: 100%;\n /* replicates the legacy .hour-row drop shadow onto the content below */\n box-shadow: 0px 4px 20px black;\n}\n\n.canvas-rows-header {\n position: relative;\n flex-shrink: 0;\n}\n\n.canvas-row-header {\n position: absolute;\n width: 100%;\n box-sizing: border-box;\n /* transition is set inline from the `animations` prop */\n}\n\n.canvas-content-column {\n position: relative;\n flex: 1;\n min-width: 0;\n /* the body-wrapper is a flex row; without this the column is stretched to\n the viewport height, the scroll spacer overflows it, and the sticky\n canvas has no room to stick */\n align-self: flex-start;\n}\n\n.canvas-sticky {\n position: sticky;\n top: 0;\n height: 0;\n overflow: visible;\n z-index: 1;\n /* Isolate the sticky's internal layout. The viewport-sized canvases live\n inside it (absolutely positioned); without containment their height leaks\n into the content-sized body-wrapper's size, leaving it taller than its\n rows after a re-stack (a stale gap below the last row). `layout` keeps the\n canvases visible (unlike overflow:hidden) while stopping the leak. */\n contain: layout;\n}\n\n.canvas-sticky canvas {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.canvas-sticky canvas:last-of-type {\n cursor: grab;\n touch-action: none;\n}\n\n.canvas-drag-ghost {\n display: none;\n height: 20px;\n opacity: 50%;\n background-color: white;\n pointer-events: none;\n z-index: 2;\n}\n"],"mappings":";AAAA,CAAC;AACC,SAAO;AACP,UAAQ;AACR,gBAAc,IAAI,MAAM;AACxB,oBAAkB,IAAI,EAAE,EAAE,EAAE,EAAE;AAC9B,SAAO;AACP,cAAY;AACZ,cAAY,IAAI,IAAI,KAAK;AAC3B;AAEA,CAAC;AACC,YAAU;AACV,WAAS;AACT,kBAAgB;AAChB,UAAQ;AACR,SAAO;AACT;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,eAAa,IAAI,MAAM;AACvB,iBAAe,IAAI,MAAM;AACzB,gBAAc,IAAI,MAAM;AACxB,SAAO;AACP,YAAU;AACV,cAAY;AACd;;;AC3BA,CAAC;AACC,WAAS;AACT,mBAAiB;AACjB,eAAa;AACb,SAAO;AACP,cAAY;AACZ,YAAU;AACZ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C,cAoBc,MAAM;AACnB,UAAQ;AACR,gBAAc;AAChB;AAEA,CAAC;AACC,WAAS;AACT,UAAQ;AACR,WAAS;AACT,oBAAkB;AAClB,kBAAgB;AAChB,WAAS;AACX;","names":[]}
1
+ {"version":3,"sources":["../src/style.css","../src/components/style.css"],"sourcesContent":[".rows-header-wrapper {\n width: 100px;\n height: fit-content;\n border-right: 1px solid yellow;\n background-color: rgb(39, 36, 36);\n color: white;\n box-sizing: border-box;\n box-shadow: 4px 0px 20px black;\n /* above the canvas, so bars panned under the header slide beneath its shadow */\n position: relative;\n z-index: 2;\n}\n\n.main-wrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n}\n\n.body-wrapper {\n display: flex;\n flex-direction: row;\n border-left: 1px solid black;\n border-bottom: 1px solid black;\n border-right: 1px solid black;\n width: 100%;\n overflow: auto;\n box-sizing: border-box;\n}\n",".row-header {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100px;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n/* The label wraps to as many lines as it needs; the row height is grown to\n fit it (see SceneStore.setLabelMinHeights) so wrapped labels stay vertically\n centered instead of overflowing into the next row. */\n.row-header-label {\n width: 100%;\n text-align: center;\n white-space: normal;\n overflow-wrap: break-word;\n word-break: break-word;\n}\n\n/* Custom row-header content (the `renderRowLabel` slot). Fills the fixed-width cell and the row's\n (dynamic) height so the content can size itself to the space it's given. */\n.row-header-custom {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n}\n\n/* base look of an event pill — used by the drag ghost */\n.event {\n position: absolute;\n height: 20px;\n border: 1px solid black;\n z-index: 1;\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n border-radius: 5px;\n box-shadow: inset 0px 0px 5px gray;\n}\n\n.event-prompt {\n position: absolute;\n display: none;\n z-index: 3;\n}\n\n.time-bar {\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 50px;\n min-height: 50px;\n border: 1px solid yellow;\n background-color: rgb(39, 36, 36);\n color: white;\n box-sizing: border-box;\n /* its shadow falls over the canvas below rather than under the bars */\n position: relative;\n z-index: 2;\n}\n\n.empty-block {\n width: 100px;\n min-width: 100px;\n border-right: 1px solid yellow;\n box-sizing: border-box;\n}\n\n.rt-line {\n position: absolute;\n z-index: 3;\n height: calc(100% - 24px);\n top: 24px;\n width: 2px;\n box-sizing: border-box;\n border-right: dotted 2px red;\n}\n\n.rt-arrow {\n position: absolute;\n z-index: 3;\n top: 0px;\n width: 0;\n height: 0;\n border-left: 15px solid transparent;\n border-right: 15px solid transparent;\n\n border-top: 26px solid red;\n}\n\n.canvas-time-bar {\n height: 100%;\n /* replicates the legacy .hour-row drop shadow onto the content below */\n box-shadow: 0px 4px 20px black;\n}\n\n.canvas-rows-header {\n position: relative;\n flex-shrink: 0;\n}\n\n.canvas-row-header {\n position: absolute;\n width: 100%;\n box-sizing: border-box;\n /* transition is set inline from the `animations` prop */\n}\n\n.canvas-content-column {\n position: relative;\n flex: 1;\n min-width: 0;\n /* the body-wrapper is a flex row; without this the column is stretched to\n the viewport height, the scroll spacer overflows it, and the sticky\n canvas has no room to stick */\n align-self: flex-start;\n}\n\n.canvas-sticky {\n position: sticky;\n top: 0;\n height: 0;\n overflow: visible;\n z-index: 1;\n /* Isolate the sticky's internal layout. The viewport-sized canvases live\n inside it (absolutely positioned); without containment their height leaks\n into the content-sized body-wrapper's size, leaving it taller than its\n rows after a re-stack (a stale gap below the last row). `layout` keeps the\n canvases visible (unlike overflow:hidden) while stopping the leak. */\n contain: layout;\n}\n\n.canvas-sticky canvas {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.canvas-sticky canvas:last-of-type {\n cursor: grab;\n touch-action: none;\n}\n\n.canvas-drag-ghost {\n display: none;\n height: 20px;\n opacity: 50%;\n background-color: white;\n pointer-events: none;\n z-index: 2;\n}\n"],"mappings":";AAAA,CAAC;AACC,SAAO;AACP,UAAQ;AACR,gBAAc,IAAI,MAAM;A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