@codecademy/gamut

68.2.268.2.3-alpha.794432.0
dist/DatePicker/Calendar/utils/dateGrid.d.ts
+dist/DatePicker/Calendar/utils/dateGrid.d.tsNew file
+38
Index: package/dist/DatePicker/Calendar/utils/dateGrid.d.ts
===================================================================
--- package/dist/DatePicker/Calendar/utils/dateGrid.d.ts
+++ package/dist/DatePicker/Calendar/utils/dateGrid.d.ts
@@ -0,0 +1,38 @@
+/**
+ * Builds a grid of days for a calendar month using native Date and Intl.
+ * Each row has 7 cells; leading/trailing cells may be null (padding from adjacent months).
+ */
+import type { IsoWeekday } from '../../utils/locale';
+/**
+ * Number of empty cells before the 1st of the month, for a grid whose first column is
+ * `firstWeekday` (ISO: 1 = Monday … 7 = Sunday from `Intl.Locale#getWeekInfo`).
+ */
+export declare const getWeekdayOffsetInGrid: (date: Date, firstWeekday: IsoWeekday) => number;
+/**
+ * Returns an array of weeks for the given month. Each week is an array of 7 items:
+ * each item is either a Date (that day) or null (padding from previous/next month).
+ *
+ * @param year - Full year (e.g. 2026)
+ * @param month - Month 0-11 (0 = January)
+ * @param firstWeekday - First day of the week for the calendar row (ISO 1–7, from `getWeekInfo().firstDay`)
+ */
+export declare const getMonthGrid: (year: number, month: number, firstWeekday: IsoWeekday) => (Date | null)[][];
+/**
+ * Check if two dates are the same calendar day (ignoring time).
+ */
+export declare const isSameDay: (a: Date | null, b: Date | null) => boolean;
+/**
+ * Check if `date` is between `start` and `end` (exclusive), ignoring time.
+ */
+export declare const isDateInRange: (date: Date, start: Date | null, end: Date | null) => boolean;
+/**
+ * Check if `date` is in the `disabledDates` list (by calendar day).
+ */
+export declare const isDateDisabled: (date: Date, disabledDates?: Date[]) => boolean;
+/** One visible day in the month grid with its row (for Home/End and keyboard nav). */
+export type DateWithRow = {
+    date: Date;
+    rowIndex: number;
+};
+/** Flat list of dates in grid order (row-major, non-null only) with row index for Home/End */
+export declare const getDatesWithRow: (weeks: (Date | null)[][]) => DateWithRow[];