@klinking/colander 3.0.1-alpha.1 → 3.1.0-alpha.10

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 (98) hide show
  1. package/dist/formats/date.cjs +2 -3
  2. package/dist/formats/date.d.cts +10 -14
  3. package/dist/formats/date.d.mts +10 -14
  4. package/dist/formats/date.mjs +2 -3
  5. package/dist/formats/object.cjs +2 -3
  6. package/dist/formats/object.d.cts +10 -14
  7. package/dist/formats/object.d.mts +10 -14
  8. package/dist/formats/object.mjs +2 -3
  9. package/dist/formats/plain-date-time.cjs +2 -3
  10. package/dist/formats/plain-date-time.d.cts +10 -14
  11. package/dist/formats/plain-date-time.d.mts +10 -14
  12. package/dist/formats/plain-date-time.mjs +2 -3
  13. package/dist/formats/plain-date.cjs +2 -3
  14. package/dist/formats/plain-date.d.cts +10 -14
  15. package/dist/formats/plain-date.d.mts +10 -14
  16. package/dist/formats/plain-date.mjs +2 -3
  17. package/dist/formats/plain-month-day.cjs +2 -3
  18. package/dist/formats/plain-month-day.d.cts +10 -14
  19. package/dist/formats/plain-month-day.d.mts +10 -14
  20. package/dist/formats/plain-month-day.mjs +2 -3
  21. package/dist/formats/plain-year-month.cjs +2 -3
  22. package/dist/formats/plain-year-month.d.cts +10 -14
  23. package/dist/formats/plain-year-month.d.mts +10 -14
  24. package/dist/formats/plain-year-month.mjs +2 -3
  25. package/dist/formats/zoned-date-time.cjs +2 -3
  26. package/dist/formats/zoned-date-time.d.cts +10 -14
  27. package/dist/formats/zoned-date-time.d.mts +10 -14
  28. package/dist/formats/zoned-date-time.mjs +2 -3
  29. package/dist/{weeks-view-context-CNAq2Hiu.d.cts → index-K1_zOIpa.d.mts} +198 -114
  30. package/dist/{weeks-view-context-CsP3PBiu.d.mts → index-bRoYX03d.d.cts} +198 -114
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.d.cts +2 -11
  33. package/dist/index.d.mts +2 -11
  34. package/dist/index.mjs +1 -2
  35. package/dist/{weeks-navigation-CJzhxbgj.cjs → weeks-navigation-3UTRiTUP.cjs} +1102 -952
  36. package/dist/{weeks-navigation-Bg0nZLgh.mjs → weeks-navigation-BoHqK5fq.mjs} +1102 -951
  37. package/package.json +21 -18
  38. package/src/calendar-provider.test.tsx +88 -1
  39. package/src/calendar-provider.tsx +89 -73
  40. package/src/calendar-types.ts +2 -0
  41. package/src/compute-weeks-in-window.test.ts +1 -1
  42. package/src/day-cell-state.test.ts +214 -0
  43. package/src/day-cell-state.ts +244 -0
  44. package/src/day-cell-store.test.tsx +273 -0
  45. package/src/day-cell-store.tsx +204 -0
  46. package/src/day-cell.test.tsx +73 -90
  47. package/src/day-cell.tsx +106 -444
  48. package/src/drag-handle.tsx +2 -2
  49. package/src/formats/date.ts +2 -0
  50. package/src/formats/formats.test.ts +1 -1
  51. package/src/formats/object.ts +2 -0
  52. package/src/formats/plain-date-time.ts +2 -0
  53. package/src/formats/plain-date.ts +2 -0
  54. package/src/formats/plain-month-day.ts +2 -0
  55. package/src/formats/plain-year-month.ts +2 -0
  56. package/src/formats/zoned-date-time.ts +2 -0
  57. package/src/grid-header.tsx +3 -3
  58. package/src/grid.event-perf.test.tsx +7 -1
  59. package/src/grid.perf.test.tsx +7 -1
  60. package/src/grid.tsx +38 -77
  61. package/src/index.ts +2 -0
  62. package/src/keyboard.test.ts +1 -1
  63. package/src/month-separator.test.tsx +1 -1
  64. package/src/month-view-navigation.ts +180 -0
  65. package/src/month-view-types.ts +3 -0
  66. package/src/month-view.bounds.test.tsx +136 -0
  67. package/src/month-view.test.tsx +89 -1
  68. package/src/month-view.tsx +74 -217
  69. package/src/month-window.test.ts +207 -0
  70. package/src/month-window.ts +93 -0
  71. package/src/navigation.tsx +18 -76
  72. package/src/out-of-range.test.ts +34 -54
  73. package/src/out-of-range.ts +47 -123
  74. package/src/range-preview.test.ts +120 -0
  75. package/src/range-preview.tsx +3 -5
  76. package/src/resolve-first-week.test.ts +1 -1
  77. package/src/root-selection.ts +99 -97
  78. package/src/selected-range.tsx +3 -5
  79. package/src/store.ts +72 -0
  80. package/src/today.test.tsx +105 -0
  81. package/src/types.ts +24 -1
  82. package/src/utils.bench.ts +158 -106
  83. package/src/utils.test.ts +26 -1
  84. package/src/utils.ts +40 -9
  85. package/src/view-context.test.tsx +126 -0
  86. package/src/view-context.ts +45 -0
  87. package/src/week-number.test.tsx +76 -0
  88. package/src/week-number.tsx +48 -19
  89. package/src/weeks-grid.tsx +20 -10
  90. package/src/weeks-keyboard.test.ts +1 -1
  91. package/src/weeks-navigation.tsx +15 -31
  92. package/src/weeks-view-state.ts +67 -101
  93. package/src/weeks-view-types.ts +4 -1
  94. package/src/weeks-view.bounds.test.tsx +246 -0
  95. package/src/weeks-view.test.tsx +116 -14
  96. package/src/weeks-view.tsx +24 -52
  97. package/src/weeks-window.test.ts +131 -0
  98. package/src/weeks-window.ts +102 -0
@@ -1,9 +1,5 @@
1
- import * as _$react from "react";
2
- import React$1 from "react";
3
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
1
  import { useRender } from "@base-ui/react/use-render";
5
-
6
- //#region ../node_modules/.pnpm/@js-temporal+polyfill@0.5.1/node_modules/@js-temporal/polyfill/index.d.ts
2
+ import React$1 from "react";
7
3
  declare namespace Temporal {
8
4
  export type ComparisonResult = -1 | 0 | 1;
9
5
  export type RoundingMode = 'ceil' | 'floor' | 'expand' | 'trunc' | 'halfCeil' | 'halfFloor' | 'halfExpand' | 'halfTrunc' | 'halfEven';
@@ -445,8 +441,10 @@ declare namespace Temporal {
445
441
  */
446
442
  export type TransitionDirection = 'next' | 'previous' | {
447
443
  direction: 'next' | 'previous';
448
- }; // Handle Intl.LocalesArgument regardless of whether the TS version has it yet
449
- type LocalesArgument = ConstructorParameters<typeof Intl$1.DateTimeFormat>[0]; // Provide a quick replacement for Intl.DurationFormatOptions if not in TS
444
+ };
445
+ // Handle Intl.LocalesArgument regardless of whether the TS version has it yet
446
+ type LocalesArgument = ConstructorParameters<typeof Intl$1.DateTimeFormat>[0];
447
+ // Provide a quick replacement for Intl.DurationFormatOptions if not in TS
450
448
  type DurationFormatOptions = typeof Intl$1 extends {
451
449
  DurationFormat: any;
452
450
  } ? ConstructorParameters<(typeof Intl$1)['DurationFormat']>[1] : Record<string, unknown>;
@@ -995,32 +993,30 @@ declare namespace Intl$1 {
995
993
  supportedLocalesOf(locales: string | string[], options?: globalThis.Intl.DateTimeFormatOptions): string[];
996
994
  };
997
995
  }
998
- //#endregion
999
- //#region src/context.d.ts
1000
996
  /** @internal Provides the days and index of the current week row to child components. */
1001
- declare const WeekDataContext: _$react.Context<{
997
+ declare const WeekDataContext: import("react").Context<{
1002
998
  days: Temporal.PlainDate[];
1003
- weekIndex: number; /** The year/month this week belongs to (for outsideMonth checks in multi-month). */
999
+ weekIndex: number;
1000
+ /** The year/month this week belongs to (for outsideMonth checks in multi-month). */
1004
1001
  gridMonth?: {
1005
1002
  year: number;
1006
1003
  month: number;
1007
- }; /** 1-based CSS grid row index for this week row (WeeksView only). */
1004
+ };
1005
+ /** 1-based CSS grid row index for this week row (WeeksView only). */
1008
1006
  gridRowIndex?: number;
1009
1007
  } | null>;
1010
1008
  /** Layout direction for the calendar grid. */
1011
1009
  type GridOrientation = "horizontal" | "vertical";
1012
1010
  /** @internal Provides the resolved grid orientation to descendant cells. */
1013
- declare const GridContext: _$react.Context<{
1011
+ declare const GridContext: import("react").Context<{
1014
1012
  orientation: GridOrientation;
1015
1013
  }>;
1016
1014
  /** @internal Provides the date and column index from a `DayCellTemplate` to its child `DayButton`. */
1017
- declare const DayCellDataContext: _$react.Context<{
1015
+ declare const DayCellDataContext: import("react").Context<{
1018
1016
  date: Temporal.PlainDate;
1019
1017
  columnIndex?: number | undefined;
1020
1018
  outsideDisabled?: boolean;
1021
1019
  } | null>;
1022
- //#endregion
1023
- //#region src/types.d.ts
1024
1020
  /** Day of the week represented as a number: `0` = Sunday through `6` = Saturday. */
1025
1021
  type WeekStartDay = 0 | 1 | 2 | 3 | 4 | 5 | 6;
1026
1022
  /**
@@ -1143,15 +1139,25 @@ interface MonthData {
1143
1139
  * use e.g. `selected?.toLocaleString(locale)` to display.
1144
1140
  */
1145
1141
  type RootState = {
1146
- /** `true` when at least one date is selected. */hasSelection: boolean; /** The primary selected date (the first committed date), or `undefined`. */
1147
- selected: Temporal.PlainDate | undefined; /** All currently selected dates (chronological in `multiple` mode). */
1148
- selectedDates: Temporal.PlainDate[]; /** Range start, or `undefined`. */
1149
- rangeStart: Temporal.PlainDate | undefined; /** Range end, or `undefined`. */
1150
- rangeEnd: Temporal.PlainDate | undefined; /** The currently focused `PlainDate` in the grid. */
1151
- focused: Temporal.PlainDate; /** The month/year currently being viewed. */
1152
- viewing: Temporal.PlainYearMonth; /** Resolved IANA time zone. */
1153
- timeZone: string; /** Resolved BCP 47 locale. */
1154
- locale: string; /** Whether the calendar is read-only. */
1142
+ /** `true` when at least one date is selected. */
1143
+ hasSelection: boolean;
1144
+ /** The primary selected date (the first committed date), or `undefined`. */
1145
+ selected: Temporal.PlainDate | undefined;
1146
+ /** All currently selected dates (chronological in `multiple` mode). */
1147
+ selectedDates: Temporal.PlainDate[];
1148
+ /** Range start, or `undefined`. */
1149
+ rangeStart: Temporal.PlainDate | undefined;
1150
+ /** Range end, or `undefined`. */
1151
+ rangeEnd: Temporal.PlainDate | undefined;
1152
+ /** The currently focused `PlainDate` in the grid. */
1153
+ focused: Temporal.PlainDate;
1154
+ /** The month/year currently being viewed. */
1155
+ viewing: Temporal.PlainYearMonth;
1156
+ /** Resolved IANA time zone. */
1157
+ timeZone: string;
1158
+ /** Resolved BCP 47 locale. */
1159
+ locale: string;
1160
+ /** Whether the calendar is read-only. */
1155
1161
  readOnly: boolean;
1156
1162
  };
1157
1163
  /**
@@ -1270,7 +1276,8 @@ type GridProps = useRender.ComponentProps<"table", GridState> & GridOwnProps;
1270
1276
  /** State exposed by the `WeekTemplate` component. */
1271
1277
  type WeekTemplateState = {
1272
1278
  root: RootState;
1273
- weekIndex: number; /** 1-based CSS grid row index for this week row (WeeksView only, undefined in MonthView). */
1279
+ weekIndex: number;
1280
+ /** 1-based CSS grid row index for this week row (WeeksView only, undefined in MonthView). */
1274
1281
  gridRowIndex: number | undefined;
1275
1282
  };
1276
1283
  /** Full props for the `WeekTemplate` component. */
@@ -1289,19 +1296,32 @@ type DayCellTemplateState = {
1289
1296
  focused: boolean;
1290
1297
  rangeStart: boolean;
1291
1298
  rangeEnd: boolean;
1292
- rangeBoundary: boolean; /** Whether this cell is within the committed range. */
1293
- inRange: boolean; /** 0-based index of this cell within the committed range, or `false` if not in range. */
1294
- rangeIndex: number | false; /** Total number of days in the committed range, or `false` if not in range. */
1295
- rangeLength: number | false; /** Whether the committed range has a defined start boundary. */
1296
- rangeHasStart: boolean; /** Whether the committed range has a defined end boundary. */
1297
- rangeHasEnd: boolean; /** Whether this cell is the start of the hover preview range. */
1298
- rangePreviewStart: boolean; /** Whether this cell is the end of the hover preview range. */
1299
- rangePreviewEnd: boolean; /** Whether this cell is a boundary of the hover preview range. */
1300
- rangePreviewBoundary: boolean; /** Whether this cell is within the hover preview range. */
1301
- rangePreviewInRange: boolean; /** 0-based index of this cell within the preview range, or `false` if not in preview range. */
1302
- rangePreviewIndex: number | false; /** Total number of days in the preview range, or `false` if not in preview range. */
1303
- rangePreviewLength: number | false; /** Whether the preview range has a defined start boundary. */
1304
- rangePreviewHasStart: boolean; /** Whether the preview range has a defined end boundary. */
1299
+ rangeBoundary: boolean;
1300
+ /** Whether this cell is within the committed range. */
1301
+ inRange: boolean;
1302
+ /** 0-based index of this cell within the committed range, or `false` if not in range. */
1303
+ rangeIndex: number | false;
1304
+ /** Total number of days in the committed range, or `false` if not in range. */
1305
+ rangeLength: number | false;
1306
+ /** Whether the committed range has a defined start boundary. */
1307
+ rangeHasStart: boolean;
1308
+ /** Whether the committed range has a defined end boundary. */
1309
+ rangeHasEnd: boolean;
1310
+ /** Whether this cell is the start of the hover preview range. */
1311
+ rangePreviewStart: boolean;
1312
+ /** Whether this cell is the end of the hover preview range. */
1313
+ rangePreviewEnd: boolean;
1314
+ /** Whether this cell is a boundary of the hover preview range. */
1315
+ rangePreviewBoundary: boolean;
1316
+ /** Whether this cell is within the hover preview range. */
1317
+ rangePreviewInRange: boolean;
1318
+ /** 0-based index of this cell within the preview range, or `false` if not in preview range. */
1319
+ rangePreviewIndex: number | false;
1320
+ /** Total number of days in the preview range, or `false` if not in preview range. */
1321
+ rangePreviewLength: number | false;
1322
+ /** Whether the preview range has a defined start boundary. */
1323
+ rangePreviewHasStart: boolean;
1324
+ /** Whether the preview range has a defined end boundary. */
1305
1325
  rangePreviewHasEnd: boolean;
1306
1326
  };
1307
1327
  /** State exposed by the `DayButton` component (same as `DayCellTemplateState`). */
@@ -1369,16 +1389,31 @@ type WeekNumberCellState = {
1369
1389
  root: RootState;
1370
1390
  weekNumber: number;
1371
1391
  };
1392
+ /**
1393
+ * Computes the week number displayed by a `WeekNumberCell`.
1394
+ *
1395
+ * @param weekDays - The dates of the week row, in display order.
1396
+ * @param temporal - The Temporal namespace in use by the calendar.
1397
+ * @returns The week number to display.
1398
+ */
1399
+ type WeekNumberStrategy = (weekDays: Temporal.PlainDate[], temporal: TemporalNamespace) => number;
1400
+ /** Own props for the `WeekNumberCell` component. */
1401
+ interface WeekNumberCellOwnProps {
1402
+ /**
1403
+ * Custom week-numbering strategy. When omitted, week numbers follow
1404
+ * ISO 8601 (generalized to the week's midpoint day for calendars whose
1405
+ * weeks are not 7 days). See {@link WeekNumberCell} for details.
1406
+ */
1407
+ getWeekNumber?: WeekNumberStrategy;
1408
+ }
1372
1409
  /** Full props for the `WeekNumberCell` component. */
1373
- type WeekNumberCellProps = useRender.ComponentProps<"td", WeekNumberCellState>;
1410
+ type WeekNumberCellProps = useRender.ComponentProps<"td", WeekNumberCellState> & WeekNumberCellOwnProps;
1374
1411
  /** State exposed by the `WeekNumberHeader` component. */
1375
1412
  type WeekNumberHeaderState = {
1376
1413
  root: RootState;
1377
1414
  };
1378
1415
  /** Full props for the `WeekNumberHeader` component. */
1379
1416
  type WeekNumberHeaderProps = useRender.ComponentProps<"th", WeekNumberHeaderState>;
1380
- //#endregion
1381
- //#region src/calendar-types.d.ts
1382
1417
  interface CalendarProviderPropsBase<F extends ValueFormat = ValueFormat> {
1383
1418
  /**
1384
1419
  * The value format used for date serialization. Determines the type of
@@ -1505,6 +1540,8 @@ interface CalendarStableContextValue {
1505
1540
  maxValue?: Temporal.PlainDate;
1506
1541
  /** Resolved IANA time zone. */
1507
1542
  timeZone: string;
1543
+ /** Today's date in the resolved {@link timeZone}. Reads the clock on every call. */
1544
+ today: () => Temporal.PlainDate;
1508
1545
  /** Resolved BCP 47 locale. */
1509
1546
  locale: string;
1510
1547
  /** Resolved Temporal namespace. */
@@ -1543,8 +1580,11 @@ interface CalendarStateContextValue {
1543
1580
  */
1544
1581
  baseRootState: BaseRootState;
1545
1582
  }
1546
- //#endregion
1547
- //#region src/out-of-range.d.ts
1583
+ /**
1584
+ * Provides shared calendar state (selection, config, range preview) to all
1585
+ * descendant view components. Does NOT manage focus, navigation, or grid data.
1586
+ */
1587
+ declare function CalendarProvider<F extends ValueFormat = "PlainDate">(props: CalendarProviderProps<F>): import("react").JSX.Element;
1548
1588
  /**
1549
1589
  * Controls how a {@link WeeksView} window behaves when navigation would move it
1550
1590
  * past the `min`/`max` bounds.
@@ -1556,7 +1596,8 @@ interface CalendarStateContextValue {
1556
1596
  * - `"unbounded"` — Navigation is never restricted by `min`/`max`; any range of
1557
1597
  * weeks can be viewed. Out-of-range days simply render disabled. (Default.)
1558
1598
  * - `"stop"` — Navigation halts at the boundary: the Prev/Next button is
1559
- * disabled once the next step would show a window containing no in-range day.
1599
+ * disabled, and `goNext`/`goPrev`/`scrollToWeek` and keyboard paging do
1600
+ * nothing, once the next step would show a window containing no in-range day.
1560
1601
  * - `"stop-shrink"` — Like `"stop"`, but near the edge the window **shrinks** to
1561
1602
  * fewer week rows instead of showing rows that are entirely out of range.
1562
1603
  * - `"snap"` — A jump that would overshoot **snaps** the window so its edge
@@ -1564,6 +1605,8 @@ interface CalendarStateContextValue {
1564
1605
  * - `"snap-shrink"` — Snap to the boundary, then **shrink** the window to just
1565
1606
  * the in-range weeks.
1566
1607
  *
1608
+ * A single bound (`min` only or `max` only) is honored; the missing side is unlimited.
1609
+ *
1567
1610
  * `"snap"` and `"snap-shrink"` are identical **unless the selectable range spans
1568
1611
  * fewer weeks than `weekCount`** — i.e. the window is taller than the range.
1569
1612
  * Snapping can only pin *one* edge to a bound; if the range is narrower than the
@@ -1593,8 +1636,31 @@ type OutOfRangeBehavior = "unbounded" | "stop" | "stop-shrink" | "snap" | "snap-
1593
1636
  * {@link OutOfRangeBehavior} offers for WeeksView's flexible window don't apply.
1594
1637
  */
1595
1638
  type MonthOutOfRangeBehavior = "unbounded" | "stop";
1596
- //#endregion
1597
- //#region src/month-view-types.d.ts
1639
+ /** An ISO year + month. */
1640
+ interface MonthRef {
1641
+ year: number;
1642
+ month: number;
1643
+ }
1644
+ /** One step of the visible month window. */
1645
+ interface MonthStep {
1646
+ /** The window's first month after the step. */
1647
+ start: MonthRef;
1648
+ /** The month that enters view (before the window for `prev`, after it for `next`). */
1649
+ entering: MonthRef;
1650
+ /** First day of `start`, the focus target when focus isn't already in `start`. */
1651
+ firstDay: Temporal.PlainDate;
1652
+ /** Whether `stop` forbids the step because `entering` lies beyond `min`/`max`. */
1653
+ blocked: boolean;
1654
+ }
1655
+ /** The one seam for moving the MonthView window. */
1656
+ interface MonthWindowPolicy {
1657
+ /** Steps the window one month towards `direction`. */
1658
+ step(start: MonthRef, direction: "prev" | "next"): MonthStep;
1659
+ /** Whether `target` is inside the window starting at `start`. */
1660
+ isVisible(start: MonthRef, target: MonthRef): boolean;
1661
+ /** The window start that reveals `target` with the smallest shift. */
1662
+ reveal(start: MonthRef, target: MonthRef): MonthRef;
1663
+ }
1598
1664
  /** Props accepted by `MonthView.Root`. */
1599
1665
  interface MonthViewRootProps {
1600
1666
  /**
@@ -1655,6 +1721,8 @@ interface MonthViewStableContextValue {
1655
1721
  outsideDays: OutsideDays;
1656
1722
  /** How month navigation behaves at bounds. */
1657
1723
  outOfRangeBehavior: MonthOutOfRangeBehavior;
1724
+ /** Steps and reveals the visible month window. */
1725
+ windowPolicy: MonthWindowPolicy;
1658
1726
  /** Navigate to the next month(s). */
1659
1727
  goNextMonth: () => void;
1660
1728
  /** Navigate to the previous month(s). */
@@ -1682,16 +1750,12 @@ interface MonthViewStateContextValue {
1682
1750
  /** The root component's state object for render functions. */
1683
1751
  rootState: RootState;
1684
1752
  }
1685
- //#endregion
1686
- //#region src/month-view.d.ts
1687
- declare function MonthViewRoot(props: MonthViewRootProps): _$react_jsx_runtime0.JSX.Element;
1753
+ declare function MonthViewRoot(props: MonthViewRootProps): import("react").JSX.Element;
1688
1754
  type MonthViewProps<F extends ValueFormat = "PlainDate"> = CalendarProviderProps<F> & MonthViewRootProps;
1689
- declare function MonthView<F extends ValueFormat = "PlainDate">(props: MonthViewProps<F>): _$react_jsx_runtime0.JSX.Element;
1755
+ declare function MonthView<F extends ValueFormat = "PlainDate">(props: MonthViewProps<F>): import("react").JSX.Element;
1690
1756
  declare namespace MonthView {
1691
- var Root: typeof MonthViewRoot;
1757
+ export { MonthViewRoot as Root };
1692
1758
  }
1693
- //#endregion
1694
- //#region src/grid-header.d.ts
1695
1759
  /**
1696
1760
  * Renders weekday column headers (`<th>`). When no `index` is provided,
1697
1761
  * renders all 7 days (Sunday–Saturday). Each cell includes `abbr` and
@@ -1700,8 +1764,6 @@ declare namespace MonthView {
1700
1764
  declare const GridHeaderCell: (props: GridHeaderCellProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
1701
1765
  /** Table header section (`<thead>`) wrapping a row of {@link GridHeaderCell}s. */
1702
1766
  declare const GridHeader: (props: GridHeaderProps & React.RefAttributes<HTMLTableSectionElement>) => React.ReactElement | null;
1703
- //#endregion
1704
- //#region src/day-cell.d.ts
1705
1767
  /**
1706
1768
  * Renders one `<td role="gridcell">` per day. Exposes data-attributes for
1707
1769
  * `selected`, `today`, `disabled`, `outside-month`, `focused`,
@@ -1710,23 +1772,15 @@ declare const GridHeader: (props: GridHeaderProps & React.RefAttributes<HTMLTabl
1710
1772
  * When used inside a {@link WeekTemplate}, iterates over that week's days.
1711
1773
  * An explicit `date` prop renders a single cell.
1712
1774
  */
1713
- declare function DayCellTemplate(props: DayCellTemplateProps): _$react_jsx_runtime0.JSX.Element;
1714
- declare const DayButton: (props: DayButtonProps & {
1715
- _derivedState?: DayCellTemplateState & {
1716
- isTabTarget: boolean;
1717
- };
1718
- } & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
1719
- //#endregion
1720
- //#region src/grid.d.ts
1775
+ declare function DayCellTemplate(props: DayCellTemplateProps): import("react").JSX.Element;
1776
+ declare const DayButton: (props: DayButtonProps & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
1721
1777
  declare const Grid: (props: GridProps & React.RefAttributes<HTMLTableElement>) => React.ReactElement | null;
1722
1778
  declare const GridBody: (props: GridBodyProps & React.RefAttributes<HTMLTableSectionElement>) => React.ReactElement | null;
1723
1779
  /**
1724
1780
  * Iterates over the weeks in the current month and renders one `<tr>` per week.
1725
1781
  * Each instance receives its week's days and index via {@link WeekDataContext}.
1726
1782
  */
1727
- declare function WeekTemplate(props: WeekTemplateProps): _$react_jsx_runtime0.JSX.Element;
1728
- //#endregion
1729
- //#region src/navigation.d.ts
1783
+ declare function WeekTemplate(props: WeekTemplateProps): import("react").JSX.Element;
1730
1784
  /**
1731
1785
  * Displays the currently selected (or current) date as localized text.
1732
1786
  * Renders a `<span>` with `aria-live="polite"`.
@@ -1761,8 +1815,6 @@ declare const PrevMonthButton: (props: PrevMonthButtonProps & React.RefAttribute
1761
1815
  * when the next month falls after `max`. Exposes `data-direction="next"`.
1762
1816
  */
1763
1817
  declare const NextMonthButton: (props: NextMonthButtonProps & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
1764
- //#endregion
1765
- //#region src/selected-range.d.ts
1766
1818
  /**
1767
1819
  * Visual overlay (`<td role="presentation">`) that highlights the selected
1768
1820
  * date range within a single week row. Exposes data-attributes for
@@ -1770,8 +1822,6 @@ declare const NextMonthButton: (props: NextMonthButtonProps & React.RefAttribute
1770
1822
  * `end-date`, `extends-before`, and `extends-after`.
1771
1823
  */
1772
1824
  declare const RangeSelected: (props: RangeSelectedProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
1773
- //#endregion
1774
- //#region src/range-preview.d.ts
1775
1825
  /**
1776
1826
  * Visual overlay (`<td role="presentation">`) that highlights the hover
1777
1827
  * preview range within a single week row. Structurally identical to
@@ -1779,25 +1829,37 @@ declare const RangeSelected: (props: RangeSelectedProps & React.RefAttributes<HT
1779
1829
  * the committed range boundaries.
1780
1830
  */
1781
1831
  declare const RangePreview: (props: RangePreviewProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
1782
- //#endregion
1783
- //#region src/drag-handle.d.ts
1784
1832
  /** Convenience wrapper for {@link RangeDragHandle} with `edge="start"`. */
1785
1833
  declare const RangeStartDragHandle: (props: RangeStartDragHandleProps & React.RefAttributes<HTMLSpanElement>) => React.ReactElement | null;
1786
1834
  /** Convenience wrapper for {@link RangeDragHandle} with `edge="end"`. */
1787
1835
  declare const RangeEndDragHandle: (props: RangeEndDragHandleProps & React.RefAttributes<HTMLSpanElement>) => React.ReactElement | null;
1788
- //#endregion
1789
- //#region src/week-number.d.ts
1790
1836
  /**
1791
- * Renders the ISO 8601 week number for a week row. Must be used inside
1792
- * a {@link WeekTemplate}. Renders a `<td>` with `role="rowheader"`.
1837
+ * Renders the week number for a week row. Must be used inside a
1838
+ * {@link WeekTemplate}. Renders a `<td>` with `role="rowheader"`.
1839
+ *
1840
+ * ## Week numbering
1841
+ *
1842
+ * By default, week numbers follow ISO 8601: a week belongs to the year that
1843
+ * contains the majority of its days, which is the year containing the week's
1844
+ * midpoint day (Thursday for a Monday–Sunday 7-day week), and week 1 is the
1845
+ * week containing the year's first midpoint day (equivalently, January 4).
1846
+ * This holds regardless of which day the displayed week row starts on.
1847
+ *
1848
+ * For calendars whose weeks are not 7 days, the default generalizes the same
1849
+ * rule: the midpoint is day ⌈N/2⌉ of an N-day week and the week-1 anchor is
1850
+ * January (N − ⌈N/2⌉ + 1). Note that no standard defines week numbering for
1851
+ * such calendars, so the default is a best-effort extrapolation.
1852
+ *
1853
+ * Pass `getWeekNumber` to override the numbering entirely (e.g. US-style
1854
+ * numbering where week 1 contains January 1, or fiscal-year weeks). It
1855
+ * receives the week row's dates in display order plus the calendar's
1856
+ * Temporal namespace, and must return the number to display.
1793
1857
  */
1794
1858
  declare const WeekNumberCell: (props: WeekNumberCellProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
1795
1859
  /**
1796
1860
  * Column header for the week number column. Renders a `<th scope="col">`.
1797
1861
  */
1798
1862
  declare const WeekNumberHeader: (props: WeekNumberHeaderProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
1799
- //#endregion
1800
- //#region src/resolve-first-week.d.ts
1801
1863
  /**
1802
1864
  * A flexible specifier for a calendar week. Accepts a `Temporal.PlainDate`,
1803
1865
  * a native `Date`, an ISO week number, a week-of-year, or a month/day pair.
@@ -1838,8 +1900,6 @@ declare function resolveFirstWeekSpec(spec: FirstWeekSpec, weekStartDay: WeekSta
1838
1900
  declare function resolveFirstWeek(currentFirstWeek: Temporal.PlainDate, weekCount: number, target: Temporal.PlainDate, options?: {
1839
1901
  snap?: ScrollToWeekSnap;
1840
1902
  }): Temporal.PlainDate;
1841
- //#endregion
1842
- //#region src/compute-weeks-in-window.d.ts
1843
1903
  interface WeekDescriptor {
1844
1904
  startDate: Temporal.PlainDate;
1845
1905
  endDate: Temporal.PlainDate;
@@ -1852,8 +1912,30 @@ interface WeekDescriptor {
1852
1912
  * `firstWeek` is snapped back to the nearest `weekStartDay`.
1853
1913
  */
1854
1914
  declare function computeWeeksInWindow(firstWeek: Temporal.PlainDate, weekCount: number, weekStartDay: WeekStartDay, _T: TemporalNamespace): WeekDescriptor[];
1855
- //#endregion
1856
- //#region src/weeks-view-types.d.ts
1915
+ /** A window as shown: its first week and how many rows it has (≤ the prop). */
1916
+ interface EffectiveWindow {
1917
+ firstWeek: Temporal.PlainDate;
1918
+ weekCount: number;
1919
+ }
1920
+ /**
1921
+ * The rules for where a WeeksView window may sit. Built once from the bounds and
1922
+ * shared by every way of moving the window (buttons, keyboard, `scrollToWeek`).
1923
+ */
1924
+ interface WeekWindowPolicy {
1925
+ /** The window that is shown for a requested first week. Never refuses. */
1926
+ resolve(requestedFirstWeek: Temporal.PlainDate): EffectiveWindow;
1927
+ /**
1928
+ * The window to move to for a requested first week, or `null` when the
1929
+ * behavior forbids the move (`stop`/`stop-shrink` with no in-range day in it).
1930
+ */
1931
+ moveTo(requestedFirstWeek: Temporal.PlainDate): EffectiveWindow | null;
1932
+ /**
1933
+ * Moves by `shiftBy` weeks (default: the rows currently shown) from the
1934
+ * window as shown. `null` when the move is forbidden or would not change
1935
+ * the window (`snap` already at the edge).
1936
+ */
1937
+ shift(current: EffectiveWindow, direction: 1 | -1, shiftBy?: number): EffectiveWindow | null;
1938
+ }
1857
1939
  /** Props accepted by `WeeksView.Root`. */
1858
1940
  interface WeeksViewRootProps {
1859
1941
  /** Number of week rows to display simultaneously. */
@@ -1903,7 +1985,7 @@ interface WindowInfo {
1903
1985
  windowStart: Temporal.PlainDate;
1904
1986
  /** The last date of the visible window. */
1905
1987
  windowEnd: Temporal.PlainDate;
1906
- /** Number of week rows in the window (the prop value, not actual when shrunk). */
1988
+ /** Number of week rows actually shown (fewer than the `weekCount` prop when shrunk). */
1907
1989
  weekCount: number;
1908
1990
  /** Total number of calendar days in the window. */
1909
1991
  dayCount: number;
@@ -1922,6 +2004,8 @@ interface WeeksViewStableContextValue {
1922
2004
  scrollBy: "row" | "page";
1923
2005
  /** How navigation behaves at bounds. */
1924
2006
  outOfRangeBehavior: OutOfRangeBehavior;
2007
+ /** Where the window may sit given `min`/`max` and `outOfRangeBehavior`. */
2008
+ windowPolicy: WeekWindowPolicy;
1925
2009
  /** Navigate to the next week(s). Optionally override the shift amount (in weeks). */
1926
2010
  goNext: (shiftBy?: number) => void;
1927
2011
  /** Navigate to the previous week(s). Optionally override the shift amount (in weeks). */
@@ -1950,8 +2034,6 @@ interface WeeksViewStateContextValue {
1950
2034
  /** Render-prop `RootState` exposed to components inside WeeksView. */
1951
2035
  rootState: RootState;
1952
2036
  }
1953
- //#endregion
1954
- //#region src/weeks-view.d.ts
1955
2037
  /** Imperative handle exposed by WeeksView.Root via ref. */
1956
2038
  interface WeeksViewRootHandle {
1957
2039
  scrollToWeek: (target: FirstWeekSpec, options?: {
@@ -1964,8 +2046,6 @@ declare const WeeksView: WeeksViewComponent;
1964
2046
  interface WeeksViewComponent extends React$1.ForwardRefExoticComponent<WeeksViewProps & React$1.RefAttributes<WeeksViewRootHandle>> {
1965
2047
  Root: typeof WeeksViewRoot;
1966
2048
  }
1967
- //#endregion
1968
- //#region src/weeks-navigation.d.ts
1969
2049
  /** State exposed by `PrevWeeksButton` and `NextWeeksButton`. */
1970
2050
  type WeeksNavButtonState = {
1971
2051
  root: RootState;
@@ -2005,33 +2085,42 @@ declare const NextWeeksButton: React$1.ForwardRefExoticComponent<Omit<NextWeeksB
2005
2085
  * out-of-range modes where the actual count may be less than the `weekCount` prop.
2006
2086
  */
2007
2087
  declare const WeekCount: React$1.ForwardRefExoticComponent<Omit<WeekCountProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
2008
- //#endregion
2009
- //#region src/month-separator.d.ts
2010
2088
  /** State exposed by the MonthSeparator component and its children. */
2011
2089
  type MonthSeparatorState = {
2012
- /** Calendar month (1-12). */month: number; /** Calendar year. */
2013
- year: number; /** True when this is the first month of a new year in the visible window. */
2014
- firstOfYear: boolean; /** True for the separator at the top of the visible window. */
2015
- firstVisible: boolean; /** Number of weeks of the previous month visible above this separator. */
2016
- weeksVisibleBefore: number; /** Number of weeks of this month visible below this separator. */
2090
+ /** Calendar month (1-12). */
2091
+ month: number;
2092
+ /** Calendar year. */
2093
+ year: number;
2094
+ /** True when this is the first month of a new year in the visible window. */
2095
+ firstOfYear: boolean;
2096
+ /** True for the separator at the top of the visible window. */
2097
+ firstVisible: boolean;
2098
+ /** Number of weeks of the previous month visible above this separator. */
2099
+ weeksVisibleBefore: number;
2100
+ /** Number of weeks of this month visible below this separator. */
2017
2101
  weeksVisibleAfter: number;
2018
2102
  /**
2019
2103
  * 0-based column index where the 1st of the month falls within the week row.
2020
2104
  * Accounts for week number column if present (column 0 = week number).
2021
2105
  */
2022
- firstDayColumn: number; /** Total number of columns (7 days + optional week number column). */
2023
- totalColumns: number; /** True when the 1st day of this month is visible in the weeks below. */
2106
+ firstDayColumn: number;
2107
+ /** Total number of columns (7 days + optional week number column). */
2108
+ totalColumns: number;
2109
+ /** True when the 1st day of this month is visible in the weeks below. */
2024
2110
  firstDayVisible: boolean;
2025
2111
  /**
2026
2112
  * Number of week rows between this separator and the next separator
2027
2113
  * (or end of window). Use this for CSS grid `gridRow: span N` to
2028
2114
  * avoid overlapping the next month's label.
2029
2115
  */
2030
- fullWeeksVisibleAfter: number; /** 1-based grid row index where this separator's weeks start. */
2116
+ fullWeeksVisibleAfter: number;
2117
+ /** 1-based grid row index where this separator's weeks start. */
2031
2118
  gridRowStart: number;
2032
2119
  };
2033
2120
  type MonthChildProps = useRender.ComponentProps<"span", MonthSeparatorState> & {
2034
- /** BCP 47 locale(s) for month name formatting. @default "en-US" */locale?: string; /** Month name format. @default "long" */
2121
+ /** BCP 47 locale(s) for month name formatting. @default "en-US" */
2122
+ locale?: string;
2123
+ /** Month name format. @default "long" */
2035
2124
  format?: "long" | "short" | "narrow";
2036
2125
  };
2037
2126
  declare const MonthSeparatorMonth: React$1.ForwardRefExoticComponent<Omit<MonthChildProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
@@ -2052,28 +2141,26 @@ type MonthSeparatorProps = useRender.ComponentProps<"tr", MonthSeparatorState>;
2052
2141
  * Default children: `<Month /> <Year />`.
2053
2142
  */
2054
2143
  declare const MonthSeparator: React$1.ForwardRefExoticComponent<Omit<MonthSeparatorProps, "ref"> & React$1.RefAttributes<HTMLTableRowElement>>;
2055
- //#endregion
2056
- //#region src/root-selection.d.ts
2057
2144
  /**
2058
2145
  * Pure utility that computes the preview range for a hovered date, using the
2059
- * same logic as the internal hook. Useful for deriving the preview in an
2060
- * `onHoveredDateChange` handler without needing a controlled `previewRange`.
2146
+ * same logic as the built-in hover preview. Useful for deriving the preview in
2147
+ * an `onHoveredDateChange` handler without needing a controlled `previewRange`.
2148
+ *
2149
+ * Pass `options.isDateDisabled` and `options.readOnly` to match a calendar that
2150
+ * disables dates or is read-only; by default every date is selectable.
2061
2151
  */
2062
- declare function computePreviewRange(hoveredDate: Temporal.PlainDate, currentRange: DateRange | null, rangeMode: RangeMode, preventRangeReversal?: boolean, T?: TemporalNamespace): DateRange<"PlainDate"> | null;
2063
- //#endregion
2064
- //#region src/calendar-context.d.ts
2152
+ declare function computePreviewRange(hoveredDate: Temporal.PlainDate, currentRange: DateRange | null, rangeMode: RangeMode, preventRangeReversal?: boolean, T?: TemporalNamespace, options?: {
2153
+ isDateDisabled?: (date: Temporal.PlainDate) => boolean;
2154
+ readOnly?: boolean;
2155
+ }): DateRange<"PlainDate"> | null;
2065
2156
  /** Returns the stable (callbacks/config) part of CalendarProvider context. */
2066
2157
  declare function useCalendarStable(): CalendarStableContextValue;
2067
2158
  /** Returns the volatile state part of CalendarProvider context. */
2068
2159
  declare function useCalendarState(): CalendarStateContextValue;
2069
- //#endregion
2070
- //#region src/month-view-context.d.ts
2071
2160
  /** Returns the MonthView stable context (config + callbacks). */
2072
2161
  declare function useMonthViewStable(): MonthViewStableContextValue;
2073
2162
  /** Returns the MonthView state context (volatile grid data). */
2074
2163
  declare function useMonthViewState(): MonthViewStateContextValue;
2075
- //#endregion
2076
- //#region src/view-context.d.ts
2077
2164
  /** Shared context provided by both MonthView.Root and WeeksView.Root. */
2078
2165
  interface ViewContextValue {
2079
2166
  /** Which view type is active. */
@@ -2091,11 +2178,8 @@ interface ViewContextValue {
2091
2178
  }
2092
2179
  /** Returns the nearest view context (MonthView or WeeksView). */
2093
2180
  declare function useViewContext(): ViewContextValue;
2094
- //#endregion
2095
- //#region src/weeks-view-context.d.ts
2096
2181
  /** Returns the WeeksView stable context (config + callbacks). */
2097
2182
  declare function useWeeksViewStable(): WeeksViewStableContextValue;
2098
2183
  /** Returns the WeeksView state context (volatile grid data). */
2099
2184
  declare function useWeeksViewState(): WeeksViewStateContextValue;
2100
- //#endregion
2101
- export { GridBody as $, TimeStringState as $t, VisibleMonth as A, GridHeaderProps as At, resolveFirstWeekSpec as B, PlainDateObject as Bt, WeekCountState as C, DayCellTemplateState as Ct, WeeksViewProps as D, GridBodyState as Dt, WeeksView as E, GridBodyProps as Et, WeekDescriptor as F, MonthYearStringProps as Ft, RangePreview as G, RangePreviewState as Gt, WeekNumberHeader as H, RangeEndDragHandleProps as Ht, computeWeeksInWindow as I, MonthYearStringState as It, MonthYearString as J, RangeStartDragHandleProps as Jt, RangeSelected as K, RangeSelectedProps as Kt, FirstWeekSpec as L, NavButtonState as Lt, WeeksViewStableContextValue as M, GridProps as Mt, WeeksViewStateContextValue as N, GridState as Nt, WeeksViewRoot as O, GridHeaderCellProps as Ot, WindowInfo as P, MonthData as Pt, Grid as Q, TimeStringProps as Qt, ScrollToWeekSnap as R, NextMonthButtonProps as Rt, WeekCountProps as S, DayCellTemplateProps as St, WeeksNavButtonState as T, DragHandleState as Tt, RangeEndDragHandle as U, RangeMode as Ut, WeekNumberCell as V, PrevMonthButtonProps as Vt, RangeStartDragHandle as W, RangePreviewProps as Wt, PrevMonthButton as X, RootState as Xt, NextMonthButton as Y, RawValueForFormat as Yt, TimeString as Z, TemporalNamespace as Zt, NextWeeksButton as _, DateStringProps as _t, useMonthViewStable as a, WeekNumberHeaderProps as an, MonthView as at, PrevWeeksButtonProps as b, DayButtonProps as bt, useCalendarState as c, WeekTemplateProps as cn, MonthViewRootProps as ct, MonthSeparatorCell as d, GridContext as dn, MonthOutOfRangeBehavior as dt, ValueChangeMeta as en, WeekTemplate as et, MonthSeparatorMonth as f, WeekDataContext as fn, OutOfRangeBehavior as ft, MonthSeparatorYear as g, DateRange as gt, MonthSeparatorWeekCount as h, CalendarStateContextValue as ht, useViewContext as i, WeekNumberCellState as in, GridHeaderCell as it, WeeksViewRootProps as j, GridHeaderState as jt, WeeksViewRootHandle as k, GridHeaderCellState as kt, computePreviewRange as l, WeekTemplateState as ln, MonthViewStableContextValue as lt, MonthSeparatorState as m, CalendarStableContextValue as mt, useWeeksViewState as n, ValueFormat as nn, DayCellTemplate as nt, useMonthViewState as o, WeekNumberHeaderState as on, MonthViewProps as ot, MonthSeparatorRow as p, CalendarProviderProps as pt, DateString as q, RangeSelectedState as qt, ViewContextValue as r, WeekNumberCellProps as rn, GridHeader as rt, useCalendarStable as s, WeekStartDay as sn, MonthViewRoot as st, useWeeksViewStable as t, ValueForFormat as tn, DayButton as tt, MonthSeparator as u, DayCellDataContext as un, MonthViewStateContextValue as ut, NextWeeksButtonProps as v, DateStringState as vt, WeeksNavButtonOwnProps as w, DragHandleOwnProps as wt, WeekCount as x, DayButtonState as xt, PrevWeeksButton as y, DateValueObject as yt, resolveFirstWeek as z, OutsideDays as zt };
2185
+ export { GridBody as $, TimeStringProps as $t, VisibleMonth as A, GridHeaderCellState as At, resolveFirstWeekSpec as B, OutsideDays as Bt, WeekCountState as C, DayCellTemplateProps as Ct, WeeksViewProps as D, GridBodyProps as Dt, WeeksView as E, DragHandleState as Et, WeekDescriptor as F, MonthData as Ft, RangePreview as G, RangePreviewProps as Gt, WeekNumberHeader as H, PrevMonthButtonProps as Ht, computeWeeksInWindow as I, MonthYearStringProps as It, MonthYearString as J, RangeSelectedState as Jt, RangeSelected as K, RangePreviewState as Kt, FirstWeekSpec as L, MonthYearStringState as Lt, WeeksViewStableContextValue as M, GridHeaderState as Mt, WeeksViewStateContextValue as N, GridProps as Nt, WeeksViewRoot as O, GridBodyState as Ot, WindowInfo as P, GridState as Pt, Grid as Q, TemporalNamespace as Qt, ScrollToWeekSnap as R, NavButtonState as Rt, WeekCountProps as S, DayButtonState as St, WeeksNavButtonState as T, DragHandleOwnProps as Tt, RangeEndDragHandle as U, RangeEndDragHandleProps as Ut, WeekNumberCell as V, PlainDateObject as Vt, RangeStartDragHandle as W, RangeMode as Wt, PrevMonthButton as X, RawValueForFormat as Xt, NextMonthButton as Y, RangeStartDragHandleProps as Yt, TimeString as Z, RootState as Zt, NextWeeksButton as _, DateRange as _t, useMonthViewStable as a, WeekNumberCellProps as an, MonthView as at, PrevWeeksButtonProps as b, DateValueObject as bt, useCalendarState as c, WeekNumberHeaderState as cn, MonthViewRootProps as ct, MonthSeparatorCell as d, WeekTemplateProps as dn, MonthOutOfRangeBehavior as dt, TimeStringState as en, WeekTemplate as et, MonthSeparatorMonth as f, WeekTemplateState as fn, OutOfRangeBehavior as ft, MonthSeparatorYear as g, CalendarStateContextValue as gt, MonthSeparatorWeekCount as h, WeekDataContext as hn, CalendarStableContextValue as ht, useViewContext as i, WeekNumberCellOwnProps as in, GridHeaderCell as it, WeeksViewRootProps as j, GridHeaderProps as jt, WeeksViewRootHandle as k, GridHeaderCellProps as kt, computePreviewRange as l, WeekNumberStrategy as ln, MonthViewStableContextValue as lt, MonthSeparatorState as m, GridContext as mn, CalendarProviderProps as mt, useWeeksViewState as n, ValueForFormat as nn, DayCellTemplate as nt, useMonthViewState as o, WeekNumberCellState as on, MonthViewProps as ot, MonthSeparatorRow as p, DayCellDataContext as pn, CalendarProvider as pt, DateString as q, RangeSelectedProps as qt, ViewContextValue as r, ValueFormat as rn, GridHeader as rt, useCalendarStable as s, WeekNumberHeaderProps as sn, MonthViewRoot as st, useWeeksViewStable as t, ValueChangeMeta as tn, DayButton as tt, MonthSeparator as u, WeekStartDay as un, MonthViewStateContextValue as ut, NextWeeksButtonProps as v, DateStringProps as vt, WeeksNavButtonOwnProps as w, DayCellTemplateState as wt, WeekCount as x, DayButtonProps as xt, PrevWeeksButton as y, DateStringState as yt, resolveFirstWeek as z, NextMonthButtonProps as zt };
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_weeks_navigation = require("./weeks-navigation-CJzhxbgj.cjs");
2
+ const require_weeks_navigation = require("./weeks-navigation-3UTRiTUP.cjs");
3
3
  exports.CalendarProvider = require_weeks_navigation.CalendarProvider;
4
4
  exports.DateString = require_weeks_navigation.DateString;
5
5
  exports.DayButton = require_weeks_navigation.DayButton;
package/dist/index.d.cts CHANGED
@@ -1,11 +1,2 @@
1
- import { $ as GridBody, $t as TimeStringState, A as VisibleMonth, At as GridHeaderProps, B as resolveFirstWeekSpec, Bt as PlainDateObject, C as WeekCountState, Ct as DayCellTemplateState, D as WeeksViewProps, Dt as GridBodyState, E as WeeksView, Et as GridBodyProps, F as WeekDescriptor, Ft as MonthYearStringProps, G as RangePreview, Gt as RangePreviewState, H as WeekNumberHeader, Ht as RangeEndDragHandleProps, I as computeWeeksInWindow, It as MonthYearStringState, J as MonthYearString, Jt as RangeStartDragHandleProps, K as RangeSelected, Kt as RangeSelectedProps, L as FirstWeekSpec, Lt as NavButtonState, M as WeeksViewStableContextValue, Mt as GridProps, N as WeeksViewStateContextValue, Nt as GridState, O as WeeksViewRoot, Ot as GridHeaderCellProps, P as WindowInfo, Pt as MonthData, Q as Grid, Qt as TimeStringProps, R as ScrollToWeekSnap, Rt as NextMonthButtonProps, S as WeekCountProps, St as DayCellTemplateProps, T as WeeksNavButtonState, Tt as DragHandleState, U as RangeEndDragHandle, Ut as RangeMode, V as WeekNumberCell, Vt as PrevMonthButtonProps, W as RangeStartDragHandle, Wt as RangePreviewProps, X as PrevMonthButton, Xt as RootState, Y as NextMonthButton, Yt as RawValueForFormat, Z as TimeString, Zt as TemporalNamespace, _ as NextWeeksButton, _t as DateStringProps, a as useMonthViewStable, an as WeekNumberHeaderProps, at as MonthView, b as PrevWeeksButtonProps, bt as DayButtonProps, c as useCalendarState, cn as WeekTemplateProps, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as GridContext, dt as MonthOutOfRangeBehavior, en as ValueChangeMeta, et as WeekTemplate, f as MonthSeparatorMonth, fn as WeekDataContext, ft as OutOfRangeBehavior, g as MonthSeparatorYear, gt as DateRange, h as MonthSeparatorWeekCount, ht as CalendarStateContextValue, i as useViewContext, in as WeekNumberCellState, it as GridHeaderCell, j as WeeksViewRootProps, jt as GridHeaderState, k as WeeksViewRootHandle, kt as GridHeaderCellState, l as computePreviewRange, ln as WeekTemplateState, lt as MonthViewStableContextValue, m as MonthSeparatorState, mt as CalendarStableContextValue, n as useWeeksViewState, nn as ValueFormat, nt as DayCellTemplate, o as useMonthViewState, on as WeekNumberHeaderState, ot as MonthViewProps, p as MonthSeparatorRow, pt as CalendarProviderProps, q as DateString, qt as RangeSelectedState, r as ViewContextValue, rn as WeekNumberCellProps, rt as GridHeader, s as useCalendarStable, sn as WeekStartDay, st as MonthViewRoot, t as useWeeksViewStable, tn as ValueForFormat, tt as DayButton, u as MonthSeparator, un as DayCellDataContext, ut as MonthViewStateContextValue, v as NextWeeksButtonProps, vt as DateStringState, w as WeeksNavButtonOwnProps, wt as DragHandleOwnProps, x as WeekCount, xt as DayButtonState, y as PrevWeeksButton, yt as DateValueObject, z as resolveFirstWeek, zt as OutsideDays } from "./weeks-view-context-CNAq2Hiu.cjs";
2
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
-
4
- //#region src/calendar-provider.d.ts
5
- /**
6
- * Provides shared calendar state (selection, config, range preview) to all
7
- * descendant view components. Does NOT manage focus, navigation, or grid data.
8
- */
9
- declare function CalendarProvider<F extends ValueFormat = "PlainDate">(props: CalendarProviderProps<F>): _$react_jsx_runtime0.JSX.Element;
10
- //#endregion
11
- export { CalendarProvider, type CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, type DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type MonthOutOfRangeBehavior, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, type MonthSeparatorState, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, type MonthViewProps, MonthViewRoot, type MonthViewRootProps, type MonthViewStableContextValue, type MonthViewStateContextValue, MonthYearString, type MonthYearStringProps, type MonthYearStringState, type NavButtonState, NextMonthButton, type NextMonthButtonProps, NextWeeksButton, type NextWeeksButtonProps, type OutOfRangeBehavior, type OutsideDays, type PlainDateObject, PrevMonthButton, type PrevMonthButtonProps, PrevWeeksButton, type PrevWeeksButtonProps, RangeEndDragHandle, type RangeEndDragHandleProps, type RangeMode, RangePreview, type RangePreviewProps, type RangePreviewState, RangeSelected, type RangeSelectedProps, type RangeSelectedState, RangeStartDragHandle, type RangeStartDragHandleProps, type RawValueForFormat, type RootState, type ScrollToWeekSnap, type TemporalNamespace, TimeString, type TimeStringProps, type TimeStringState, type ValueChangeMeta, type ValueForFormat, type ValueFormat, type ViewContextValue, type VisibleMonth, WeekCount, type WeekCountProps, type WeekCountState, WeekDataContext, type WeekDescriptor, WeekNumberCell, type WeekNumberCellProps, type WeekNumberCellState, WeekNumberHeader, type WeekNumberHeaderProps, type WeekNumberHeaderState, type WeekStartDay, WeekTemplate, type WeekTemplateProps, type WeekTemplateState, type WeeksNavButtonOwnProps, type WeeksNavButtonState, WeeksView, type WeeksViewProps, WeeksViewRoot, type WeeksViewRootHandle, type WeeksViewRootProps, type WeeksViewStableContextValue, type WeeksViewStateContextValue, type WindowInfo, computePreviewRange, computeWeeksInWindow, resolveFirstWeek, resolveFirstWeekSpec, useCalendarStable, useCalendarState, useMonthViewStable, useMonthViewState, useViewContext, useWeeksViewStable, useWeeksViewState };
1
+ import { $ as GridBody, $t as TimeStringProps, A as VisibleMonth, At as GridHeaderCellState, B as resolveFirstWeekSpec, Bt as OutsideDays, C as WeekCountState, Ct as DayCellTemplateProps, D as WeeksViewProps, Dt as GridBodyProps, E as WeeksView, Et as DragHandleState, F as WeekDescriptor, Ft as MonthData, G as RangePreview, Gt as RangePreviewProps, H as WeekNumberHeader, Ht as PrevMonthButtonProps, I as computeWeeksInWindow, It as MonthYearStringProps, J as MonthYearString, Jt as RangeSelectedState, K as RangeSelected, Kt as RangePreviewState, L as FirstWeekSpec, Lt as MonthYearStringState, M as WeeksViewStableContextValue, Mt as GridHeaderState, N as WeeksViewStateContextValue, Nt as GridProps, O as WeeksViewRoot, Ot as GridBodyState, P as WindowInfo, Pt as GridState, Q as Grid, Qt as TemporalNamespace, R as ScrollToWeekSnap, Rt as NavButtonState, S as WeekCountProps, St as DayButtonState, T as WeeksNavButtonState, Tt as DragHandleOwnProps, U as RangeEndDragHandle, Ut as RangeEndDragHandleProps, V as WeekNumberCell, Vt as PlainDateObject, W as RangeStartDragHandle, Wt as RangeMode, X as PrevMonthButton, Xt as RawValueForFormat, Y as NextMonthButton, Yt as RangeStartDragHandleProps, Z as TimeString, Zt as RootState, _ as NextWeeksButton, _t as DateRange, a as useMonthViewStable, an as WeekNumberCellProps, at as MonthView, b as PrevWeeksButtonProps, bt as DateValueObject, c as useCalendarState, cn as WeekNumberHeaderState, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as WeekTemplateProps, dt as MonthOutOfRangeBehavior, en as TimeStringState, et as WeekTemplate, f as MonthSeparatorMonth, fn as WeekTemplateState, ft as OutOfRangeBehavior, g as MonthSeparatorYear, gt as CalendarStateContextValue, h as MonthSeparatorWeekCount, hn as WeekDataContext, ht as CalendarStableContextValue, i as useViewContext, in as WeekNumberCellOwnProps, it as GridHeaderCell, j as WeeksViewRootProps, jt as GridHeaderProps, k as WeeksViewRootHandle, kt as GridHeaderCellProps, l as computePreviewRange, ln as WeekNumberStrategy, lt as MonthViewStableContextValue, m as MonthSeparatorState, mn as GridContext, mt as CalendarProviderProps, n as useWeeksViewState, nn as ValueForFormat, nt as DayCellTemplate, o as useMonthViewState, on as WeekNumberCellState, ot as MonthViewProps, p as MonthSeparatorRow, pn as DayCellDataContext, pt as CalendarProvider, q as DateString, qt as RangeSelectedProps, r as ViewContextValue, rn as ValueFormat, rt as GridHeader, s as useCalendarStable, sn as WeekNumberHeaderProps, st as MonthViewRoot, t as useWeeksViewStable, tn as ValueChangeMeta, tt as DayButton, u as MonthSeparator, un as WeekStartDay, ut as MonthViewStateContextValue, v as NextWeeksButtonProps, vt as DateStringProps, w as WeeksNavButtonOwnProps, wt as DayCellTemplateState, x as WeekCount, xt as DayButtonProps, y as PrevWeeksButton, yt as DateStringState, z as resolveFirstWeek, zt as NextMonthButtonProps } from "./index-bRoYX03d.cjs";
2
+ export { CalendarProvider, type CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, type DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type MonthOutOfRangeBehavior, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, type MonthSeparatorState, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, type MonthViewProps, MonthViewRoot, type MonthViewRootProps, type MonthViewStableContextValue, type MonthViewStateContextValue, MonthYearString, type MonthYearStringProps, type MonthYearStringState, type NavButtonState, NextMonthButton, type NextMonthButtonProps, NextWeeksButton, type NextWeeksButtonProps, type OutOfRangeBehavior, type OutsideDays, type PlainDateObject, PrevMonthButton, type PrevMonthButtonProps, PrevWeeksButton, type PrevWeeksButtonProps, RangeEndDragHandle, type RangeEndDragHandleProps, type RangeMode, RangePreview, type RangePreviewProps, type RangePreviewState, RangeSelected, type RangeSelectedProps, type RangeSelectedState, RangeStartDragHandle, type RangeStartDragHandleProps, type RawValueForFormat, type RootState, type ScrollToWeekSnap, type TemporalNamespace, TimeString, type TimeStringProps, type TimeStringState, type ValueChangeMeta, type ValueForFormat, type ValueFormat, type ViewContextValue, type VisibleMonth, WeekCount, type WeekCountProps, type WeekCountState, WeekDataContext, type WeekDescriptor, WeekNumberCell, type WeekNumberCellOwnProps, type WeekNumberCellProps, type WeekNumberCellState, WeekNumberHeader, type WeekNumberHeaderProps, type WeekNumberHeaderState, type WeekNumberStrategy, type WeekStartDay, WeekTemplate, type WeekTemplateProps, type WeekTemplateState, type WeeksNavButtonOwnProps, type WeeksNavButtonState, WeeksView, type WeeksViewProps, WeeksViewRoot, type WeeksViewRootHandle, type WeeksViewRootProps, type WeeksViewStableContextValue, type WeeksViewStateContextValue, type WindowInfo, computePreviewRange, computeWeeksInWindow, resolveFirstWeek, resolveFirstWeekSpec, useCalendarStable, useCalendarState, useMonthViewStable, useMonthViewState, useViewContext, useWeeksViewStable, useWeeksViewState };