@rokoyfa/calendar 1.1.0 → 1.2.0

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 (181) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +85 -3
  3. package/api/openapi.yaml +359 -3
  4. package/dist-lib/cdn/calendar-widget.js +9 -5
  5. package/dist-lib/cdn/calendar-widget.js.map +1 -1
  6. package/dist-lib/cdn/de-BjzK4Pgn.js +2 -0
  7. package/dist-lib/cdn/de-BjzK4Pgn.js.map +1 -0
  8. package/dist-lib/cdn/es-TA5DvEsw.js +2 -0
  9. package/dist-lib/cdn/es-TA5DvEsw.js.map +1 -0
  10. package/dist-lib/cdn/fr-Dx-nmhQ7.js +2 -0
  11. package/dist-lib/cdn/fr-Dx-nmhQ7.js.map +1 -0
  12. package/dist-lib/cdn/it-D_2eA3dT.js +2 -0
  13. package/dist-lib/cdn/it-D_2eA3dT.js.map +1 -0
  14. package/dist-lib/cdn/nl-dC1zae2Z.js +2 -0
  15. package/dist-lib/cdn/nl-dC1zae2Z.js.map +1 -0
  16. package/dist-lib/cdn/pl-9TYRPoy1.js +2 -0
  17. package/dist-lib/cdn/pl-9TYRPoy1.js.map +1 -0
  18. package/dist-lib/cdn/pt-CvBN-qx1.js +2 -0
  19. package/dist-lib/cdn/pt-CvBN-qx1.js.map +1 -0
  20. package/dist-lib/cdn/rolldown-runtime-CrjiCqGf.js +1 -0
  21. package/dist-lib/cdn/src-l8Q4aJRr.js +12 -0
  22. package/dist-lib/cdn/src-l8Q4aJRr.js.map +1 -0
  23. package/dist-lib/npm/{de-CCzGjeTd.js → de-Cuz-uz3s.js} +133 -8
  24. package/dist-lib/npm/de-Cuz-uz3s.js.map +1 -0
  25. package/dist-lib/npm/{es-Ciaf66rH.js → es-BnRzdU90.js} +133 -8
  26. package/dist-lib/npm/es-BnRzdU90.js.map +1 -0
  27. package/dist-lib/npm/{fr-CAqNm10Z.js → fr-B-nmvStg.js} +133 -8
  28. package/dist-lib/npm/fr-B-nmvStg.js.map +1 -0
  29. package/dist-lib/npm/index.js +5655 -2522
  30. package/dist-lib/npm/index.js.map +1 -1
  31. package/dist-lib/npm/{it-Cqqdu2ua.js → it-DMTpE4GO.js} +133 -8
  32. package/dist-lib/npm/it-DMTpE4GO.js.map +1 -0
  33. package/dist-lib/npm/{nl-CkchSA8q.js → nl-DQkyEt9Z.js} +133 -8
  34. package/dist-lib/npm/nl-DQkyEt9Z.js.map +1 -0
  35. package/dist-lib/npm/{pl-CCBDUr8k.js → pl-CcjU41yx.js} +133 -8
  36. package/dist-lib/npm/pl-CcjU41yx.js.map +1 -0
  37. package/dist-lib/npm/{pt-DucaCaoY.js → pt-Dulais2f.js} +133 -8
  38. package/dist-lib/npm/pt-Dulais2f.js.map +1 -0
  39. package/dist-lib/npm/types/components/Button.d.ts +1 -1
  40. package/dist-lib/npm/types/components/Icons.d.ts +5 -0
  41. package/dist-lib/npm/types/components/SegmentedControl.d.ts +2 -2
  42. package/dist-lib/npm/types/components/SegmentedField.d.ts +2 -11
  43. package/dist-lib/npm/types/components/StatusMessage.d.ts +0 -1
  44. package/dist-lib/npm/types/components/Tabs.d.ts +3 -1
  45. package/dist-lib/npm/types/config/routes.d.ts +1 -1
  46. package/dist-lib/npm/types/context/HostContext.d.ts +2 -1
  47. package/dist-lib/npm/types/context/TimeZoneContext.d.ts +3 -0
  48. package/dist-lib/npm/types/data/restDataSource.d.ts +4 -1
  49. package/dist-lib/npm/types/data/tenantDataSource.d.ts +3 -1
  50. package/dist-lib/npm/types/data/types.d.ts +3 -1
  51. package/dist-lib/npm/types/features/authorization/hooks/useAuth.d.ts +2 -1
  52. package/dist-lib/npm/types/features/authorization/hooks/useRedirectTarget.d.ts +4 -0
  53. package/dist-lib/npm/types/features/authorization/index.d.ts +1 -1
  54. package/dist-lib/npm/types/features/authorization/repositories/HostTokenAuthRepository.d.ts +2 -0
  55. package/dist-lib/npm/types/features/authorization/repositories/RemoteAuthRepository.d.ts +2 -0
  56. package/dist-lib/npm/types/features/authorization/types/auth.d.ts +3 -0
  57. package/dist-lib/npm/types/features/calendar/components/Calendar.d.ts +14 -1
  58. package/dist-lib/npm/types/features/calendar/components/CalendarHeader.d.ts +2 -1
  59. package/dist-lib/npm/types/features/calendar/components/DayColumn.d.ts +2 -1
  60. package/dist-lib/npm/types/features/calendar/components/EventLinks.d.ts +7 -0
  61. package/dist-lib/npm/types/features/calendar/components/EventLocation.d.ts +3 -0
  62. package/dist-lib/npm/types/features/calendar/components/EventSearchModal.d.ts +9 -0
  63. package/dist-lib/npm/types/features/calendar/components/EventTitle.d.ts +2 -1
  64. package/dist-lib/npm/types/features/calendar/components/MiniMonth.d.ts +2 -1
  65. package/dist-lib/npm/types/features/calendar/components/UndoNotice.d.ts +7 -0
  66. package/dist-lib/npm/types/features/calendar/constants/views.d.ts +3 -0
  67. package/dist-lib/npm/types/features/calendar/context/CurrentUserContext.d.ts +3 -0
  68. package/dist-lib/npm/types/features/calendar/context/HolidaysContext.d.ts +4 -0
  69. package/dist-lib/npm/types/features/calendar/hooks/useAttendeeCandidates.d.ts +3 -0
  70. package/dist-lib/npm/types/features/calendar/hooks/useEventDrag.d.ts +1 -1
  71. package/dist-lib/npm/types/features/calendar/hooks/useEventSearch.d.ts +7 -0
  72. package/dist-lib/npm/types/features/calendar/hooks/useEventSource.d.ts +2 -1
  73. package/dist-lib/npm/types/features/calendar/hooks/usePressDrag.d.ts +23 -0
  74. package/dist-lib/npm/types/features/calendar/hooks/useSegmentAttributes.d.ts +15 -0
  75. package/dist-lib/npm/types/features/calendar/hooks/useSlotSelection.d.ts +1 -4
  76. package/dist-lib/npm/types/features/calendar/index.d.ts +1 -2
  77. package/dist-lib/npm/types/features/calendar/types/editor.d.ts +3 -0
  78. package/dist-lib/npm/types/features/calendar/types/view.d.ts +1 -1
  79. package/dist-lib/npm/types/features/calendar/utils/eventDrag.d.ts +0 -1
  80. package/dist-lib/npm/types/features/calendar/utils/eventLabels.d.ts +0 -3
  81. package/dist-lib/npm/types/features/calendar/utils/search.d.ts +11 -0
  82. package/dist-lib/npm/types/features/calendars/components/ShowInPersonalSwitch.d.ts +4 -0
  83. package/dist-lib/npm/types/features/calendars/components/settings/ExchangeSection.d.ts +4 -0
  84. package/dist-lib/npm/types/features/calendars/components/settings/SubscribeSection.d.ts +4 -0
  85. package/dist-lib/npm/types/features/calendars/context/CalendarsProvider.d.ts +2 -1
  86. package/dist-lib/npm/types/features/calendars/index.d.ts +2 -2
  87. package/dist-lib/npm/types/features/calendars/repositories/LocalCalendarRepository.d.ts +12 -1
  88. package/dist-lib/npm/types/features/calendars/repositories/RemoteCalendarRepository.d.ts +3 -0
  89. package/dist-lib/npm/types/features/calendars/types/calendar.d.ts +5 -1
  90. package/dist-lib/npm/types/features/calendars/utils/activeCalendarStorage.d.ts +2 -0
  91. package/dist-lib/npm/types/features/calendars/utils/permissions.d.ts +1 -2
  92. package/dist-lib/npm/types/features/chat/components/ChatPanel.d.ts +8 -0
  93. package/dist-lib/npm/types/features/chat/components/ChatProvider.d.ts +13 -0
  94. package/dist-lib/npm/types/features/chat/components/UnreadBadge.d.ts +4 -0
  95. package/dist-lib/npm/types/features/chat/context/ChatContext.d.ts +14 -0
  96. package/dist-lib/npm/types/features/chat/hooks/useChatMessages.d.ts +13 -0
  97. package/dist-lib/npm/types/features/chat/hooks/useChatUnread.d.ts +7 -0
  98. package/dist-lib/npm/types/features/chat/index.d.ts +4 -0
  99. package/dist-lib/npm/types/features/chat/utils/time.d.ts +2 -0
  100. package/dist-lib/npm/types/features/events/components/AttendeesField.d.ts +15 -0
  101. package/dist-lib/npm/types/features/events/components/EventModal.d.ts +19 -3
  102. package/dist-lib/npm/types/features/events/components/LinksField.d.ts +8 -0
  103. package/dist-lib/npm/types/features/events/components/ReminderField.d.ts +6 -0
  104. package/dist-lib/npm/types/features/events/hooks/useEvents.d.ts +6 -3
  105. package/dist-lib/npm/types/features/events/index.d.ts +3 -1
  106. package/dist-lib/npm/types/features/events/utils/icalExchange.d.ts +11 -0
  107. package/dist-lib/npm/types/features/events/utils/undo.d.ts +7 -0
  108. package/dist-lib/npm/types/features/holidays/components/HolidaySettings.d.ts +1 -0
  109. package/dist-lib/npm/types/features/holidays/hooks/useHolidays.d.ts +3 -0
  110. package/dist-lib/npm/types/features/holidays/index.d.ts +2 -0
  111. package/dist-lib/npm/types/features/holidays/utils/holidayLibrary.d.ts +8 -0
  112. package/dist-lib/npm/types/features/preferences/components/NotificationSettings.d.ts +3 -0
  113. package/dist-lib/npm/types/features/preferences/index.d.ts +1 -0
  114. package/dist-lib/npm/types/features/reminders/ReminderNotices.d.ts +1 -0
  115. package/dist-lib/npm/types/features/reminders/useReminders.d.ts +2 -0
  116. package/dist-lib/npm/types/features/storage/hooks/useStorage.d.ts +1 -2
  117. package/dist-lib/npm/types/features/storage/index.d.ts +4 -2
  118. package/dist-lib/npm/types/features/storage/repositories/LocalEventRepository.d.ts +2 -1
  119. package/dist-lib/npm/types/features/storage/repositories/RemoteChatRepository.d.ts +18 -0
  120. package/dist-lib/npm/types/features/storage/repositories/RemoteEventRepository.d.ts +5 -2
  121. package/dist-lib/npm/types/features/storage/repositories/RemoteHolidayRepository.d.ts +7 -0
  122. package/dist-lib/npm/types/features/storage/types/storage.d.ts +30 -2
  123. package/dist-lib/npm/types/hooks/useDebouncedValue.d.ts +1 -0
  124. package/dist-lib/npm/types/hooks/useForm.d.ts +5 -0
  125. package/dist-lib/npm/types/hooks/useFormState.d.ts +5 -0
  126. package/dist-lib/npm/types/hooks/useKeyboardShortcuts.d.ts +3 -0
  127. package/dist-lib/npm/types/hooks/useLocationUrl.d.ts +1 -0
  128. package/dist-lib/npm/types/i18n/format.d.ts +1 -0
  129. package/dist-lib/npm/types/i18n/index.d.ts +0 -1
  130. package/dist-lib/npm/types/i18n/locale.d.ts +0 -2
  131. package/dist-lib/npm/types/i18n/messages/en/calendar.d.ts +17 -0
  132. package/dist-lib/npm/types/i18n/messages/en/calendars.d.ts +25 -0
  133. package/dist-lib/npm/types/i18n/messages/en/core.d.ts +2 -0
  134. package/dist-lib/npm/types/i18n/messages/en/events.d.ts +63 -3
  135. package/dist-lib/npm/types/i18n/messages/en/index.d.ts +128 -3
  136. package/dist-lib/npm/types/i18n/messages/en/settings.d.ts +21 -0
  137. package/dist-lib/npm/types/i18n/messages/index.d.ts +128 -3
  138. package/dist-lib/npm/types/lib/CalendarWidget.d.ts +1 -1
  139. package/dist-lib/npm/types/lib/config.d.ts +6 -2
  140. package/dist-lib/npm/types/lib/defaults.d.ts +2 -0
  141. package/dist-lib/npm/types/lib/element.d.ts +1 -1
  142. package/dist-lib/npm/types/lib/index.d.ts +4 -3
  143. package/dist-lib/npm/types/pages/RespondPage.d.ts +1 -0
  144. package/dist-lib/npm/types/utils/api.d.ts +4 -5
  145. package/dist-lib/npm/types/utils/apiError.d.ts +0 -2
  146. package/dist-lib/npm/types/utils/appError.d.ts +2 -1
  147. package/dist-lib/npm/types/utils/chat.d.ts +44 -0
  148. package/dist-lib/npm/types/utils/color.d.ts +0 -1
  149. package/dist-lib/npm/types/utils/date.d.ts +0 -6
  150. package/dist-lib/npm/types/utils/event.d.ts +41 -5
  151. package/dist-lib/npm/types/utils/holidays.d.ts +18 -0
  152. package/dist-lib/npm/types/utils/ical.d.ts +11 -0
  153. package/dist-lib/npm/types/utils/location.d.ts +4 -0
  154. package/dist-lib/npm/types/utils/notifications.d.ts +3 -0
  155. package/dist-lib/npm/types/utils/preferences.d.ts +7 -1
  156. package/dist-lib/npm/types/utils/recurrence.d.ts +3 -4
  157. package/dist-lib/npm/types/utils/reminders.d.ts +13 -0
  158. package/dist-lib/npm/types/utils/timeZone.d.ts +1 -1
  159. package/package.json +4 -1
  160. package/dist-lib/cdn/de-BPZBZXaZ.js +0 -2
  161. package/dist-lib/cdn/de-BPZBZXaZ.js.map +0 -1
  162. package/dist-lib/cdn/es-DsIckdik.js +0 -2
  163. package/dist-lib/cdn/es-DsIckdik.js.map +0 -1
  164. package/dist-lib/cdn/fr-DWAs3O6J.js +0 -2
  165. package/dist-lib/cdn/fr-DWAs3O6J.js.map +0 -1
  166. package/dist-lib/cdn/it-CbhjxqIb.js +0 -2
  167. package/dist-lib/cdn/it-CbhjxqIb.js.map +0 -1
  168. package/dist-lib/cdn/nl-mjTHznX5.js +0 -2
  169. package/dist-lib/cdn/nl-mjTHznX5.js.map +0 -1
  170. package/dist-lib/cdn/pl-CXT0jb2D.js +0 -2
  171. package/dist-lib/cdn/pl-CXT0jb2D.js.map +0 -1
  172. package/dist-lib/cdn/pt-D0oXlVdU.js +0 -2
  173. package/dist-lib/cdn/pt-D0oXlVdU.js.map +0 -1
  174. package/dist-lib/npm/de-CCzGjeTd.js.map +0 -1
  175. package/dist-lib/npm/es-Ciaf66rH.js.map +0 -1
  176. package/dist-lib/npm/fr-CAqNm10Z.js.map +0 -1
  177. package/dist-lib/npm/it-Cqqdu2ua.js.map +0 -1
  178. package/dist-lib/npm/nl-CkchSA8q.js.map +0 -1
  179. package/dist-lib/npm/pl-CCBDUr8k.js.map +0 -1
  180. package/dist-lib/npm/pt-DucaCaoY.js.map +0 -1
  181. package/dist-lib/npm/types/hooks/useArrowKeyNavigation.d.ts +0 -6
@@ -3,7 +3,6 @@ type StatusMessageProps = {
3
3
  tone?: 'error' | 'success';
4
4
  className?: string;
5
5
  };
6
- export declare function StatusMessage({ message, tone, className }: StatusMessageProps): import("react").JSX.Element | null;
7
6
  export declare function ErrorMessage(props: Omit<StatusMessageProps, 'tone'>): import("react").JSX.Element;
8
7
  type ActionFeedbackProps = {
9
8
  error: string | null | undefined;
@@ -3,12 +3,14 @@ export type TabDefinition<T extends string> = {
3
3
  value: T;
4
4
  label: string;
5
5
  content: ReactNode;
6
+ invalid?: boolean;
6
7
  };
7
8
  type TabsProps<T extends string> = {
8
9
  label: string;
9
10
  tabs: readonly TabDefinition<T>[];
10
11
  value: T;
12
+ stable?: boolean;
11
13
  onChange: (value: T) => void;
12
14
  };
13
- export declare function Tabs<T extends string>({ label, tabs, value, onChange }: TabsProps<T>): import("react").JSX.Element;
15
+ export declare function Tabs<T extends string>({ label, tabs, value, stable, onChange }: TabsProps<T>): import("react").JSX.Element;
14
16
  export {};
@@ -8,11 +8,11 @@ export declare const ROUTES: {
8
8
  readonly settings: "/settings";
9
9
  readonly createCalendar: "/calendars/new";
10
10
  readonly calendarSettings: "/calendars/:calendarId/settings";
11
+ readonly respond: "/respond";
11
12
  };
12
13
  export declare const calendarSettingsPath: (calendarId: string) => string;
13
14
  export declare const SETTINGS_CALENDARS_PATH: string;
14
15
  export declare const SETTINGS_INVITATIONS_PATH: string;
15
16
  export declare const TOKEN_PARAM = "token";
16
- export declare const isSafeRedirect: (path: string | null) => path is string;
17
17
  export declare const getRedirectTarget: (searchParams: URLSearchParams) => string;
18
18
  export declare const withRedirect: (route: string, redirectTo: string | null) => string;
@@ -5,7 +5,8 @@ export type HostOptions = {
5
5
  theme?: HostTheme;
6
6
  initialView?: CalendarView;
7
7
  timeZone?: string;
8
+ holidays?: string;
9
+ mapUrl?: string;
8
10
  };
9
11
  export declare const HostContext: import("react").Context<HostOptions>;
10
12
  export declare const useHost: () => HostOptions;
11
- export declare const useViewerTimeZone: () => string;
@@ -0,0 +1,3 @@
1
+ export declare const TimeZoneContext: import("react").Context<string | null>;
2
+ export declare const useAutomaticTimeZone: () => string;
3
+ export declare const useViewerTimeZone: () => string;
@@ -1,4 +1,5 @@
1
1
  import { type UserTokenProvider } from '../features/authorization/index.js';
2
+ import type { HolidaySource } from '../lib/defaults.js';
2
3
  import type { CalendarDataSource } from './types.js';
3
4
  export type RestDataSourceOptions = {
4
5
  baseUrl: string;
@@ -7,5 +8,7 @@ export type RestDataSourceOptions = {
7
8
  headers?: HeadersInit;
8
9
  getAccessToken?: () => string | null;
9
10
  getUserToken?: UserTokenProvider;
11
+ holidaySource?: HolidaySource;
12
+ chatSocketUrl?: string;
10
13
  };
11
- export declare function restDataSource({ baseUrl, timeoutMs, auth, headers, getAccessToken, getUserToken, }: RestDataSourceOptions): CalendarDataSource;
14
+ export declare function restDataSource({ baseUrl, timeoutMs, auth, headers, getAccessToken, getUserToken, holidaySource, chatSocketUrl, }: RestDataSourceOptions): CalendarDataSource;
@@ -1,4 +1,5 @@
1
1
  import type { UserTokenProvider } from '../features/authorization/index.js';
2
+ import type { HolidaySource } from '../lib/defaults.js';
2
3
  import type { CalendarDataSource } from './types.js';
3
4
  export declare const TENANT_HEADER = "X-Calendar-Tenant";
4
5
  export type TenantDataSourceOptions = {
@@ -6,5 +7,6 @@ export type TenantDataSourceOptions = {
6
7
  baseUrl: string;
7
8
  timeoutMs?: number;
8
9
  getUserToken?: UserTokenProvider;
10
+ holidaySource?: HolidaySource;
9
11
  };
10
- export declare const tenantDataSource: ({ tenant, baseUrl, timeoutMs, getUserToken }: TenantDataSourceOptions) => CalendarDataSource;
12
+ export declare const tenantDataSource: ({ tenant, baseUrl, timeoutMs, getUserToken, holidaySource, }: TenantDataSourceOptions) => CalendarDataSource;
@@ -1,12 +1,14 @@
1
1
  import type { AuthRepository } from '../features/authorization/index.js';
2
2
  import type { CalendarRepository } from '../features/calendars/index.js';
3
- import type { ColorRepository, EventRepository, PreferencesRepository, StorageMode } from '../features/storage/index.js';
3
+ import type { ColorRepository, EventRepository, ChatRepository, HolidayRepository, PreferencesRepository, StorageMode } from '../features/storage/index.js';
4
4
  export type DataRepositories = {
5
5
  mode: StorageMode;
6
6
  events: EventRepository;
7
7
  calendars: CalendarRepository;
8
8
  colors: ColorRepository;
9
9
  preferences: PreferencesRepository;
10
+ holidays?: HolidayRepository;
11
+ chat?: ChatRepository;
10
12
  };
11
13
  export type DataSourceContext = {
12
14
  getLanguage: () => string | null;
@@ -10,9 +10,10 @@ export declare const useAuth: () => {
10
10
  verifyEmail: (token: string) => Promise<void>;
11
11
  resendVerificationEmail: () => Promise<void>;
12
12
  } & {
13
+ respondToEvent: (token: string, status: import("../../../utils/event.ts").EventReply) => Promise<import("../../../utils/event.ts").EventResponse>;
13
14
  enabled: boolean;
14
15
  method: import("../index.ts").AuthMethod;
15
- status: import("../index.ts").AuthStatus;
16
+ status: import("../types/auth.ts").AuthStatus;
16
17
  user: import("../index.ts").User | null;
17
18
  expireSession: () => void;
18
19
  };
@@ -0,0 +1,4 @@
1
+ export declare function useRedirectTarget(): {
2
+ redirectTo: string;
3
+ continueToTarget: () => void | Promise<void>;
4
+ };
@@ -11,4 +11,4 @@ export { LoginPage } from './components/LoginPage.js';
11
11
  export { RegisterPage } from './components/RegisterPage.js';
12
12
  export { ResetPasswordPage } from './components/ResetPasswordPage.js';
13
13
  export { VerifyEmailPage } from './components/VerifyEmailPage.js';
14
- export type { AuthMethod, AuthRepository, AuthStatus, User, UserTokenProvider } from './types/auth.js';
14
+ export type { AuthMethod, AuthRepository, User, UserTokenProvider } from './types/auth.js';
@@ -1,3 +1,4 @@
1
+ import { type EventReply } from '../../../utils/event.js';
1
2
  import type { ApiClient } from '../../../utils/api.js';
2
3
  import type { AuthRepository, User, UserTokenProvider } from '../types/auth.js';
3
4
  export declare class HostTokenAuthRepository implements AuthRepository {
@@ -15,4 +16,5 @@ export declare class HostTokenAuthRepository implements AuthRepository {
15
16
  resetPassword: () => Promise<never>;
16
17
  verifyEmail: () => Promise<never>;
17
18
  resendVerificationEmail: () => Promise<never>;
19
+ respondToEvent(token: string, status: EventReply): Promise<import("../../../utils/event.ts").EventResponse>;
18
20
  }
@@ -1,3 +1,4 @@
1
+ import { type EventReply } from '../../../utils/event.js';
1
2
  import type { ApiClient } from '../../../utils/api.js';
2
3
  import type { AccountDeletionInput, AuthRepository, LoginInput, PasswordChangeInput, PasswordResetInput, PasswordResetRequestInput, ProfileInput, RegisterInput, User } from '../types/auth.js';
3
4
  export declare class RemoteAuthRepository implements AuthRepository {
@@ -15,4 +16,5 @@ export declare class RemoteAuthRepository implements AuthRepository {
15
16
  resetPassword(input: PasswordResetInput): Promise<void>;
16
17
  verifyEmail(token: string): Promise<void>;
17
18
  resendVerificationEmail(): Promise<void>;
19
+ respondToEvent(token: string, status: EventReply): Promise<import("../../../utils/event.ts").EventResponse>;
18
20
  }
@@ -1,3 +1,4 @@
1
+ import type { EventReply, EventResponse } from '../../../utils/event.js';
1
2
  export type User = {
2
3
  id: string;
3
4
  email: string;
@@ -40,9 +41,11 @@ export interface AuthRepository {
40
41
  resetPassword(input: PasswordResetInput): Promise<void>;
41
42
  verifyEmail(token: string): Promise<void>;
42
43
  resendVerificationEmail(): Promise<void>;
44
+ respondToEvent?(token: string, status: EventReply): Promise<EventResponse>;
43
45
  }
44
46
  type AccountActions = Pick<AuthRepository, 'login' | 'register' | 'logout' | 'updateProfile' | 'changePassword' | 'deleteAccount' | 'requestPasswordReset' | 'resetPassword' | 'verifyEmail' | 'resendVerificationEmail'>;
45
47
  export type AuthContextValue = AccountActions & {
48
+ respondToEvent: (token: string, status: EventReply) => Promise<EventResponse>;
46
49
  enabled: boolean;
47
50
  method: AuthMethod;
48
51
  status: AuthStatus;
@@ -1,4 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
+ import { type EventTab } from '../../events/index.js';
3
+ import { type ChatAccess } from '../../chat/index.js';
4
+ import { type AttendeeCandidateLoader } from '../hooks/useAttendeeCandidates.js';
2
5
  import type { EventSources } from '../types/eventSource.js';
3
6
  import type { CalendarView } from '../types/view.js';
4
7
  type CalendarProps = {
@@ -9,6 +12,16 @@ type CalendarProps = {
9
12
  initialView?: CalendarView;
10
13
  headerContext?: ReactNode;
11
14
  headerAccessory?: ReactNode;
15
+ currentUserEmail?: string | null;
16
+ loadAttendeeCandidates?: AttendeeCandidateLoader;
17
+ chat?: ChatAccess;
18
+ openEvent?: OpenEventRequest;
19
+ onOpenEventDone?: () => void;
12
20
  };
13
- export declare function Calendar({ calendarIds, targetCalendarId, canCreate, eventSources, initialView, headerContext, headerAccessory, }: CalendarProps): import("react").JSX.Element;
21
+ export type OpenEventRequest = {
22
+ eventId: string;
23
+ date: string;
24
+ tab?: EventTab;
25
+ };
26
+ export declare function Calendar({ calendarIds, targetCalendarId, canCreate, eventSources, initialView, headerContext, headerAccessory, currentUserEmail, loadAttendeeCandidates, chat, openEvent, onOpenEventDone, }: CalendarProps): import("react").JSX.Element;
14
27
  export {};
@@ -9,8 +9,9 @@ type CalendarHeaderProps = {
9
9
  onNext: () => void;
10
10
  onToday: () => void;
11
11
  onCreateEvent?: () => void;
12
+ onSearch?: () => void;
12
13
  context?: ReactNode;
13
14
  accessory?: ReactNode;
14
15
  };
15
- export declare function CalendarHeader({ view, title, subtitle, onViewChange, onPrevious, onNext, onToday, onCreateEvent, context, accessory, }: CalendarHeaderProps): import("react").JSX.Element;
16
+ export declare function CalendarHeader({ view, title, subtitle, onViewChange, onPrevious, onNext, onToday, onCreateEvent, onSearch, context, accessory, }: CalendarHeaderProps): import("react").JSX.Element;
16
17
  export {};
@@ -7,6 +7,7 @@ type DayColumnProps = {
7
7
  nowMinutes: number | null;
8
8
  segments: readonly EventSegment[];
9
9
  allDaySegments: readonly AllDaySegment[];
10
+ allDayRowOffset?: number;
10
11
  selection?: {
11
12
  fromHour: number;
12
13
  toHour: number;
@@ -17,5 +18,5 @@ type DayColumnProps = {
17
18
  onEventSelect: (event: EventOccurrence) => void;
18
19
  onHeaderSelect?: (date: string) => void;
19
20
  };
20
- export declare function DayColumn({ date, isToday, nowMinutes, segments, allDaySegments, selection, onSlotSelect, onAllDaySelect, onEventSelect, onHeaderSelect, }: DayColumnProps): import("react").JSX.Element;
21
+ export declare function DayColumn({ date, isToday, nowMinutes, segments, allDaySegments, allDayRowOffset, selection, onSlotSelect, onAllDaySelect, onEventSelect, onHeaderSelect, }: DayColumnProps): import("react").JSX.Element;
21
22
  export {};
@@ -0,0 +1,7 @@
1
+ import { type EventLink } from '../../../utils/event.js';
2
+ type EventLinksProps = {
3
+ links: readonly EventLink[];
4
+ lines: number;
5
+ };
6
+ export declare function EventLinks({ links, lines }: EventLinksProps): import("react").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function EventLocation({ location }: {
2
+ location: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type CalendarEvent } from '../../../utils/event.js';
2
+ type EventSearchModalProps = {
3
+ calendarIds: readonly string[];
4
+ today: string;
5
+ onSelect: (event: CalendarEvent, date: string) => void;
6
+ onClose: () => void;
7
+ };
8
+ export declare function EventSearchModal({ calendarIds, today, onSelect, onClose }: EventSearchModalProps): import("react").JSX.Element;
9
+ export {};
@@ -3,6 +3,7 @@ import type { EventSource } from '../types/eventSource.js';
3
3
  type EventTitleProps = {
4
4
  event: EventOccurrence;
5
5
  source?: EventSource;
6
+ withLocation?: boolean;
6
7
  };
7
- export declare function EventTitle({ event, source }: EventTitleProps): import("react").JSX.Element;
8
+ export declare function EventTitle({ event, source, withLocation }: EventTitleProps): import("react").JSX.Element;
8
9
  export {};
@@ -3,7 +3,8 @@ type MiniMonthProps = {
3
3
  today: string;
4
4
  className?: string;
5
5
  hasEvents?: (date: string) => boolean;
6
+ getHoliday?: (date: string) => string | undefined;
6
7
  onSelectDay?: (date: string) => void;
7
8
  };
8
- export declare function MiniMonth({ month, today, className, hasEvents, onSelectDay }: MiniMonthProps): import("react").JSX.Element;
9
+ export declare function MiniMonth({ month, today, className, hasEvents, getHoliday, onSelectDay }: MiniMonthProps): import("react").JSX.Element;
9
10
  export {};
@@ -0,0 +1,7 @@
1
+ type UndoNoticeProps = {
2
+ message: string;
3
+ onUndo: () => void;
4
+ onDismiss: () => void;
5
+ };
6
+ export declare function UndoNotice({ message, onUndo, onDismiss }: UndoNoticeProps): import("react").JSX.Element;
7
+ export {};
@@ -1,7 +1,10 @@
1
1
  import type { Messages } from '../../../i18n/index.js';
2
2
  import { type CalendarView, type ViewDefinition } from '../types/view.js';
3
3
  export declare const VIEW_DEFINITIONS: Record<CalendarView, ViewDefinition>;
4
+ export declare const VIEW_SHORTCUTS: Record<CalendarView, string>;
5
+ export declare const withShortcut: (label: string, key: string) => string;
4
6
  export declare const getViewOptions: (m: Messages) => {
5
7
  value: "day" | "week" | "month" | "year";
6
8
  label: string;
9
+ title: string;
7
10
  }[];
@@ -0,0 +1,3 @@
1
+ import type { CalendarEvent } from '../../../utils/event.js';
2
+ export declare const CurrentUserEmailContext: import("react").Context<string | null>;
3
+ export declare const useOwnAttendance: ({ attendees }: Pick<CalendarEvent, "attendees">) => "needsAction" | "accepted" | "tentative" | "declined" | undefined;
@@ -0,0 +1,4 @@
1
+ export type HolidayMap = ReadonlyMap<string, readonly string[]>;
2
+ export declare const HolidaysContext: import("react").Context<HolidayMap>;
3
+ export declare const useHolidayMap: () => HolidayMap;
4
+ export declare const useHolidayNames: (date: string) => readonly string[];
@@ -0,0 +1,3 @@
1
+ import type { AttendeeCandidate } from '../../events/index.js';
2
+ export type AttendeeCandidateLoader = (calendarId: string) => Promise<AttendeeCandidate[]>;
3
+ export declare function useAttendeeCandidates(load: AttendeeCandidateLoader | undefined, calendarId: string | null): AttendeeCandidate[];
@@ -1,4 +1,4 @@
1
- import { type RefObject } from 'react';
1
+ import type { RefObject } from 'react';
2
2
  import type { EventOccurrence, EventPeriod } from '../../../utils/event.js';
3
3
  export type DragPreview = {
4
4
  occurrenceKey: string;
@@ -0,0 +1,7 @@
1
+ import { type SearchResult } from '../utils/search.js';
2
+ export declare function useEventSearch(text: string, calendarIds: readonly string[], today: string): {
3
+ results: SearchResult[];
4
+ error: string | null;
5
+ isSearching: boolean;
6
+ isTooShort: boolean;
7
+ };
@@ -1,2 +1,3 @@
1
1
  import type { CalendarEvent } from '../../../utils/event.js';
2
- export declare const useEventSource: ({ calendarId }: Pick<CalendarEvent, "calendarId">) => import("../index.ts").EventSource | undefined;
2
+ export declare const useEventSources: () => import("../types/eventSource.ts").EventSources;
3
+ export declare const useEventSource: ({ calendarId }: Pick<CalendarEvent, "calendarId">) => import("../types/eventSource.ts").EventSource | undefined;
@@ -0,0 +1,23 @@
1
+ import { type RefObject } from 'react';
2
+ export type Point = {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ type PressDelay = {
7
+ mouse: number;
8
+ touch: number;
9
+ };
10
+ type PressDragHandlers<T> = {
11
+ start: (target: EventTarget | null, point: Point) => T | null;
12
+ activate: (press: T) => void;
13
+ move: (press: T, point: Point) => void;
14
+ finish: (press: T, commit: boolean, wasActive: boolean) => void;
15
+ };
16
+ type PressDragOptions<T> = PressDragHandlers<T> & {
17
+ containerRef: RefObject<HTMLElement | null>;
18
+ enabled: boolean;
19
+ delay: PressDelay;
20
+ vibrateMs?: number;
21
+ };
22
+ export declare function usePressDrag<T>({ containerRef, enabled, delay, vibrateMs, ...handlers }: PressDragOptions<T>): void;
23
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { ClassNameValue } from '../../../utils/classNames.js';
2
+ import type { EventSegment } from '../types/eventLayout.js';
3
+ export declare function useSegmentAttributes(segment: EventSegment, ...classNames: ClassNameValue[]): {
4
+ i18n: import("../../../i18n/I18nContext.ts").I18n & {
5
+ setUserLocale: (locale: string | null) => void;
6
+ };
7
+ source: import("../types/eventSource.ts").EventSource | undefined;
8
+ isDragging: boolean;
9
+ style: import("react").CSSProperties | undefined;
10
+ attributes: {
11
+ title: string;
12
+ 'data-occurrence-key': string;
13
+ className?: string;
14
+ };
15
+ };
@@ -1,6 +1,3 @@
1
1
  import { type RefObject } from 'react';
2
2
  import { type SlotRange, type SlotSelection } from '../utils/slotSelection.js';
3
- export declare function useSlotSelection(containerRef: RefObject<HTMLElement | null>, enabled: boolean, onSelect: (range: SlotRange) => void): {
4
- selection: SlotSelection | null;
5
- isClickSuppressed: () => boolean;
6
- };
3
+ export declare function useSlotSelection(containerRef: RefObject<HTMLElement | null>, enabled: boolean, onSelect: (range: SlotRange) => void): SlotSelection | null;
@@ -1,4 +1,3 @@
1
- export { Calendar } from './components/Calendar.js';
1
+ export { Calendar, type OpenEventRequest } from './components/Calendar.js';
2
2
  export { getViewOptions } from './constants/views.js';
3
3
  export { MiniMonth } from './components/MiniMonth.js';
4
- export type { EventSource, EventSources } from './types/eventSource.js';
@@ -1,5 +1,8 @@
1
1
  import type { EventInput, EventOccurrence } from '../../../utils/event.js';
2
+ import type { EventTab } from '../../events/index.js';
2
3
  export type EditorState = {
3
4
  initialValue: EventInput;
4
5
  occurrence: EventOccurrence | null;
6
+ notice?: string;
7
+ initialTab?: EventTab;
5
8
  };
@@ -4,7 +4,7 @@ import type { EventOccurrence } from '../../../utils/event.js';
4
4
  import type { SlotRange } from '../utils/slotSelection.js';
5
5
  import type { EventSegment } from './eventLayout.js';
6
6
  export { CALENDAR_VIEWS, type CalendarView } from '../../../utils/calendarView.js';
7
- export type ViewI18n = Pick<I18n, 'm' | 'format' | 'weekInfo'>;
7
+ type ViewI18n = Pick<I18n, 'm' | 'format' | 'weekInfo'>;
8
8
  export type ViewDefinition = {
9
9
  getRange: (anchor: string, firstDay: number) => DateRange;
10
10
  step: (anchor: string, direction: 1 | -1) => string;
@@ -5,7 +5,6 @@ export type DragPoint = {
5
5
  date: string;
6
6
  minutes: number;
7
7
  };
8
- export declare const DRAG_STEP_MINUTES = 15;
9
8
  export declare const getDragDelta: (unit: DragUnit, from: DragPoint, to: DragPoint) => number;
10
9
  export declare const applyDragDelta: (period: EventPeriod, mode: DragMode, delta: number) => EventPeriod;
11
10
  export declare const isSamePeriod: (a: EventPeriod, b: EventPeriod) => boolean;
@@ -1,12 +1,9 @@
1
1
  import type { I18n } from '../../../i18n/index.js';
2
- import { type EventOccurrence } from '../../../utils/event.js';
3
2
  import type { ClassNameValue } from '../../../utils/classNames.js';
4
3
  import type { EventSegment } from '../types/eventLayout.js';
5
4
  import type { EventSource } from '../types/eventSource.js';
6
5
  type LabelI18n = Pick<I18n, 'm' | 'format'>;
7
- export declare const getRecurrenceText: (event: EventOccurrence, i18n: LabelI18n) => string | null;
8
6
  export declare const getSourceText: (source: EventSource, { m }: LabelI18n) => string;
9
- export declare const getEventTooltip: (event: EventOccurrence, source: EventSource | undefined, i18n: LabelI18n) => string;
10
7
  export declare const getSegmentAttributes: ({ event, continuesBefore, continuesAfter }: EventSegment, source: EventSource | undefined, i18n: LabelI18n, ...classNamesToMerge: ClassNameValue[]) => {
11
8
  title: string;
12
9
  'data-occurrence-key': string;
@@ -0,0 +1,11 @@
1
+ import { type CalendarEvent } from '../../../utils/event.js';
2
+ export declare const SEARCH_MIN_LENGTH = 2;
3
+ export type SearchResult = {
4
+ event: CalendarEvent;
5
+ date: string;
6
+ };
7
+ export declare const getFallbackSearchRange: (today: string) => {
8
+ from: string;
9
+ to: string;
10
+ };
11
+ export declare const toSearchResults: (events: readonly CalendarEvent[], today: string) => SearchResult[];
@@ -0,0 +1,4 @@
1
+ import type { CalendarSummary } from '../types/calendar.js';
2
+ export declare function ShowInPersonalSwitch({ calendar }: {
3
+ calendar: CalendarSummary;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { CalendarSummary } from '../../types/calendar.js';
2
+ export declare function ExchangeSection({ calendar }: {
3
+ calendar: CalendarSummary;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { CalendarSummary } from '../../types/calendar.js';
2
+ export declare function SubscribeSection({ calendar }: {
3
+ calendar: CalendarSummary;
4
+ }): import("react").JSX.Element | null;
@@ -2,7 +2,8 @@ import { type ReactNode } from 'react';
2
2
  import type { CalendarRepository } from '../types/calendar.js';
3
3
  type CalendarsProviderProps = {
4
4
  repository: CalendarRepository;
5
+ storageScope: string;
5
6
  children: ReactNode;
6
7
  };
7
- export declare function CalendarsProvider({ repository, children }: CalendarsProviderProps): import("react").JSX.Element;
8
+ export declare function CalendarsProvider({ repository, storageScope, children }: CalendarsProviderProps): import("react").JSX.Element;
8
9
  export {};
@@ -6,7 +6,7 @@ export { CalendarSettingsPage } from './components/settings/CalendarSettingsPage
6
6
  export { CreateCalendarPage } from './components/create/CreateCalendarPage.js';
7
7
  export { CalendarSwitcher } from './components/CalendarSwitcher.js';
8
8
  export { ActiveCalendarIndicator } from './components/ActiveCalendarIndicator.js';
9
- export { getSharedCalendars, getVisibleCalendarIds, hasPermission, isPersonalCalendar } from './utils/permissions.js';
9
+ export { getSharedCalendars, hasPermission, isPersonalCalendar } from './utils/permissions.js';
10
10
  export { LocalCalendarRepository } from './repositories/LocalCalendarRepository.js';
11
11
  export { RemoteCalendarRepository } from './repositories/RemoteCalendarRepository.js';
12
- export type { CalendarChanges, CalendarDraft, CalendarKind, CalendarRepository, CalendarSummary, InvitableRole, Invitation, PendingInvitation, Permission, TeamChanges, TeamInvitation, TeamMember, TeamRole, } from './types/calendar.js';
12
+ export type { CalendarChanges, CalendarDraft, CalendarRepository, CalendarSummary, Invitation, PendingInvitation, TeamChanges, TeamInvitation, TeamMember, TeamRole, } from './types/calendar.js';
@@ -1,6 +1,17 @@
1
1
  import type { CalendarRepository } from '../types/calendar.js';
2
2
  export declare class LocalCalendarRepository implements CalendarRepository {
3
- list(): Promise<import("../index.ts").CalendarSummary[]>;
3
+ list(): Promise<{
4
+ permissions: ("read_calendar" | "create_entry" | "update_own_entry" | "update_any_entry" | "delete_own_entry" | "delete_any_entry" | "invite_members" | "manage_members" | "manage_team" | "delete_team")[];
5
+ id: string;
6
+ teamId: string;
7
+ name: string;
8
+ color: import("../../../utils/event.ts").EventColor;
9
+ kind: "personal" | "team";
10
+ teamName: string | null;
11
+ description: string;
12
+ role: import("../index.ts").TeamRole;
13
+ showInPersonal: boolean;
14
+ }[]>;
4
15
  listInvitations(): Promise<never[]>;
5
16
  create: () => Promise<never>;
6
17
  leave: () => Promise<never>;
@@ -20,4 +20,7 @@ export declare class RemoteCalendarRepository implements CalendarRepository {
20
20
  listInvitations(): Promise<PendingInvitation[]>;
21
21
  acceptInvitation(id: string): Promise<CalendarSummary[]>;
22
22
  declineInvitation(id: string): Promise<void>;
23
+ getFeed(calendarId: string): Promise<string | null>;
24
+ createFeed(calendarId: string): Promise<string>;
25
+ deleteFeed(calendarId: string): Promise<void>;
23
26
  }
@@ -1,5 +1,5 @@
1
1
  import type { EventColor } from '../../../utils/event.js';
2
- export type CalendarKind = 'personal' | 'team';
2
+ type CalendarKind = 'personal' | 'team';
3
3
  export declare const TEAM_ROLES: readonly ["owner", "admin", "manager", "editor", "member", "contributor", "viewer"];
4
4
  export type TeamRole = (typeof TEAM_ROLES)[number];
5
5
  export type InvitableRole = Exclude<TeamRole, 'owner'>;
@@ -69,6 +69,9 @@ export interface CalendarRepository {
69
69
  listTeamInvitations(teamId: string): Promise<TeamInvitation[]>;
70
70
  invite(teamId: string, invitation: Invitation): Promise<TeamInvitation>;
71
71
  revokeInvitation(teamId: string, invitationId: string): Promise<void>;
72
+ getFeed?(calendarId: string): Promise<string | null>;
73
+ createFeed?(calendarId: string): Promise<string>;
74
+ deleteFeed?(calendarId: string): Promise<void>;
72
75
  }
73
76
  export type CalendarsContextValue = {
74
77
  repository: CalendarRepository;
@@ -89,3 +92,4 @@ export type CalendarsContextValue = {
89
92
  deleteTeam: (calendar: CalendarSummary) => Promise<void>;
90
93
  transferOwnership: (calendar: CalendarSummary, userId: string) => Promise<void>;
91
94
  };
95
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const readActiveCalendarId: (scope: string) => string | null;
2
+ export declare const writeActiveCalendarId: (scope: string, id: string) => void;
@@ -7,7 +7,6 @@ export declare const hasPermission: (calendar: CalendarSummary, permission: Perm
7
7
  export declare const getSharedCalendars: (calendars: readonly CalendarSummary[], active: CalendarSummary) => CalendarSummary[];
8
8
  export declare const outranks: (actor: TeamRole, target: TeamRole) => boolean;
9
9
  export declare const getAssignableRoles: (actor: TeamRole) => ("owner" | "admin" | "manager" | "editor" | "member" | "contributor" | "viewer")[];
10
- export declare const getInvitableRoles: (actor: TeamRole) => import("../index.ts").InvitableRole[];
11
- export declare const canOpenSettings: (calendar: CalendarSummary) => boolean;
10
+ export declare const getInvitableRoles: (actor: TeamRole) => import("../types/calendar.ts").InvitableRole[];
12
11
  export declare const getDistinctTeamName: ({ name, teamName }: CalendarSummary) => string | null;
13
12
  export declare const getCalendarKindLabel: (calendar: CalendarSummary, { calendars: { kind } }: Messages) => string;
@@ -0,0 +1,8 @@
1
+ import { type ChatKey } from '../../../utils/chat.js';
2
+ type ChatPanelProps = {
3
+ chatKey: ChatKey;
4
+ calendarId: string;
5
+ isActive: boolean;
6
+ };
7
+ export declare function ChatPanel(props: ChatPanelProps): import("react").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ export type ChatAccess = {
3
+ currentUserId: string;
4
+ isAvailable: (calendarId: string) => boolean;
5
+ canModerate: (calendarId: string) => boolean;
6
+ };
7
+ type ChatProviderProps = {
8
+ access: ChatAccess | undefined;
9
+ calendarIds: readonly string[];
10
+ children: ReactNode;
11
+ };
12
+ export declare function ChatProvider({ access, calendarIds, children }: ChatProviderProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
13
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { ChatKey } from '../../../utils/chat.js';
2
+ export declare function UnreadBadge({ chatKey }: {
3
+ chatKey: ChatKey;
4
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import type { ChatRepository } from '../../storage/index.js';
2
+ import { type ChatKey } from '../../../utils/chat.js';
3
+ export type ChatContextValue = {
4
+ repository: ChatRepository;
5
+ currentUserId: string;
6
+ isAvailable: (calendarId: string) => boolean;
7
+ canModerate: (calendarId: string) => boolean;
8
+ unread: ReadonlyMap<string, number>;
9
+ markOpen: (key: ChatKey) => void;
10
+ markClosed: (key: ChatKey) => void;
11
+ };
12
+ export declare const ChatContext: import("react").Context<ChatContextValue | null>;
13
+ export declare const useChatContext: () => ChatContextValue | null;
14
+ export declare const useUnreadCount: (key: ChatKey) => number;
@@ -0,0 +1,13 @@
1
+ import { type ChatKey, type ChatMessage } from '../../../utils/chat.js';
2
+ import type { ChatRepository } from '../../storage/index.js';
3
+ export declare function useChatMessages(repository: ChatRepository, chatKey: ChatKey, isActive: boolean): {
4
+ loadOlder: () => Promise<void>;
5
+ send: (text: string) => Promise<void>;
6
+ edit: (id: string, text: string) => Promise<void>;
7
+ remove: (id: string) => Promise<void>;
8
+ messages: ChatMessage[];
9
+ hasMore: boolean;
10
+ isLoading: boolean;
11
+ isOffline: boolean;
12
+ error: string | null;
13
+ };