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,58 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The expandable calendar's geometry — numbers only, never a colour. Transcribed
5
+ * from `react-native-calendars`' style files (`calendar/day/basic/style.js`,
6
+ * `expandableCalendar/style.js`, `calendar/style.js`), then resized on
7
+ * 2026-09-11 toward the owner's Teams reference: a 40 px circle (was 32) with a
8
+ * month's short name above its 1st, in a row 2 px taller.
9
+ */
10
+
11
+ import { FONT_SIZE } from "../theme/tokens.js";
12
+
13
+ /** The selection circle and the tap target of a day. */
14
+ export const DAY_CELL = 40;
15
+ export const WEEK_ROW_V_MARGIN = 4;
16
+ /** The cell plus its two margins — the library's `WEEK_HEIGHT` shape. */
17
+ export const WEEK_ROW_HEIGHT = DAY_CELL + WEEK_ROW_V_MARGIN * 2;
18
+ export const WEEK_ROW_H_PADDING = 15;
19
+ /**
20
+ * Declared, never measured: the strip positions its dots absolutely and the grid
21
+ * flows them under the text, and an undeclared line box put them ~1.6 px apart.
22
+ * Inter's line box is fontSize × 1.21.
23
+ */
24
+ export const DAY_LINE_HEIGHT = Math.round(FONT_SIZE.sm * 1.21);
25
+ export const DOT_SIZE = 4;
26
+ export const DOT_MARGIN_TOP = 1;
27
+ /** Number and dot centred in the cell. */
28
+ export const DAY_TEXT_MARGIN_TOP = Math.round((DAY_CELL - DAY_LINE_HEIGHT - DOT_MARGIN_TOP - DOT_SIZE) / 2);
29
+
30
+ /** The strip's month name over a 1st, from the cell top; that cell's number and dot move under it. */
31
+ export const MONTH_LABEL_TOP = 1;
32
+ export const MONTH_LABEL_LINE_HEIGHT = Math.round(FONT_SIZE.xxs * 1.21);
33
+ export const FIRST_OF_MONTH_TEXT_TOP = MONTH_LABEL_TOP + MONTH_LABEL_LINE_HEIGHT;
34
+ export const KNOB_CONTAINER_HEIGHT = 24;
35
+ export const KNOB_WIDTH = 40;
36
+ export const KNOB_HEIGHT = 4;
37
+
38
+ /** The month layer is laid out once at the largest month's height. */
39
+ export const MAX_WEEKS = 6;
40
+
41
+ /** px a drag must travel before release commits to the other end. */
42
+ export const PAN_THRESHOLD = 30;
43
+ /** px/s: a faster flick decides the direction regardless of distance. */
44
+ export const SNAP_VELOCITY = 300;
45
+
46
+ /** Closed (one week), open on a `weeks`-row month, and the distance between; knob band included. */
47
+ export const calendarHeights = weeks => {
48
+ 'worklet';
49
+
50
+ const closed = WEEK_ROW_HEIGHT + KNOB_CONTAINER_HEIGHT;
51
+ const travel = WEEK_ROW_HEIGHT * (weeks - 1);
52
+ return {
53
+ closed,
54
+ full: closed + travel,
55
+ travel
56
+ };
57
+ };
58
+ //# sourceMappingURL=geometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FONT_SIZE","DAY_CELL","WEEK_ROW_V_MARGIN","WEEK_ROW_HEIGHT","WEEK_ROW_H_PADDING","DAY_LINE_HEIGHT","Math","round","sm","DOT_SIZE","DOT_MARGIN_TOP","DAY_TEXT_MARGIN_TOP","MONTH_LABEL_TOP","MONTH_LABEL_LINE_HEIGHT","xxs","FIRST_OF_MONTH_TEXT_TOP","KNOB_CONTAINER_HEIGHT","KNOB_WIDTH","KNOB_HEIGHT","MAX_WEEKS","PAN_THRESHOLD","SNAP_VELOCITY","calendarHeights","weeks","closed","travel","full"],"sourceRoot":"../../../src","sources":["expandable/geometry.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,oBAAiB;;AAE3C;AACA,OAAO,MAAMC,QAAQ,GAAG,EAAE;AAC1B,OAAO,MAAMC,iBAAiB,GAAG,CAAC;AAClC;AACA,OAAO,MAAMC,eAAe,GAAGF,QAAQ,GAAGC,iBAAiB,GAAG,CAAC;AAC/D,OAAO,MAAME,kBAAkB,GAAG,EAAE;AACpC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGC,IAAI,CAACC,KAAK,CAACP,SAAS,CAACQ,EAAE,GAAG,IAAI,CAAC;AAC9D,OAAO,MAAMC,QAAQ,GAAG,CAAC;AACzB,OAAO,MAAMC,cAAc,GAAG,CAAC;AAC/B;AACA,OAAO,MAAMC,mBAAmB,GAAGL,IAAI,CAACC,KAAK,CAAC,CAACN,QAAQ,GAAGI,eAAe,GAAGK,cAAc,GAAGD,QAAQ,IAAI,CAAC,CAAC;;AAE3G;AACA,OAAO,MAAMG,eAAe,GAAG,CAAC;AAChC,OAAO,MAAMC,uBAAuB,GAAGP,IAAI,CAACC,KAAK,CAACP,SAAS,CAACc,GAAG,GAAG,IAAI,CAAC;AACvE,OAAO,MAAMC,uBAAuB,GAAGH,eAAe,GAAGC,uBAAuB;AAEhF,OAAO,MAAMG,qBAAqB,GAAG,EAAE;AACvC,OAAO,MAAMC,UAAU,GAAG,EAAE;AAC5B,OAAO,MAAMC,WAAW,GAAG,CAAC;;AAE5B;AACA,OAAO,MAAMC,SAAS,GAAG,CAAC;;AAE1B;AACA,OAAO,MAAMC,aAAa,GAAG,EAAE;AAC/B;AACA,OAAO,MAAMC,aAAa,GAAG,GAAG;;AAEhC;AACA,OAAO,MAAMC,eAAe,GAAIC,KAAa,IAAK;EAChD,SAAS;;EACT,MAAMC,MAAM,GAAGrB,eAAe,GAAGa,qBAAqB;EACtD,MAAMS,MAAM,GAAGtB,eAAe,IAAIoB,KAAK,GAAG,CAAC,CAAC;EAC5C,OAAO;IAAEC,MAAM;IAAEE,IAAI,EAAEF,MAAM,GAAGC,MAAM;IAAEA;EAAO,CAAC;AAClD,CAAC","ignoreList":[]}
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Drag the calendar open and closed. `progress` moves (0 closed, 1 open); every
5
+ * layer reads it as a transform or opacity. Follows `ChartSheet.tsx`: remember
6
+ * where this drag began, clamp while dragging, land on an end. `activeOffsetY(±8)`
7
+ * and `failOffsetX(±12)` settle the axis against the horizontal pagers inside the
8
+ * same detector within the first few pixels.
9
+ */
10
+
11
+ import { ANIMATION } from "../theme/tokens.js";
12
+ import { useCallback, useMemo } from 'react';
13
+ import { Gesture } from 'react-native-gesture-handler';
14
+ import { cancelAnimation, useSharedValue, withTiming } from 'react-native-reanimated';
15
+ import { runOnJS, runOnUI } from 'react-native-worklets';
16
+ import { KIT_EASING } from "../core/motion.js";
17
+ import { clampNum } from "../core/worklets.js";
18
+ import { PAN_THRESHOLD, SNAP_VELOCITY } from "./geometry.js";
19
+ const finish = (lastReported, target, onToggled) => {
20
+ 'worklet';
21
+
22
+ if (lastReported.value === target) return;
23
+ lastReported.value = target;
24
+ runOnJS(onToggled)(target === 1);
25
+ };
26
+
27
+ /**
28
+ * Snap to an end and report a CHANGE of end once it lands. Module scope, so the
29
+ * plugin workletizes it unconditionally. The duration scales with the distance
30
+ * left, so a release two pixels from open does not take the full animation.
31
+ */
32
+ export const snap = (progress, lastReported, target, reduceMotion, onToggled) => {
33
+ 'worklet';
34
+
35
+ if (progress.value === target) {
36
+ finish(lastReported, target, onToggled);
37
+ return;
38
+ }
39
+ const duration = reduceMotion ? 0 : clampNum(Math.abs(target - progress.value) * ANIMATION.slow, ANIMATION.base, ANIMATION.slow);
40
+ progress.value = withTiming(target, {
41
+ duration,
42
+ easing: KIT_EASING
43
+ }, done => {
44
+ 'worklet';
45
+
46
+ if (done) finish(lastReported, target, onToggled);
47
+ });
48
+ };
49
+ export const useExpandGesture = ({
50
+ progress,
51
+ travel,
52
+ enabled,
53
+ openThreshold = PAN_THRESHOLD,
54
+ closeThreshold = PAN_THRESHOLD,
55
+ reduceMotion,
56
+ initialOpen,
57
+ onToggled
58
+ }) => {
59
+ const start = useSharedValue(0);
60
+ /** 1 once `onEnd` ran for this gesture, so `onFinalize` does not snap twice. */
61
+ const ended = useSharedValue(0);
62
+ /** The end last reported: `onToggled` fires on a change only. */
63
+ const lastReported = useSharedValue(initialOpen ? 1 : 0);
64
+ const pan = useMemo(() => Gesture.Pan().enabled(enabled).activeOffsetY([-8, 8]).failOffsetX([-12, 12]).onBegin(() => {
65
+ 'worklet';
66
+
67
+ // Catch the calendar mid-snap rather than letting it finish under the finger.
68
+ cancelAnimation(progress);
69
+ start.value = progress.value;
70
+ ended.value = 0;
71
+ }).onUpdate(e => {
72
+ 'worklet';
73
+
74
+ // Closed and dragging up: hold at 0, which reads as the end of the travel.
75
+ if (start.value === 0 && e.translationY < 0) {
76
+ progress.value = 0;
77
+ return;
78
+ }
79
+ progress.value = clampNum(start.value + e.translationY / travel.value, 0, 1);
80
+ }).onEnd(e => {
81
+ 'worklet';
82
+
83
+ ended.value = 1;
84
+ const deltaPx = (progress.value - start.value) * travel.value;
85
+ let target;
86
+ if (Math.abs(e.velocityY) > SNAP_VELOCITY) {
87
+ target = e.velocityY > 0 ? 1 : 0;
88
+ } else if (start.value < 0.5) {
89
+ target = deltaPx > openThreshold ? 1 : 0;
90
+ } else {
91
+ target = -deltaPx > closeThreshold ? 0 : 1;
92
+ }
93
+ snap(progress, lastReported, target, reduceMotion, onToggled);
94
+ }).onFinalize(() => {
95
+ 'worklet';
96
+
97
+ if (ended.value === 1) return;
98
+ // Cancelled before activating (a day tap, a pager claiming the touch):
99
+ // land on the nearer end rather than freezing where `onBegin` caught it.
100
+ snap(progress, lastReported, progress.value >= 0.5 ? 1 : 0, reduceMotion, onToggled);
101
+ }),
102
+ // Shared values are stable for the hook's life; only these rebuild the gesture.
103
+ // eslint-disable-next-line react-hooks/exhaustive-deps
104
+ [closeThreshold, enabled, onToggled, openThreshold, reduceMotion]);
105
+
106
+ /** `undefined` toggles. Returns the end moved TO — the library's `toggleCalendarPosition` contract. */
107
+ const snapTo = useCallback(target => {
108
+ const to = target ?? (progress.value >= 0.5 ? 0 : 1);
109
+ runOnUI(snap)(progress, lastReported, to, reduceMotion, onToggled);
110
+ return to === 1;
111
+ }, [lastReported, onToggled, progress, reduceMotion]);
112
+ return {
113
+ pan,
114
+ snapTo,
115
+ lastReported
116
+ };
117
+ };
118
+ //# sourceMappingURL=useExpandGesture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ANIMATION","useCallback","useMemo","Gesture","cancelAnimation","useSharedValue","withTiming","runOnJS","runOnUI","KIT_EASING","clampNum","PAN_THRESHOLD","SNAP_VELOCITY","finish","lastReported","target","onToggled","value","snap","progress","reduceMotion","duration","Math","abs","slow","base","easing","done","useExpandGesture","travel","enabled","openThreshold","closeThreshold","initialOpen","start","ended","pan","Pan","activeOffsetY","failOffsetX","onBegin","onUpdate","e","translationY","onEnd","deltaPx","velocityY","onFinalize","snapTo","to"],"sourceRoot":"../../../src","sources":["expandable/useExpandGesture.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,oBAAiB;AAC3C,SAASC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC5C,SAASC,OAAO,QAAQ,8BAA8B;AACtD,SACEC,eAAe,EACfC,cAAc,EACdC,UAAU,QAEL,yBAAyB;AAChC,SAASC,OAAO,EAAEC,OAAO,QAAQ,uBAAuB;AACxD,SAASC,UAAU,QAAQ,mBAAgB;AAC3C,SAASC,QAAQ,QAAQ,qBAAkB;AAC3C,SAASC,aAAa,EAAEC,aAAa,QAAQ,eAAY;AAIzD,MAAMC,MAAM,GAAGA,CAACC,Y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
5
+ * shared it until it became a vertical tape (2026-09-11).
6
+ *
7
+ * A programmatic move pages to its day instantly; moves stamped with the pager's
8
+ * own `origin` are ignored. A doctor's swipe commits at momentum end, and only
9
+ * when it left its start page.
10
+ */
11
+
12
+ import { useCallback, useEffect, useRef, useState } from 'react';
13
+ import { scrollTo, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated';
14
+ import { runOnJS, runOnUI } from 'react-native-worklets';
15
+ import { useCalendarContext } from "../core/CalendarContext.js";
16
+ /** The pager reads only drag begin and momentum end; the scroll events between are waste. */
17
+ export const PAGER_SCROLL_THROTTLE = 100;
18
+ /** A new width moved every page: land back on the one that was showing. */
19
+ const reland = (ref, widthSV, page, ready, width) => {
20
+ 'worklet';
21
+
22
+ widthSV.value = width;
23
+ if (ready.value === 1) scrollTo(ref, page.value * width, 0, false);
24
+ };
25
+ export const useHorizontalPager = ({
26
+ width,
27
+ initialPage,
28
+ origin,
29
+ pageOf,
30
+ page: callerPage,
31
+ onSettled
32
+ }) => {
33
+ const {
34
+ store
35
+ } = useCalendarContext();
36
+ const ref = useAnimatedRef();
37
+ const widthSV = useSharedValue(width);
38
+ const ownPage = useSharedValue(initialPage);
39
+ const page = callerPage ?? ownPage;
40
+ const dragStartPage = useSharedValue(0);
41
+ const userDriven = useSharedValue(0);
42
+ const ready = useSharedValue(0);
43
+
44
+ // Read once: the native ScrollView re-applies `contentOffset` whenever its value
45
+ // changes, which would throw the pager back to its mount page on a width change.
46
+ const [contentOffset] = useState(() => ({
47
+ x: initialPage * width,
48
+ y: 0
49
+ }));
50
+ const laidOutWidth = useRef(width);
51
+ useEffect(() => {
52
+ if (laidOutWidth.current === width) return;
53
+ laidOutWidth.current = width;
54
+ runOnUI(reland)(ref, widthSV, page, ready, width);
55
+ }, [page, ready, ref, width, widthSV]);
56
+ const onLayout = useCallback(() => {
57
+ ready.value = 1;
58
+ }, [ready]);
59
+ const move = store.move;
60
+ useAnimatedReaction(() => move.value.seq, (seq, prev) => {
61
+ if (prev === null || seq === prev) return;
62
+ const m = move.value;
63
+ if (m.origin === origin) return;
64
+ const target = pageOf(m.idx);
65
+ if (page.value !== target) page.value = target;
66
+ if (ready.value === 1) {
67
+ userDriven.value = 0;
68
+ scrollTo(ref, target * widthSV.value, 0, false);
69
+ }
70
+ });
71
+ const onScroll = useAnimatedScrollHandler({
72
+ onBeginDrag: () => {
73
+ userDriven.value = 1;
74
+ dragStartPage.value = page.value;
75
+ },
76
+ onMomentumEnd: e => {
77
+ const landed = Math.round(e.contentOffset.x / widthSV.value);
78
+ const wasUser = userDriven.value === 1;
79
+ userDriven.value = 0;
80
+ if (page.value !== landed) page.value = landed;
81
+ if (wasUser && landed !== dragStartPage.value) runOnJS(onSettled)(landed);
82
+ }
83
+ });
84
+ return {
85
+ ref,
86
+ onScroll,
87
+ onLayout,
88
+ contentOffset,
89
+ widthSV
90
+ };
91
+ };
92
+ //# sourceMappingURL=useHorizontalPager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useEffect","useRef","useState","scrollTo","useAnimatedReaction","useAnimatedRef","useAnimatedScrollHandler","useSharedValue","runOnJS","runOnUI","useCalendarContext","PAGER_SCROLL_THROTTLE","reland","ref","widthSV","page","ready","width","value","useHorizontalPager","initialPage","origin","pageOf","callerPage","onSettled","store","ownPage","dragStartPage","userDriven","contentOffset","x","y","laidOutWidth","current","onLayout","move","seq","prev","m","target","idx","onScroll","onBeginDrag","onMomentumEnd","e","landed","Math","round","wasUser"],"sourceRoot":"../../../src","sources":["expandable/useHorizontalPager.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEhE,SACEC,QAAQ,EACRC,mBAAmB,EACnBC,cAAc,EACdC,wBAAwB,EACxBC,cAAc,QAGT,yBAAyB;AAChC,SAASC,OAAO,EAAEC,OAAO,QAAQ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,EAAGC,CAAC,IAAK;MACpB,MAAMC,MAAM,GAAGC,IAAI,CAACC,KAAK,CAACH,CAAC,CAACf,aAAa,CAACC,CAAC,GAAGhB,OAAO,CAACI,KAAK,CAAC;MAC5D,MAAM8B,OAAO,GAAGpB,UAAU,CAACV,KAAK,KAAK,CAAC;MACtCU,UAAU,CAACV,KAAK,GAAG,CAAC;MACpB,IAAIH,IAAI,CAACG,KAAK,KAAK2B,MAAM,EAAE9B,IAAI,CAACG,KAAK,GAAG2B,MAAM;MAC9C,IAAIG,OAAO,IAAIH,MAAM,KAAKlB,aAAa,CAACT,KAAK,EAAEV,OAAO,CAACgB,SAAS,CAAC,CAACqB,MAAM,CAAC;IAC3E;EACF,CAAC,CAAC;EAEF,OAAO;IAAEhC,GAAG;IAAE4B,QAAQ;IAAEP,QAAQ;IAAEL,aAAa;IAAEf;EAAQ,CAAC;AAC5D,CAAC","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * react-native-agenda-kit — the one barrel.
5
+ *
6
+ * Three surfaces (`ExpandableCalendar`, `AgendaList`, `TimelineList`) sharing
7
+ * one date owner (`CalendarProvider`) and one integer index space. The kit
8
+ * fetches nothing, knows no domain type, and reads only its own theme:
9
+ * everything domain-shaped arrives as a render prop or a primitive.
10
+ *
11
+ * Every scroll handler depends on the worklets babel plugin (shipped inside
12
+ * `babel-preset-expo`, or added manually via `react-native-worklets/plugin`);
13
+ * `core/worklets.ts` asserts it in DEV.
14
+ */
15
+
16
+ /* ── Components ────────────────────────────────────────────────────────── */
17
+ export { AgendaList } from "./agenda/AgendaList.js";
18
+ export { CalendarProvider } from "./core/CalendarProvider.js";
19
+ export { ExpandableCalendar } from "./expandable/ExpandableCalendar.js";
20
+ export { TimelineList } from "./timeline/TimelineDay.js";
21
+ export { KitText } from "./core/KitText.js";
22
+
23
+ /* ── Building a range, and reading the current date ────────────────────── */
24
+ export { buildRange, clampIndex, dayIndexOf, todayIndexOf, ymdAt } from "./core/dateKey.js";
25
+ export { useCalendarDate } from "./core/CalendarContext.js";
26
+ export { epochDayOfYmd, todayEpochDay, ymdOfEpochDay } from "./core/civil.js";
27
+
28
+ /* ── Theme ─────────────────────────────────────────────────────────────── */
29
+ export { AgendaKitThemeProvider, darkTheme, lightTheme, resolveTheme, useKitTheme } from "./theme/index.js";
30
+ /** Static metrics the kit lays out with. Read them; they are not themeable. */
31
+ export { ANIMATION, EASING, FONT_SIZE, RADIUS, SPACING } from "./theme/tokens.js";
32
+
33
+ /* ── Types ─────────────────────────────────────────────────────────────── */
34
+ export { UpdateSources } from "./types.js";
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["AgendaList","CalendarProvider","ExpandableCalendar","TimelineList","KitText","buildRange","clampIndex","dayIndexOf","todayIndexOf","ymdAt","useCalendarDate","epochDayOfYmd","todayEpochDay","ymdOfEpochDay","AgendaKitThemeProvider","darkTheme","lightTheme","resolveTheme","useKitTheme","ANIMATION","EASING","FONT_SIZE","RADIUS","SPACING","UpdateSources"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,UAAU,QAAQ,wBAAqB;AAChD,SAASC,gBAAgB,QAAoC,4BAAyB;AACtF,SAASC,kBAAkB,QAAQ,oCAAiC;AACpE,SAASC,YAAY,QAAQ,2BAAwB;AACrD,SAASC,OAAO,QAAQ,mBAAgB;;AAExC;AACA,SAASC,UAAU,EAAEC,UAAU,EAAEC,UAAU,EAAEC,YAAY,EAAEC,KAAK,QAAQ,mBAAgB;AACxF,SAASC,eAAe,QAAQ,2BAAwB;AACxD,SAASC,aAAa,EAAEC,aAAa,EAAEC,aAAa,QAAQ,iBAAc;;AAE1E;AACA,SACEC,sBAAsB,EACtBC,SAAS,EACTC,UAAU,EACVC,YAAY,EACZC,WAAW,QAMN,kBAAS;AAChB;AACA,SAASC,SAAS,EAAEC,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,OAAO,QAAQ,mBAAgB;;AAE9E;AACA,SAASC,aAAa,QAAQ,YAAS","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Theme plumbing. Two exports matter to a consumer: `AgendaKitThemeProvider`
5
+ * and `useKitTheme`. Everything else is how the kit builds stylesheets.
6
+ *
7
+ * A theme is optional — with no provider above it the kit renders `lightTheme`,
8
+ * so a consumer can drop `<ExpandableCalendar />` in and see something correct
9
+ * before deciding on colours.
10
+ */
11
+
12
+ import { createContext, useContext, useMemo } from 'react';
13
+ import { lightTheme, resolveTheme } from "./theme.js";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ const ThemeContext = /*#__PURE__*/createContext(lightTheme);
16
+ export const AgendaKitThemeProvider = ({
17
+ theme,
18
+ base = lightTheme,
19
+ children
20
+ }) => {
21
+ // The resolved object's IDENTITY is the stylesheet cache key, so it must be
22
+ // stable across renders — a consumer passing an inline literal would
23
+ // otherwise rebuild every sheet in the tree on every render.
24
+ const value = useMemo(() => resolveTheme(base, theme), [base, theme]);
25
+ return /*#__PURE__*/_jsx(ThemeContext.Provider, {
26
+ value: value,
27
+ children: children
28
+ });
29
+ };
30
+ export const useKitTheme = () => useContext(ThemeContext);
31
+ /**
32
+ * The ONE way a kit component builds a StyleSheet.
33
+ *
34
+ * const makeStyles = ({ colors }: KitStyleArgs) => StyleSheet.create({ ... });
35
+ * const styles = useKitStyles(makeStyles);
36
+ *
37
+ * A module-scope `StyleSheet.create` is built once and can never follow the
38
+ * theme. This builds it through a factory instead, and caches one sheet per
39
+ * (factory, theme) for the life of the process — so a list with three hundred
40
+ * rows calling this from its row component shares one object, and memoised
41
+ * rows still compare equal.
42
+ *
43
+ * The factory MUST be a module-scope constant depending only on its arguments:
44
+ * it is half the cache key.
45
+ */
46
+ const cache = new WeakMap();
47
+ export function useKitStyles(factory) {
48
+ const theme = useKitTheme();
49
+ let byTheme = cache.get(factory);
50
+ if (!byTheme) {
51
+ byTheme = new WeakMap();
52
+ cache.set(factory, byTheme);
53
+ }
54
+ let built = byTheme.get(theme);
55
+ if (!built) {
56
+ built = factory({
57
+ colors: theme.colors,
58
+ fonts: theme.fonts,
59
+ dark: theme.dark
60
+ });
61
+ byTheme.set(theme, built);
62
+ }
63
+ return built;
64
+ }
65
+ //# sourceMappingURL=ThemeProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","useMemo","lightTheme","resolveTheme","jsx","_jsx","ThemeContext","AgendaKitThemeProvider","theme","base","children","value","Provider","useKitTheme","cache","WeakMap","useKitStyles","factory","byTheme","get","set","built","colors","fonts","dark"],"sourceRoot":"../../../src","sources":["theme/ThemeProvider.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAwB,OAAO;AAC1E,SACEC,UAAU,EACVC,YAAY,QAGP,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjB,MAAMC,YAAY,gBAAGP,aAAa,CAAiBG,UAAU,CAAC;AAU9D,OAAO,MAAMK,sBAAsB,GAAGA,CAAC;EACrCC,KAAK;EACLC,IAAI,GAAGP,UAAU;EACjBQ;AAC2B,CAAC,KAAK;EACjC;EACA;EACA;EACA,MAAMC,KAAK,GAAGV,OAAO,CACnB,MAAME,YAAY,CAACM,IAAI,EAAED,KAA0C,CAAC,EACpE,CAACC,IAAI,EAAED,KAAK,CACd,CAAC;EACD,oBAAOH,IAAA,CAACC,YAAY,CAACM,QAAQ;IAACD,KAAK,EAAEA,KAAM;IAAAD,QAAA,EAAEA;EAAQ,CAAwB,CAAC;AAChF,CAAC;AAED,OAAO,MAAMG,WAAW,GAAGA,CAAA,KAAsBb,UAAU,CAACM,YAAY,CAAC;AAUzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMQ,KAAK,GAAG,IAAIC,OAAO,CAAyD,CAAC;AAEnF,OAAO,SAASC,YAAYA,CAAIC,OAA2B,EAAK;EAC9D,MAAMT,KAAK,GAAGK,WAAW,CAAC,CAAC;EAE3B,IAAIK,OAAO,GAAGJ,KAAK,CAACK,GAAG,CAACF,OAAO,CAAC;EAChC,IAAI,CAACC,OAAO,EAAE;IACZA,OAAO,GAAG,IAAIH,OAAO,CAAC,CAAC;IACvBD,KAAK,CAACM,GAAG,CAACH,OAAO,EAAEC,OAAO,CAAC;EAC7B;EAEA,IAAIG,KAAK,GAAGH,OAAO,CAACC,GAAG,CAACX,KAAK,CAAkB;EAC/C,IAAI,CAACa,KAAK,EAAE;IACVA,KAAK,GAAGJ,OAAO,CAAC;MAAEK,MAAM,EAAEd,KAAK,CAACc,MAAM;MAAEC,KAAK,EAAEf,KAAK,CAACe,KAAK;MAAEC,IAAI,EAAEhB,KAAK,CAACgB;IAAK,CAAC,CAAC;IAC/EN,OAAO,CAACE,GAAG,CAACZ,KAAK,EAAEa,KAAK,CAAC;EAC3B;EACA,OAAOA,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export { AgendaKitThemeProvider, useKitStyles, useKitTheme } from "./ThemeProvider.js";
4
+ export { darkTheme, lightTheme, resolveTheme } from "./theme.js";
5
+ export { ANIMATION, EASING, FONT_SIZE, RADIUS, SPACING } from "./tokens.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["AgendaKitThemeProvider","useKitStyles","useKitTheme","darkTheme","lightTheme","resolveTheme","ANIMATION","EASING","FONT_SIZE","RADIUS","SPACING"],"sourceRoot":"../../../src","sources":["theme/index.ts"],"mappings":";;AAAA,SACEA,sBAAsB,EACtBC,YAAY,EACZC,WAAW,QAIN,oBAAiB;AACxB,SACEC,SAAS,EACTC,UAAU,EACVC,YAAY,QAKP,YAAS;AAChB,SAASC,SAAS,EAAEC,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,OAAO,QAAQ,aAAU","ignoreList":[]}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The kit's entire visual surface: eleven colours and three font families.
5
+ *
6
+ * It is deliberately flat and deliberately small. Every name says what the
7
+ * value PAINTS, not where it came from in some design system — so a consumer
8
+ * can map their own tokens onto it in one object literal and know nothing was
9
+ * missed. If a colour is not in this list, the kit does not draw it.
10
+ */
11
+
12
+ /**
13
+ * Font families by weight. `undefined` means the platform default — the kit
14
+ * ships no fonts and never assumes one is loaded.
15
+ */
16
+
17
+ /** True-neutral greys (R=G=B) so the accent carries all the colour. */
18
+ export const lightTheme = {
19
+ colors: {
20
+ surface: '#FFFFFF',
21
+ canvas: '#F4F4F4',
22
+ border: '#DDDDDD',
23
+ accent: '#5B6FAE',
24
+ accentFill: '#5B6FAE',
25
+ onAccentFill: '#FFFFFF',
26
+ accentSoft: '#E8EBF4',
27
+ accentSubtle: '#F7F8FB',
28
+ text: '#1F1F1F',
29
+ textMuted: '#6F6F6F',
30
+ nowIndicator: '#EF4444'
31
+ },
32
+ fonts: {},
33
+ dark: false
34
+ };
35
+
36
+ /**
37
+ * `text` is #CCCCCC, not white: a bold stroke at 14:1 on a dark surface blooms
38
+ * optically and reads as glowing. The accent FILL does not lift (white on the
39
+ * lighter #818CF8 is only 2.99:1) — only the INK does.
40
+ */
41
+ export const darkTheme = {
42
+ colors: {
43
+ surface: '#181818',
44
+ canvas: '#121212',
45
+ border: '#3A3A3A',
46
+ accent: '#818CF8',
47
+ accentFill: '#5B6FAE',
48
+ onAccentFill: '#FFFFFF',
49
+ accentSoft: '#212123',
50
+ accentSubtle: '#1C1C1E',
51
+ text: '#CCCCCC',
52
+ textMuted: '#8C8C8C',
53
+ nowIndicator: '#F87171'
54
+ },
55
+ fonts: {},
56
+ dark: true
57
+ };
58
+
59
+ /** Shallow-merges each group. Called once per distinct input, in the provider. */
60
+ export const resolveTheme = (base, overrides) => {
61
+ if (!overrides) return base;
62
+ return {
63
+ colors: {
64
+ ...base.colors,
65
+ ...overrides.colors
66
+ },
67
+ fonts: {
68
+ ...base.fonts,
69
+ ...overrides.fonts
70
+ },
71
+ dark: overrides.dark ?? base.dark
72
+ };
73
+ };
74
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["lightTheme","colors","surface","canvas","border","accent","accentFill","onAccentFill","accentSoft","accentSubtle","text","textMuted","nowIndicator","fonts","dark","darkTheme","resolveTheme","base","overrides"],"sourceRoot":"../../../src","sources":["theme/theme.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2BA;AACA;AACA;AACA;;AAmBA;AACA,OAAO,MAAMA,UAA0B,GAAG;EACxCC,MAAM,EAAE;IACNC,OAAO,EAAE,SAAS;IAClBC,MAAM,EAAE,SAAS;IACjBC,MAAM,EAAE,SAAS;IACjBC,MAAM,EAAE,SAAS;IACjBC,UAAU,EAAE,SAAS;IACrBC,YAAY,EAAE,SAAS;IACvBC,UAAU,EAAE,SAAS;IACrBC,YAAY,EAAE,SAAS;IACvBC,IAAI,EAAE,SAAS;IACfC,SAAS,EAAE,SAAS;IACpBC,YAAY,EAAE;EAChB,CAAC;EACDC,KAAK,EAAE,CAAC,CAAC;EACTC,IAAI,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAyB,GAAG;EACvCd,MAAM,EAAE;IACNC,OAAO,EAAE,SAAS;IAClBC,MAAM,EAAE,SAAS;IACjBC,MAAM,EAAE,SAAS;IACjBC,MAAM,EAAE,SAAS;IACjBC,UAAU,EAAE,SAAS;IACrBC,YAAY,EAAE,SAAS;IACvBC,UAAU,EAAE,SAAS;IACrBC,YAAY,EAAE,SAAS;IACvBC,IAAI,EAAE,SAAS;IACfC,SAAS,EAAE,SAAS;IACpBC,YAAY,EAAE;EAChB,CAAC;EACDC,KAAK,EAAE,CAAC,CAAC;EACTC,IAAI,EAAE;AACR,CAAC;;AAED;AACA,OAAO,MAAME,YAAY,GAAGA,CAC1BC,IAAoB,EACpBC,SAAiC,KACd;EACnB,IAAI,CAACA,SAAS,EAAE,OAAOD,IAAI;EAC3B,OAAO;IACLhB,MAAM,EAAE;MAAE,GAAGgB,IAAI,CAAChB,MAAM;MAAE,GAAGiB,SAAS,CAACjB;IAAO,CAAC;IAC/CY,KAAK,EAAE;MAAE,GAAGI,IAAI,CAACJ,KAAK;MAAE,GAAGK,SAAS,CAACL;IAAM,CAAC;IAC5CC,IAAI,EAAEI,SAAS,CAACJ,IAAI,IAAIG,IAAI,CAACH;EAC/B,CAAC;AACH,CAAC","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Static metrics. NOT themeable, on purpose.
5
+ *
6
+ * Row heights, week-strip geometry and the packer all read these at module
7
+ * scope — `expandable/geometry.ts` computes line heights from `FONT_SIZE`
8
+ * before any React tree exists. A themeable font size would mean measuring at
9
+ * runtime, which is exactly what this kit refuses to do (declared heights are
10
+ * why a fling never shifts the list).
11
+ *
12
+ * Motion is here for the same reason: `KIT_EASING` is captured by worklets at
13
+ * module scope, so it cannot depend on a React context.
14
+ *
15
+ * Colours and font FAMILIES are themeable — see `theme.ts`.
16
+ */
17
+
18
+ export const SPACING = {
19
+ 0: 0,
20
+ 1: 4,
21
+ 2: 8,
22
+ 3: 12,
23
+ 4: 16,
24
+ 5: 20,
25
+ 6: 24,
26
+ 8: 32
27
+ };
28
+ export const FONT_SIZE = {
29
+ xxs: 11,
30
+ xs: 12,
31
+ sm: 14,
32
+ base: 16
33
+ };
34
+ export const RADIUS = {
35
+ none: 0,
36
+ card: 8,
37
+ inner: 6,
38
+ full: 9999
39
+ };
40
+
41
+ /** Milliseconds. Short on purpose: a calendar that animates slowly feels broken. */
42
+ export const ANIMATION = {
43
+ fast: 80,
44
+ base: 120,
45
+ slow: 180
46
+ };
47
+ export const EASING = {
48
+ bezier: [0.2, 0, 0, 1]
49
+ };
50
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SPACING","FONT_SIZE","xxs","xs","sm","base","RADIUS","none","card","inner","full","ANIMATION","fast","slow","EASING","bezier"],"sourceRoot":"../../../src","sources":["theme/tokens.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,OAAO,GAAG;EACrB,CAAC,EAAE,CAAC;EACJ,CAAC,EAAE,CAAC;EACJ,CAAC,EAAE,CAAC;EACJ,CAAC,EAAE,EAAE;EACL,CAAC,EAAE,EAAE;EACL,CAAC,EAAE,EAAE;EACL,CAAC,EAAE,EAAE;EACL,CAAC,EAAE;AACL,CAAU;AAEV,OAAO,MAAMC,SAAS,GAAG;EACvBC,GAAG,EAAE,EAAE;EACPC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,IAAI,EAAE;AACR,CAAU;AAEV,OAAO,MAAMC,MAAM,GAAG;EACpBC,IAAI,EAAE,CAAC;EACPC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE,CAAC;EACRC,IAAI,EAAE;AACR,CAAU;;AAEV;AACA,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,EAAE;EACRP,IAAI,EAAE,GAAG;EACTQ,IAAI,EAAE;AACR,CAAU;AAEV,OAAO,MAAMC,MAAM,GAAG;EACpBC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACvB,CAAU","ignoreList":[]}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * One day as two absolute layers, so the pager can slot the shared hour lines between them:
5
+ * `DayBands` (availability) under the lines, `DayEvents` (packed blocks, then the now-line) above.
6
+ * Packing is memoised on the day's own event array: mounting a neighbour packs one day.
7
+ */
8
+
9
+ import { memo, useMemo } from 'react';
10
+ import { StyleSheet, View } from 'react-native';
11
+ import { EventBlock } from "./EventBlock.js";
12
+ import { NowIndicator } from "./NowIndicator.js";
13
+ import { packEvents } from "./packEvents.js";
14
+ import { buildBands } from "./timelineMath.js";
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
+ const DayBandsInner = ({
17
+ left,
18
+ width,
19
+ availableHours,
20
+ color,
21
+ hourHeight
22
+ }) => {
23
+ const bands = useMemo(() => buildBands(availableHours, hourHeight), [availableHours, hourHeight]);
24
+ const fill = useMemo(() => ({
25
+ backgroundColor: color
26
+ }), [color]);
27
+ if (!bands.length) return null;
28
+ return /*#__PURE__*/_jsx(View, {
29
+ pointerEvents: "none",
30
+ style: [styles.column, {
31
+ left,
32
+ width
33
+ }],
34
+ children: bands.map((band, i) => /*#__PURE__*/_jsx(View, {
35
+ style: [styles.band, fill, {
36
+ top: band.top,
37
+ height: band.height
38
+ }]
39
+ }, i))
40
+ });
41
+ };
42
+ export const DayBands = /*#__PURE__*/memo(DayBandsInner);
43
+ DayBands.displayName = 'DayBands';
44
+ const DayEventsInner = ({
45
+ left,
46
+ width,
47
+ events,
48
+ hourHeight,
49
+ overlapEventsSpacing,
50
+ rightEdgeSpacing,
51
+ renderEvent,
52
+ onEventPress,
53
+ nowMinutes
54
+ }) => {
55
+ const packed = useMemo(() => packEvents(events, {
56
+ colW: width,
57
+ hourHeight,
58
+ overlapEventsSpacing,
59
+ rightEdgeSpacing
60
+ }), [events, hourHeight, overlapEventsSpacing, rightEdgeSpacing, width]);
61
+ if (!packed.length && !nowMinutes) return null;
62
+ return /*#__PURE__*/_jsxs(View, {
63
+ pointerEvents: "box-none",
64
+ style: [styles.column, {
65
+ left,
66
+ width
67
+ }],
68
+ children: [packed.map(event => /*#__PURE__*/_jsx(EventBlock, {
69
+ event: event,
70
+ renderEvent: renderEvent,
71
+ onPress: onEventPress
72
+ }, event.id)), nowMinutes ? /*#__PURE__*/_jsx(NowIndicator, {
73
+ hourHeight: hourHeight,
74
+ minutes: nowMinutes
75
+ }) : null]
76
+ });
77
+ };
78
+ export const DayEvents = /*#__PURE__*/memo(DayEventsInner);
79
+ const styles = StyleSheet.create({
80
+ column: {
81
+ position: 'absolute',
82
+ top: 0,
83
+ bottom: 0
84
+ },
85
+ band: {
86
+ position: 'absolute',
87
+ left: 0,
88
+ right: 0
89
+ }
90
+ });
91
+ //# sourceMappingURL=DayColumn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memo","useMemo","StyleSheet","View","EventBlock","NowIndicator","packEvents","buildBands","jsx","_jsx","jsxs","_jsxs","DayBandsInner","left","width","availableHours","color","hourHeight","bands","fill","backgroundColor","length","pointerEvents","style","styles","column","children","map","band","i","top","height","DayBands","displayName","DayEventsInner","events","overlapEventsSpacing","rightEdgeSpacing","renderEvent","onEventPress","nowMinutes","packed","colW","event","onPress","id","minutes","DayEvents","create","position","bottom","right"],"sourceRoot":"../../../src","sources":["timeline/DayColumn.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,OAAO,QAA2B,OAAO;AACxD,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAG/C,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,UAAU,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAU5C,MAAMC,aAAa,GAAGA,CAAC;EAAEC,IAAI;EAAEC,KAAK;EAAEC,cAAc;EAAEC,KAAK;EAAEC;AAAuB,CAAC,KAAK;EACxF,MAAMC,KAAK,GAAGjB,OAAO,CAAC,MAAMM,UAAU,CAACQ,cAAc,EAAEE,UAAU,CAAC,EAAE,CAACF,cAAc,EAAEE,UAAU,CAAC,CAAC;EACjG,MAAME,IAAI,GAAGlB,OAAO,CAAC,OAAO;IAAEmB,eAAe,E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