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,237 @@
1
+ /**
2
+ * react-native-agenda-kit — the public type surface.
3
+ *
4
+ * The kit is a PURE UI LIBRARY: it fetches nothing, knows no app type, and
5
+ * reads only design tokens. Everything domain-shaped (an appointment, a
6
+ * booking status, a locale) arrives as a caller-supplied render prop or a
7
+ * primitive. That boundary is what makes the three surfaces reusable and what
8
+ * keeps the CONSUMER's screen the only place that knows what a row *means*.
9
+ *
10
+ * Names deliberately match `react-native-calendars`' public API
11
+ * (`CalendarProvider`, `ExpandableCalendar`, `AgendaList`, `TimelineList`,
12
+ * `UpdateSources`) so a migrating screen's JSX is a copy, not a rewrite.
13
+ */
14
+ import type { ReactElement, ReactNode } from 'react';
15
+ import type { StyleProp, ViewStyle } from 'react-native';
16
+ /** 'YYYY-MM-DD', local calendar day. The only date string the kit accepts. */
17
+ export type DateString = string;
18
+ /**
19
+ * Why a date changed. The strings are byte-identical to the library's
20
+ * `commons.js` UpdateSources so the screen's `handleDateChanged` switch is a
21
+ * verbatim copy.
22
+ */
23
+ export declare const UpdateSources: {
24
+ readonly CALENDAR_INIT: "calendarInit";
25
+ readonly TODAY_PRESS: "todayPress";
26
+ readonly LIST_DRAG: "listDrag";
27
+ readonly DAY_PRESS: "dayPress";
28
+ readonly PAGE_SCROLL: "pageScroll";
29
+ readonly WEEK_SCROLL: "weekScroll";
30
+ readonly PROP_UPDATE: "propUpdate";
31
+ };
32
+ export type UpdateSource = (typeof UpdateSources)[keyof typeof UpdateSources];
33
+ /**
34
+ * Which surface *produced* a programmatic move. The originating scroller
35
+ * ignores its own origin, which is the whole echo-proofing story: no latches,
36
+ * no 500 ms timers, no `changedItems` bookkeeping.
37
+ */
38
+ export type MoveOrigin = 'agenda' | 'timeline' | 'week' | 'month' | 'external';
39
+ /** One programmatic move. `seq` makes every move distinct even when `idx` repeats. */
40
+ export type CalendarMove = {
41
+ seq: number;
42
+ idx: number;
43
+ origin: MoveOrigin;
44
+ animated: boolean;
45
+ };
46
+ /**
47
+ * The one index space. Every surface addresses a day by its integer offset
48
+ * from `start`: agenda section index, week page `floor(i/7)`, month page,
49
+ * timeline column. Worklets never touch strings.
50
+ *
51
+ * `start` is a Monday (the skeleton pads to whole weeks) and `days` is a
52
+ * multiple of 7, so `floor(dayIndex / 7)` is always a whole page.
53
+ */
54
+ export type CalendarRange = {
55
+ /** 'YYYY-MM-DD' of index 0 — a padded week start. */
56
+ start: DateString;
57
+ /** Epoch day of `start` (see `core/civil.ts`): `dayIndexOf` is one subtraction. */
58
+ startEpochDay: number;
59
+ /** 'YYYY-MM-DD' of every index, built once: `ymdAt` is one array read. */
60
+ ymdByIndex: readonly DateString[];
61
+ /** Total day count (e.g. 126 or 133 for a 4-month window). */
62
+ days: number;
63
+ /** Selectable bounds, inclusive, as indices into the same space. */
64
+ minIndex: number;
65
+ maxIndex: number;
66
+ /** 1 = Monday. Matches the library's `firstDay`. */
67
+ firstDay: number;
68
+ /** Index of today, or -1 when today is outside the range. */
69
+ todayIndex: number;
70
+ };
71
+ /**
72
+ * A day's worth of rows. `title` is the 'YYYY-MM-DD' key — the library's
73
+ * SectionList convention, kept so `renderSectionHeader` stays a copy.
74
+ */
75
+ export type AgendaSection<T> = {
76
+ title: DateString;
77
+ data: T[];
78
+ };
79
+ export type AgendaListRef = {
80
+ scrollToDate: (date: DateString, animated?: boolean) => void;
81
+ scrollToSection: (title: DateString, animated?: boolean) => void;
82
+ scrollToOffset: (params: {
83
+ offset: number;
84
+ animated?: boolean;
85
+ }) => void;
86
+ };
87
+ export type AgendaListProps<T> = {
88
+ sections: AgendaSection<T>[];
89
+ renderItem: (info: {
90
+ item: T;
91
+ index: number;
92
+ section: AgendaSection<T>;
93
+ }) => ReactElement | null;
94
+ renderSectionHeader: (title: DateString) => ReactElement | null;
95
+ /**
96
+ * Declared row heights in px, keyed by `getItemType`. Never measured: a wrong
97
+ * number clips inside its slot instead of shifting the list (DEV warns per type).
98
+ */
99
+ itemHeightByType: Record<string, number>;
100
+ /** Height of a section header slot. Default 32. */
101
+ sectionHeaderHeight?: number;
102
+ /** Defaults to `item.itemCustomHeightType`, else 'Regular'. */
103
+ getItemType?: (item: T) => string;
104
+ /** Defaults to `item.id`. */
105
+ keyExtractor?: (item: T, index: number) => string;
106
+ /** Real sticky headers (a fixed overlay), unlike the library's. */
107
+ stickySectionHeadersEnabled?: boolean;
108
+ /** Real `RefreshControl`. Arms at the top of the window only (platform). */
109
+ refreshing?: boolean;
110
+ onRefresh?: () => void;
111
+ /**
112
+ * Skeleton tiles drawn BEHIND the list, moving with it. With a backdrop, rows
113
+ * entering the window during a fast fling are deferred and the backdrop shows
114
+ * through their slots — so a fling that outruns the JS thread never shows bare
115
+ * ground. Without one, every row renders real.
116
+ */
117
+ backdrop?: {
118
+ tileHeight: number;
119
+ renderTile: () => ReactElement;
120
+ };
121
+ /** Painted under every drawn row, so the backdrop shows only where no row is drawn. */
122
+ rowGroundColor?: string;
123
+ decelerationRate?: number | 'fast' | 'normal';
124
+ ref?: React.Ref<AgendaListRef>;
125
+ /** Gesture hooks: drag begin and settle. Each costs a UI→JS hop per gesture — pass them only when needed. */
126
+ onDragBegin?: () => void;
127
+ onSettle?: () => void;
128
+ titleHeight?: number;
129
+ sectionStyle?: StyleProp<ViewStyle>;
130
+ dayFormatter?: (date: string) => string;
131
+ markToday?: boolean;
132
+ updateCellsBatchingPeriod?: number;
133
+ onScrollToIndexFailed?: (info: unknown) => void;
134
+ infiniteListProps?: Record<string, unknown>;
135
+ };
136
+ export type MarkedDates = Record<DateString, {
137
+ marked?: boolean;
138
+ dotColor?: string;
139
+ selected?: boolean;
140
+ disabled?: boolean;
141
+ }>;
142
+ export type CalendarPosition = 'closed' | 'open';
143
+ export type ExpandableCalendarRef = {
144
+ /** Returns the position it moved TO. `true` = open. */
145
+ toggleCalendarPosition: () => boolean;
146
+ };
147
+ export type ExpandableCalendarProps = ExpandableCalendarCompatProps & {
148
+ initialPosition?: CalendarPosition;
149
+ onCalendarToggled?: (isOpen: boolean) => void;
150
+ style?: StyleProp<ViewStyle>;
151
+ closeOnDayPress?: boolean;
152
+ /** Collapse an open calendar when a list under it starts a drag. Default true; ignored under a screen reader. */
153
+ closeOnListScroll?: boolean;
154
+ markedDates?: MarkedDates;
155
+ disablePan?: boolean;
156
+ openThreshold?: number;
157
+ closeThreshold?: number;
158
+ /** Screen-reader label for the drag knob. Caller-supplied: the kit ships no strings. */
159
+ knobAccessibilityLabel?: string;
160
+ /** The spoken name of a grid day; called only while a screen reader runs, once per day of the range. */
161
+ dayAccessibilityLabel?: (date: DateString) => string;
162
+ /** Twelve short month names, January first, drawn over each 1st in the week strip. None drawn when absent. */
163
+ monthShortLabels?: readonly string[];
164
+ /** Rendered inside the body the calendar pushes down — the agenda or the timeline. */
165
+ children?: ReactNode;
166
+ ref?: React.Ref<ExpandableCalendarRef>;
167
+ };
168
+ /** Accepted and never read — typed so JSX copied from `react-native-calendars` compiles unchanged. */
169
+ export type ExpandableCalendarCompatProps = {
170
+ firstDay?: number;
171
+ /** No header band is rendered; the callers pass `() => null`. */
172
+ renderHeader?: (date?: DateString) => ReactNode;
173
+ headerStyle?: StyleProp<ViewStyle>;
174
+ minDate?: DateString;
175
+ maxDate?: DateString;
176
+ pastScrollRange?: number;
177
+ futureScrollRange?: number;
178
+ hideArrows?: boolean;
179
+ allowShadow?: boolean;
180
+ /** No day-names row is rendered; the callers pass `hideDayNames`. */
181
+ hideDayNames?: boolean;
182
+ dayNames?: string[];
183
+ theme?: unknown;
184
+ onVisibleMonthsChange?: (months: unknown[]) => void;
185
+ };
186
+ /** `start` / `end` are 'YYYY-MM-DD HH:mm:ss' — the library's wire format. */
187
+ export type TimelineEvent = {
188
+ id: string;
189
+ start: string;
190
+ end?: string;
191
+ title?: string;
192
+ summary?: string;
193
+ color?: string;
194
+ };
195
+ export type PackedTimelineEvent<E extends TimelineEvent = TimelineEvent> = E & {
196
+ /** Packer output, in px relative to the column. */
197
+ index: number;
198
+ top: number;
199
+ left: number;
200
+ width: number;
201
+ height: number;
202
+ };
203
+ /** An inclusive window of *available* time. The kit never takes the inverse. */
204
+ export type AvailableHours = {
205
+ start: number;
206
+ end: number;
207
+ }[];
208
+ export type TimelineInnerProps<E extends TimelineEvent = TimelineEvent> = {
209
+ renderEvent?: (event: PackedTimelineEvent<E>) => ReactElement | null;
210
+ /** Receives the PACKED event, as the library's does (`Timeline.js` passes `packedEvents[i][j]`). */
211
+ onEventPress?: (event: PackedTimelineEvent<E>) => void;
212
+ format24h?: boolean;
213
+ overlapEventsSpacing?: number;
214
+ rightEdgeSpacing?: number;
215
+ /**
216
+ * AVAILABLE windows, per date. The library takes `unavailableHours`; the
217
+ * consumer usually computes availability directly, so the kit takes the
218
+ * un-inverted form. This is the one deliberate rename.
219
+ */
220
+ availableHours?: Record<DateString, AvailableHours> | AvailableHours;
221
+ availableHoursColor?: string;
222
+ hourHeight?: number;
223
+ };
224
+ export type TimelineListProps<E extends TimelineEvent = TimelineEvent> = {
225
+ /** Keyed by 'YYYY-MM-DD'. Neighbours must be present or a swipe shows a blank day. */
226
+ events: Record<DateString, E[]>;
227
+ timelineProps?: TimelineInnerProps<E>;
228
+ showNowIndicator?: boolean;
229
+ scrollToNow?: boolean;
230
+ scrollToFirst?: boolean;
231
+ /** 'HH:mm' or `{ hour, minutes }`. Lowest precedence. */
232
+ initialTime?: {
233
+ hour: number;
234
+ minutes: number;
235
+ } | string;
236
+ };
237
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,8EAA8E;AAC9E,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;CAQhB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAE/E,sFAAsF;AACtF,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,qDAAqD;IACrD,KAAK,EAAE,UAAU,CAAC;IAClB,mFAAmF;IACnF,aAAa,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,UAAU,EAAE,SAAS,UAAU,EAAE,CAAC;IAClC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,oDA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S,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,GAAG,cAAc,CAAC;IACrE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI;IACvE,sFAAsF;IACtF,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;IAChC,aAAa,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yDAAyD;IACzD,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;CAC1D,CAAC"}
package/package.json ADDED
@@ -0,0 +1,105 @@
1
+ {
2
+ "name": "react-native-agenda-kit",
3
+ "version": "0.1.0",
4
+ "description": "A fast expandable calendar, agenda list and day timeline for React Native \u2014 declared row heights, worklet-driven scroll sync, zero measurement.",
5
+ "main": "./lib/commonjs/index.js",
6
+ "module": "./lib/module/index.js",
7
+ "types": "./lib/typescript/commonjs/index.d.ts",
8
+ "react-native": "./src/index.ts",
9
+ "source": "./src/index.ts",
10
+ "exports": {
11
+ ".": {
12
+ "react-native": "./src/index.ts",
13
+ "import": {
14
+ "types": "./lib/typescript/module/index.d.ts",
15
+ "default": "./lib/module/index.js"
16
+ },
17
+ "require": {
18
+ "types": "./lib/typescript/commonjs/index.d.ts",
19
+ "default": "./lib/commonjs/index.js"
20
+ }
21
+ }
22
+ },
23
+ "files": [
24
+ "src",
25
+ "lib",
26
+ "!**/__tests__",
27
+ "!**/*.test.ts",
28
+ "!**/*.test.tsx"
29
+ ],
30
+ "sideEffects": false,
31
+ "scripts": {
32
+ "typecheck": "tsc --noEmit",
33
+ "clean": "rm -rf lib",
34
+ "build": "bob build",
35
+ "prepare": "bob build",
36
+ "prepublishOnly": "npm run typecheck && npm run clean && npm run build"
37
+ },
38
+ "keywords": [
39
+ "react-native",
40
+ "calendar",
41
+ "agenda",
42
+ "timeline",
43
+ "expandable-calendar",
44
+ "day-view",
45
+ "scheduler",
46
+ "reanimated",
47
+ "ios",
48
+ "android",
49
+ "expo"
50
+ ],
51
+ "license": "MIT",
52
+ "peerDependencies": {
53
+ "react": ">=18.0.0",
54
+ "react-native": ">=0.74.0",
55
+ "react-native-gesture-handler": ">=2.16.0",
56
+ "react-native-reanimated": ">=4.0.0",
57
+ "react-native-worklets": ">=0.3.0"
58
+ },
59
+ "devDependencies": {
60
+ "@types/react": "^19.0.0",
61
+ "react": "19.2.0",
62
+ "react-native": "0.83.6",
63
+ "react-native-builder-bob": "^0.39.0",
64
+ "react-native-gesture-handler": "~2.30.0",
65
+ "react-native-reanimated": "4.2.1",
66
+ "react-native-worklets": "0.7.4",
67
+ "typescript": "~5.9.2"
68
+ },
69
+ "react-native-builder-bob": {
70
+ "source": "src",
71
+ "output": "lib",
72
+ "targets": [
73
+ [
74
+ "commonjs",
75
+ {
76
+ "esm": true
77
+ }
78
+ ],
79
+ [
80
+ "module",
81
+ {
82
+ "esm": true
83
+ }
84
+ ],
85
+ [
86
+ "typescript",
87
+ {
88
+ "esm": true
89
+ }
90
+ ]
91
+ ]
92
+ },
93
+ "repository": {
94
+ "type": "git",
95
+ "url": "git+https://github.com/shivampandey-07/react-native-agenda-kit.git"
96
+ },
97
+ "bugs": {
98
+ "url": "https://github.com/shivampandey-07/react-native-agenda-kit/issues"
99
+ },
100
+ "homepage": "https://github.com/shivampandey-07/react-native-agenda-kit#readme",
101
+ "author": "Shivam Pandey",
102
+ "publishConfig": {
103
+ "access": "public"
104
+ }
105
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * The "never white" layer: static skeleton tiles BEHIND the list, moved by the
3
+ * scroll offset modulo one tile.
4
+ *
5
+ * Every list renders rows from JavaScript, so a fling faster than the JS thread
6
+ * can mount rows leaves slots with nothing drawn. This layer exists before the
7
+ * rows do; drawn rows cover it (their slots paint the list ground). Measured
8
+ * with the list-library trial: 25–51 % white frames without it, 0 % with it, on
9
+ * every engine. No shimmer — it sits hidden behind real rows almost always.
10
+ */
11
+
12
+ import { memo, useMemo, type ReactElement } from 'react';
13
+ import { Dimensions, StyleSheet, View } from 'react-native';
14
+ import Animated, { useAnimatedStyle, type SharedValue } from 'react-native-reanimated';
15
+
16
+ type Props = {
17
+ scrollY: SharedValue<number>;
18
+ tileHeight: number;
19
+ renderTile: () => ReactElement;
20
+ };
21
+
22
+ const AgendaBackdropInner = ({ scrollY, tileHeight, renderTile }: Props) => {
23
+ const tiles = useMemo(() => {
24
+ if (tileHeight <= 0) return null;
25
+ const count = Math.ceil(Dimensions.get('window').height / tileHeight) + 2;
26
+ const tileStyle = { height: tileHeight };
27
+ const out: ReactElement[] = [];
28
+ for (let i = 0; i < count; i += 1) {
29
+ out.push(
30
+ <View key={i} style={tileStyle}>
31
+ {renderTile()}
32
+ </View>,
33
+ );
34
+ }
35
+ return out;
36
+ }, [renderTile, tileHeight]);
37
+
38
+ const style = useAnimatedStyle(() => {
39
+ const r = tileHeight > 0 ? scrollY.value % tileHeight : 0;
40
+ return { transform: [{ translateY: -(r < 0 ? r + tileHeight : r) }] };
41
+ });
42
+
43
+ return (
44
+ <View pointerEvents="none" style={styles.fill}>
45
+ <Animated.View style={style}>{tiles}</Animated.View>
46
+ </View>
47
+ );
48
+ };
49
+
50
+ export const AgendaBackdrop = memo(AgendaBackdropInner);
51
+ AgendaBackdrop.displayName = 'AgendaBackdrop';
52
+
53
+ const styles = StyleSheet.create({
54
+ fill: { ...StyleSheet.absoluteFillObject, overflow: 'hidden' },
55
+ });