@cdx-ui/formatters 0.0.1-beta.132

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 (464) hide show
  1. package/README.md +108 -0
  2. package/lib/commonjs/dates/calendar/formatCalendarMonthYear.js +28 -0
  3. package/lib/commonjs/dates/calendar/formatCalendarMonthYear.js.map +1 -0
  4. package/lib/commonjs/dates/calendar/formatDateTimeListDateRow.js +40 -0
  5. package/lib/commonjs/dates/calendar/formatDateTimeListDateRow.js.map +1 -0
  6. package/lib/commonjs/dates/calendar/formatMonthCalendarMonth.js +28 -0
  7. package/lib/commonjs/dates/calendar/formatMonthCalendarMonth.js.map +1 -0
  8. package/lib/commonjs/dates/calendar/formatMonthCalendarYear.js +16 -0
  9. package/lib/commonjs/dates/calendar/formatMonthCalendarYear.js.map +1 -0
  10. package/lib/commonjs/dates/calendar/getCalendarWeekdayLabels.js +23 -0
  11. package/lib/commonjs/dates/calendar/getCalendarWeekdayLabels.js.map +1 -0
  12. package/lib/commonjs/dates/datetime/clampDateTimeId.js +27 -0
  13. package/lib/commonjs/dates/datetime/clampDateTimeId.js.map +1 -0
  14. package/lib/commonjs/dates/datetime/compareDateTimeIds.js +28 -0
  15. package/lib/commonjs/dates/datetime/compareDateTimeIds.js.map +1 -0
  16. package/lib/commonjs/dates/datetime/dateTimeId.js +38 -0
  17. package/lib/commonjs/dates/datetime/dateTimeId.js.map +1 -0
  18. package/lib/commonjs/dates/datetime/formatDateTimeId.js +27 -0
  19. package/lib/commonjs/dates/datetime/formatDateTimeId.js.map +1 -0
  20. package/lib/commonjs/dates/datetime/formatDateTimeListHour.js +21 -0
  21. package/lib/commonjs/dates/datetime/formatDateTimeListHour.js.map +1 -0
  22. package/lib/commonjs/dates/datetime/formatDateTimeListMinute.js +16 -0
  23. package/lib/commonjs/dates/datetime/formatDateTimeListMinute.js.map +1 -0
  24. package/lib/commonjs/dates/datetime/formatDateTimeListPeriod.js +17 -0
  25. package/lib/commonjs/dates/datetime/formatDateTimeListPeriod.js.map +1 -0
  26. package/lib/commonjs/dates/datetime/isLocaleHour12.js +30 -0
  27. package/lib/commonjs/dates/datetime/isLocaleHour12.js.map +1 -0
  28. package/lib/commonjs/dates/datetime/isValidDateTimeId.js +23 -0
  29. package/lib/commonjs/dates/datetime/isValidDateTimeId.js.map +1 -0
  30. package/lib/commonjs/dates/datetime/nowDateTimeId.js +57 -0
  31. package/lib/commonjs/dates/datetime/nowDateTimeId.js.map +1 -0
  32. package/lib/commonjs/dates/datetime/parseDateTimeId.js +29 -0
  33. package/lib/commonjs/dates/datetime/parseDateTimeId.js.map +1 -0
  34. package/lib/commonjs/dates/display/formatDateForDisplay.js +28 -0
  35. package/lib/commonjs/dates/display/formatDateForDisplay.js.map +1 -0
  36. package/lib/commonjs/dates/display/formatDateRangeForDisplay.js +25 -0
  37. package/lib/commonjs/dates/display/formatDateRangeForDisplay.js.map +1 -0
  38. package/lib/commonjs/dates/display/formatDateTimeForDisplay.js +34 -0
  39. package/lib/commonjs/dates/display/formatDateTimeForDisplay.js.map +1 -0
  40. package/lib/commonjs/dates/display/formatMonthForDisplay.js +33 -0
  41. package/lib/commonjs/dates/display/formatMonthForDisplay.js.map +1 -0
  42. package/lib/commonjs/dates/index.js +367 -0
  43. package/lib/commonjs/dates/index.js.map +1 -0
  44. package/lib/commonjs/dates/internal/brand.js +19 -0
  45. package/lib/commonjs/dates/internal/brand.js.map +1 -0
  46. package/lib/commonjs/dates/internal/calendarHelpers.js +22 -0
  47. package/lib/commonjs/dates/internal/calendarHelpers.js.map +1 -0
  48. package/lib/commonjs/dates/internal/clampHelpers.js +20 -0
  49. package/lib/commonjs/dates/internal/clampHelpers.js.map +1 -0
  50. package/lib/commonjs/dates/internal/dateIdToNativeDate.js +20 -0
  51. package/lib/commonjs/dates/internal/dateIdToNativeDate.js.map +1 -0
  52. package/lib/commonjs/dates/internal/intlCache.js +52 -0
  53. package/lib/commonjs/dates/internal/intlCache.js.map +1 -0
  54. package/lib/commonjs/dates/internal/intlCopy.js +72 -0
  55. package/lib/commonjs/dates/internal/intlCopy.js.map +1 -0
  56. package/lib/commonjs/dates/internal/segmentBuilders.js +98 -0
  57. package/lib/commonjs/dates/internal/segmentBuilders.js.map +1 -0
  58. package/lib/commonjs/dates/labels/dateComponentLabels.js +57 -0
  59. package/lib/commonjs/dates/labels/dateComponentLabels.js.map +1 -0
  60. package/lib/commonjs/dates/ranges/compareDateIds.js +26 -0
  61. package/lib/commonjs/dates/ranges/compareDateIds.js.map +1 -0
  62. package/lib/commonjs/dates/ranges/compareMonthIds.js +31 -0
  63. package/lib/commonjs/dates/ranges/compareMonthIds.js.map +1 -0
  64. package/lib/commonjs/dates/ranges/dateRangeAroundDay.js +25 -0
  65. package/lib/commonjs/dates/ranges/dateRangeAroundDay.js.map +1 -0
  66. package/lib/commonjs/dates/ranges/dateRangeFromLastNDays.js +28 -0
  67. package/lib/commonjs/dates/ranges/dateRangeFromLastNDays.js.map +1 -0
  68. package/lib/commonjs/dates/ranges/eachDateIdInRange.js +29 -0
  69. package/lib/commonjs/dates/ranges/eachDateIdInRange.js.map +1 -0
  70. package/lib/commonjs/dates/ranges/normalizeDateRange.js +23 -0
  71. package/lib/commonjs/dates/ranges/normalizeDateRange.js.map +1 -0
  72. package/lib/commonjs/dates/segments/applyDateSegmentChange.js +77 -0
  73. package/lib/commonjs/dates/segments/applyDateSegmentChange.js.map +1 -0
  74. package/lib/commonjs/dates/segments/formatDateSegment.js +19 -0
  75. package/lib/commonjs/dates/segments/formatDateSegment.js.map +1 -0
  76. package/lib/commonjs/dates/segments/getDateFieldSegments.js +44 -0
  77. package/lib/commonjs/dates/segments/getDateFieldSegments.js.map +1 -0
  78. package/lib/commonjs/dates/segments/getDateTimeFieldSegments.js +150 -0
  79. package/lib/commonjs/dates/segments/getDateTimeFieldSegments.js.map +1 -0
  80. package/lib/commonjs/dates/segments/getDateTimeSegmentVisibility.js +15 -0
  81. package/lib/commonjs/dates/segments/getDateTimeSegmentVisibility.js.map +1 -0
  82. package/lib/commonjs/dates/segments/getEmptyDateSegmentText.js +17 -0
  83. package/lib/commonjs/dates/segments/getEmptyDateSegmentText.js.map +1 -0
  84. package/lib/commonjs/dates/segments/parseDateSegment.js +26 -0
  85. package/lib/commonjs/dates/segments/parseDateSegment.js.map +1 -0
  86. package/lib/commonjs/dates/types.js +2 -0
  87. package/lib/commonjs/dates/types.js.map +1 -0
  88. package/lib/commonjs/dates/wire/clampDateParts.js +26 -0
  89. package/lib/commonjs/dates/wire/clampDateParts.js.map +1 -0
  90. package/lib/commonjs/dates/wire/clampMonthParts.js +23 -0
  91. package/lib/commonjs/dates/wire/clampMonthParts.js.map +1 -0
  92. package/lib/commonjs/dates/wire/dateId.js +50 -0
  93. package/lib/commonjs/dates/wire/dateId.js.map +1 -0
  94. package/lib/commonjs/dates/wire/formatDateId.js +25 -0
  95. package/lib/commonjs/dates/wire/formatDateId.js.map +1 -0
  96. package/lib/commonjs/dates/wire/formatMonthId.js +21 -0
  97. package/lib/commonjs/dates/wire/formatMonthId.js.map +1 -0
  98. package/lib/commonjs/dates/wire/isValidDateId.js +27 -0
  99. package/lib/commonjs/dates/wire/isValidDateId.js.map +1 -0
  100. package/lib/commonjs/dates/wire/isValidDateParts.js +18 -0
  101. package/lib/commonjs/dates/wire/isValidDateParts.js.map +1 -0
  102. package/lib/commonjs/dates/wire/isValidMonthId.js +27 -0
  103. package/lib/commonjs/dates/wire/isValidMonthId.js.map +1 -0
  104. package/lib/commonjs/dates/wire/isValidMonthParts.js +16 -0
  105. package/lib/commonjs/dates/wire/isValidMonthParts.js.map +1 -0
  106. package/lib/commonjs/dates/wire/monthId.js +47 -0
  107. package/lib/commonjs/dates/wire/monthId.js.map +1 -0
  108. package/lib/commonjs/dates/wire/parseDateId.js +29 -0
  109. package/lib/commonjs/dates/wire/parseDateId.js.map +1 -0
  110. package/lib/commonjs/dates/wire/parseMonthId.js +28 -0
  111. package/lib/commonjs/dates/wire/parseMonthId.js.map +1 -0
  112. package/lib/commonjs/dates/wire/toMonthId.js +22 -0
  113. package/lib/commonjs/dates/wire/toMonthId.js.map +1 -0
  114. package/lib/commonjs/dates/wire/todayDateId.js +17 -0
  115. package/lib/commonjs/dates/wire/todayDateId.js.map +1 -0
  116. package/lib/commonjs/dates/wire/todayMonthId.js +17 -0
  117. package/lib/commonjs/dates/wire/todayMonthId.js.map +1 -0
  118. package/lib/commonjs/formatNumber.js +50 -0
  119. package/lib/commonjs/formatNumber.js.map +1 -0
  120. package/lib/commonjs/index.js +326 -0
  121. package/lib/commonjs/index.js.map +1 -0
  122. package/lib/commonjs/package.json +1 -0
  123. package/lib/commonjs/types.js +2 -0
  124. package/lib/commonjs/types.js.map +1 -0
  125. package/lib/commonjs/utils.js +33 -0
  126. package/lib/commonjs/utils.js.map +1 -0
  127. package/lib/module/dates/calendar/formatCalendarMonthYear.js +24 -0
  128. package/lib/module/dates/calendar/formatCalendarMonthYear.js.map +1 -0
  129. package/lib/module/dates/calendar/formatDateTimeListDateRow.js +36 -0
  130. package/lib/module/dates/calendar/formatDateTimeListDateRow.js.map +1 -0
  131. package/lib/module/dates/calendar/formatMonthCalendarMonth.js +24 -0
  132. package/lib/module/dates/calendar/formatMonthCalendarMonth.js.map +1 -0
  133. package/lib/module/dates/calendar/formatMonthCalendarYear.js +12 -0
  134. package/lib/module/dates/calendar/formatMonthCalendarYear.js.map +1 -0
  135. package/lib/module/dates/calendar/getCalendarWeekdayLabels.js +19 -0
  136. package/lib/module/dates/calendar/getCalendarWeekdayLabels.js.map +1 -0
  137. package/lib/module/dates/datetime/clampDateTimeId.js +24 -0
  138. package/lib/module/dates/datetime/clampDateTimeId.js.map +1 -0
  139. package/lib/module/dates/datetime/compareDateTimeIds.js +24 -0
  140. package/lib/module/dates/datetime/compareDateTimeIds.js.map +1 -0
  141. package/lib/module/dates/datetime/dateTimeId.js +35 -0
  142. package/lib/module/dates/datetime/dateTimeId.js.map +1 -0
  143. package/lib/module/dates/datetime/formatDateTimeId.js +23 -0
  144. package/lib/module/dates/datetime/formatDateTimeId.js.map +1 -0
  145. package/lib/module/dates/datetime/formatDateTimeListHour.js +17 -0
  146. package/lib/module/dates/datetime/formatDateTimeListHour.js.map +1 -0
  147. package/lib/module/dates/datetime/formatDateTimeListMinute.js +12 -0
  148. package/lib/module/dates/datetime/formatDateTimeListMinute.js.map +1 -0
  149. package/lib/module/dates/datetime/formatDateTimeListPeriod.js +13 -0
  150. package/lib/module/dates/datetime/formatDateTimeListPeriod.js.map +1 -0
  151. package/lib/module/dates/datetime/isLocaleHour12.js +26 -0
  152. package/lib/module/dates/datetime/isLocaleHour12.js.map +1 -0
  153. package/lib/module/dates/datetime/isValidDateTimeId.js +19 -0
  154. package/lib/module/dates/datetime/isValidDateTimeId.js.map +1 -0
  155. package/lib/module/dates/datetime/nowDateTimeId.js +54 -0
  156. package/lib/module/dates/datetime/nowDateTimeId.js.map +1 -0
  157. package/lib/module/dates/datetime/parseDateTimeId.js +26 -0
  158. package/lib/module/dates/datetime/parseDateTimeId.js.map +1 -0
  159. package/lib/module/dates/display/formatDateForDisplay.js +24 -0
  160. package/lib/module/dates/display/formatDateForDisplay.js.map +1 -0
  161. package/lib/module/dates/display/formatDateRangeForDisplay.js +22 -0
  162. package/lib/module/dates/display/formatDateRangeForDisplay.js.map +1 -0
  163. package/lib/module/dates/display/formatDateTimeForDisplay.js +30 -0
  164. package/lib/module/dates/display/formatDateTimeForDisplay.js.map +1 -0
  165. package/lib/module/dates/display/formatMonthForDisplay.js +29 -0
  166. package/lib/module/dates/display/formatMonthForDisplay.js.map +1 -0
  167. package/lib/module/dates/index.js +59 -0
  168. package/lib/module/dates/index.js.map +1 -0
  169. package/lib/module/dates/internal/brand.js +12 -0
  170. package/lib/module/dates/internal/brand.js.map +1 -0
  171. package/lib/module/dates/internal/calendarHelpers.js +19 -0
  172. package/lib/module/dates/internal/calendarHelpers.js.map +1 -0
  173. package/lib/module/dates/internal/clampHelpers.js +14 -0
  174. package/lib/module/dates/internal/clampHelpers.js.map +1 -0
  175. package/lib/module/dates/internal/dateIdToNativeDate.js +16 -0
  176. package/lib/module/dates/internal/dateIdToNativeDate.js.map +1 -0
  177. package/lib/module/dates/internal/intlCache.js +47 -0
  178. package/lib/module/dates/internal/intlCache.js.map +1 -0
  179. package/lib/module/dates/internal/intlCopy.js +66 -0
  180. package/lib/module/dates/internal/intlCopy.js.map +1 -0
  181. package/lib/module/dates/internal/segmentBuilders.js +91 -0
  182. package/lib/module/dates/internal/segmentBuilders.js.map +1 -0
  183. package/lib/module/dates/labels/dateComponentLabels.js +50 -0
  184. package/lib/module/dates/labels/dateComponentLabels.js.map +1 -0
  185. package/lib/module/dates/ranges/compareDateIds.js +22 -0
  186. package/lib/module/dates/ranges/compareDateIds.js.map +1 -0
  187. package/lib/module/dates/ranges/compareMonthIds.js +27 -0
  188. package/lib/module/dates/ranges/compareMonthIds.js.map +1 -0
  189. package/lib/module/dates/ranges/dateRangeAroundDay.js +21 -0
  190. package/lib/module/dates/ranges/dateRangeAroundDay.js.map +1 -0
  191. package/lib/module/dates/ranges/dateRangeFromLastNDays.js +24 -0
  192. package/lib/module/dates/ranges/dateRangeFromLastNDays.js.map +1 -0
  193. package/lib/module/dates/ranges/eachDateIdInRange.js +26 -0
  194. package/lib/module/dates/ranges/eachDateIdInRange.js.map +1 -0
  195. package/lib/module/dates/ranges/normalizeDateRange.js +20 -0
  196. package/lib/module/dates/ranges/normalizeDateRange.js.map +1 -0
  197. package/lib/module/dates/segments/applyDateSegmentChange.js +73 -0
  198. package/lib/module/dates/segments/applyDateSegmentChange.js.map +1 -0
  199. package/lib/module/dates/segments/formatDateSegment.js +15 -0
  200. package/lib/module/dates/segments/formatDateSegment.js.map +1 -0
  201. package/lib/module/dates/segments/getDateFieldSegments.js +40 -0
  202. package/lib/module/dates/segments/getDateFieldSegments.js.map +1 -0
  203. package/lib/module/dates/segments/getDateTimeFieldSegments.js +147 -0
  204. package/lib/module/dates/segments/getDateTimeFieldSegments.js.map +1 -0
  205. package/lib/module/dates/segments/getDateTimeSegmentVisibility.js +11 -0
  206. package/lib/module/dates/segments/getDateTimeSegmentVisibility.js.map +1 -0
  207. package/lib/module/dates/segments/getEmptyDateSegmentText.js +13 -0
  208. package/lib/module/dates/segments/getEmptyDateSegmentText.js.map +1 -0
  209. package/lib/module/dates/segments/parseDateSegment.js +22 -0
  210. package/lib/module/dates/segments/parseDateSegment.js.map +1 -0
  211. package/lib/module/dates/types.js +2 -0
  212. package/lib/module/dates/types.js.map +1 -0
  213. package/lib/module/dates/wire/clampDateParts.js +22 -0
  214. package/lib/module/dates/wire/clampDateParts.js.map +1 -0
  215. package/lib/module/dates/wire/clampMonthParts.js +19 -0
  216. package/lib/module/dates/wire/clampMonthParts.js.map +1 -0
  217. package/lib/module/dates/wire/dateId.js +47 -0
  218. package/lib/module/dates/wire/dateId.js.map +1 -0
  219. package/lib/module/dates/wire/formatDateId.js +22 -0
  220. package/lib/module/dates/wire/formatDateId.js.map +1 -0
  221. package/lib/module/dates/wire/formatMonthId.js +17 -0
  222. package/lib/module/dates/wire/formatMonthId.js.map +1 -0
  223. package/lib/module/dates/wire/isValidDateId.js +23 -0
  224. package/lib/module/dates/wire/isValidDateId.js.map +1 -0
  225. package/lib/module/dates/wire/isValidDateParts.js +14 -0
  226. package/lib/module/dates/wire/isValidDateParts.js.map +1 -0
  227. package/lib/module/dates/wire/isValidMonthId.js +23 -0
  228. package/lib/module/dates/wire/isValidMonthId.js.map +1 -0
  229. package/lib/module/dates/wire/isValidMonthParts.js +12 -0
  230. package/lib/module/dates/wire/isValidMonthParts.js.map +1 -0
  231. package/lib/module/dates/wire/monthId.js +44 -0
  232. package/lib/module/dates/wire/monthId.js.map +1 -0
  233. package/lib/module/dates/wire/parseDateId.js +26 -0
  234. package/lib/module/dates/wire/parseDateId.js.map +1 -0
  235. package/lib/module/dates/wire/parseMonthId.js +25 -0
  236. package/lib/module/dates/wire/parseMonthId.js.map +1 -0
  237. package/lib/module/dates/wire/toMonthId.js +18 -0
  238. package/lib/module/dates/wire/toMonthId.js.map +1 -0
  239. package/lib/module/dates/wire/todayDateId.js +13 -0
  240. package/lib/module/dates/wire/todayDateId.js.map +1 -0
  241. package/lib/module/dates/wire/todayMonthId.js +13 -0
  242. package/lib/module/dates/wire/todayMonthId.js.map +1 -0
  243. package/lib/module/formatNumber.js +46 -0
  244. package/lib/module/formatNumber.js.map +1 -0
  245. package/lib/module/index.js +17 -0
  246. package/lib/module/index.js.map +1 -0
  247. package/lib/module/types.js +2 -0
  248. package/lib/module/types.js.map +1 -0
  249. package/lib/module/utils.js +29 -0
  250. package/lib/module/utils.js.map +1 -0
  251. package/lib/typescript/dates/calendar/formatCalendarMonthYear.d.ts +12 -0
  252. package/lib/typescript/dates/calendar/formatCalendarMonthYear.d.ts.map +1 -0
  253. package/lib/typescript/dates/calendar/formatDateTimeListDateRow.d.ts +13 -0
  254. package/lib/typescript/dates/calendar/formatDateTimeListDateRow.d.ts.map +1 -0
  255. package/lib/typescript/dates/calendar/formatMonthCalendarMonth.d.ts +13 -0
  256. package/lib/typescript/dates/calendar/formatMonthCalendarMonth.d.ts.map +1 -0
  257. package/lib/typescript/dates/calendar/formatMonthCalendarYear.d.ts +8 -0
  258. package/lib/typescript/dates/calendar/formatMonthCalendarYear.d.ts.map +1 -0
  259. package/lib/typescript/dates/calendar/getCalendarWeekdayLabels.d.ts +12 -0
  260. package/lib/typescript/dates/calendar/getCalendarWeekdayLabels.d.ts.map +1 -0
  261. package/lib/typescript/dates/datetime/clampDateTimeId.d.ts +16 -0
  262. package/lib/typescript/dates/datetime/clampDateTimeId.d.ts.map +1 -0
  263. package/lib/typescript/dates/datetime/compareDateTimeIds.d.ts +13 -0
  264. package/lib/typescript/dates/datetime/compareDateTimeIds.d.ts.map +1 -0
  265. package/lib/typescript/dates/datetime/dateTimeId.d.ts +18 -0
  266. package/lib/typescript/dates/datetime/dateTimeId.d.ts.map +1 -0
  267. package/lib/typescript/dates/datetime/formatDateTimeId.d.ts +12 -0
  268. package/lib/typescript/dates/datetime/formatDateTimeId.d.ts.map +1 -0
  269. package/lib/typescript/dates/datetime/formatDateTimeListHour.d.ts +11 -0
  270. package/lib/typescript/dates/datetime/formatDateTimeListHour.d.ts.map +1 -0
  271. package/lib/typescript/dates/datetime/formatDateTimeListMinute.d.ts +8 -0
  272. package/lib/typescript/dates/datetime/formatDateTimeListMinute.d.ts.map +1 -0
  273. package/lib/typescript/dates/datetime/formatDateTimeListPeriod.d.ts +9 -0
  274. package/lib/typescript/dates/datetime/formatDateTimeListPeriod.d.ts.map +1 -0
  275. package/lib/typescript/dates/datetime/isLocaleHour12.d.ts +12 -0
  276. package/lib/typescript/dates/datetime/isLocaleHour12.d.ts.map +1 -0
  277. package/lib/typescript/dates/datetime/isValidDateTimeId.d.ts +9 -0
  278. package/lib/typescript/dates/datetime/isValidDateTimeId.d.ts.map +1 -0
  279. package/lib/typescript/dates/datetime/nowDateTimeId.d.ts +14 -0
  280. package/lib/typescript/dates/datetime/nowDateTimeId.d.ts.map +1 -0
  281. package/lib/typescript/dates/datetime/parseDateTimeId.d.ts +9 -0
  282. package/lib/typescript/dates/datetime/parseDateTimeId.d.ts.map +1 -0
  283. package/lib/typescript/dates/display/formatDateForDisplay.d.ts +13 -0
  284. package/lib/typescript/dates/display/formatDateForDisplay.d.ts.map +1 -0
  285. package/lib/typescript/dates/display/formatDateRangeForDisplay.d.ts +16 -0
  286. package/lib/typescript/dates/display/formatDateRangeForDisplay.d.ts.map +1 -0
  287. package/lib/typescript/dates/display/formatDateTimeForDisplay.d.ts +13 -0
  288. package/lib/typescript/dates/display/formatDateTimeForDisplay.d.ts.map +1 -0
  289. package/lib/typescript/dates/display/formatMonthForDisplay.d.ts +13 -0
  290. package/lib/typescript/dates/display/formatMonthForDisplay.d.ts.map +1 -0
  291. package/lib/typescript/dates/index.d.ts +58 -0
  292. package/lib/typescript/dates/index.d.ts.map +1 -0
  293. package/lib/typescript/dates/internal/brand.d.ts +11 -0
  294. package/lib/typescript/dates/internal/brand.d.ts.map +1 -0
  295. package/lib/typescript/dates/internal/calendarHelpers.d.ts +8 -0
  296. package/lib/typescript/dates/internal/calendarHelpers.d.ts.map +1 -0
  297. package/lib/typescript/dates/internal/clampHelpers.d.ts +5 -0
  298. package/lib/typescript/dates/internal/clampHelpers.d.ts.map +1 -0
  299. package/lib/typescript/dates/internal/dateIdToNativeDate.d.ts +12 -0
  300. package/lib/typescript/dates/internal/dateIdToNativeDate.d.ts.map +1 -0
  301. package/lib/typescript/dates/internal/intlCache.d.ts +12 -0
  302. package/lib/typescript/dates/internal/intlCache.d.ts.map +1 -0
  303. package/lib/typescript/dates/internal/intlCopy.d.ts +10 -0
  304. package/lib/typescript/dates/internal/intlCopy.d.ts.map +1 -0
  305. package/lib/typescript/dates/internal/segmentBuilders.d.ts +12 -0
  306. package/lib/typescript/dates/internal/segmentBuilders.d.ts.map +1 -0
  307. package/lib/typescript/dates/labels/dateComponentLabels.d.ts +31 -0
  308. package/lib/typescript/dates/labels/dateComponentLabels.d.ts.map +1 -0
  309. package/lib/typescript/dates/ranges/compareDateIds.d.ts +10 -0
  310. package/lib/typescript/dates/ranges/compareDateIds.d.ts.map +1 -0
  311. package/lib/typescript/dates/ranges/compareMonthIds.d.ts +10 -0
  312. package/lib/typescript/dates/ranges/compareMonthIds.d.ts.map +1 -0
  313. package/lib/typescript/dates/ranges/dateRangeAroundDay.d.ts +14 -0
  314. package/lib/typescript/dates/ranges/dateRangeAroundDay.d.ts.map +1 -0
  315. package/lib/typescript/dates/ranges/dateRangeFromLastNDays.d.ts +16 -0
  316. package/lib/typescript/dates/ranges/dateRangeFromLastNDays.d.ts.map +1 -0
  317. package/lib/typescript/dates/ranges/eachDateIdInRange.d.ts +10 -0
  318. package/lib/typescript/dates/ranges/eachDateIdInRange.d.ts.map +1 -0
  319. package/lib/typescript/dates/ranges/normalizeDateRange.d.ts +15 -0
  320. package/lib/typescript/dates/ranges/normalizeDateRange.d.ts.map +1 -0
  321. package/lib/typescript/dates/segments/applyDateSegmentChange.d.ts +21 -0
  322. package/lib/typescript/dates/segments/applyDateSegmentChange.d.ts.map +1 -0
  323. package/lib/typescript/dates/segments/formatDateSegment.d.ts +13 -0
  324. package/lib/typescript/dates/segments/formatDateSegment.d.ts.map +1 -0
  325. package/lib/typescript/dates/segments/getDateFieldSegments.d.ts +13 -0
  326. package/lib/typescript/dates/segments/getDateFieldSegments.d.ts.map +1 -0
  327. package/lib/typescript/dates/segments/getDateTimeFieldSegments.d.ts +14 -0
  328. package/lib/typescript/dates/segments/getDateTimeFieldSegments.d.ts.map +1 -0
  329. package/lib/typescript/dates/segments/getDateTimeSegmentVisibility.d.ts +8 -0
  330. package/lib/typescript/dates/segments/getDateTimeSegmentVisibility.d.ts.map +1 -0
  331. package/lib/typescript/dates/segments/getEmptyDateSegmentText.d.ts +9 -0
  332. package/lib/typescript/dates/segments/getEmptyDateSegmentText.d.ts.map +1 -0
  333. package/lib/typescript/dates/segments/parseDateSegment.d.ts +13 -0
  334. package/lib/typescript/dates/segments/parseDateSegment.d.ts.map +1 -0
  335. package/lib/typescript/dates/types.d.ts +66 -0
  336. package/lib/typescript/dates/types.d.ts.map +1 -0
  337. package/lib/typescript/dates/wire/clampDateParts.d.ts +12 -0
  338. package/lib/typescript/dates/wire/clampDateParts.d.ts.map +1 -0
  339. package/lib/typescript/dates/wire/clampMonthParts.d.ts +12 -0
  340. package/lib/typescript/dates/wire/clampMonthParts.d.ts.map +1 -0
  341. package/lib/typescript/dates/wire/dateId.d.ts +24 -0
  342. package/lib/typescript/dates/wire/dateId.d.ts.map +1 -0
  343. package/lib/typescript/dates/wire/formatDateId.d.ts +12 -0
  344. package/lib/typescript/dates/wire/formatDateId.d.ts.map +1 -0
  345. package/lib/typescript/dates/wire/formatMonthId.d.ts +12 -0
  346. package/lib/typescript/dates/wire/formatMonthId.d.ts.map +1 -0
  347. package/lib/typescript/dates/wire/isValidDateId.d.ts +13 -0
  348. package/lib/typescript/dates/wire/isValidDateId.d.ts.map +1 -0
  349. package/lib/typescript/dates/wire/isValidDateParts.d.ts +9 -0
  350. package/lib/typescript/dates/wire/isValidDateParts.d.ts.map +1 -0
  351. package/lib/typescript/dates/wire/isValidMonthId.d.ts +13 -0
  352. package/lib/typescript/dates/wire/isValidMonthId.d.ts.map +1 -0
  353. package/lib/typescript/dates/wire/isValidMonthParts.d.ts +9 -0
  354. package/lib/typescript/dates/wire/isValidMonthParts.d.ts.map +1 -0
  355. package/lib/typescript/dates/wire/monthId.d.ts +22 -0
  356. package/lib/typescript/dates/wire/monthId.d.ts.map +1 -0
  357. package/lib/typescript/dates/wire/parseDateId.d.ts +12 -0
  358. package/lib/typescript/dates/wire/parseDateId.d.ts.map +1 -0
  359. package/lib/typescript/dates/wire/parseMonthId.d.ts +12 -0
  360. package/lib/typescript/dates/wire/parseMonthId.d.ts.map +1 -0
  361. package/lib/typescript/dates/wire/toMonthId.d.ts +12 -0
  362. package/lib/typescript/dates/wire/toMonthId.d.ts.map +1 -0
  363. package/lib/typescript/dates/wire/todayDateId.d.ts +8 -0
  364. package/lib/typescript/dates/wire/todayDateId.d.ts.map +1 -0
  365. package/lib/typescript/dates/wire/todayMonthId.d.ts +8 -0
  366. package/lib/typescript/dates/wire/todayMonthId.d.ts.map +1 -0
  367. package/lib/typescript/formatNumber.d.ts +19 -0
  368. package/lib/typescript/formatNumber.d.ts.map +1 -0
  369. package/lib/typescript/index.d.ts +5 -0
  370. package/lib/typescript/index.d.ts.map +1 -0
  371. package/lib/typescript/types.d.ts +2 -0
  372. package/lib/typescript/types.d.ts.map +1 -0
  373. package/lib/typescript/utils.d.ts +10 -0
  374. package/lib/typescript/utils.d.ts.map +1 -0
  375. package/package.json +50 -0
  376. package/src/__tests__/applyDateSegmentChange.test.ts +26 -0
  377. package/src/__tests__/calendarFormatters.test.ts +35 -0
  378. package/src/__tests__/clampDateParts.test.ts +16 -0
  379. package/src/__tests__/compareDateIds.test.ts +7 -0
  380. package/src/__tests__/compareMonthIds.test.ts +19 -0
  381. package/src/__tests__/dateComponentLabels.test.ts +25 -0
  382. package/src/__tests__/dateRangeAroundDay.test.ts +10 -0
  383. package/src/__tests__/dateRangeFromLastNDays.test.ts +8 -0
  384. package/src/__tests__/dateSegmentHelpers.test.ts +24 -0
  385. package/src/__tests__/datetimeHelpers.test.ts +65 -0
  386. package/src/__tests__/displayFormatters.test.ts +34 -0
  387. package/src/__tests__/eachDateIdInRange.test.ts +11 -0
  388. package/src/__tests__/formatCalendarMonthYear.test.ts +9 -0
  389. package/src/__tests__/formatDateForDisplay.test.ts +11 -0
  390. package/src/__tests__/formatDateId.test.ts +15 -0
  391. package/src/__tests__/formatMonthId.test.ts +7 -0
  392. package/src/__tests__/formatNumber.test.ts +35 -0
  393. package/src/__tests__/getDateFieldSegments.test.ts +35 -0
  394. package/src/__tests__/getDateTimeFieldSegments.test.ts +140 -0
  395. package/src/__tests__/getDateTimeSegmentVisibility.test.ts +12 -0
  396. package/src/__tests__/intlCopy.test.ts +64 -0
  397. package/src/__tests__/isValidDateId.test.ts +8 -0
  398. package/src/__tests__/isValidMonthId.test.ts +8 -0
  399. package/src/__tests__/normalizeDateRange.test.ts +10 -0
  400. package/src/__tests__/toMonthId.test.ts +7 -0
  401. package/src/__tests__/todayDateId.test.ts +7 -0
  402. package/src/__tests__/wireConstructors.test.ts +74 -0
  403. package/src/dates/calendar/formatCalendarMonthYear.ts +21 -0
  404. package/src/dates/calendar/formatDateTimeListDateRow.ts +41 -0
  405. package/src/dates/calendar/formatMonthCalendarMonth.ts +21 -0
  406. package/src/dates/calendar/formatMonthCalendarYear.ts +9 -0
  407. package/src/dates/calendar/getCalendarWeekdayLabels.ts +23 -0
  408. package/src/dates/datetime/clampDateTimeId.ts +25 -0
  409. package/src/dates/datetime/compareDateTimeIds.ts +23 -0
  410. package/src/dates/datetime/dateTimeId.ts +36 -0
  411. package/src/dates/datetime/formatDateTimeId.ts +35 -0
  412. package/src/dates/datetime/formatDateTimeListHour.ts +14 -0
  413. package/src/dates/datetime/formatDateTimeListMinute.ts +9 -0
  414. package/src/dates/datetime/formatDateTimeListPeriod.ts +12 -0
  415. package/src/dates/datetime/isLocaleHour12.ts +23 -0
  416. package/src/dates/datetime/isValidDateTimeId.ts +18 -0
  417. package/src/dates/datetime/nowDateTimeId.ts +53 -0
  418. package/src/dates/datetime/parseDateTimeId.ts +24 -0
  419. package/src/dates/display/formatDateForDisplay.ts +21 -0
  420. package/src/dates/display/formatDateRangeForDisplay.ts +23 -0
  421. package/src/dates/display/formatDateTimeForDisplay.ts +37 -0
  422. package/src/dates/display/formatMonthForDisplay.ts +26 -0
  423. package/src/dates/index.ts +86 -0
  424. package/src/dates/internal/brand.ts +11 -0
  425. package/src/dates/internal/calendarHelpers.ts +18 -0
  426. package/src/dates/internal/clampHelpers.ts +15 -0
  427. package/src/dates/internal/dateIdToNativeDate.ts +15 -0
  428. package/src/dates/internal/intlCache.ts +40 -0
  429. package/src/dates/internal/intlCopy.ts +75 -0
  430. package/src/dates/internal/segmentBuilders.ts +94 -0
  431. package/src/dates/labels/dateComponentLabels.ts +79 -0
  432. package/src/dates/ranges/compareDateIds.ts +21 -0
  433. package/src/dates/ranges/compareMonthIds.ts +26 -0
  434. package/src/dates/ranges/dateRangeAroundDay.ts +24 -0
  435. package/src/dates/ranges/dateRangeFromLastNDays.ts +26 -0
  436. package/src/dates/ranges/eachDateIdInRange.ts +21 -0
  437. package/src/dates/ranges/normalizeDateRange.ts +18 -0
  438. package/src/dates/segments/applyDateSegmentChange.ts +57 -0
  439. package/src/dates/segments/formatDateSegment.ts +18 -0
  440. package/src/dates/segments/getDateFieldSegments.ts +45 -0
  441. package/src/dates/segments/getDateTimeFieldSegments.ts +126 -0
  442. package/src/dates/segments/getDateTimeSegmentVisibility.ts +14 -0
  443. package/src/dates/segments/getEmptyDateSegmentText.ts +12 -0
  444. package/src/dates/segments/parseDateSegment.ts +25 -0
  445. package/src/dates/types.ts +80 -0
  446. package/src/dates/wire/clampDateParts.ts +17 -0
  447. package/src/dates/wire/clampMonthParts.ts +15 -0
  448. package/src/dates/wire/dateId.ts +44 -0
  449. package/src/dates/wire/formatDateId.ts +20 -0
  450. package/src/dates/wire/formatMonthId.ts +16 -0
  451. package/src/dates/wire/isValidDateId.ts +22 -0
  452. package/src/dates/wire/isValidDateParts.ts +17 -0
  453. package/src/dates/wire/isValidMonthId.ts +22 -0
  454. package/src/dates/wire/isValidMonthParts.ts +11 -0
  455. package/src/dates/wire/monthId.ts +42 -0
  456. package/src/dates/wire/parseDateId.ts +20 -0
  457. package/src/dates/wire/parseMonthId.ts +20 -0
  458. package/src/dates/wire/toMonthId.ts +17 -0
  459. package/src/dates/wire/todayDateId.ts +12 -0
  460. package/src/dates/wire/todayMonthId.ts +12 -0
  461. package/src/formatNumber.ts +56 -0
  462. package/src/index.ts +82 -0
  463. package/src/types.ts +1 -0
  464. package/src/utils.ts +29 -0
@@ -0,0 +1,12 @@
1
+ import type { DateFormatOptions } from '../types';
2
+ /**
3
+ * Cached `Intl.DateTimeFormat` factory for display helpers.
4
+ *
5
+ * @internal Not part of the public package API — prefer `formatDateForDisplay` and related helpers.
6
+ */
7
+ export declare function createDateFormatter(options: Intl.DateTimeFormatOptions & DateFormatOptions): Intl.DateTimeFormat;
8
+ /**
9
+ * @internal
10
+ */
11
+ export declare function getCachedDateFormatter(locale: string, options: Intl.DateTimeFormatOptions & DateFormatOptions): Intl.DateTimeFormat;
12
+ //# sourceMappingURL=intlCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intlCache.d.ts","sourceRoot":"","sources":["../../../../src/dates/internal/intlCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAQlD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,IAAI,CAAC,qBAAqB,GAAG,iBAAiB,GACtD,IAAI,CAAC,cAAc,CAOrB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,IAAI,CAAC,qBAAqB,GAAG,iBAAiB,GACtD,IAAI,CAAC,cAAc,CASrB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Locale-aware relative "today" label (e.g. `Today`, `aujourd'hui`).
3
+ * Falls back when `Intl.RelativeTimeFormat` is missing (Hermes / incomplete Intl).
4
+ */
5
+ export declare function formatRelativeToday(locale?: string): string;
6
+ /** Locale-aware day-period label (AM/PM or locale equivalent) for a 0–23 hour value. */
7
+ export declare function formatDayPeriodFromHour(hour: number, locale?: string): string;
8
+ /** Locale-aware separator between two formatted dates in a range label. */
9
+ export declare function getDateRangeSeparator(locale?: string): string;
10
+ //# sourceMappingURL=intlCopy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intlCopy.d.ts","sourceRoot":"","sources":["../../../../src/dates/internal/intlCopy.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,SAAiB,GAAG,MAAM,CAanE;AAED,wFAAwF;AACxF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,SAAiB,GAAG,MAAM,CAgBrF;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,MAAM,SAAiB,GAAG,MAAM,CAiCrE"}
@@ -0,0 +1,12 @@
1
+ import type { DateFieldMode, DateSegment, DateSegmentType } from '../types';
2
+ export declare const DATE_FIELD_FORMAT_OPTIONS: Record<DateFieldMode, Intl.DateTimeFormatOptions>;
3
+ export declare const EMPTY_DATE_SEGMENT_TEXT: Partial<Record<DateSegmentType, string>>;
4
+ export declare const EMPTY_TIME_SEGMENT_TEXT: Record<'hour' | 'minute' | 'second' | 'dayPeriod', string>;
5
+ export declare function padSegment(type: DateSegmentType, value: number): string;
6
+ export declare function buildEmptyDateFieldSegments(mode: DateFieldMode, locale: string): DateSegment[];
7
+ export declare function buildDateFieldSegments(values: {
8
+ year: number;
9
+ month: number;
10
+ day: number;
11
+ }, mode: DateFieldMode, locale: string): DateSegment[];
12
+ //# sourceMappingURL=segmentBuilders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmentBuilders.d.ts","sourceRoot":"","sources":["../../../../src/dates/internal/segmentBuilders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG5E,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,qBAAqB,CAGvF,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAQ5E,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,EAAE,MAAM,CAK9F,CAAC;AAEF,wBAAgB,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAWvE;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,CAqB9F;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EACpD,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb,WAAW,EAAE,CA4Bf"}
@@ -0,0 +1,31 @@
1
+ import type { DateSegmentType } from '../types';
2
+ /** Overridable UI copy for date pickers, calendars, and segmented date fields. */
3
+ export interface DateComponentLabels {
4
+ openDatePicker: string;
5
+ openDateTimePicker: string;
6
+ openDateRangePicker: string;
7
+ openMonthPicker: string;
8
+ showCalendar: string;
9
+ showYearPicker: string;
10
+ showMonths: string;
11
+ previousMonth: string;
12
+ nextMonth: string;
13
+ previousYear: string;
14
+ nextYear: string;
15
+ /** Use `{year}` as the year placeholder. */
16
+ selectYear: string;
17
+ dateFieldKeyboardInput: string;
18
+ segmentYear: string;
19
+ segmentMonth: string;
20
+ segmentDay: string;
21
+ segmentHour: string;
22
+ segmentMinute: string;
23
+ segmentSecond: string;
24
+ segmentDayPeriod: string;
25
+ rangeSeparator: string;
26
+ }
27
+ export declare const DEFAULT_DATE_COMPONENT_LABELS: DateComponentLabels;
28
+ export declare function resolveDateComponentLabels(partial?: Partial<DateComponentLabels>): DateComponentLabels;
29
+ export declare function formatSelectYear(labels: DateComponentLabels, year: number): string;
30
+ export declare function getDateSegmentAccessibilityLabel(type: DateSegmentType, labels: DateComponentLabels): string | undefined;
31
+ //# sourceMappingURL=dateComponentLabels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateComponentLabels.d.ts","sourceRoot":"","sources":["../../../../src/dates/labels/dateComponentLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,kFAAkF;AAClF,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,6BAA6B,EAAE,mBAsB3C,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,OAAO,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACrC,mBAAmB,CAErB;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElF;AAYD,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,eAAe,EACrB,MAAM,EAAE,mBAAmB,GAC1B,MAAM,GAAG,SAAS,CAGpB"}
@@ -0,0 +1,10 @@
1
+ import type { DateId } from '../types';
2
+ /**
3
+ * Compares two wire dates.
4
+ *
5
+ * @param a - First wire date.
6
+ * @param b - Second wire date.
7
+ * @returns `-1` if `a` is earlier, `1` if later, `0` if equal.
8
+ */
9
+ export declare function compareDateIds(a: DateId, b: DateId): -1 | 0 | 1;
10
+ //# sourceMappingURL=compareDateIds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compareDateIds.d.ts","sourceRoot":"","sources":["../../../../src/dates/ranges/compareDateIds.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAS/D"}
@@ -0,0 +1,10 @@
1
+ import type { MonthId } from '../types';
2
+ /**
3
+ * Compares two wire months chronologically.
4
+ *
5
+ * @param a - First wire month (`YYYY-MM-01`).
6
+ * @param b - Second wire month (`YYYY-MM-01`).
7
+ * @returns `-1` if `a` is earlier, `1` if later, `0` if equal or either is invalid.
8
+ */
9
+ export declare function compareMonthIds(a: MonthId, b: MonthId): -1 | 0 | 1;
10
+ //# sourceMappingURL=compareMonthIds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compareMonthIds.d.ts","sourceRoot":"","sources":["../../../../src/dates/ranges/compareMonthIds.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAelE"}
@@ -0,0 +1,14 @@
1
+ import type { DateId } from '../types';
2
+ /**
3
+ * Builds an inclusive window of dates around an anchor (default: today).
4
+ *
5
+ * @param daysBefore - Number of days before the anchor (inclusive).
6
+ * @param daysAfter - Number of days after the anchor (inclusive).
7
+ * @param anchorDate - Optional anchor wire date; defaults to today.
8
+ * @returns Start and end wire date ids for the window.
9
+ */
10
+ export declare function dateRangeAroundDay(daysBefore: number, daysAfter: number, anchorDate?: DateId): {
11
+ startId: DateId;
12
+ endId: DateId;
13
+ };
14
+ //# sourceMappingURL=dateRangeAroundDay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateRangeAroundDay.d.ts","sourceRoot":"","sources":["../../../../src/dates/ranges/dateRangeAroundDay.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAMpC"}
@@ -0,0 +1,16 @@
1
+ import type { DateId } from '../types';
2
+ /**
3
+ * Builds an inclusive "last N days" preset ending on `endDate` (default: today).
4
+ *
5
+ * @param days - Number of calendar days in the range (inclusive of end).
6
+ * @param endDate - Optional end wire date; defaults to today.
7
+ * @returns Normalized start/end wire date ids.
8
+ *
9
+ * @example
10
+ * dateRangeFromLastNDays(30) // { startId, endId } spanning 30 calendar days
11
+ */
12
+ export declare function dateRangeFromLastNDays(days: number, endDate?: DateId): {
13
+ startId: DateId;
14
+ endId: DateId;
15
+ };
16
+ //# sourceMappingURL=dateRangeFromLastNDays.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateRangeFromLastNDays.d.ts","sourceRoot":"","sources":["../../../../src/dates/ranges/dateRangeFromLastNDays.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,GACf;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAOpC"}
@@ -0,0 +1,10 @@
1
+ import type { DateId } from '../types';
2
+ /**
3
+ * Returns an inclusive list of every `DateId` between start and end (order-normalized).
4
+ *
5
+ * @param startId - Range start wire date.
6
+ * @param endId - Range end wire date.
7
+ * @returns Array of wire `DateId` strings for each day in the range.
8
+ */
9
+ export declare function eachDateIdInRange(startId: DateId, endId: DateId): DateId[];
10
+ //# sourceMappingURL=eachDateIdInRange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eachDateIdInRange.d.ts","sourceRoot":"","sources":["../../../../src/dates/ranges/eachDateIdInRange.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAO1E"}
@@ -0,0 +1,15 @@
1
+ import type { DateId } from '../types';
2
+ /**
3
+ * Ensures `startId` ≤ `endId` by swapping when the range is inverted.
4
+ *
5
+ * @param range - Start and end wire date ids.
6
+ * @returns Normalized range with `startId` on or before `endId`.
7
+ */
8
+ export declare function normalizeDateRange(range: {
9
+ startId: DateId;
10
+ endId: DateId;
11
+ }): {
12
+ startId: DateId;
13
+ endId: DateId;
14
+ };
15
+ //# sourceMappingURL=normalizeDateRange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeDateRange.d.ts","sourceRoot":"","sources":["../../../../src/dates/ranges/normalizeDateRange.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAKA"}
@@ -0,0 +1,21 @@
1
+ import type { DateFieldMode, DateParts, DateSegmentType, MonthParts } from '../types';
2
+ /**
3
+ * Applies a single segment edit to complete date/month parts, clamping invalid days/months.
4
+ *
5
+ * Prefer this when updating a fully known value. Segmented `DateField` mid-entry uses
6
+ * partial parts internally and does not call this helper.
7
+ *
8
+ * @param current - Current parts, or `null` for defaults.
9
+ * @param segment - Segment type being edited.
10
+ * @param value - New numeric value for the segment.
11
+ * @param options - Field mode (`date` or `month`).
12
+ * @returns Updated parts, or `null` when input cannot be applied.
13
+ *
14
+ * @example
15
+ * applyDateSegmentChange(parseDateId('2026-01-31'), 'month', 2, { mode: 'date' })
16
+ * // → { year: 2026, month: 2, day: 28 }
17
+ */
18
+ export declare function applyDateSegmentChange(current: DateParts | MonthParts | null, segment: DateSegmentType, value: number, options: {
19
+ mode: DateFieldMode;
20
+ }): DateParts | MonthParts | null;
21
+ //# sourceMappingURL=applyDateSegmentChange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyDateSegmentChange.d.ts","sourceRoot":"","sources":["../../../../src/dates/segments/applyDateSegmentChange.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,IAAI,EACtC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GAC/B,SAAS,GAAG,UAAU,GAAG,IAAI,CA+B/B"}
@@ -0,0 +1,13 @@
1
+ import type { DateSegmentType } from '../types';
2
+ /**
3
+ * Formats a numeric segment value for display in a segmented date field.
4
+ *
5
+ * @param type - Segment type (year, month, day, etc.).
6
+ * @param value - Numeric segment value.
7
+ * @param _options - Reserved for future locale-aware formatting.
8
+ * @returns Padded segment text.
9
+ */
10
+ export declare function formatDateSegment(type: DateSegmentType, value: number, _options?: {
11
+ locale?: string;
12
+ }): string;
13
+ //# sourceMappingURL=formatDateSegment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatDateSegment.d.ts","sourceRoot":"","sources":["../../../../src/dates/segments/formatDateSegment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7B,MAAM,CAER"}
@@ -0,0 +1,13 @@
1
+ import type { DateFieldMode, DateId, DateSegment, MonthId } from '../types';
2
+ /**
3
+ * Builds ordered editable and literal segments for a date or month field from a wire value.
4
+ *
5
+ * @param value - Wire `DateId` or `MonthId`, or empty for placeholder segments.
6
+ * @param options - Field mode and optional locale.
7
+ * @returns Ordered `DateSegment` array matching locale field order.
8
+ */
9
+ export declare function getDateFieldSegments(value: DateId | MonthId | null | undefined, options: {
10
+ mode: DateFieldMode;
11
+ locale?: string;
12
+ }): DateSegment[];
13
+ //# sourceMappingURL=getDateFieldSegments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDateFieldSegments.d.ts","sourceRoot":"","sources":["../../../../src/dates/segments/getDateFieldSegments.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE5E;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EAC1C,OAAO,EAAE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD,WAAW,EAAE,CA4Bf"}
@@ -0,0 +1,14 @@
1
+ import type { DateSegment, DateTimeGranularity, DateTimeId } from '../types';
2
+ /**
3
+ * Builds ordered segments for a date-time field for the given granularity.
4
+ *
5
+ * @param value - Wire `DateTimeId`, or empty for placeholder segments.
6
+ * @param options - Granularity, locale, and 12/24-hour preference.
7
+ * @returns Ordered `DateSegment` array including date and time parts.
8
+ */
9
+ export declare function getDateTimeFieldSegments(value: DateTimeId | null | undefined, options: {
10
+ granularity: DateTimeGranularity;
11
+ locale?: string;
12
+ hour12?: boolean;
13
+ }): DateSegment[];
14
+ //# sourceMappingURL=getDateTimeFieldSegments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDateTimeFieldSegments.d.ts","sourceRoot":"","sources":["../../../../src/dates/segments/getDateTimeFieldSegments.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI7E;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,EAAE;IAAE,WAAW,EAAE,mBAAmB,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAC/E,WAAW,EAAE,CA0Gf"}
@@ -0,0 +1,8 @@
1
+ import type { DateTimeGranularity } from '../types';
2
+ /** Which time segments/columns are visible for a given `DateTimeGranularity`. */
3
+ export declare function getDateTimeSegmentVisibility(granularity: DateTimeGranularity): {
4
+ showTime: boolean;
5
+ showMinute: boolean;
6
+ showSecond: boolean;
7
+ };
8
+ //# sourceMappingURL=getDateTimeSegmentVisibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDateTimeSegmentVisibility.d.ts","sourceRoot":"","sources":["../../../../src/dates/segments/getDateTimeSegmentVisibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,iFAAiF;AACjF,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,mBAAmB,GAAG;IAC9E,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB,CAMA"}
@@ -0,0 +1,9 @@
1
+ import type { DateSegmentType } from '../types';
2
+ /**
3
+ * Returns placeholder text for an empty editable segment (e.g. `MM`, `DD`, `YYYY`).
4
+ *
5
+ * @param type - Segment type.
6
+ * @returns Placeholder string, or `''` for types without a placeholder.
7
+ */
8
+ export declare function getEmptyDateSegmentText(type: DateSegmentType): string;
9
+ //# sourceMappingURL=getEmptyDateSegmentText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getEmptyDateSegmentText.d.ts","sourceRoot":"","sources":["../../../../src/dates/segments/getEmptyDateSegmentText.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAErE"}
@@ -0,0 +1,13 @@
1
+ import type { DateSegmentType } from '../types';
2
+ /**
3
+ * Parses user-entered segment text into a number, or `null` when not parseable.
4
+ *
5
+ * @param type - Segment type being edited.
6
+ * @param text - Raw segment text from the field.
7
+ * @param _options - Reserved for future locale-aware parsing.
8
+ * @returns Parsed number, or `null` for empty or non-numeric input.
9
+ */
10
+ export declare function parseDateSegment(type: DateSegmentType, text: string, _options?: {
11
+ locale?: string;
12
+ }): number | null;
13
+ //# sourceMappingURL=parseDateSegment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseDateSegment.d.ts","sourceRoot":"","sources":["../../../../src/dates/segments/parseDateSegment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,eAAe,EACrB,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7B,MAAM,GAAG,IAAI,CAUf"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Shared option / parts types for date wire and display helpers.
3
+ *
4
+ * Wire brands: `DateId` (`YYYY-MM-DD`), `MonthId` (`YYYY-MM-01`), `DateTimeId` (local ISO-like).
5
+ *
6
+ * These are branded string types: a bare `string` no longer assigns to a `DateId`
7
+ * (etc.) prop. Produce values through the validating smart constructors
8
+ * (`dateId(...)`, `monthId(...)`, `dateTimeId(...)`) or the wire producers
9
+ * (`todayDateId()`, `parseDateId(...)`, `formatDateId(...)`, …), all exported from
10
+ * `@cdx-ui/formatters`. The brand is a compile-time-only tag — at runtime these are
11
+ * ordinary strings safe to serialize, store, and send over the wire.
12
+ */
13
+ /** Wire date id (`YYYY-MM-DD`). Construct via `dateId(...)`, never a bare string. */
14
+ export type DateId = string & {
15
+ readonly __brand: 'DateId';
16
+ };
17
+ /** Wire month id (`YYYY-MM-01`). Construct via `monthId(...)`, never a bare string. */
18
+ export type MonthId = string & {
19
+ readonly __brand: 'MonthId';
20
+ };
21
+ /** Wire date-time id (local ISO-like, e.g. `YYYY-MM-DDTHH:mm`). Construct via `dateTimeId(...)`. */
22
+ export type DateTimeId = string & {
23
+ readonly __brand: 'DateTimeId';
24
+ };
25
+ export interface DateParts {
26
+ year: number;
27
+ month: number;
28
+ day: number;
29
+ }
30
+ export interface MonthParts {
31
+ year: number;
32
+ month: number;
33
+ }
34
+ export interface TimeParts {
35
+ hour: number;
36
+ minute: number;
37
+ second?: number;
38
+ }
39
+ export interface DateTimeParts extends DateParts, TimeParts {
40
+ }
41
+ export type DateFieldMode = 'date' | 'month';
42
+ export type DateTimeGranularity = 'day' | 'hour' | 'minute' | 'second';
43
+ export type DateSegmentType = 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod' | 'literal';
44
+ export interface DateSegment {
45
+ type: DateSegmentType;
46
+ text: string;
47
+ value?: number;
48
+ isEditable: boolean;
49
+ }
50
+ export interface DateFormatOptions {
51
+ locale?: string;
52
+ timeZone?: string;
53
+ calendar?: string;
54
+ }
55
+ export interface FormatDateDisplayOptions extends DateFormatOptions {
56
+ dateStyle?: 'short' | 'medium' | 'long';
57
+ }
58
+ export interface FormatDateTimeDisplayOptions extends DateFormatOptions {
59
+ dateStyle?: 'short' | 'medium' | 'long';
60
+ timeStyle?: 'short' | 'medium';
61
+ granularity?: DateTimeGranularity;
62
+ }
63
+ export interface DateRangeDisplayOptions extends FormatDateDisplayOptions {
64
+ rangeSeparator?: string;
65
+ }
66
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dates/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,qFAAqF;AACrF,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;AAC7D,uFAAuF;AACvF,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC;AAC/D,oGAAoG;AACpG,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC;AAErE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS,EAAE,SAAS;CAAG;AAE9D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7C,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEvE,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,MAAM,GACN,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,SAAS,CAAC;AAEd,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CACzC;AAED,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACrE,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACxC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC/B,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,WAAW,uBAAwB,SAAQ,wBAAwB;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,12 @@
1
+ import type { DateParts } from '../types';
2
+ /**
3
+ * Clamps date parts so month is 1–12 and day fits the month length (no `Date` rollover).
4
+ *
5
+ * @param parts - Year, month, and day values to clamp.
6
+ * @returns Clamped `DateParts` with a valid calendar day for the given month.
7
+ *
8
+ * @example
9
+ * clampDateParts({ year: 2026, month: 2, day: 31 }) // { year: 2026, month: 2, day: 28 }
10
+ */
11
+ export declare function clampDateParts(parts: DateParts): DateParts;
12
+ //# sourceMappingURL=clampDateParts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clampDateParts.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/clampDateParts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAI1D"}
@@ -0,0 +1,12 @@
1
+ import type { MonthParts } from '../types';
2
+ /**
3
+ * Clamps month parts so month is between 1 and 12.
4
+ *
5
+ * @param parts - Year and month values to clamp.
6
+ * @returns Clamped `MonthParts`.
7
+ *
8
+ * @example
9
+ * clampMonthParts({ year: 2026, month: 13 }) // { year: 2026, month: 12 }
10
+ */
11
+ export declare function clampMonthParts(parts: MonthParts): MonthParts;
12
+ //# sourceMappingURL=clampMonthParts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clampMonthParts.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/clampMonthParts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAE7D"}
@@ -0,0 +1,24 @@
1
+ import type { DateId } from '../types';
2
+ /**
3
+ * Validating smart constructor for a wire {@link DateId} (`YYYY-MM-DD`).
4
+ *
5
+ * Accepts either a wire string or numeric parts. Throws `RangeError` on input
6
+ * that is not a real calendar date — use this at the boundary where you first
7
+ * introduce a date value so a bad id never enters your form state.
8
+ *
9
+ * @param iso - A wire date string (`YYYY-MM-DD`).
10
+ * @returns The branded `DateId`.
11
+ * @throws RangeError when the string is not a valid `DateId`.
12
+ *
13
+ * @example
14
+ * dateId('2026-08-07'); // DateId
15
+ * dateId(2026, 8, 7); // DateId
16
+ */
17
+ export declare function dateId(iso: string): DateId;
18
+ /**
19
+ * @param year - Full year (e.g. `2026`).
20
+ * @param month - Month `1`–`12`.
21
+ * @param day - Day of month `1`–`31`.
22
+ */
23
+ export declare function dateId(year: number, month: number, day: number): DateId;
24
+ //# sourceMappingURL=dateId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateId.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/dateId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKvC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;AAC5C;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { DateId, DateParts } from '../types';
2
+ /**
3
+ * Builds a wire `DateId`, clamping day to the month length (no `Date` rollover).
4
+ *
5
+ * @param parts - Year, month, and day values.
6
+ * @returns Wire `DateId` string (`YYYY-MM-DD`).
7
+ *
8
+ * @example
9
+ * formatDateId({ year: 2026, month: 7, day: 28 }) // '2026-07-28'
10
+ */
11
+ export declare function formatDateId(parts: DateParts): DateId;
12
+ //# sourceMappingURL=formatDateId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatDateId.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/formatDateId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGlD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAMrD"}
@@ -0,0 +1,12 @@
1
+ import type { MonthId, MonthParts } from '../types';
2
+ /**
3
+ * Builds a wire `MonthId` (`YYYY-MM-01`).
4
+ *
5
+ * @param parts - Year and month values.
6
+ * @returns Wire `MonthId` string.
7
+ *
8
+ * @example
9
+ * formatMonthId({ year: 2026, month: 7 }) // '2026-07-01'
10
+ */
11
+ export declare function formatMonthId(parts: MonthParts): MonthId;
12
+ //# sourceMappingURL=formatMonthId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatMonthId.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/formatMonthId.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAExD"}
@@ -0,0 +1,13 @@
1
+ import type { DateId } from '../types';
2
+ /**
3
+ * Type guard for wire `DateId` strings (`YYYY-MM-DD`).
4
+ *
5
+ * @param dateId - Candidate wire date string.
6
+ * @returns `true` when `dateId` is a valid `DateId`.
7
+ *
8
+ * @example
9
+ * isValidDateId('2026-07-28') // true
10
+ * isValidDateId('07/28/2026') // false
11
+ */
12
+ export declare function isValidDateId(dateId: string): dateId is DateId;
13
+ //# sourceMappingURL=isValidDateId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isValidDateId.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/isValidDateId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIvC;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,MAAM,CAM9D"}
@@ -0,0 +1,9 @@
1
+ import type { DateParts } from '../types';
2
+ /**
3
+ * Returns whether the given parts form a valid calendar date.
4
+ *
5
+ * @param parts - Year, month, and day values to validate.
6
+ * @returns `true` when the parts match a real calendar date.
7
+ */
8
+ export declare function isValidDateParts(parts: DateParts): boolean;
9
+ //# sourceMappingURL=isValidDateParts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isValidDateParts.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/isValidDateParts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAO1D"}
@@ -0,0 +1,13 @@
1
+ import type { MonthId } from '../types';
2
+ /**
3
+ * Type guard for wire `MonthId` strings (`YYYY-MM-01`).
4
+ *
5
+ * @param monthId - Candidate wire month string.
6
+ * @returns `true` when `monthId` is a valid `MonthId`.
7
+ *
8
+ * @example
9
+ * isValidMonthId('2026-07-01') // true
10
+ * isValidMonthId('2026-07-15') // false
11
+ */
12
+ export declare function isValidMonthId(monthId: string): monthId is MonthId;
13
+ //# sourceMappingURL=isValidMonthId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isValidMonthId.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/isValidMonthId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxC;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,OAAO,CAMlE"}
@@ -0,0 +1,9 @@
1
+ import type { MonthParts } from '../types';
2
+ /**
3
+ * Returns whether the given parts form a valid month (1–12).
4
+ *
5
+ * @param parts - Year and month values to validate.
6
+ * @returns `true` when month is between 1 and 12.
7
+ */
8
+ export declare function isValidMonthParts(parts: MonthParts): boolean;
9
+ //# sourceMappingURL=isValidMonthParts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isValidMonthParts.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/isValidMonthParts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAE5D"}
@@ -0,0 +1,22 @@
1
+ import type { MonthId } from '../types';
2
+ /**
3
+ * Validating smart constructor for a wire {@link MonthId} (`YYYY-MM-01`).
4
+ *
5
+ * Accepts either a wire string or numeric parts. Throws `RangeError` on input
6
+ * that is not a valid month.
7
+ *
8
+ * @param iso - A wire month string (`YYYY-MM-01`).
9
+ * @returns The branded `MonthId`.
10
+ * @throws RangeError when the string is not a valid `MonthId`.
11
+ *
12
+ * @example
13
+ * monthId('2026-08-01'); // MonthId
14
+ * monthId(2026, 8); // MonthId
15
+ */
16
+ export declare function monthId(iso: string): MonthId;
17
+ /**
18
+ * @param year - Full year (e.g. `2026`).
19
+ * @param month - Month `1`–`12`.
20
+ */
21
+ export declare function monthId(year: number, month: number): MonthId;
22
+ //# sourceMappingURL=monthId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monthId.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/monthId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKxC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;AAC9C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { DateId, DateParts } from '../types';
2
+ /**
3
+ * Parses a wire `DateId` into numeric parts, or `null` when invalid.
4
+ *
5
+ * @param dateId - Wire date string (`YYYY-MM-DD`).
6
+ * @returns Parsed parts, or `null` when `dateId` is invalid.
7
+ *
8
+ * @example
9
+ * parseDateId('2026-07-28') // { year: 2026, month: 7, day: 28 }
10
+ */
11
+ export declare function parseDateId(dateId: DateId): DateParts | null;
12
+ //# sourceMappingURL=parseDateId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseDateId.d.ts","sourceRoot":"","sources":["../../../../src/dates/wire/parseDateId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGlD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAM5D"}