@dayflow/core 3.4.3 → 3.5.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
@@ -1,9 +1,10 @@
1
1
  import * as preact from 'preact';
2
2
  import { ComponentChildren, AnyComponent, RefObject, JSX } from 'preact';
3
3
  import { Temporal } from 'temporal-polyfill';
4
- import * as preact_compat from 'preact/compat';
5
- export { createPortal } from 'preact/compat';
4
+ export { ContextMenu, ContextMenuColorPicker, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator } from '@dayflow/ui-context-menu';
6
5
  import { BlossomColorPickerOptions } from '@dayflow/blossom-color-picker';
6
+ export { RangePicker as DayflowRangePicker, RangePickerProps, ZonedRange } from '@dayflow/ui-range-picker';
7
+ export { createPortal } from 'preact/compat';
7
8
 
8
9
  type ViewSwitcherMode = 'buttons' | 'select';
9
10
 
@@ -219,8 +220,16 @@ interface Event {
219
220
  allDay?: boolean;
220
221
  icon?: boolean | ComponentChildren;
221
222
  calendarId?: string;
223
+ /** Multi-calendar support: list of calendar IDs this event belongs to.
224
+ * When present, takes precedence over calendarId for visibility and color rendering.
225
+ * The event is visible as long as at least one listed calendar is visible. */
226
+ calendarIds?: string[];
222
227
  meta?: Record<string, unknown>;
223
228
  day?: number;
229
+ /** Original start hour (used for stable cross-day layout) */
230
+ _originalStartHour?: number;
231
+ /** Original end hour (used for stable cross-day layout) */
232
+ _originalEndHour?: number;
224
233
  }
225
234
 
226
235
  /**
@@ -522,19 +531,21 @@ interface CalendarCallbacks {
522
531
  onEventDelete?: (eventId: string) => void | Promise<void>;
523
532
  onDateChange?: (date: Date) => void | Promise<void>;
524
533
  onRender?: () => void | Promise<void>;
525
- /**
526
- * @deprecated This method is retained for backward compatibility and will be removed in future releases. Use ``onVisibleRangeChange`` instead.
527
- */
528
- onVisibleMonthChange?: (date: Date) => void | Promise<void>;
529
534
  onVisibleRangeChange?: (start: Date, end: Date, reason: RangeChangeReason) => void | Promise<void>;
530
535
  onCalendarUpdate?: (calendar: CalendarType) => void | Promise<void>;
531
536
  onCalendarCreate?: (calendar: CalendarType) => void | Promise<void>;
532
537
  onCalendarDelete?: (calendarId: string) => void | Promise<void>;
533
538
  onCalendarMerge?: (sourceId: string, targetId: string) => void | Promise<void>;
539
+ onCalendarReorder?: (fromIndex: number, toIndex: number) => void | Promise<void>;
534
540
  onEventClick?: (event: Event) => void | Promise<void>;
535
541
  onEventDoubleClick?: (event: Event, e: MouseEvent) => boolean | undefined | Promise<boolean | undefined>;
536
542
  onMoreEventsClick?: (date: Date) => void | Promise<void>;
537
543
  onDismissUI?: () => void | Promise<void>;
544
+ /**
545
+ * Toggle event detail panel or dialog.
546
+ * If eventId is null, closes the detail UI.
547
+ */
548
+ onEventDetailToggle?: (eventId: string | null) => void;
538
549
  }
539
550
  interface CalendarHeaderProps {
540
551
  calendar: ICalendarApp;
@@ -591,6 +602,7 @@ interface CalendarAppConfig {
591
602
  defaultCalendar?: string;
592
603
  theme?: ThemeConfig;
593
604
  useEventDetailDialog?: boolean;
605
+ useEventDetailPanel?: boolean;
594
606
  useCalendarHeader?: boolean;
595
607
  customMobileEventRenderer?: MobileEventRenderer;
596
608
  locale?: string | Locale;
@@ -669,6 +681,7 @@ interface ICalendarApp {
669
681
  onEventClick: (event: Event) => void;
670
682
  onEventDoubleClick: (event: Event, e: MouseEvent) => boolean | undefined | Promise<boolean | undefined>;
671
683
  onMoreEventsClick: (date: Date) => void;
684
+ onEventDetailToggle: (eventId: string | null) => void;
672
685
  highlightEvent: (eventId: string | null) => void;
673
686
  selectEvent: (eventId: string | null) => void;
674
687
  getCalendars: () => CalendarType[];
@@ -689,6 +702,7 @@ interface ICalendarApp {
689
702
  triggerRender: () => void;
690
703
  getCalendarRegistry: () => CalendarRegistry;
691
704
  getUseEventDetailDialog: () => boolean;
705
+ getUseEventDetailPanel: () => boolean;
692
706
  getCustomMobileEventRenderer: () => MobileEventRenderer | undefined;
693
707
  updateConfig: (config: Partial<CalendarAppConfig>) => void;
694
708
  /** The resolved global display/edit timezone (IANA string). */
@@ -836,6 +850,7 @@ interface DragRef {
836
850
  lastClientY: number;
837
851
  allDay: boolean;
838
852
  eventDate?: Date;
853
+ calendarIds?: string[];
839
854
  }
840
855
  /**
841
856
  * Event detail position interface
@@ -859,6 +874,12 @@ interface DragIndicatorProps {
859
874
  getDynamicPadding: (drag: DragRef) => string;
860
875
  locale?: string;
861
876
  isMobile?: boolean;
877
+ /** True when the indicator container has a light background (e.g. diagonal multi-calendar pattern).
878
+ * Renderers should use dark text instead of white when this is set. */
879
+ isLightBackground?: boolean;
880
+ /** Pre-computed line colors for all calendars on this event.
881
+ * Single-element array for single-calendar; multi-element for multi-calendar gradient bar. */
882
+ calendarLineColors?: string[];
862
883
  }
863
884
  interface DragIndicatorRenderer {
864
885
  renderAllDayContent: (props: DragIndicatorProps) => ComponentChildren;
@@ -895,6 +916,7 @@ interface UnifiedDragRef extends DragRef {
895
916
  initialIndicatorHeight?: number;
896
917
  indicatorContainer?: HTMLElement | null;
897
918
  calendarId?: string;
919
+ calendarIds?: string[];
898
920
  title?: string;
899
921
  }
900
922
  interface useDragProps extends Partial<DragConfig> {
@@ -1112,7 +1134,7 @@ interface EventDetailPanelProps {
1112
1134
  /** Whether the event is all-day */
1113
1135
  isAllDay: boolean;
1114
1136
  /** Event visibility state */
1115
- eventVisibility: 'visible' | 'sticky-top' | 'sticky-bottom' | 'sticky-left' | 'sticky-right';
1137
+ eventVisibility: 'standard' | 'sticky-top' | 'sticky-bottom' | 'sticky-left' | 'sticky-right';
1116
1138
  /** Calendar container reference */
1117
1139
  calendarRef: RefObject<HTMLDivElement>;
1118
1140
  /** Selected event element reference */
@@ -1192,6 +1214,7 @@ interface BaseViewProps<TConfig = unknown> {
1192
1214
  onDetailPanelToggle?: (eventId: string | null) => void;
1193
1215
  customDetailPanelContent?: EventDetailContentRenderer;
1194
1216
  customEventDetailDialog?: EventDetailDialogRenderer;
1217
+ useEventDetailPanel?: boolean;
1195
1218
  calendarRef: RefObject<HTMLDivElement>;
1196
1219
  switcherMode?: ViewSwitcherMode;
1197
1220
  meta?: Record<string, unknown>;
@@ -1540,6 +1563,51 @@ interface MobileEventProps {
1540
1563
  timeFormat?: '12h' | '24h';
1541
1564
  }
1542
1565
 
1566
+ type CalendarSearchEvent = Event & {
1567
+ color?: string;
1568
+ [key: string]: unknown;
1569
+ };
1570
+ interface CalendarSearchProps {
1571
+ /**
1572
+ * Debounce delay in ms
1573
+ * @default 300
1574
+ */
1575
+ debounceDelay?: number;
1576
+ /**
1577
+ * Async search method
1578
+ */
1579
+ onSearch?: (keyword: string) => Promise<CalendarSearchEvent[]>;
1580
+ /**
1581
+ * Custom search logic (takes over completely)
1582
+ */
1583
+ customSearch?: (params: {
1584
+ keyword: string;
1585
+ events: CalendarSearchEvent[];
1586
+ }) => CalendarSearchEvent[];
1587
+ /**
1588
+ * Search state callback
1589
+ */
1590
+ onSearchStateChange?: (state: {
1591
+ keyword: string;
1592
+ loading: boolean;
1593
+ results: CalendarSearchEvent[];
1594
+ }) => void;
1595
+ /**
1596
+ * Empty result text
1597
+ */
1598
+ emptyText?: string | Record<string, string>;
1599
+ /**
1600
+ * Custom handler for search result clicks
1601
+ */
1602
+ onResultClick?: (params: {
1603
+ event: CalendarSearchEvent;
1604
+ app: ICalendarApp;
1605
+ source: 'desktop' | 'mobile';
1606
+ defaultAction: () => void;
1607
+ closeSearch: () => void;
1608
+ }) => void | Promise<void>;
1609
+ }
1610
+
1543
1611
  declare class CalendarApp implements ICalendarApp {
1544
1612
  state: CalendarAppState;
1545
1613
  private callbacks;
@@ -1550,6 +1618,7 @@ declare class CalendarApp implements ICalendarApp {
1550
1618
  private navigation;
1551
1619
  private pluginManager;
1552
1620
  private useEventDetailDialog;
1621
+ private useEventDetailPanel;
1553
1622
  private useCalendarHeader;
1554
1623
  private customMobileEventRenderer?;
1555
1624
  constructor(config: CalendarAppConfig);
@@ -1587,6 +1656,7 @@ declare class CalendarApp implements ICalendarApp {
1587
1656
  onEventClick: (event: Event) => void;
1588
1657
  onEventDoubleClick: (event: Event, e: MouseEvent) => boolean | undefined | Promise<boolean | undefined>;
1589
1658
  onMoreEventsClick: (date: Date) => void;
1659
+ onEventDetailToggle: (eventId: string | null) => void;
1590
1660
  highlightEvent: (eventId: string | null) => void;
1591
1661
  selectEvent: (eventId: string | null) => void;
1592
1662
  dismissUI: () => void;
@@ -1611,6 +1681,7 @@ declare class CalendarApp implements ICalendarApp {
1611
1681
  getViewConfig: (viewType: CalendarViewType) => Record<string, unknown>;
1612
1682
  getCalendarRegistry: () => CalendarRegistry;
1613
1683
  getUseEventDetailDialog: () => boolean;
1684
+ getUseEventDetailPanel: () => boolean;
1614
1685
  getCustomMobileEventRenderer: () => MobileEventRenderer | undefined;
1615
1686
  getCalendarHeaderConfig: () => boolean;
1616
1687
  get timeZone(): string;
@@ -1770,6 +1841,48 @@ declare const getSelectedBgColor: (calendarIdOrColor: string, registry?: Calenda
1770
1841
  * Now uses the calendar registry for color resolution
1771
1842
  */
1772
1843
  declare const getLineColor: (calendarIdOrColor: string, registry?: CalendarRegistry) => string;
1844
+ /**
1845
+ * Resolve the primary calendar ID for an event.
1846
+ * Uses calendarIds[0] when available, otherwise falls back to calendarId.
1847
+ */
1848
+ declare const getPrimaryCalendarId: (event: {
1849
+ calendarId?: string;
1850
+ calendarIds?: string[];
1851
+ }) => string;
1852
+ /**
1853
+ * Resolve all line colors for an event's calendar(s).
1854
+ * Returns an array with one entry per calendar ID.
1855
+ */
1856
+ declare const getCalendarLineColors: (event: {
1857
+ calendarId?: string;
1858
+ calendarIds?: string[];
1859
+ }, registry?: CalendarRegistry) => string[];
1860
+ /**
1861
+ * Build a CSS gradient string for the multi-calendar color bar.
1862
+ * For a single color it returns the plain color value (no gradient).
1863
+ * For multiple colors it builds an equal-segment `linear-gradient(to bottom, ...)`.
1864
+ */
1865
+ declare const buildColorBarGradient: (colors: string[]) => string;
1866
+ /**
1867
+ * Build a 45° repeating stripe for narrow multi-calendar color bars.
1868
+ * Uses the same angle and stripe width as the event background pattern, but
1869
+ * accepts line colors so the left bar remains stronger than the event fill.
1870
+ */
1871
+ declare const buildDiagonalColorBarGradient: (colors: string[], stripeWidth?: number) => string;
1872
+ /**
1873
+ * Resolve all eventColor values for an event's calendar(s).
1874
+ * Used to build the diagonal stripe background.
1875
+ */
1876
+ declare const getCalendarEventBgColors: (event: {
1877
+ calendarId?: string;
1878
+ calendarIds?: string[];
1879
+ }, registry?: CalendarRegistry) => string[];
1880
+ /**
1881
+ * Build a 45° repeating diagonal stripe CSS background for multi-calendar events.
1882
+ * For a single color returns the plain color value (no pattern).
1883
+ * Each stripe is `stripeWidth` px wide (default 6px).
1884
+ */
1885
+ declare const buildDiagonalPatternBackground: (colors: string[], stripeWidth?: number) => string;
1773
1886
 
1774
1887
  /**
1775
1888
  * Time Utilities
@@ -2286,14 +2399,6 @@ declare function now(timeZone?: string): Temporal.ZonedDateTime;
2286
2399
  */
2287
2400
  declare function today(timeZone?: string): Temporal.PlainDate;
2288
2401
 
2289
- declare const pad: (input: number) => string;
2290
- declare const mergeFormatTemplate: (dateFormat: string, timeFormat: string) => string;
2291
- declare const buildParseRegExp: (template: string) => RegExp;
2292
- declare const parseTemporalString: (input: string, regExp: RegExp, reference: Temporal.ZonedDateTime, zoneId: string) => Temporal.ZonedDateTime | null;
2293
- declare const getZoneId: (value: Temporal.ZonedDateTime) => string;
2294
- declare const normalizeToZoned: (input: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, fallbackZone?: string, fallbackTemporal?: Temporal.ZonedDateTime) => Temporal.ZonedDateTime;
2295
- declare const formatTemporal: (value: Temporal.ZonedDateTime, format: string, timeFormat: string) => string;
2296
-
2297
2402
  /**
2298
2403
  * Style Utility Functions
2299
2404
  *
@@ -2330,97 +2435,8 @@ declare function normalizeCssWidth(width?: number | string, defaultWidth?: strin
2330
2435
  */
2331
2436
  declare function scrollbarTakesSpace(): boolean;
2332
2437
 
2333
- /**
2334
- * Theme Utility Functions
2335
- *
2336
- * This module provides utility functions for working with theme-aware class names.
2337
- */
2338
- /**
2339
- * Combine class names with theme-specific variants
2340
- *
2341
- * @param base - Base class names (applied in both themes)
2342
- * @param light - Light mode specific class names
2343
- * @param dark - Dark mode specific class names (will be prefixed with 'dark:')
2344
- * @returns Combined class name string
2345
- *
2346
- * @example
2347
- * ```ts
2348
- * themeCn('p-4 rounded', 'bg-white text-black', 'bg-gray-900 text-white')
2349
- * // Returns: 'p-4 rounded bg-white text-black dark:bg-gray-900 dark:text-white'
2350
- * ```
2351
- */
2352
- declare const themeCn: (base: string, light: string, dark: string) => string;
2353
- /**
2354
- * Common theme class combinations
2355
- *
2356
- * Pre-defined class combinations for common UI elements.
2357
- * Use these for consistency across the application.
2358
- */
2359
- declare const themeClasses: {
2360
- container: string;
2361
- card: string;
2362
- sidebar: string;
2363
- text: string;
2364
- textMuted: string;
2365
- textSubtle: string;
2366
- textEmphasis: string;
2367
- border: string;
2368
- borderLight: string;
2369
- borderStrong: string;
2370
- bgPrimary: string;
2371
- bgSecondary: string;
2372
- bgTertiary: string;
2373
- bgMuted: string;
2374
- hover: string;
2375
- hoverSubtle: string;
2376
- active: string;
2377
- focus: string;
2378
- input: string;
2379
- inputFocus: string;
2380
- buttonPrimary: string;
2381
- buttonSecondary: string;
2382
- buttonDanger: string;
2383
- buttonSuccess: string;
2384
- shadow: string;
2385
- shadowMd: string;
2386
- shadowLg: string;
2387
- divider: string;
2388
- };
2389
- /**
2390
- * Conditional theme class
2391
- *
2392
- * Returns different class names based on a condition.
2393
- *
2394
- * @param condition - Condition to evaluate
2395
- * @param whenTrue - Class names when condition is true
2396
- * @param whenFalse - Class names when condition is false
2397
- * @returns Class name string based on condition
2398
- *
2399
- * @example
2400
- * ```ts
2401
- * conditionalTheme(isActive, 'bg-blue-500 dark:bg-blue-600', 'bg-gray-200 dark:bg-gray-700')
2402
- * ```
2403
- */
2404
- declare const conditionalTheme: (condition: boolean, whenTrue: string, whenFalse: string) => string;
2405
- /**
2406
- * Merge multiple class names, filtering out falsy values
2407
- *
2408
- * @param classes - Array of class names or falsy values
2409
- * @returns Merged class name string
2410
- *
2411
- * @example
2412
- * ```ts
2413
- * mergeClasses('p-4', isActive && 'bg-blue-500', 'rounded')
2414
- * // Returns: 'p-4 bg-blue-500 rounded' (if isActive is true)
2415
- * ```
2416
- */
2417
- declare const mergeClasses: (...classes: (string | undefined | null | false)[]) => string;
2418
2438
  /**
2419
2439
  * Resolve the currently applied theme on the document.
2420
- *
2421
- * This inspects common override hooks (like `data-dayflow-theme-override` or
2422
- * manual `dark`/`light` classes) so host applications can force a theme even
2423
- * when DayFlow is configured in `auto` mode.
2424
2440
  */
2425
2441
  declare const resolveAppliedTheme: (effectiveTheme: "light" | "dark") => "light" | "dark";
2426
2442
 
@@ -2548,29 +2564,6 @@ declare function createAllDayEvent(id: string, title: string, date: Date, option
2548
2564
  * Quick create timed event
2549
2565
  */
2550
2566
  declare function createTimedEvent(id: string, title: string, start: Date, end: Date, options?: Omit<CreateEventParams, 'id' | 'title' | 'start' | 'end'>): Event;
2551
- /**
2552
- * Convert legacy Date-based event to Temporal-based event
2553
- * @deprecated Use createEvent() directly with Date objects instead
2554
- */
2555
- declare function convertDateEvent(id: string, title: string, startDate: Date, endDate: Date, allDay?: boolean, options?: {
2556
- description?: string;
2557
- calendarId?: string;
2558
- meta?: Record<string, unknown>;
2559
- }): Event;
2560
- /**
2561
- * Convert legacy Date-based event to timezone-aware event
2562
- * @deprecated Use createTimezoneEvent() directly with Date objects instead
2563
- */
2564
- declare function convertDateEventWithTimeZone(id: string, title: string, startDate: Date, endDate: Date, timeZone: string, options?: {
2565
- description?: string;
2566
- calendarId?: string;
2567
- meta?: Record<string, unknown>;
2568
- }): Event;
2569
-
2570
- type CalendarSearchEvent = Event & {
2571
- color?: string;
2572
- [key: string]: unknown;
2573
- };
2574
2567
 
2575
2568
  /**
2576
2569
  * Helper to get date object from event start
@@ -2585,16 +2578,16 @@ declare const getDateObj: (dateInput: unknown) => Date;
2585
2578
  */
2586
2579
  declare const normalizeDate: (date: Date) => Date;
2587
2580
  /**
2588
- * Helper to get header text and color for a date group in search results
2581
+ * Helper to get header text and semantic tone for a date group in search results
2589
2582
  * @param groupDate The date of the group
2590
2583
  * @param today Reference today date (normalized)
2591
2584
  * @param locale Locale string
2592
2585
  * @param t Translation function
2593
- * @returns Object with title and colorClass
2586
+ * @returns Object with title and tone
2594
2587
  */
2595
2588
  declare const getSearchHeaderInfo: (groupDate: Date, today: Date, locale: string, t: (key: TranslationKey) => string) => {
2596
2589
  title: string;
2597
- colorClass: string;
2590
+ tone: "default" | "today" | "upcoming";
2598
2591
  };
2599
2592
  /**
2600
2593
  * Helper to group search results by date
@@ -2832,7 +2825,7 @@ declare const restoreTimedDragFromAllDayTransition: ({ wasOriginallyAllDay, mous
2832
2825
 
2833
2826
  declare function normalizeTimeZoneValue(timeZone?: TimeZoneValue): string | undefined;
2834
2827
 
2835
- type SyncableCalendarAppConfig = Pick<CalendarAppConfig, 'allDaySortComparator' | 'calendars' | 'customMobileEventRenderer' | 'locale' | 'readOnly' | 'switcherMode' | 'theme' | 'timeZone' | 'useCalendarHeader' | 'useEventDetailDialog' | 'views'>;
2828
+ type SyncableCalendarAppConfig = Pick<CalendarAppConfig, 'allDaySortComparator' | 'calendars' | 'customMobileEventRenderer' | 'locale' | 'readOnly' | 'switcherMode' | 'theme' | 'timeZone' | 'useCalendarHeader' | 'useEventDetailDialog' | 'useEventDetailPanel' | 'views'>;
2836
2829
  type CalendarAppConfigSyncSnapshot = {
2837
2830
  callbacks: CalendarAppConfig['callbacks'];
2838
2831
  syncableConfig: SyncableCalendarAppConfig;
@@ -2972,33 +2965,6 @@ type SidebarBridgeFn = (app: ICalendarApp) => SidebarBridgeReturn;
2972
2965
  declare function registerSidebarImplementation(fn: SidebarBridgeFn): void;
2973
2966
  declare function useSidebarBridge(app: ICalendarApp): SidebarBridgeReturn;
2974
2967
 
2975
- interface ContextMenuProps {
2976
- x: number;
2977
- y: number;
2978
- onClose: () => void;
2979
- children: ComponentChildren;
2980
- className?: string;
2981
- }
2982
- declare const ContextMenu: preact.FunctionalComponent<preact_compat.PropsWithoutRef<ContextMenuProps> & {
2983
- ref?: preact.Ref<HTMLDivElement> | undefined;
2984
- }>;
2985
- declare const ContextMenuItem: ({ onClick, children, icon, danger, disabled, }: {
2986
- onClick: () => void;
2987
- children: ComponentChildren;
2988
- icon?: ComponentChildren;
2989
- danger?: boolean;
2990
- disabled?: boolean;
2991
- }) => preact.JSX.Element;
2992
- declare const ContextMenuSeparator: () => preact.JSX.Element;
2993
- declare const ContextMenuLabel: ({ children, }: {
2994
- children: ComponentChildren;
2995
- }) => preact.JSX.Element;
2996
- declare const ContextMenuColorPicker: ({ selectedColor, onSelect, onCustomColor, }: {
2997
- selectedColor?: string;
2998
- onSelect: (color: string) => void;
2999
- onCustomColor?: () => void;
3000
- }) => preact.JSX.Element;
3001
-
3002
2968
  interface GridContextMenuProps {
3003
2969
  x: number;
3004
2970
  y: number;
@@ -3047,30 +3013,6 @@ interface DefaultColorPickerProps {
3047
3013
  }
3048
3014
  declare const DefaultColorPicker: ({ color, onChange, onClose, }: DefaultColorPickerProps) => preact.JSX.Element;
3049
3015
 
3050
- type ZonedRange = [Temporal.ZonedDateTime, Temporal.ZonedDateTime];
3051
- interface RangePickerProps {
3052
- value: [
3053
- Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime,
3054
- Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime
3055
- ];
3056
- format?: string;
3057
- showTimeFormat?: string;
3058
- showTime?: boolean | {
3059
- format?: string;
3060
- };
3061
- onChange?: (value: ZonedRange, dateString: [string, string]) => void;
3062
- onOk?: (value: ZonedRange, dateString: [string, string]) => void;
3063
- timeZone?: string;
3064
- disabled?: boolean;
3065
- placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
3066
- autoAdjustOverflow?: boolean;
3067
- getPopupContainer?: () => HTMLElement;
3068
- matchTriggerWidth?: boolean;
3069
- locale?: string | Locale;
3070
- }
3071
-
3072
- declare const RangePicker: ({ value, format, showTimeFormat, showTime, onChange, onOk, timeZone, disabled, placement, autoAdjustOverflow, getPopupContainer, matchTriggerWidth, locale, }: RangePickerProps) => JSX.Element;
3073
-
3074
3016
  interface MiniCalendarProps {
3075
3017
  visibleMonth: Date;
3076
3018
  currentDate: Date;
@@ -3100,7 +3042,6 @@ interface DefaultEventDetailDialogProps extends EventDetailDialogProps {
3100
3042
  }
3101
3043
  /**
3102
3044
  * Default event detail dialog component (Dialog mode)
3103
- * Content is consistent with DefaultEventDetailPanel, but displayed using Dialog/Modal
3104
3045
  */
3105
3046
  declare const DefaultEventDetailDialog: ({ event, isOpen, onEventUpdate, onEventDelete, onClose, app, }: DefaultEventDetailDialogProps) => preact.VNode<any> | null;
3106
3047
 
@@ -3172,6 +3113,8 @@ interface CalendarEventProps {
3172
3113
  customDetailPanelContent?: EventDetailContentRenderer;
3173
3114
  /** Custom event detail dialog component (Dialog mode) */
3174
3115
  customEventDetailDialog?: EventDetailDialogRenderer;
3116
+ /** When false, suppresses the floating event detail panel entirely */
3117
+ useEventDetailPanel?: boolean;
3175
3118
  /** Multi-day regular event segment information */
3176
3119
  multiDaySegmentInfo?: {
3177
3120
  startHour: number;
@@ -3209,7 +3152,21 @@ interface CalendarEventProps {
3209
3152
  appTimeZone?: string;
3210
3153
  }
3211
3154
 
3212
- declare const CalendarEvent: ({ event, layout, isAllDay, allDayHeight, calendarRef, isBeingDragged, isBeingResized, viewType, isMultiDay, segment, yearSegment, columnsPerRow, segmentIndex, hourHeight, firstHour, selectedEventId, detailPanelEventId, onMoveStart, onResizeStart, onEventUpdate, onEventDelete, newlyCreatedEventId, onDetailPanelOpen, onEventSelect, onEventLongPress, onDetailPanelToggle, customDetailPanelContent, customEventDetailDialog, multiDaySegmentInfo, app, isMobile, isSlidingView, enableTouch, hideTime, timeFormat, styleOverride, className, disableDefaultStyle, renderVisualContent, resizeHandleOrientation, appTimeZone, }: CalendarEventProps) => preact.JSX.Element;
3155
+ declare const CalendarEvent: ({ event, layout, isAllDay, allDayHeight, calendarRef, isBeingDragged, isBeingResized, viewType, isMultiDay, segment, yearSegment, columnsPerRow, segmentIndex, hourHeight, firstHour, selectedEventId, detailPanelEventId, onMoveStart, onResizeStart, onEventUpdate, onEventDelete, newlyCreatedEventId, onDetailPanelOpen, onEventSelect, onEventLongPress, onDetailPanelToggle, customDetailPanelContent, customEventDetailDialog, useEventDetailPanel, multiDaySegmentInfo, app, isMobile, isSlidingView, enableTouch, hideTime, timeFormat, styleOverride, className, disableDefaultStyle, renderVisualContent, resizeHandleOrientation, appTimeZone, }: CalendarEventProps) => preact.JSX.Element;
3156
+
3157
+ interface LayoutCalculationParams {
3158
+ containerWidth?: number;
3159
+ viewType?: 'week' | 'day';
3160
+ }
3161
+
3162
+ declare const EventLayoutCalculator: {
3163
+ /**
3164
+ * Calculate layout for all events in a day
3165
+ * @param dayEvents Array of events for the day
3166
+ * @param params Layout calculation parameters
3167
+ */
3168
+ calculateDayEventLayouts(dayEvents: Event[], params?: LayoutCalculationParams): Map<string, EventLayout>;
3169
+ };
3213
3170
 
3214
3171
  interface IconProps {
3215
3172
  className?: string;
@@ -3231,27 +3188,27 @@ declare const AlertCircle: ({ className, width, height, }: IconProps) => preact.
3231
3188
  /**
3232
3189
  * Cancel button
3233
3190
  */
3234
- declare const cancelButton = "rounded-md bg-background border border-border px-3 py-2 text-xs font-medium text-gray-700 dark:text-gray-300 hover:bg-(--hover)";
3191
+ declare const cancelButton = "df-btn-sm df-btn-sm-ghost";
3235
3192
  /**
3236
3193
  * Calendar picker dropdown (for selecting calendar for an event)
3237
3194
  */
3238
- declare const calendarPickerDropdown = "df-portal 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";
3195
+ declare const calendarPickerDropdown = "df-portal df-calendar-picker-dropdown df-animate-in df-fade-in df-zoom-in-95";
3239
3196
  /**
3240
3197
  * Sidebar container
3241
3198
  */
3242
- declare const sidebarContainer = "df-sidebar flex h-full flex-col border-r";
3199
+ declare const sidebarContainer = "df-sidebar";
3243
3200
  /**
3244
3201
  * Sidebar header
3245
3202
  */
3246
- declare const sidebarHeader = "df-sidebar-header flex items-center px-2 py-1";
3203
+ declare const sidebarHeader = "df-sidebar-header";
3247
3204
  /**
3248
3205
  * Sidebar header toggle button
3249
3206
  */
3250
- declare const sidebarHeaderToggle = "df-sidebar-header-toggle flex h-8 w-8 items-center justify-center rounded hover:bg-gray-100 dark:hover:bg-slate-800";
3207
+ declare const sidebarHeaderToggle = "df-sidebar-toggle";
3251
3208
  /**
3252
3209
  * Sidebar header title
3253
3210
  */
3254
- declare const sidebarHeaderTitle = "df-sidebar-header-title text-sm font-semibold text-gray-700 dark:text-gray-200";
3211
+ declare const sidebarHeaderTitle = "df-sidebar-header-title";
3255
3212
 
3256
- export { AlertCircle, AudioLines, BlossomColorPicker, CalendarApp, CalendarEvent, CalendarRegistry, CalendarRenderer, Check, ChevronDown, ChevronRight, ChevronsUpDown, ContentSlot, ContextMenu, ContextMenuColorPicker, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, CreateCalendarDialog, CustomRenderingStore, RangePicker as DayflowRangePicker, DefaultColorPicker, DefaultEventDetailDialog, DefaultEventDetailPanel, EventContextMenu, GridContextMenu, LAYOUT_CONFIG, LOCALES, Loader2, LoadingButton, LocaleContext, LocaleProvider, MiniCalendar, PanelRightClose, PanelRightOpen, Plus, TIME_STEP, TimeZone, VIRTUAL_MONTH_SCROLL_CONFIG, ViewType, WeekDataCache, addDays, buildParseRegExp, calculateDayIndex, calendarPickerDropdown, cancelButton, capitalize, clipboardStore, compareAllDayDisplayPriority, compareViews, conditionalTheme, convertDateEvent, convertDateEventWithTimeZone, convertToDayFlowEvent, createAllDayDisplayComparator, createAllDayEvent, createConfigSyncSnapshot, createDateWithHour, createDayView, createEvent, createEventWithDate, createEventWithPlainDateTime, createEventWithRealDate, createEventWithZonedDateTime, createEvents, createEventsPlugin, createMonthView, createNormalizedCalendarAppConfigGetter, 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, getCallbackConfigUpdate, getCurrentWeekDates, getDateByDayIndex, getDateObj, getDayIndexByDate, getEndOfDay, getEndOfTemporal, getEventBgColor, getEventEndHour, getEventTextColor, getEventsForDay, getEventsForWeek, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getNextHourRangeInTimeZone, getNowInTimeZone, getPlainDate, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getSyncConfigUpdates, getTestEvents, getTimezoneDisplayLabel, getTodayInTimeZone, 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, normalizeTimeZoneValue, normalizeToZoned, now, pad, pad2, parseICS, parseICSDate, parseTemporalString, parseVEventLines, pickSyncableConfig, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, restoreTimedDragFromAllDayTransition, restoreVisualEventToCanonical, restoreVisualTimedTemporalToCanonical, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, sortAllDayByTitle, subscribeCalendar, syncCalendarAppConfig, t, temporalToDate, temporalToVisualDate, temporalToVisualTemporal, themeClasses, themeCn, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
3257
- export type { AllDaySortComparator, BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppConfigSyncSnapshot, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarEventProps, CalendarHeaderProps, CalendarPlugin, CalendarType, CalendarView, CalendarViewType, CalendarsConfig, ColorPickerProps, CreateCalendarDialogColorPickerProps, CreateCalendarDialogProps, CreateEventParams, CreateTimezoneEventParams, CustomRendering, DayData, DayViewConfig, DayViewProps, DragConfig, DragHookOptions, DragHookReturn, DragIndicatorProps, DragIndicatorRenderer, DragIntegrationProps, DragPluginConfig, DragRef, DragService, Event, EventChange, EventContentSlotArgs, EventContextMenuSlotArgs, EventDetailContentProps, EventDetailContentRenderer, EventDetailDialogProps, EventDetailDialogRenderer, EventDetailPanelProps, EventDetailPanelRenderer, EventDetailPosition, EventGroup, EventLayout, EventRelations, EventsPluginConfig, EventsService, GridContextMenuSlotArgs, ICSDateParams, ICSExportOptions, ICSImportOptions, ICSImportResult, ICSParseError, ICSVEvent, ICalendarApp, Locale, LocaleCode, LocaleContextValue, LocaleDict, LocaleMessages, LocaleProviderProps, MobileEventProps, MobileEventRenderer, Mode, MonthDragState, MonthEventDragState, MonthScrollConfig, MonthViewConfig, MonthViewProps, NestedLayer, RangeChangeReason, RangePickerProps, ReadOnlyConfig, SidebarBridgeReturn, SidebarHeaderSlotArgs, SpecialLayoutRule, SubscribeResult, SubtreeAnalysis, SupportedLang, SyncableCalendarAppConfig, 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, ViewConfigComparison, ViewFactory, ViewFactoryConfig, VirtualItem, VirtualScrollIntegrationProps, VirtualWeekItem, WeekDayDragState, WeekViewConfig, WeekViewProps, WeeksData, YearViewConfig, YearViewProps, ZonedRange, useDragProps, useDragReturn };
3213
+ export { AlertCircle, AudioLines, BlossomColorPicker, CalendarApp, CalendarEvent, CalendarRegistry, CalendarRenderer, Check, ChevronDown, ChevronRight, ChevronsUpDown, ContentSlot, CreateCalendarDialog, CustomRenderingStore, DefaultColorPicker, DefaultEventDetailDialog, DefaultEventDetailPanel, EventContextMenu, EventLayoutCalculator, GridContextMenu, LAYOUT_CONFIG, LOCALES, Loader2, LoadingButton, LocaleContext, LocaleProvider, MiniCalendar, PanelRightClose, PanelRightOpen, Plus, TIME_STEP, TimeZone, VIRTUAL_MONTH_SCROLL_CONFIG, ViewType, WeekDataCache, addDays, buildColorBarGradient, buildDiagonalColorBarGradient, buildDiagonalPatternBackground, calculateDayIndex, calendarPickerDropdown, cancelButton, capitalize, clipboardStore, compareAllDayDisplayPriority, compareViews, convertToDayFlowEvent, createAllDayDisplayComparator, createAllDayEvent, createConfigSyncSnapshot, createDateWithHour, createDayView, createEvent, createEventWithDate, createEventWithPlainDateTime, createEventWithRealDate, createEventWithZonedDateTime, createEvents, createEventsPlugin, createMonthView, createNormalizedCalendarAppConfigGetter, 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, formatTime, generateDayData, generateICS, generateSecondaryTimeSlots, generateUniKey, generateVEvent, generateWeekData, generateWeekRange, generateWeeksData, getAllDayEventsForDay, getAllDayRangeMetrics, getCalendarColorsForHex, getCalendarEventBgColors, getCalendarLineColors, getCallbackConfigUpdate, getCurrentWeekDates, getDateByDayIndex, getDateObj, getDayIndexByDate, getEndOfDay, getEndOfTemporal, getEventBgColor, getEventEndHour, getEventTextColor, getEventsForDay, getEventsForWeek, getIntlLabel, getLineColor, getMonthLabels, getMonthYearOfWeek, getNextHourRangeInTimeZone, getNowInTimeZone, getPlainDate, getPrimaryCalendarId, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, getSyncConfigUpdates, getTestEvents, getTimezoneDisplayLabel, getTodayInTimeZone, getWeekDaysLabels, getWeekNumber, getWeekRange, groupSearchResults, hasEventChanged, importICSFile, isDate, isDeepEqual, isEventDeepEqual, isEventInWeek, isMultiDayEvent, isMultiDayTemporalEvent, isPlainDate, isPlainDateTime, isSameDay, isSamePlainDate, isSameTemporal, isValidLocale, isZonedDateTime, monthNames, normalizeCssWidth, normalizeDate, normalizeLocale, normalizeTimeZoneValue, now, pad2, parseICS, parseICSDate, parseVEventLines, pickSyncableConfig, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, restoreTimedDragFromAllDayTransition, restoreVisualEventToCanonical, restoreVisualTimedTemporalToCanonical, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, sortAllDayByTitle, subscribeCalendar, syncCalendarAppConfig, t, temporalToDate, temporalToVisualDate, temporalToVisualTemporal, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
3214
+ export type { AllDaySortComparator, BalanceStrategy, BaseViewProps, CalendarAppConfig, CalendarAppConfigSyncSnapshot, CalendarAppState, CalendarCallbacks, CalendarColors, CalendarConfig, CalendarEventProps, CalendarHeaderProps, CalendarPlugin, CalendarSearchEvent, CalendarSearchProps, CalendarType, CalendarView, CalendarViewType, CalendarsConfig, ColorPickerProps, CreateCalendarDialogColorPickerProps, CreateCalendarDialogProps, CreateEventParams, CreateTimezoneEventParams, CustomRendering, DayData, DayViewConfig, DayViewProps, DragConfig, DragHookOptions, DragHookReturn, DragIndicatorProps, DragIndicatorRenderer, DragIntegrationProps, DragPluginConfig, DragRef, DragService, Event, EventChange, EventContentSlotArgs, EventContextMenuSlotArgs, EventDetailContentProps, EventDetailContentRenderer, EventDetailDialogProps, EventDetailDialogRenderer, EventDetailPanelProps, EventDetailPanelRenderer, EventDetailPosition, EventGroup, EventLayout, EventRelations, EventsPluginConfig, EventsService, GridContextMenuSlotArgs, 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, SubscribeResult, SubtreeAnalysis, SupportedLang, SyncableCalendarAppConfig, 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, ViewConfigComparison, ViewFactory, ViewFactoryConfig, VirtualItem, VirtualScrollIntegrationProps, VirtualWeekItem, WeekDayDragState, WeekViewConfig, WeekViewProps, WeeksData, YearViewConfig, YearViewProps, useDragProps, useDragReturn };