@klinking/colander 2.0.1 → 2.0.2
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 +1 -1
- package/dist/formats/date.mjs +1 -1
- package/dist/formats/object.cjs +1 -1
- package/dist/formats/object.mjs +1 -1
- package/dist/formats/plain-date-time.cjs +1 -1
- package/dist/formats/plain-date-time.mjs +1 -1
- package/dist/formats/plain-date.cjs +1 -1
- package/dist/formats/plain-date.mjs +1 -1
- package/dist/formats/plain-month-day.cjs +1 -1
- package/dist/formats/plain-month-day.mjs +1 -1
- package/dist/formats/plain-year-month.cjs +1 -1
- package/dist/formats/plain-year-month.mjs +1 -1
- package/dist/formats/zoned-date-time.cjs +1 -1
- package/dist/formats/zoned-date-time.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{weeks-navigation-B-Nch3LS.mjs → weeks-navigation-Xve4O55H.mjs} +4 -1
- package/dist/{weeks-navigation-FxcECgCR.cjs → weeks-navigation-epiyL4IP.cjs} +4 -1
- package/package.json +1 -1
- package/src/resolve-first-week.test.ts +10 -0
- package/src/resolve-first-week.ts +9 -3
package/dist/formats/date.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-epiyL4IP.cjs");
|
|
3
3
|
//#region src/formats/date.ts
|
|
4
4
|
const CalendarProvider = require_weeks_navigation.CalendarProvider;
|
|
5
5
|
const MonthView = require_weeks_navigation.MonthView;
|
package/dist/formats/date.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-Xve4O55H.mjs";
|
|
2
2
|
//#region src/formats/date.ts
|
|
3
3
|
const CalendarProvider = CalendarProvider$1;
|
|
4
4
|
const MonthView = MonthView$1;
|
package/dist/formats/object.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-epiyL4IP.cjs");
|
|
3
3
|
//#region src/formats/object.ts
|
|
4
4
|
const CalendarProvider = require_weeks_navigation.CalendarProvider;
|
|
5
5
|
const MonthView = require_weeks_navigation.MonthView;
|
package/dist/formats/object.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-Xve4O55H.mjs";
|
|
2
2
|
//#region src/formats/object.ts
|
|
3
3
|
const CalendarProvider = CalendarProvider$1;
|
|
4
4
|
const MonthView = MonthView$1;
|
|
@@ -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-epiyL4IP.cjs");
|
|
3
3
|
//#region src/formats/plain-date-time.ts
|
|
4
4
|
const CalendarProvider = require_weeks_navigation.CalendarProvider;
|
|
5
5
|
const MonthView = require_weeks_navigation.MonthView;
|
|
@@ -1,4 +1,4 @@
|
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-Xve4O55H.mjs";
|
|
2
2
|
//#region src/formats/plain-date-time.ts
|
|
3
3
|
const CalendarProvider = CalendarProvider$1;
|
|
4
4
|
const MonthView = MonthView$1;
|
|
@@ -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-epiyL4IP.cjs");
|
|
3
3
|
//#region src/formats/plain-date.ts
|
|
4
4
|
const CalendarProvider = require_weeks_navigation.CalendarProvider;
|
|
5
5
|
const MonthView = require_weeks_navigation.MonthView;
|
|
@@ -1,4 +1,4 @@
|
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-Xve4O55H.mjs";
|
|
2
2
|
//#region src/formats/plain-date.ts
|
|
3
3
|
const CalendarProvider = CalendarProvider$1;
|
|
4
4
|
const MonthView = MonthView$1;
|
|
@@ -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-epiyL4IP.cjs");
|
|
3
3
|
//#region src/formats/plain-month-day.ts
|
|
4
4
|
const CalendarProvider = require_weeks_navigation.CalendarProvider;
|
|
5
5
|
const MonthView = require_weeks_navigation.MonthView;
|
|
@@ -1,4 +1,4 @@
|
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-Xve4O55H.mjs";
|
|
2
2
|
//#region src/formats/plain-month-day.ts
|
|
3
3
|
const CalendarProvider = CalendarProvider$1;
|
|
4
4
|
const MonthView = MonthView$1;
|
|
@@ -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-epiyL4IP.cjs");
|
|
3
3
|
//#region src/formats/plain-year-month.ts
|
|
4
4
|
const CalendarProvider = require_weeks_navigation.CalendarProvider;
|
|
5
5
|
const MonthView = require_weeks_navigation.MonthView;
|
|
@@ -1,4 +1,4 @@
|
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-Xve4O55H.mjs";
|
|
2
2
|
//#region src/formats/plain-year-month.ts
|
|
3
3
|
const CalendarProvider = CalendarProvider$1;
|
|
4
4
|
const MonthView = MonthView$1;
|
|
@@ -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-epiyL4IP.cjs");
|
|
3
3
|
//#region src/formats/zoned-date-time.ts
|
|
4
4
|
const CalendarProvider = require_weeks_navigation.CalendarProvider;
|
|
5
5
|
const MonthView = require_weeks_navigation.MonthView;
|
|
@@ -1,4 +1,4 @@
|
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-
|
|
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$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, 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-Xve4O55H.mjs";
|
|
2
2
|
//#region src/formats/zoned-date-time.ts
|
|
3
3
|
const CalendarProvider = CalendarProvider$1;
|
|
4
4
|
const MonthView = MonthView$1;
|
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-epiyL4IP.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.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-Xve4O55H.mjs";
|
|
2
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 };
|
|
@@ -3726,7 +3726,10 @@ function snapToWeekStart(date, weekStartDay) {
|
|
|
3726
3726
|
* @param timeZone - IANA time zone for native `Date` conversion. Defaults to system time zone.
|
|
3727
3727
|
*/
|
|
3728
3728
|
function resolveFirstWeekSpec(spec, weekStartDay, T, timeZone) {
|
|
3729
|
-
if ("
|
|
3729
|
+
if ("calendarId" in spec) {
|
|
3730
|
+
const pd = spec;
|
|
3731
|
+
return snapToWeekStart(pd.calendarId === "iso8601" ? pd : pd.withCalendar("iso8601"), weekStartDay);
|
|
3732
|
+
}
|
|
3730
3733
|
if (spec instanceof Date) {
|
|
3731
3734
|
const tz = timeZone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3732
3735
|
const parts = new Intl.DateTimeFormat("en-US", {
|
|
@@ -3749,7 +3749,10 @@ function snapToWeekStart(date, weekStartDay) {
|
|
|
3749
3749
|
* @param timeZone - IANA time zone for native `Date` conversion. Defaults to system time zone.
|
|
3750
3750
|
*/
|
|
3751
3751
|
function resolveFirstWeekSpec(spec, weekStartDay, T, timeZone) {
|
|
3752
|
-
if ("
|
|
3752
|
+
if ("calendarId" in spec) {
|
|
3753
|
+
const pd = spec;
|
|
3754
|
+
return snapToWeekStart(pd.calendarId === "iso8601" ? pd : pd.withCalendar("iso8601"), weekStartDay);
|
|
3755
|
+
}
|
|
3753
3756
|
if (spec instanceof Date) {
|
|
3754
3757
|
const tz = timeZone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3755
3758
|
const parts = new Intl.DateTimeFormat("en-US", {
|
package/package.json
CHANGED
|
@@ -61,6 +61,16 @@ describe("resolveFirstWeekSpec", () => {
|
|
|
61
61
|
const result = resolveFirstWeekSpec(spec, weekStartDay, T);
|
|
62
62
|
expect(result.toString()).toBe(expected);
|
|
63
63
|
});
|
|
64
|
+
|
|
65
|
+
it("converts a non-ISO-calendar PlainDate to ISO before snapping", () => {
|
|
66
|
+
// Buddhist 2026-03-15 (a Sunday) — its calendar fields read year 2569.
|
|
67
|
+
// Pre-fix the PlainDate fell through to the {month,year,day} branch and
|
|
68
|
+
// those fields were reinterpreted as ISO → ~543 years off.
|
|
69
|
+
const buddhist = T.PlainDate.from("2026-03-15").withCalendar("buddhist");
|
|
70
|
+
const result = resolveFirstWeekSpec(buddhist, 0, T);
|
|
71
|
+
expect(result.toString()).toBe("2026-03-15");
|
|
72
|
+
expect(result.calendarId).toBe("iso8601");
|
|
73
|
+
});
|
|
64
74
|
});
|
|
65
75
|
|
|
66
76
|
describe("resolveFirstWeek", () => {
|
|
@@ -40,9 +40,15 @@ export function resolveFirstWeekSpec(
|
|
|
40
40
|
T: TemporalNamespace,
|
|
41
41
|
timeZone?: string,
|
|
42
42
|
): Temporal.PlainDate {
|
|
43
|
-
// 1. PlainDate —
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
// 1. Temporal.PlainDate — identified by its `calendarId` (modern Temporal
|
|
44
|
+
// and @js-temporal/polyfill 0.5+ expose `calendarId`, not `calendar`).
|
|
45
|
+
// Convert non-ISO calendars to ISO so the rest of the pipeline — which
|
|
46
|
+
// is ISO-only — stays consistent; the week snap itself is
|
|
47
|
+
// calendar-independent.
|
|
48
|
+
if ("calendarId" in spec) {
|
|
49
|
+
const pd = spec as Temporal.PlainDate;
|
|
50
|
+
const iso = pd.calendarId === "iso8601" ? pd : pd.withCalendar("iso8601");
|
|
51
|
+
return snapToWeekStart(iso, weekStartDay);
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
// 2. Native Date
|