@dayflow/core 3.2.3 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -41,6 +41,8 @@ interface CalendarType {
41
41
  isDefault?: boolean;
42
42
  /** Whether events of this type should be visible */
43
43
  isVisible?: boolean;
44
+ /** Whether this calendar was created by subscribing to a remote ICS URL */
45
+ subscribed?: boolean;
44
46
  }
45
47
  /**
46
48
  * Theme mode
@@ -182,7 +184,7 @@ declare function getCalendarColorsForHex(hex: string): {
182
184
  };
183
185
 
184
186
  type LocaleCode = string;
185
- type TranslationKey = 'allDay' | 'noEvents' | 'more' | 'eventTitle' | 'dateRange' | 'timeRange' | 'note' | 'addNotePlaceholder' | 'setAsAllDay' | 'setAsTimed' | 'delete' | 'confirm' | 'cancel' | 'today' | 'day' | 'week' | 'month' | 'year' | 'newEvent' | 'newAllDayEvent' | 'newCalendarEvent' | 'newAllDayCalendarEvent' | 'save' | 'deleteCalendar' | 'deleteCalendarMessage' | 'merge' | 'confirmDeleteTitle' | 'confirmDeleteMessage' | 'mergeConfirmTitle' | 'mergeConfirmMessage' | 'expandSidebar' | 'collapseSidebar' | 'calendars' | 'createCalendar' | 'calendarNamePlaceholder' | 'customColor' | 'create' | 'calendarOptions' | 'untitled' | 'search' | 'noResults' | 'calendar' | 'starts' | 'ends' | 'notes' | 'titlePlaceholder' | 'notesPlaceholder' | 'editEvent' | 'viewEvent' | 'done' | 'quickCreateEvent' | 'quickCreatePlaceholder' | 'noSuggestions' | 'newCalendar' | 'refreshAll' | 'tomorrow' | 'importCalendar' | 'exportCalendar' | 'addSchedule' | 'importCalendarMessage' | 'ok' | 'cut' | 'copy' | 'pasteHere' | 'eventSummary';
187
+ type TranslationKey = 'allDay' | 'noEvents' | 'more' | 'eventTitle' | 'dateRange' | 'timeRange' | 'note' | 'addNotePlaceholder' | 'setAsAllDay' | 'setAsTimed' | 'delete' | 'confirm' | 'cancel' | 'today' | 'day' | 'week' | 'month' | 'year' | 'newEvent' | 'newAllDayEvent' | 'newCalendarEvent' | 'newAllDayCalendarEvent' | 'save' | 'deleteCalendar' | 'deleteCalendarMessage' | 'merge' | 'confirmDeleteTitle' | 'confirmDeleteMessage' | 'mergeConfirmTitle' | 'mergeConfirmMessage' | 'expandSidebar' | 'collapseSidebar' | 'calendars' | 'createCalendar' | 'calendarNamePlaceholder' | 'customColor' | 'create' | 'calendarOptions' | 'untitled' | 'search' | 'noResults' | 'calendar' | 'starts' | 'ends' | 'notes' | 'titlePlaceholder' | 'notesPlaceholder' | 'editEvent' | 'viewEvent' | 'done' | 'quickCreateEvent' | 'quickCreatePlaceholder' | 'noSuggestions' | 'newCalendar' | 'refreshAll' | 'tomorrow' | 'importCalendar' | 'exportCalendar' | 'addSchedule' | 'importCalendarMessage' | 'ok' | 'cut' | 'copy' | 'pasteHere' | 'eventSummary' | 'subscribeCalendar' | 'subscribeCalendarTitle' | 'calendarUrl' | 'calendarUrlPlaceholder' | 'subscribe' | 'fetchingCalendar' | 'subscribeError';
186
188
  type LocaleDict = Partial<Record<TranslationKey, string>>;
187
189
  type LocaleMessages = Partial<Record<TranslationKey, string>>;
188
190
  interface Locale {
@@ -393,33 +395,6 @@ interface CalendarCallbacks {
393
395
  onMoreEventsClick?: (date: Date) => void | Promise<void>;
394
396
  onDismissUI?: () => void | Promise<void>;
395
397
  }
396
- interface TitleBarSlotProps {
397
- isCollapsed: boolean;
398
- toggleCollapsed: () => void;
399
- }
400
- interface CreateCalendarDialogColorPickerProps {
401
- color: string;
402
- onChange: (color: {
403
- hex: string;
404
- }) => void;
405
- onAccept?: () => void;
406
- onCancel?: () => void;
407
- styles?: any;
408
- }
409
- interface ColorPickerProps {
410
- color: string;
411
- onChange: (color: {
412
- hex: string;
413
- }) => void;
414
- onChangeComplete?: (color: {
415
- hex: string;
416
- }) => void;
417
- }
418
- interface CreateCalendarDialogProps {
419
- onClose: () => void;
420
- onCreate: (calendar: CalendarType) => void;
421
- app: ICalendarApp;
422
- }
423
398
  interface CalendarHeaderProps {
424
399
  calendar: ICalendarApp;
425
400
  switcherMode?: ViewSwitcherMode;
@@ -1246,11 +1221,36 @@ interface MonthViewConfig extends ViewFactoryConfig {
1246
1221
  * Year view factory configuration
1247
1222
  */
1248
1223
  interface YearViewConfig extends ViewFactoryConfig {
1249
- mode?: 'year-canvas' | 'fixed-week';
1224
+ mode?: 'year-canvas' | 'fixed-week' | 'grid';
1250
1225
  showTimedEventsInYearView?: boolean;
1251
1226
  startOfWeek?: number;
1252
1227
  /** Scroll / navigation behavior for the month view */
1253
1228
  scroll?: MonthScrollConfig;
1229
+ /**
1230
+ * Grid mode: action when a date cell is clicked.
1231
+ * - 'popup' (default): show a popup with events for that day
1232
+ * - 'day-view': navigate to the Day View
1233
+ * - 'none': no action
1234
+ * - function: custom handler
1235
+ */
1236
+ gridDateClick?: 'popup' | 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1237
+ /**
1238
+ * Grid mode: action when a date cell is double-clicked.
1239
+ * - 'day-view' (default): navigate to the Day View
1240
+ * - 'none': no action
1241
+ * - function: custom handler
1242
+ */
1243
+ gridDateDoubleClick?: 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1244
+ /**
1245
+ * Grid mode: render custom popup content.
1246
+ * Receives the clicked date and its events; return null/undefined to use the default popup.
1247
+ */
1248
+ gridPopupContent?: (date: Date, events: Event[]) => ComponentChildren;
1249
+ /**
1250
+ * Grid mode: number of heatmap intensity levels.
1251
+ * @default 5
1252
+ */
1253
+ gridHeatmapLevels?: number;
1254
1254
  }
1255
1255
  /**
1256
1256
  * View adapter Props
@@ -1316,6 +1316,37 @@ interface DragConfig {
1316
1316
  ALL_DAY_HEIGHT: number;
1317
1317
  }
1318
1318
 
1319
+ interface TitleBarSlotProps {
1320
+ isCollapsed: boolean;
1321
+ toggleCollapsed: () => void;
1322
+ }
1323
+ interface SidebarHeaderSlotArgs {
1324
+ isCollapsed: boolean;
1325
+ onCollapseToggle: () => void;
1326
+ }
1327
+ interface CreateCalendarDialogColorPickerProps {
1328
+ color: string;
1329
+ onChange: (color: {
1330
+ hex: string;
1331
+ }) => void;
1332
+ onAccept?: () => void;
1333
+ onCancel?: () => void;
1334
+ styles?: any;
1335
+ }
1336
+ interface ColorPickerProps {
1337
+ color: string;
1338
+ onChange: (color: {
1339
+ hex: string;
1340
+ }) => void;
1341
+ onChangeComplete?: (color: {
1342
+ hex: string;
1343
+ }) => void;
1344
+ }
1345
+ interface CreateCalendarDialogProps {
1346
+ onClose: () => void;
1347
+ onCreate: (calendar: CalendarType) => void;
1348
+ app: ICalendarApp;
1349
+ }
1319
1350
  /**
1320
1351
  * Events service interface
1321
1352
  * Provides various event management functions
@@ -2899,6 +2930,7 @@ declare const Check: ({ className, width, height }: IconProps) => preact.JSX.Ele
2899
2930
  declare const ChevronsUpDown: ({ className, width, height, }: IconProps) => preact.JSX.Element;
2900
2931
  declare const PanelRightClose: ({ className, width, height, }: IconProps) => preact.JSX.Element;
2901
2932
  declare const PanelRightOpen: ({ className, width, height, }: IconProps) => preact.JSX.Element;
2933
+ declare const AudioLines: ({ className, width, height, }: IconProps) => preact.JSX.Element;
2902
2934
 
2903
2935
  /**
2904
2936
  * Cancel button
@@ -2907,11 +2939,11 @@ declare const cancelButton = "rounded-md bg-background border border-border px-3
2907
2939
  /**
2908
2940
  * Calendar picker dropdown (for selecting calendar for an event)
2909
2941
  */
2910
- declare const calendarPickerDropdown = "bg-white dark:bg-gray-800 rounded-md shadow-lg border border-gray-200 dark:border-gray-700 overflow-hidden transition-all duration-200 origin-top-right animate-in fade-in zoom-in-95";
2942
+ declare const calendarPickerDropdown = "bg-white dark:bg-gray-800 rounded-md shadow-lg border border-gray-200 dark:border-gray-700 overflow-hidden transition-all duration-200 origin-top-right df-animate-in df-fade-in df-zoom-in-95";
2911
2943
  /**
2912
2944
  * Sidebar container
2913
2945
  */
2914
- declare const sidebarContainer = "df-sidebar flex h-full flex-col border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-900";
2946
+ declare const sidebarContainer = "df-sidebar flex h-full flex-col border-r";
2915
2947
  /**
2916
2948
  * Sidebar header
2917
2949
  */
@@ -2925,5 +2957,5 @@ declare const sidebarHeaderToggle = "df-sidebar-header-toggle flex h-8 w-8 items
2925
2957
  */
2926
2958
  declare const sidebarHeaderTitle = "df-sidebar-header-title text-sm font-semibold text-gray-700 dark:text-gray-200";
2927
2959
 
2928
- export { 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 };
2929
- 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, 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 };
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 };