react-native-agenda-kit 0.1.0

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 (403) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +364 -0
  3. package/lib/commonjs/agenda/AgendaBackdrop.js +68 -0
  4. package/lib/commonjs/agenda/AgendaBackdrop.js.map +1 -0
  5. package/lib/commonjs/agenda/AgendaList.js +354 -0
  6. package/lib/commonjs/agenda/AgendaList.js.map +1 -0
  7. package/lib/commonjs/agenda/AgendaSlot.js +88 -0
  8. package/lib/commonjs/agenda/AgendaSlot.js.map +1 -0
  9. package/lib/commonjs/agenda/AgendaWindow.js +171 -0
  10. package/lib/commonjs/agenda/AgendaWindow.js.map +1 -0
  11. package/lib/commonjs/agenda/StickyHeaderOverlay.js +125 -0
  12. package/lib/commonjs/agenda/StickyHeaderOverlay.js.map +1 -0
  13. package/lib/commonjs/agenda/buildAgendaLayout.js +100 -0
  14. package/lib/commonjs/agenda/buildAgendaLayout.js.map +1 -0
  15. package/lib/commonjs/agenda/constants.js +29 -0
  16. package/lib/commonjs/agenda/constants.js.map +1 -0
  17. package/lib/commonjs/agenda/heights.js +49 -0
  18. package/lib/commonjs/agenda/heights.js.map +1 -0
  19. package/lib/commonjs/agenda/useAgendaScrollSync.js +204 -0
  20. package/lib/commonjs/agenda/useAgendaScrollSync.js.map +1 -0
  21. package/lib/commonjs/core/ArrowGlyph.js +65 -0
  22. package/lib/commonjs/core/ArrowGlyph.js.map +1 -0
  23. package/lib/commonjs/core/CalendarContext.js +32 -0
  24. package/lib/commonjs/core/CalendarContext.js.map +1 -0
  25. package/lib/commonjs/core/CalendarProvider.js +141 -0
  26. package/lib/commonjs/core/CalendarProvider.js.map +1 -0
  27. package/lib/commonjs/core/CalendarStore.js +70 -0
  28. package/lib/commonjs/core/CalendarStore.js.map +1 -0
  29. package/lib/commonjs/core/KitText.js +23 -0
  30. package/lib/commonjs/core/KitText.js.map +1 -0
  31. package/lib/commonjs/core/TodayButton.js +136 -0
  32. package/lib/commonjs/core/TodayButton.js.map +1 -0
  33. package/lib/commonjs/core/civil.js +101 -0
  34. package/lib/commonjs/core/civil.js.map +1 -0
  35. package/lib/commonjs/core/dateKey.js +56 -0
  36. package/lib/commonjs/core/dateKey.js.map +1 -0
  37. package/lib/commonjs/core/motion.js +56 -0
  38. package/lib/commonjs/core/motion.js.map +1 -0
  39. package/lib/commonjs/core/worklets.js +44 -0
  40. package/lib/commonjs/core/worklets.js.map +1 -0
  41. package/lib/commonjs/expandable/DayCell.js +120 -0
  42. package/lib/commonjs/expandable/DayCell.js.map +1 -0
  43. package/lib/commonjs/expandable/ExpandableCalendar.js +280 -0
  44. package/lib/commonjs/expandable/ExpandableCalendar.js.map +1 -0
  45. package/lib/commonjs/expandable/Knob.js +72 -0
  46. package/lib/commonjs/expandable/Knob.js.map +1 -0
  47. package/lib/commonjs/expandable/MonthPager.js +180 -0
  48. package/lib/commonjs/expandable/MonthPager.js.map +1 -0
  49. package/lib/commonjs/expandable/WeekStrip.js +451 -0
  50. package/lib/commonjs/expandable/WeekStrip.js.map +1 -0
  51. package/lib/commonjs/expandable/calendarCells.js +152 -0
  52. package/lib/commonjs/expandable/calendarCells.js.map +1 -0
  53. package/lib/commonjs/expandable/geometry.js +62 -0
  54. package/lib/commonjs/expandable/geometry.js.map +1 -0
  55. package/lib/commonjs/expandable/useExpandGesture.js +124 -0
  56. package/lib/commonjs/expandable/useExpandGesture.js.map +1 -0
  57. package/lib/commonjs/expandable/useHorizontalPager.js +97 -0
  58. package/lib/commonjs/expandable/useHorizontalPager.js.map +1 -0
  59. package/lib/commonjs/index.js +167 -0
  60. package/lib/commonjs/index.js.map +1 -0
  61. package/lib/commonjs/package.json +1 -0
  62. package/lib/commonjs/theme/ThemeProvider.js +73 -0
  63. package/lib/commonjs/theme/ThemeProvider.js.map +1 -0
  64. package/lib/commonjs/theme/index.js +75 -0
  65. package/lib/commonjs/theme/index.js.map +1 -0
  66. package/lib/commonjs/theme/theme.js +79 -0
  67. package/lib/commonjs/theme/theme.js.map +1 -0
  68. package/lib/commonjs/theme/tokens.js +54 -0
  69. package/lib/commonjs/theme/tokens.js.map +1 -0
  70. package/lib/commonjs/timeline/DayColumn.js +95 -0
  71. package/lib/commonjs/timeline/DayColumn.js.map +1 -0
  72. package/lib/commonjs/timeline/DayPager.js +250 -0
  73. package/lib/commonjs/timeline/DayPager.js.map +1 -0
  74. package/lib/commonjs/timeline/EventBlock.js +91 -0
  75. package/lib/commonjs/timeline/EventBlock.js.map +1 -0
  76. package/lib/commonjs/timeline/GridLines.js +47 -0
  77. package/lib/commonjs/timeline/GridLines.js.map +1 -0
  78. package/lib/commonjs/timeline/HourGrid.js +96 -0
  79. package/lib/commonjs/timeline/HourGrid.js.map +1 -0
  80. package/lib/commonjs/timeline/NowIndicator.js +132 -0
  81. package/lib/commonjs/timeline/NowIndicator.js.map +1 -0
  82. package/lib/commonjs/timeline/TimelineDay.js +126 -0
  83. package/lib/commonjs/timeline/TimelineDay.js.map +1 -0
  84. package/lib/commonjs/timeline/packEvents.js +102 -0
  85. package/lib/commonjs/timeline/packEvents.js.map +1 -0
  86. package/lib/commonjs/timeline/timelineGeometry.js +27 -0
  87. package/lib/commonjs/timeline/timelineGeometry.js.map +1 -0
  88. package/lib/commonjs/timeline/timelineMath.js +82 -0
  89. package/lib/commonjs/timeline/timelineMath.js.map +1 -0
  90. package/lib/commonjs/types.js +71 -0
  91. package/lib/commonjs/types.js.map +1 -0
  92. package/lib/module/agenda/AgendaBackdrop.js +63 -0
  93. package/lib/module/agenda/AgendaBackdrop.js.map +1 -0
  94. package/lib/module/agenda/AgendaList.js +349 -0
  95. package/lib/module/agenda/AgendaList.js.map +1 -0
  96. package/lib/module/agenda/AgendaSlot.js +84 -0
  97. package/lib/module/agenda/AgendaSlot.js.map +1 -0
  98. package/lib/module/agenda/AgendaWindow.js +167 -0
  99. package/lib/module/agenda/AgendaWindow.js.map +1 -0
  100. package/lib/module/agenda/StickyHeaderOverlay.js +120 -0
  101. package/lib/module/agenda/StickyHeaderOverlay.js.map +1 -0
  102. package/lib/module/agenda/buildAgendaLayout.js +95 -0
  103. package/lib/module/agenda/buildAgendaLayout.js.map +1 -0
  104. package/lib/module/agenda/constants.js +25 -0
  105. package/lib/module/agenda/constants.js.map +1 -0
  106. package/lib/module/agenda/heights.js +42 -0
  107. package/lib/module/agenda/heights.js.map +1 -0
  108. package/lib/module/agenda/useAgendaScrollSync.js +200 -0
  109. package/lib/module/agenda/useAgendaScrollSync.js.map +1 -0
  110. package/lib/module/core/ArrowGlyph.js +60 -0
  111. package/lib/module/core/ArrowGlyph.js.map +1 -0
  112. package/lib/module/core/CalendarContext.js +26 -0
  113. package/lib/module/core/CalendarContext.js.map +1 -0
  114. package/lib/module/core/CalendarProvider.js +136 -0
  115. package/lib/module/core/CalendarProvider.js.map +1 -0
  116. package/lib/module/core/CalendarStore.js +66 -0
  117. package/lib/module/core/CalendarStore.js.map +1 -0
  118. package/lib/module/core/KitText.js +19 -0
  119. package/lib/module/core/KitText.js.map +1 -0
  120. package/lib/module/core/TodayButton.js +133 -0
  121. package/lib/module/core/TodayButton.js.map +1 -0
  122. package/lib/module/core/civil.js +88 -0
  123. package/lib/module/core/civil.js.map +1 -0
  124. package/lib/module/core/dateKey.js +47 -0
  125. package/lib/module/core/dateKey.js.map +1 -0
  126. package/lib/module/core/motion.js +49 -0
  127. package/lib/module/core/motion.js.map +1 -0
  128. package/lib/module/core/worklets.js +38 -0
  129. package/lib/module/core/worklets.js.map +1 -0
  130. package/lib/module/expandable/DayCell.js +116 -0
  131. package/lib/module/expandable/DayCell.js.map +1 -0
  132. package/lib/module/expandable/ExpandableCalendar.js +275 -0
  133. package/lib/module/expandable/ExpandableCalendar.js.map +1 -0
  134. package/lib/module/expandable/Knob.js +67 -0
  135. package/lib/module/expandable/Knob.js.map +1 -0
  136. package/lib/module/expandable/MonthPager.js +175 -0
  137. package/lib/module/expandable/MonthPager.js.map +1 -0
  138. package/lib/module/expandable/WeekStrip.js +446 -0
  139. package/lib/module/expandable/WeekStrip.js.map +1 -0
  140. package/lib/module/expandable/calendarCells.js +142 -0
  141. package/lib/module/expandable/calendarCells.js.map +1 -0
  142. package/lib/module/expandable/geometry.js +58 -0
  143. package/lib/module/expandable/geometry.js.map +1 -0
  144. package/lib/module/expandable/useExpandGesture.js +118 -0
  145. package/lib/module/expandable/useExpandGesture.js.map +1 -0
  146. package/lib/module/expandable/useHorizontalPager.js +92 -0
  147. package/lib/module/expandable/useHorizontalPager.js.map +1 -0
  148. package/lib/module/index.js +35 -0
  149. package/lib/module/index.js.map +1 -0
  150. package/lib/module/package.json +1 -0
  151. package/lib/module/theme/ThemeProvider.js +65 -0
  152. package/lib/module/theme/ThemeProvider.js.map +1 -0
  153. package/lib/module/theme/index.js +6 -0
  154. package/lib/module/theme/index.js.map +1 -0
  155. package/lib/module/theme/theme.js +74 -0
  156. package/lib/module/theme/theme.js.map +1 -0
  157. package/lib/module/theme/tokens.js +50 -0
  158. package/lib/module/theme/tokens.js.map +1 -0
  159. package/lib/module/timeline/DayColumn.js +91 -0
  160. package/lib/module/timeline/DayColumn.js.map +1 -0
  161. package/lib/module/timeline/DayPager.js +245 -0
  162. package/lib/module/timeline/DayPager.js.map +1 -0
  163. package/lib/module/timeline/EventBlock.js +87 -0
  164. package/lib/module/timeline/EventBlock.js.map +1 -0
  165. package/lib/module/timeline/GridLines.js +43 -0
  166. package/lib/module/timeline/GridLines.js.map +1 -0
  167. package/lib/module/timeline/HourGrid.js +94 -0
  168. package/lib/module/timeline/HourGrid.js.map +1 -0
  169. package/lib/module/timeline/NowIndicator.js +126 -0
  170. package/lib/module/timeline/NowIndicator.js.map +1 -0
  171. package/lib/module/timeline/TimelineDay.js +122 -0
  172. package/lib/module/timeline/TimelineDay.js.map +1 -0
  173. package/lib/module/timeline/packEvents.js +97 -0
  174. package/lib/module/timeline/packEvents.js.map +1 -0
  175. package/lib/module/timeline/timelineGeometry.js +22 -0
  176. package/lib/module/timeline/timelineGeometry.js.map +1 -0
  177. package/lib/module/timeline/timelineMath.js +75 -0
  178. package/lib/module/timeline/timelineMath.js.map +1 -0
  179. package/lib/module/types.js +67 -0
  180. package/lib/module/types.js.map +1 -0
  181. package/lib/typescript/commonjs/agenda/AgendaBackdrop.d.ts +20 -0
  182. package/lib/typescript/commonjs/agenda/AgendaBackdrop.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/agenda/AgendaList.d.ts +12 -0
  184. package/lib/typescript/commonjs/agenda/AgendaList.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/agenda/AgendaSlot.d.ts +45 -0
  186. package/lib/typescript/commonjs/agenda/AgendaSlot.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/agenda/AgendaWindow.d.ts +49 -0
  188. package/lib/typescript/commonjs/agenda/AgendaWindow.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/agenda/StickyHeaderOverlay.d.ts +39 -0
  190. package/lib/typescript/commonjs/agenda/StickyHeaderOverlay.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/agenda/buildAgendaLayout.d.ts +57 -0
  192. package/lib/typescript/commonjs/agenda/buildAgendaLayout.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/agenda/constants.d.ts +19 -0
  194. package/lib/typescript/commonjs/agenda/constants.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/agenda/heights.d.ts +20 -0
  196. package/lib/typescript/commonjs/agenda/heights.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/agenda/useAgendaScrollSync.d.ts +44 -0
  198. package/lib/typescript/commonjs/agenda/useAgendaScrollSync.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/core/ArrowGlyph.d.ts +14 -0
  200. package/lib/typescript/commonjs/core/ArrowGlyph.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/core/CalendarContext.d.ts +35 -0
  202. package/lib/typescript/commonjs/core/CalendarContext.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/core/CalendarProvider.d.ts +41 -0
  204. package/lib/typescript/commonjs/core/CalendarProvider.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/core/CalendarStore.d.ts +28 -0
  206. package/lib/typescript/commonjs/core/CalendarStore.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/core/KitText.d.ts +10 -0
  208. package/lib/typescript/commonjs/core/KitText.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/core/TodayButton.d.ts +18 -0
  210. package/lib/typescript/commonjs/core/TodayButton.d.ts.map +1 -0
  211. package/lib/typescript/commonjs/core/civil.d.ts +26 -0
  212. package/lib/typescript/commonjs/core/civil.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/core/dateKey.d.ts +21 -0
  214. package/lib/typescript/commonjs/core/dateKey.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/core/motion.d.ts +18 -0
  216. package/lib/typescript/commonjs/core/motion.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/core/worklets.d.ts +12 -0
  218. package/lib/typescript/commonjs/core/worklets.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/expandable/DayCell.d.ts +22 -0
  220. package/lib/typescript/commonjs/expandable/DayCell.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/expandable/ExpandableCalendar.d.ts +40 -0
  222. package/lib/typescript/commonjs/expandable/ExpandableCalendar.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/expandable/Knob.d.ts +19 -0
  224. package/lib/typescript/commonjs/expandable/Knob.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/expandable/MonthPager.d.ts +35 -0
  226. package/lib/typescript/commonjs/expandable/MonthPager.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/expandable/WeekStrip.d.ts +34 -0
  228. package/lib/typescript/commonjs/expandable/WeekStrip.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/expandable/calendarCells.d.ts +52 -0
  230. package/lib/typescript/commonjs/expandable/calendarCells.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/expandable/geometry.d.ts +43 -0
  232. package/lib/typescript/commonjs/expandable/geometry.d.ts.map +1 -0
  233. package/lib/typescript/commonjs/expandable/useExpandGesture.d.ts +35 -0
  234. package/lib/typescript/commonjs/expandable/useExpandGesture.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/expandable/useHorizontalPager.d.ts +35 -0
  236. package/lib/typescript/commonjs/expandable/useHorizontalPager.d.ts.map +1 -0
  237. package/lib/typescript/commonjs/index.d.ts +26 -0
  238. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/package.json +1 -0
  240. package/lib/typescript/commonjs/theme/ThemeProvider.d.ts +27 -0
  241. package/lib/typescript/commonjs/theme/ThemeProvider.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/theme/index.d.ts +4 -0
  243. package/lib/typescript/commonjs/theme/index.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/theme/theme.d.ts +62 -0
  245. package/lib/typescript/commonjs/theme/theme.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/theme/tokens.d.ts +46 -0
  247. package/lib/typescript/commonjs/theme/tokens.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/timeline/DayColumn.d.ts +32 -0
  249. package/lib/typescript/commonjs/timeline/DayColumn.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/timeline/DayPager.d.ts +32 -0
  251. package/lib/typescript/commonjs/timeline/DayPager.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/timeline/EventBlock.d.ts +17 -0
  253. package/lib/typescript/commonjs/timeline/EventBlock.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/timeline/GridLines.d.ts +5 -0
  255. package/lib/typescript/commonjs/timeline/GridLines.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/timeline/HourGrid.d.ts +12 -0
  257. package/lib/typescript/commonjs/timeline/HourGrid.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/timeline/NowIndicator.d.ts +28 -0
  259. package/lib/typescript/commonjs/timeline/NowIndicator.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/timeline/TimelineDay.d.ts +14 -0
  261. package/lib/typescript/commonjs/timeline/TimelineDay.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/timeline/packEvents.d.ts +25 -0
  263. package/lib/typescript/commonjs/timeline/packEvents.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/timeline/timelineGeometry.d.ts +14 -0
  265. package/lib/typescript/commonjs/timeline/timelineGeometry.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/timeline/timelineMath.d.ts +32 -0
  267. package/lib/typescript/commonjs/timeline/timelineMath.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/types.d.ts +237 -0
  269. package/lib/typescript/commonjs/types.d.ts.map +1 -0
  270. package/lib/typescript/module/agenda/AgendaBackdrop.d.ts +20 -0
  271. package/lib/typescript/module/agenda/AgendaBackdrop.d.ts.map +1 -0
  272. package/lib/typescript/module/agenda/AgendaList.d.ts +12 -0
  273. package/lib/typescript/module/agenda/AgendaList.d.ts.map +1 -0
  274. package/lib/typescript/module/agenda/AgendaSlot.d.ts +45 -0
  275. package/lib/typescript/module/agenda/AgendaSlot.d.ts.map +1 -0
  276. package/lib/typescript/module/agenda/AgendaWindow.d.ts +49 -0
  277. package/lib/typescript/module/agenda/AgendaWindow.d.ts.map +1 -0
  278. package/lib/typescript/module/agenda/StickyHeaderOverlay.d.ts +39 -0
  279. package/lib/typescript/module/agenda/StickyHeaderOverlay.d.ts.map +1 -0
  280. package/lib/typescript/module/agenda/buildAgendaLayout.d.ts +57 -0
  281. package/lib/typescript/module/agenda/buildAgendaLayout.d.ts.map +1 -0
  282. package/lib/typescript/module/agenda/constants.d.ts +19 -0
  283. package/lib/typescript/module/agenda/constants.d.ts.map +1 -0
  284. package/lib/typescript/module/agenda/heights.d.ts +20 -0
  285. package/lib/typescript/module/agenda/heights.d.ts.map +1 -0
  286. package/lib/typescript/module/agenda/useAgendaScrollSync.d.ts +44 -0
  287. package/lib/typescript/module/agenda/useAgendaScrollSync.d.ts.map +1 -0
  288. package/lib/typescript/module/core/ArrowGlyph.d.ts +14 -0
  289. package/lib/typescript/module/core/ArrowGlyph.d.ts.map +1 -0
  290. package/lib/typescript/module/core/CalendarContext.d.ts +35 -0
  291. package/lib/typescript/module/core/CalendarContext.d.ts.map +1 -0
  292. package/lib/typescript/module/core/CalendarProvider.d.ts +41 -0
  293. package/lib/typescript/module/core/CalendarProvider.d.ts.map +1 -0
  294. package/lib/typescript/module/core/CalendarStore.d.ts +28 -0
  295. package/lib/typescript/module/core/CalendarStore.d.ts.map +1 -0
  296. package/lib/typescript/module/core/KitText.d.ts +10 -0
  297. package/lib/typescript/module/core/KitText.d.ts.map +1 -0
  298. package/lib/typescript/module/core/TodayButton.d.ts +18 -0
  299. package/lib/typescript/module/core/TodayButton.d.ts.map +1 -0
  300. package/lib/typescript/module/core/civil.d.ts +26 -0
  301. package/lib/typescript/module/core/civil.d.ts.map +1 -0
  302. package/lib/typescript/module/core/dateKey.d.ts +21 -0
  303. package/lib/typescript/module/core/dateKey.d.ts.map +1 -0
  304. package/lib/typescript/module/core/motion.d.ts +18 -0
  305. package/lib/typescript/module/core/motion.d.ts.map +1 -0
  306. package/lib/typescript/module/core/worklets.d.ts +12 -0
  307. package/lib/typescript/module/core/worklets.d.ts.map +1 -0
  308. package/lib/typescript/module/expandable/DayCell.d.ts +22 -0
  309. package/lib/typescript/module/expandable/DayCell.d.ts.map +1 -0
  310. package/lib/typescript/module/expandable/ExpandableCalendar.d.ts +40 -0
  311. package/lib/typescript/module/expandable/ExpandableCalendar.d.ts.map +1 -0
  312. package/lib/typescript/module/expandable/Knob.d.ts +19 -0
  313. package/lib/typescript/module/expandable/Knob.d.ts.map +1 -0
  314. package/lib/typescript/module/expandable/MonthPager.d.ts +35 -0
  315. package/lib/typescript/module/expandable/MonthPager.d.ts.map +1 -0
  316. package/lib/typescript/module/expandable/WeekStrip.d.ts +34 -0
  317. package/lib/typescript/module/expandable/WeekStrip.d.ts.map +1 -0
  318. package/lib/typescript/module/expandable/calendarCells.d.ts +52 -0
  319. package/lib/typescript/module/expandable/calendarCells.d.ts.map +1 -0
  320. package/lib/typescript/module/expandable/geometry.d.ts +43 -0
  321. package/lib/typescript/module/expandable/geometry.d.ts.map +1 -0
  322. package/lib/typescript/module/expandable/useExpandGesture.d.ts +35 -0
  323. package/lib/typescript/module/expandable/useExpandGesture.d.ts.map +1 -0
  324. package/lib/typescript/module/expandable/useHorizontalPager.d.ts +35 -0
  325. package/lib/typescript/module/expandable/useHorizontalPager.d.ts.map +1 -0
  326. package/lib/typescript/module/index.d.ts +26 -0
  327. package/lib/typescript/module/index.d.ts.map +1 -0
  328. package/lib/typescript/module/package.json +1 -0
  329. package/lib/typescript/module/theme/ThemeProvider.d.ts +27 -0
  330. package/lib/typescript/module/theme/ThemeProvider.d.ts.map +1 -0
  331. package/lib/typescript/module/theme/index.d.ts +4 -0
  332. package/lib/typescript/module/theme/index.d.ts.map +1 -0
  333. package/lib/typescript/module/theme/theme.d.ts +62 -0
  334. package/lib/typescript/module/theme/theme.d.ts.map +1 -0
  335. package/lib/typescript/module/theme/tokens.d.ts +46 -0
  336. package/lib/typescript/module/theme/tokens.d.ts.map +1 -0
  337. package/lib/typescript/module/timeline/DayColumn.d.ts +32 -0
  338. package/lib/typescript/module/timeline/DayColumn.d.ts.map +1 -0
  339. package/lib/typescript/module/timeline/DayPager.d.ts +32 -0
  340. package/lib/typescript/module/timeline/DayPager.d.ts.map +1 -0
  341. package/lib/typescript/module/timeline/EventBlock.d.ts +17 -0
  342. package/lib/typescript/module/timeline/EventBlock.d.ts.map +1 -0
  343. package/lib/typescript/module/timeline/GridLines.d.ts +5 -0
  344. package/lib/typescript/module/timeline/GridLines.d.ts.map +1 -0
  345. package/lib/typescript/module/timeline/HourGrid.d.ts +12 -0
  346. package/lib/typescript/module/timeline/HourGrid.d.ts.map +1 -0
  347. package/lib/typescript/module/timeline/NowIndicator.d.ts +28 -0
  348. package/lib/typescript/module/timeline/NowIndicator.d.ts.map +1 -0
  349. package/lib/typescript/module/timeline/TimelineDay.d.ts +14 -0
  350. package/lib/typescript/module/timeline/TimelineDay.d.ts.map +1 -0
  351. package/lib/typescript/module/timeline/packEvents.d.ts +25 -0
  352. package/lib/typescript/module/timeline/packEvents.d.ts.map +1 -0
  353. package/lib/typescript/module/timeline/timelineGeometry.d.ts +14 -0
  354. package/lib/typescript/module/timeline/timelineGeometry.d.ts.map +1 -0
  355. package/lib/typescript/module/timeline/timelineMath.d.ts +32 -0
  356. package/lib/typescript/module/timeline/timelineMath.d.ts.map +1 -0
  357. package/lib/typescript/module/types.d.ts +237 -0
  358. package/lib/typescript/module/types.d.ts.map +1 -0
  359. package/package.json +105 -0
  360. package/src/agenda/AgendaBackdrop.tsx +55 -0
  361. package/src/agenda/AgendaList.tsx +370 -0
  362. package/src/agenda/AgendaSlot.tsx +88 -0
  363. package/src/agenda/AgendaWindow.tsx +183 -0
  364. package/src/agenda/StickyHeaderOverlay.tsx +126 -0
  365. package/src/agenda/buildAgendaLayout.ts +110 -0
  366. package/src/agenda/constants.ts +22 -0
  367. package/src/agenda/heights.ts +44 -0
  368. package/src/agenda/useAgendaScrollSync.ts +251 -0
  369. package/src/core/ArrowGlyph.tsx +53 -0
  370. package/src/core/CalendarContext.ts +47 -0
  371. package/src/core/CalendarProvider.tsx +165 -0
  372. package/src/core/CalendarStore.ts +64 -0
  373. package/src/core/KitText.tsx +10 -0
  374. package/src/core/TodayButton.tsx +121 -0
  375. package/src/core/civil.ts +92 -0
  376. package/src/core/dateKey.ts +52 -0
  377. package/src/core/motion.ts +51 -0
  378. package/src/core/worklets.ts +37 -0
  379. package/src/expandable/DayCell.tsx +97 -0
  380. package/src/expandable/ExpandableCalendar.tsx +278 -0
  381. package/src/expandable/Knob.tsx +67 -0
  382. package/src/expandable/MonthPager.tsx +208 -0
  383. package/src/expandable/WeekStrip.tsx +439 -0
  384. package/src/expandable/calendarCells.ts +155 -0
  385. package/src/expandable/geometry.ts +51 -0
  386. package/src/expandable/useExpandGesture.ts +147 -0
  387. package/src/expandable/useHorizontalPager.ts +116 -0
  388. package/src/index.ts +62 -0
  389. package/src/theme/ThemeProvider.tsx +85 -0
  390. package/src/theme/index.ts +18 -0
  391. package/src/theme/theme.ts +110 -0
  392. package/src/theme/tokens.ts +50 -0
  393. package/src/timeline/DayColumn.tsx +84 -0
  394. package/src/timeline/DayPager.tsx +295 -0
  395. package/src/timeline/EventBlock.tsx +76 -0
  396. package/src/timeline/GridLines.tsx +36 -0
  397. package/src/timeline/HourGrid.tsx +90 -0
  398. package/src/timeline/NowIndicator.tsx +123 -0
  399. package/src/timeline/TimelineDay.tsx +112 -0
  400. package/src/timeline/packEvents.ts +118 -0
  401. package/src/timeline/timelineGeometry.ts +23 -0
  402. package/src/timeline/timelineMath.ts +86 -0
  403. package/src/types.ts +252 -0
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The stuck section header: fixed copies drawn over the list.
5
+ *
6
+ * A header INSIDE the ScrollView that sticks by translating itself lags the
7
+ * content by one frame, because the translate comes from a scroll event (M1c:
8
+ * 10–25 dp of drift mid-momentum). A copy outside the ScrollView does not scroll,
9
+ * so it cannot drift; only the ~32 px push-up at a section boundary is event-driven.
10
+ *
11
+ * Copies of the current section and two neighbours each side stay mounted; the UI
12
+ * thread picks the one that shows, so a crossing is covered the frame it happens
13
+ * and React only re-centres the five, at reading speed. While fast every copy hides
14
+ * and the in-list headers scroll past natively — nobody reads a date at that speed,
15
+ * and following it would cost a commit per crossing.
16
+ *
17
+ * Touches: hidden copies are translated off the host (they take none); the shown
18
+ * copy is `box-none`, so its buttons work and a drag anywhere else reaches the list.
19
+ */
20
+
21
+ import { memo, useMemo, useState } from 'react';
22
+ import { StyleSheet } from 'react-native';
23
+ import Animated, { useAnimatedReaction, useAnimatedStyle } from 'react-native-reanimated';
24
+ import { runOnJS } from 'react-native-worklets';
25
+ import { jsx as _jsx } from "react/jsx-runtime";
26
+ const NEIGHBOURS = 2;
27
+ // Scalar-only constants, returned by reference. Never a `transform` in a shared
28
+ // constant: Reanimated's `updateProps` processes transforms in place, and worklets
29
+ // freeze captured objects in DEV. `top` changes only at a section crossing.
30
+ const COPY_SHOWN = {
31
+ opacity: 1,
32
+ top: 0
33
+ };
34
+ const COPY_HIDDEN = {
35
+ opacity: 0,
36
+ top: -4096
37
+ };
38
+ const OverlayCopy = /*#__PURE__*/memo(({
39
+ sectionIndex,
40
+ title,
41
+ height,
42
+ sticky,
43
+ renderSectionHeader
44
+ }) => {
45
+ const shown = useAnimatedStyle(() => sticky.fast.value === 0 && sticky.currentSection.value === sectionIndex ? COPY_SHOWN : COPY_HIDDEN);
46
+ const style = useMemo(() => [styles.copy, {
47
+ height
48
+ }, shown], [height, shown]);
49
+ return /*#__PURE__*/_jsx(Animated.View, {
50
+ collapsable: false,
51
+ pointerEvents: "box-none",
52
+ style: style,
53
+ children: renderSectionHeader(title)
54
+ });
55
+ });
56
+ OverlayCopy.displayName = 'StickyHeaderOverlayCopy';
57
+ const StickyHeaderOverlayInner = ({
58
+ initialSection,
59
+ sectionCount,
60
+ titleAt,
61
+ height,
62
+ sticky,
63
+ renderSectionHeader
64
+ }) => {
65
+ const [centre, setCentre] = useState(initialSection);
66
+ useAnimatedReaction(() => sticky.fast.value === 1 ? -1 : sticky.currentSection.value, (s, prev) => {
67
+ if (s >= 0 && s !== prev) runOnJS(setCentre)(s);
68
+ });
69
+
70
+ // The push-up: the next section's header shoves the stuck one out of the top.
71
+ const pushUp = useAnimatedStyle(() => {
72
+ const next = sticky.tablesSV.value.sectionOffset[sticky.currentSection.value + 1];
73
+ const t = next === undefined ? 0 : next - sticky.scrollY.value - height;
74
+ return {
75
+ transform: [{
76
+ translateY: t < 0 ? t : 0
77
+ }]
78
+ };
79
+ });
80
+ const hostStyle = useMemo(() => [styles.host, {
81
+ height
82
+ }, pushUp], [height, pushUp]);
83
+ const copies = [];
84
+ const last = Math.min(sectionCount - 1, centre + NEIGHBOURS);
85
+ for (let s = Math.max(0, centre - NEIGHBOURS); s <= last; s += 1) {
86
+ const title = titleAt(s);
87
+ if (title === undefined) continue;
88
+ copies.push(/*#__PURE__*/_jsx(OverlayCopy, {
89
+ sectionIndex: s,
90
+ title: title,
91
+ height: height,
92
+ sticky: sticky,
93
+ renderSectionHeader: renderSectionHeader
94
+ }, title));
95
+ }
96
+ return /*#__PURE__*/_jsx(Animated.View, {
97
+ pointerEvents: "box-none",
98
+ style: hostStyle,
99
+ children: copies
100
+ });
101
+ };
102
+ export const StickyHeaderOverlay = /*#__PURE__*/memo(StickyHeaderOverlayInner);
103
+ StickyHeaderOverlay.displayName = 'StickyHeaderOverlay';
104
+ const styles = StyleSheet.create({
105
+ host: {
106
+ position: 'absolute',
107
+ top: 0,
108
+ left: 0,
109
+ right: 0,
110
+ overflow: 'hidden'
111
+ },
112
+ copy: {
113
+ position: 'absolute',
114
+ top: 0,
115
+ left: 0,
116
+ right: 0,
117
+ overflow: 'hidden'
118
+ }
119
+ });
120
+ //# sourceMappingURL=StickyHeaderOverlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memo","useMemo","useState","StyleSheet","Animated","useAnimatedReaction","useAnimatedStyle","runOnJS","jsx","_jsx","NEIGHBOURS","COPY_SHOWN","opacity","top","COPY_HIDDEN","OverlayCopy","sectionIndex","title","height","sticky","renderSectionHeader","shown","fast","value","currentSection","style","styles","copy","View","collapsable","pointerEvents","children","displayName","StickyHeaderOverlayInner","initialSection","sectionCount","titleAt","centre","setCentre","s","prev","pushUp","next","tablesSV","sectionOffset","t","undefined","scrollY","transform","translateY","hostStyle","host","copies","last","Math","min","max","push","StickyHeaderOverlay","create","position","left","right","overflow"],"sourceRoot":"../../../src","sources":["agenda/StickyHeaderOverlay.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,OAAO,EAAEC,QAAQ,QAA2B,OAAO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AC,IAAI,CAAC,EAAE;IAChE,MAAMtB,KAAK,GAAGmB,OAAO,CAACG,CAAC,CAAC;IACxB,IAAItB,KAAK,KAAK6B,SAAS,EAAE;IACzBM,MAAM,CAACK,IAAI,cACThD,IAAA,CAACM,WAAW;MAEVC,YAAY,EAAEuB,CAAE;MAChBtB,KAAK,EAAEA,KAAM;MACbC,MAAM,EAAEA,MAAO;MACfC,MAAM,EAAEA,MAAO;MACfC,mBAAmB,EAAEA;IAAoB,GALpCH,KAMN,CACH,CAAC;EACH;EAEA,oBACER,IAAA,CAACL,QAAQ,CAACwB,IAAI;IAACE,aAAa,EAAC,UAAU;IAACL,KAAK,EAAEyB,SAAU;IAAAnB,QAAA,EACtDqB;EAAM,CACM,CAAC;AAEpB,CAAC;AAED,OAAO,MAAMM,mBAAmB,gBAAG1D,IAAI,CAACiC,wBAAwB,CAAC;AACjEyB,mBAAmB,CAAC1B,WAAW,GAAG,qBAAqB;AAEvD,MAAMN,MAAM,GAAGvB,UAAU,CAACwD,MAAM,CAAC;EAC/BR,IAAI,EAAE;IAAES,QAAQ,EAAE,UAAU;IAAE/C,GAAG,EAAE,CAAC;IAAEgD,IAAI,EAAE,CAAC;IAAEC,KAAK,EAAE,CAAC;IAAEC,QAAQ,EAAE;EAAS,CAAC;EAC7EpC,IAAI,EAAE;IAAEiC,QAAQ,EAAE,UAAU;IAAE/C,GAAG,EAAE,CAAC;IAAEgD,IAAI,EAAE,CAAC;IAAEC,KAAK,EAAE,CAAC;IAAEC,QAAQ,EAAE;EAAS;AAC9E,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Sections → a flat row list with declared heights and prefix-sum offsets.
5
+ *
6
+ * PURE: the one place the agenda's geometry is decided (rule 3 — layout is
7
+ * declared, never measured). `offsets` has n+1 entries, so a row's height is
8
+ * `offsets[i+1] − offsets[i]` and the last entry is the content height.
9
+ *
10
+ * Offsets land on whole DEVICE pixels: the running sum stays exact, each row's top
11
+ * and bottom are that sum rounded, and its height is their difference. A slot's
12
+ * bottom is then exactly the next slot's top. Fractional offsets let Android round
13
+ * each edge on its own and open 1 px seams that showed the backdrop behind the list
14
+ * as grey hairlines (2026-09-11). No row moves by half a pixel or more.
15
+ */
16
+
17
+ import { PixelRatio } from 'react-native';
18
+ import { monthOrdinalOfYmd } from "../core/civil.js";
19
+ export const buildAgendaLayout = ({
20
+ sections,
21
+ sectionHeaderHeight,
22
+ heightForType,
23
+ getItemType,
24
+ keyExtractor,
25
+ headerIntern
26
+ }) => {
27
+ const rows = [];
28
+ const heights = [];
29
+ const offsets = [];
30
+ const sectionStart = new Array(sections.length);
31
+ const sectionOffset = new Array(sections.length + 1);
32
+ const monthOfSection = new Array(sections.length);
33
+ const sectionByTitle = new Map();
34
+ const ratio = PixelRatio.get();
35
+ const snap = v => Math.round(v * ratio) / ratio;
36
+ /** The unrounded running sum; `y` is its snapped value, the next row's top. */
37
+ let exact = 0;
38
+ let y = 0;
39
+ for (let s = 0; s < sections.length; s += 1) {
40
+ const {
41
+ title,
42
+ data
43
+ } = sections[s];
44
+ let header = headerIntern.get(title);
45
+ // The index is part of the identity: a window shifted by a day must not reuse
46
+ // a header that points at another section's bounds.
47
+ if (!header || header.section !== s) {
48
+ header = {
49
+ kind: 'header',
50
+ section: s,
51
+ title,
52
+ key: `h:${title}`
53
+ };
54
+ headerIntern.set(title, header);
55
+ }
56
+ sectionStart[s] = rows.length;
57
+ sectionOffset[s] = y;
58
+ monthOfSection[s] = monthOrdinalOfYmd(title);
59
+ sectionByTitle.set(title, s);
60
+ rows.push(header);
61
+ offsets.push(y);
62
+ exact += sectionHeaderHeight;
63
+ let bottom = snap(exact);
64
+ heights.push(bottom - y);
65
+ y = bottom;
66
+ for (let i = 0; i < data.length; i += 1) {
67
+ const item = data[i];
68
+ rows.push({
69
+ kind: 'item',
70
+ section: s,
71
+ indexInSection: i,
72
+ item,
73
+ key: keyExtractor(item, i)
74
+ });
75
+ offsets.push(y);
76
+ exact += heightForType(getItemType(item));
77
+ bottom = snap(exact);
78
+ heights.push(bottom - y);
79
+ y = bottom;
80
+ }
81
+ }
82
+ sectionOffset[sections.length] = y;
83
+ offsets.push(y);
84
+ return {
85
+ rows,
86
+ heights,
87
+ offsets,
88
+ sectionStart,
89
+ sectionOffset,
90
+ monthOfSection,
91
+ sectionByTitle,
92
+ totalHeight: y
93
+ };
94
+ };
95
+ //# sourceMappingURL=buildAgendaLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PixelRatio","monthOrdinalOfYmd","buildAgendaLayout","sections","sectionHeaderHeight","heightForType","getItemType","keyExtractor","headerIntern","rows","heights","offsets","sectionStart","Array","length","sectionOffset","monthOfSection","sectionByTitle","Map","ratio","get","snap","v","Math","round","exact","y","s","title","data","header","section","kind","key","set","push","bottom","i","item","indexInSection","totalHeight"],"sourceRoot":"../../../src","sources":["agenda/buildAgendaLayout.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,iBAAiB,QAAQ,kBAAe;AAoCjD,OAAO,MAAMC,iBAAiB,GAAGA,CAAI;EACnCC,QAAQ;EACRC,mBAAmB;EACnBC,aAAa;EACbC,WAAW;EACXC,YAAY;EACZC;AAC0B,CAAC,KAAsB;EACjD,MAAMC,IAAuB,GAAG,EAAE;EAClC,MAAMC,OAAiB,GAAG,EAAE;EAC5B,MAAMC,OAAiB,GAAG,EAAE;EAC5B,MAAMC,YAAY,GAAG,IAAIC,KAAK,CAASV,QAAQ,CAACW,MAAM,CAAC;EACvD,MAAMC,aAAa,GAAG,IAAIF,KAAK,CAASV,QAAQ,CAACW,MAAM,GAAG,CAAC,CAAC;EAC5D,MAAME,cAAc,GAAG,IAAIH,KAAK,CAASV,QAAQ,CAACW,MAAM,CAAC;EACzD,MAAMG,cAAc,GAAG,IAAIC,GAAG,CAAqB,CAAC;EAEp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,GAAGU,MAAM;IAEV,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGR,IAAI,CAACf,MAAM,EAAEuB,CAAC,IAAI,CAAC,EAAE;MACvC,MAAMC,IAAI,GAAGT,IAAI,CAACQ,CAAC,CAAC;MACpB5B,IAAI,CAAC0B,IAAI,CAAC;QAAEH,IAAI,EAAE,MAAM;QAAED,OAAO,EAAEJ,CAAC;QAAEY,cAAc,EAAEF,CAAC;QAAEC,IAAI;QAAEL,GAAG,EAAE1B,YAAY,CAAC+B,IAAI,EAAED,CAAC;MAAE,CAAC,CAAC;MAC5F1B,OAAO,CAACwB,IAAI,CAACT,CAAC,CAAC;MACfD,KAAK,IAAIpB,aAAa,CAACC,WAAW,CAACgC,IAAI,CAAC,CAAC;MACzCF,MAAM,GAAGf,IAAI,CAACI,KAAK,CAAC;MACpBf,OAAO,CAACyB,IAAI,CAACC,MAAM,GAAGV,CAAC,CAAC;MACxBA,CAAC,GAAGU,MAAM;IACZ;EACF;EACArB,aAAa,CAACZ,QAAQ,CAACW,MAAM,CAAC,GAAGY,CAAC;EAClCf,OAAO,CAACwB,IAAI,CAACT,CAAC,CAAC;EAEf,OAAO;IAAEjB,IAAI;IAAEC,OAAO;IAAEC,OAAO;IAAEC,YAAY;IAAEG,aAAa;IAAEC,cAAc;IAAEC,cAAc;IAAEuB,WAAW,EAAEd;EAAE,CAAC;AAChH,CAAC","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ /** Upper bound on mounted rows: a ceiling for the fastest fling. */
4
+ export const MAX_WINDOW_ROWS = 128;
5
+
6
+ /** Rows per window bucket, powers of two (bucketing is a mask). 32 while fast: ~25 → ~3 commits per fling (M1a). */
7
+ export const BUCKET_REST = 8;
8
+ export const BUCKET_FAST = 32;
9
+
10
+ /**
11
+ * The rest window, in viewport heights ahead of and behind the viewport (was 1.5 / 1).
12
+ * Every mounted row costs frame time on screen or not, so rest stays tight and flings
13
+ * widen by velocity. Measured with `removeClippedSubviews` in release on the SM-F415F
14
+ * (2026-09-11): the pair took fling p95 57 → 48 ms; the small window alone gained nothing.
15
+ */
16
+ export const REST_REACH_H = 0.5;
17
+ export const REST_TRAIL_H = 0.25;
18
+
19
+ /** px/ms. Above FAST_ENTER entering rows are deferred to the backdrop; below FAST_EXIT they upgrade. */
20
+ export const FAST_ENTER = 4;
21
+ export const FAST_EXIT = 1.5;
22
+
23
+ /** Deferred rows made real per frame, after the visible ones. */
24
+ export const UPGRADE_BATCH = 8;
25
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MAX_WINDOW_ROWS","BUCKET_REST","BUCKET_FAST","REST_REACH_H","REST_TRAIL_H","FAST_ENTER","FAST_EXIT","UPGRADE_BATCH"],"sourceRoot":"../../../src","sources":["agenda/constants.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,eAAe,GAAG,GAAG;;AAElC;AACA,OAAO,MAAMC,WAAW,GAAG,CAAC;AAC5B,OAAO,MAAMC,WAAW,GAAG,EAAE;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAG,GAAG;AAC/B,OAAO,MAAMC,YAAY,GAAG,IAAI;;AAEhC;AACA,OAAO,MAAMC,UAAU,GAAG,CAAC;AAC3B,OAAO,MAAMC,SAAS,GAAG,GAAG;;AAE5B;AACA,OAAO,MAAMC,aAAa,GAAG,CAAC","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * DEV height-drift check — the honesty test on "layout is declared, not measured".
5
+ *
6
+ * Every slot clips (`overflow: 'hidden'`), so a row taller than its table entry
7
+ * loses its bottom pixels silently. While a listener is installed
8
+ * (`onHeightDrift`, e.g. a temporary DEV overlay), each row type measures once and reports the delta.
9
+ * With no listener nothing measures: no wrapper view, no `onLayout`, in any build.
10
+ */
11
+
12
+ const declaredByType = new Map();
13
+ let listener = null;
14
+
15
+ /** Install (or with `null`, remove) the one drift listener. Installing re-samples. */
16
+ export const onHeightDrift = fn => {
17
+ if (!__DEV__) return;
18
+ listener = fn;
19
+ declaredByType.clear();
20
+ };
21
+
22
+ /** True while this row type still needs a sample at its current declaration. */
23
+ export const needsMeasure = (type, declared) => {
24
+ if (!__DEV__ || listener === null) return false;
25
+ const seen = declaredByType.get(type);
26
+ return seen === undefined || Math.abs(seen - declared) >= 0.01;
27
+ };
28
+ export const reportHeight = (type, declared, measured) => {
29
+ if (!__DEV__ || listener === null || !needsMeasure(type, declared)) return;
30
+ declaredByType.set(type, declared);
31
+ const delta = measured - declared;
32
+ if (Math.abs(delta) > 1) {
33
+ console.warn(`[agenda-kit] height drift ${type}: declared ${declared.toFixed(2)} measured ${measured.toFixed(2)}`);
34
+ }
35
+ listener({
36
+ type,
37
+ declared,
38
+ measured,
39
+ delta
40
+ });
41
+ };
42
+ //# sourceMappingURL=heights.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["declaredByType","Map","listener","onHeightDrift","fn","__DEV__","clear","needsMeasure","type","declared","seen","get","undefined","Math","abs","reportHeight","measured","set","delta","console","warn","toFixed"],"sourceRoot":"../../../src","sources":["agenda/heights.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,MAAMA,cAAc,GAAG,IAAIC,GAAG,CAAiB,CAAC;AAChD,IAAIC,QAA+C,GAAG,IAAI;;AAE1D;AACA,OAAO,MAAMC,aAAa,GAAIC,EAAyC,IAAW;EAChF,IAAI,CAACC,OAAO,EAAE;EACdH,QAAQ,GAAGE,EAAE;EACbJ,cAAc,CAACM,KAAK,CAAC,CAAC;AACxB,CAAC;;AAED;AACA,OAAO,MAAMC,YAAY,GAAGA,CAACC,IAAY,EAAEC,QAAgB,KAAc;EACvE,IAAI,CAACJ,OAAO,IAAIH,QAAQ,KAAK,IAAI,EAAE,OAAO,KAAK;EAC/C,MAAMQ,IAAI,GAAGV,cAAc,CAACW,GAAG,CAACH,IAAI,CAAC;EACrC,OAAOE,IAAI,KAAKE,SAAS,IAAIC,IAAI,CAACC,GAAG,CAACJ,IAAI,GAAGD,QAAQ,CAAC,IAAI,IAAI;AAChE,CAAC;AAED,OAAO,MAAMM,YAAY,GAAGA,CAACP,IAAY,EAAEC,QAAgB,EAAEO,QAAgB,KAAW;EACtF,IAAI,CAACX,OAAO,IAAIH,QAAQ,KAAK,IAAI,IAAI,CAACK,YAAY,CAACC,IAAI,EAAEC,QAAQ,CAAC,EAAE;EACpET,cAAc,CAACiB,GAAG,CAACT,IAAI,EAAEC,QAAQ,CAAC;EAClC,MAAMS,KAAK,GAAGF,QAAQ,GAAGP,QAAQ;EACjC,IAAII,IAAI,CAACC,GAAG,CAACI,KAAK,CAAC,GAAG,CAAC,EAAE;IACvBC,OAAO,CAACC,IAAI,CACV,6BAA6BZ,IAAI,cAAcC,QAAQ,CAACY,OAAO,CAAC,CAAC,CAAC,aAAaL,QAAQ,CAACK,OAAO,CAAC,CAAC,CAAC,EACpG,CAAC;EACH;EACAnB,QAAQ,CAAC;IAAEM,IAAI;IAAEC,QAAQ;IAAEO,QAAQ;IAAEE;EAAM,CAAC,CAAC;AAC/C,CAAC","ignoreList":[]}
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The agenda's scroll handler — everything per frame runs here, on the UI thread.
5
+ *
6
+ * 1. Derive the date: `dayIndex` is the day whose header holds most of the
7
+ * header slot, written whenever no animated programmatic scroll is travelling.
8
+ * 2. Move the window: pixel overscan that grows with velocity, bucketed so a
9
+ * bucket edge is crossed a few times per fling, not every frame.
10
+ * 3. Tell React rarely: per month crossing while moving, at settle, and once
11
+ * if the day under the header changes after settle.
12
+ */
13
+
14
+ import { useCallback } from 'react';
15
+ import { useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated';
16
+ import { runOnJS } from 'react-native-worklets';
17
+ import { bsearchLE, clampNum } from "../core/worklets.js";
18
+ import { BUCKET_FAST, BUCKET_REST, FAST_ENTER, FAST_EXIT, MAX_WINDOW_ROWS, REST_REACH_H, REST_TRAIL_H } from "./constants.js";
19
+
20
+ /** The layout's lookup tables, mirrored to the UI thread in one write per rebuild. */
21
+
22
+ export const useAgendaScrollSync = ({
23
+ tablesSV,
24
+ viewportSV,
25
+ headerHeight,
26
+ dayIndex,
27
+ listDragSeq,
28
+ onWindowChange,
29
+ onCommitDate,
30
+ onFastChange,
31
+ onDragBegin,
32
+ onSettle
33
+ }) => {
34
+ const scrollY = useSharedValue(0);
35
+ /** A decaying peak: Android reports velocity 0 on about every other event mid-fling. */
36
+ const velocity = useSharedValue(0);
37
+ /** Section whose header is at or above the top edge — the stuck header. */
38
+ const currentSection = useSharedValue(0);
39
+ /** 1 from drag or momentum begin to settle. The only thing that widens the overscan. */
40
+ const moving = useSharedValue(0);
41
+ /** 1 while too fast to read; rows entering the window are deferred. Hysteresis on enter/exit. */
42
+ const fast = useSharedValue(0);
43
+ /**
44
+ * Target of an ANIMATED programmatic scroll, or −1. While set the list writes no
45
+ * date — an animated scroll passes through every day on the way. Instant jumps
46
+ * never set it: their single event lands on the target, and a dropped event can
47
+ * therefore never leave the date frozen.
48
+ */
49
+ const programmaticY = useSharedValue(-1);
50
+ const windowFirst = useSharedValue(0);
51
+ const windowLast = useSharedValue(0);
52
+ const lastY = useSharedValue(0);
53
+ /** The section last handed to `onCommitDate`. */
54
+ const lastCommitted = useSharedValue(-1);
55
+ const applyOffset = useCallback((y, v) => {
56
+ 'worklet';
57
+
58
+ const {
59
+ offsets,
60
+ sectionOffset,
61
+ monthOfSection
62
+ } = tablesSV.value;
63
+ const rowCount = offsets.length - 1;
64
+ const sectionCount = sectionOffset.length - 1;
65
+ const H = viewportSV.value;
66
+ if (rowCount <= 0 || sectionCount <= 0 || H === 0) return;
67
+
68
+ // `y + 1`: a header sitting exactly on the edge is the current one.
69
+ const s = clampNum(bsearchLE(sectionOffset, y + 1), 0, sectionCount - 1);
70
+ if (currentSection.value !== s) currentSection.value = s;
71
+ // A header slot is shorter than any section, so the day holding most of
72
+ // it is `s` or `s + 1` — no second search.
73
+ const d = s + 1 < sectionCount && sectionOffset[s + 1] <= y + headerHeight / 2 ? s + 1 : s;
74
+ const owned = programmaticY.value < 0;
75
+ if (owned && dayIndex.value !== d) dayIndex.value = d;
76
+ const isMoving = moving.value === 1;
77
+ if (isMoving && v > FAST_ENTER && fast.value === 0) {
78
+ fast.value = 1;
79
+ runOnJS(onFastChange)(true);
80
+ } else if ((!isMoving || v < FAST_EXIT) && fast.value === 1) {
81
+ fast.value = 0;
82
+ runOnJS(onFastChange)(false);
83
+ }
84
+ const isFast = fast.value === 1;
85
+
86
+ // Overscan in pixels. Moving: 0.75 H plus 200 ms of travel, capped at 3 H of
87
+ // real rows or 6 H while entering rows are deferred (5 H of real rows was
88
+ // measured on the device and made the blank worse). At rest: the tight
89
+ // `REST_REACH_H` / `REST_TRAIL_H` — every mounted row costs frame time.
90
+ const reach = isMoving ? clampNum(0.75 * H + v * 200, H, (isFast ? 6 : 3) * H) : REST_REACH_H * H;
91
+ const trail = isMoving ? 0.2 * H : REST_TRAIL_H * H;
92
+ const goingDown = y >= lastY.value;
93
+ lastY.value = y;
94
+ const bucket = isFast ? BUCKET_FAST : BUCKET_REST;
95
+ let first = bsearchLE(offsets, y - (goingDown ? trail : reach)) & -bucket;
96
+ let last = Math.min(rowCount - 1, bsearchLE(offsets, y + H + (goingDown ? reach : trail)) | bucket - 1);
97
+
98
+ // While fast the window only grows in the travel direction: a velocity
99
+ // jitter across a 32-row bucket edge would otherwise tear down and rebuild
100
+ // 32 rows mid-fling. Released the moment `fast` drops, so the upgrade to
101
+ // real rows happens on the tight window (the 483 ms stall, M1a).
102
+ if (isFast) {
103
+ if (goingDown) {
104
+ if (first > windowFirst.value) first = windowFirst.value;
105
+ if (last < windowLast.value) last = windowLast.value;
106
+ } else {
107
+ if (first > windowFirst.value) first = windowFirst.value;
108
+ if (last < windowLast.value) last = windowLast.value;
109
+ }
110
+ }
111
+ // The cap trims the trailing edge — those rows are leaving.
112
+ if (last - first + 1 > MAX_WINDOW_ROWS) {
113
+ if (goingDown) first = last - MAX_WINDOW_ROWS + 1;else last = first + MAX_WINDOW_ROWS - 1;
114
+ }
115
+ if (first !== windowFirst.value || last !== windowLast.value) {
116
+ windowFirst.value = first;
117
+ windowLast.value = last;
118
+ runOnJS(onWindowChange)(first, last);
119
+ }
120
+ if (!owned) return;
121
+ const committed = lastCommitted.value;
122
+ if (isMoving) {
123
+ if (committed < 0 || monthOfSection[d] !== monthOfSection[committed]) {
124
+ lastCommitted.value = d;
125
+ runOnJS(onCommitDate)(d);
126
+ }
127
+ } else if (d !== committed && v < 0.5) {
128
+ // "Nearly still": a hard fling's first events can arrive before
129
+ // `onBeginDrag`, and each would otherwise commit a throwaway day.
130
+ lastCommitted.value = d;
131
+ runOnJS(onCommitDate)(d);
132
+ }
133
+ }, [currentSection, dayIndex, fast, headerHeight, lastCommitted, lastY, moving, onCommitDate, onFastChange, onWindowChange, programmaticY, tablesSV, viewportSV, windowFirst, windowLast]);
134
+
135
+ /** The one settle path: a no-throw release or a momentum end. */
136
+ const endMove = useCallback(y => {
137
+ 'worklet';
138
+
139
+ moving.value = 0;
140
+ velocity.value = 0;
141
+ // The settle event's offset is the only one guaranteed final: Android drops
142
+ // a scroll event inside `scrollEventThrottle` of the previous one (M6).
143
+ scrollY.value = y;
144
+ const target = programmaticY.value;
145
+ if (target >= 0) {
146
+ const {
147
+ offsets
148
+ } = tablesSV.value;
149
+ const maxY = (offsets[offsets.length - 1] ?? 0) - viewportSV.value;
150
+ if (Math.abs(y - target) < 2 || y >= maxY - 1) programmaticY.value = -1;
151
+ }
152
+ applyOffset(y, 0);
153
+ if (onSettle) runOnJS(onSettle)();
154
+ }, [applyOffset, moving, onSettle, programmaticY, scrollY, tablesSV, velocity, viewportSV]);
155
+ const scrollHandler = useAnimatedScrollHandler({
156
+ onBeginDrag: () => {
157
+ moving.value = 1;
158
+ // A finger overrides any move still travelling.
159
+ programmaticY.value = -1;
160
+ listDragSeq.value = listDragSeq.value + 1;
161
+ if (onDragBegin) runOnJS(onDragBegin)();
162
+ },
163
+ onMomentumBegin: () => {
164
+ moving.value = 1;
165
+ },
166
+ onScroll: e => {
167
+ const y = e.contentOffset.y;
168
+ // A hard fling's first event can jump hundreds of pixels while reporting
169
+ // velocity 0; hand a jump over 24 px on as motion, not as "at rest".
170
+ const jump = Math.abs(y - scrollY.value);
171
+ scrollY.value = y;
172
+ if (programmaticY.value >= 0 && Math.abs(y - programmaticY.value) < 1.5) {
173
+ programmaticY.value = -1;
174
+ }
175
+ const raw = e.velocity ? Math.abs(e.velocity.y) : 0;
176
+ const held = velocity.value * 0.85;
177
+ velocity.value = raw > held ? raw : held;
178
+ applyOffset(y, jump > 24 && velocity.value < 1 ? 1 : velocity.value);
179
+ },
180
+ onEndDrag: e => {
181
+ // A release with no throw gets no momentum end, so it settles here.
182
+ if (Math.abs(e.velocity ? e.velocity.y : 0) < 0.05) endMove(e.contentOffset.y);
183
+ },
184
+ onMomentumEnd: e => {
185
+ endMove(e.contentOffset.y);
186
+ }
187
+ }, [applyOffset, endMove, listDragSeq, moving, onDragBegin, programmaticY, scrollY, velocity]);
188
+ return {
189
+ scrollY,
190
+ currentSection,
191
+ moving,
192
+ fast,
193
+ programmaticY,
194
+ windowFirst,
195
+ windowLast,
196
+ scrollHandler,
197
+ applyOffset
198
+ };
199
+ };
200
+ //# sourceMappingURL=useAgendaScrollSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useAnimatedScrollHandler","useSharedValue","runOnJS","bsearchLE","clampNum","BUCKET_FAST","BUCKET_REST","FAST_ENTER","FAST_EXIT","MAX_WINDOW_ROWS","REST_REACH_H","REST_TRAIL_H","useAgendaScrollSync","tablesSV","viewportSV","headerHeight","dayIndex","listDragSeq","onWindowChange","onCommitDate","onFastChange","onDragBegin","onSettle","scrollY","velocity","currentSection","moving","fast","programmaticY","windowFirst","windowLast","lastY","lastCommitted","applyOffset","y","v","offsets","sectionOffset","monthOfSection","value","rowCount","length","sectionCount","H","s","d","owned","isMoving","isFast","reach","trail","goingDown","bucket","first","last","Math","min","committed","endMove","target","maxY","abs","scrollHandler","onBeginDrag","onMomentumBegin","onScroll","e","contentOffset","jump","raw","held","onEndDrag","onMomentumEnd"],"sourceRoot":"../../../src","sources":["agenda/useAgendaScrollSync.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,wBAAwB,EAAEC,cAAc,QAA0B,yBAAyB;AACpG,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,SAAS,EAAEC,QAAQ,QAAQ,qBAAkB;AACtD,SACEC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,YAAY,EACZC,YAAY,QACP,gBAAa;;AAEpB;;AAuBA,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,QAAQ;EACRC,UAAU;EACVC,YAAY;EACZC,QAAQ;EACRC,WAAW;EACXC,cAAc;EACdC,YAAY;EACZC,YAAY;EACZC,WAAW;EACXC;AACyB,CAAC,KAAK;EAC/B,MAAMC,OAAO,GAAGtB,cAAc,CAAC,CAAC,CAAC;EACjC;EACA,MAAMuB,QAAQ,GAAGvB,cAAc,CAAC,CAAC,CAAC;EAClC;EACA,MAAMwB,cAAc,GAAGxB,cAAc,CAAC,CAAC,CAAC;EACxC;EACA,MAAMyB,MAAM,GAAGzB,cAAc,CAAC,CAAC,CAAC;EAChC;EACA,MAAM0B,IAAI,GAAG1B,cAAc,CAAC,CAAC,CAAC;EAC9B;AACF;AACA;AACA;AACA;AACA;EACE,MAAM2B,aAAa,GAAG3B,cAAc,CAAC,CAAC,CAAC,CAAC;EACxC,MAAM4B,WAAW,GAAG5B,cAAc,CAAC,CAAC,CAAC;EACrC,MAAM6B,UAAU,GAAG7B,cAAc,CAAC,CAAC,CAAC;EACpC,MAAM8B,KAAK,GAAG9B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SAAS,EAAGL,CAAC,IAAK;MAChB;MACA,IAAIX,IAAI,CAACM,GAAG,CAACK,CAAC,CAAC1C,QAAQ,GAAG0C,CAAC,CAAC1C,QAAQ,CAACU,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,EAAEwB,OAAO,CAACQ,CAAC,CAACC,aAAa,CAACjC,CAAC,CAAC;IAChF,CAAC;IACDsC,aAAa,EAAGN,CAAC,IAAK;MACpBR,OAAO,CAACQ,CAAC,CAACC,aAAa,CAACjC,CAAC,CAAC;IAC5B;EACF,CAAC,EACD,CAACD,WAAW,EAAEyB,OAAO,EAAEzC,WAAW,EAAES,MAAM,EAAEL,WAAW,EAAEO,aAAa,EAAEL,OAAO,EAAEC,QAAQ,CAC3F,CAAC;EAED,OAAO;IACLD,OAAO;IACPE,cAAc;IACdC,MAAM;IACNC,IAAI;IACJC,aAAa;IACbC,WAAW;IACXC,UAAU;IACVgC,aAAa;IACb7B;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * An up arrow drawn from two Views: a stem, and a square with only its top and
5
+ * left borders painted, rotated 45° into a chevron.
6
+ *
7
+ * The kit ships no icon font and takes no SVG peer dependency for one 14 px
8
+ * glyph — a consumer should not have to install an icon package to get a Today
9
+ * button. Rotation of the whole arrow is the caller's job (`TodayButton` flips
10
+ * it 180° on the UI thread).
11
+ */
12
+
13
+ import { View } from 'react-native';
14
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ const STROKE = 1.6;
16
+ export const ArrowGlyph = ({
17
+ size,
18
+ color
19
+ }) => {
20
+ // Rotating a square 45° about its centre puts its top-left corner directly
21
+ // above that centre, at (√2 / 2) · side away — so the apex lands on
22
+ // `apexY` when the square's centre sits that far below it.
23
+ const side = size * 0.34;
24
+ const apexY = size * 0.12;
25
+ const headCentreY = apexY + Math.SQRT2 / 2 * side;
26
+ return /*#__PURE__*/_jsxs(View, {
27
+ style: {
28
+ width: size,
29
+ height: size
30
+ },
31
+ children: [/*#__PURE__*/_jsx(View, {
32
+ style: {
33
+ position: 'absolute',
34
+ left: '50%',
35
+ marginLeft: -STROKE / 2,
36
+ top: apexY,
37
+ width: STROKE,
38
+ height: size - apexY * 2,
39
+ backgroundColor: color,
40
+ borderRadius: STROKE
41
+ }
42
+ }), /*#__PURE__*/_jsx(View, {
43
+ style: {
44
+ position: 'absolute',
45
+ left: '50%',
46
+ marginLeft: -side / 2,
47
+ top: headCentreY - side / 2,
48
+ width: side,
49
+ height: side,
50
+ borderTopWidth: STROKE,
51
+ borderLeftWidth: STROKE,
52
+ borderColor: color,
53
+ transform: [{
54
+ rotate: '45deg'
55
+ }]
56
+ }
57
+ })]
58
+ });
59
+ };
60
+ //# sourceMappingURL=ArrowGlyph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","jsx","_jsx","jsxs","_jsxs","STROKE","ArrowGlyph","size","color","side","apexY","headCentreY","Math","SQRT2","style","width","height","children","position","left","marginLeft","top","backgroundColor","borderRadius","borderTopWidth","borderLeftWidth","borderColor","transform","rotate"],"sourceRoot":"../../../src","sources":["core/ArrowGlyph.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpC,MAAMC,MAAM,GAAG,GAAG;AAElB,OAAO,MAAMC,UAAU,GAAGA,CAAC;EAAEC,IAAI;EAAEC;AAAuC,CAAC,KAAK;EAC9E;EACA;EACA;EACA,MAAMC,IAAI,GAAGF,IAAI,GAAG,IAAI;EACxB,MAAMG,KAAK,GAAGH,IAAI,GAAG,IAAI;EACzB,MAAMI,WAAW,GAAGD,KAAK,GAAIE,IAAI,CAACC,KAAK,GAAG,CAAC,GAAIJ,IAAI;EAEnD,oBACEL,KAAA,CAACJ,IAAI;IAACc,KAAK,EAAE;MAAEC,KAAK,EAAER,IAAI;MAAES,MAAM,EAAET;IAAK,CAAE;IAAAU,QAAA,gBACzCf,IAAA,CAACF,IAAI;MACHc,KAAK,EAAE;QACLI,QAAQ,EAAE,UAAU;QACpBC,IAAI,EAAE,KAAK;QACXC,UAAU,EAAE,CAACf,MAAM,GAAG,CAAC;QACvBgB,GAAG,EAAEX,KAAK;QACVK,KAAK,EAAEV,MAAM;QACbW,MAAM,EAAET,IAAI,GAAGG,KAAK,GAAG,CAAC;QACxBY,eAAe,EAAEd,KAAK;QACtBe,YAAY,EAAElB;MAChB;IAAE,CACH,CAAC,eACFH,IAAA,CAACF,IAAI;MACHc,KAAK,EAAE;QACLI,QAAQ,EAAE,UAAU;QACpBC,IAAI,EAAE,KAAK;QACXC,UAAU,EAAE,CAACX,IAAI,GAAG,CAAC;QACrBY,GAAG,EAAEV,WAAW,GAAGF,IAAI,GAAG,CAAC;QAC3BM,KAAK,EAAEN,IAAI;QACXO,MAAM,EAAEP,IAAI;QACZe,cAAc,EAAEnB,MAAM;QACtBoB,eAAe,EAAEpB,MAAM;QACvBqB,WAAW,EAAElB,KAAK;QAClBmB,SAAS,EAAE,CAAC;UAAEC,MAAM,EAAE;QAAQ,CAAC;MACjC;IAAE,CACH,CAAC;EAAA,CACE,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Two contexts, split by how often they change.
5
+ *
6
+ * `CalendarContext` is identity-stable for the life of the provider: every
7
+ * scroller reads it, and none of them may re-render because a date was committed.
8
+ * `CalendarDateContext` is the committed date alone — only surfaces that DRAW the
9
+ * committed date (the month grid's selection) subscribe to it. Surfaces that
10
+ * track the date at frame rate read `store.dayIndex` and subscribe to neither.
11
+ */
12
+
13
+ import { createContext, useContext } from 'react';
14
+ export const CalendarContext = /*#__PURE__*/createContext(null);
15
+ export const CalendarDateContext = /*#__PURE__*/createContext('');
16
+ export const useCalendarContext = () => {
17
+ const ctx = useContext(CalendarContext);
18
+ if (!ctx) {
19
+ throw new Error('[agenda-kit] useCalendarContext outside <CalendarProvider>. AgendaList, ' + 'ExpandableCalendar and TimelineList share one index space and must be inside it.');
20
+ }
21
+ return ctx;
22
+ };
23
+
24
+ /** The committed date. Subscribing re-renders on every commit — use sparingly. */
25
+ export const useCalendarDate = () => useContext(CalendarDateContext);
26
+ //# sourceMappingURL=CalendarContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","CalendarContext","CalendarDateContext","useCalendarContext","ctx","Error","useCalendarDate"],"sourceRoot":"../../../src","sources":["core/CalendarContext.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAqBjD,OAAO,MAAMC,eAAe,gBAAGF,aAAa,CAA8B,IAAI,CAAC;AAC/E,OAAO,MAAMG,mBAAmB,gBAAGH,aAAa,CAAa,EAAE,CAAC;AAEhE,OAAO,MAAMI,kBAAkB,GAAGA,CAAA,KAA4B;EAC5D,MAAMC,GAAG,GAAGJ,UAAU,CAACC,eAAe,CAAC;EACvC,IAAI,CAACG,GAAG,EAAE;IACR,MAAM,IAAIC,KAAK,CACb,0EAA0E,GACxE,kFACJ,CAAC;EACH;EACA,OAAOD,GAAG;AACZ,CAAC;;AAED;AACA,OAAO,MAAME,eAAe,GAAGA,CAAA,KAAkBN,UAAU,CAACE,mBAAmB,CAAC","ignoreList":[]}