@dayflow/core 3.3.6 → 3.4.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 DayFlow Contributors
3
+ Copyright (c) 2025 Jayce Li
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.d.ts CHANGED
@@ -41,8 +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
+ /** Whether this calendar is read-only (disables UI mutations like drag/edit) */
45
+ readOnly?: boolean;
46
46
  /** The source of this calendar (e.g., 'Google Calendar', 'iCloud', 'Outlook') */
47
47
  source?: string;
48
48
  /** Subscription status and metadata */
@@ -330,6 +330,129 @@ interface SpecialLayoutRule {
330
330
  reason?: string;
331
331
  }
332
332
 
333
+ /**
334
+ * Common IANA TimeZone identifiers.
335
+ * This enum provides a convenient way for users to specify secondary timezones
336
+ * without having to look up the exact Temporal/Intl TimeZone strings.
337
+ */
338
+ declare enum TimeZone {
339
+ UTC = "UTC",
340
+ NEW_YORK = "America/New_York",
341
+ CHICAGO = "America/Chicago",
342
+ DENVER = "America/Denver",
343
+ LOS_ANGELES = "America/Los_Angeles",
344
+ TORONTO = "America/Toronto",
345
+ VANCOUVER = "America/Vancouver",
346
+ PHOENIX = "America/Phoenix",
347
+ ANCHORAGE = "America/Anchorage",
348
+ HONOLULU = "Pacific/Honolulu",
349
+ MEXICO_CITY = "America/Mexico_City",
350
+ WINNIPEG = "America/Winnipeg",
351
+ HALIFAX = "America/Halifax",
352
+ ST_JOHNS = "America/St_Johns",
353
+ DETROIT = "America/Detroit",
354
+ LONDON = "Europe/London",
355
+ PARIS = "Europe/Paris",
356
+ BERLIN = "Europe/Berlin",
357
+ MADRID = "Europe/Madrid",
358
+ ROME = "Europe/Rome",
359
+ AMSTERDAM = "Europe/Amsterdam",
360
+ ZURICH = "Europe/Zurich",
361
+ STOCKHOLM = "Europe/Stockholm",
362
+ OSLO = "Europe/Oslo",
363
+ COPENHAGEN = "Europe/Copenhagen",
364
+ MOSCOW = "Europe/Moscow",
365
+ ISTANBUL = "Europe/Istanbul",
366
+ DUBLIN = "Europe/Dublin",
367
+ LISBON = "Europe/Lisbon",
368
+ PRAGUE = "Europe/Prague",
369
+ VIENNA = "Europe/Vienna",
370
+ WARSAW = "Europe/Warsaw",
371
+ BRUSSELS = "Europe/Brussels",
372
+ ATHENS = "Europe/Athens",
373
+ BUCHAREST = "Europe/Bucharest",
374
+ HELSINKI = "Europe/Helsinki",
375
+ KYIV = "Europe/Kyiv",
376
+ BUDAPEST = "Europe/Budapest",
377
+ BELGRADE = "Europe/Belgrade",
378
+ LUXEMBOURG = "Europe/Luxembourg",
379
+ MONACO = "Europe/Monaco",
380
+ REYKJAVIK = "Atlantic/Reykjavik",
381
+ TOKYO = "Asia/Tokyo",
382
+ SHANGHAI = "Asia/Shanghai",
383
+ HONG_KONG = "Asia/Hong_Kong",
384
+ TAIPEI = "Asia/Taipei",
385
+ SEOUL = "Asia/Seoul",
386
+ SINGAPORE = "Asia/Singapore",
387
+ HANOI = "Asia/Ho_Chi_Minh",
388
+ BANGKOK = "Asia/Bangkok",
389
+ JAKARTA = "Asia/Jakarta",
390
+ KUALA_LUMPUR = "Asia/Kuala_Lumpur",
391
+ MANILA = "Asia/Manila",
392
+ DUBAI = "Asia/Dubai",
393
+ KOLKATA = "Asia/Kolkata",
394
+ RIYADH = "Asia/Riyadh",
395
+ TEHRAN = "Asia/Tehran",
396
+ JERUSALEM = "Asia/Jerusalem",
397
+ TEL_AVIV = "Asia/Tel_Aviv",
398
+ BAGHDAD = "Asia/Baghdad",
399
+ DHAKA = "Asia/Dhaka",
400
+ KARACHI = "Asia/Karachi",
401
+ KABUL = "Asia/Kabul",
402
+ KATHMANDU = "Asia/Kathmandu",
403
+ COLOMBO = "Asia/Colombo",
404
+ TASHKENT = "Asia/Tashkent",
405
+ ALMATY = "Asia/Almaty",
406
+ PHNOM_PENH = "Asia/Phnom_Penh",
407
+ VIENTIANE = "Asia/Vientiane",
408
+ MUSCAT = "Asia/Muscat",
409
+ SYDNEY = "Australia/Sydney",
410
+ MELBOURNE = "Australia/Melbourne",
411
+ BRISBANE = "Australia/Brisbane",
412
+ PERTH = "Australia/Perth",
413
+ ADELAIDE = "Australia/Adelaide",
414
+ DARWIN = "Australia/Darwin",
415
+ HOBART = "Australia/Hobart",
416
+ AUCKLAND = "Pacific/Auckland",
417
+ FIJI = "Pacific/Fiji",
418
+ GUAM = "Pacific/Guam",
419
+ NOUMEA = "Pacific/Noumea",
420
+ PAGO_PAGO = "Pacific/Pago_Pago",
421
+ PORT_MORESBY = "Pacific/Port_Moresby",
422
+ SAO_PAULO = "America/Sao_Paulo",
423
+ BUENOS_AIRES = "America/Argentina/Buenos_Aires",
424
+ SANTIAGO = "America/Santiago",
425
+ LIMA = "America/Lima",
426
+ BOGOTA = "America/Bogota",
427
+ CARACAS = "America/Caracas",
428
+ LA_PAZ = "America/La_Paz",
429
+ MONTEVIDEO = "America/Montevideo",
430
+ QUITO = "America/Quito",
431
+ ASUNCION = "America/Asuncion",
432
+ GEORGETOWN = "America/Guyana",
433
+ CAIRO = "Africa/Cairo",
434
+ JOHANNESBURG = "Africa/Johannesburg",
435
+ LAGOS = "Africa/Lagos",
436
+ NAIROBI = "Africa/Nairobi",
437
+ CASABLANCA = "Africa/Casablanca",
438
+ ALGIERS = "Africa/Algiers",
439
+ TUNIS = "Africa/Tunis",
440
+ ADDIS_ABABA = "Africa/Addis_Ababa",
441
+ ACCRA = "Africa/Accra",
442
+ DAKAR = "Africa/Dakar",
443
+ LUANDA = "Africa/Luanda",
444
+ ANTANANARIVO = "Indian/Antananarivo",
445
+ KINSHASA = "Africa/Kinshasa",
446
+ DAR_ES_SALAAM = "Africa/Dar_es_Salaam",
447
+ MCMURDO = "Antarctica/McMurdo",
448
+ CASEY = "Antarctica/Casey"
449
+ }
450
+ /**
451
+ * Type helper for secondaryTimeZone configuration
452
+ * Allows using either the TimeZone enum or a raw IANA string.
453
+ */
454
+ type TimeZoneValue = TimeZone | string;
455
+
333
456
  /** Generic type for framework-specific components */
334
457
  type TComponent = AnyComponent<any, any>;
335
458
  /** Generic type for framework-specific nodes/elements */
@@ -356,7 +479,7 @@ type CalendarViewType = ViewType | string;
356
479
  interface CalendarPlugin {
357
480
  name: string;
358
481
  install: (app: ICalendarApp) => void;
359
- config?: Record<string, unknown>;
482
+ config?: any;
360
483
  api?: unknown;
361
484
  }
362
485
  /**
@@ -450,12 +573,19 @@ interface CalendarAppConfig {
450
573
  defaultCalendar?: string;
451
574
  theme?: ThemeConfig;
452
575
  useEventDetailDialog?: boolean;
453
- useCalendarHeader?: boolean | ((props: CalendarHeaderProps) => TNode);
576
+ useCalendarHeader?: boolean;
454
577
  customMobileEventRenderer?: MobileEventRenderer;
455
578
  locale?: string | Locale;
456
579
  readOnly?: boolean | ReadOnlyConfig;
457
580
  /** Custom sort comparator for all-day events, applied in day/week/month/year views. */
458
581
  allDaySortComparator?: AllDaySortComparator;
582
+ /**
583
+ * Global display and editing timezone for all views.
584
+ * Controls how event times are projected and how drag/resize/create operations interpret wall-clock time.
585
+ * Defaults to the user's system timezone.
586
+ * Switching this field only triggers a re-render — it never calls onEventUpdate or any persistence callback.
587
+ */
588
+ timeZone?: TimeZoneValue;
459
589
  }
460
590
  /**
461
591
  * Read-only configuration
@@ -481,6 +611,8 @@ interface CalendarAppState {
481
611
  readOnly: boolean | ReadOnlyConfig;
482
612
  overrides: string[];
483
613
  allDaySortComparator?: AllDaySortComparator;
614
+ /** Resolved global timezone (IANA string). See CalendarAppConfig.timeZone. */
615
+ timeZone: string;
484
616
  }
485
617
  /**
486
618
  * Calendar application instance
@@ -488,8 +620,8 @@ interface CalendarAppState {
488
620
  */
489
621
  interface ICalendarApp {
490
622
  state: CalendarAppState;
491
- getReadOnlyConfig: () => ReadOnlyConfig;
492
- canMutateFromUI: () => boolean;
623
+ getReadOnlyConfig: (id?: string) => ReadOnlyConfig;
624
+ canMutateFromUI: (id?: string) => boolean;
493
625
  subscribe: (listener: (app: ICalendarApp) => void) => () => void;
494
626
  changeView: (view: CalendarViewType) => void;
495
627
  getCurrentView: () => CalendarView;
@@ -534,12 +666,14 @@ interface ICalendarApp {
534
666
  dismissUI: () => void;
535
667
  getPlugin: <T = unknown>(name: string) => T | undefined;
536
668
  hasPlugin: (name: string) => boolean;
537
- getCalendarHeaderConfig: () => boolean | ((props: CalendarHeaderProps) => TNode);
669
+ getCalendarHeaderConfig: () => boolean;
538
670
  triggerRender: () => void;
539
671
  getCalendarRegistry: () => CalendarRegistry;
540
672
  getUseEventDetailDialog: () => boolean;
541
673
  getCustomMobileEventRenderer: () => MobileEventRenderer | undefined;
542
674
  updateConfig: (config: Partial<CalendarAppConfig>) => void;
675
+ /** The resolved global display/edit timezone (IANA string). */
676
+ readonly timeZone: string;
543
677
  setOverrides: (overrides: string[]) => void;
544
678
  setTheme: (mode: ThemeMode) => void;
545
679
  getTheme: () => ThemeMode;
@@ -583,7 +717,7 @@ interface UseCalendarAppReturn {
583
717
  setVisibleMonth: (date: Date) => void;
584
718
  getVisibleMonth: () => Date;
585
719
  emitVisibleRange: (start: Date, end: Date, reason?: RangeChangeReason) => void;
586
- canMutateFromUI: () => boolean;
720
+ canMutateFromUI: (id?: string) => boolean;
587
721
  readOnlyConfig: ReadOnlyConfig;
588
722
  }
589
723
  /**
@@ -1018,139 +1152,6 @@ interface EventDetailDialogProps {
1018
1152
  */
1019
1153
  type EventDetailDialogRenderer = AnyComponent<EventDetailDialogProps, any>;
1020
1154
 
1021
- /**
1022
- * Common IANA TimeZone identifiers.
1023
- * This enum provides a convenient way for users to specify secondary timezones
1024
- * without having to look up the exact Temporal/Intl TimeZone strings.
1025
- */
1026
- declare enum TimeZone {
1027
- UTC = "UTC",
1028
- NEW_YORK = "America/New_York",
1029
- CHICAGO = "America/Chicago",
1030
- DENVER = "America/Denver",
1031
- LOS_ANGELES = "America/Los_Angeles",
1032
- TORONTO = "America/Toronto",
1033
- VANCOUVER = "America/Vancouver",
1034
- PHOENIX = "America/Phoenix",
1035
- ANCHORAGE = "America/Anchorage",
1036
- HONOLULU = "Pacific/Honolulu",
1037
- MEXICO_CITY = "America/Mexico_City",
1038
- WINNIPEG = "America/Winnipeg",
1039
- HALIFAX = "America/Halifax",
1040
- ST_JOHNS = "America/St_Johns",
1041
- DETROIT = "America/Detroit",
1042
- MIAMI = "America/Miami",
1043
- SEATTLE = "America/Los_Angeles",
1044
- ATLANTA = "America/New_York",
1045
- DALLAS = "America/Chicago",
1046
- HOUSTON = "America/Chicago",
1047
- LAS_VEGAS = "America/Los_Angeles",
1048
- SAN_FRANCISCO = "America/Los_Angeles",
1049
- LONDON = "Europe/London",
1050
- PARIS = "Europe/Paris",
1051
- BERLIN = "Europe/Berlin",
1052
- MADRID = "Europe/Madrid",
1053
- ROME = "Europe/Rome",
1054
- AMSTERDAM = "Europe/Amsterdam",
1055
- ZURICH = "Europe/Zurich",
1056
- STOCKHOLM = "Europe/Stockholm",
1057
- OSLO = "Europe/Oslo",
1058
- COPENHAGEN = "Europe/Copenhagen",
1059
- MOSCOW = "Europe/Moscow",
1060
- ISTANBUL = "Europe/Istanbul",
1061
- DUBLIN = "Europe/Dublin",
1062
- LISBON = "Europe/Lisbon",
1063
- PRAGUE = "Europe/Prague",
1064
- VIENNA = "Europe/Vienna",
1065
- WARSAW = "Europe/Warsaw",
1066
- BRUSSELS = "Europe/Brussels",
1067
- ATHENS = "Europe/Athens",
1068
- BUCHAREST = "Europe/Bucharest",
1069
- HELSINKI = "Europe/Helsinki",
1070
- KYIV = "Europe/Kyiv",
1071
- BUDAPEST = "Europe/Budapest",
1072
- BELGRADE = "Europe/Belgrade",
1073
- LUXEMBOURG = "Europe/Luxembourg",
1074
- MONACO = "Europe/Monaco",
1075
- REYKJAVIK = "Atlantic/Reykjavik",
1076
- TOKYO = "Asia/Tokyo",
1077
- SHANGHAI = "Asia/Shanghai",
1078
- BEIJING = "Asia/Shanghai",
1079
- HONG_KONG = "Asia/Hong_Kong",
1080
- TAIPEI = "Asia/Taipei",
1081
- SEOUL = "Asia/Seoul",
1082
- SINGAPORE = "Asia/Singapore",
1083
- HANOI = "Asia/Ho_Chi_Minh",
1084
- BANGKOK = "Asia/Bangkok",
1085
- JAKARTA = "Asia/Jakarta",
1086
- KUALA_LUMPUR = "Asia/Kuala_Lumpur",
1087
- MANILA = "Asia/Manila",
1088
- DUBAI = "Asia/Dubai",
1089
- KOLKATA = "Asia/Kolkata",
1090
- MUMBAI = "Asia/Kolkata",
1091
- RIYADH = "Asia/Riyadh",
1092
- TEHRAN = "Asia/Tehran",
1093
- JERUSALEM = "Asia/Jerusalem",
1094
- TEL_AVIV = "Asia/Tel_Aviv",
1095
- BAGHDAD = "Asia/Baghdad",
1096
- DHAKA = "Asia/Dhaka",
1097
- KARA_CHI = "Asia/Karachi",
1098
- KABUL = "Asia/Kabul",
1099
- KATHMANDU = "Asia/Kathmandu",
1100
- COLOMBO = "Asia/Colombo",
1101
- TASHKENT = "Asia/Tashkent",
1102
- ALMATY = "Asia/Almaty",
1103
- PHNOM_PENH = "Asia/Phnom_Penh",
1104
- VIENTIANE = "Asia/Vientiane",
1105
- MUSCAT = "Asia/Muscat",
1106
- SYDNEY = "Australia/Sydney",
1107
- MELBOURNE = "Australia/Melbourne",
1108
- BRISBANE = "Australia/Brisbane",
1109
- PERTH = "Australia/Perth",
1110
- ADELAIDE = "Australia/Adelaide",
1111
- DARWIN = "Australia/Darwin",
1112
- HOBART = "Australia/Hobart",
1113
- AUCKLAND = "Pacific/Auckland",
1114
- FIJI = "Pacific/Fiji",
1115
- GUAM = "Pacific/Guam",
1116
- NOUMEA = "Pacific/Noumea",
1117
- PAGO_PAGO = "Pacific/Pago_Pago",
1118
- PORT_MORESBY = "Pacific/Port_Moresby",
1119
- SAO_PAULO = "America/Sao_Paulo",
1120
- RIO_DE_JANEIRO = "America/Sao_Paulo",
1121
- BUENOS_AIRES = "America/Argentina/Buenos_Aires",
1122
- SANTIAGO = "America/Santiago",
1123
- LIMA = "America/Lima",
1124
- BOGOTA = "America/Bogota",
1125
- CARACAS = "America/Caracas",
1126
- LA_PAZ = "America/La_Paz",
1127
- MONTEVIDEO = "America/Montevideo",
1128
- QUITO = "America/Quito",
1129
- ASUNCION = "America/Asuncion",
1130
- GEORGETOWN = "America/Guyana",
1131
- CAIRO = "Africa/Cairo",
1132
- JOHANNESBURG = "Africa/Johannesburg",
1133
- LAGOS = "Africa/Lagos",
1134
- NAIROBI = "Africa/Nairobi",
1135
- CASABLANCA = "Africa/Casablanca",
1136
- ALGIERS = "Africa/Algiers",
1137
- TUNIS = "Africa/Tunis",
1138
- ADDIS_ABABA = "Africa/Addis_Ababa",
1139
- ACCRA = "Africa/Accra",
1140
- DAKAR = "Africa/Dakar",
1141
- LUANDA = "Africa/Luanda",
1142
- ANTANANARIVO = "Indian/Antananarivo",
1143
- KINSHASA = "Africa/Kinshasa",
1144
- DAR_ES_SALAAM = "Africa/Dar_es_Salaam",
1145
- MCMURDO = "Antarctica/McMurdo",
1146
- CASEY = "Antarctica/Casey"
1147
- }
1148
- /**
1149
- * Type helper for secondaryTimeZone configuration
1150
- * Allows using either the TimeZone enum or a raw IANA string.
1151
- */
1152
- type TimeZoneValue = TimeZone | string;
1153
-
1154
1155
  /**
1155
1156
  * Common Props interface for view components
1156
1157
  * Base properties for all view components
@@ -1210,6 +1211,7 @@ interface DayViewConfig extends ViewFactoryConfig {
1210
1211
  showAllDay?: boolean;
1211
1212
  scrollToCurrentTime?: boolean;
1212
1213
  secondaryTimeZone?: TimeZoneValue;
1214
+ showEventDots?: boolean;
1213
1215
  }
1214
1216
  /**
1215
1217
  * Week view factory configuration
@@ -1220,6 +1222,7 @@ interface WeekViewConfig extends ViewFactoryConfig {
1220
1222
  startOfWeek?: number;
1221
1223
  scrollToCurrentTime?: boolean;
1222
1224
  secondaryTimeZone?: TimeZoneValue;
1225
+ showEventDots?: boolean;
1223
1226
  }
1224
1227
  /**
1225
1228
  * Month scroll / navigation configuration
@@ -1244,6 +1247,7 @@ interface MonthViewConfig extends ViewFactoryConfig {
1244
1247
  snapToMonth?: boolean;
1245
1248
  /** Scroll / navigation behavior for the month view */
1246
1249
  scroll?: MonthScrollConfig;
1250
+ showEventDots?: boolean;
1247
1251
  }
1248
1252
  /**
1249
1253
  * Year view factory configuration
@@ -1254,12 +1258,9 @@ interface YearViewConfig extends ViewFactoryConfig {
1254
1258
  startOfWeek?: number;
1255
1259
  /** Scroll / navigation behavior for the month view */
1256
1260
  scroll?: MonthScrollConfig;
1261
+ showEventDots?: boolean;
1257
1262
  /**
1258
1263
  * Grid mode: action when a date cell is clicked.
1259
- * - 'popup' (default): show a popup with events for that day
1260
- * - 'day-view': navigate to the Day View
1261
- * - 'none': no action
1262
- * - function: custom handler
1263
1264
  */
1264
1265
  gridDateClick?: 'popup' | 'day-view' | 'none' | ((date: Date, events: Event[]) => void);
1265
1266
  /**
@@ -1443,6 +1444,13 @@ interface DragPluginConfig {
1443
1444
  supportedViews: ViewType[];
1444
1445
  onEventDrop?: (updatedEvent: Event, originalEvent: Event) => void | Promise<void>;
1445
1446
  onEventResize?: (updatedEvent: Event, originalEvent: Event) => void | Promise<void>;
1447
+ /**
1448
+ * Controls cursor position relative to the drag indicator when dragging all-day events
1449
+ * in month/year views.
1450
+ * - `true` (default): cursor anchors to the start (left edge) of the indicator
1451
+ * - `false`: cursor anchors to the center of the indicator
1452
+ */
1453
+ allDayDragCursorAtStart?: boolean;
1446
1454
  [key: string]: unknown;
1447
1455
  }
1448
1456
  /**
@@ -1524,27 +1532,19 @@ declare class CalendarApp implements ICalendarApp {
1524
1532
  state: CalendarAppState;
1525
1533
  private callbacks;
1526
1534
  private calendarRegistry;
1527
- private store;
1528
- private visibleMonth;
1535
+ private themeChangeListeners;
1536
+ private listeners;
1537
+ private eventManager;
1538
+ private navigation;
1539
+ private pluginManager;
1529
1540
  private useEventDetailDialog;
1530
1541
  private useCalendarHeader;
1531
1542
  private customMobileEventRenderer?;
1532
- private themeChangeListeners;
1533
- private listeners;
1534
- private undoStack;
1535
- private pendingSnapshot;
1536
- private pendingChangeSource;
1537
- private readonly MAX_UNDO_STACK;
1538
- private externalEvents;
1539
1543
  constructor(config: CalendarAppConfig);
1540
- private setupStoreListeners;
1541
1544
  private static resolveLocale;
1542
1545
  subscribe: (listener: (app: ICalendarApp) => void) => (() => void);
1543
1546
  private notify;
1544
- private pushToUndo;
1545
- undo: () => void;
1546
- getReadOnlyConfig: () => ReadOnlyConfig;
1547
- canMutateFromUI: () => boolean;
1547
+ triggerRender: () => void;
1548
1548
  changeView: (view: CalendarViewType) => void;
1549
1549
  getCurrentView: () => CalendarView;
1550
1550
  emitVisibleRange: (start: Date, end: Date, reason?: RangeChangeReason) => void;
@@ -1557,6 +1557,7 @@ declare class CalendarApp implements ICalendarApp {
1557
1557
  goToPrevious: () => void;
1558
1558
  goToNext: () => void;
1559
1559
  selectDate: (date: Date) => void;
1560
+ undo: () => void;
1560
1561
  applyEventsChanges: (changes: {
1561
1562
  add?: Event[];
1562
1563
  update?: Array<{
@@ -1566,25 +1567,18 @@ declare class CalendarApp implements ICalendarApp {
1566
1567
  delete?: string[];
1567
1568
  }, isPending?: boolean, source?: "drag" | "resize") => void;
1568
1569
  addEvent: (event: Event) => void;
1569
- /**
1570
- * Add external events to the state without persisting to the core store.
1571
- * This is used for temporary/subscription-based events.
1572
- */
1573
1570
  addExternalEvents: (calendarId: string, events: Event[]) => void;
1574
- /**
1575
- * Synchronize all events (core + external) into the main state.events array.
1576
- * This ensures all views and plugins that listen to state.events see the combined list.
1577
- */
1578
- private syncExternalEventsToState;
1579
1571
  updateEvent: (id: string, eventUpdate: Partial<Event>, isPending?: boolean, source?: "drag" | "resize") => Promise<void>;
1580
1572
  deleteEvent: (id: string) => Promise<void>;
1581
1573
  getAllEvents: () => Event[];
1574
+ getEvents: () => Event[];
1582
1575
  onEventClick: (event: Event) => void;
1583
1576
  onMoreEventsClick: (date: Date) => void;
1584
1577
  highlightEvent: (eventId: string | null) => void;
1585
1578
  selectEvent: (eventId: string | null) => void;
1586
1579
  dismissUI: () => void;
1587
- getEvents: () => Event[];
1580
+ getReadOnlyConfig: (id?: string) => ReadOnlyConfig;
1581
+ canMutateFromUI: (id?: string) => boolean;
1588
1582
  getCalendars: () => CalendarType[];
1589
1583
  reorderCalendars: (fromIndex: number, toIndex: number) => void;
1590
1584
  setCalendarVisibility: (calendarId: string, visible: boolean) => void;
@@ -1593,40 +1587,22 @@ declare class CalendarApp implements ICalendarApp {
1593
1587
  createCalendar: (calendar: CalendarType) => Promise<void>;
1594
1588
  deleteCalendar: (id: string) => Promise<void>;
1595
1589
  mergeCalendars: (sourceId: string, targetId: string) => Promise<void>;
1596
- getCalendarHeaderConfig: () => boolean | ((props: CalendarHeaderProps) => TNode);
1597
- private installPlugin;
1598
1590
  getPlugin: <T = unknown>(name: string) => T | undefined;
1599
1591
  hasPlugin: (name: string) => boolean;
1600
1592
  getPluginConfig: (pluginName: string) => Record<string, unknown>;
1601
1593
  updatePluginConfig: (pluginName: string, config: Record<string, unknown>) => void;
1594
+ setTheme: (mode: ThemeMode) => void;
1595
+ getTheme: () => ThemeMode;
1596
+ subscribeThemeChange: (callback: (theme: ThemeMode) => void) => (() => void);
1597
+ unsubscribeThemeChange: (callback: (theme: ThemeMode) => void) => void;
1602
1598
  getViewConfig: (viewType: CalendarViewType) => Record<string, unknown>;
1603
- triggerRender: () => void;
1604
1599
  getCalendarRegistry: () => CalendarRegistry;
1605
1600
  getUseEventDetailDialog: () => boolean;
1606
1601
  getCustomMobileEventRenderer: () => MobileEventRenderer | undefined;
1607
- updateConfig: (config: Partial<CalendarAppConfig>) => void;
1602
+ getCalendarHeaderConfig: () => boolean;
1603
+ get timeZone(): string;
1608
1604
  setOverrides: (overrides: string[]) => void;
1609
- /**
1610
- * Set theme mode
1611
- * @param mode - Theme mode ('light', 'dark', or 'auto')
1612
- */
1613
- setTheme: (mode: ThemeMode) => void;
1614
- /**
1615
- * Get current theme mode
1616
- * @returns Current theme mode
1617
- */
1618
- getTheme: () => ThemeMode;
1619
- /**
1620
- * Subscribe to theme changes
1621
- * @param callback - Function to call when theme changes
1622
- * @returns Unsubscribe function
1623
- */
1624
- subscribeThemeChange: (callback: (theme: ThemeMode) => void) => (() => void);
1625
- /**
1626
- * Unsubscribe from theme changes
1627
- * @param callback - Function to remove from listeners
1628
- */
1629
- unsubscribeThemeChange: (callback: (theme: ThemeMode) => void) => void;
1605
+ updateConfig: (config: Partial<CalendarAppConfig>) => void;
1630
1606
  }
1631
1607
 
1632
1608
  interface CustomRendering {
@@ -1679,6 +1655,8 @@ declare class CalendarRenderer {
1679
1655
  private requestRender;
1680
1656
  /**
1681
1657
  * Mount the calendar to a DOM container.
1658
+ * Renders synchronously so the content is in the DOM before the first paint.
1659
+ * Subsequent updates (triggered by app state changes) still use requestAnimationFrame.
1682
1660
  */
1683
1661
  mount(container: HTMLElement): void;
1684
1662
  /**
@@ -1827,7 +1805,7 @@ declare const roundToTimeStep: (hour: number) => number;
1827
1805
  declare const generateSecondaryTimeSlots: (timeSlots: Array<{
1828
1806
  hour: number;
1829
1807
  label: string;
1830
- }>, secondaryTimeZone: TimeZoneValue, timeFormat?: "12h" | "24h", referenceDate?: Date) => string[];
1808
+ }>, secondaryTimeZone: TimeZoneValue, timeFormat?: "12h" | "24h", referenceDate?: Date, baseTimeZone?: string) => string[];
1831
1809
  /**
1832
1810
  * Get a short display label for a timezone, e.g. "CST" or "GMT+8".
1833
1811
  *
@@ -1836,6 +1814,14 @@ declare const generateSecondaryTimeSlots: (timeSlots: Array<{
1836
1814
  * @returns Short timezone label
1837
1815
  */
1838
1816
  declare const getTimezoneDisplayLabel: (timeZone: TimeZoneValue, date?: Date) => string;
1817
+ declare const getNowInTimeZone: (timeZone?: TimeZoneValue) => Date;
1818
+ declare const getTodayInTimeZone: (timeZone?: TimeZoneValue) => Date;
1819
+ declare const getNextHourRangeInTimeZone: (timeZone?: TimeZoneValue) => {
1820
+ start: Date;
1821
+ end: Date;
1822
+ };
1823
+ declare const restoreVisualTimedTemporalToCanonical: (visualTemporal: Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, originalTemporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, appTimeZone?: TimeZoneValue) => Temporal.PlainDateTime | Temporal.ZonedDateTime;
1824
+ declare const restoreVisualEventToCanonical: (originalEvent: Event, visualEvent: Event, appTimeZone?: TimeZoneValue) => Event;
1839
1825
 
1840
1826
  /**
1841
1827
  * Date Constants
@@ -2170,6 +2156,17 @@ declare function isZonedDateTime(temporal: unknown): temporal is Temporal.ZonedD
2170
2156
  * Handles all three Temporal types and native Date uniformly
2171
2157
  */
2172
2158
  declare function temporalToDate(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date): Date;
2159
+ /**
2160
+ * Convert any Temporal type or Date to a "Visual" Date based on a target timezone.
2161
+ * Unlike temporalToDate, this shifts the wall time to match the target timezone
2162
+ * while returning a local Date object that reflects that shifted time.
2163
+ */
2164
+ declare function temporalToVisualDate(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime | Date, targetTz?: string): Date;
2165
+ /**
2166
+ * Convert any Temporal type to a "Visual" Temporal based on a target timezone.
2167
+ * Unlike temporalToVisualDate, this returns a Temporal object (ZonedDateTime).
2168
+ */
2169
+ declare function temporalToVisualTemporal(temporal: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime, targetTz?: string): Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime;
2173
2170
  /**
2174
2171
  * Convert Date to PlainDate (for all-day events)
2175
2172
  */
@@ -2813,6 +2810,8 @@ interface RestoredTimedDragState {
2813
2810
  }
2814
2811
  declare const restoreTimedDragFromAllDayTransition: ({ wasOriginallyAllDay, mouseHour, hourOffset, duration, originalStartHour, originalEndHour, firstHour, lastHour, minDuration, roundToTimeStep, }: RestoreTimedDragOptions) => RestoredTimedDragState;
2815
2812
 
2813
+ declare function normalizeTimeZoneValue(timeZone?: TimeZoneValue): string | undefined;
2814
+
2816
2815
  interface SubscribeResult {
2817
2816
  calendar: CalendarType;
2818
2817
  events: Event[];
@@ -3036,8 +3035,12 @@ interface MiniCalendarProps {
3036
3035
  onMonthChange: (offset: number) => void;
3037
3036
  onDateSelect: (date: Date) => void;
3038
3037
  locale?: string;
3038
+ events?: Event[];
3039
+ showEventDots?: boolean;
3040
+ calendarRegistry?: CalendarRegistry;
3041
+ timeZone?: string;
3039
3042
  }
3040
- declare const MiniCalendar: ({ visibleMonth, currentDate, showHeader, onMonthChange, onDateSelect, }: MiniCalendarProps) => preact.JSX.Element;
3043
+ declare const MiniCalendar: ({ visibleMonth, currentDate, showHeader, onMonthChange, onDateSelect, events, showEventDots, calendarRegistry, timeZone, }: MiniCalendarProps) => preact.JSX.Element;
3041
3044
 
3042
3045
  declare const CreateCalendarDialog: ({ onClose, onCreate, app, }: CreateCalendarDialogProps) => preact.VNode<any> | null;
3043
3046
 
@@ -3159,9 +3162,11 @@ interface CalendarEventProps {
3159
3162
  renderVisualContent?: (defaultContent: ComponentChildren) => ComponentChildren;
3160
3163
  /** Override resize handle orientation for custom views */
3161
3164
  resizeHandleOrientation?: 'vertical' | 'horizontal';
3165
+ /** App-level timezone used to project event times for display (Month/Year view). */
3166
+ appTimeZone?: string;
3162
3167
  }
3163
3168
 
3164
- 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, }: CalendarEventProps) => preact.JSX.Element;
3169
+ 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;
3165
3170
 
3166
3171
  interface IconProps {
3167
3172
  className?: string;
@@ -3205,5 +3210,5 @@ declare const sidebarHeaderToggle = "df-sidebar-header-toggle flex h-8 w-8 items
3205
3210
  */
3206
3211
  declare const sidebarHeaderTitle = "df-sidebar-header-title text-sm font-semibold text-gray-700 dark:text-gray-200";
3207
3212
 
3208
- 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, 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, subscribeCalendar, t, temporalToDate, themeClasses, themeCn, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
3213
+ 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, 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, getNextHourRangeInTimeZone, getNowInTimeZone, getPlainDate, getSearchHeaderInfo, getSelectedBgColor, getStartOfDay, getStartOfTemporal, 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, plainDateTimeToDate, plainDateToDate, recalculateEventDays, registerDragImplementation, registerLocale, registerSidebarImplementation, resolveAppliedTheme, restoreTimedDragFromAllDayTransition, restoreVisualEventToCanonical, restoreVisualTimedTemporalToCanonical, roundToTimeStep, scrollbarTakesSpace, setHourInTemporal, shortMonthNames, sidebarContainer, sidebarHeader, sidebarHeaderTitle, sidebarHeaderToggle, sortAllDayByTitle, subscribeCalendar, t, temporalToDate, temporalToVisualDate, temporalToVisualTemporal, themeClasses, themeCn, today, unescapeICSValue, updateEventDateAndDay, updateEventWithRealDate, useDragForView, useLocale, useSidebarBridge, weekDays, weekDaysFullName, zonedDateTimeToDate };
3209
3214
  export type { AllDaySortComparator, BalanceStrategy, BaseViewProps, CalendarAppConfig, 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, 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, RangePickerProps, ReadOnlyConfig, SidebarBridgeReturn, SidebarHeaderSlotArgs, SpecialLayoutRule, SubscribeResult, 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, ZonedRange, useDragProps, useDragReturn };