@klinking/colander 3.1.0-alpha.6 → 3.1.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/formats/date.cjs +2 -3
- package/dist/formats/date.d.cts +10 -14
- package/dist/formats/date.d.mts +10 -14
- package/dist/formats/date.mjs +2 -3
- package/dist/formats/object.cjs +2 -3
- package/dist/formats/object.d.cts +10 -14
- package/dist/formats/object.d.mts +10 -14
- package/dist/formats/object.mjs +2 -3
- package/dist/formats/plain-date-time.cjs +2 -3
- package/dist/formats/plain-date-time.d.cts +10 -14
- package/dist/formats/plain-date-time.d.mts +10 -14
- package/dist/formats/plain-date-time.mjs +2 -3
- package/dist/formats/plain-date.cjs +2 -3
- package/dist/formats/plain-date.d.cts +10 -14
- package/dist/formats/plain-date.d.mts +10 -14
- package/dist/formats/plain-date.mjs +2 -3
- package/dist/formats/plain-month-day.cjs +2 -3
- package/dist/formats/plain-month-day.d.cts +10 -14
- package/dist/formats/plain-month-day.d.mts +10 -14
- package/dist/formats/plain-month-day.mjs +2 -3
- package/dist/formats/plain-year-month.cjs +2 -3
- package/dist/formats/plain-year-month.d.cts +10 -14
- package/dist/formats/plain-year-month.d.mts +10 -14
- package/dist/formats/plain-year-month.mjs +2 -3
- package/dist/formats/zoned-date-time.cjs +2 -3
- package/dist/formats/zoned-date-time.d.cts +10 -14
- package/dist/formats/zoned-date-time.d.mts +10 -14
- package/dist/formats/zoned-date-time.mjs +2 -3
- package/dist/{index-DnFCKyyw.d.cts → index-BqzrxYgn.d.cts} +106 -116
- package/dist/{index-q3cQKJdA.d.mts → index-CkhYFmf4.d.mts} +106 -116
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -2
- package/dist/{weeks-navigation-Dn3UtG76.mjs → weeks-navigation-BWB5OvqW.mjs} +151 -188
- package/dist/{weeks-navigation-SuKJZJCM.cjs → weeks-navigation-CatYJIKb.cjs} +153 -191
- package/package.json +17 -18
- package/src/calendar-provider.test.tsx +1 -1
- package/src/compute-weeks-in-window.test.ts +1 -1
- package/src/day-cell-state.test.ts +1 -1
- package/src/day-cell.test.tsx +1 -1
- package/src/formats/formats.test.ts +1 -1
- package/src/grid.event-perf.test.tsx +7 -1
- package/src/grid.perf.test.tsx +7 -1
- package/src/grid.tsx +1 -1
- package/src/keyboard.test.ts +1 -1
- package/src/month-separator.test.tsx +1 -1
- package/src/month-view.bounds.test.tsx +1 -1
- package/src/month-view.test.tsx +89 -1
- package/src/month-view.tsx +14 -5
- package/src/month-window.test.ts +1 -1
- package/src/out-of-range.test.ts +34 -54
- package/src/out-of-range.ts +47 -123
- package/src/range-preview.test.ts +1 -1
- package/src/resolve-first-week.test.ts +1 -1
- package/src/today.test.tsx +8 -1
- package/src/utils.bench.ts +158 -106
- package/src/utils.test.ts +1 -1
- package/src/view-context.test.tsx +1 -1
- package/src/weeks-keyboard.test.ts +1 -1
- package/src/weeks-navigation.tsx +15 -6
- package/src/weeks-view-state.ts +21 -12
- package/src/weeks-view.bounds.test.tsx +246 -0
- package/src/weeks-view.test.tsx +1 -1
- package/src/weeks-window.test.ts +110 -22
- package/src/weeks-window.ts +57 -19
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import * as _$react from "react";
|
|
2
1
|
import React$1 from "react";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
2
|
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
|
|
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
|
-
};
|
|
449
|
-
|
|
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:
|
|
997
|
+
declare const WeekDataContext: import("react").Context<{
|
|
1002
998
|
days: Temporal.PlainDate[];
|
|
1003
|
-
weekIndex: number;
|
|
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
|
-
};
|
|
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:
|
|
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:
|
|
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. */
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
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;
|
|
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;
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
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,15 +1563,11 @@ interface CalendarStateContextValue {
|
|
|
1545
1563
|
*/
|
|
1546
1564
|
baseRootState: BaseRootState;
|
|
1547
1565
|
}
|
|
1548
|
-
//#endregion
|
|
1549
|
-
//#region src/calendar-provider.d.ts
|
|
1550
1566
|
/**
|
|
1551
1567
|
* Provides shared calendar state (selection, config, range preview) to all
|
|
1552
1568
|
* descendant view components. Does NOT manage focus, navigation, or grid data.
|
|
1553
1569
|
*/
|
|
1554
|
-
declare function CalendarProvider<F extends ValueFormat = "PlainDate">(props: CalendarProviderProps<F>):
|
|
1555
|
-
//#endregion
|
|
1556
|
-
//#region src/out-of-range.d.ts
|
|
1570
|
+
declare function CalendarProvider<F extends ValueFormat = "PlainDate">(props: CalendarProviderProps<F>): import("react").JSX.Element;
|
|
1557
1571
|
/**
|
|
1558
1572
|
* Controls how a {@link WeeksView} window behaves when navigation would move it
|
|
1559
1573
|
* past the `min`/`max` bounds.
|
|
@@ -1565,7 +1579,8 @@ declare function CalendarProvider<F extends ValueFormat = "PlainDate">(props: Ca
|
|
|
1565
1579
|
* - `"unbounded"` — Navigation is never restricted by `min`/`max`; any range of
|
|
1566
1580
|
* weeks can be viewed. Out-of-range days simply render disabled. (Default.)
|
|
1567
1581
|
* - `"stop"` — Navigation halts at the boundary: the Prev/Next button is
|
|
1568
|
-
* disabled
|
|
1582
|
+
* disabled, and `goNext`/`goPrev`/`scrollToWeek` and keyboard paging do
|
|
1583
|
+
* nothing, once the next step would show a window containing no in-range day.
|
|
1569
1584
|
* - `"stop-shrink"` — Like `"stop"`, but near the edge the window **shrinks** to
|
|
1570
1585
|
* fewer week rows instead of showing rows that are entirely out of range.
|
|
1571
1586
|
* - `"snap"` — A jump that would overshoot **snaps** the window so its edge
|
|
@@ -1573,6 +1588,8 @@ declare function CalendarProvider<F extends ValueFormat = "PlainDate">(props: Ca
|
|
|
1573
1588
|
* - `"snap-shrink"` — Snap to the boundary, then **shrink** the window to just
|
|
1574
1589
|
* the in-range weeks.
|
|
1575
1590
|
*
|
|
1591
|
+
* A single bound (`min` only or `max` only) is honored; the missing side is unlimited.
|
|
1592
|
+
*
|
|
1576
1593
|
* `"snap"` and `"snap-shrink"` are identical **unless the selectable range spans
|
|
1577
1594
|
* fewer weeks than `weekCount`** — i.e. the window is taller than the range.
|
|
1578
1595
|
* Snapping can only pin *one* edge to a bound; if the range is narrower than the
|
|
@@ -1602,8 +1619,6 @@ type OutOfRangeBehavior = "unbounded" | "stop" | "stop-shrink" | "snap" | "snap-
|
|
|
1602
1619
|
* {@link OutOfRangeBehavior} offers for WeeksView's flexible window don't apply.
|
|
1603
1620
|
*/
|
|
1604
1621
|
type MonthOutOfRangeBehavior = "unbounded" | "stop";
|
|
1605
|
-
//#endregion
|
|
1606
|
-
//#region src/month-window.d.ts
|
|
1607
1622
|
/** An ISO year + month. */
|
|
1608
1623
|
interface MonthRef {
|
|
1609
1624
|
year: number;
|
|
@@ -1629,8 +1644,6 @@ interface MonthWindowPolicy {
|
|
|
1629
1644
|
/** The window start that reveals `target` with the smallest shift. */
|
|
1630
1645
|
reveal(start: MonthRef, target: MonthRef): MonthRef;
|
|
1631
1646
|
}
|
|
1632
|
-
//#endregion
|
|
1633
|
-
//#region src/month-view-types.d.ts
|
|
1634
1647
|
/** Props accepted by `MonthView.Root`. */
|
|
1635
1648
|
interface MonthViewRootProps {
|
|
1636
1649
|
/**
|
|
@@ -1720,16 +1733,12 @@ interface MonthViewStateContextValue {
|
|
|
1720
1733
|
/** The root component's state object for render functions. */
|
|
1721
1734
|
rootState: RootState;
|
|
1722
1735
|
}
|
|
1723
|
-
|
|
1724
|
-
//#region src/month-view.d.ts
|
|
1725
|
-
declare function MonthViewRoot(props: MonthViewRootProps): _$react_jsx_runtime0.JSX.Element;
|
|
1736
|
+
declare function MonthViewRoot(props: MonthViewRootProps): import("react").JSX.Element;
|
|
1726
1737
|
type MonthViewProps<F extends ValueFormat = "PlainDate"> = CalendarProviderProps<F> & MonthViewRootProps;
|
|
1727
|
-
declare function MonthView<F extends ValueFormat = "PlainDate">(props: MonthViewProps<F>):
|
|
1738
|
+
declare function MonthView<F extends ValueFormat = "PlainDate">(props: MonthViewProps<F>): import("react").JSX.Element;
|
|
1728
1739
|
declare namespace MonthView {
|
|
1729
|
-
|
|
1740
|
+
export { MonthViewRoot as Root };
|
|
1730
1741
|
}
|
|
1731
|
-
//#endregion
|
|
1732
|
-
//#region src/grid-header.d.ts
|
|
1733
1742
|
/**
|
|
1734
1743
|
* Renders weekday column headers (`<th>`). When no `index` is provided,
|
|
1735
1744
|
* renders all 7 days (Sunday–Saturday). Each cell includes `abbr` and
|
|
@@ -1738,14 +1747,10 @@ declare namespace MonthView {
|
|
|
1738
1747
|
declare const GridHeaderCell: (props: GridHeaderCellProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
|
|
1739
1748
|
/** Table header section (`<thead>`) wrapping a row of {@link GridHeaderCell}s. */
|
|
1740
1749
|
declare const GridHeader: (props: GridHeaderProps & React.RefAttributes<HTMLTableSectionElement>) => React.ReactElement | null;
|
|
1741
|
-
//#endregion
|
|
1742
|
-
//#region src/day-cell-state.d.ts
|
|
1743
1750
|
/** A day cell's state: the public {@link DayCellTemplateState} plus the roving-tabindex flag. */
|
|
1744
1751
|
type DayCellState = DayCellTemplateState & {
|
|
1745
1752
|
isTabTarget: boolean;
|
|
1746
1753
|
};
|
|
1747
|
-
//#endregion
|
|
1748
|
-
//#region src/day-cell.d.ts
|
|
1749
1754
|
/**
|
|
1750
1755
|
* Renders one `<td role="gridcell">` per day. Exposes data-attributes for
|
|
1751
1756
|
* `selected`, `today`, `disabled`, `outside-month`, `focused`,
|
|
@@ -1754,21 +1759,17 @@ type DayCellState = DayCellTemplateState & {
|
|
|
1754
1759
|
* When used inside a {@link WeekTemplate}, iterates over that week's days.
|
|
1755
1760
|
* An explicit `date` prop renders a single cell.
|
|
1756
1761
|
*/
|
|
1757
|
-
declare function DayCellTemplate(props: DayCellTemplateProps):
|
|
1762
|
+
declare function DayCellTemplate(props: DayCellTemplateProps): import("react").JSX.Element;
|
|
1758
1763
|
declare const DayButton: (props: DayButtonProps & {
|
|
1759
1764
|
_derivedState?: DayCellState;
|
|
1760
1765
|
} & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
|
|
1761
|
-
//#endregion
|
|
1762
|
-
//#region src/grid.d.ts
|
|
1763
1766
|
declare const Grid: (props: GridProps & React.RefAttributes<HTMLTableElement>) => React.ReactElement | null;
|
|
1764
1767
|
declare const GridBody: (props: GridBodyProps & React.RefAttributes<HTMLTableSectionElement>) => React.ReactElement | null;
|
|
1765
1768
|
/**
|
|
1766
1769
|
* Iterates over the weeks in the current month and renders one `<tr>` per week.
|
|
1767
1770
|
* Each instance receives its week's days and index via {@link WeekDataContext}.
|
|
1768
1771
|
*/
|
|
1769
|
-
declare function WeekTemplate(props: WeekTemplateProps):
|
|
1770
|
-
//#endregion
|
|
1771
|
-
//#region src/navigation.d.ts
|
|
1772
|
+
declare function WeekTemplate(props: WeekTemplateProps): import("react").JSX.Element;
|
|
1772
1773
|
/**
|
|
1773
1774
|
* Displays the currently selected (or current) date as localized text.
|
|
1774
1775
|
* Renders a `<span>` with `aria-live="polite"`.
|
|
@@ -1803,8 +1804,6 @@ declare const PrevMonthButton: (props: PrevMonthButtonProps & React.RefAttribute
|
|
|
1803
1804
|
* when the next month falls after `max`. Exposes `data-direction="next"`.
|
|
1804
1805
|
*/
|
|
1805
1806
|
declare const NextMonthButton: (props: NextMonthButtonProps & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
|
|
1806
|
-
//#endregion
|
|
1807
|
-
//#region src/selected-range.d.ts
|
|
1808
1807
|
/**
|
|
1809
1808
|
* Visual overlay (`<td role="presentation">`) that highlights the selected
|
|
1810
1809
|
* date range within a single week row. Exposes data-attributes for
|
|
@@ -1812,8 +1811,6 @@ declare const NextMonthButton: (props: NextMonthButtonProps & React.RefAttribute
|
|
|
1812
1811
|
* `end-date`, `extends-before`, and `extends-after`.
|
|
1813
1812
|
*/
|
|
1814
1813
|
declare const RangeSelected: (props: RangeSelectedProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
|
|
1815
|
-
//#endregion
|
|
1816
|
-
//#region src/range-preview.d.ts
|
|
1817
1814
|
/**
|
|
1818
1815
|
* Visual overlay (`<td role="presentation">`) that highlights the hover
|
|
1819
1816
|
* preview range within a single week row. Structurally identical to
|
|
@@ -1821,14 +1818,10 @@ declare const RangeSelected: (props: RangeSelectedProps & React.RefAttributes<HT
|
|
|
1821
1818
|
* the committed range boundaries.
|
|
1822
1819
|
*/
|
|
1823
1820
|
declare const RangePreview: (props: RangePreviewProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
|
|
1824
|
-
//#endregion
|
|
1825
|
-
//#region src/drag-handle.d.ts
|
|
1826
1821
|
/** Convenience wrapper for {@link RangeDragHandle} with `edge="start"`. */
|
|
1827
1822
|
declare const RangeStartDragHandle: (props: RangeStartDragHandleProps & React.RefAttributes<HTMLSpanElement>) => React.ReactElement | null;
|
|
1828
1823
|
/** Convenience wrapper for {@link RangeDragHandle} with `edge="end"`. */
|
|
1829
1824
|
declare const RangeEndDragHandle: (props: RangeEndDragHandleProps & React.RefAttributes<HTMLSpanElement>) => React.ReactElement | null;
|
|
1830
|
-
//#endregion
|
|
1831
|
-
//#region src/week-number.d.ts
|
|
1832
1825
|
/**
|
|
1833
1826
|
* Renders the ISO 8601 week number for a week row. Must be used inside
|
|
1834
1827
|
* a {@link WeekTemplate}. Renders a `<td>` with `role="rowheader"`.
|
|
@@ -1838,8 +1831,6 @@ declare const WeekNumberCell: (props: WeekNumberCellProps & React.RefAttributes<
|
|
|
1838
1831
|
* Column header for the week number column. Renders a `<th scope="col">`.
|
|
1839
1832
|
*/
|
|
1840
1833
|
declare const WeekNumberHeader: (props: WeekNumberHeaderProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement | null;
|
|
1841
|
-
//#endregion
|
|
1842
|
-
//#region src/resolve-first-week.d.ts
|
|
1843
1834
|
/**
|
|
1844
1835
|
* A flexible specifier for a calendar week. Accepts a `Temporal.PlainDate`,
|
|
1845
1836
|
* a native `Date`, an ISO week number, a week-of-year, or a month/day pair.
|
|
@@ -1880,8 +1871,6 @@ declare function resolveFirstWeekSpec(spec: FirstWeekSpec, weekStartDay: WeekSta
|
|
|
1880
1871
|
declare function resolveFirstWeek(currentFirstWeek: Temporal.PlainDate, weekCount: number, target: Temporal.PlainDate, options?: {
|
|
1881
1872
|
snap?: ScrollToWeekSnap;
|
|
1882
1873
|
}): Temporal.PlainDate;
|
|
1883
|
-
//#endregion
|
|
1884
|
-
//#region src/compute-weeks-in-window.d.ts
|
|
1885
1874
|
interface WeekDescriptor {
|
|
1886
1875
|
startDate: Temporal.PlainDate;
|
|
1887
1876
|
endDate: Temporal.PlainDate;
|
|
@@ -1894,23 +1883,30 @@ interface WeekDescriptor {
|
|
|
1894
1883
|
* `firstWeek` is snapped back to the nearest `weekStartDay`.
|
|
1895
1884
|
*/
|
|
1896
1885
|
declare function computeWeeksInWindow(firstWeek: Temporal.PlainDate, weekCount: number, weekStartDay: WeekStartDay, _T: TemporalNamespace): WeekDescriptor[];
|
|
1897
|
-
|
|
1898
|
-
|
|
1886
|
+
/** A window as shown: its first week and how many rows it has (≤ the prop). */
|
|
1887
|
+
interface EffectiveWindow {
|
|
1888
|
+
firstWeek: Temporal.PlainDate;
|
|
1889
|
+
weekCount: number;
|
|
1890
|
+
}
|
|
1899
1891
|
/**
|
|
1900
1892
|
* The rules for where a WeeksView window may sit. Built once from the bounds and
|
|
1901
1893
|
* shared by every way of moving the window (buttons, keyboard, `scrollToWeek`).
|
|
1902
1894
|
*/
|
|
1903
1895
|
interface WeekWindowPolicy {
|
|
1904
|
-
/**
|
|
1905
|
-
resolve(requestedFirstWeek: Temporal.PlainDate):
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1896
|
+
/** The window that is shown for a requested first week. Never refuses. */
|
|
1897
|
+
resolve(requestedFirstWeek: Temporal.PlainDate): EffectiveWindow;
|
|
1898
|
+
/**
|
|
1899
|
+
* The window to move to for a requested first week, or `null` when the
|
|
1900
|
+
* behavior forbids the move (`stop`/`stop-shrink` with no in-range day in it).
|
|
1901
|
+
*/
|
|
1902
|
+
moveTo(requestedFirstWeek: Temporal.PlainDate): EffectiveWindow | null;
|
|
1903
|
+
/**
|
|
1904
|
+
* Moves by `shiftBy` weeks (default: the rows currently shown) from the
|
|
1905
|
+
* window as shown. `null` when the move is forbidden or would not change
|
|
1906
|
+
* the window (`snap` already at the edge).
|
|
1907
|
+
*/
|
|
1908
|
+
shift(current: EffectiveWindow, direction: 1 | -1, shiftBy?: number): EffectiveWindow | null;
|
|
1911
1909
|
}
|
|
1912
|
-
//#endregion
|
|
1913
|
-
//#region src/weeks-view-types.d.ts
|
|
1914
1910
|
/** Props accepted by `WeeksView.Root`. */
|
|
1915
1911
|
interface WeeksViewRootProps {
|
|
1916
1912
|
/** Number of week rows to display simultaneously. */
|
|
@@ -2009,8 +2005,6 @@ interface WeeksViewStateContextValue {
|
|
|
2009
2005
|
/** Render-prop `RootState` exposed to components inside WeeksView. */
|
|
2010
2006
|
rootState: RootState;
|
|
2011
2007
|
}
|
|
2012
|
-
//#endregion
|
|
2013
|
-
//#region src/weeks-view.d.ts
|
|
2014
2008
|
/** Imperative handle exposed by WeeksView.Root via ref. */
|
|
2015
2009
|
interface WeeksViewRootHandle {
|
|
2016
2010
|
scrollToWeek: (target: FirstWeekSpec, options?: {
|
|
@@ -2023,8 +2017,6 @@ declare const WeeksView: WeeksViewComponent;
|
|
|
2023
2017
|
interface WeeksViewComponent extends React$1.ForwardRefExoticComponent<WeeksViewProps & React$1.RefAttributes<WeeksViewRootHandle>> {
|
|
2024
2018
|
Root: typeof WeeksViewRoot;
|
|
2025
2019
|
}
|
|
2026
|
-
//#endregion
|
|
2027
|
-
//#region src/weeks-navigation.d.ts
|
|
2028
2020
|
/** State exposed by `PrevWeeksButton` and `NextWeeksButton`. */
|
|
2029
2021
|
type WeeksNavButtonState = {
|
|
2030
2022
|
root: RootState;
|
|
@@ -2064,33 +2056,42 @@ declare const NextWeeksButton: React$1.ForwardRefExoticComponent<Omit<NextWeeksB
|
|
|
2064
2056
|
* out-of-range modes where the actual count may be less than the `weekCount` prop.
|
|
2065
2057
|
*/
|
|
2066
2058
|
declare const WeekCount: React$1.ForwardRefExoticComponent<Omit<WeekCountProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
2067
|
-
//#endregion
|
|
2068
|
-
//#region src/month-separator.d.ts
|
|
2069
2059
|
/** State exposed by the MonthSeparator component and its children. */
|
|
2070
2060
|
type MonthSeparatorState = {
|
|
2071
|
-
/** Calendar month (1-12). */
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2061
|
+
/** Calendar month (1-12). */
|
|
2062
|
+
month: number;
|
|
2063
|
+
/** Calendar year. */
|
|
2064
|
+
year: number;
|
|
2065
|
+
/** True when this is the first month of a new year in the visible window. */
|
|
2066
|
+
firstOfYear: boolean;
|
|
2067
|
+
/** True for the separator at the top of the visible window. */
|
|
2068
|
+
firstVisible: boolean;
|
|
2069
|
+
/** Number of weeks of the previous month visible above this separator. */
|
|
2070
|
+
weeksVisibleBefore: number;
|
|
2071
|
+
/** Number of weeks of this month visible below this separator. */
|
|
2076
2072
|
weeksVisibleAfter: number;
|
|
2077
2073
|
/**
|
|
2078
2074
|
* 0-based column index where the 1st of the month falls within the week row.
|
|
2079
2075
|
* Accounts for week number column if present (column 0 = week number).
|
|
2080
2076
|
*/
|
|
2081
|
-
firstDayColumn: number;
|
|
2082
|
-
|
|
2077
|
+
firstDayColumn: number;
|
|
2078
|
+
/** Total number of columns (7 days + optional week number column). */
|
|
2079
|
+
totalColumns: number;
|
|
2080
|
+
/** True when the 1st day of this month is visible in the weeks below. */
|
|
2083
2081
|
firstDayVisible: boolean;
|
|
2084
2082
|
/**
|
|
2085
2083
|
* Number of week rows between this separator and the next separator
|
|
2086
2084
|
* (or end of window). Use this for CSS grid `gridRow: span N` to
|
|
2087
2085
|
* avoid overlapping the next month's label.
|
|
2088
2086
|
*/
|
|
2089
|
-
fullWeeksVisibleAfter: number;
|
|
2087
|
+
fullWeeksVisibleAfter: number;
|
|
2088
|
+
/** 1-based grid row index where this separator's weeks start. */
|
|
2090
2089
|
gridRowStart: number;
|
|
2091
2090
|
};
|
|
2092
2091
|
type MonthChildProps = useRender.ComponentProps<"span", MonthSeparatorState> & {
|
|
2093
|
-
/** BCP 47 locale(s) for month name formatting. @default "en-US" */
|
|
2092
|
+
/** BCP 47 locale(s) for month name formatting. @default "en-US" */
|
|
2093
|
+
locale?: string;
|
|
2094
|
+
/** Month name format. @default "long" */
|
|
2094
2095
|
format?: "long" | "short" | "narrow";
|
|
2095
2096
|
};
|
|
2096
2097
|
declare const MonthSeparatorMonth: React$1.ForwardRefExoticComponent<Omit<MonthChildProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
@@ -2111,8 +2112,6 @@ type MonthSeparatorProps = useRender.ComponentProps<"tr", MonthSeparatorState>;
|
|
|
2111
2112
|
* Default children: `<Month /> <Year />`.
|
|
2112
2113
|
*/
|
|
2113
2114
|
declare const MonthSeparator: React$1.ForwardRefExoticComponent<Omit<MonthSeparatorProps, "ref"> & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
2114
|
-
//#endregion
|
|
2115
|
-
//#region src/root-selection.d.ts
|
|
2116
2115
|
/**
|
|
2117
2116
|
* Pure utility that computes the preview range for a hovered date, using the
|
|
2118
2117
|
* same logic as the built-in hover preview. Useful for deriving the preview in
|
|
@@ -2125,20 +2124,14 @@ declare function computePreviewRange(hoveredDate: Temporal.PlainDate, currentRan
|
|
|
2125
2124
|
isDateDisabled?: (date: Temporal.PlainDate) => boolean;
|
|
2126
2125
|
readOnly?: boolean;
|
|
2127
2126
|
}): DateRange<"PlainDate"> | null;
|
|
2128
|
-
//#endregion
|
|
2129
|
-
//#region src/calendar-context.d.ts
|
|
2130
2127
|
/** Returns the stable (callbacks/config) part of CalendarProvider context. */
|
|
2131
2128
|
declare function useCalendarStable(): CalendarStableContextValue;
|
|
2132
2129
|
/** Returns the volatile state part of CalendarProvider context. */
|
|
2133
2130
|
declare function useCalendarState(): CalendarStateContextValue;
|
|
2134
|
-
//#endregion
|
|
2135
|
-
//#region src/month-view-context.d.ts
|
|
2136
2131
|
/** Returns the MonthView stable context (config + callbacks). */
|
|
2137
2132
|
declare function useMonthViewStable(): MonthViewStableContextValue;
|
|
2138
2133
|
/** Returns the MonthView state context (volatile grid data). */
|
|
2139
2134
|
declare function useMonthViewState(): MonthViewStateContextValue;
|
|
2140
|
-
//#endregion
|
|
2141
|
-
//#region src/view-context.d.ts
|
|
2142
2135
|
/** Shared context provided by both MonthView.Root and WeeksView.Root. */
|
|
2143
2136
|
interface ViewContextValue {
|
|
2144
2137
|
/** Which view type is active. */
|
|
@@ -2156,11 +2149,8 @@ interface ViewContextValue {
|
|
|
2156
2149
|
}
|
|
2157
2150
|
/** Returns the nearest view context (MonthView or WeeksView). */
|
|
2158
2151
|
declare function useViewContext(): ViewContextValue;
|
|
2159
|
-
//#endregion
|
|
2160
|
-
//#region src/weeks-view-context.d.ts
|
|
2161
2152
|
/** Returns the WeeksView stable context (config + callbacks). */
|
|
2162
2153
|
declare function useWeeksViewStable(): WeeksViewStableContextValue;
|
|
2163
2154
|
/** Returns the WeeksView state context (volatile grid data). */
|
|
2164
2155
|
declare function useWeeksViewState(): WeeksViewStateContextValue;
|
|
2165
|
-
//#endregion
|
|
2166
2156
|
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-
|
|
2
|
+
const require_weeks_navigation = require("./weeks-navigation-CatYJIKb.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,2 +1,2 @@
|
|
|
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-
|
|
2
|
-
export { CalendarProvider, CalendarProviderProps, CalendarStableContextValue, CalendarStateContextValue, DateRange, DateString, DateStringProps, DateStringState, DateValueObject, DayButton, DayButtonProps, DayButtonState, DayCellDataContext, DayCellTemplate, DayCellTemplateProps, DayCellTemplateState, DragHandleOwnProps, DragHandleState, FirstWeekSpec, Grid, GridBody, GridBodyProps, GridBodyState, GridContext, GridHeader, GridHeaderCell, GridHeaderCellProps, GridHeaderCellState, GridHeaderProps, GridHeaderState, GridProps, GridState, MonthData, MonthOutOfRangeBehavior, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, MonthSeparatorState, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, MonthViewProps, MonthViewRoot, MonthViewRootProps, MonthViewStableContextValue, MonthViewStateContextValue, MonthYearString, MonthYearStringProps, MonthYearStringState, NavButtonState, NextMonthButton, NextMonthButtonProps, NextWeeksButton, NextWeeksButtonProps, OutOfRangeBehavior, OutsideDays, PlainDateObject, PrevMonthButton, PrevMonthButtonProps, PrevWeeksButton, PrevWeeksButtonProps, RangeEndDragHandle, RangeEndDragHandleProps, RangeMode, RangePreview, RangePreviewProps, RangePreviewState, RangeSelected, RangeSelectedProps, RangeSelectedState, RangeStartDragHandle, RangeStartDragHandleProps, RawValueForFormat, RootState, ScrollToWeekSnap, TemporalNamespace, TimeString, TimeStringProps, TimeStringState, ValueChangeMeta, ValueForFormat, ValueFormat, ViewContextValue, VisibleMonth, WeekCount, WeekCountProps, WeekCountState, WeekDataContext, WeekDescriptor, WeekNumberCell, WeekNumberCellProps, WeekNumberCellState, WeekNumberHeader, WeekNumberHeaderProps, WeekNumberHeaderState, WeekStartDay, WeekTemplate, WeekTemplateProps, WeekTemplateState, WeeksNavButtonOwnProps, WeeksNavButtonState, WeeksView, WeeksViewProps, WeeksViewRoot, WeeksViewRootHandle, WeeksViewRootProps, WeeksViewStableContextValue, WeeksViewStateContextValue, 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 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-BqzrxYgn.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 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,2 +1,2 @@
|
|
|
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-
|
|
2
|
-
export { CalendarProvider, CalendarProviderProps, CalendarStableContextValue, CalendarStateContextValue, DateRange, DateString, DateStringProps, DateStringState, DateValueObject, DayButton, DayButtonProps, DayButtonState, DayCellDataContext, DayCellTemplate, DayCellTemplateProps, DayCellTemplateState, DragHandleOwnProps, DragHandleState, FirstWeekSpec, Grid, GridBody, GridBodyProps, GridBodyState, GridContext, GridHeader, GridHeaderCell, GridHeaderCellProps, GridHeaderCellState, GridHeaderProps, GridHeaderState, GridProps, GridState, MonthData, MonthOutOfRangeBehavior, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, MonthSeparatorState, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, MonthViewProps, MonthViewRoot, MonthViewRootProps, MonthViewStableContextValue, MonthViewStateContextValue, MonthYearString, MonthYearStringProps, MonthYearStringState, NavButtonState, NextMonthButton, NextMonthButtonProps, NextWeeksButton, NextWeeksButtonProps, OutOfRangeBehavior, OutsideDays, PlainDateObject, PrevMonthButton, PrevMonthButtonProps, PrevWeeksButton, PrevWeeksButtonProps, RangeEndDragHandle, RangeEndDragHandleProps, RangeMode, RangePreview, RangePreviewProps, RangePreviewState, RangeSelected, RangeSelectedProps, RangeSelectedState, RangeStartDragHandle, RangeStartDragHandleProps, RawValueForFormat, RootState, ScrollToWeekSnap, TemporalNamespace, TimeString, TimeStringProps, TimeStringState, ValueChangeMeta, ValueForFormat, ValueFormat, ViewContextValue, VisibleMonth, WeekCount, WeekCountProps, WeekCountState, WeekDataContext, WeekDescriptor, WeekNumberCell, WeekNumberCellProps, WeekNumberCellState, WeekNumberHeader, WeekNumberHeaderProps, WeekNumberHeaderState, WeekStartDay, WeekTemplate, WeekTemplateProps, WeekTemplateState, WeeksNavButtonOwnProps, WeeksNavButtonState, WeeksView, WeeksViewProps, WeeksViewRoot, WeeksViewRootHandle, WeeksViewRootProps, WeeksViewStableContextValue, WeeksViewStateContextValue, 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 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-CkhYFmf4.mjs";
|
|
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
|
-
|
|
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, F as DayCellDataContext, w as DayCellTemplate, b as Grid, x as GridBody, I 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, R as MonthView, z 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, L 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, V as useMonthViewStable, H as useMonthViewState, B as useViewContext, T as useWeeksViewStable, E as useWeeksViewState } from "./weeks-navigation-BWB5OvqW.mjs";
|