@dayflow/core 3.3.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -43,6 +43,8 @@ interface CalendarType {
43
43
  isVisible?: boolean;
44
44
  /** Whether this calendar was created by subscribing to a remote ICS URL */
45
45
  subscribed?: boolean;
46
+ /** The source of this calendar (e.g., 'Google Calendar', 'iCloud', 'Outlook') */
47
+ source?: string;
46
48
  }
47
49
  /**
48
50
  * Theme mode
@@ -422,6 +424,11 @@ interface EventContentSlotArgs {
422
424
  * Calendar application configuration
423
425
  * Used to initialize CalendarApp
424
426
  */
427
+ /**
428
+ * Comparator function for sorting all-day events across all views.
429
+ * Return negative if `a` should appear before `b`, positive if after, 0 if equal.
430
+ */
431
+ type AllDaySortComparator = (a: Event, b: Event) => number;
425
432
  interface CalendarAppConfig {
426
433
  views: CalendarView[];
427
434
  plugins?: CalendarPlugin[];
@@ -438,6 +445,8 @@ interface CalendarAppConfig {
438
445
  customMobileEventRenderer?: MobileEventRenderer;
439
446
  locale?: string | Locale;
440
447
  readOnly?: boolean | ReadOnlyConfig;
448
+ /** Custom sort comparator for all-day events, applied in day/week/month/year views. */
449
+ allDaySortComparator?: AllDaySortComparator;
441
450
  }
442
451
  /**
443
452
  * Read-only configuration
@@ -462,6 +471,7 @@ interface CalendarAppState {
462
471
  selectedEventId?: string | null;
463
472
  readOnly: boolean | ReadOnlyConfig;
464
473
  overrides: string[];
474
+ allDaySortComparator?: AllDaySortComparator;
465
475
  }
466
476
  /**
467
477
  * Calendar application instance
@@ -713,6 +723,11 @@ interface UnifiedDragRef extends DragRef {
713
723
  eventDurationDays?: number;
714
724
  currentSegmentDays?: number;
715
725
  startDragDayIndex?: number;
726
+ initialIndicatorLeft?: number;
727
+ initialIndicatorTop?: number;
728
+ initialIndicatorWidth?: number;
729
+ initialIndicatorHeight?: number;
730
+ indicatorContainer?: HTMLElement | null;
716
731
  calendarId?: string;
717
732
  title?: string;
718
733
  }
@@ -2745,6 +2760,39 @@ declare function downloadICS(events: Event[], options?: ICSExportOptions): void;
2745
2760
  */
2746
2761
  declare function importICSFile(file: File, options?: ICSImportOptions): Promise<ICSImportResult>;
2747
2762
 
2763
+ declare const getAllDayRangeMetrics: (event: Event) => {
2764
+ startDay: Date;
2765
+ endDay: Date;
2766
+ isMultiDay: boolean;
2767
+ };
2768
+ /**
2769
+ * Sort all-day events alphabetically by title.
2770
+ * Exported so React consumers can pass a stable comparator reference.
2771
+ */
2772
+ declare const sortAllDayByTitle: (a: Event, b: Event) => number;
2773
+ declare const compareAllDayDisplayPriority: (a: Event, b: Event, comparator?: (a: Event, b: Event) => number) => number;
2774
+ declare const createAllDayDisplayComparator: (events: Event[], comparator?: (a: Event, b: Event) => number) => (a: Event, b: Event) => number;
2775
+
2776
+ interface RestoreTimedDragOptions {
2777
+ wasOriginallyAllDay: boolean;
2778
+ mouseHour: number;
2779
+ hourOffset: number | null | undefined;
2780
+ duration: number;
2781
+ originalStartHour: number;
2782
+ originalEndHour: number;
2783
+ firstHour: number;
2784
+ lastHour: number;
2785
+ minDuration: number;
2786
+ roundToTimeStep: (hour: number) => number;
2787
+ }
2788
+ interface RestoredTimedDragState {
2789
+ startHour: number;
2790
+ endHour: number;
2791
+ duration: number;
2792
+ hourOffset: number;
2793
+ }
2794
+ declare const restoreTimedDragFromAllDayTransition: ({ wasOriginallyAllDay, mouseHour, hourOffset, duration, originalStartHour, originalEndHour, firstHour, lastHour, minDuration, roundToTimeStep, }: RestoreTimedDragOptions) => RestoredTimedDragState;
2795
+
2748
2796
  /**
2749
2797
  * Core translation function.
2750
2798
  * 1. Try Intl API for standard terms.
@@ -2925,6 +2973,7 @@ interface IconProps {
2925
2973
  height?: number;
2926
2974
  }
2927
2975
  declare const ChevronRight: ({ className, width, height, }: IconProps) => preact.JSX.Element;
2976
+ declare const ChevronDown: ({ className, width, height, }: IconProps) => preact.JSX.Element;
2928
2977
  declare const Plus: ({ className, width, height }: IconProps) => preact.JSX.Element;
2929
2978
  declare const Check: ({ className, width, height }: IconProps) => preact.JSX.Element;
2930
2979
  declare const ChevronsUpDown: ({ className, width, height, }: IconProps) => preact.JSX.Element;
@@ -2957,5 +3006,5 @@ declare const sidebarHeaderToggle = "df-sidebar-header-toggle flex h-8 w-8 items
2957
3006
  */
2958
3007
  declare const sidebarHeaderTitle = "df-sidebar-header-title text-sm font-semibold text-gray-700 dark:text-gray-200";
2959
3008
 
2960
- export { AudioLines, BlossomColorPicker, CalendarApp, CalendarRegistry, CalendarRenderer, Check, ChevronRight, ChevronsUpDown, ContentSlot, ContextMenu, ContextMenuColorPicker, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, CreateCalendarDialog, CustomRenderingStore, DefaultColorPicker, LAYOUT_CONFIG, LOCALES, LocaleContext, LocaleProvider, MiniCalendar, PanelRightClose, PanelRightOpen, Plus, TIME_STEP, TimeZone, VIRTUAL_MONTH_SCROLL_CONFIG, ViewType, WeekDataCache, addDays, buildParseRegExp, calculateDayIndex, calendarPickerDropdown, cancelButton, capitalize, clipboardStore, conditionalTheme, convertDateEvent, convertDateEventWithTimeZone, convertToDayFlowEvent, createAllDayEvent, createDateWithHour, createDayView, createEvent, createEventWithDate, createEventWithPlainDateTime, createEventWithRealDate, createEventWithZonedDateTime, createEvents, createEventsPlugin, createMonthView, createStandardViews, createTemporalWithHour, createTimedEvent, createTimezoneEvent, createTimezoneEvents, createWeekView, createYearView, dateToPlainDate, dateToPlainDateTime, dateToZonedDateTime, daysBetween, daysDifference, downloadICS, en, escapeICSValue, extractHourFromDate, extractHourFromTemporal, extractVEvents, foldLine, formatDate, formatDateConsistent, formatDateToICSTimestamp, formatEventTimeRange, formatICSDate, formatMonthYear, formatProperty, formatTemporal, formatTime, generateDayData, generateICS, generateSecondaryTimeSlots, generateUniKey, generateVEvent, generateWeekData, generateWeekRange, generateWeeksData, getAllDayEventsForDay, getCalendarColorsForHex, getCurrentWeekDates, getDateByDayIndex, getDateObj, getDayIndexByDate, getEndOfDay, getEndOfTemporal, getEventBgColor, getEventEndHour, getEventTextColor, getEventsForDay, getEventsForWeek, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getPlainDate, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getTestEvents, getTimezoneDisplayLabel, getWeekDaysLabels, getWeekNumber, getWeekRange, getZoneId, groupSearchResults, hasEventChanged, importICSFile, isDate, isDeepEqual, isEventDeepEqual, isEventInWeek, isMultiDayEvent, isMultiDayTemporalEvent, isPlainDate, isPlainDateTime, isSameDay, isSamePlainDate, isSameTemporal, isValidLocale, isZonedDateTime, mergeClasses, mergeFormatTemplate, monthNames, normalizeCssWidth, normalizeDate, normalizeLocale, normalizeToZoned, now, pad, pad2, parseICS, parseICSDate, parseTemporalString, parseVEventLines, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, t, temporalToDate, themeClasses, themeCn, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
2961
- export type { BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarHeaderProps, CalendarPlugin, CalendarType, CalendarView, CalendarsConfig, ColorPickerProps, CreateCalendarDialogColorPickerProps, CreateCalendarDialogProps, CreateEventParams, CreateTimezoneEventParams, CustomRendering, DayData, DayViewConfig, DayViewProps, DragConfig, DragHookOptions, DragHookReturn, DragIndicatorProps, DragIndicatorRenderer, DragIntegrationProps, DragPluginConfig, DragRef, DragService, Event, EventChange, EventContentSlotArgs, EventDetailContentProps, EventDetailContentRenderer, EventDetailDialogProps, EventDetailDialogRenderer, EventDetailPanelProps, EventDetailPanelRenderer, EventDetailPosition, EventGroup, EventLayout, EventRelations, EventsPluginConfig, EventsService, ICSDateParams, ICSExportOptions, ICSImportOptions, ICSImportResult, ICSParseError, ICSVEvent, ICalendarApp, Locale, LocaleCode, LocaleContextValue, LocaleDict, LocaleMessages, LocaleProviderProps, MobileEventProps, MobileEventRenderer, Mode, MonthDragState, MonthEventDragState, MonthScrollConfig, MonthViewConfig, MonthViewProps, NestedLayer, RangeChangeReason, ReadOnlyConfig, SidebarBridgeReturn, SidebarHeaderSlotArgs, SpecialLayoutRule, SubtreeAnalysis, SupportedLang, TComponent, TNode, ThemeColors, ThemeConfig, ThemeMode, TimeZoneValue, TitleBarSlotProps, TransferOperation, TranslationKey, UnifiedDragRef, UseCalendarAppReturn, UseCalendarReturn, UseDragCommonReturn, UseDragHandlersParams, UseDragHandlersReturn, UseDragManagerReturn, UseDragStateReturn, UseMonthDragParams, UseMonthDragReturn, UseVirtualMonthScrollProps, UseVirtualMonthScrollReturn, UseVirtualScrollProps, UseVirtualScrollReturn, UseWeekDayDragParams, UseWeekDayDragReturn, ViewAdapterProps, ViewFactory, ViewFactoryConfig, VirtualItem, VirtualScrollIntegrationProps, VirtualWeekItem, WeekDayDragState, WeekViewConfig, WeekViewProps, WeeksData, YearViewConfig, YearViewProps, useDragProps, useDragReturn };
3009
+ export { AudioLines, BlossomColorPicker, CalendarApp, CalendarRegistry, CalendarRenderer, Check, ChevronDown, ChevronRight, ChevronsUpDown, ContentSlot, ContextMenu, ContextMenuColorPicker, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, CreateCalendarDialog, CustomRenderingStore, DefaultColorPicker, LAYOUT_CONFIG, LOCALES, LocaleContext, LocaleProvider, MiniCalendar, PanelRightClose, PanelRightOpen, Plus, TIME_STEP, TimeZone, VIRTUAL_MONTH_SCROLL_CONFIG, ViewType, WeekDataCache, addDays, buildParseRegExp, calculateDayIndex, calendarPickerDropdown, cancelButton, capitalize, clipboardStore, compareAllDayDisplayPriority, conditionalTheme, convertDateEvent, convertDateEventWithTimeZone, convertToDayFlowEvent, createAllDayDisplayComparator, createAllDayEvent, createDateWithHour, createDayView, createEvent, createEventWithDate, createEventWithPlainDateTime, createEventWithRealDate, createEventWithZonedDateTime, createEvents, createEventsPlugin, createMonthView, createStandardViews, createTemporalWithHour, createTimedEvent, createTimezoneEvent, createTimezoneEvents, createWeekView, createYearView, dateToPlainDate, dateToPlainDateTime, dateToZonedDateTime, daysBetween, daysDifference, downloadICS, en, escapeICSValue, extractHourFromDate, extractHourFromTemporal, extractVEvents, foldLine, formatDate, formatDateConsistent, formatDateToICSTimestamp, formatEventTimeRange, formatICSDate, formatMonthYear, formatProperty, formatTemporal, formatTime, generateDayData, generateICS, generateSecondaryTimeSlots, generateUniKey, generateVEvent, generateWeekData, generateWeekRange, generateWeeksData, getAllDayEventsForDay, getAllDayRangeMetrics, getCalendarColorsForHex, getCurrentWeekDates, getDateByDayIndex, getDateObj, getDayIndexByDate, getEndOfDay, getEndOfTemporal, getEventBgColor, getEventEndHour, getEventTextColor, getEventsForDay, getEventsForWeek, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getPlainDate, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getTestEvents, getTimezoneDisplayLabel, getWeekDaysLabels, getWeekNumber, getWeekRange, getZoneId, groupSearchResults, hasEventChanged, importICSFile, isDate, isDeepEqual, isEventDeepEqual, isEventInWeek, isMultiDayEvent, isMultiDayTemporalEvent, isPlainDate, isPlainDateTime, isSameDay, isSamePlainDate, isSameTemporal, isValidLocale, isZonedDateTime, mergeClasses, mergeFormatTemplate, monthNames, normalizeCssWidth, normalizeDate, normalizeLocale, normalizeToZoned, now, pad, pad2, parseICS, parseICSDate, parseTemporalString, parseVEventLines, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, restoreTimedDragFromAllDayTransition, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, sortAllDayByTitle, t, temporalToDate, themeClasses, themeCn, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
3010
+ export type { AllDaySortComparator, BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarHeaderProps, CalendarPlugin, CalendarType, CalendarView, CalendarsConfig, ColorPickerProps, CreateCalendarDialogColorPickerProps, CreateCalendarDialogProps, CreateEventParams, CreateTimezoneEventParams, CustomRendering, DayData, DayViewConfig, DayViewProps, DragConfig, DragHookOptions, DragHookReturn, DragIndicatorProps, DragIndicatorRenderer, DragIntegrationProps, DragPluginConfig, DragRef, DragService, Event, EventChange, EventContentSlotArgs, EventDetailContentProps, EventDetailContentRenderer, EventDetailDialogProps, EventDetailDialogRenderer, EventDetailPanelProps, EventDetailPanelRenderer, EventDetailPosition, EventGroup, EventLayout, EventRelations, EventsPluginConfig, EventsService, ICSDateParams, ICSExportOptions, ICSImportOptions, ICSImportResult, ICSParseError, ICSVEvent, ICalendarApp, Locale, LocaleCode, LocaleContextValue, LocaleDict, LocaleMessages, LocaleProviderProps, MobileEventProps, MobileEventRenderer, Mode, MonthDragState, MonthEventDragState, MonthScrollConfig, MonthViewConfig, MonthViewProps, NestedLayer, RangeChangeReason, ReadOnlyConfig, SidebarBridgeReturn, SidebarHeaderSlotArgs, SpecialLayoutRule, SubtreeAnalysis, SupportedLang, TComponent, TNode, ThemeColors, ThemeConfig, ThemeMode, TimeZoneValue, TitleBarSlotProps, TransferOperation, TranslationKey, UnifiedDragRef, UseCalendarAppReturn, UseCalendarReturn, UseDragCommonReturn, UseDragHandlersParams, UseDragHandlersReturn, UseDragManagerReturn, UseDragStateReturn, UseMonthDragParams, UseMonthDragReturn, UseVirtualMonthScrollProps, UseVirtualMonthScrollReturn, UseVirtualScrollProps, UseVirtualScrollReturn, UseWeekDayDragParams, UseWeekDayDragReturn, ViewAdapterProps, ViewFactory, ViewFactoryConfig, VirtualItem, VirtualScrollIntegrationProps, VirtualWeekItem, WeekDayDragState, WeekViewConfig, WeekViewProps, WeeksData, YearViewConfig, YearViewProps, useDragProps, useDragReturn };