react-timelane 1.2.1 → 1.2.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.
Files changed (139) hide show
  1. package/dist/_virtual/bind-all.js +4 -0
  2. package/dist/_virtual/bind.js +4 -0
  3. package/dist/_virtual/index.js +5 -0
  4. package/dist/_virtual/index2.js +4 -0
  5. package/dist/_virtual/index3.js +5 -0
  6. package/dist/_virtual/index4.js +4 -0
  7. package/dist/_virtual/react-dom.development.js +4 -0
  8. package/dist/_virtual/react-dom.production.js +4 -0
  9. package/dist/components/Timelane/Timelane.css +1 -0
  10. package/dist/components/Timelane/Timelane.js +53 -0
  11. package/dist/components/TimelaneAllocation/TimelaneAllocation.js +49 -0
  12. package/dist/components/TimelaneAside/TimelaneAside.js +60 -0
  13. package/dist/components/TimelaneBackground/TimelaneBackground.js +46 -0
  14. package/dist/components/TimelaneBody/TimelaneBody.js +13 -0
  15. package/dist/components/TimelaneBody/TimelaneSelectionLayer.js +96 -0
  16. package/dist/components/TimelaneHeader/DaysHeader.js +30 -0
  17. package/dist/components/TimelaneHeader/MonthsHeader.js +38 -0
  18. package/dist/components/TimelaneHeader/TimelaneHeader.js +55 -0
  19. package/dist/components/TimelaneHeader/WeeksHeader.js +39 -0
  20. package/dist/components/TimelaneHeader/renderingUtils.js +26 -0
  21. package/dist/components/TimelaneItem/DragResizeComponent.js +125 -0
  22. package/dist/components/TimelaneItem/TimelaneItem.js +42 -0
  23. package/dist/components/TimelaneLane/DropPreview.js +25 -0
  24. package/dist/components/TimelaneLane/DropTarget.js +57 -0
  25. package/dist/components/TimelaneLane/OverlapIndicator.js +21 -0
  26. package/dist/components/TimelaneLane/TimelaneLane.js +164 -0
  27. package/dist/components/TimelaneLayout/TimelaneLayout.js +77 -0
  28. package/dist/components/TimelaneLayout/layout.css +1 -0
  29. package/dist/components/TimelaneSettingsProvider/TimelaneSettingsContext.js +21 -0
  30. package/dist/components/TimelaneSettingsProvider/TimelaneSettingsProvider.js +15 -0
  31. package/dist/components/utils.js +243 -0
  32. package/dist/hooks/useScroll.js +47 -0
  33. package/dist/hooks/useTimelaneContext.js +6 -0
  34. package/dist/index.js +36 -0
  35. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +4 -0
  36. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter.js +127 -0
  37. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +9 -0
  38. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +4 -0
  39. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +7 -0
  40. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/make-honey-pot-fix.js +226 -0
  41. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +107 -0
  42. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +195 -0
  43. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +21 -0
  44. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +43 -0
  45. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +253 -0
  46. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +121 -0
  47. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +12 -0
  48. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +17 -0
  49. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +9 -0
  50. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +8 -0
  51. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +57 -0
  52. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +9 -0
  53. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +13 -0
  54. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +47 -0
  55. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +17 -0
  56. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +7 -0
  57. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +10 -0
  58. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/max-z-index.js +4 -0
  59. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +4 -0
  60. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/url-media-type.js +4 -0
  61. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +8 -0
  62. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +6 -0
  63. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
  64. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
  65. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +6 -0
  66. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +21 -0
  67. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +7 -0
  68. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +7 -0
  69. package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
  70. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
  71. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
  72. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
  73. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
  74. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +11 -0
  75. package/dist/node_modules/bind-event-listener/dist/bind-all.js +45 -0
  76. package/dist/node_modules/bind-event-listener/dist/bind.js +16 -0
  77. package/dist/node_modules/bind-event-listener/dist/index.js +20 -0
  78. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
  79. package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  80. package/dist/node_modules/date-fns/_lib/format/formatters.js +583 -0
  81. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
  82. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
  83. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
  84. package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
  85. package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
  86. package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
  87. package/dist/node_modules/date-fns/addDays.js +10 -0
  88. package/dist/node_modules/date-fns/addWeeks.js +8 -0
  89. package/dist/node_modules/date-fns/constants.js +6 -0
  90. package/dist/node_modules/date-fns/constructFrom.js +8 -0
  91. package/dist/node_modules/date-fns/differenceInCalendarDays.js +16 -0
  92. package/dist/node_modules/date-fns/eachDayOfInterval.js +17 -0
  93. package/dist/node_modules/date-fns/eachMonthOfInterval.js +17 -0
  94. package/dist/node_modules/date-fns/eachWeekOfInterval.js +22 -0
  95. package/dist/node_modules/date-fns/format.js +59 -0
  96. package/dist/node_modules/date-fns/getDay.js +8 -0
  97. package/dist/node_modules/date-fns/getDayOfYear.js +11 -0
  98. package/dist/node_modules/date-fns/getISOWeek.js +12 -0
  99. package/dist/node_modules/date-fns/getISOWeekYear.js +15 -0
  100. package/dist/node_modules/date-fns/getWeek.js +12 -0
  101. package/dist/node_modules/date-fns/getWeekYear.js +17 -0
  102. package/dist/node_modules/date-fns/isDate.js +7 -0
  103. package/dist/node_modules/date-fns/isSameDay.js +14 -0
  104. package/dist/node_modules/date-fns/isSunday.js +8 -0
  105. package/dist/node_modules/date-fns/isValid.js +9 -0
  106. package/dist/node_modules/date-fns/lastDayOfMonth.js +9 -0
  107. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
  108. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
  109. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
  110. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
  111. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
  112. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
  113. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
  114. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
  115. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
  116. package/dist/node_modules/date-fns/locale/en-US.js +21 -0
  117. package/dist/node_modules/date-fns/max.js +14 -0
  118. package/dist/node_modules/date-fns/min.js +14 -0
  119. package/dist/node_modules/date-fns/nextDay.js +10 -0
  120. package/dist/node_modules/date-fns/nextSunday.js +8 -0
  121. package/dist/node_modules/date-fns/setHours.js +9 -0
  122. package/dist/node_modules/date-fns/startOfDay.js +9 -0
  123. package/dist/node_modules/date-fns/startOfISOWeek.js +8 -0
  124. package/dist/node_modules/date-fns/startOfISOWeekYear.js +11 -0
  125. package/dist/node_modules/date-fns/startOfWeek.js +11 -0
  126. package/dist/node_modules/date-fns/startOfWeekYear.js +13 -0
  127. package/dist/node_modules/date-fns/startOfYear.js +9 -0
  128. package/dist/node_modules/date-fns/toDate.js +8 -0
  129. package/dist/node_modules/raf-schd/dist/raf-schd.esm.js +15 -0
  130. package/dist/node_modules/re-resizable/lib/index.js +424 -0
  131. package/dist/node_modules/re-resizable/lib/resizer.js +49 -0
  132. package/dist/node_modules/react-dom/cjs/react-dom.development.js +227 -0
  133. package/dist/node_modules/react-dom/cjs/react-dom.production.js +147 -0
  134. package/dist/node_modules/react-dom/index.js +23 -0
  135. package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +12 -0
  136. package/dist/types/Item.js +6 -0
  137. package/package.json +10 -7
  138. package/dist/react-timelane.css +0 -1
  139. package/dist/react-timelane.js +0 -4754
@@ -0,0 +1,11 @@
1
+ import { constructFrom as e } from "../constructFrom.js";
2
+ function m(n, ...o) {
3
+ const r = e.bind(
4
+ null,
5
+ n || o.find((t) => typeof t == "object")
6
+ );
7
+ return o.map(r);
8
+ }
9
+ export {
10
+ m as normalizeDates
11
+ };
@@ -0,0 +1,8 @@
1
+ import { normalizeDates as o } from "./normalizeDates.js";
2
+ function m(r, t) {
3
+ const [n, e] = o(r, t.start, t.end);
4
+ return { start: n, end: e };
5
+ }
6
+ export {
7
+ m as normalizeInterval
8
+ };
@@ -0,0 +1,20 @@
1
+ const r = /^D+$/, s = /^Y+$/, a = ["D", "DD", "YY", "YYYY"];
2
+ function i(e) {
3
+ return r.test(e);
4
+ }
5
+ function f(e) {
6
+ return s.test(e);
7
+ }
8
+ function d(e, o, n) {
9
+ const t = c(e, o, n);
10
+ if (console.warn(t), a.includes(e)) throw new RangeError(t);
11
+ }
12
+ function c(e, o, n) {
13
+ const t = e[0] === "Y" ? "years" : "days of the month";
14
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${o}\`) for formatting ${t} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
15
+ }
16
+ export {
17
+ i as isProtectedDayOfYearToken,
18
+ f as isProtectedWeekYearToken,
19
+ d as warnOrThrowProtectedError
20
+ };
@@ -0,0 +1,10 @@
1
+ import { constructFrom as f } from "./constructFrom.js";
2
+ import { toDate as c } from "./toDate.js";
3
+ function N(a, t, e) {
4
+ const r = c(a, e == null ? void 0 : e.in);
5
+ return isNaN(t) ? f(a, NaN) : (t && r.setDate(r.getDate() + t), r);
6
+ }
7
+ export {
8
+ N as addDays,
9
+ N as default
10
+ };
@@ -0,0 +1,8 @@
1
+ import { addDays as r } from "./addDays.js";
2
+ function o(a, d, e) {
3
+ return r(a, d * 7, e);
4
+ }
5
+ export {
6
+ o as addWeeks,
7
+ o as default
8
+ };
@@ -0,0 +1,6 @@
1
+ const o = 6048e5, c = 864e5, n = Symbol.for("constructDateFrom");
2
+ export {
3
+ n as constructFromSymbol,
4
+ c as millisecondsInDay,
5
+ o as millisecondsInWeek
6
+ };
@@ -0,0 +1,8 @@
1
+ import { constructFromSymbol as o } from "./constants.js";
2
+ function c(r, n) {
3
+ return typeof r == "function" ? r(n) : r && typeof r == "object" && o in r ? r[o](n) : r instanceof Date ? new r.constructor(n) : new Date(n);
4
+ }
5
+ export {
6
+ c as constructFrom,
7
+ c as default
8
+ };
@@ -0,0 +1,16 @@
1
+ import { getTimezoneOffsetInMilliseconds as a } from "./_lib/getTimezoneOffsetInMilliseconds.js";
2
+ import { normalizeDates as c } from "./_lib/normalizeDates.js";
3
+ import { millisecondsInDay as D } from "./constants.js";
4
+ import { startOfDay as m } from "./startOfDay.js";
5
+ function p(n, i, e) {
6
+ const [f, l] = c(
7
+ e == null ? void 0 : e.in,
8
+ n,
9
+ i
10
+ ), r = m(f), t = m(l), o = +r - a(r), s = +t - a(t);
11
+ return Math.round((o - s) / D);
12
+ }
13
+ export {
14
+ p as default,
15
+ p as differenceInCalendarDays
16
+ };
@@ -0,0 +1,17 @@
1
+ import { normalizeInterval as o } from "./_lib/normalizeInterval.js";
2
+ import { constructFrom as u } from "./constructFrom.js";
3
+ function v(c, r) {
4
+ const { start: t, end: s } = o(r == null ? void 0 : r.in, c);
5
+ let a = +t > +s;
6
+ const l = a ? +t : +s, e = a ? s : t;
7
+ e.setHours(0, 0, 0, 0);
8
+ let m = 1;
9
+ const n = [];
10
+ for (; +e <= l; )
11
+ n.push(u(t, e)), e.setDate(e.getDate() + m), e.setHours(0, 0, 0, 0);
12
+ return a ? n.reverse() : n;
13
+ }
14
+ export {
15
+ v as default,
16
+ v as eachDayOfInterval
17
+ };
@@ -0,0 +1,17 @@
1
+ import { normalizeInterval as m } from "./_lib/normalizeInterval.js";
2
+ import { constructFrom as d } from "./constructFrom.js";
3
+ function f(o, r) {
4
+ const { start: t, end: n } = m(r == null ? void 0 : r.in, o);
5
+ let s = +t > +n;
6
+ const c = s ? +t : +n, e = s ? n : t;
7
+ e.setHours(0, 0, 0, 0), e.setDate(1);
8
+ let l = 1;
9
+ const a = [];
10
+ for (; +e <= c; )
11
+ a.push(d(t, e)), e.setMonth(e.getMonth() + l);
12
+ return s ? a.reverse() : a;
13
+ }
14
+ export {
15
+ f as default,
16
+ f as eachMonthOfInterval
17
+ };
@@ -0,0 +1,22 @@
1
+ import { normalizeInterval as n } from "./_lib/normalizeInterval.js";
2
+ import { addWeeks as W } from "./addWeeks.js";
3
+ import { constructFrom as v } from "./constructFrom.js";
4
+ import { startOfWeek as s } from "./startOfWeek.js";
5
+ function O(l, e) {
6
+ const { start: m, end: u } = n(e == null ? void 0 : e.in, l);
7
+ let t = +m > +u;
8
+ const f = t ? s(u, e) : s(m, e), d = t ? s(m, e) : s(u, e);
9
+ f.setHours(15), d.setHours(15);
10
+ const k = +d.getTime();
11
+ let r = f, a = (e == null ? void 0 : e.step) ?? 1;
12
+ if (!a) return [];
13
+ a < 0 && (a = -a, t = !t);
14
+ const c = [];
15
+ for (; +r <= k; )
16
+ r.setHours(0), c.push(v(m, r)), r = W(r, a), r.setHours(15);
17
+ return t ? c.reverse() : c;
18
+ }
19
+ export {
20
+ O as default,
21
+ O as eachWeekOfInterval
22
+ };
@@ -0,0 +1,59 @@
1
+ import { getDefaultOptions as w } from "./_lib/defaultOptions.js";
2
+ import { formatters as k } from "./_lib/format/formatters.js";
3
+ import { longFormatters as T } from "./_lib/format/longFormatters.js";
4
+ import { isProtectedWeekYearToken as D, isProtectedDayOfYearToken as E, warnOrThrowProtectedError as v } from "./_lib/protectedTokens.js";
5
+ import { isValid as O } from "./isValid.js";
6
+ import { toDate as R } from "./toDate.js";
7
+ import { enUS as x } from "./locale/en-US.js";
8
+ const C = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, P = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, S = /^'([^]*?)'?$/, z = /''/g, F = /[a-zA-Z]/;
9
+ function q(r, o, i) {
10
+ var f, m, p, u;
11
+ const a = w(), n = a.locale ?? x, g = a.firstWeekContainsDate ?? ((m = (f = a.locale) == null ? void 0 : f.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, h = a.weekStartsOn ?? ((u = (p = a.locale) == null ? void 0 : p.options) == null ? void 0 : u.weekStartsOn) ?? 0, c = R(r, i == null ? void 0 : i.in);
12
+ if (!O(c))
13
+ throw new RangeError("Invalid time value");
14
+ let s = o.match(P).map((t) => {
15
+ const e = t[0];
16
+ if (e === "p" || e === "P") {
17
+ const l = T[e];
18
+ return l(t, n.formatLong);
19
+ }
20
+ return t;
21
+ }).join("").match(C).map((t) => {
22
+ if (t === "''")
23
+ return { isToken: !1, value: "'" };
24
+ const e = t[0];
25
+ if (e === "'")
26
+ return { isToken: !1, value: W(t) };
27
+ if (k[e])
28
+ return { isToken: !0, value: t };
29
+ if (e.match(F))
30
+ throw new RangeError(
31
+ "Format string contains an unescaped latin alphabet character `" + e + "`"
32
+ );
33
+ return { isToken: !1, value: t };
34
+ });
35
+ n.localize.preprocessor && (s = n.localize.preprocessor(c, s));
36
+ const d = {
37
+ firstWeekContainsDate: g,
38
+ weekStartsOn: h,
39
+ locale: n
40
+ };
41
+ return s.map((t) => {
42
+ if (!t.isToken) return t.value;
43
+ const e = t.value;
44
+ (D(e) || E(e)) && v(e, o, String(r));
45
+ const l = k[e[0]];
46
+ return l(c, e, n.localize, d);
47
+ }).join("");
48
+ }
49
+ function W(r) {
50
+ const o = r.match(S);
51
+ return o ? o[1].replace(z, "'") : r;
52
+ }
53
+ export {
54
+ q as default,
55
+ q as format,
56
+ q as formatDate,
57
+ k as formatters,
58
+ T as longFormatters
59
+ };
@@ -0,0 +1,8 @@
1
+ import { toDate as r } from "./toDate.js";
2
+ function f(a, e) {
3
+ return r(a, e == null ? void 0 : e.in).getDay();
4
+ }
5
+ export {
6
+ f as default,
7
+ f as getDay
8
+ };
@@ -0,0 +1,11 @@
1
+ import { differenceInCalendarDays as e } from "./differenceInCalendarDays.js";
2
+ import { startOfYear as t } from "./startOfYear.js";
3
+ import { toDate as d } from "./toDate.js";
4
+ function y(f, r) {
5
+ const a = d(f, r == null ? void 0 : r.in);
6
+ return e(a, t(a)) + 1;
7
+ }
8
+ export {
9
+ y as default,
10
+ y as getDayOfYear
11
+ };
@@ -0,0 +1,12 @@
1
+ import { millisecondsInWeek as m } from "./constants.js";
2
+ import { startOfISOWeek as a } from "./startOfISOWeek.js";
3
+ import { startOfISOWeekYear as o } from "./startOfISOWeekYear.js";
4
+ import { toDate as d } from "./toDate.js";
5
+ function k(t, e) {
6
+ const r = d(t, e == null ? void 0 : e.in), f = +a(r) - +o(r);
7
+ return Math.round(f / m) + 1;
8
+ }
9
+ export {
10
+ k as default,
11
+ k as getISOWeek
12
+ };
@@ -0,0 +1,15 @@
1
+ import { constructFrom as f } from "./constructFrom.js";
2
+ import { startOfISOWeek as u } from "./startOfISOWeek.js";
3
+ import { toDate as c } from "./toDate.js";
4
+ function Y(o, r) {
5
+ const e = c(o, r == null ? void 0 : r.in), t = e.getFullYear(), a = f(e, 0);
6
+ a.setFullYear(t + 1, 0, 4), a.setHours(0, 0, 0, 0);
7
+ const m = u(a), s = f(e, 0);
8
+ s.setFullYear(t, 0, 4), s.setHours(0, 0, 0, 0);
9
+ const n = u(s);
10
+ return e.getTime() >= m.getTime() ? t + 1 : e.getTime() >= n.getTime() ? t : t - 1;
11
+ }
12
+ export {
13
+ Y as default,
14
+ Y as getISOWeekYear
15
+ };
@@ -0,0 +1,12 @@
1
+ import { millisecondsInWeek as m } from "./constants.js";
2
+ import { startOfWeek as a } from "./startOfWeek.js";
3
+ import { startOfWeekYear as d } from "./startOfWeekYear.js";
4
+ import { toDate as c } from "./toDate.js";
5
+ function l(t, e) {
6
+ const r = c(t, e == null ? void 0 : e.in), f = +a(r, e) - +d(r, e);
7
+ return Math.round(f / m) + 1;
8
+ }
9
+ export {
10
+ l as default,
11
+ l as getWeek
12
+ };
@@ -0,0 +1,17 @@
1
+ import { getDefaultOptions as C } from "./_lib/defaultOptions.js";
2
+ import { constructFrom as Y } from "./constructFrom.js";
3
+ import { startOfWeek as D } from "./startOfWeek.js";
4
+ import { toDate as F } from "./toDate.js";
5
+ function H(t, e) {
6
+ var u, k, m, W;
7
+ const a = F(t, e == null ? void 0 : e.in), r = a.getFullYear(), c = C(), s = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((k = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : k.firstWeekContainsDate) ?? c.firstWeekContainsDate ?? ((W = (m = c.locale) == null ? void 0 : m.options) == null ? void 0 : W.firstWeekContainsDate) ?? 1, f = Y((e == null ? void 0 : e.in) || t, 0);
8
+ f.setFullYear(r + 1, 0, s), f.setHours(0, 0, 0, 0);
9
+ const O = D(f, e), l = Y((e == null ? void 0 : e.in) || t, 0);
10
+ l.setFullYear(r, 0, s), l.setHours(0, 0, 0, 0);
11
+ const n = D(l, e);
12
+ return +a >= +O ? r + 1 : +a >= +n ? r : r - 1;
13
+ }
14
+ export {
15
+ H as default,
16
+ H as getWeekYear
17
+ };
@@ -0,0 +1,7 @@
1
+ function e(t) {
2
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
3
+ }
4
+ export {
5
+ e as default,
6
+ e as isDate
7
+ };
@@ -0,0 +1,14 @@
1
+ import { normalizeDates as d } from "./_lib/normalizeDates.js";
2
+ import { startOfDay as t } from "./startOfDay.js";
3
+ function D(e, r, a) {
4
+ const [f, m] = d(
5
+ a == null ? void 0 : a.in,
6
+ e,
7
+ r
8
+ );
9
+ return +t(f) == +t(m);
10
+ }
11
+ export {
12
+ D as default,
13
+ D as isSameDay
14
+ };
@@ -0,0 +1,8 @@
1
+ import { toDate as r } from "./toDate.js";
2
+ function u(e, a) {
3
+ return r(e, a == null ? void 0 : a.in).getDay() === 0;
4
+ }
5
+ export {
6
+ u as default,
7
+ u as isSunday
8
+ };
@@ -0,0 +1,9 @@
1
+ import { isDate as r } from "./isDate.js";
2
+ import { toDate as t } from "./toDate.js";
3
+ function f(o) {
4
+ return !(!r(o) && typeof o != "number" || isNaN(+t(o)));
5
+ }
6
+ export {
7
+ f as default,
8
+ f as isValid
9
+ };
@@ -0,0 +1,9 @@
1
+ import { toDate as a } from "./toDate.js";
2
+ function f(r, e) {
3
+ const t = a(r, e == null ? void 0 : e.in), l = t.getMonth();
4
+ return t.setFullYear(t.getFullYear(), l + 1, 0), t.setHours(0, 0, 0, 0), a(t, e == null ? void 0 : e.in);
5
+ }
6
+ export {
7
+ f as default,
8
+ f as lastDayOfMonth
9
+ };
@@ -0,0 +1,9 @@
1
+ function r(t) {
2
+ return (d = {}) => {
3
+ const n = d.width ? String(d.width) : t.defaultWidth;
4
+ return t.formats[n] || t.formats[t.defaultWidth];
5
+ };
6
+ }
7
+ export {
8
+ r as buildFormatLongFn
9
+ };
@@ -0,0 +1,18 @@
1
+ function h(e) {
2
+ return (a, t) => {
3
+ const c = t != null && t.context ? String(t.context) : "standalone";
4
+ let l;
5
+ if (c === "formatting" && e.formattingValues) {
6
+ const d = e.defaultFormattingWidth || e.defaultWidth, u = t != null && t.width ? String(t.width) : d;
7
+ l = e.formattingValues[u] || e.formattingValues[d];
8
+ } else {
9
+ const d = e.defaultWidth, u = t != null && t.width ? String(t.width) : e.defaultWidth;
10
+ l = e.values[u] || e.values[d];
11
+ }
12
+ const f = e.argumentCallback ? e.argumentCallback(a) : a;
13
+ return l[f];
14
+ };
15
+ }
16
+ export {
17
+ h as buildLocalizeFn
18
+ };
@@ -0,0 +1,31 @@
1
+ function P(t) {
2
+ return (n, e = {}) => {
3
+ const l = e.width, h = l && t.matchPatterns[l] || t.matchPatterns[t.defaultMatchWidth], i = n.match(h);
4
+ if (!i)
5
+ return null;
6
+ const r = i[0], c = l && t.parsePatterns[l] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ? o(c, (u) => u.test(r)) : (
7
+ // [TODO] -- I challenge you to fix the type
8
+ s(c, (u) => u.test(r))
9
+ );
10
+ let a;
11
+ a = t.valueCallback ? t.valueCallback(d) : d, a = e.valueCallback ? (
12
+ // [TODO] -- I challenge you to fix the type
13
+ e.valueCallback(a)
14
+ ) : a;
15
+ const f = n.slice(r.length);
16
+ return { value: a, rest: f };
17
+ };
18
+ }
19
+ function s(t, n) {
20
+ for (const e in t)
21
+ if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
22
+ return e;
23
+ }
24
+ function o(t, n) {
25
+ for (let e = 0; e < t.length; e++)
26
+ if (n(t[e]))
27
+ return e;
28
+ }
29
+ export {
30
+ P as buildMatchFn
31
+ };
@@ -0,0 +1,15 @@
1
+ function h(t) {
2
+ return (e, c = {}) => {
3
+ const n = e.match(t.matchPattern);
4
+ if (!n) return null;
5
+ const u = n[0], a = e.match(t.parsePattern);
6
+ if (!a) return null;
7
+ let l = t.valueCallback ? t.valueCallback(a[0]) : a[0];
8
+ l = c.valueCallback ? c.valueCallback(l) : l;
9
+ const r = e.slice(u.length);
10
+ return { value: l, rest: r };
11
+ };
12
+ }
13
+ export {
14
+ h as buildMatchPatternFn
15
+ };
@@ -0,0 +1,70 @@
1
+ const a = {
2
+ lessThanXSeconds: {
3
+ one: "less than a second",
4
+ other: "less than {{count}} seconds"
5
+ },
6
+ xSeconds: {
7
+ one: "1 second",
8
+ other: "{{count}} seconds"
9
+ },
10
+ halfAMinute: "half a minute",
11
+ lessThanXMinutes: {
12
+ one: "less than a minute",
13
+ other: "less than {{count}} minutes"
14
+ },
15
+ xMinutes: {
16
+ one: "1 minute",
17
+ other: "{{count}} minutes"
18
+ },
19
+ aboutXHours: {
20
+ one: "about 1 hour",
21
+ other: "about {{count}} hours"
22
+ },
23
+ xHours: {
24
+ one: "1 hour",
25
+ other: "{{count}} hours"
26
+ },
27
+ xDays: {
28
+ one: "1 day",
29
+ other: "{{count}} days"
30
+ },
31
+ aboutXWeeks: {
32
+ one: "about 1 week",
33
+ other: "about {{count}} weeks"
34
+ },
35
+ xWeeks: {
36
+ one: "1 week",
37
+ other: "{{count}} weeks"
38
+ },
39
+ aboutXMonths: {
40
+ one: "about 1 month",
41
+ other: "about {{count}} months"
42
+ },
43
+ xMonths: {
44
+ one: "1 month",
45
+ other: "{{count}} months"
46
+ },
47
+ aboutXYears: {
48
+ one: "about 1 year",
49
+ other: "about {{count}} years"
50
+ },
51
+ xYears: {
52
+ one: "1 year",
53
+ other: "{{count}} years"
54
+ },
55
+ overXYears: {
56
+ one: "over 1 year",
57
+ other: "over {{count}} years"
58
+ },
59
+ almostXYears: {
60
+ one: "almost 1 year",
61
+ other: "almost {{count}} years"
62
+ }
63
+ }, r = (s, n, o) => {
64
+ let e;
65
+ const t = a[s];
66
+ return typeof t == "string" ? e = t : n === 1 ? e = t.one : e = t.other.replace("{{count}}", n.toString()), o != null && o.addSuffix ? o.comparison && o.comparison > 0 ? "in " + e : e + " ago" : e;
67
+ };
68
+ export {
69
+ r as formatDistance
70
+ };
@@ -0,0 +1,33 @@
1
+ import { buildFormatLongFn as t } from "../../_lib/buildFormatLongFn.js";
2
+ const m = {
3
+ full: "EEEE, MMMM do, y",
4
+ long: "MMMM do, y",
5
+ medium: "MMM d, y",
6
+ short: "MM/dd/yyyy"
7
+ }, a = {
8
+ full: "h:mm:ss a zzzz",
9
+ long: "h:mm:ss a z",
10
+ medium: "h:mm:ss a",
11
+ short: "h:mm a"
12
+ }, o = {
13
+ full: "{{date}} 'at' {{time}}",
14
+ long: "{{date}} 'at' {{time}}",
15
+ medium: "{{date}}, {{time}}",
16
+ short: "{{date}}, {{time}}"
17
+ }, e = {
18
+ date: t({
19
+ formats: m,
20
+ defaultWidth: "full"
21
+ }),
22
+ time: t({
23
+ formats: a,
24
+ defaultWidth: "full"
25
+ }),
26
+ dateTime: t({
27
+ formats: o,
28
+ defaultWidth: "full"
29
+ })
30
+ };
31
+ export {
32
+ e as formatLong
33
+ };
@@ -0,0 +1,11 @@
1
+ const t = {
2
+ lastWeek: "'last' eeee 'at' p",
3
+ yesterday: "'yesterday at' p",
4
+ today: "'today at' p",
5
+ tomorrow: "'tomorrow at' p",
6
+ nextWeek: "eeee 'at' p",
7
+ other: "P"
8
+ }, s = (e, a, o, r) => t[e];
9
+ export {
10
+ s as formatRelative
11
+ };