ud-components 0.8.13 → 0.9.1

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.
@@ -1,28 +1,15 @@
1
- import { DestroyRef } from '@angular/core';
2
1
  import { MatSnackBar } from '@angular/material/snack-bar';
3
2
  import { TranslateService } from '@ngx-translate/core';
4
- import { OccupancyBar, OccupancyBarClick, OccupancyBarCreate, OccupancyBarMove, OccupancyBarResize, OccupancyCellClick, OccupancyClosure, OccupancyClosureClick, OccupancyRoom } from './occupancy-grid.interface';
5
- import { BarGeometry, GridRow, LaneBar, PositionedRow, RoomRow } from './occupancy-grid.layout';
3
+ import { OccupancyBar, OccupancyBarClick, OccupancyBarCreate, OccupancyBarMove, OccupancyBarResize, OccupancyCellClick, OccupancyClosureClick, OccupancyRoom } from './occupancy-grid.interface';
4
+ import { TimelineBar, TimelineBarCreate, TimelineBarMove, TimelineBarResize, TimelineClosure, TimelineLane } from './timeline-grid.interface';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare const OCCUPANCY_GRID_HEADER_HEIGHT = 52;
8
7
  /**
9
- * Rooms as rows, days as columns, one bar per stay (UC-11). It never writes
10
- * anywhere — `rooms` is the only source of truth and this component never
11
- * mutates it — but it is not read-only in the sense of being inert: a bar's
12
- * edge can be dragged (or, on a focused bar, Shift + arrow-keyed) to propose
13
- * a new date, reported via `barResize`; a bar's body can be dragged to a new
14
- * date, a different room, or both, reported via `barMove`. Every other
15
- * gesture (clicks, the nav buttons) works the same way: report what
16
- * happened, apply nothing.
17
- *
18
- * Owns its own row virtualization: rows have different heights (one lane per
19
- * overlapping stay), which the CDK's stable fixed-size strategy cannot do, and
20
- * the autosize strategy is still experimental. Rows are positioned from a
21
- * prefix sum of heights and only those intersecting the viewport are rendered.
22
- *
23
- * Every date is a YYYY-MM-DD string and every column is computed by
24
- * local-date.ts; `new Date(string)` is never used, so a column can never be
25
- * off by one west of Greenwich.
8
+ * Rooms as rows, days as columns, one bar per stay (UC-11). Since UC-42 a thin
9
+ * adapter over `ud-timeline-grid`: rooms become lanes (grouped dorm › floor ›
10
+ * type), stays become bars, and every generic event is mapped back to the
11
+ * room/stay one, so its inputs and outputs are what they always were. The one
12
+ * room-only rule, capacity (`preventOverbooking`), is enforced here.
26
13
  */
27
14
  export declare class OccupancyGridComponent {
28
15
  private readonly translate;
@@ -42,13 +29,7 @@ export declare class OccupancyGridComponent {
42
29
  * When true, a resize or whole-bar move drag is never allowed to leave
43
30
  * two bars in the same room overlapping in time. The default (false)
44
31
  * lets bars in different lanes of the same room legitimately overlap —
45
- * an outgoing stay's last few nights next to an incoming one's first, say
46
- * — which is exactly what the lane system exists to display. A strict
47
- * room grid, where a room can hold only one booking at a time, sets this
48
- * so a drag simply cannot propose a second one over it: a resize clamps
49
- * at the nearest other bar in the room (not just its own lane), and a
50
- * move drag ignores any candidate date/room that would overlap, sticking
51
- * to the last placement that did not.
32
+ * an outgoing stay's last few nights next to an incoming one's first, say.
52
33
  */
53
34
  preventOverlap: import("@angular/core").InputSignal<boolean>;
54
35
  /**
@@ -64,322 +45,39 @@ export declare class OccupancyGridComponent {
64
45
  /** An empty day cell was clicked: the room and the date under the pointer. */
65
46
  cellClick: import("@angular/core").OutputEmitterRef<OccupancyCellClick>;
66
47
  reachedEnd: import("@angular/core").OutputEmitterRef<string>;
67
- /**
68
- * The nav buttons or an arrow key asked to move the window. The component
69
- * does not own `from`/`to` (the consumer does, same as every other input
70
- * here), so it reports the signed day delta — negative for earlier,
71
- * positive for later — rather than computing new dates itself. A consumer
72
- * that wants the shift applied does
73
- * `from = addDays(from, delta); to = addDays(to, delta)`.
74
- */
48
+ /** The signed day delta the nav buttons or an arrow key asked for; see `TimelineGridComponent.windowShift`. */
75
49
  windowShift: import("@angular/core").OutputEmitterRef<number>;
76
- /**
77
- * A bar's edge was dragged, or Shift + arrow-keyed, to a new date. See
78
- * `OccupancyBarResize` — this reports the proposal; it never applies it.
79
- */
50
+ /** See `OccupancyBarResize` — this reports the proposal; it never applies it. */
80
51
  barResize: import("@angular/core").OutputEmitterRef<OccupancyBarResize>;
81
- /**
82
- * A bar's body was dragged to new dates, a different room, or both. See
83
- * `OccupancyBarMove` — this reports the proposal; it never applies it.
84
- */
52
+ /** See `OccupancyBarMove` — this reports the proposal; it never applies it. */
85
53
  barMove: import("@angular/core").OutputEmitterRef<OccupancyBarMove>;
86
- /**
87
- * A new booking's dates were proposed by dragging across empty lane cells,
88
- * or by the keyboard-driven create flow (see `onLaneKeydown`). See
89
- * `OccupancyBarCreate` — this reports the proposal; it never creates a bar
90
- * itself.
91
- */
54
+ /** See `OccupancyBarCreate` — this reports the proposal; it never creates a bar itself. */
92
55
  barCreate: import("@angular/core").OutputEmitterRef<OccupancyBarCreate>;
93
- protected readonly headerHeight = 52;
94
- private readonly scroller;
95
- private readonly collapsed;
96
- private readonly scrollTop;
97
- private readonly viewportHeight;
98
- private lastEndEmittedFor;
99
- /**
100
- * The in-progress drag, if any — null the rest of the time. `geometryOf`
101
- * and `barTitle` read the preview dates for whichever bar this names so
102
- * the drag renders live; nothing else about `rooms` changes, since the
103
- * component does not own that input.
104
- */
105
- protected readonly resize: import("@angular/core").WritableSignal<{
106
- room: OccupancyRoom;
107
- bar: OccupancyBar;
56
+ protected readonly lanes: import("@angular/core").Signal<TimelineLane[]>;
57
+ protected readonly roomOf: (lane: TimelineLane) => OccupancyRoom;
58
+ protected readonly barOf: (bar: TimelineBar) => OccupancyBar;
59
+ private readonly grid;
60
+ /** The live edge drag, as this component held it before UC-42 moved it into the timeline grid. */
61
+ protected readonly resize: import("@angular/core").Signal<{
62
+ lane: TimelineLane;
63
+ bar: TimelineBar;
108
64
  edge: "start" | "end";
109
65
  previewStart: string;
110
66
  previewEnd: string;
111
67
  minBound: string | null;
112
68
  maxBound: string | null;
113
69
  } | null>;
114
- private dragMoveListener;
115
- private dragUpListener;
116
- private dragKeyListener;
117
- /**
118
- * The in-progress whole-bar drag, if any — null the rest of the time.
119
- * `dragging` only flips true once the pointer clears a small threshold, so
120
- * a plain click (mousedown + mouseup with no real movement) still opens
121
- * the drawer as `barClick` instead of being swallowed as a zero-distance
122
- * move. `targetRoom` starts as `fromRoom` and is re-resolved on every
123
- * mousemove from whatever `.occ__row--room` is actually under the
124
- * pointer — see `roomUnderPoint` — so dragging vertically onto another
125
- * room's row is exactly the gesture `roomUnderPoint` is built to read.
126
- */
127
- protected readonly move: import("@angular/core").WritableSignal<{
128
- bar: OccupancyBar;
129
- fromRoom: OccupancyRoom;
130
- startClientX: number;
131
- startClientY: number;
132
- originalStartDate: string;
133
- originalEndDate: string;
134
- previewStartDate: string;
135
- previewEndDate: string;
136
- targetRoom: OccupancyRoom;
137
- dragging: boolean;
138
- } | null>;
139
- private moveMoveListener;
140
- private moveUpListener;
141
- private moveKeyListener;
142
- /**
143
- * The in-progress drag-to-create, if any — null the rest of the time.
144
- * `startDate` is the anchor the drag began from (mouse) or the focused
145
- * cell it started from (keyboard); `previewStart`/`previewEnd` are what
146
- * gets emitted. `viaKeyboard` distinguishes the two sources: a mouse
147
- * create only commits on mouseup and only once it clears the same
148
- * click-vs-drag threshold `move` uses, while a keyboard create is live the
149
- * instant Enter starts it (there is no "release" to wait for) and commits
150
- * on a second Enter.
151
- */
152
- protected readonly create: import("@angular/core").WritableSignal<{
153
- room: OccupancyRoom;
154
- lane: number;
155
- startDate: string;
156
- startClientX: number;
157
- previewStart: string;
158
- previewEnd: string;
159
- dragging: boolean;
160
- viaKeyboard: boolean;
161
- } | null>;
162
- private createMoveListener;
163
- private createUpListener;
164
- private createKeyListener;
165
- /**
166
- * The keyboard-focused empty cell, if any — a room and a date, tracked so
167
- * Tab can reach an empty lane and arrow keys have somewhere to move from.
168
- * Cleared on blur unless a keyboard create (see `create`) is in progress,
169
- * so the highlighted cell does not vanish out from under an active
170
- * gesture.
171
- */
172
- protected readonly laneFocus: import("@angular/core").WritableSignal<{
173
- roomId: string;
174
- date: string;
175
- } | null>;
176
- /**
177
- * The day column under the pointer anywhere on the canvas (header, lanes,
178
- * bars), as an index into days(), or null. Drawn as a full-height band in
179
- * every visible row and a tinted header cell, so together with the row wash
180
- * the pointer reads as a crosshair: which room, which night.
181
- */
182
- protected readonly hoverDay: import("@angular/core").WritableSignal<number | null>;
183
- /**
184
- * The empty cell the mouse is currently over, if any — the pointer
185
- * equivalent of `laneFocus`, so a mouse user gets the same "here's what
186
- * you're about to create on" cue a keyboard user gets from Tab. Cleared
187
- * whenever any gesture (create, resize, or a whole-bar move) is live, so
188
- * it never competes with that gesture's own preview.
189
- */
190
- protected readonly laneHover: import("@angular/core").WritableSignal<{
191
- roomId: string;
192
- date: string;
193
- lane: number;
194
- } | null>;
195
- /**
196
- * The pointer is over a bar or closure. Suppresses the focus-cursor
197
- * fallback in `laneCursorGeometry`, so a stale keyboard cell does not show
198
- * up elsewhere while the pointer is on a stay.
199
- */
200
- private readonly pointerOnBar;
201
- private suppressNextClick;
202
- private suppressNextClickTimer;
203
- constructor(translate: TranslateService, snackBar: MatSnackBar, destroyRef: DestroyRef);
204
- protected readonly dayCount: import("@angular/core").Signal<number>;
205
- protected readonly canvasWidth: import("@angular/core").Signal<number>;
206
- protected readonly rows: import("@angular/core").Signal<GridRow[]>;
207
- protected readonly positioned: import("@angular/core").Signal<PositionedRow[]>;
208
- protected readonly bodyHeight: import("@angular/core").Signal<number>;
209
- protected readonly visible: import("@angular/core").Signal<PositionedRow[]>;
210
- protected readonly days: import("@angular/core").Signal<import("ud-components").DayColumn[]>;
211
- protected readonly months: import("@angular/core").Signal<import("ud-components").MonthSegment[]>;
212
- protected readonly weekendOffsetPx: import("@angular/core").Signal<number>;
213
- protected readonly todayLeft: import("@angular/core").Signal<number | null>;
214
- private readonly roomsById;
215
- /**
216
- * The floating copy of a bar being dragged by its body — null unless a
217
- * move drag has cleared the click threshold. Positioned in canvas
218
- * coordinates (like `.occ__today`) rather than inside a room's own lane,
219
- * because a move can target a room other than the one the drag started
220
- * in; `positioned()` already has every visible row's pixel `top`, so no
221
- * separate DOM lookup is needed to place it. Always drawn at lane 0 of the
222
- * target room — a simplification the consumer's own re-lane on save
223
- * supersedes anyway, same as the rest of this component's "report the
224
- * gesture, never own the data" contract.
225
- */
226
- protected readonly moveGhost: import("@angular/core").Signal<{
227
- left: number;
228
- top: number;
229
- width: number;
230
- height: number;
231
- label: string;
232
- state: import("ud-components").OccupancyBarState;
233
- } | null>;
234
- /** The in-progress drag-to-create's preview span, once it clears the drag threshold (mouse) or as soon as it starts (keyboard). */
235
- protected readonly createGhost: import("@angular/core").Signal<{
236
- left: number;
237
- top: number;
238
- width: number;
239
- height: number;
240
- } | null>;
241
- /**
242
- * The empty cell to outline — the mouse hover position if the pointer is
243
- * over one, otherwise the keyboard-focused cell — whenever no create
244
- * gesture is overriding it with its own live preview.
245
- */
246
- protected readonly laneCursorGeometry: import("@angular/core").Signal<{
247
- left: number;
248
- top: number;
249
- width: number;
250
- height: number;
251
- } | null>;
252
- /** Canvas-coordinate box for a date span in a given room's row — shared by `createGhost` and `laneCursorGeometry`; `lane` picks which of the row's lanes it sits in. */
253
- private ghostGeometry;
254
- /** Where a keyboard create lands: the room's free lane when it has one, else lane 0. */
255
- private createLane;
256
- private monthLabels;
257
- protected geometryOf(bar: OccupancyBar): BarGeometry | null;
258
- /** The in-progress drag's proposed dates for this bar, or null if it is not the one being dragged. */
259
- private previewDatesOf;
260
- protected isResizing(bookingId: string): boolean;
261
- /** True once a whole-bar drag on this booking has cleared the click threshold — see `move`. */
262
- protected isBeingMoved(bookingId: string): boolean;
263
- /** True while a whole-bar drag is hovering this room as its drop target. */
264
- protected isMoveTarget(roomId: string): boolean;
265
- protected closureGeometryOf(closure: OccupancyClosure): BarGeometry | null;
266
- /**
267
- * Beds taken on the first day shown, not today (UC-18). The consumer loads
268
- * only the bars overlapping the window, so today's count was 0 whenever the
269
- * window did not include today; the first day shown is always loaded.
270
- */
271
- protected takenOn(room: OccupancyRoom): number | null;
272
- protected isCollapsed(key: string): boolean;
273
- protected toggleGroup(key: string): void;
274
- protected barTitle(bar: OccupancyBar): string;
275
- protected closureTitle(closure: OccupancyClosure): string;
276
- protected onScroll(): void;
277
- protected trackRow(_: number, p: PositionedRow): string;
278
- protected asRoomRow(row: GridRow): RoomRow;
279
- /** ‹ / › nav buttons. Emits the signed day delta; see `windowShift`. */
280
- protected shiftWindow(direction: -1 | 1): void;
281
- /**
282
- * ArrowLeft/ArrowRight anywhere in the grid page the window, the same as
283
- * the nav buttons — a keyboard user reaching a bar via Tab should not have
284
- * to find the buttons to keep moving through time. Left alone otherwise:
285
- * a bar, room cell or group header's own Enter handling is untouched.
286
- */
287
- protected onGridKeydown(event: KeyboardEvent): void;
288
- /**
289
- * A click inside a room's lane that landed on neither a bar nor a closure
290
- * (both stop propagation before this fires) — the room and the date under
291
- * the pointer. See `OccupancyCellClick`.
292
- */
293
- protected onLaneClick(event: MouseEvent, room: OccupancyRoom): void;
294
- /** The bar's own click handler routes through here so it shares the same resize-click guard as `onLaneClick`. */
295
- protected onBarClick(bar: OccupancyBar, room: OccupancyRoom): void;
296
- /**
297
- * Mousedown on a bar's edge handle starts a drag. Listeners go on
298
- * `window`, not the handle, because the pointer will move well outside
299
- * an 8px-wide handle the instant the drag starts; `stopPropagation` keeps
300
- * this from also being read as a click on the bar (which would open the
301
- * drawer) or on the lane underneath it (a `cellClick`).
302
- */
303
- protected startResize(event: MouseEvent, room: OccupancyRoom, bar: OccupancyBar, edge: 'start' | 'end', laneBars: LaneBar[]): void;
304
- private onDragMove;
305
- /** Mouseup (commit) or Escape (cancel). Emits `barResize` only on commit with an actual change. */
306
- private endResize;
70
+ constructor(translate: TranslateService, snackBar: MatSnackBar);
71
+ protected onClosureClick(closure: TimelineClosure, lane: TimelineLane): void;
72
+ protected onBarResize(e: TimelineBarResize): void;
73
+ protected onBarMove(e: TimelineBarMove): void;
74
+ protected onBarCreate(e: TimelineBarCreate): void;
307
75
  /**
308
76
  * With `preventOverbooking`, a gesture that would put more stays in a room
309
77
  * than it has beds is dropped here, so the bar simply stays where it was,
310
78
  * with a snackbar saying why.
311
79
  */
312
80
  private rejectIfOverbooked;
313
- private removeDragListeners;
314
- /**
315
- * Mousedown on a bar's own body (never the edge handles — those stop
316
- * propagation before this fires) arms a possible whole-bar move, but does
317
- * not yet commit to one: `dragging` stays false, and nothing is rendered
318
- * differently, until `onBarDragMove` sees the pointer clear a small
319
- * threshold. That is what lets a plain click still fall through to
320
- * `onBarClick` unchanged.
321
- */
322
- protected startBarMove(event: MouseEvent, room: OccupancyRoom, bar: OccupancyBar): void;
323
- private onBarDragMove;
324
- /** Mouseup (commit) or Escape (cancel). Emits `barMove` only on commit with an actual change. */
325
- private endBarMove;
326
- private removeMoveListeners;
327
- /**
328
- * Mousedown on a lane's empty background arms a possible drag-to-create,
329
- * on the same click-vs-drag threshold as `startBarMove` — a plain click
330
- * still falls through to `onLaneClick`'s `cellClick` unchanged, since
331
- * `endCreate` only emits once `dragging` has flipped true.
332
- */
333
- protected startCreate(event: MouseEvent, room: OccupancyRoom, lane?: number): void;
334
- private onCreateDragMove;
335
- /** Mouseup (commit) or Escape (cancel), for both the mouse and keyboard paths. Emits `barCreate` only once a drag actually cleared the threshold (or a keyboard create was started) and is committed. */
336
- private endCreate;
337
- private removeCreateListeners;
338
- /**
339
- * Focus lands on an empty lane (Tab, or a mouse click on it) — arm a
340
- * keyboard cursor at today (or the window's first day, if today is out of
341
- * view) unless this room already has one. Left alone while a keyboard
342
- * create is in progress on this lane, so refocusing mid-gesture cannot
343
- * reset it.
344
- */
345
- protected onLaneFocus(room: OccupancyRoom): void;
346
- /**
347
- * The pointer moved over a lane's empty background — update the hover
348
- * cursor to the date under it. Ignored while a create, resize, or
349
- * whole-bar move is live (that gesture already draws its own preview),
350
- * and when the event bubbled up from a bar or closure rather than
351
- * landing on the background itself, so hovering an existing booking does
352
- * not also outline the empty-cell cursor underneath it.
353
- */
354
- protected onLaneMouseMove(event: MouseEvent, room: OccupancyRoom, lane?: number): void;
355
- protected onCanvasMouseMove(event: MouseEvent): void;
356
- protected onLaneMouseLeave(room: OccupancyRoom): void;
357
- protected onLaneBlur(): void;
358
- private defaultCursorDate;
359
- /**
360
- * Keyboard path for drag-to-create: with no create in progress, plain
361
- * ArrowLeft/ArrowRight move the focused cell one day and Enter/Space marks
362
- * it as the start of a new booking; once that create is live, the same
363
- * arrow keys extend or shorten the departure date (mirroring
364
- * `onBarKeydownResize`'s departure-only convention) and a second Enter
365
- * commits, Escape cancels.
366
- */
367
- protected onLaneKeydown(event: KeyboardEvent, room: OccupancyRoom): void;
368
- /** Whatever room row (if any) is actually rendered under this point — see `.occ__row--room`'s `data-room-id`. */
369
- private roomUnderPoint;
370
- private armSuppressNextClick;
371
- private consumeSuppressNextClick;
372
- private clientXToDate;
373
- /**
374
- * The keyboard equivalent of dragging the departure edge: Shift+ArrowRight
375
- * extends by a night, Shift+ArrowLeft shortens by one, each key press
376
- * committing immediately (there is nothing to "release" the way a mouse
377
- * drag has). Scoped to the departure edge only — the more common "extend a
378
- * stay" gesture — so one binding covers the primary case without a second
379
- * modifier combination to document; the arrival edge is still reachable by
380
- * dragging its handle with a mouse.
381
- */
382
- protected onBarKeydownResize(event: KeyboardEvent, room: OccupancyRoom, bar: OccupancyBar, laneBars: LaneBar[]): void;
383
81
  static ɵfac: i0.ɵɵFactoryDeclaration<OccupancyGridComponent, never>;
384
82
  static ɵcmp: i0.ɵɵComponentDeclaration<OccupancyGridComponent, "ud-occupancy-grid", never, { "rooms": { "alias": "rooms"; "required": false; "isSignal": true; }; "dormName": { "alias": "dormName"; "required": false; "isSignal": true; }; "from": { "alias": "from"; "required": true; "isSignal": true; }; "to": { "alias": "to"; "required": true; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "dayWidth": { "alias": "dayWidth"; "required": false; "isSignal": true; }; "leftColumnWidth": { "alias": "leftColumnWidth"; "required": false; "isSignal": true; }; "laneHeight": { "alias": "laneHeight"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "navStepDays": { "alias": "navStepDays"; "required": false; "isSignal": true; }; "preventOverlap": { "alias": "preventOverlap"; "required": false; "isSignal": true; }; "preventOverbooking": { "alias": "preventOverbooking"; "required": false; "isSignal": true; }; }, { "barClick": "barClick"; "closureClick": "closureClick"; "roomClick": "roomClick"; "cellClick": "cellClick"; "reachedEnd": "reachedEnd"; "windowShift": "windowShift"; "barResize": "barResize"; "barMove": "barMove"; "barCreate": "barCreate"; }, never, never, true, never>;
385
83
  }
@@ -52,9 +52,15 @@ export declare function buildRows(rooms: OccupancyRoom[], dormName: string, coll
52
52
  export declare const GROUP_ROW_HEIGHT = 28;
53
53
  export declare function rowHeight(row: GridRow, laneHeight: number): number;
54
54
  export declare function positionRows(rows: GridRow[], laneHeight: number): PositionedRow[];
55
- export declare function totalHeight(positioned: PositionedRow[]): number;
55
+ export declare function totalHeight(positioned: {
56
+ top: number;
57
+ height: number;
58
+ }[]): number;
56
59
  /** Indices [first, last] of rows intersecting the viewport, with overscan. Binary search on top. */
57
- export declare function visibleRange(positioned: PositionedRow[], scrollTop: number, viewportHeight: number, overscan?: number): {
60
+ export declare function visibleRange(positioned: {
61
+ top: number;
62
+ height: number;
63
+ }[], scrollTop: number, viewportHeight: number, overscan?: number): {
58
64
  first: number;
59
65
  last: number;
60
66
  };
@@ -99,12 +105,22 @@ export declare function laneNeighborBound(laneBars: LaneBar[], bookingId: string
99
105
  */
100
106
  export declare function overlapsRoom(room: OccupancyRoom, bookingId: string, start: string, end: string): boolean;
101
107
  /** Whether `[start, end)` overlaps any closed period of the room (half-open, like `overlapsRoom`). */
102
- export declare function overlapsClosure(room: OccupancyRoom, start: string, end: string): boolean;
108
+ export declare function overlapsClosure(room: {
109
+ closures: {
110
+ startDate: string;
111
+ endDate: string;
112
+ }[];
113
+ }, start: string, end: string): boolean;
103
114
  /**
104
115
  * Pulls a create drag's moving edge back to the nearest closed period between
105
116
  * it and the anchor, so a drag can stop at a closure but never cross it.
106
117
  */
107
- export declare function clampToClosures(room: OccupancyRoom, anchor: string, date: string): string;
118
+ export declare function clampToClosures(room: {
119
+ closures: {
120
+ startDate: string;
121
+ endDate: string;
122
+ }[];
123
+ }, anchor: string, date: string): string;
108
124
  /**
109
125
  * The lane a new stay over `[start, end)` would sit in: the first lane of the
110
126
  * row with no bar in that span (the same greedy rule `assignLanes` uses), or,