@klinking/colander 3.1.0-alpha.7 → 3.1.0-alpha.9

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 (72) 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-BTojXkys.d.cts → index-B5VJ_WF2.d.mts} +91 -114
  30. package/dist/{weeks-view-context-CFXV8orh.d.mts → index-BMsxaq1s.d.cts} +91 -114
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.d.cts +1 -10
  33. package/dist/index.d.mts +1 -10
  34. package/dist/index.mjs +1 -2
  35. package/dist/{weeks-navigation-CPevz3Xg.cjs → weeks-navigation-CUQApLMk.cjs} +531 -400
  36. package/dist/{weeks-navigation-BSKwFvdP.mjs → weeks-navigation-CWNpF_6M.mjs} +531 -399
  37. package/package.json +21 -18
  38. package/src/calendar-provider.test.tsx +1 -1
  39. package/src/calendar-provider.tsx +8 -2
  40. package/src/compute-weeks-in-window.test.ts +1 -1
  41. package/src/day-cell-state.test.ts +1 -1
  42. package/src/day-cell-state.ts +0 -70
  43. package/src/day-cell-store.test.tsx +273 -0
  44. package/src/day-cell-store.tsx +204 -0
  45. package/src/day-cell.test.tsx +73 -90
  46. package/src/day-cell.tsx +93 -78
  47. package/src/formats/formats.test.ts +1 -1
  48. package/src/grid.event-perf.test.tsx +7 -1
  49. package/src/grid.perf.test.tsx +7 -1
  50. package/src/grid.tsx +17 -15
  51. package/src/keyboard.test.ts +1 -1
  52. package/src/month-separator.test.tsx +1 -1
  53. package/src/month-view.bounds.test.tsx +1 -1
  54. package/src/month-view.test.tsx +89 -1
  55. package/src/month-view.tsx +17 -7
  56. package/src/month-window.test.ts +1 -1
  57. package/src/out-of-range.test.ts +1 -1
  58. package/src/range-preview.test.ts +1 -1
  59. package/src/resolve-first-week.test.ts +1 -1
  60. package/src/store.ts +72 -0
  61. package/src/today.test.tsx +8 -1
  62. package/src/utils.bench.ts +158 -106
  63. package/src/utils.test.ts +1 -1
  64. package/src/view-context.test.tsx +1 -1
  65. package/src/view-context.ts +2 -0
  66. package/src/weeks-grid.tsx +20 -10
  67. package/src/weeks-keyboard.test.ts +1 -1
  68. package/src/weeks-view-state.ts +1 -1
  69. package/src/weeks-view.bounds.test.tsx +1 -1
  70. package/src/weeks-view.test.tsx +1 -1
  71. package/src/weeks-view.tsx +2 -1
  72. package/src/weeks-window.test.ts +1 -1
@@ -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`). */
@@ -1377,8 +1397,6 @@ type WeekNumberHeaderState = {
1377
1397
  };
1378
1398
  /** Full props for the `WeekNumberHeader` component. */
1379
1399
  type WeekNumberHeaderProps = useRender.ComponentProps<"th", WeekNumberHeaderState>;
1380
- //#endregion
1381
- //#region src/calendar-types.d.ts
1382
1400
  interface CalendarProviderPropsBase<F extends ValueFormat = ValueFormat> {
1383
1401
  /**
1384
1402
  * The value format used for date serialization. Determines the type of
@@ -1545,8 +1563,11 @@ interface CalendarStateContextValue {
1545
1563
  */
1546
1564
  baseRootState: BaseRootState;
1547
1565
  }
1548
- //#endregion
1549
- //#region src/out-of-range.d.ts
1566
+ /**
1567
+ * Provides shared calendar state (selection, config, range preview) to all
1568
+ * descendant view components. Does NOT manage focus, navigation, or grid data.
1569
+ */
1570
+ declare function CalendarProvider<F extends ValueFormat = "PlainDate">(props: CalendarProviderProps<F>): import("react").JSX.Element;
1550
1571
  /**
1551
1572
  * Controls how a {@link WeeksView} window behaves when navigation would move it
1552
1573
  * past the `min`/`max` bounds.
@@ -1598,8 +1619,6 @@ type OutOfRangeBehavior = "unbounded" | "stop" | "stop-shrink" | "snap" | "snap-
1598
1619
  * {@link OutOfRangeBehavior} offers for WeeksView's flexible window don't apply.
1599
1620
  */
1600
1621
  type MonthOutOfRangeBehavior = "unbounded" | "stop";
1601
- //#endregion
1602
- //#region src/month-window.d.ts
1603
1622
  /** An ISO year + month. */
1604
1623
  interface MonthRef {
1605
1624
  year: number;
@@ -1625,8 +1644,6 @@ interface MonthWindowPolicy {
1625
1644
  /** The window start that reveals `target` with the smallest shift. */
1626
1645
  reveal(start: MonthRef, target: MonthRef): MonthRef;
1627
1646
  }
1628
- //#endregion
1629
- //#region src/month-view-types.d.ts
1630
1647
  /** Props accepted by `MonthView.Root`. */
1631
1648
  interface MonthViewRootProps {
1632
1649
  /**
@@ -1716,16 +1733,12 @@ interface MonthViewStateContextValue {
1716
1733
  /** The root component's state object for render functions. */
1717
1734
  rootState: RootState;
1718
1735
  }
1719
- //#endregion
1720
- //#region src/month-view.d.ts
1721
- declare function MonthViewRoot(props: MonthViewRootProps): _$react_jsx_runtime0.JSX.Element;
1736
+ declare function MonthViewRoot(props: MonthViewRootProps): import("react").JSX.Element;
1722
1737
  type MonthViewProps<F extends ValueFormat = "PlainDate"> = CalendarProviderProps<F> & MonthViewRootProps;
1723
- declare function MonthView<F extends ValueFormat = "PlainDate">(props: MonthViewProps<F>): _$react_jsx_runtime0.JSX.Element;
1738
+ declare function MonthView<F extends ValueFormat = "PlainDate">(props: MonthViewProps<F>): import("react").JSX.Element;
1724
1739
  declare namespace MonthView {
1725
- var Root: typeof MonthViewRoot;
1740
+ export { MonthViewRoot as Root };
1726
1741
  }
1727
- //#endregion
1728
- //#region src/grid-header.d.ts
1729
1742
  /**
1730
1743
  * Renders weekday column headers (`<th>`). When no `index` is provided,
1731
1744
  * renders all 7 days (Sunday–Saturday). Each cell includes `abbr` and
@@ -1734,14 +1747,6 @@ declare namespace MonthView {
1734
1747
  declare const GridHeaderCell: (props: GridHeaderCellProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
1735
1748
  /** Table header section (`<thead>`) wrapping a row of {@link GridHeaderCell}s. */
1736
1749
  declare const GridHeader: (props: GridHeaderProps & React.RefAttributes<HTMLTableSectionElement>) => React.ReactElement | null;
1737
- //#endregion
1738
- //#region src/day-cell-state.d.ts
1739
- /** A day cell's state: the public {@link DayCellTemplateState} plus the roving-tabindex flag. */
1740
- type DayCellState = DayCellTemplateState & {
1741
- isTabTarget: boolean;
1742
- };
1743
- //#endregion
1744
- //#region src/day-cell.d.ts
1745
1750
  /**
1746
1751
  * Renders one `<td role="gridcell">` per day. Exposes data-attributes for
1747
1752
  * `selected`, `today`, `disabled`, `outside-month`, `focused`,
@@ -1750,21 +1755,15 @@ type DayCellState = DayCellTemplateState & {
1750
1755
  * When used inside a {@link WeekTemplate}, iterates over that week's days.
1751
1756
  * An explicit `date` prop renders a single cell.
1752
1757
  */
1753
- declare function DayCellTemplate(props: DayCellTemplateProps): _$react_jsx_runtime0.JSX.Element;
1754
- declare const DayButton: (props: DayButtonProps & {
1755
- _derivedState?: DayCellState;
1756
- } & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
1757
- //#endregion
1758
- //#region src/grid.d.ts
1758
+ declare function DayCellTemplate(props: DayCellTemplateProps): import("react").JSX.Element;
1759
+ declare const DayButton: (props: DayButtonProps & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
1759
1760
  declare const Grid: (props: GridProps & React.RefAttributes<HTMLTableElement>) => React.ReactElement | null;
1760
1761
  declare const GridBody: (props: GridBodyProps & React.RefAttributes<HTMLTableSectionElement>) => React.ReactElement | null;
1761
1762
  /**
1762
1763
  * Iterates over the weeks in the current month and renders one `<tr>` per week.
1763
1764
  * Each instance receives its week's days and index via {@link WeekDataContext}.
1764
1765
  */
1765
- declare function WeekTemplate(props: WeekTemplateProps): _$react_jsx_runtime0.JSX.Element;
1766
- //#endregion
1767
- //#region src/navigation.d.ts
1766
+ declare function WeekTemplate(props: WeekTemplateProps): import("react").JSX.Element;
1768
1767
  /**
1769
1768
  * Displays the currently selected (or current) date as localized text.
1770
1769
  * Renders a `<span>` with `aria-live="polite"`.
@@ -1799,8 +1798,6 @@ declare const PrevMonthButton: (props: PrevMonthButtonProps & React.RefAttribute
1799
1798
  * when the next month falls after `max`. Exposes `data-direction="next"`.
1800
1799
  */
1801
1800
  declare const NextMonthButton: (props: NextMonthButtonProps & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
1802
- //#endregion
1803
- //#region src/selected-range.d.ts
1804
1801
  /**
1805
1802
  * Visual overlay (`<td role="presentation">`) that highlights the selected
1806
1803
  * date range within a single week row. Exposes data-attributes for
@@ -1808,8 +1805,6 @@ declare const NextMonthButton: (props: NextMonthButtonProps & React.RefAttribute
1808
1805
  * `end-date`, `extends-before`, and `extends-after`.
1809
1806
  */
1810
1807
  declare const RangeSelected: (props: RangeSelectedProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
1811
- //#endregion
1812
- //#region src/range-preview.d.ts
1813
1808
  /**
1814
1809
  * Visual overlay (`<td role="presentation">`) that highlights the hover
1815
1810
  * preview range within a single week row. Structurally identical to
@@ -1817,14 +1812,10 @@ declare const RangeSelected: (props: RangeSelectedProps & React.RefAttributes<HT
1817
1812
  * the committed range boundaries.
1818
1813
  */
1819
1814
  declare const RangePreview: (props: RangePreviewProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
1820
- //#endregion
1821
- //#region src/drag-handle.d.ts
1822
1815
  /** Convenience wrapper for {@link RangeDragHandle} with `edge="start"`. */
1823
1816
  declare const RangeStartDragHandle: (props: RangeStartDragHandleProps & React.RefAttributes<HTMLSpanElement>) => React.ReactElement | null;
1824
1817
  /** Convenience wrapper for {@link RangeDragHandle} with `edge="end"`. */
1825
1818
  declare const RangeEndDragHandle: (props: RangeEndDragHandleProps & React.RefAttributes<HTMLSpanElement>) => React.ReactElement | null;
1826
- //#endregion
1827
- //#region src/week-number.d.ts
1828
1819
  /**
1829
1820
  * Renders the ISO 8601 week number for a week row. Must be used inside
1830
1821
  * a {@link WeekTemplate}. Renders a `<td>` with `role="rowheader"`.
@@ -1834,8 +1825,6 @@ declare const WeekNumberCell: (props: WeekNumberCellProps & React.RefAttributes<
1834
1825
  * Column header for the week number column. Renders a `<th scope="col">`.
1835
1826
  */
1836
1827
  declare const WeekNumberHeader: (props: WeekNumberHeaderProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
1837
- //#endregion
1838
- //#region src/resolve-first-week.d.ts
1839
1828
  /**
1840
1829
  * A flexible specifier for a calendar week. Accepts a `Temporal.PlainDate`,
1841
1830
  * a native `Date`, an ISO week number, a week-of-year, or a month/day pair.
@@ -1876,8 +1865,6 @@ declare function resolveFirstWeekSpec(spec: FirstWeekSpec, weekStartDay: WeekSta
1876
1865
  declare function resolveFirstWeek(currentFirstWeek: Temporal.PlainDate, weekCount: number, target: Temporal.PlainDate, options?: {
1877
1866
  snap?: ScrollToWeekSnap;
1878
1867
  }): Temporal.PlainDate;
1879
- //#endregion
1880
- //#region src/compute-weeks-in-window.d.ts
1881
1868
  interface WeekDescriptor {
1882
1869
  startDate: Temporal.PlainDate;
1883
1870
  endDate: Temporal.PlainDate;
@@ -1890,8 +1877,6 @@ interface WeekDescriptor {
1890
1877
  * `firstWeek` is snapped back to the nearest `weekStartDay`.
1891
1878
  */
1892
1879
  declare function computeWeeksInWindow(firstWeek: Temporal.PlainDate, weekCount: number, weekStartDay: WeekStartDay, _T: TemporalNamespace): WeekDescriptor[];
1893
- //#endregion
1894
- //#region src/weeks-window.d.ts
1895
1880
  /** A window as shown: its first week and how many rows it has (≤ the prop). */
1896
1881
  interface EffectiveWindow {
1897
1882
  firstWeek: Temporal.PlainDate;
@@ -1916,8 +1901,6 @@ interface WeekWindowPolicy {
1916
1901
  */
1917
1902
  shift(current: EffectiveWindow, direction: 1 | -1, shiftBy?: number): EffectiveWindow | null;
1918
1903
  }
1919
- //#endregion
1920
- //#region src/weeks-view-types.d.ts
1921
1904
  /** Props accepted by `WeeksView.Root`. */
1922
1905
  interface WeeksViewRootProps {
1923
1906
  /** Number of week rows to display simultaneously. */
@@ -2016,8 +1999,6 @@ interface WeeksViewStateContextValue {
2016
1999
  /** Render-prop `RootState` exposed to components inside WeeksView. */
2017
2000
  rootState: RootState;
2018
2001
  }
2019
- //#endregion
2020
- //#region src/weeks-view.d.ts
2021
2002
  /** Imperative handle exposed by WeeksView.Root via ref. */
2022
2003
  interface WeeksViewRootHandle {
2023
2004
  scrollToWeek: (target: FirstWeekSpec, options?: {
@@ -2030,8 +2011,6 @@ declare const WeeksView: WeeksViewComponent;
2030
2011
  interface WeeksViewComponent extends React$1.ForwardRefExoticComponent<WeeksViewProps & React$1.RefAttributes<WeeksViewRootHandle>> {
2031
2012
  Root: typeof WeeksViewRoot;
2032
2013
  }
2033
- //#endregion
2034
- //#region src/weeks-navigation.d.ts
2035
2014
  /** State exposed by `PrevWeeksButton` and `NextWeeksButton`. */
2036
2015
  type WeeksNavButtonState = {
2037
2016
  root: RootState;
@@ -2071,33 +2050,42 @@ declare const NextWeeksButton: React$1.ForwardRefExoticComponent<Omit<NextWeeksB
2071
2050
  * out-of-range modes where the actual count may be less than the `weekCount` prop.
2072
2051
  */
2073
2052
  declare const WeekCount: React$1.ForwardRefExoticComponent<Omit<WeekCountProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
2074
- //#endregion
2075
- //#region src/month-separator.d.ts
2076
2053
  /** State exposed by the MonthSeparator component and its children. */
2077
2054
  type MonthSeparatorState = {
2078
- /** Calendar month (1-12). */month: number; /** Calendar year. */
2079
- year: number; /** True when this is the first month of a new year in the visible window. */
2080
- firstOfYear: boolean; /** True for the separator at the top of the visible window. */
2081
- firstVisible: boolean; /** Number of weeks of the previous month visible above this separator. */
2082
- weeksVisibleBefore: number; /** Number of weeks of this month visible below this separator. */
2055
+ /** Calendar month (1-12). */
2056
+ month: number;
2057
+ /** Calendar year. */
2058
+ year: number;
2059
+ /** True when this is the first month of a new year in the visible window. */
2060
+ firstOfYear: boolean;
2061
+ /** True for the separator at the top of the visible window. */
2062
+ firstVisible: boolean;
2063
+ /** Number of weeks of the previous month visible above this separator. */
2064
+ weeksVisibleBefore: number;
2065
+ /** Number of weeks of this month visible below this separator. */
2083
2066
  weeksVisibleAfter: number;
2084
2067
  /**
2085
2068
  * 0-based column index where the 1st of the month falls within the week row.
2086
2069
  * Accounts for week number column if present (column 0 = week number).
2087
2070
  */
2088
- firstDayColumn: number; /** Total number of columns (7 days + optional week number column). */
2089
- totalColumns: number; /** True when the 1st day of this month is visible in the weeks below. */
2071
+ firstDayColumn: number;
2072
+ /** Total number of columns (7 days + optional week number column). */
2073
+ totalColumns: number;
2074
+ /** True when the 1st day of this month is visible in the weeks below. */
2090
2075
  firstDayVisible: boolean;
2091
2076
  /**
2092
2077
  * Number of week rows between this separator and the next separator
2093
2078
  * (or end of window). Use this for CSS grid `gridRow: span N` to
2094
2079
  * avoid overlapping the next month's label.
2095
2080
  */
2096
- fullWeeksVisibleAfter: number; /** 1-based grid row index where this separator's weeks start. */
2081
+ fullWeeksVisibleAfter: number;
2082
+ /** 1-based grid row index where this separator's weeks start. */
2097
2083
  gridRowStart: number;
2098
2084
  };
2099
2085
  type MonthChildProps = useRender.ComponentProps<"span", MonthSeparatorState> & {
2100
- /** BCP 47 locale(s) for month name formatting. @default "en-US" */locale?: string; /** Month name format. @default "long" */
2086
+ /** BCP 47 locale(s) for month name formatting. @default "en-US" */
2087
+ locale?: string;
2088
+ /** Month name format. @default "long" */
2101
2089
  format?: "long" | "short" | "narrow";
2102
2090
  };
2103
2091
  declare const MonthSeparatorMonth: React$1.ForwardRefExoticComponent<Omit<MonthChildProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
@@ -2118,8 +2106,6 @@ type MonthSeparatorProps = useRender.ComponentProps<"tr", MonthSeparatorState>;
2118
2106
  * Default children: `<Month /> <Year />`.
2119
2107
  */
2120
2108
  declare const MonthSeparator: React$1.ForwardRefExoticComponent<Omit<MonthSeparatorProps, "ref"> & React$1.RefAttributes<HTMLTableRowElement>>;
2121
- //#endregion
2122
- //#region src/root-selection.d.ts
2123
2109
  /**
2124
2110
  * Pure utility that computes the preview range for a hovered date, using the
2125
2111
  * same logic as the built-in hover preview. Useful for deriving the preview in
@@ -2132,20 +2118,14 @@ declare function computePreviewRange(hoveredDate: Temporal.PlainDate, currentRan
2132
2118
  isDateDisabled?: (date: Temporal.PlainDate) => boolean;
2133
2119
  readOnly?: boolean;
2134
2120
  }): DateRange<"PlainDate"> | null;
2135
- //#endregion
2136
- //#region src/calendar-context.d.ts
2137
2121
  /** Returns the stable (callbacks/config) part of CalendarProvider context. */
2138
2122
  declare function useCalendarStable(): CalendarStableContextValue;
2139
2123
  /** Returns the volatile state part of CalendarProvider context. */
2140
2124
  declare function useCalendarState(): CalendarStateContextValue;
2141
- //#endregion
2142
- //#region src/month-view-context.d.ts
2143
2125
  /** Returns the MonthView stable context (config + callbacks). */
2144
2126
  declare function useMonthViewStable(): MonthViewStableContextValue;
2145
2127
  /** Returns the MonthView state context (volatile grid data). */
2146
2128
  declare function useMonthViewState(): MonthViewStateContextValue;
2147
- //#endregion
2148
- //#region src/view-context.d.ts
2149
2129
  /** Shared context provided by both MonthView.Root and WeeksView.Root. */
2150
2130
  interface ViewContextValue {
2151
2131
  /** Which view type is active. */
@@ -2163,11 +2143,8 @@ interface ViewContextValue {
2163
2143
  }
2164
2144
  /** Returns the nearest view context (MonthView or WeeksView). */
2165
2145
  declare function useViewContext(): ViewContextValue;
2166
- //#endregion
2167
- //#region src/weeks-view-context.d.ts
2168
2146
  /** Returns the WeeksView stable context (config + callbacks). */
2169
2147
  declare function useWeeksViewStable(): WeeksViewStableContextValue;
2170
2148
  /** Returns the WeeksView state context (volatile grid data). */
2171
2149
  declare function useWeeksViewState(): WeeksViewStateContextValue;
2172
- //#endregion
2173
- 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 };
2150
+ 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, WeekNumberCellState as an, MonthView as at, PrevWeeksButtonProps as b, DateValueObject as bt, useCalendarState as c, WeekStartDay as cn, MonthViewRootProps as ct, MonthSeparatorCell as d, DayCellDataContext as dn, MonthOutOfRangeBehavior as dt, TimeStringState as en, WeekTemplate as et, MonthSeparatorMonth as f, GridContext as fn, OutOfRangeBehavior as ft, MonthSeparatorYear as g, CalendarStateContextValue as gt, MonthSeparatorWeekCount as h, CalendarStableContextValue as ht, useViewContext as i, WeekNumberCellProps as in, GridHeaderCell as it, WeeksViewRootProps as j, GridHeaderProps as jt, WeeksViewRootHandle as k, GridHeaderCellProps as kt, computePreviewRange as l, WeekTemplateProps as ln, MonthViewStableContextValue as lt, MonthSeparatorState as m, CalendarProviderProps as mt, useWeeksViewState as n, ValueForFormat as nn, DayCellTemplate as nt, useMonthViewState as o, WeekNumberHeaderProps as on, MonthViewProps as ot, MonthSeparatorRow as p, WeekDataContext as pn, CalendarProvider as pt, DateString as q, RangeSelectedProps as qt, ViewContextValue as r, ValueFormat as rn, GridHeader as rt, useCalendarStable as s, WeekNumberHeaderState as sn, MonthViewRoot as st, useWeeksViewStable as t, ValueChangeMeta as tn, DayButton as tt, MonthSeparator as u, WeekTemplateState 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-CPevz3Xg.cjs");
2
+ const require_weeks_navigation = require("./weeks-navigation-CUQApLMk.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-BTojXkys.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
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 WeekNumberCellState, at as MonthView, b as PrevWeeksButtonProps, bt as DateValueObject, c as useCalendarState, cn as WeekStartDay, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as DayCellDataContext, dt as MonthOutOfRangeBehavior, en as TimeStringState, et as WeekTemplate, f as MonthSeparatorMonth, fn as GridContext, ft as OutOfRangeBehavior, g as MonthSeparatorYear, gt as CalendarStateContextValue, h as MonthSeparatorWeekCount, ht as CalendarStableContextValue, i as useViewContext, in as WeekNumberCellProps, it as GridHeaderCell, j as WeeksViewRootProps, jt as GridHeaderProps, k as WeeksViewRootHandle, kt as GridHeaderCellProps, l as computePreviewRange, ln as WeekTemplateProps, lt as MonthViewStableContextValue, m as MonthSeparatorState, mt as CalendarProviderProps, n as useWeeksViewState, nn as ValueForFormat, nt as DayCellTemplate, o as useMonthViewState, on as WeekNumberHeaderProps, ot as MonthViewProps, p as MonthSeparatorRow, pn as WeekDataContext, pt as CalendarProvider, q as DateString, qt as RangeSelectedProps, r as ViewContextValue, rn as ValueFormat, rt as GridHeader, s as useCalendarStable, sn as WeekNumberHeaderState, st as MonthViewRoot, t as useWeeksViewStable, tn as ValueChangeMeta, tt as DayButton, u as MonthSeparator, un as WeekTemplateState, 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-BMsxaq1s.cjs";
11
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 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 };
package/dist/index.d.mts 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-CFXV8orh.mjs";
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
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 WeekNumberCellState, at as MonthView, b as PrevWeeksButtonProps, bt as DateValueObject, c as useCalendarState, cn as WeekStartDay, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as DayCellDataContext, dt as MonthOutOfRangeBehavior, en as TimeStringState, et as WeekTemplate, f as MonthSeparatorMonth, fn as GridContext, ft as OutOfRangeBehavior, g as MonthSeparatorYear, gt as CalendarStateContextValue, h as MonthSeparatorWeekCount, ht as CalendarStableContextValue, i as useViewContext, in as WeekNumberCellProps, it as GridHeaderCell, j as WeeksViewRootProps, jt as GridHeaderProps, k as WeeksViewRootHandle, kt as GridHeaderCellProps, l as computePreviewRange, ln as WeekTemplateProps, lt as MonthViewStableContextValue, m as MonthSeparatorState, mt as CalendarProviderProps, n as useWeeksViewState, nn as ValueForFormat, nt as DayCellTemplate, o as useMonthViewState, on as WeekNumberHeaderProps, ot as MonthViewProps, p as MonthSeparatorRow, pn as WeekDataContext, pt as CalendarProvider, q as DateString, qt as RangeSelectedProps, r as ViewContextValue, rn as ValueFormat, rt as GridHeader, s as useCalendarStable, sn as WeekNumberHeaderState, st as MonthViewRoot, t as useWeeksViewStable, tn as ValueChangeMeta, tt as DayButton, u as MonthSeparator, un as WeekTemplateState, 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-B5VJ_WF2.mjs";
11
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 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 };
package/dist/index.mjs CHANGED
@@ -1,2 +1 @@
1
- import { A as MonthSeparatorRow, B as useViewContext, C as DayButton, D as MonthSeparator, E as useWeeksViewState, F as DayCellDataContext, G as useCalendarStable, H as useMonthViewState, I as GridContext, K as useCalendarState, L as WeekDataContext, M as MonthSeparatorYear, N as GridHeader, O as MonthSeparatorCell, P as GridHeaderCell, R as MonthView, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider, V as useMonthViewStable, W as computePreviewRange, _ as NextMonthButton, a as WeeksViewRoot, b as Grid, c as computeWeeksInWindow, d as RangeEndDragHandle, f as RangeStartDragHandle, g as MonthYearString, h as DateString, i as WeeksView, j as MonthSeparatorWeekCount, k as MonthSeparatorMonth, l as WeekNumberCell, m as RangeSelected, n as PrevWeeksButton, o as resolveFirstWeek, p as RangePreview, r as WeekCount, s as resolveFirstWeekSpec, t as NextWeeksButton, u as WeekNumberHeader, v as PrevMonthButton, w as DayCellTemplate, x as GridBody, y as TimeString, z as MonthViewRoot } from "./weeks-navigation-BSKwFvdP.mjs";
2
- export { CalendarProvider, DateString, DayButton, DayCellDataContext, DayCellTemplate, Grid, GridBody, GridContext, GridHeader, GridHeaderCell, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, MonthViewRoot, MonthYearString, NextMonthButton, NextWeeksButton, PrevMonthButton, PrevWeeksButton, RangeEndDragHandle, RangePreview, RangeSelected, RangeStartDragHandle, TimeString, WeekCount, WeekDataContext, WeekNumberCell, WeekNumberHeader, WeekTemplate, WeeksView, WeeksViewRoot, computePreviewRange, computeWeeksInWindow, resolveFirstWeek, resolveFirstWeekSpec, useCalendarStable, useCalendarState, useMonthViewStable, useMonthViewState, useViewContext, useWeeksViewStable, useWeeksViewState };
1
+ export { U as CalendarProvider, h as DateString, C as DayButton, B as DayCellDataContext, w as DayCellTemplate, b as Grid, x as GridBody, V as GridContext, N as GridHeader, P as GridHeaderCell, D as MonthSeparator, O as MonthSeparatorCell, k as MonthSeparatorMonth, A as MonthSeparatorRow, j as MonthSeparatorWeekCount, M as MonthSeparatorYear, F as MonthView, I as MonthViewRoot, g as MonthYearString, _ as NextMonthButton, t as NextWeeksButton, v as PrevMonthButton, n as PrevWeeksButton, d as RangeEndDragHandle, p as RangePreview, m as RangeSelected, f as RangeStartDragHandle, y as TimeString, r as WeekCount, H as WeekDataContext, l as WeekNumberCell, u as WeekNumberHeader, S as WeekTemplate, i as WeeksView, a as WeeksViewRoot, W as computePreviewRange, c as computeWeeksInWindow, o as resolveFirstWeek, s as resolveFirstWeekSpec, G as useCalendarStable, K as useCalendarState, L as useMonthViewStable, R as useMonthViewState, z as useViewContext, T as useWeeksViewStable, E as useWeeksViewState } from "./weeks-navigation-CWNpF_6M.mjs";