@super-calendar/core 2.18.0 → 2.19.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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as eventAccessibilityLabel, $t as BusinessHoursBand, A as backgroundBandsForDay, At as isWeekend, B as wallClockHours, Bt as isDateSelectable, C as MonthWeekEvents, Ct as buildMonthWeeks, D as layoutMonthWeek, Dt as getWeekDays, E as buildMonthGrid, Et as getViewDays, F as eventDayKeys, Ft as DateRange, G as ToICalendarOptions, Gt as RangeBandKind, H as EventSourceOptions, Ht as isWithinDateRange, I as groupEventsByDay, It as DateSelectionConstraints, J as EventAccessibilityLabelContext, Jt as rangeBandKind, K as parseICalendar, Kt as bandRounding, L as isAllDayEvent, Lt as DaySelectionState, M as closedHourBands, Mt as viewDayCount, N as compareDayEvents, Nt as weekDaysCount, O as weekdayFormatToken, Ot as getYearMonths, P as drawnEnd, Pt as CalendarSelection, Q as MonthEventCapacity, Qt as BusinessHours, R as isBackgroundEvent, Rt as UseDateRangeOptions, S as MonthGridWeekday, St as snapDeltaMinutes, T as WeekdayFormat, Tt as getIsToday, U as loadEventSource, Ut as nextDateRange, V as EventSource, Vt as isRangeEndpoint, W as ICalEvent, Wt as DayBadgeKind, X as EventChipLayout, Xt as darkColors, Y as EventAccessibilityLabeler, Yt as CalendarColors, Z as MIN_BOX_HEIGHT_FOR_TIME, Zt as lightColors, _ as buildMultiWeekGrid, _t as movedClockSpan, a as nowInTimeZone, an as EventKeyExtractor, at as monthVisibleCount, b as MonthGridDay, bt as resolveDraggedBounds, c as zonedEventSource, cn as RecurrenceRule, ct as CalendarLabels, d as expandRecurringEvents, dn as WeekStartsOn, dt as resolveCalendarLabels, en as BusinessHoursValue, et as eventChipLayout, f as MultiWeekGrid, ft as cellRangeFromDrag, g as MultiWeekGridWeek, gt as monthDropBounds, h as MultiWeekGridOptions, ht as monthCreateRange, i as fromZonedTime, in as CreateGhostArgs, it as monthEventCapacity, j as clockHoursBetween, jt as minutesIntoDay, k as PositionedEvent, kt as isSameCalendarDay, l as zonedTimeToUtc, ln as ScrollToTimeOptions, lt as dayAccessibilityLabel, m as MultiWeekGridInterval, mt as eventsOverlap, n as eventsInTimeZone, nn as CalendarHandle, nt as formatHour, o as toZonedTime, on as ICalendarEvent, ot as titleEllipsizeMode, p as MultiWeekGridDay, pt as clampMoveStartMinutes, q as toICalendar, qt as dayBadgeKind, r as fromZonedRange, rn as CalendarMode, rt as isTimeVisibleAtHeight, s as zonedDragBounds, sn as RecurrenceFrequency, st as titleNumberOfLines, t as ZonedDragBoundsOptions, tn as CalendarEvent, tt as eventTimeLabel, u as ExpandRecurringEventsOptions, un as TimeGridMode, ut as defaultCalendarLabels, v as MonthEventSegment, vt as overlapsOtherEvents, w as UseMonthGridOptions, wt as filterHiddenDays, x as MonthGridWeek, xt as shiftMinutes, y as MonthGrid, yt as pageStepDays, z as layoutDayEvents, zt as daySelectionState } from "./timezone-BY2vQwRx.mjs";
1
+ import { $ as EventAccessibilityLabelContext, $t as rangeBandKind, A as monthExtraLaneColumns, At as getIsToday, B as eventDayKeys, Bt as DateRange, C as MonthRowLanes, Ct as overlapsOtherEvents, D as buildMonthGrid, Dt as snapDeltaMinutes, E as WeekdayFormat, Et as shiftMinutes, F as backgroundBandsForDay, Ft as isWeekend, G as wallClockHours, Gt as isDateSelectable, H as isAllDayEvent, Ht as DaySelectionState, I as clockHoursBetween, It as minutesIntoDay, J as loadEventSource, Jt as nextDateRange, K as EventSource, Kt as isRangeEndpoint, L as closedHourBands, Lt as viewDayCount, M as weekdayFormatToken, Mt as getWeekDays, N as withDraftEventDays, Nt as getYearMonths, O as keepMonthDraftVisible, Ot as buildMonthWeeks, P as PositionedEvent, Pt as isSameCalendarDay, Q as toICalendar, Qt as dayBadgeKind, R as compareDayEvents, Rt as weekDaysCount, S as MonthGridWeekday, St as movedClockSpan, T as UseMonthGridOptions, Tt as resolveDraggedBounds, U as isBackgroundEvent, Ut as UseDateRangeOptions, V as groupEventsByDay, Vt as DateSelectionConstraints, W as layoutDayEvents, Wt as daySelectionState, X as ToICalendarOptions, Xt as RangeBandKind, Y as ICalEvent, Yt as DayBadgeKind, Z as parseICalendar, Zt as bandRounding, _ as buildMultiWeekGrid, _t as cellRangeFromDrag, a as nowInTimeZone, an as BusinessHoursValue, at as eventChipLayout, b as MonthGridDay, bt as monthCreateRange, c as zonedEventSource, cn as CalendarMode, ct as isTimeVisibleAtHeight, d as expandRecurringEvents, dn as ICalendarEvent, dt as titleEllipsizeMode, en as CalendarColors, et as EventAccessibilityLabeler, f as MultiWeekGrid, fn as RecurrenceFrequency, ft as titleNumberOfLines, g as MultiWeekGridWeek, gn as WeekStartsOn, gt as resolveCalendarLabels, h as MultiWeekGridOptions, hn as TimeGridMode, ht as defaultCalendarLabels, i as fromZonedTime, in as BusinessHoursBand, it as eventAccessibilityLabel, j as monthVisibleBars, jt as getViewDays, k as layoutMonthWeek, kt as filterHiddenDays, l as zonedTimeToUtc, ln as CreateGhostArgs, lt as monthEventCapacity, m as MultiWeekGridInterval, mn as ScrollToTimeOptions, mt as dayAccessibilityLabel, n as eventsInTimeZone, nn as lightColors, nt as MIN_BOX_HEIGHT_FOR_TIME, o as toZonedTime, on as CalendarEvent, ot as eventTimeLabel, p as MultiWeekGridDay, pn as RecurrenceRule, pt as CalendarLabels, q as EventSourceOptions, qt as isWithinDateRange, r as fromZonedRange, rn as BusinessHours, rt as MonthEventCapacity, s as zonedDragBounds, sn as CalendarHandle, st as formatHour, t as ZonedDragBoundsOptions, tn as darkColors, tt as EventChipLayout, u as ExpandRecurringEventsOptions, un as EventKeyExtractor, ut as monthVisibleCount, v as MonthEventSegment, vt as clampMoveStartMinutes, w as MonthWeekEvents, wt as pageStepDays, x as MonthGridWeek, xt as monthDropBounds, y as MonthGrid, yt as eventsOverlap, z as drawnEnd, zt as CalendarSelection } from "./timezone-DhGhYIeB.mjs";
2
2
  import { Dispatch, SetStateAction } from "react";
3
3
  /** Options for {@link useNow}. */
4
4
  export interface UseNowOptions {
@@ -91,4 +91,4 @@ export declare function useDateRange(options?: UseDateRangeOptions): UseDateRang
91
91
  * ```
92
92
  */
93
93
  export declare function useMonthGrid(month: Date, options?: UseMonthGridOptions): MonthGrid;
94
- export { BusinessHours, BusinessHoursBand, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarHandle, CalendarLabels, CalendarMode, CalendarSelection, CreateGhostArgs, DateRange, DateSelectionConstraints, DayBadgeKind, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventChipLayout, EventKeyExtractor, EventSource, EventSourceOptions, ExpandRecurringEventsOptions, ICalEvent, ICalendarEvent, MIN_BOX_HEIGHT_FOR_TIME, MonthEventCapacity, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RangeBandKind, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekdayFormat, ZonedDragBoundsOptions, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
94
+ export { BusinessHours, BusinessHoursBand, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarHandle, CalendarLabels, CalendarMode, CalendarSelection, CreateGhostArgs, DateRange, DateSelectionConstraints, DayBadgeKind, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventChipLayout, EventKeyExtractor, EventSource, EventSourceOptions, ExpandRecurringEventsOptions, ICalEvent, ICalendarEvent, MIN_BOX_HEIGHT_FOR_TIME, MonthEventCapacity, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthRowLanes, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RangeBandKind, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekdayFormat, ZonedDragBoundsOptions, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, keepMonthDraftVisible, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthExtraLaneColumns, monthVisibleBars, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, withDraftEventDays, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as eventAccessibilityLabel, $t as BusinessHoursBand, A as backgroundBandsForDay, At as isWeekend, B as wallClockHours, Bt as isDateSelectable, C as MonthWeekEvents, Ct as buildMonthWeeks, D as layoutMonthWeek, Dt as getWeekDays, E as buildMonthGrid, Et as getViewDays, F as eventDayKeys, Ft as DateRange, G as ToICalendarOptions, Gt as RangeBandKind, H as EventSourceOptions, Ht as isWithinDateRange, I as groupEventsByDay, It as DateSelectionConstraints, J as EventAccessibilityLabelContext, Jt as rangeBandKind, K as parseICalendar, Kt as bandRounding, L as isAllDayEvent, Lt as DaySelectionState, M as closedHourBands, Mt as viewDayCount, N as compareDayEvents, Nt as weekDaysCount, O as weekdayFormatToken, Ot as getYearMonths, P as drawnEnd, Pt as CalendarSelection, Q as MonthEventCapacity, Qt as BusinessHours, R as isBackgroundEvent, Rt as UseDateRangeOptions, S as MonthGridWeekday, St as snapDeltaMinutes, T as WeekdayFormat, Tt as getIsToday, U as loadEventSource, Ut as nextDateRange, V as EventSource, Vt as isRangeEndpoint, W as ICalEvent, Wt as DayBadgeKind, X as EventChipLayout, Xt as darkColors, Y as EventAccessibilityLabeler, Yt as CalendarColors, Z as MIN_BOX_HEIGHT_FOR_TIME, Zt as lightColors, _ as buildMultiWeekGrid, _t as movedClockSpan, a as nowInTimeZone, an as EventKeyExtractor, at as monthVisibleCount, b as MonthGridDay, bt as resolveDraggedBounds, c as zonedEventSource, cn as RecurrenceRule, ct as CalendarLabels, d as expandRecurringEvents, dn as WeekStartsOn, dt as resolveCalendarLabels, en as BusinessHoursValue, et as eventChipLayout, f as MultiWeekGrid, ft as cellRangeFromDrag, g as MultiWeekGridWeek, gt as monthDropBounds, h as MultiWeekGridOptions, ht as monthCreateRange, i as fromZonedTime, in as CreateGhostArgs, it as monthEventCapacity, j as clockHoursBetween, jt as minutesIntoDay, k as PositionedEvent, kt as isSameCalendarDay, l as zonedTimeToUtc, ln as ScrollToTimeOptions, lt as dayAccessibilityLabel, m as MultiWeekGridInterval, mt as eventsOverlap, n as eventsInTimeZone, nn as CalendarHandle, nt as formatHour, o as toZonedTime, on as ICalendarEvent, ot as titleEllipsizeMode, p as MultiWeekGridDay, pt as clampMoveStartMinutes, q as toICalendar, qt as dayBadgeKind, r as fromZonedRange, rn as CalendarMode, rt as isTimeVisibleAtHeight, s as zonedDragBounds, sn as RecurrenceFrequency, st as titleNumberOfLines, t as ZonedDragBoundsOptions, tn as CalendarEvent, tt as eventTimeLabel, u as ExpandRecurringEventsOptions, un as TimeGridMode, ut as defaultCalendarLabels, v as MonthEventSegment, vt as overlapsOtherEvents, w as UseMonthGridOptions, wt as filterHiddenDays, x as MonthGridWeek, xt as shiftMinutes, y as MonthGrid, yt as pageStepDays, z as layoutDayEvents, zt as daySelectionState } from "./timezone-BY2vQwRx.js";
1
+ import { $ as EventAccessibilityLabelContext, $t as rangeBandKind, A as monthExtraLaneColumns, At as getIsToday, B as eventDayKeys, Bt as DateRange, C as MonthRowLanes, Ct as overlapsOtherEvents, D as buildMonthGrid, Dt as snapDeltaMinutes, E as WeekdayFormat, Et as shiftMinutes, F as backgroundBandsForDay, Ft as isWeekend, G as wallClockHours, Gt as isDateSelectable, H as isAllDayEvent, Ht as DaySelectionState, I as clockHoursBetween, It as minutesIntoDay, J as loadEventSource, Jt as nextDateRange, K as EventSource, Kt as isRangeEndpoint, L as closedHourBands, Lt as viewDayCount, M as weekdayFormatToken, Mt as getWeekDays, N as withDraftEventDays, Nt as getYearMonths, O as keepMonthDraftVisible, Ot as buildMonthWeeks, P as PositionedEvent, Pt as isSameCalendarDay, Q as toICalendar, Qt as dayBadgeKind, R as compareDayEvents, Rt as weekDaysCount, S as MonthGridWeekday, St as movedClockSpan, T as UseMonthGridOptions, Tt as resolveDraggedBounds, U as isBackgroundEvent, Ut as UseDateRangeOptions, V as groupEventsByDay, Vt as DateSelectionConstraints, W as layoutDayEvents, Wt as daySelectionState, X as ToICalendarOptions, Xt as RangeBandKind, Y as ICalEvent, Yt as DayBadgeKind, Z as parseICalendar, Zt as bandRounding, _ as buildMultiWeekGrid, _t as cellRangeFromDrag, a as nowInTimeZone, an as BusinessHoursValue, at as eventChipLayout, b as MonthGridDay, bt as monthCreateRange, c as zonedEventSource, cn as CalendarMode, ct as isTimeVisibleAtHeight, d as expandRecurringEvents, dn as ICalendarEvent, dt as titleEllipsizeMode, en as CalendarColors, et as EventAccessibilityLabeler, f as MultiWeekGrid, fn as RecurrenceFrequency, ft as titleNumberOfLines, g as MultiWeekGridWeek, gn as WeekStartsOn, gt as resolveCalendarLabels, h as MultiWeekGridOptions, hn as TimeGridMode, ht as defaultCalendarLabels, i as fromZonedTime, in as BusinessHoursBand, it as eventAccessibilityLabel, j as monthVisibleBars, jt as getViewDays, k as layoutMonthWeek, kt as filterHiddenDays, l as zonedTimeToUtc, ln as CreateGhostArgs, lt as monthEventCapacity, m as MultiWeekGridInterval, mn as ScrollToTimeOptions, mt as dayAccessibilityLabel, n as eventsInTimeZone, nn as lightColors, nt as MIN_BOX_HEIGHT_FOR_TIME, o as toZonedTime, on as CalendarEvent, ot as eventTimeLabel, p as MultiWeekGridDay, pn as RecurrenceRule, pt as CalendarLabels, q as EventSourceOptions, qt as isWithinDateRange, r as fromZonedRange, rn as BusinessHours, rt as MonthEventCapacity, s as zonedDragBounds, sn as CalendarHandle, st as formatHour, t as ZonedDragBoundsOptions, tn as darkColors, tt as EventChipLayout, u as ExpandRecurringEventsOptions, un as EventKeyExtractor, ut as monthVisibleCount, v as MonthEventSegment, vt as clampMoveStartMinutes, w as MonthWeekEvents, wt as pageStepDays, x as MonthGridWeek, xt as monthDropBounds, y as MonthGrid, yt as eventsOverlap, z as drawnEnd, zt as CalendarSelection } from "./timezone-DhGhYIeB.js";
2
2
  import { Dispatch, SetStateAction } from "react";
3
3
  /** Options for {@link useNow}. */
4
4
  export interface UseNowOptions {
@@ -91,4 +91,4 @@ export declare function useDateRange(options?: UseDateRangeOptions): UseDateRang
91
91
  * ```
92
92
  */
93
93
  export declare function useMonthGrid(month: Date, options?: UseMonthGridOptions): MonthGrid;
94
- export { BusinessHours, BusinessHoursBand, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarHandle, CalendarLabels, CalendarMode, CalendarSelection, CreateGhostArgs, DateRange, DateSelectionConstraints, DayBadgeKind, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventChipLayout, EventKeyExtractor, EventSource, EventSourceOptions, ExpandRecurringEventsOptions, ICalEvent, ICalendarEvent, MIN_BOX_HEIGHT_FOR_TIME, MonthEventCapacity, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RangeBandKind, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekdayFormat, ZonedDragBoundsOptions, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
94
+ export { BusinessHours, BusinessHoursBand, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarHandle, CalendarLabels, CalendarMode, CalendarSelection, CreateGhostArgs, DateRange, DateSelectionConstraints, DayBadgeKind, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventChipLayout, EventKeyExtractor, EventSource, EventSourceOptions, ExpandRecurringEventsOptions, ICalEvent, ICalendarEvent, MIN_BOX_HEIGHT_FOR_TIME, MonthEventCapacity, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthRowLanes, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RangeBandKind, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekdayFormat, ZonedDragBoundsOptions, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, keepMonthDraftVisible, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthExtraLaneColumns, monthVisibleBars, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, withDraftEventDays, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_recurrence = require("./recurrence-M-rJQgqd.js");
2
+ const require_recurrence = require("./recurrence-CTjr6nxJ.js");
3
3
  let date_fns = require("date-fns");
4
4
  let react = require("react");
5
5
  // src/utils/useNow.ts
@@ -227,6 +227,7 @@ exports.isSameCalendarDay = require_recurrence.isSameCalendarDay;
227
227
  exports.isTimeVisibleAtHeight = require_recurrence.isTimeVisibleAtHeight;
228
228
  exports.isWeekend = require_recurrence.isWeekend;
229
229
  exports.isWithinDateRange = require_recurrence.isWithinDateRange;
230
+ exports.keepMonthDraftVisible = require_recurrence.keepMonthDraftVisible;
230
231
  exports.layoutDayEvents = require_recurrence.layoutDayEvents;
231
232
  exports.layoutMonthWeek = require_recurrence.layoutMonthWeek;
232
233
  exports.lightColors = require_recurrence.lightColors;
@@ -235,6 +236,8 @@ exports.minutesIntoDay = require_recurrence.minutesIntoDay;
235
236
  exports.monthCreateRange = require_recurrence.monthCreateRange;
236
237
  exports.monthDropBounds = require_recurrence.monthDropBounds;
237
238
  exports.monthEventCapacity = require_recurrence.monthEventCapacity;
239
+ exports.monthExtraLaneColumns = require_recurrence.monthExtraLaneColumns;
240
+ exports.monthVisibleBars = require_recurrence.monthVisibleBars;
238
241
  exports.monthVisibleCount = require_recurrence.monthVisibleCount;
239
242
  exports.movedClockSpan = require_recurrence.movedClockSpan;
240
243
  exports.nextDateRange = require_recurrence.nextDateRange;
@@ -260,6 +263,7 @@ exports.viewDayCount = require_recurrence.viewDayCount;
260
263
  exports.wallClockHours = require_recurrence.wallClockHours;
261
264
  exports.weekDaysCount = require_recurrence.weekDaysCount;
262
265
  exports.weekdayFormatToken = require_recurrence.weekdayFormatToken;
266
+ exports.withDraftEventDays = require_recurrence.withDraftEventDays;
263
267
  exports.zonedDragBounds = require_recurrence.zonedDragBounds;
264
268
  exports.zonedEventSource = require_recurrence.zonedEventSource;
265
269
  exports.zonedTimeToUtc = require_recurrence.zonedTimeToUtc;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as isDateSelectable, A as cellRangeFromDrag, B as snapDeltaMinutes, C as monthEventCapacity, D as dayAccessibilityLabel, E as titleNumberOfLines, F as movedClockSpan, G as drawnEnd, H as clockHoursBetween, I as overlapsOtherEvents, J as isAllDayEvent, K as eventDayKeys, L as pageStepDays, M as eventsOverlap, N as monthCreateRange, O as defaultCalendarLabels, P as monthDropBounds, Q as daySelectionState, R as resolveDraggedBounds, S as isTimeVisibleAtHeight, T as titleEllipsizeMode, U as closedHourBands, V as backgroundBandsForDay, W as compareDayEvents, X as layoutDayEvents, Y as isBackgroundEvent, Z as wallClockHours, _ as MIN_BOX_HEIGHT_FOR_TIME, _t as darkColors, a as weekdayFormatToken, at as getIsToday, b as eventTimeLabel, c as toICalendar, ct as getYearMonths, d as fromZonedTime, dt as minutesIntoDay, et as isRangeEndpoint, f as nowInTimeZone, ft as viewDayCount, g as zonedTimeToUtc, gt as rangeBandKind, h as zonedEventSource, ht as dayBadgeKind, i as layoutMonthWeek, it as filterHiddenDays, j as clampMoveStartMinutes, k as resolveCalendarLabels, l as eventsInTimeZone, lt as isSameCalendarDay, m as zonedDragBounds, mt as bandRounding, n as buildMultiWeekGrid, nt as nextDateRange, o as loadEventSource, ot as getViewDays, p as toZonedTime, pt as weekDaysCount, q as groupEventsByDay, r as buildMonthGrid, rt as buildMonthWeeks, s as parseICalendar, st as getWeekDays, t as expandRecurringEvents, tt as isWithinDateRange, u as fromZonedRange, ut as isWeekend, v as eventAccessibilityLabel, vt as lightColors, w as monthVisibleCount, x as formatHour, y as eventChipLayout, z as shiftMinutes } from "./recurrence-15B6fu6K.mjs";
1
+ import { $ as isBackgroundEvent, A as titleNumberOfLines, B as overlapsOtherEvents, C as eventChipLayout, D as monthEventCapacity, E as isTimeVisibleAtHeight, F as clampMoveStartMinutes, G as backgroundBandsForDay, H as resolveDraggedBounds, I as eventsOverlap, J as compareDayEvents, K as clockHoursBetween, L as monthCreateRange, M as defaultCalendarLabels, N as resolveCalendarLabels, O as monthVisibleCount, P as cellRangeFromDrag, Q as isAllDayEvent, R as monthDropBounds, S as eventAccessibilityLabel, St as lightColors, T as formatHour, U as shiftMinutes, V as pageStepDays, W as snapDeltaMinutes, X as eventDayKeys, Y as drawnEnd, Z as groupEventsByDay, _ as toZonedTime, _t as weekDaysCount, a as layoutMonthWeek, at as isWithinDateRange, b as zonedTimeToUtc, bt as rangeBandKind, c as weekdayFormatToken, ct as filterHiddenDays, d as parseICalendar, dt as getWeekDays, et as layoutDayEvents, f as toICalendar, ft as getYearMonths, g as nowInTimeZone, gt as viewDayCount, h as fromZonedTime, ht as minutesIntoDay, i as keepMonthDraftVisible, it as isRangeEndpoint, j as dayAccessibilityLabel, k as titleEllipsizeMode, l as withDraftEventDays, lt as getIsToday, m as fromZonedRange, mt as isWeekend, n as buildMultiWeekGrid, nt as daySelectionState, o as monthExtraLaneColumns, ot as nextDateRange, p as eventsInTimeZone, pt as isSameCalendarDay, q as closedHourBands, r as buildMonthGrid, rt as isDateSelectable, s as monthVisibleBars, st as buildMonthWeeks, t as expandRecurringEvents, tt as wallClockHours, u as loadEventSource, ut as getViewDays, v as zonedDragBounds, vt as bandRounding, w as eventTimeLabel, x as MIN_BOX_HEIGHT_FOR_TIME, xt as darkColors, y as zonedEventSource, yt as dayBadgeKind, z as movedClockSpan } from "./recurrence-BqpCShcV.mjs";
2
2
  import { startOfDay } from "date-fns";
3
3
  import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
4
4
  // src/utils/useNow.ts
@@ -184,4 +184,4 @@ function useMonthGrid(month, options = {}) {
184
184
  todayKey
185
185
  ]);
186
186
  }
187
- export { CalendarSelectionProvider, MIN_BOX_HEIGHT_FOR_TIME, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, useCalendarSelection, useDateRange, useEventSource, useMonthGrid, useNow, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
187
+ export { CalendarSelectionProvider, MIN_BOX_HEIGHT_FOR_TIME, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, keepMonthDraftVisible, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthExtraLaneColumns, monthVisibleBars, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, useCalendarSelection, useDateRange, useEventSource, useMonthGrid, useNow, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, withDraftEventDays, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
@@ -1458,6 +1458,102 @@ function layoutMonthWeek(days, events) {
1458
1458
  laneCount: laneEnds.length
1459
1459
  };
1460
1460
  }
1461
+ /**
1462
+ * The columns of a week row that show one lane more than the row. A row whose
1463
+ * lanes overflow shows `visibleLanes` of them and folds each day's rest into a
1464
+ * "+N more" label. A day whose only hidden event sits on lane `visibleLanes` draws
1465
+ * that event in the label's place instead of "+1 more". Call it only when
1466
+ * a bar on lane `visibleLanes` fits in the cell.
1467
+ */
1468
+ function monthExtraLaneColumns(layout, visibleLanes, columnCount) {
1469
+ const hidden = Array.from({ length: columnCount }, () => 0);
1470
+ const onFirstHiddenLane = Array.from({ length: columnCount }, () => false);
1471
+ for (const segment of layout.segments) {
1472
+ if (segment.lane < visibleLanes) continue;
1473
+ for (let col = segment.startCol; col <= segment.endCol; col++) {
1474
+ hidden[col]++;
1475
+ if (segment.lane === visibleLanes) onFirstHiddenLane[col] = true;
1476
+ }
1477
+ }
1478
+ return hidden.map((count, col) => count === 1 && onFirstHiddenLane[col]);
1479
+ }
1480
+ /**
1481
+ * The bars a week row draws: every segment above `visibleLanes`, plus the parts of
1482
+ * a segment on lane `visibleLanes` that cross `extraLane` columns (see
1483
+ * {@link monthExtraLaneColumns}), one bar per run of such columns. A bar cut short
1484
+ * by a column that hides the event is marked as continuing past that edge.
1485
+ */
1486
+ function monthVisibleBars(layout, visibleLanes, extraLane) {
1487
+ const bars = [];
1488
+ for (const segment of layout.segments) {
1489
+ if (segment.lane < visibleLanes) {
1490
+ bars.push(segment);
1491
+ continue;
1492
+ }
1493
+ if (segment.lane !== visibleLanes) continue;
1494
+ let runStart = -1;
1495
+ for (let col = segment.startCol; col <= segment.endCol + 1; col++) {
1496
+ const shown = col <= segment.endCol && extraLane[col] === true;
1497
+ if (shown && runStart === -1) runStart = col;
1498
+ if (!shown && runStart !== -1) {
1499
+ bars.push({
1500
+ ...segment,
1501
+ startCol: runStart,
1502
+ endCol: col - 1,
1503
+ continuesBefore: segment.continuesBefore || runStart > segment.startCol,
1504
+ continuesAfter: segment.continuesAfter || col - 1 < segment.endCol
1505
+ });
1506
+ runStart = -1;
1507
+ }
1508
+ }
1509
+ }
1510
+ return bars;
1511
+ }
1512
+ /**
1513
+ * `eventsByDay` with a create draft added to every day it covers, where an event
1514
+ * appended to the calendar's events would go: last in each day, or among the
1515
+ * day's events in `compareDayEvents` order when `sorted`. Lay a week row out
1516
+ * from the result to place the draft where the created event will land.
1517
+ */
1518
+ function withDraftEventDays(eventsByDay, draft, sorted = true) {
1519
+ const days = new Map(eventsByDay);
1520
+ for (const key of eventDayKeys(draft)) {
1521
+ const list = [...days.get(key) ?? [], draft];
1522
+ if (sorted) list.sort(compareDayEvents);
1523
+ days.set(key, list);
1524
+ }
1525
+ return days;
1526
+ }
1527
+ /**
1528
+ * A week row's layout with a create draft kept in view. `withDraft` lays the row
1529
+ * out with the draft where the created event will land. When the row would hide
1530
+ * that lane, the draft moves to lane 0 instead and the row's other bars
1531
+ * (`withoutDraft`) move down one lane. A draft on the first hidden lane stays put
1532
+ * when every day it covers draws that lane in place of its label. A row the draft
1533
+ * misses comes back as `withDraft`.
1534
+ */
1535
+ function keepMonthDraftVisible(withDraft, withoutDraft, draft, { visibleLanes, extraLaneFits }) {
1536
+ const segment = withDraft.segments.find((s) => s.event === draft);
1537
+ if (!segment) return withDraft;
1538
+ const shown = visibleLanes(withDraft.laneCount);
1539
+ if (segment.lane < shown) return withDraft;
1540
+ if (segment.lane === shown && extraLaneFits?.(shown)) {
1541
+ const extraLane = monthExtraLaneColumns(withDraft, shown, Math.max(...withDraft.segments.map((s) => s.endCol)) + 1);
1542
+ let drawn = true;
1543
+ for (let col = segment.startCol; col <= segment.endCol; col++) drawn &&= extraLane[col];
1544
+ if (drawn) return withDraft;
1545
+ }
1546
+ return {
1547
+ segments: [{
1548
+ ...segment,
1549
+ lane: 0
1550
+ }, ...withoutDraft.segments.map((s) => ({
1551
+ ...s,
1552
+ lane: s.lane + 1
1553
+ }))],
1554
+ laneCount: withoutDraft.laneCount + 1
1555
+ };
1556
+ }
1461
1557
  /** date-fns tokens for each {@link WeekdayFormat}. */
1462
1558
  const WEEKDAY_TOKENS = {
1463
1559
  narrow: "EEEEE",
@@ -1827,4 +1923,4 @@ function expandRecurringEvents(events, rangeStart, rangeEnd, { timeZone } = {})
1827
1923
  }
1828
1924
  return out;
1829
1925
  }
1830
- export { isDateSelectable as $, cellRangeFromDrag as A, snapDeltaMinutes as B, monthEventCapacity as C, dayAccessibilityLabel as D, titleNumberOfLines as E, movedClockSpan as F, drawnEnd as G, clockHoursBetween as H, overlapsOtherEvents as I, isAllDayEvent as J, eventDayKeys as K, pageStepDays as L, eventsOverlap as M, monthCreateRange as N, defaultCalendarLabels as O, monthDropBounds as P, daySelectionState as Q, resolveDraggedBounds as R, isTimeVisibleAtHeight as S, titleEllipsizeMode as T, closedHourBands as U, backgroundBandsForDay as V, compareDayEvents as W, layoutDayEvents as X, isBackgroundEvent as Y, wallClockHours as Z, MIN_BOX_HEIGHT_FOR_TIME as _, darkColors as _t, weekdayFormatToken as a, getIsToday as at, eventTimeLabel as b, toICalendar as c, getYearMonths as ct, fromZonedTime as d, minutesIntoDay as dt, isRangeEndpoint as et, nowInTimeZone as f, viewDayCount as ft, zonedTimeToUtc as g, rangeBandKind as gt, zonedEventSource as h, dayBadgeKind as ht, layoutMonthWeek as i, filterHiddenDays as it, clampMoveStartMinutes as j, resolveCalendarLabels as k, eventsInTimeZone as l, isSameCalendarDay as lt, zonedDragBounds as m, bandRounding as mt, buildMultiWeekGrid as n, nextDateRange as nt, loadEventSource as o, getViewDays as ot, toZonedTime as p, weekDaysCount as pt, groupEventsByDay as q, buildMonthGrid as r, buildMonthWeeks as rt, parseICalendar as s, getWeekDays as st, expandRecurringEvents as t, isWithinDateRange as tt, fromZonedRange as u, isWeekend as ut, eventAccessibilityLabel as v, lightColors as vt, monthVisibleCount as w, formatHour as x, eventChipLayout as y, shiftMinutes as z };
1926
+ export { isBackgroundEvent as $, titleNumberOfLines as A, overlapsOtherEvents as B, eventChipLayout as C, monthEventCapacity as D, isTimeVisibleAtHeight as E, clampMoveStartMinutes as F, backgroundBandsForDay as G, resolveDraggedBounds as H, eventsOverlap as I, compareDayEvents as J, clockHoursBetween as K, monthCreateRange as L, defaultCalendarLabels as M, resolveCalendarLabels as N, monthVisibleCount as O, cellRangeFromDrag as P, isAllDayEvent as Q, monthDropBounds as R, eventAccessibilityLabel as S, lightColors as St, formatHour as T, shiftMinutes as U, pageStepDays as V, snapDeltaMinutes as W, eventDayKeys as X, drawnEnd as Y, groupEventsByDay as Z, toZonedTime as _, weekDaysCount as _t, layoutMonthWeek as a, isWithinDateRange as at, zonedTimeToUtc as b, rangeBandKind as bt, weekdayFormatToken as c, filterHiddenDays as ct, parseICalendar as d, getWeekDays as dt, layoutDayEvents as et, toICalendar as f, getYearMonths as ft, nowInTimeZone as g, viewDayCount as gt, fromZonedTime as h, minutesIntoDay as ht, keepMonthDraftVisible as i, isRangeEndpoint as it, dayAccessibilityLabel as j, titleEllipsizeMode as k, withDraftEventDays as l, getIsToday as lt, fromZonedRange as m, isWeekend as mt, buildMultiWeekGrid as n, daySelectionState as nt, monthExtraLaneColumns as o, nextDateRange as ot, eventsInTimeZone as p, isSameCalendarDay as pt, closedHourBands as q, buildMonthGrid as r, isDateSelectable as rt, monthVisibleBars as s, buildMonthWeeks as st, expandRecurringEvents as t, wallClockHours as tt, loadEventSource as u, getViewDays as ut, zonedDragBounds as v, bandRounding as vt, eventTimeLabel as w, MIN_BOX_HEIGHT_FOR_TIME as x, darkColors as xt, zonedEventSource as y, dayBadgeKind as yt, movedClockSpan as z };
@@ -1458,6 +1458,102 @@ function layoutMonthWeek(days, events) {
1458
1458
  laneCount: laneEnds.length
1459
1459
  };
1460
1460
  }
1461
+ /**
1462
+ * The columns of a week row that show one lane more than the row. A row whose
1463
+ * lanes overflow shows `visibleLanes` of them and folds each day's rest into a
1464
+ * "+N more" label. A day whose only hidden event sits on lane `visibleLanes` draws
1465
+ * that event in the label's place instead of "+1 more". Call it only when
1466
+ * a bar on lane `visibleLanes` fits in the cell.
1467
+ */
1468
+ function monthExtraLaneColumns(layout, visibleLanes, columnCount) {
1469
+ const hidden = Array.from({ length: columnCount }, () => 0);
1470
+ const onFirstHiddenLane = Array.from({ length: columnCount }, () => false);
1471
+ for (const segment of layout.segments) {
1472
+ if (segment.lane < visibleLanes) continue;
1473
+ for (let col = segment.startCol; col <= segment.endCol; col++) {
1474
+ hidden[col]++;
1475
+ if (segment.lane === visibleLanes) onFirstHiddenLane[col] = true;
1476
+ }
1477
+ }
1478
+ return hidden.map((count, col) => count === 1 && onFirstHiddenLane[col]);
1479
+ }
1480
+ /**
1481
+ * The bars a week row draws: every segment above `visibleLanes`, plus the parts of
1482
+ * a segment on lane `visibleLanes` that cross `extraLane` columns (see
1483
+ * {@link monthExtraLaneColumns}), one bar per run of such columns. A bar cut short
1484
+ * by a column that hides the event is marked as continuing past that edge.
1485
+ */
1486
+ function monthVisibleBars(layout, visibleLanes, extraLane) {
1487
+ const bars = [];
1488
+ for (const segment of layout.segments) {
1489
+ if (segment.lane < visibleLanes) {
1490
+ bars.push(segment);
1491
+ continue;
1492
+ }
1493
+ if (segment.lane !== visibleLanes) continue;
1494
+ let runStart = -1;
1495
+ for (let col = segment.startCol; col <= segment.endCol + 1; col++) {
1496
+ const shown = col <= segment.endCol && extraLane[col] === true;
1497
+ if (shown && runStart === -1) runStart = col;
1498
+ if (!shown && runStart !== -1) {
1499
+ bars.push({
1500
+ ...segment,
1501
+ startCol: runStart,
1502
+ endCol: col - 1,
1503
+ continuesBefore: segment.continuesBefore || runStart > segment.startCol,
1504
+ continuesAfter: segment.continuesAfter || col - 1 < segment.endCol
1505
+ });
1506
+ runStart = -1;
1507
+ }
1508
+ }
1509
+ }
1510
+ return bars;
1511
+ }
1512
+ /**
1513
+ * `eventsByDay` with a create draft added to every day it covers, where an event
1514
+ * appended to the calendar's events would go: last in each day, or among the
1515
+ * day's events in `compareDayEvents` order when `sorted`. Lay a week row out
1516
+ * from the result to place the draft where the created event will land.
1517
+ */
1518
+ function withDraftEventDays(eventsByDay, draft, sorted = true) {
1519
+ const days = new Map(eventsByDay);
1520
+ for (const key of eventDayKeys(draft)) {
1521
+ const list = [...days.get(key) ?? [], draft];
1522
+ if (sorted) list.sort(compareDayEvents);
1523
+ days.set(key, list);
1524
+ }
1525
+ return days;
1526
+ }
1527
+ /**
1528
+ * A week row's layout with a create draft kept in view. `withDraft` lays the row
1529
+ * out with the draft where the created event will land. When the row would hide
1530
+ * that lane, the draft moves to lane 0 instead and the row's other bars
1531
+ * (`withoutDraft`) move down one lane. A draft on the first hidden lane stays put
1532
+ * when every day it covers draws that lane in place of its label. A row the draft
1533
+ * misses comes back as `withDraft`.
1534
+ */
1535
+ function keepMonthDraftVisible(withDraft, withoutDraft, draft, { visibleLanes, extraLaneFits }) {
1536
+ const segment = withDraft.segments.find((s) => s.event === draft);
1537
+ if (!segment) return withDraft;
1538
+ const shown = visibleLanes(withDraft.laneCount);
1539
+ if (segment.lane < shown) return withDraft;
1540
+ if (segment.lane === shown && extraLaneFits?.(shown)) {
1541
+ const extraLane = monthExtraLaneColumns(withDraft, shown, Math.max(...withDraft.segments.map((s) => s.endCol)) + 1);
1542
+ let drawn = true;
1543
+ for (let col = segment.startCol; col <= segment.endCol; col++) drawn &&= extraLane[col];
1544
+ if (drawn) return withDraft;
1545
+ }
1546
+ return {
1547
+ segments: [{
1548
+ ...segment,
1549
+ lane: 0
1550
+ }, ...withoutDraft.segments.map((s) => ({
1551
+ ...s,
1552
+ lane: s.lane + 1
1553
+ }))],
1554
+ laneCount: withoutDraft.laneCount + 1
1555
+ };
1556
+ }
1461
1557
  /** date-fns tokens for each {@link WeekdayFormat}. */
1462
1558
  const WEEKDAY_TOKENS = {
1463
1559
  narrow: "EEEEE",
@@ -2073,6 +2169,12 @@ Object.defineProperty(exports, "isWithinDateRange", {
2073
2169
  return isWithinDateRange;
2074
2170
  }
2075
2171
  });
2172
+ Object.defineProperty(exports, "keepMonthDraftVisible", {
2173
+ enumerable: true,
2174
+ get: function() {
2175
+ return keepMonthDraftVisible;
2176
+ }
2177
+ });
2076
2178
  Object.defineProperty(exports, "layoutDayEvents", {
2077
2179
  enumerable: true,
2078
2180
  get: function() {
@@ -2121,6 +2223,18 @@ Object.defineProperty(exports, "monthEventCapacity", {
2121
2223
  return monthEventCapacity;
2122
2224
  }
2123
2225
  });
2226
+ Object.defineProperty(exports, "monthExtraLaneColumns", {
2227
+ enumerable: true,
2228
+ get: function() {
2229
+ return monthExtraLaneColumns;
2230
+ }
2231
+ });
2232
+ Object.defineProperty(exports, "monthVisibleBars", {
2233
+ enumerable: true,
2234
+ get: function() {
2235
+ return monthVisibleBars;
2236
+ }
2237
+ });
2124
2238
  Object.defineProperty(exports, "monthVisibleCount", {
2125
2239
  enumerable: true,
2126
2240
  get: function() {
@@ -2241,6 +2355,12 @@ Object.defineProperty(exports, "weekdayFormatToken", {
2241
2355
  return weekdayFormatToken;
2242
2356
  }
2243
2357
  });
2358
+ Object.defineProperty(exports, "withDraftEventDays", {
2359
+ enumerable: true,
2360
+ get: function() {
2361
+ return withDraftEventDays;
2362
+ }
2363
+ });
2244
2364
  Object.defineProperty(exports, "zonedDragBounds", {
2245
2365
  enumerable: true,
2246
2366
  get: function() {
@@ -901,6 +901,47 @@ interface MonthWeekEvents<T = unknown> {
901
901
  * matching how calendars keep long events on the upper lanes.
902
902
  */
903
903
  declare function layoutMonthWeek<T>(days: Date[], events: readonly CalendarEvent<T>[]): MonthWeekEvents<T>;
904
+ /**
905
+ * The columns of a week row that show one lane more than the row. A row whose
906
+ * lanes overflow shows `visibleLanes` of them and folds each day's rest into a
907
+ * "+N more" label. A day whose only hidden event sits on lane `visibleLanes` draws
908
+ * that event in the label's place instead of "+1 more". Call it only when
909
+ * a bar on lane `visibleLanes` fits in the cell.
910
+ */
911
+ declare function monthExtraLaneColumns<T>(layout: MonthWeekEvents<T>, visibleLanes: number, columnCount: number): boolean[];
912
+ /**
913
+ * The bars a week row draws: every segment above `visibleLanes`, plus the parts of
914
+ * a segment on lane `visibleLanes` that cross `extraLane` columns (see
915
+ * {@link monthExtraLaneColumns}), one bar per run of such columns. A bar cut short
916
+ * by a column that hides the event is marked as continuing past that edge.
917
+ */
918
+ declare function monthVisibleBars<T>(layout: MonthWeekEvents<T>, visibleLanes: number, extraLane: readonly boolean[]): MonthEventSegment<T>[];
919
+ /**
920
+ * `eventsByDay` with a create draft added to every day it covers, where an event
921
+ * appended to the calendar's events would go: last in each day, or among the
922
+ * day's events in `compareDayEvents` order when `sorted`. Lay a week row out
923
+ * from the result to place the draft where the created event will land.
924
+ */
925
+ declare function withDraftEventDays<T>(eventsByDay: ReadonlyMap<string, CalendarEvent<T>[]>, draft: CalendarEvent<T>, sorted?: boolean): Map<string, CalendarEvent<T>[]>;
926
+ /** How a renderer shows a week row's lanes, for {@link keepMonthDraftVisible}. */
927
+ interface MonthRowLanes {
928
+ /** Lanes every day of a row with `laneCount` lanes shows. */
929
+ visibleLanes: (laneCount: number) => number;
930
+ /**
931
+ * Whether a day may draw lane `visibleLanes` in place of its "+N more" label
932
+ * (see {@link monthExtraLaneColumns}). Omit when the renderer never does.
933
+ */
934
+ extraLaneFits?: (visibleLanes: number) => boolean;
935
+ }
936
+ /**
937
+ * A week row's layout with a create draft kept in view. `withDraft` lays the row
938
+ * out with the draft where the created event will land. When the row would hide
939
+ * that lane, the draft moves to lane 0 instead and the row's other bars
940
+ * (`withoutDraft`) move down one lane. A draft on the first hidden lane stays put
941
+ * when every day it covers draws that lane in place of its label. A row the draft
942
+ * misses comes back as `withDraft`.
943
+ */
944
+ declare function keepMonthDraftVisible<T>(withDraft: MonthWeekEvents<T>, withoutDraft: MonthWeekEvents<T>, draft: CalendarEvent<T>, { visibleLanes, extraLaneFits }: MonthRowLanes): MonthWeekEvents<T>;
904
945
  /** A single day in the grid, with all the state a custom cell needs to render. */
905
946
  interface MonthGridDay {
906
947
  /** The day this cell represents. */
@@ -1149,4 +1190,4 @@ declare function fromZonedRange(start: Date, end: Date, timeZone: string): {
1149
1190
  start: Date;
1150
1191
  end: Date;
1151
1192
  } | null;
1152
- export { eventAccessibilityLabel as $, BusinessHoursBand as $t, backgroundBandsForDay as A, isWeekend as At, wallClockHours as B, isDateSelectable as Bt, MonthWeekEvents as C, buildMonthWeeks as Ct, layoutMonthWeek as D, getWeekDays as Dt, buildMonthGrid as E, getViewDays as Et, eventDayKeys as F, DateRange as Ft, ToICalendarOptions as G, RangeBandKind as Gt, EventSourceOptions as H, isWithinDateRange as Ht, groupEventsByDay as I, DateSelectionConstraints as It, EventAccessibilityLabelContext as J, rangeBandKind as Jt, parseICalendar as K, bandRounding as Kt, isAllDayEvent as L, DaySelectionState as Lt, closedHourBands as M, viewDayCount as Mt, compareDayEvents as N, weekDaysCount as Nt, weekdayFormatToken as O, getYearMonths as Ot, drawnEnd as P, CalendarSelection as Pt, MonthEventCapacity as Q, BusinessHours as Qt, isBackgroundEvent as R, UseDateRangeOptions as Rt, MonthGridWeekday as S, snapDeltaMinutes as St, WeekdayFormat as T, getIsToday as Tt, loadEventSource as U, nextDateRange as Ut, EventSource as V, isRangeEndpoint as Vt, ICalEvent as W, DayBadgeKind as Wt, EventChipLayout as X, darkColors as Xt, EventAccessibilityLabeler as Y, CalendarColors as Yt, MIN_BOX_HEIGHT_FOR_TIME as Z, lightColors as Zt, buildMultiWeekGrid as _, movedClockSpan as _t, nowInTimeZone as a, EventKeyExtractor as an, monthVisibleCount as at, MonthGridDay as b, resolveDraggedBounds as bt, zonedEventSource as c, RecurrenceRule as cn, CalendarLabels as ct, expandRecurringEvents as d, WeekStartsOn as dn, resolveCalendarLabels as dt, BusinessHoursValue as en, eventChipLayout as et, MultiWeekGrid as f, cellRangeFromDrag as ft, MultiWeekGridWeek as g, monthDropBounds as gt, MultiWeekGridOptions as h, monthCreateRange as ht, fromZonedTime as i, CreateGhostArgs as in, monthEventCapacity as it, clockHoursBetween as j, minutesIntoDay as jt, PositionedEvent as k, isSameCalendarDay as kt, zonedTimeToUtc as l, ScrollToTimeOptions as ln, dayAccessibilityLabel as lt, MultiWeekGridInterval as m, eventsOverlap as mt, eventsInTimeZone as n, CalendarHandle as nn, formatHour as nt, toZonedTime as o, ICalendarEvent as on, titleEllipsizeMode as ot, MultiWeekGridDay as p, clampMoveStartMinutes as pt, toICalendar as q, dayBadgeKind as qt, fromZonedRange as r, CalendarMode as rn, isTimeVisibleAtHeight as rt, zonedDragBounds as s, RecurrenceFrequency as sn, titleNumberOfLines as st, ZonedDragBoundsOptions as t, CalendarEvent as tn, eventTimeLabel as tt, ExpandRecurringEventsOptions as u, TimeGridMode as un, defaultCalendarLabels as ut, MonthEventSegment as v, overlapsOtherEvents as vt, UseMonthGridOptions as w, filterHiddenDays as wt, MonthGridWeek as x, shiftMinutes as xt, MonthGrid as y, pageStepDays as yt, layoutDayEvents as z, daySelectionState as zt };
1193
+ export { EventAccessibilityLabelContext as $, rangeBandKind as $t, monthExtraLaneColumns as A, getIsToday as At, eventDayKeys as B, DateRange as Bt, MonthRowLanes as C, overlapsOtherEvents as Ct, buildMonthGrid as D, snapDeltaMinutes as Dt, WeekdayFormat as E, shiftMinutes as Et, backgroundBandsForDay as F, isWeekend as Ft, wallClockHours as G, isDateSelectable as Gt, isAllDayEvent as H, DaySelectionState as Ht, clockHoursBetween as I, minutesIntoDay as It, loadEventSource as J, nextDateRange as Jt, EventSource as K, isRangeEndpoint as Kt, closedHourBands as L, viewDayCount as Lt, weekdayFormatToken as M, getWeekDays as Mt, withDraftEventDays as N, getYearMonths as Nt, keepMonthDraftVisible as O, buildMonthWeeks as Ot, PositionedEvent as P, isSameCalendarDay as Pt, toICalendar as Q, dayBadgeKind as Qt, compareDayEvents as R, weekDaysCount as Rt, MonthGridWeekday as S, movedClockSpan as St, UseMonthGridOptions as T, resolveDraggedBounds as Tt, isBackgroundEvent as U, UseDateRangeOptions as Ut, groupEventsByDay as V, DateSelectionConstraints as Vt, layoutDayEvents as W, daySelectionState as Wt, ToICalendarOptions as X, RangeBandKind as Xt, ICalEvent as Y, DayBadgeKind as Yt, parseICalendar as Z, bandRounding as Zt, buildMultiWeekGrid as _, cellRangeFromDrag as _t, nowInTimeZone as a, BusinessHoursValue as an, eventChipLayout as at, MonthGridDay as b, monthCreateRange as bt, zonedEventSource as c, CalendarMode as cn, isTimeVisibleAtHeight as ct, expandRecurringEvents as d, ICalendarEvent as dn, titleEllipsizeMode as dt, CalendarColors as en, EventAccessibilityLabeler as et, MultiWeekGrid as f, RecurrenceFrequency as fn, titleNumberOfLines as ft, MultiWeekGridWeek as g, WeekStartsOn as gn, resolveCalendarLabels as gt, MultiWeekGridOptions as h, TimeGridMode as hn, defaultCalendarLabels as ht, fromZonedTime as i, BusinessHoursBand as in, eventAccessibilityLabel as it, monthVisibleBars as j, getViewDays as jt, layoutMonthWeek as k, filterHiddenDays as kt, zonedTimeToUtc as l, CreateGhostArgs as ln, monthEventCapacity as lt, MultiWeekGridInterval as m, ScrollToTimeOptions as mn, dayAccessibilityLabel as mt, eventsInTimeZone as n, lightColors as nn, MIN_BOX_HEIGHT_FOR_TIME as nt, toZonedTime as o, CalendarEvent as on, eventTimeLabel as ot, MultiWeekGridDay as p, RecurrenceRule as pn, CalendarLabels as pt, EventSourceOptions as q, isWithinDateRange as qt, fromZonedRange as r, BusinessHours as rn, MonthEventCapacity as rt, zonedDragBounds as s, CalendarHandle as sn, formatHour as st, ZonedDragBoundsOptions as t, darkColors as tn, EventChipLayout as tt, ExpandRecurringEventsOptions as u, EventKeyExtractor as un, monthVisibleCount as ut, MonthEventSegment as v, clampMoveStartMinutes as vt, MonthWeekEvents as w, pageStepDays as wt, MonthGridWeek as x, monthDropBounds as xt, MonthGrid as y, eventsOverlap as yt, drawnEnd as z, CalendarSelection as zt };
@@ -901,6 +901,47 @@ interface MonthWeekEvents<T = unknown> {
901
901
  * matching how calendars keep long events on the upper lanes.
902
902
  */
903
903
  declare function layoutMonthWeek<T>(days: Date[], events: readonly CalendarEvent<T>[]): MonthWeekEvents<T>;
904
+ /**
905
+ * The columns of a week row that show one lane more than the row. A row whose
906
+ * lanes overflow shows `visibleLanes` of them and folds each day's rest into a
907
+ * "+N more" label. A day whose only hidden event sits on lane `visibleLanes` draws
908
+ * that event in the label's place instead of "+1 more". Call it only when
909
+ * a bar on lane `visibleLanes` fits in the cell.
910
+ */
911
+ declare function monthExtraLaneColumns<T>(layout: MonthWeekEvents<T>, visibleLanes: number, columnCount: number): boolean[];
912
+ /**
913
+ * The bars a week row draws: every segment above `visibleLanes`, plus the parts of
914
+ * a segment on lane `visibleLanes` that cross `extraLane` columns (see
915
+ * {@link monthExtraLaneColumns}), one bar per run of such columns. A bar cut short
916
+ * by a column that hides the event is marked as continuing past that edge.
917
+ */
918
+ declare function monthVisibleBars<T>(layout: MonthWeekEvents<T>, visibleLanes: number, extraLane: readonly boolean[]): MonthEventSegment<T>[];
919
+ /**
920
+ * `eventsByDay` with a create draft added to every day it covers, where an event
921
+ * appended to the calendar's events would go: last in each day, or among the
922
+ * day's events in `compareDayEvents` order when `sorted`. Lay a week row out
923
+ * from the result to place the draft where the created event will land.
924
+ */
925
+ declare function withDraftEventDays<T>(eventsByDay: ReadonlyMap<string, CalendarEvent<T>[]>, draft: CalendarEvent<T>, sorted?: boolean): Map<string, CalendarEvent<T>[]>;
926
+ /** How a renderer shows a week row's lanes, for {@link keepMonthDraftVisible}. */
927
+ interface MonthRowLanes {
928
+ /** Lanes every day of a row with `laneCount` lanes shows. */
929
+ visibleLanes: (laneCount: number) => number;
930
+ /**
931
+ * Whether a day may draw lane `visibleLanes` in place of its "+N more" label
932
+ * (see {@link monthExtraLaneColumns}). Omit when the renderer never does.
933
+ */
934
+ extraLaneFits?: (visibleLanes: number) => boolean;
935
+ }
936
+ /**
937
+ * A week row's layout with a create draft kept in view. `withDraft` lays the row
938
+ * out with the draft where the created event will land. When the row would hide
939
+ * that lane, the draft moves to lane 0 instead and the row's other bars
940
+ * (`withoutDraft`) move down one lane. A draft on the first hidden lane stays put
941
+ * when every day it covers draws that lane in place of its label. A row the draft
942
+ * misses comes back as `withDraft`.
943
+ */
944
+ declare function keepMonthDraftVisible<T>(withDraft: MonthWeekEvents<T>, withoutDraft: MonthWeekEvents<T>, draft: CalendarEvent<T>, { visibleLanes, extraLaneFits }: MonthRowLanes): MonthWeekEvents<T>;
904
945
  /** A single day in the grid, with all the state a custom cell needs to render. */
905
946
  interface MonthGridDay {
906
947
  /** The day this cell represents. */
@@ -1149,4 +1190,4 @@ declare function fromZonedRange(start: Date, end: Date, timeZone: string): {
1149
1190
  start: Date;
1150
1191
  end: Date;
1151
1192
  } | null;
1152
- export { eventAccessibilityLabel as $, BusinessHoursBand as $t, backgroundBandsForDay as A, isWeekend as At, wallClockHours as B, isDateSelectable as Bt, MonthWeekEvents as C, buildMonthWeeks as Ct, layoutMonthWeek as D, getWeekDays as Dt, buildMonthGrid as E, getViewDays as Et, eventDayKeys as F, DateRange as Ft, ToICalendarOptions as G, RangeBandKind as Gt, EventSourceOptions as H, isWithinDateRange as Ht, groupEventsByDay as I, DateSelectionConstraints as It, EventAccessibilityLabelContext as J, rangeBandKind as Jt, parseICalendar as K, bandRounding as Kt, isAllDayEvent as L, DaySelectionState as Lt, closedHourBands as M, viewDayCount as Mt, compareDayEvents as N, weekDaysCount as Nt, weekdayFormatToken as O, getYearMonths as Ot, drawnEnd as P, CalendarSelection as Pt, MonthEventCapacity as Q, BusinessHours as Qt, isBackgroundEvent as R, UseDateRangeOptions as Rt, MonthGridWeekday as S, snapDeltaMinutes as St, WeekdayFormat as T, getIsToday as Tt, loadEventSource as U, nextDateRange as Ut, EventSource as V, isRangeEndpoint as Vt, ICalEvent as W, DayBadgeKind as Wt, EventChipLayout as X, darkColors as Xt, EventAccessibilityLabeler as Y, CalendarColors as Yt, MIN_BOX_HEIGHT_FOR_TIME as Z, lightColors as Zt, buildMultiWeekGrid as _, movedClockSpan as _t, nowInTimeZone as a, EventKeyExtractor as an, monthVisibleCount as at, MonthGridDay as b, resolveDraggedBounds as bt, zonedEventSource as c, RecurrenceRule as cn, CalendarLabels as ct, expandRecurringEvents as d, WeekStartsOn as dn, resolveCalendarLabels as dt, BusinessHoursValue as en, eventChipLayout as et, MultiWeekGrid as f, cellRangeFromDrag as ft, MultiWeekGridWeek as g, monthDropBounds as gt, MultiWeekGridOptions as h, monthCreateRange as ht, fromZonedTime as i, CreateGhostArgs as in, monthEventCapacity as it, clockHoursBetween as j, minutesIntoDay as jt, PositionedEvent as k, isSameCalendarDay as kt, zonedTimeToUtc as l, ScrollToTimeOptions as ln, dayAccessibilityLabel as lt, MultiWeekGridInterval as m, eventsOverlap as mt, eventsInTimeZone as n, CalendarHandle as nn, formatHour as nt, toZonedTime as o, ICalendarEvent as on, titleEllipsizeMode as ot, MultiWeekGridDay as p, clampMoveStartMinutes as pt, toICalendar as q, dayBadgeKind as qt, fromZonedRange as r, CalendarMode as rn, isTimeVisibleAtHeight as rt, zonedDragBounds as s, RecurrenceFrequency as sn, titleNumberOfLines as st, ZonedDragBoundsOptions as t, CalendarEvent as tn, eventTimeLabel as tt, ExpandRecurringEventsOptions as u, TimeGridMode as un, defaultCalendarLabels as ut, MonthEventSegment as v, overlapsOtherEvents as vt, UseMonthGridOptions as w, filterHiddenDays as wt, MonthGridWeek as x, shiftMinutes as xt, MonthGrid as y, pageStepDays as yt, layoutDayEvents as z, daySelectionState as zt };
1193
+ export { EventAccessibilityLabelContext as $, rangeBandKind as $t, monthExtraLaneColumns as A, getIsToday as At, eventDayKeys as B, DateRange as Bt, MonthRowLanes as C, overlapsOtherEvents as Ct, buildMonthGrid as D, snapDeltaMinutes as Dt, WeekdayFormat as E, shiftMinutes as Et, backgroundBandsForDay as F, isWeekend as Ft, wallClockHours as G, isDateSelectable as Gt, isAllDayEvent as H, DaySelectionState as Ht, clockHoursBetween as I, minutesIntoDay as It, loadEventSource as J, nextDateRange as Jt, EventSource as K, isRangeEndpoint as Kt, closedHourBands as L, viewDayCount as Lt, weekdayFormatToken as M, getWeekDays as Mt, withDraftEventDays as N, getYearMonths as Nt, keepMonthDraftVisible as O, buildMonthWeeks as Ot, PositionedEvent as P, isSameCalendarDay as Pt, toICalendar as Q, dayBadgeKind as Qt, compareDayEvents as R, weekDaysCount as Rt, MonthGridWeekday as S, movedClockSpan as St, UseMonthGridOptions as T, resolveDraggedBounds as Tt, isBackgroundEvent as U, UseDateRangeOptions as Ut, groupEventsByDay as V, DateSelectionConstraints as Vt, layoutDayEvents as W, daySelectionState as Wt, ToICalendarOptions as X, RangeBandKind as Xt, ICalEvent as Y, DayBadgeKind as Yt, parseICalendar as Z, bandRounding as Zt, buildMultiWeekGrid as _, cellRangeFromDrag as _t, nowInTimeZone as a, BusinessHoursValue as an, eventChipLayout as at, MonthGridDay as b, monthCreateRange as bt, zonedEventSource as c, CalendarMode as cn, isTimeVisibleAtHeight as ct, expandRecurringEvents as d, ICalendarEvent as dn, titleEllipsizeMode as dt, CalendarColors as en, EventAccessibilityLabeler as et, MultiWeekGrid as f, RecurrenceFrequency as fn, titleNumberOfLines as ft, MultiWeekGridWeek as g, WeekStartsOn as gn, resolveCalendarLabels as gt, MultiWeekGridOptions as h, TimeGridMode as hn, defaultCalendarLabels as ht, fromZonedTime as i, BusinessHoursBand as in, eventAccessibilityLabel as it, monthVisibleBars as j, getViewDays as jt, layoutMonthWeek as k, filterHiddenDays as kt, zonedTimeToUtc as l, CreateGhostArgs as ln, monthEventCapacity as lt, MultiWeekGridInterval as m, ScrollToTimeOptions as mn, dayAccessibilityLabel as mt, eventsInTimeZone as n, lightColors as nn, MIN_BOX_HEIGHT_FOR_TIME as nt, toZonedTime as o, CalendarEvent as on, eventTimeLabel as ot, MultiWeekGridDay as p, RecurrenceRule as pn, CalendarLabels as pt, EventSourceOptions as q, isWithinDateRange as qt, fromZonedRange as r, BusinessHours as rn, MonthEventCapacity as rt, zonedDragBounds as s, CalendarHandle as sn, formatHour as st, ZonedDragBoundsOptions as t, darkColors as tn, EventChipLayout as tt, ExpandRecurringEventsOptions as u, EventKeyExtractor as un, monthVisibleCount as ut, MonthEventSegment as v, clampMoveStartMinutes as vt, MonthWeekEvents as w, pageStepDays as wt, MonthGridWeek as x, monthDropBounds as xt, MonthGrid as y, eventsOverlap as yt, drawnEnd as z, CalendarSelection as zt };
@@ -1,2 +1,2 @@
1
- import { $ as eventAccessibilityLabel, $t as BusinessHoursBand, A as backgroundBandsForDay, At as isWeekend, B as wallClockHours, Bt as isDateSelectable, C as MonthWeekEvents, Ct as buildMonthWeeks, D as layoutMonthWeek, Dt as getWeekDays, E as buildMonthGrid, Et as getViewDays, F as eventDayKeys, Ft as DateRange, G as ToICalendarOptions, Gt as RangeBandKind, H as EventSourceOptions, Ht as isWithinDateRange, I as groupEventsByDay, It as DateSelectionConstraints, J as EventAccessibilityLabelContext, Jt as rangeBandKind, K as parseICalendar, Kt as bandRounding, L as isAllDayEvent, Lt as DaySelectionState, M as closedHourBands, Mt as viewDayCount, N as compareDayEvents, Nt as weekDaysCount, O as weekdayFormatToken, Ot as getYearMonths, P as drawnEnd, Pt as CalendarSelection, Q as MonthEventCapacity, Qt as BusinessHours, R as isBackgroundEvent, Rt as UseDateRangeOptions, S as MonthGridWeekday, St as snapDeltaMinutes, T as WeekdayFormat, Tt as getIsToday, U as loadEventSource, Ut as nextDateRange, V as EventSource, Vt as isRangeEndpoint, W as ICalEvent, Wt as DayBadgeKind, X as EventChipLayout, Xt as darkColors, Y as EventAccessibilityLabeler, Yt as CalendarColors, Z as MIN_BOX_HEIGHT_FOR_TIME, Zt as lightColors, _ as buildMultiWeekGrid, _t as movedClockSpan, a as nowInTimeZone, an as EventKeyExtractor, at as monthVisibleCount, b as MonthGridDay, bt as resolveDraggedBounds, c as zonedEventSource, cn as RecurrenceRule, ct as CalendarLabels, d as expandRecurringEvents, dn as WeekStartsOn, dt as resolveCalendarLabels, en as BusinessHoursValue, et as eventChipLayout, f as MultiWeekGrid, ft as cellRangeFromDrag, g as MultiWeekGridWeek, gt as monthDropBounds, h as MultiWeekGridOptions, ht as monthCreateRange, i as fromZonedTime, in as CreateGhostArgs, it as monthEventCapacity, j as clockHoursBetween, jt as minutesIntoDay, k as PositionedEvent, kt as isSameCalendarDay, l as zonedTimeToUtc, ln as ScrollToTimeOptions, lt as dayAccessibilityLabel, m as MultiWeekGridInterval, mt as eventsOverlap, n as eventsInTimeZone, nn as CalendarHandle, nt as formatHour, o as toZonedTime, on as ICalendarEvent, ot as titleEllipsizeMode, p as MultiWeekGridDay, pt as clampMoveStartMinutes, q as toICalendar, qt as dayBadgeKind, r as fromZonedRange, rn as CalendarMode, rt as isTimeVisibleAtHeight, s as zonedDragBounds, sn as RecurrenceFrequency, st as titleNumberOfLines, t as ZonedDragBoundsOptions, tn as CalendarEvent, tt as eventTimeLabel, u as ExpandRecurringEventsOptions, un as TimeGridMode, ut as defaultCalendarLabels, v as MonthEventSegment, vt as overlapsOtherEvents, w as UseMonthGridOptions, wt as filterHiddenDays, x as MonthGridWeek, xt as shiftMinutes, y as MonthGrid, yt as pageStepDays, z as layoutDayEvents, zt as daySelectionState } from "./timezone-BY2vQwRx.mjs";
2
- export { BusinessHours, BusinessHoursBand, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarHandle, CalendarLabels, CalendarMode, CalendarSelection, CreateGhostArgs, DateRange, DateSelectionConstraints, DayBadgeKind, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventChipLayout, EventKeyExtractor, EventSource, EventSourceOptions, ExpandRecurringEventsOptions, ICalEvent, ICalendarEvent, MIN_BOX_HEIGHT_FOR_TIME, MonthEventCapacity, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RangeBandKind, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekdayFormat, ZonedDragBoundsOptions, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
1
+ import { $ as EventAccessibilityLabelContext, $t as rangeBandKind, A as monthExtraLaneColumns, At as getIsToday, B as eventDayKeys, Bt as DateRange, C as MonthRowLanes, Ct as overlapsOtherEvents, D as buildMonthGrid, Dt as snapDeltaMinutes, E as WeekdayFormat, Et as shiftMinutes, F as backgroundBandsForDay, Ft as isWeekend, G as wallClockHours, Gt as isDateSelectable, H as isAllDayEvent, Ht as DaySelectionState, I as clockHoursBetween, It as minutesIntoDay, J as loadEventSource, Jt as nextDateRange, K as EventSource, Kt as isRangeEndpoint, L as closedHourBands, Lt as viewDayCount, M as weekdayFormatToken, Mt as getWeekDays, N as withDraftEventDays, Nt as getYearMonths, O as keepMonthDraftVisible, Ot as buildMonthWeeks, P as PositionedEvent, Pt as isSameCalendarDay, Q as toICalendar, Qt as dayBadgeKind, R as compareDayEvents, Rt as weekDaysCount, S as MonthGridWeekday, St as movedClockSpan, T as UseMonthGridOptions, Tt as resolveDraggedBounds, U as isBackgroundEvent, Ut as UseDateRangeOptions, V as groupEventsByDay, Vt as DateSelectionConstraints, W as layoutDayEvents, Wt as daySelectionState, X as ToICalendarOptions, Xt as RangeBandKind, Y as ICalEvent, Yt as DayBadgeKind, Z as parseICalendar, Zt as bandRounding, _ as buildMultiWeekGrid, _t as cellRangeFromDrag, a as nowInTimeZone, an as BusinessHoursValue, at as eventChipLayout, b as MonthGridDay, bt as monthCreateRange, c as zonedEventSource, cn as CalendarMode, ct as isTimeVisibleAtHeight, d as expandRecurringEvents, dn as ICalendarEvent, dt as titleEllipsizeMode, en as CalendarColors, et as EventAccessibilityLabeler, f as MultiWeekGrid, fn as RecurrenceFrequency, ft as titleNumberOfLines, g as MultiWeekGridWeek, gn as WeekStartsOn, gt as resolveCalendarLabels, h as MultiWeekGridOptions, hn as TimeGridMode, ht as defaultCalendarLabels, i as fromZonedTime, in as BusinessHoursBand, it as eventAccessibilityLabel, j as monthVisibleBars, jt as getViewDays, k as layoutMonthWeek, kt as filterHiddenDays, l as zonedTimeToUtc, ln as CreateGhostArgs, lt as monthEventCapacity, m as MultiWeekGridInterval, mn as ScrollToTimeOptions, mt as dayAccessibilityLabel, n as eventsInTimeZone, nn as lightColors, nt as MIN_BOX_HEIGHT_FOR_TIME, o as toZonedTime, on as CalendarEvent, ot as eventTimeLabel, p as MultiWeekGridDay, pn as RecurrenceRule, pt as CalendarLabels, q as EventSourceOptions, qt as isWithinDateRange, r as fromZonedRange, rn as BusinessHours, rt as MonthEventCapacity, s as zonedDragBounds, sn as CalendarHandle, st as formatHour, t as ZonedDragBoundsOptions, tn as darkColors, tt as EventChipLayout, u as ExpandRecurringEventsOptions, un as EventKeyExtractor, ut as monthVisibleCount, v as MonthEventSegment, vt as clampMoveStartMinutes, w as MonthWeekEvents, wt as pageStepDays, x as MonthGridWeek, xt as monthDropBounds, y as MonthGrid, yt as eventsOverlap, z as drawnEnd, zt as CalendarSelection } from "./timezone-DhGhYIeB.mjs";
2
+ export { BusinessHours, BusinessHoursBand, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarHandle, CalendarLabels, CalendarMode, CalendarSelection, CreateGhostArgs, DateRange, DateSelectionConstraints, DayBadgeKind, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventChipLayout, EventKeyExtractor, EventSource, EventSourceOptions, ExpandRecurringEventsOptions, ICalEvent, ICalendarEvent, MIN_BOX_HEIGHT_FOR_TIME, MonthEventCapacity, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthRowLanes, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RangeBandKind, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekdayFormat, ZonedDragBoundsOptions, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, keepMonthDraftVisible, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthExtraLaneColumns, monthVisibleBars, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, withDraftEventDays, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
package/dist/vanilla.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as eventAccessibilityLabel, $t as BusinessHoursBand, A as backgroundBandsForDay, At as isWeekend, B as wallClockHours, Bt as isDateSelectable, C as MonthWeekEvents, Ct as buildMonthWeeks, D as layoutMonthWeek, Dt as getWeekDays, E as buildMonthGrid, Et as getViewDays, F as eventDayKeys, Ft as DateRange, G as ToICalendarOptions, Gt as RangeBandKind, H as EventSourceOptions, Ht as isWithinDateRange, I as groupEventsByDay, It as DateSelectionConstraints, J as EventAccessibilityLabelContext, Jt as rangeBandKind, K as parseICalendar, Kt as bandRounding, L as isAllDayEvent, Lt as DaySelectionState, M as closedHourBands, Mt as viewDayCount, N as compareDayEvents, Nt as weekDaysCount, O as weekdayFormatToken, Ot as getYearMonths, P as drawnEnd, Pt as CalendarSelection, Q as MonthEventCapacity, Qt as BusinessHours, R as isBackgroundEvent, Rt as UseDateRangeOptions, S as MonthGridWeekday, St as snapDeltaMinutes, T as WeekdayFormat, Tt as getIsToday, U as loadEventSource, Ut as nextDateRange, V as EventSource, Vt as isRangeEndpoint, W as ICalEvent, Wt as DayBadgeKind, X as EventChipLayout, Xt as darkColors, Y as EventAccessibilityLabeler, Yt as CalendarColors, Z as MIN_BOX_HEIGHT_FOR_TIME, Zt as lightColors, _ as buildMultiWeekGrid, _t as movedClockSpan, a as nowInTimeZone, an as EventKeyExtractor, at as monthVisibleCount, b as MonthGridDay, bt as resolveDraggedBounds, c as zonedEventSource, cn as RecurrenceRule, ct as CalendarLabels, d as expandRecurringEvents, dn as WeekStartsOn, dt as resolveCalendarLabels, en as BusinessHoursValue, et as eventChipLayout, f as MultiWeekGrid, ft as cellRangeFromDrag, g as MultiWeekGridWeek, gt as monthDropBounds, h as MultiWeekGridOptions, ht as monthCreateRange, i as fromZonedTime, in as CreateGhostArgs, it as monthEventCapacity, j as clockHoursBetween, jt as minutesIntoDay, k as PositionedEvent, kt as isSameCalendarDay, l as zonedTimeToUtc, ln as ScrollToTimeOptions, lt as dayAccessibilityLabel, m as MultiWeekGridInterval, mt as eventsOverlap, n as eventsInTimeZone, nn as CalendarHandle, nt as formatHour, o as toZonedTime, on as ICalendarEvent, ot as titleEllipsizeMode, p as MultiWeekGridDay, pt as clampMoveStartMinutes, q as toICalendar, qt as dayBadgeKind, r as fromZonedRange, rn as CalendarMode, rt as isTimeVisibleAtHeight, s as zonedDragBounds, sn as RecurrenceFrequency, st as titleNumberOfLines, t as ZonedDragBoundsOptions, tn as CalendarEvent, tt as eventTimeLabel, u as ExpandRecurringEventsOptions, un as TimeGridMode, ut as defaultCalendarLabels, v as MonthEventSegment, vt as overlapsOtherEvents, w as UseMonthGridOptions, wt as filterHiddenDays, x as MonthGridWeek, xt as shiftMinutes, y as MonthGrid, yt as pageStepDays, z as layoutDayEvents, zt as daySelectionState } from "./timezone-BY2vQwRx.js";
2
- export { BusinessHours, BusinessHoursBand, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarHandle, CalendarLabels, CalendarMode, CalendarSelection, CreateGhostArgs, DateRange, DateSelectionConstraints, DayBadgeKind, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventChipLayout, EventKeyExtractor, EventSource, EventSourceOptions, ExpandRecurringEventsOptions, ICalEvent, ICalendarEvent, MIN_BOX_HEIGHT_FOR_TIME, MonthEventCapacity, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RangeBandKind, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekdayFormat, ZonedDragBoundsOptions, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
1
+ import { $ as EventAccessibilityLabelContext, $t as rangeBandKind, A as monthExtraLaneColumns, At as getIsToday, B as eventDayKeys, Bt as DateRange, C as MonthRowLanes, Ct as overlapsOtherEvents, D as buildMonthGrid, Dt as snapDeltaMinutes, E as WeekdayFormat, Et as shiftMinutes, F as backgroundBandsForDay, Ft as isWeekend, G as wallClockHours, Gt as isDateSelectable, H as isAllDayEvent, Ht as DaySelectionState, I as clockHoursBetween, It as minutesIntoDay, J as loadEventSource, Jt as nextDateRange, K as EventSource, Kt as isRangeEndpoint, L as closedHourBands, Lt as viewDayCount, M as weekdayFormatToken, Mt as getWeekDays, N as withDraftEventDays, Nt as getYearMonths, O as keepMonthDraftVisible, Ot as buildMonthWeeks, P as PositionedEvent, Pt as isSameCalendarDay, Q as toICalendar, Qt as dayBadgeKind, R as compareDayEvents, Rt as weekDaysCount, S as MonthGridWeekday, St as movedClockSpan, T as UseMonthGridOptions, Tt as resolveDraggedBounds, U as isBackgroundEvent, Ut as UseDateRangeOptions, V as groupEventsByDay, Vt as DateSelectionConstraints, W as layoutDayEvents, Wt as daySelectionState, X as ToICalendarOptions, Xt as RangeBandKind, Y as ICalEvent, Yt as DayBadgeKind, Z as parseICalendar, Zt as bandRounding, _ as buildMultiWeekGrid, _t as cellRangeFromDrag, a as nowInTimeZone, an as BusinessHoursValue, at as eventChipLayout, b as MonthGridDay, bt as monthCreateRange, c as zonedEventSource, cn as CalendarMode, ct as isTimeVisibleAtHeight, d as expandRecurringEvents, dn as ICalendarEvent, dt as titleEllipsizeMode, en as CalendarColors, et as EventAccessibilityLabeler, f as MultiWeekGrid, fn as RecurrenceFrequency, ft as titleNumberOfLines, g as MultiWeekGridWeek, gn as WeekStartsOn, gt as resolveCalendarLabels, h as MultiWeekGridOptions, hn as TimeGridMode, ht as defaultCalendarLabels, i as fromZonedTime, in as BusinessHoursBand, it as eventAccessibilityLabel, j as monthVisibleBars, jt as getViewDays, k as layoutMonthWeek, kt as filterHiddenDays, l as zonedTimeToUtc, ln as CreateGhostArgs, lt as monthEventCapacity, m as MultiWeekGridInterval, mn as ScrollToTimeOptions, mt as dayAccessibilityLabel, n as eventsInTimeZone, nn as lightColors, nt as MIN_BOX_HEIGHT_FOR_TIME, o as toZonedTime, on as CalendarEvent, ot as eventTimeLabel, p as MultiWeekGridDay, pn as RecurrenceRule, pt as CalendarLabels, q as EventSourceOptions, qt as isWithinDateRange, r as fromZonedRange, rn as BusinessHours, rt as MonthEventCapacity, s as zonedDragBounds, sn as CalendarHandle, st as formatHour, t as ZonedDragBoundsOptions, tn as darkColors, tt as EventChipLayout, u as ExpandRecurringEventsOptions, un as EventKeyExtractor, ut as monthVisibleCount, v as MonthEventSegment, vt as clampMoveStartMinutes, w as MonthWeekEvents, wt as pageStepDays, x as MonthGridWeek, xt as monthDropBounds, y as MonthGrid, yt as eventsOverlap, z as drawnEnd, zt as CalendarSelection } from "./timezone-DhGhYIeB.js";
2
+ export { BusinessHours, BusinessHoursBand, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarHandle, CalendarLabels, CalendarMode, CalendarSelection, CreateGhostArgs, DateRange, DateSelectionConstraints, DayBadgeKind, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventChipLayout, EventKeyExtractor, EventSource, EventSourceOptions, ExpandRecurringEventsOptions, ICalEvent, ICalendarEvent, MIN_BOX_HEIGHT_FOR_TIME, MonthEventCapacity, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthRowLanes, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RangeBandKind, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekdayFormat, ZonedDragBoundsOptions, backgroundBandsForDay, bandRounding, buildMonthGrid, buildMonthWeeks, buildMultiWeekGrid, cellRangeFromDrag, clampMoveStartMinutes, clockHoursBetween, closedHourBands, compareDayEvents, darkColors, dayAccessibilityLabel, dayBadgeKind, daySelectionState, defaultCalendarLabels, drawnEnd, eventAccessibilityLabel, eventChipLayout, eventDayKeys, eventTimeLabel, eventsInTimeZone, eventsOverlap, expandRecurringEvents, filterHiddenDays, formatHour, fromZonedRange, fromZonedTime, getIsToday, getViewDays, getWeekDays, getYearMonths, groupEventsByDay, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isTimeVisibleAtHeight, isWeekend, isWithinDateRange, keepMonthDraftVisible, layoutDayEvents, layoutMonthWeek, lightColors, loadEventSource, minutesIntoDay, monthCreateRange, monthDropBounds, monthEventCapacity, monthExtraLaneColumns, monthVisibleBars, monthVisibleCount, movedClockSpan, nextDateRange, nowInTimeZone, overlapsOtherEvents, pageStepDays, parseICalendar, rangeBandKind, resolveCalendarLabels, resolveDraggedBounds, shiftMinutes, snapDeltaMinutes, titleEllipsizeMode, titleNumberOfLines, toICalendar, toZonedTime, viewDayCount, wallClockHours, weekDaysCount, weekdayFormatToken, withDraftEventDays, zonedDragBounds, zonedEventSource, zonedTimeToUtc };
package/dist/vanilla.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_recurrence = require("./recurrence-M-rJQgqd.js");
2
+ const require_recurrence = require("./recurrence-CTjr6nxJ.js");
3
3
  exports.MIN_BOX_HEIGHT_FOR_TIME = require_recurrence.MIN_BOX_HEIGHT_FOR_TIME;
4
4
  exports.backgroundBandsForDay = require_recurrence.backgroundBandsForDay;
5
5
  exports.bandRounding = require_recurrence.bandRounding;
@@ -41,6 +41,7 @@ exports.isSameCalendarDay = require_recurrence.isSameCalendarDay;
41
41
  exports.isTimeVisibleAtHeight = require_recurrence.isTimeVisibleAtHeight;
42
42
  exports.isWeekend = require_recurrence.isWeekend;
43
43
  exports.isWithinDateRange = require_recurrence.isWithinDateRange;
44
+ exports.keepMonthDraftVisible = require_recurrence.keepMonthDraftVisible;
44
45
  exports.layoutDayEvents = require_recurrence.layoutDayEvents;
45
46
  exports.layoutMonthWeek = require_recurrence.layoutMonthWeek;
46
47
  exports.lightColors = require_recurrence.lightColors;
@@ -49,6 +50,8 @@ exports.minutesIntoDay = require_recurrence.minutesIntoDay;
49
50
  exports.monthCreateRange = require_recurrence.monthCreateRange;
50
51
  exports.monthDropBounds = require_recurrence.monthDropBounds;
51
52
  exports.monthEventCapacity = require_recurrence.monthEventCapacity;
53
+ exports.monthExtraLaneColumns = require_recurrence.monthExtraLaneColumns;
54
+ exports.monthVisibleBars = require_recurrence.monthVisibleBars;
52
55
  exports.monthVisibleCount = require_recurrence.monthVisibleCount;
53
56
  exports.movedClockSpan = require_recurrence.movedClockSpan;
54
57
  exports.nextDateRange = require_recurrence.nextDateRange;
@@ -69,6 +72,7 @@ exports.viewDayCount = require_recurrence.viewDayCount;
69
72
  exports.wallClockHours = require_recurrence.wallClockHours;
70
73
  exports.weekDaysCount = require_recurrence.weekDaysCount;
71
74
  exports.weekdayFormatToken = require_recurrence.weekdayFormatToken;
75
+ exports.withDraftEventDays = require_recurrence.withDraftEventDays;
72
76
  exports.zonedDragBounds = require_recurrence.zonedDragBounds;
73
77
  exports.zonedEventSource = require_recurrence.zonedEventSource;
74
78
  exports.zonedTimeToUtc = require_recurrence.zonedTimeToUtc;
package/dist/vanilla.mjs CHANGED
@@ -1 +1 @@
1
- export { _ as MIN_BOX_HEIGHT_FOR_TIME, V as backgroundBandsForDay, mt as bandRounding, r as buildMonthGrid, rt as buildMonthWeeks, n as buildMultiWeekGrid, A as cellRangeFromDrag, j as clampMoveStartMinutes, H as clockHoursBetween, U as closedHourBands, W as compareDayEvents, _t as darkColors, D as dayAccessibilityLabel, ht as dayBadgeKind, Q as daySelectionState, O as defaultCalendarLabels, G as drawnEnd, v as eventAccessibilityLabel, y as eventChipLayout, K as eventDayKeys, b as eventTimeLabel, l as eventsInTimeZone, M as eventsOverlap, t as expandRecurringEvents, it as filterHiddenDays, x as formatHour, u as fromZonedRange, d as fromZonedTime, at as getIsToday, ot as getViewDays, st as getWeekDays, ct as getYearMonths, q as groupEventsByDay, J as isAllDayEvent, Y as isBackgroundEvent, $ as isDateSelectable, et as isRangeEndpoint, lt as isSameCalendarDay, S as isTimeVisibleAtHeight, ut as isWeekend, tt as isWithinDateRange, X as layoutDayEvents, i as layoutMonthWeek, vt as lightColors, o as loadEventSource, dt as minutesIntoDay, N as monthCreateRange, P as monthDropBounds, C as monthEventCapacity, w as monthVisibleCount, F as movedClockSpan, nt as nextDateRange, f as nowInTimeZone, I as overlapsOtherEvents, L as pageStepDays, s as parseICalendar, gt as rangeBandKind, k as resolveCalendarLabels, R as resolveDraggedBounds, z as shiftMinutes, B as snapDeltaMinutes, T as titleEllipsizeMode, E as titleNumberOfLines, c as toICalendar, p as toZonedTime, ft as viewDayCount, Z as wallClockHours, pt as weekDaysCount, a as weekdayFormatToken, m as zonedDragBounds, h as zonedEventSource, g as zonedTimeToUtc } from "./recurrence-15B6fu6K.mjs";
1
+ export { x as MIN_BOX_HEIGHT_FOR_TIME, G as backgroundBandsForDay, vt as bandRounding, r as buildMonthGrid, st as buildMonthWeeks, n as buildMultiWeekGrid, P as cellRangeFromDrag, F as clampMoveStartMinutes, K as clockHoursBetween, q as closedHourBands, J as compareDayEvents, xt as darkColors, j as dayAccessibilityLabel, yt as dayBadgeKind, nt as daySelectionState, M as defaultCalendarLabels, Y as drawnEnd, S as eventAccessibilityLabel, C as eventChipLayout, X as eventDayKeys, w as eventTimeLabel, p as eventsInTimeZone, I as eventsOverlap, t as expandRecurringEvents, ct as filterHiddenDays, T as formatHour, m as fromZonedRange, h as fromZonedTime, lt as getIsToday, ut as getViewDays, dt as getWeekDays, ft as getYearMonths, Z as groupEventsByDay, Q as isAllDayEvent, $ as isBackgroundEvent, rt as isDateSelectable, it as isRangeEndpoint, pt as isSameCalendarDay, E as isTimeVisibleAtHeight, mt as isWeekend, at as isWithinDateRange, i as keepMonthDraftVisible, et as layoutDayEvents, a as layoutMonthWeek, St as lightColors, u as loadEventSource, ht as minutesIntoDay, L as monthCreateRange, R as monthDropBounds, D as monthEventCapacity, o as monthExtraLaneColumns, s as monthVisibleBars, O as monthVisibleCount, z as movedClockSpan, ot as nextDateRange, g as nowInTimeZone, B as overlapsOtherEvents, V as pageStepDays, d as parseICalendar, bt as rangeBandKind, N as resolveCalendarLabels, H as resolveDraggedBounds, U as shiftMinutes, W as snapDeltaMinutes, k as titleEllipsizeMode, A as titleNumberOfLines, f as toICalendar, _ as toZonedTime, gt as viewDayCount, tt as wallClockHours, _t as weekDaysCount, c as weekdayFormatToken, l as withDraftEventDays, v as zonedDragBounds, y as zonedEventSource, b as zonedTimeToUtc } from "./recurrence-BqpCShcV.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-calendar/core",
3
- "version": "2.18.0",
3
+ "version": "2.19.0",
4
4
  "description": "Render-agnostic core for super-calendar: date math, selection model, event layout, the month-grid builder, headless hooks, and neutral theme tokens. No renderer.",
5
5
  "keywords": [
6
6
  "calendar",
@@ -2,6 +2,7 @@ import { format, type Locale, isSameMonth, startOfDay } from "date-fns";
2
2
  import type { CalendarEvent, WeekStartsOn } from "../types";
3
3
  import { type DateRange, type DateSelectionConstraints, daySelectionState } from "./dateRange";
4
4
  import { buildMonthWeeks, getIsToday, isWeekend } from "./dates";
5
+ import { compareDayEvents, eventDayKeys } from "./layout";
5
6
 
6
7
  /**
7
8
  * One event's placement within a single week row of the month grid: the column
@@ -112,6 +113,133 @@ export function layoutMonthWeek<T>(
112
113
  return { segments: placed, laneCount: laneEnds.length };
113
114
  }
114
115
 
116
+ /**
117
+ * The columns of a week row that show one lane more than the row. A row whose
118
+ * lanes overflow shows `visibleLanes` of them and folds each day's rest into a
119
+ * "+N more" label. A day whose only hidden event sits on lane `visibleLanes` draws
120
+ * that event in the label's place instead of "+1 more". Call it only when
121
+ * a bar on lane `visibleLanes` fits in the cell.
122
+ */
123
+ export function monthExtraLaneColumns<T>(
124
+ layout: MonthWeekEvents<T>,
125
+ visibleLanes: number,
126
+ columnCount: number,
127
+ ): boolean[] {
128
+ const hidden = Array.from({ length: columnCount }, () => 0);
129
+ const onFirstHiddenLane = Array.from({ length: columnCount }, () => false);
130
+ for (const segment of layout.segments) {
131
+ if (segment.lane < visibleLanes) continue;
132
+ for (let col = segment.startCol; col <= segment.endCol; col++) {
133
+ hidden[col]++;
134
+ if (segment.lane === visibleLanes) onFirstHiddenLane[col] = true;
135
+ }
136
+ }
137
+ return hidden.map((count, col) => count === 1 && onFirstHiddenLane[col]);
138
+ }
139
+
140
+ /**
141
+ * The bars a week row draws: every segment above `visibleLanes`, plus the parts of
142
+ * a segment on lane `visibleLanes` that cross `extraLane` columns (see
143
+ * {@link monthExtraLaneColumns}), one bar per run of such columns. A bar cut short
144
+ * by a column that hides the event is marked as continuing past that edge.
145
+ */
146
+ export function monthVisibleBars<T>(
147
+ layout: MonthWeekEvents<T>,
148
+ visibleLanes: number,
149
+ extraLane: readonly boolean[],
150
+ ): MonthEventSegment<T>[] {
151
+ const bars: MonthEventSegment<T>[] = [];
152
+ for (const segment of layout.segments) {
153
+ if (segment.lane < visibleLanes) {
154
+ bars.push(segment);
155
+ continue;
156
+ }
157
+ if (segment.lane !== visibleLanes) continue;
158
+ let runStart = -1;
159
+ for (let col = segment.startCol; col <= segment.endCol + 1; col++) {
160
+ const shown = col <= segment.endCol && extraLane[col] === true;
161
+ if (shown && runStart === -1) runStart = col;
162
+ if (!shown && runStart !== -1) {
163
+ bars.push({
164
+ ...segment,
165
+ startCol: runStart,
166
+ endCol: col - 1,
167
+ continuesBefore: segment.continuesBefore || runStart > segment.startCol,
168
+ continuesAfter: segment.continuesAfter || col - 1 < segment.endCol,
169
+ });
170
+ runStart = -1;
171
+ }
172
+ }
173
+ }
174
+ return bars;
175
+ }
176
+
177
+ /**
178
+ * `eventsByDay` with a create draft added to every day it covers, where an event
179
+ * appended to the calendar's events would go: last in each day, or among the
180
+ * day's events in `compareDayEvents` order when `sorted`. Lay a week row out
181
+ * from the result to place the draft where the created event will land.
182
+ */
183
+ export function withDraftEventDays<T>(
184
+ eventsByDay: ReadonlyMap<string, CalendarEvent<T>[]>,
185
+ draft: CalendarEvent<T>,
186
+ sorted = true,
187
+ ): Map<string, CalendarEvent<T>[]> {
188
+ const days = new Map(eventsByDay);
189
+ for (const key of eventDayKeys(draft)) {
190
+ const list = [...(days.get(key) ?? []), draft];
191
+ // Array sort is stable, so the draft stays after the events it ties with.
192
+ if (sorted) list.sort(compareDayEvents);
193
+ days.set(key, list);
194
+ }
195
+ return days;
196
+ }
197
+
198
+ /** How a renderer shows a week row's lanes, for {@link keepMonthDraftVisible}. */
199
+ export interface MonthRowLanes {
200
+ /** Lanes every day of a row with `laneCount` lanes shows. */
201
+ visibleLanes: (laneCount: number) => number;
202
+ /**
203
+ * Whether a day may draw lane `visibleLanes` in place of its "+N more" label
204
+ * (see {@link monthExtraLaneColumns}). Omit when the renderer never does.
205
+ */
206
+ extraLaneFits?: (visibleLanes: number) => boolean;
207
+ }
208
+
209
+ /**
210
+ * A week row's layout with a create draft kept in view. `withDraft` lays the row
211
+ * out with the draft where the created event will land. When the row would hide
212
+ * that lane, the draft moves to lane 0 instead and the row's other bars
213
+ * (`withoutDraft`) move down one lane. A draft on the first hidden lane stays put
214
+ * when every day it covers draws that lane in place of its label. A row the draft
215
+ * misses comes back as `withDraft`.
216
+ */
217
+ export function keepMonthDraftVisible<T>(
218
+ withDraft: MonthWeekEvents<T>,
219
+ withoutDraft: MonthWeekEvents<T>,
220
+ draft: CalendarEvent<T>,
221
+ { visibleLanes, extraLaneFits }: MonthRowLanes,
222
+ ): MonthWeekEvents<T> {
223
+ const segment = withDraft.segments.find((s) => s.event === draft);
224
+ if (!segment) return withDraft;
225
+ const shown = visibleLanes(withDraft.laneCount);
226
+ if (segment.lane < shown) return withDraft;
227
+ if (segment.lane === shown && extraLaneFits?.(shown)) {
228
+ const columns = Math.max(...withDraft.segments.map((s) => s.endCol)) + 1;
229
+ const extraLane = monthExtraLaneColumns(withDraft, shown, columns);
230
+ let drawn = true;
231
+ for (let col = segment.startCol; col <= segment.endCol; col++) drawn &&= extraLane[col];
232
+ if (drawn) return withDraft;
233
+ }
234
+ return {
235
+ segments: [
236
+ { ...segment, lane: 0 },
237
+ ...withoutDraft.segments.map((s) => ({ ...s, lane: s.lane + 1 })),
238
+ ],
239
+ laneCount: withoutDraft.laneCount + 1,
240
+ };
241
+ }
242
+
115
243
  /** A single day in the grid, with all the state a custom cell needs to render. */
116
244
  export interface MonthGridDay {
117
245
  /** The day this cell represents. */