@forgeroute/ui 0.4.10 → 0.4.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeroute/ui",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=22.0.0",
6
6
  "@angular/core": ">=22.0.0",
@@ -9141,6 +9141,8 @@ declare const WEEK_DAY_LABELS: string[];
9141
9141
  declare function toDateStr(d: Date): string;
9142
9142
  /** `YYYY-MM-DD` → local Date at midnight (ISO local form, parsed the same way in every browser). */
9143
9143
  declare function fromDateStr(dateStr: string): Date;
9144
+ /** True for a real calendar day written as `YYYY-MM-DD` (rejects `2026-02-30`, `2026-1-5`, non-ISO text). */
9145
+ declare function isValidDateStr(dateStr: string): boolean;
9144
9146
  /** The 42 cells (6 weeks, Sunday first) of the month grid containing `anchor`. */
9145
9147
  declare function buildMonthCells(anchor: Date, todayStr: string): CalendarDay[];
9146
9148
  /** The 7 days (Sunday first) of the week containing `anchor`. */
@@ -9214,6 +9216,8 @@ export interface CalendarItem {
9214
9216
  strike?: boolean;
9215
9217
  /** Screen-reader name of the item's button; defaults to "<time> <title>". */
9216
9218
  ariaLabel?: string;
9219
+ /** Hover text (native `title`) of the item's button. Month chips default to the title; week / agenda items show none unless set. */
9220
+ tooltip?: string;
9217
9221
  }
9218
9222
  export interface CalendarFilter {
9219
9223
  value: string;
@@ -9250,7 +9254,8 @@ export interface CalendarSlotClick {
9250
9254
  * `ToastService` messages.
9251
9255
  *
9252
9256
  * Keyboard: the month grid is a real ARIA grid whose DAY CELLS have one tab stop (roving tabindex): arrows move by day/week, Home/End jump
9253
- * to the start/end of the week, Enter/Space on a day creates (when `canCreate`); the item buttons inside the cells stay in the Tab order.
9257
+ * to the start/end of the week, PageUp/PageDown move by one month (Shift+PageUp/PageDown by one year; the day of the month is kept, clamped to
9258
+ * the target month), Enter/Space on a day creates (when `canCreate`); the item buttons inside the cells stay in the Tab order.
9254
9259
  * In the week view each all-day cell and each day column has a visually hidden "+ Add" button that appears when focused; Enter/Space on it
9255
9260
  * creates (all-day, or the first visible hour). The initial `view` must be one of `views`.
9256
9261
  *
@@ -9279,6 +9284,9 @@ export declare class CalendarComponent {
9279
9284
  readonly canCreate: import("@angular/core").InputSignal<boolean>;
9280
9285
  /** Days before today cannot start a new item. */
9281
9286
  readonly disablePast: import("@angular/core").InputSignal<boolean>;
9287
+ /** Overrides "today" (`YYYY-MM-DD`): the highlighted day, `disablePast`, the agenda "Today" badge and what the Today button jumps to.
9288
+ * Use it when the server's date, not the browser's, decides what today is. Null / invalid = the browser clock. */
9289
+ readonly today: import("@angular/core").InputSignal<string | null>;
9282
9290
  /** Items shown per month cell before "+N more". */
9283
9291
  readonly maxVisible: import("@angular/core").InputSignal<number>;
9284
9292
  /** `inline`: time and title on one line. `stacked`: time on the first line, title below it (title hidden on phones). */
@@ -9305,11 +9313,14 @@ export declare class CalendarComponent {
9305
9313
  protected readonly weekDayNames: string[];
9306
9314
  protected readonly skeletonCells: number[];
9307
9315
  protected readonly formatHour: typeof formatHour;
9308
- /** Today as `YYYY-MM-DD`; refreshed at local midnight, when the tab becomes visible again and when the user presses Today. */
9309
- protected readonly todayStr: import("@angular/core").WritableSignal<string>;
9316
+ /** The browser clock's today as `YYYY-MM-DD`; refreshed at local midnight, when the tab becomes visible again and when the user presses Today. */
9317
+ private readonly clockToday;
9318
+ /** Today as `YYYY-MM-DD`: the `today` input when it is a valid date, else the browser clock. */
9319
+ protected readonly todayStr: import("@angular/core").Signal<string>;
9310
9320
  /** The month-grid day that holds the roving tab stop. */
9311
9321
  protected readonly focusedDate: import("@angular/core").WritableSignal<string | null>;
9312
9322
  private lastRangeKey;
9323
+ private readonly injector;
9313
9324
  protected readonly hours: import("@angular/core").Signal<number[]>;
9314
9325
  protected readonly monthCells: import("@angular/core").Signal<CalendarDay[]>;
9315
9326
  protected readonly weekDays: import("@angular/core").Signal<CalendarDay[]>;
@@ -9369,6 +9380,8 @@ export declare class CalendarComponent {
9369
9380
  protected onDateClick(dateStr: string): void;
9370
9381
  /** Grid keys on a day cell: arrows / Home / End move the tab stop, Enter / Space create. Keys on the chips inside never reach here. */
9371
9382
  protected onCellKey(event: KeyboardEvent, dateStr: string): void;
9383
+ /** PageUp / PageDown: the same day `months` away (clamped to the target month's length) becomes the anchor, the tab stop and the focus. */
9384
+ private jumpMonths;
9372
9385
  /** The hidden "+ Add" button of an all-day cell (keyboard / screen-reader path to the same action as clicking the cell). */
9373
9386
  protected onAddAllDay(dateStr: string, event: Event): void;
9374
9387
  /** The hidden "+ Add" button of a day column: creates at the first visible hour. */
@@ -9438,6 +9451,11 @@ export declare class CalendarComponent {
9438
9451
  "required": false;
9439
9452
  "isSignal": true;
9440
9453
  };
9454
+ "today": {
9455
+ "alias": "today";
9456
+ "required": false;
9457
+ "isSignal": true;
9458
+ };
9441
9459
  "maxVisible": {
9442
9460
  "alias": "maxVisible";
9443
9461
  "required": false;