@memobit/libs 1.0.61 → 1.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -656,6 +656,12 @@ export declare interface ControlPanelFilter {
656
656
  * from the filter's value when omitted (selected option labels, the date
657
657
  * range, the typed text, ...). Pass `''` to hide the preview. */
658
658
  summary?: string;
659
+ /** Flows the option rows onto shared lines instead of stacking one per row,
660
+ * each sized to its own content. Worth it when the labels are short and of a
661
+ * predictable width — emoji, colours, single digits — where a row apiece turns
662
+ * a dozen options into a scroll. Defaults to stacked. Honored by the option
663
+ * list filters (`radio`, `boolean`, and a short single-select `dropdown`). */
664
+ inline?: boolean;
659
665
  }
660
666
 
661
667
  export declare interface ControlPanelFilterChangeEvent {
@@ -1081,6 +1087,35 @@ export declare interface DateRangePreset {
1081
1087
  days: number;
1082
1088
  }
1083
1089
 
1090
+ /**
1091
+ * A single day's events, listed in a modal. The month grid can only show a chip or
1092
+ * three per cell before it starts hiding them behind "+N more", and the chips are too
1093
+ * small to aim at on a phone — this is the way into a busy day.
1094
+ */
1095
+ export declare function DayAgenda<T>({ addLabel, className, date, defaultDurationMinutes, emptyLabel, events, isOpen, onAdd, onClose, onEventClick, renderEvent, }: DayAgendaProps<T>): JSX.Element;
1096
+
1097
+ export declare interface DayAgendaProps<T = unknown> {
1098
+ /** The day to list. Only the date part is read. */
1099
+ date: Date;
1100
+ /**
1101
+ * The same array the calendar is given — the day's events are picked out here, so the
1102
+ * caller never has to keep a second, pre-filtered copy in sync.
1103
+ */
1104
+ events: CalendarEvent<T>[];
1105
+ isOpen: boolean;
1106
+ onClose: () => void;
1107
+ onEventClick?: (event: CalendarEvent<T>) => void;
1108
+ /** Adds a footer button that hands back the day being listed. */
1109
+ onAdd?: (date: Date) => void;
1110
+ addLabel?: string;
1111
+ /** Replaces the title of a row. The time column and colour bar stay. */
1112
+ renderEvent?: (event: CalendarEvent<T>) => ReactNode;
1113
+ emptyLabel?: string;
1114
+ /** Assumed length of a timed event with no `end`, used for the row's time range. */
1115
+ defaultDurationMinutes?: number;
1116
+ className?: string;
1117
+ }
1118
+
1084
1119
  declare type DiffLang = 'javascript' | 'typescript' | 'jsx' | 'tsx' | 'css' | 'scss' | 'html' | 'json' | 'python' | 'bash' | 'plaintext';
1085
1120
 
1086
1121
  declare type DiffMode = 'split' | 'inline';
@@ -1263,7 +1298,7 @@ declare interface ErrorBoundaryState {
1263
1298
  error: Error | null;
1264
1299
  }
1265
1300
 
1266
- export declare function EventCalendar<T>({ className, date, dayEndHour, dayStartHour, defaultDurationMinutes, emptyLabel, events, firstDayOfWeek, headerExtra, hourHeight, maxEventsPerDay, onDateChange, onDayClick, onEventClick, onEventDrop, onViewChange, renderEvent, showHeader, view, }: EventCalendarProps<T>): JSX.Element;
1301
+ export declare function EventCalendar<T>({ className, date, dayAgenda, dayEndHour, dayStartHour, defaultDurationMinutes, emptyLabel, events, firstDayOfWeek, headerExtra, hourHeight, maxEventsPerDay, onDateChange, onDayClick, onEventClick, onEventDrop, onViewChange, renderEvent, showHeader, showWeekNumbers, view, }: EventCalendarProps<T>): JSX.Element;
1267
1302
 
1268
1303
  export declare interface EventCalendarProps<T = unknown> {
1269
1304
  events: CalendarEvent<T>[];
@@ -1274,6 +1309,8 @@ export declare interface EventCalendarProps<T = unknown> {
1274
1309
  date?: Date;
1275
1310
  onDateChange?: (date: Date) => void;
1276
1311
  firstDayOfWeek?: 0 | 1;
1312
+ /** Adds the ISO week number: a leading column in month view, a suffix on the week title. */
1313
+ showWeekNumbers?: boolean;
1277
1314
  onEventClick?: (event: CalendarEvent<T>) => void;
1278
1315
  /** Fires on the empty part of a day cell (month) or an hour slot (week). */
1279
1316
  onDayClick?: (date: Date) => void;
@@ -1285,6 +1322,13 @@ export declare interface EventCalendarProps<T = unknown> {
1285
1322
  renderEvent?: (event: CalendarEvent<T>) => ReactNode;
1286
1323
  /** Chips shown in a month cell before the rest collapse behind "+N more". */
1287
1324
  maxEventsPerDay?: number;
1325
+ /**
1326
+ * Routes a chip click, a "+N more" and a day number through a `DayAgenda` listing that
1327
+ * day instead of firing `onEventClick` straight away. `onEventClick` then fires from a
1328
+ * row inside the agenda, and `onDayClick` becomes its Add action. Aiming at a 16px chip
1329
+ * is the part that does not survive a phone, and a busy cell hides its events anyway.
1330
+ */
1331
+ dayAgenda?: boolean;
1288
1332
  showHeader?: boolean;
1289
1333
  /** Extra controls rendered in the header, between the title and the view switch. */
1290
1334
  headerExtra?: ReactNode;
@@ -1414,6 +1458,13 @@ export declare const getIndicatorColor: (bmi: number, ranges: BMIRange[]) => str
1414
1458
 
1415
1459
  export declare const getIndicatorPosition: (bmi: number, ranges: BMIRange[]) => number;
1416
1460
 
1461
+ /**
1462
+ * ISO-8601 week number (1-53). Weeks run Monday to Sunday and week 1 is the one
1463
+ * holding the first Thursday of the year, which is why the date is nudged to the
1464
+ * Thursday of its own week before the year is read.
1465
+ */
1466
+ export declare const getIsoWeek: (date: Date) => number;
1467
+
1417
1468
  /**
1418
1469
  * Generates a matrix of dates for calendar display
1419
1470
  * Returns a 2D array where each sub-array represents a week