ud-components 0.9.1 → 0.9.2

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.
@@ -88,6 +88,10 @@ export declare class TimelineGridComponent {
88
88
  protected readonly headerHeight = 52;
89
89
  private readonly scroller;
90
90
  private readonly collapsed;
91
+ /** Bars whose text needs more than `laneHeight`, keyed by bar id, with the height they need. */
92
+ private readonly barHeights;
93
+ /** Group headers whose label needs more than a group row, keyed by group key, with the height they need. */
94
+ private readonly groupHeights;
91
95
  private readonly scrollTop;
92
96
  private readonly viewportHeight;
93
97
  private lastEndEmittedFor;
@@ -243,6 +247,14 @@ export declare class TimelineGridComponent {
243
247
  private laneRowOf;
244
248
  /** Canvas-coordinate box for a date span in a given lane's row; `slot` picks which of the row's slots it sits in. */
245
249
  private ghostGeometry;
250
+ /**
251
+ * Measures the rendered bars and group headers whose text needs more room
252
+ * than its base height, so the next layout grows that row. Runs after every
253
+ * render; it only writes when a height changes, so it settles.
254
+ */
255
+ private measureRows;
256
+ /** `current`, or a copy with each matched element's natural height recorded when it is taller than `base` (and forgotten when it no longer is). */
257
+ private tallerThanBase;
246
258
  /** Where a keyboard create lands: the lane's free slot when it has one, else slot 0. */
247
259
  private createSlot;
248
260
  private monthLabels;
@@ -32,6 +32,8 @@ export interface TimelinePositionedRow {
32
32
  row: TimelineRow;
33
33
  top: number;
34
34
  height: number;
35
+ /** A lane's slot height: the base lane height, grown to fit its tallest bar. 0 for a group row. */
36
+ slotHeight: number;
35
37
  }
36
38
  /** Greedy interval packing. Half-open, so a bar starting the day another ends shares its slot. */
37
39
  export declare function packBars(bars: TimelineBar[]): TimelineLaneBar[];
@@ -41,7 +43,12 @@ export declare function packBars(bars: TimelineBar[]): TimelineLaneBar[];
41
43
  * below them.
42
44
  */
43
45
  export declare function buildTimelineRows(lanes: TimelineLane[], collapsed: ReadonlySet<string>): TimelineRow[];
44
- export declare function positionTimelineRows(rows: TimelineRow[], laneHeight: number): TimelinePositionedRow[];
46
+ /**
47
+ * `barHeights` holds the measured height of each bar whose text needs more
48
+ * than `laneHeight`, keyed by bar id; every bar in a lane shares one slot
49
+ * height, so the tallest one sets it.
50
+ */
51
+ export declare function positionTimelineRows(rows: TimelineRow[], laneHeight: number, barHeights: ReadonlyMap<string, number>, groupHeights: ReadonlyMap<string, number>): TimelinePositionedRow[];
45
52
  /** Bars whose days include `date`. */
46
53
  export declare function takenOnLane(lane: TimelineLane, date: string): number;
47
54
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ud-components",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=19",
6
6
  "@angular/common": ">=19",