@dayflow/core 2.0.7 → 3.0.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.
Files changed (170) hide show
  1. package/dist/index.d.ts +2555 -39
  2. package/dist/index.esm.js +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/styles.css +2126 -3107
  5. package/package.json +21 -32
  6. package/README.ja.md +0 -47
  7. package/README.md +0 -49
  8. package/README.zh.md +0 -47
  9. package/dist/components/calendarEvent/components/AllDayContent.d.ts +0 -9
  10. package/dist/components/calendarEvent/components/MonthAllDayContent.d.ts +0 -8
  11. package/dist/components/calendarEvent/components/MonthRegularContent.d.ts +0 -11
  12. package/dist/components/calendarEvent/components/RegularEventContent.d.ts +0 -20
  13. package/dist/components/calendarEvent/index.d.ts +0 -4
  14. package/dist/components/calendarEvent/types.d.ts +0 -48
  15. package/dist/components/common/CalendarHeader.d.ts +0 -4
  16. package/dist/components/common/CalendarPicker.d.ts +0 -19
  17. package/dist/components/common/ColorPicker.d.ts +0 -19
  18. package/dist/components/common/ContextMenu.d.ts +0 -25
  19. package/dist/components/common/CreateCalendarDialog.d.ts +0 -3
  20. package/dist/components/common/DefaultEventDetailDialog.d.ts +0 -12
  21. package/dist/components/common/DefaultEventDetailPanel.d.ts +0 -11
  22. package/dist/components/common/EventDetailPanelWithContent.d.ts +0 -11
  23. package/dist/components/common/MiniCalendar.d.ts +0 -11
  24. package/dist/components/common/QuickCreateEventPopup.d.ts +0 -10
  25. package/dist/components/common/TodayBox.d.ts +0 -7
  26. package/dist/components/common/ViewHeader.d.ts +0 -33
  27. package/dist/components/common/ViewSwitcher.d.ts +0 -8
  28. package/dist/components/contextMenu/components/EventContextMenu.d.ts +0 -13
  29. package/dist/components/contextMenu/components/GridContextMenu.d.ts +0 -13
  30. package/dist/components/contextMenu/components/Primitives.d.ts +0 -41
  31. package/dist/components/contextMenu/index.d.ts +0 -4
  32. package/dist/components/contextMenu/utils.d.ts +0 -5
  33. package/dist/components/dayView/DayContent.d.ts +0 -55
  34. package/dist/components/dayView/RightPanel.d.ts +0 -16
  35. package/dist/components/dayView/util.d.ts +0 -8
  36. package/dist/components/eventLayout/constants.d.ts +0 -8
  37. package/dist/components/eventLayout/index.d.ts +0 -129
  38. package/dist/components/eventLayout/types.d.ts +0 -23
  39. package/dist/components/eventLayout/utils.d.ts +0 -5
  40. package/dist/components/mobileEventDrawer/DefaultMobileEventDrawer.d.ts +0 -3
  41. package/dist/components/mobileEventDrawer/components/Switch.d.ts +0 -7
  42. package/dist/components/mobileEventDrawer/components/TimePickerWheel.d.ts +0 -7
  43. package/dist/components/mobileEventDrawer/index.d.ts +0 -3
  44. package/dist/components/monthView/MonthDragIndicator.d.ts +0 -12
  45. package/dist/components/monthView/MultiDayEvent.d.ts +0 -31
  46. package/dist/components/monthView/WeekComponent.d.ts +0 -52
  47. package/dist/components/monthView/util.d.ts +0 -11
  48. package/dist/components/rangePicker/components/CalendarGrid.d.ts +0 -13
  49. package/dist/components/rangePicker/components/CalendarHeader.d.ts +0 -11
  50. package/dist/components/rangePicker/components/RangePickerPanel.d.ts +0 -25
  51. package/dist/components/rangePicker/components/TimeSelector.d.ts +0 -21
  52. package/dist/components/rangePicker/constants.d.ts +0 -5
  53. package/dist/components/rangePicker/index.d.ts +0 -4
  54. package/dist/components/rangePicker/types.d.ts +0 -23
  55. package/dist/components/rangePicker/utils.d.ts +0 -2
  56. package/dist/components/search/MobileSearchDialog.d.ts +0 -14
  57. package/dist/components/search/SearchDrawer.d.ts +0 -13
  58. package/dist/components/search/SearchResultsList.d.ts +0 -11
  59. package/dist/components/sidebar/DefaultCalendarSidebar.d.ts +0 -4
  60. package/dist/components/sidebar/components/CalendarList.d.ts +0 -16
  61. package/dist/components/sidebar/components/DeleteCalendarDialog.d.ts +0 -14
  62. package/dist/components/sidebar/components/ImportCalendarDialog.d.ts +0 -11
  63. package/dist/components/sidebar/components/MergeCalendarDialog.d.ts +0 -9
  64. package/dist/components/sidebar/components/MergeMenuItem.d.ts +0 -9
  65. package/dist/components/sidebar/components/SidebarHeader.d.ts +0 -7
  66. package/dist/components/weekView/AllDayRow.d.ts +0 -49
  67. package/dist/components/weekView/DragIndicator/DefaultDragIndicator.d.ts +0 -2
  68. package/dist/components/weekView/DragIndicator/DragIndicatorComponent.d.ts +0 -7
  69. package/dist/components/weekView/TimeGrid.d.ts +0 -52
  70. package/dist/components/weekView/util.d.ts +0 -9
  71. package/dist/components/yearView/DefaultYearView.d.ts +0 -14
  72. package/dist/components/yearView/FixedWeekYearView.d.ts +0 -17
  73. package/dist/components/yearView/YearDayCell.d.ts +0 -13
  74. package/dist/components/yearView/YearMultiDayEvent.d.ts +0 -22
  75. package/dist/components/yearView/YearRowComponent.d.ts +0 -26
  76. package/dist/components/yearView/utils.d.ts +0 -19
  77. package/dist/contexts/ThemeContext.d.ts +0 -38
  78. package/dist/core/CalendarApp.d.ts +0 -85
  79. package/dist/core/DayFlowCalendar.d.ts +0 -20
  80. package/dist/core/calendarRegistry.d.ts +0 -121
  81. package/dist/core/config.d.ts +0 -60
  82. package/dist/core/index.d.ts +0 -6
  83. package/dist/core/useCalendarApp.d.ts +0 -2
  84. package/dist/factories/ViewAdapter.d.ts +0 -4
  85. package/dist/factories/createDayView.d.ts +0 -3
  86. package/dist/factories/createMonthView.d.ts +0 -3
  87. package/dist/factories/createWeekView.d.ts +0 -3
  88. package/dist/factories/createYearView.d.ts +0 -3
  89. package/dist/factories/index.d.ts +0 -10
  90. package/dist/hooks/drag/index.d.ts +0 -7
  91. package/dist/hooks/drag/useDrag.d.ts +0 -2
  92. package/dist/hooks/drag/useDragCommon.d.ts +0 -2
  93. package/dist/hooks/drag/useDragHandlers.d.ts +0 -2
  94. package/dist/hooks/drag/useDragManager.d.ts +0 -2
  95. package/dist/hooks/drag/useDragState.d.ts +0 -2
  96. package/dist/hooks/drag/useMonthDrag.d.ts +0 -2
  97. package/dist/hooks/drag/useWeekDayDrag.d.ts +0 -2
  98. package/dist/hooks/useCalendarDrop.d.ts +0 -19
  99. package/dist/hooks/useKeyboardShortcuts.d.ts +0 -12
  100. package/dist/hooks/virtualScroll/index.d.ts +0 -2
  101. package/dist/hooks/virtualScroll/useVirtualMonthScroll.d.ts +0 -7
  102. package/dist/hooks/virtualScroll/useVirtualScroll.d.ts +0 -48
  103. package/dist/locale/LocaleContext.d.ts +0 -10
  104. package/dist/locale/LocaleProvider.d.ts +0 -8
  105. package/dist/locale/index.d.ts +0 -7
  106. package/dist/locale/intl.d.ts +0 -16
  107. package/dist/locale/locales/de.d.ts +0 -3
  108. package/dist/locale/locales/en.d.ts +0 -3
  109. package/dist/locale/locales/es.d.ts +0 -3
  110. package/dist/locale/locales/fr.d.ts +0 -3
  111. package/dist/locale/locales/index.d.ts +0 -18
  112. package/dist/locale/locales/ja.d.ts +0 -3
  113. package/dist/locale/locales/ko.d.ts +0 -3
  114. package/dist/locale/locales/zh.d.ts +0 -3
  115. package/dist/locale/translator.d.ts +0 -9
  116. package/dist/locale/types.d.ts +0 -8
  117. package/dist/locale/useLocale.d.ts +0 -5
  118. package/dist/locale/utils.d.ts +0 -10
  119. package/dist/plugins/dragPlugin.d.ts +0 -5
  120. package/dist/plugins/eventsPlugin.d.ts +0 -3
  121. package/dist/plugins/index.d.ts +0 -6
  122. package/dist/setupTests.d.ts +0 -1
  123. package/dist/styles/classNames.d.ts +0 -381
  124. package/dist/types/calendar.d.ts +0 -26
  125. package/dist/types/calendarTypes.d.ts +0 -68
  126. package/dist/types/config.d.ts +0 -19
  127. package/dist/types/core.d.ts +0 -265
  128. package/dist/types/dragIndicator.d.ts +0 -160
  129. package/dist/types/event.d.ts +0 -18
  130. package/dist/types/eventDetail.d.ts +0 -74
  131. package/dist/types/factory.d.ts +0 -156
  132. package/dist/types/hook.d.ts +0 -103
  133. package/dist/types/index.d.ts +0 -13
  134. package/dist/types/layout.d.ts +0 -113
  135. package/dist/types/mobileEvent.d.ts +0 -21
  136. package/dist/types/monthView.d.ts +0 -65
  137. package/dist/types/plugin.d.ts +0 -80
  138. package/dist/types/search.d.ts +0 -35
  139. package/dist/utils/calendarDataUtils.d.ts +0 -83
  140. package/dist/utils/clipboardStore.d.ts +0 -10
  141. package/dist/utils/colorUtils.d.ts +0 -27
  142. package/dist/utils/compareUtils.d.ts +0 -5
  143. package/dist/utils/dateConstants.d.ts +0 -22
  144. package/dist/utils/dateFormat.d.ts +0 -15
  145. package/dist/utils/dateRangeUtils.d.ts +0 -24
  146. package/dist/utils/dateTimeUtils.d.ts +0 -49
  147. package/dist/utils/eventHelpers.d.ts +0 -143
  148. package/dist/utils/eventUtils.d.ts +0 -115
  149. package/dist/utils/helpers.d.ts +0 -27
  150. package/dist/utils/ics/icsDateUtils.d.ts +0 -37
  151. package/dist/utils/ics/icsGenerator.d.ts +0 -23
  152. package/dist/utils/ics/icsParser.d.ts +0 -15
  153. package/dist/utils/ics/index.d.ts +0 -16
  154. package/dist/utils/ics/types.d.ts +0 -91
  155. package/dist/utils/index.d.ts +0 -10
  156. package/dist/utils/logger.d.ts +0 -15
  157. package/dist/utils/rangePicker.d.ts +0 -8
  158. package/dist/utils/searchUtils.d.ts +0 -35
  159. package/dist/utils/styleUtils.d.ts +0 -24
  160. package/dist/utils/temporal.d.ts +0 -100
  161. package/dist/utils/temporalTypeGuards.d.ts +0 -63
  162. package/dist/utils/testDataUtils.d.ts +0 -14
  163. package/dist/utils/themeUtils.d.ts +0 -93
  164. package/dist/utils/throttle.d.ts +0 -11
  165. package/dist/utils/timeUtils.d.ts +0 -38
  166. package/dist/utils/utilityFunctions.d.ts +0 -11
  167. package/dist/views/DayView.d.ts +0 -4
  168. package/dist/views/MonthView.d.ts +0 -4
  169. package/dist/views/WeekView.d.ts +0 -4
  170. package/dist/views/YearView.d.ts +0 -15
@@ -1,35 +0,0 @@
1
- import { CalendarSearchEvent } from '../types/search';
2
- /**
3
- * Helper to get date object from event start
4
- * @param dateInput Date, string, or Temporal object
5
- * @returns Date object
6
- */
7
- export declare const getDateObj: (dateInput: any) => Date;
8
- /**
9
- * Helper to normalize date (reset time to 00:00:00)
10
- * @param date Date object
11
- * @returns Normalized Date object
12
- */
13
- export declare const normalizeDate: (date: Date) => Date;
14
- /**
15
- * Helper to get header text and color for a date group in search results
16
- * @param groupDate The date of the group
17
- * @param today Reference today date (normalized)
18
- * @param locale Locale string
19
- * @param t Translation function
20
- * @returns Object with title and colorClass
21
- */
22
- export declare const getSearchHeaderInfo: (groupDate: Date, today: Date, locale: string, t: (key: any) => string) => {
23
- title: string;
24
- colorClass: string;
25
- };
26
- /**
27
- * Helper to group search results by date
28
- * @param results List of search events
29
- * @param today Reference today date (normalized)
30
- * @returns Array of grouped events
31
- */
32
- export declare const groupSearchResults: (results: CalendarSearchEvent[], today: Date) => Array<{
33
- date: Date;
34
- events: CalendarSearchEvent[];
35
- }>;
@@ -1,24 +0,0 @@
1
- /**
2
- * Style Utility Functions
3
- *
4
- * This module provides utility functions for working with CSS styles.
5
- */
6
- /**
7
- * Normalize a width value to a CSS string
8
- *
9
- * Converts numeric values to pixels and validates string values.
10
- * Returns a default width if the input is invalid.
11
- *
12
- * @param width - Width as number (pixels) or CSS string
13
- * @param defaultWidth - Default width to use if input is invalid (default: '240px')
14
- * @returns Normalized CSS width string
15
- *
16
- * @example
17
- * ```ts
18
- * normalizeCssWidth(300) // '300px'
19
- * normalizeCssWidth('20rem') // '20rem'
20
- * normalizeCssWidth('') // '240px'
21
- * normalizeCssWidth(undefined) // '240px'
22
- * ```
23
- */
24
- export declare function normalizeCssWidth(width?: number | string, defaultWidth?: string): string;
@@ -1,100 +0,0 @@
1
- /**
2
- * Temporal API utility functions
3
- * Provides date-time processing, conversion, and compatibility support
4
- */
5
- import { Temporal } from 'temporal-polyfill';
6
- /**
7
- * Check if value is Temporal.PlainDate
8
- * Uses multiple methods to check, handling polyfill and serialization issues
9
- */
10
- export declare function isPlainDate(date: any): date is Temporal.PlainDate;
11
- /**
12
- * Check if value is Temporal.ZonedDateTime
13
- */
14
- export declare function isZonedDateTime(date: any): date is Temporal.ZonedDateTime;
15
- /**
16
- * Check if value is Date object
17
- */
18
- export declare function isDate(value: any): value is Date;
19
- /**
20
- * Convert Date to Temporal.ZonedDateTime
21
- * @param date Date object
22
- * @param timeZone Timezone (defaults to system timezone)
23
- * @returns Temporal.ZonedDateTime
24
- */
25
- export declare function dateToZonedDateTime(date: Date, timeZone?: string): Temporal.ZonedDateTime;
26
- /**
27
- * Convert Date to Temporal.PlainDate
28
- * @param date Date object
29
- * @returns Temporal.PlainDate
30
- */
31
- export declare function dateToPlainDate(date: Date): Temporal.PlainDate;
32
- /**
33
- * Convert Temporal.ZonedDateTime to Date
34
- * @param zdt Temporal.ZonedDateTime
35
- * @returns Date object
36
- */
37
- export declare function zonedDateTimeToDate(zdt: Temporal.ZonedDateTime): Date;
38
- /**
39
- * Convert Temporal.PlainDate to Date
40
- * @param plainDate Temporal.PlainDate
41
- * @param timeZone Timezone (optional)
42
- * @returns Date object (time set to 00:00:00)
43
- */
44
- export declare function plainDateToDate(plainDate: Temporal.PlainDate, timeZone?: string): Date;
45
- /**
46
- * Convert Temporal (PlainDate | PlainDateTime | ZonedDateTime) or Date to Date
47
- * @param temporal Temporal date-time object or native Date
48
- * @param timeZone Timezone (optional, only used for PlainDate)
49
- * @returns Date object
50
- */
51
- export declare function temporalToDate(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, timeZone?: string): Date;
52
- /**
53
- * Extract hour number (with decimals) from Temporal object
54
- * @param temporal Temporal time object
55
- * @returns Hour number (0-24, supports decimals), returns 0 if PlainDate
56
- */
57
- export declare function extractHourFromTemporal(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): number;
58
- /**
59
- * Create new Temporal object with specified hour
60
- * @param temporal Base Temporal object
61
- * @param hour Hour number (supports decimals)
62
- * @returns New Temporal (PlainDateTime or ZonedDateTime)
63
- */
64
- export declare function createTemporalWithHour(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, hour: number): Temporal.PlainDateTime | Temporal.ZonedDateTime;
65
- /**
66
- * Check if two Temporal dates are on the same day
67
- */
68
- export declare function isSamePlainDate(date1: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, date2: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): boolean;
69
- /**
70
- * Check if event spans multiple days
71
- */
72
- export declare function isMultiDayTemporalEvent(start: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, end: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): boolean;
73
- /**
74
- * Get start time of Temporal date (00:00:00)
75
- */
76
- export declare function getStartOfTemporal(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, timeZone?: string): Temporal.ZonedDateTime;
77
- /**
78
- * Get end time of Temporal date (23:59:59.999)
79
- */
80
- export declare function getEndOfTemporal(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, timeZone?: string): Temporal.ZonedDateTime;
81
- /**
82
- * Calculate days difference between two Temporal dates
83
- */
84
- export declare function daysBetween(start: Temporal.PlainDate | Temporal.ZonedDateTime, end: Temporal.PlainDate | Temporal.ZonedDateTime): number;
85
- /**
86
- * Calculate days difference between two Date objects (ignoring time component)
87
- */
88
- export declare function daysDifference(date1: Date, date2: Date): number;
89
- /**
90
- * Add specified days to a date
91
- */
92
- export declare function addDays(date: Date, days: number): Date;
93
- /**
94
- * Get current time (Temporal.ZonedDateTime)
95
- */
96
- export declare function now(timeZone?: string): Temporal.ZonedDateTime;
97
- /**
98
- * Get today's date (Temporal.PlainDate)
99
- */
100
- export declare function today(timeZone?: string): Temporal.PlainDate;
@@ -1,63 +0,0 @@
1
- /**
2
- * Temporal Type Guards and Conversion Utilities
3
- *
4
- * This module provides type guards for distinguishing between different Temporal types
5
- * and unified conversion functions for internal processing.
6
- */
7
- import { Temporal } from 'temporal-polyfill';
8
- /**
9
- * Check if temporal is PlainDate (date only, no time)
10
- */
11
- export declare function isPlainDate(temporal: any): temporal is Temporal.PlainDate;
12
- /**
13
- * Check if temporal is PlainDateTime (date + time, no timezone)
14
- */
15
- export declare function isPlainDateTime(temporal: any): temporal is Temporal.PlainDateTime;
16
- /**
17
- * Check if temporal is ZonedDateTime (date + time + timezone)
18
- */
19
- export declare function isZonedDateTime(temporal: any): temporal is Temporal.ZonedDateTime;
20
- /**
21
- * Convert any Temporal type or Date to Date (for internal processing)
22
- * Handles all three Temporal types and native Date uniformly
23
- */
24
- export declare function temporalToDate(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): Date;
25
- /**
26
- * Convert Date to PlainDate (for all-day events)
27
- */
28
- export declare function dateToPlainDate(date: Date): Temporal.PlainDate;
29
- /**
30
- * Convert Date to PlainDateTime (for local events without timezone)
31
- */
32
- export declare function dateToPlainDateTime(date: Date): Temporal.PlainDateTime;
33
- /**
34
- * Convert Date to ZonedDateTime (for timezone-aware events)
35
- */
36
- export declare function dateToZonedDateTime(date: Date, timeZone: string): Temporal.ZonedDateTime;
37
- /**
38
- * Convert PlainDateTime to Date
39
- */
40
- export declare function plainDateTimeToDate(pdt: Temporal.PlainDateTime): Date;
41
- /**
42
- * Convert PlainDate to Date (at midnight)
43
- */
44
- export declare function plainDateToDate(pd: Temporal.PlainDate): Date;
45
- /**
46
- * Extract hour from any Temporal type (with decimal for minutes)
47
- * @returns Hour number (0-24, with decimals, e.g., 14.5 = 14:30)
48
- */
49
- export declare function extractHourFromTemporal(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): number;
50
- /**
51
- * Create a new Temporal with specified hour (supports PlainDateTime and ZonedDateTime)
52
- * @param temporal Base temporal object
53
- * @param hour Hour with decimals (e.g., 14.5 = 14:30)
54
- */
55
- export declare function setHourInTemporal(temporal: Temporal.PlainDateTime | Temporal.ZonedDateTime, hour: number): Temporal.PlainDateTime | Temporal.ZonedDateTime;
56
- /**
57
- * Check if two Temporal objects represent the same day
58
- */
59
- export declare function isSameTemporal(t1: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, t2: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): boolean;
60
- /**
61
- * Get PlainDate from any Temporal type or Date
62
- */
63
- export declare function getPlainDate(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): Temporal.PlainDate;
@@ -1,14 +0,0 @@
1
- /**
2
- * Test Data Generation Utilities
3
- *
4
- * This module provides test/demo event data for calendar development and testing.
5
- * The generated events are relative to the current week for consistent demo experience.
6
- */
7
- import { Event } from '../types';
8
- /**
9
- * Generate test events for calendar demo/testing
10
- * Events are generated relative to the current week (Monday-Sunday)
11
- * Includes various overlapping events, all-day events, and edge cases
12
- * @returns Array of test events
13
- */
14
- export declare function getTestEvents(): Event[];
@@ -1,93 +0,0 @@
1
- /**
2
- * Theme Utility Functions
3
- *
4
- * This module provides utility functions for working with theme-aware class names.
5
- */
6
- /**
7
- * Combine class names with theme-specific variants
8
- *
9
- * @param base - Base class names (applied in both themes)
10
- * @param light - Light mode specific class names
11
- * @param dark - Dark mode specific class names (will be prefixed with 'dark:')
12
- * @returns Combined class name string
13
- *
14
- * @example
15
- * ```ts
16
- * themeCn('p-4 rounded', 'bg-white text-black', 'bg-gray-900 text-white')
17
- * // Returns: 'p-4 rounded bg-white text-black dark:bg-gray-900 dark:text-white'
18
- * ```
19
- */
20
- export declare const themeCn: (base: string, light: string, dark: string) => string;
21
- /**
22
- * Common theme class combinations
23
- *
24
- * Pre-defined class combinations for common UI elements.
25
- * Use these for consistency across the application.
26
- */
27
- export declare const themeClasses: {
28
- container: string;
29
- card: string;
30
- sidebar: string;
31
- text: string;
32
- textMuted: string;
33
- textSubtle: string;
34
- textEmphasis: string;
35
- border: string;
36
- borderLight: string;
37
- borderStrong: string;
38
- bgPrimary: string;
39
- bgSecondary: string;
40
- bgTertiary: string;
41
- bgMuted: string;
42
- hover: string;
43
- hoverSubtle: string;
44
- active: string;
45
- focus: string;
46
- input: string;
47
- inputFocus: string;
48
- buttonPrimary: string;
49
- buttonSecondary: string;
50
- buttonDanger: string;
51
- buttonSuccess: string;
52
- shadow: string;
53
- shadowMd: string;
54
- shadowLg: string;
55
- divider: string;
56
- };
57
- /**
58
- * Conditional theme class
59
- *
60
- * Returns different class names based on a condition.
61
- *
62
- * @param condition - Condition to evaluate
63
- * @param whenTrue - Class names when condition is true
64
- * @param whenFalse - Class names when condition is false
65
- * @returns Class name string based on condition
66
- *
67
- * @example
68
- * ```ts
69
- * conditionalTheme(isActive, 'bg-blue-500 dark:bg-blue-600', 'bg-gray-200 dark:bg-gray-700')
70
- * ```
71
- */
72
- export declare const conditionalTheme: (condition: boolean, whenTrue: string, whenFalse: string) => string;
73
- /**
74
- * Merge multiple class names, filtering out falsy values
75
- *
76
- * @param classes - Array of class names or falsy values
77
- * @returns Merged class name string
78
- *
79
- * @example
80
- * ```ts
81
- * mergeClasses('p-4', isActive && 'bg-blue-500', 'rounded')
82
- * // Returns: 'p-4 bg-blue-500 rounded' (if isActive is true)
83
- * ```
84
- */
85
- export declare const mergeClasses: (...classes: (string | undefined | null | false)[]) => string;
86
- /**
87
- * Resolve the currently applied theme on the document.
88
- *
89
- * This inspects common override hooks (like `data-dayflow-theme-override` or
90
- * manual `dark`/`light` classes) so host applications can force a theme even
91
- * when DayFlow is configured in `auto` mode.
92
- */
93
- export declare const resolveAppliedTheme: (effectiveTheme: "light" | "dark") => "light" | "dark";
@@ -1,11 +0,0 @@
1
- /**
2
- * Creates a throttled function that only invokes the provided function at most once
3
- * per every wait milliseconds.
4
- *
5
- * @param func - The function to throttle
6
- * @param wait - The number of milliseconds to throttle invocations to
7
- * @returns The throttled function
8
- */
9
- export declare function throttle<T extends (...args: any[]) => any>(func: T, wait: number): T & {
10
- cancel: () => void;
11
- };
@@ -1,38 +0,0 @@
1
- /**
2
- * Time Utilities
3
- *
4
- * This module provides utilities for time formatting, calculations, and time step operations.
5
- * Handles 24-hour format, time rounding, and special cases like midnight crossings.
6
- */
7
- import { Event } from '../types';
8
- /**
9
- * Time step for calendar grid (0.25 = 15 minutes)
10
- */
11
- export declare const TIME_STEP = 0.25;
12
- /**
13
- * Format hours and minutes to HH:MM format
14
- * @param hours Hour number (supports decimals, e.g., 14.5 = 14:30)
15
- * @param minutes Optional minutes (if not provided, extracted from decimal hours)
16
- * @returns Formatted time string (e.g., "14:30")
17
- */
18
- export declare const formatTime: (hours: number, minutes?: number) => string;
19
- /**
20
- * Format event time range as a string
21
- * @param event Event object
22
- * @returns Formatted time range (e.g., "14:00 - 16:00" or "All day")
23
- */
24
- export declare const formatEventTimeRange: (event: Event) => string;
25
- /**
26
- * Round hour to nearest time step
27
- * @param hour Hour number
28
- * @returns Rounded hour
29
- */
30
- export declare const roundToTimeStep: (hour: number) => number;
31
- /**
32
- * Get event end hour (handles cross-day events less than 24 hours)
33
- * When an event ends exactly at midnight of the next day and duration is less than 24 hours,
34
- * it should be treated as 24:00 of the current day in week/day views to avoid displaying as next day 00:00.
35
- * @param event Event object
36
- * @returns End hour (0-24)
37
- */
38
- export declare const getEventEndHour: (event: Event) => number;
@@ -1,11 +0,0 @@
1
- /**
2
- * General Utility Functions
3
- *
4
- * This module provides general-purpose utility functions that don't fit
5
- * into other specialized categories.
6
- */
7
- /**
8
- * Generate unique key (using timestamp and random number combination)
9
- * @returns Unique key string
10
- */
11
- export declare function generateUniKey(): string;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { DayViewProps } from '@/types';
3
- declare const DayView: React.FC<DayViewProps>;
4
- export default DayView;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { MonthViewProps } from '@/types';
3
- declare const MonthView: React.FC<MonthViewProps>;
4
- export default MonthView;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { WeekViewProps } from '@/types';
3
- declare const WeekView: React.FC<WeekViewProps>;
4
- export default WeekView;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { EventDetailContentRenderer, EventDetailDialogRenderer, CalendarApp } from '@/types';
3
- interface YearViewProps {
4
- app: CalendarApp;
5
- calendarRef: React.RefObject<HTMLDivElement>;
6
- customDetailPanelContent?: EventDetailContentRenderer;
7
- customEventDetailDialog?: EventDetailDialogRenderer;
8
- config?: any;
9
- selectedEventId?: string | null;
10
- onEventSelect?: (eventId: string | null) => void;
11
- detailPanelEventId?: string | null;
12
- onDetailPanelToggle?: (eventId: string | null) => void;
13
- }
14
- declare const YearView: React.FC<YearViewProps>;
15
- export default YearView;