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.
- package/LICENSE +21 -0
- package/README.md +364 -0
- package/lib/commonjs/agenda/AgendaBackdrop.js +68 -0
- package/lib/commonjs/agenda/AgendaBackdrop.js.map +1 -0
- package/lib/commonjs/agenda/AgendaList.js +354 -0
- package/lib/commonjs/agenda/AgendaList.js.map +1 -0
- package/lib/commonjs/agenda/AgendaSlot.js +88 -0
- package/lib/commonjs/agenda/AgendaSlot.js.map +1 -0
- package/lib/commonjs/agenda/AgendaWindow.js +171 -0
- package/lib/commonjs/agenda/AgendaWindow.js.map +1 -0
- package/lib/commonjs/agenda/StickyHeaderOverlay.js +125 -0
- package/lib/commonjs/agenda/StickyHeaderOverlay.js.map +1 -0
- package/lib/commonjs/agenda/buildAgendaLayout.js +100 -0
- package/lib/commonjs/agenda/buildAgendaLayout.js.map +1 -0
- package/lib/commonjs/agenda/constants.js +29 -0
- package/lib/commonjs/agenda/constants.js.map +1 -0
- package/lib/commonjs/agenda/heights.js +49 -0
- package/lib/commonjs/agenda/heights.js.map +1 -0
- package/lib/commonjs/agenda/useAgendaScrollSync.js +204 -0
- package/lib/commonjs/agenda/useAgendaScrollSync.js.map +1 -0
- package/lib/commonjs/core/ArrowGlyph.js +65 -0
- package/lib/commonjs/core/ArrowGlyph.js.map +1 -0
- package/lib/commonjs/core/CalendarContext.js +32 -0
- package/lib/commonjs/core/CalendarContext.js.map +1 -0
- package/lib/commonjs/core/CalendarProvider.js +141 -0
- package/lib/commonjs/core/CalendarProvider.js.map +1 -0
- package/lib/commonjs/core/CalendarStore.js +70 -0
- package/lib/commonjs/core/CalendarStore.js.map +1 -0
- package/lib/commonjs/core/KitText.js +23 -0
- package/lib/commonjs/core/KitText.js.map +1 -0
- package/lib/commonjs/core/TodayButton.js +136 -0
- package/lib/commonjs/core/TodayButton.js.map +1 -0
- package/lib/commonjs/core/civil.js +101 -0
- package/lib/commonjs/core/civil.js.map +1 -0
- package/lib/commonjs/core/dateKey.js +56 -0
- package/lib/commonjs/core/dateKey.js.map +1 -0
- package/lib/commonjs/core/motion.js +56 -0
- package/lib/commonjs/core/motion.js.map +1 -0
- package/lib/commonjs/core/worklets.js +44 -0
- package/lib/commonjs/core/worklets.js.map +1 -0
- package/lib/commonjs/expandable/DayCell.js +120 -0
- package/lib/commonjs/expandable/DayCell.js.map +1 -0
- package/lib/commonjs/expandable/ExpandableCalendar.js +280 -0
- package/lib/commonjs/expandable/ExpandableCalendar.js.map +1 -0
- package/lib/commonjs/expandable/Knob.js +72 -0
- package/lib/commonjs/expandable/Knob.js.map +1 -0
- package/lib/commonjs/expandable/MonthPager.js +180 -0
- package/lib/commonjs/expandable/MonthPager.js.map +1 -0
- package/lib/commonjs/expandable/WeekStrip.js +451 -0
- package/lib/commonjs/expandable/WeekStrip.js.map +1 -0
- package/lib/commonjs/expandable/calendarCells.js +152 -0
- package/lib/commonjs/expandable/calendarCells.js.map +1 -0
- package/lib/commonjs/expandable/geometry.js +62 -0
- package/lib/commonjs/expandable/geometry.js.map +1 -0
- package/lib/commonjs/expandable/useExpandGesture.js +124 -0
- package/lib/commonjs/expandable/useExpandGesture.js.map +1 -0
- package/lib/commonjs/expandable/useHorizontalPager.js +97 -0
- package/lib/commonjs/expandable/useHorizontalPager.js.map +1 -0
- package/lib/commonjs/index.js +167 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theme/ThemeProvider.js +73 -0
- package/lib/commonjs/theme/ThemeProvider.js.map +1 -0
- package/lib/commonjs/theme/index.js +75 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/theme.js +79 -0
- package/lib/commonjs/theme/theme.js.map +1 -0
- package/lib/commonjs/theme/tokens.js +54 -0
- package/lib/commonjs/theme/tokens.js.map +1 -0
- package/lib/commonjs/timeline/DayColumn.js +95 -0
- package/lib/commonjs/timeline/DayColumn.js.map +1 -0
- package/lib/commonjs/timeline/DayPager.js +250 -0
- package/lib/commonjs/timeline/DayPager.js.map +1 -0
- package/lib/commonjs/timeline/EventBlock.js +91 -0
- package/lib/commonjs/timeline/EventBlock.js.map +1 -0
- package/lib/commonjs/timeline/GridLines.js +47 -0
- package/lib/commonjs/timeline/GridLines.js.map +1 -0
- package/lib/commonjs/timeline/HourGrid.js +96 -0
- package/lib/commonjs/timeline/HourGrid.js.map +1 -0
- package/lib/commonjs/timeline/NowIndicator.js +132 -0
- package/lib/commonjs/timeline/NowIndicator.js.map +1 -0
- package/lib/commonjs/timeline/TimelineDay.js +126 -0
- package/lib/commonjs/timeline/TimelineDay.js.map +1 -0
- package/lib/commonjs/timeline/packEvents.js +102 -0
- package/lib/commonjs/timeline/packEvents.js.map +1 -0
- package/lib/commonjs/timeline/timelineGeometry.js +27 -0
- package/lib/commonjs/timeline/timelineGeometry.js.map +1 -0
- package/lib/commonjs/timeline/timelineMath.js +82 -0
- package/lib/commonjs/timeline/timelineMath.js.map +1 -0
- package/lib/commonjs/types.js +71 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/agenda/AgendaBackdrop.js +63 -0
- package/lib/module/agenda/AgendaBackdrop.js.map +1 -0
- package/lib/module/agenda/AgendaList.js +349 -0
- package/lib/module/agenda/AgendaList.js.map +1 -0
- package/lib/module/agenda/AgendaSlot.js +84 -0
- package/lib/module/agenda/AgendaSlot.js.map +1 -0
- package/lib/module/agenda/AgendaWindow.js +167 -0
- package/lib/module/agenda/AgendaWindow.js.map +1 -0
- package/lib/module/agenda/StickyHeaderOverlay.js +120 -0
- package/lib/module/agenda/StickyHeaderOverlay.js.map +1 -0
- package/lib/module/agenda/buildAgendaLayout.js +95 -0
- package/lib/module/agenda/buildAgendaLayout.js.map +1 -0
- package/lib/module/agenda/constants.js +25 -0
- package/lib/module/agenda/constants.js.map +1 -0
- package/lib/module/agenda/heights.js +42 -0
- package/lib/module/agenda/heights.js.map +1 -0
- package/lib/module/agenda/useAgendaScrollSync.js +200 -0
- package/lib/module/agenda/useAgendaScrollSync.js.map +1 -0
- package/lib/module/core/ArrowGlyph.js +60 -0
- package/lib/module/core/ArrowGlyph.js.map +1 -0
- package/lib/module/core/CalendarContext.js +26 -0
- package/lib/module/core/CalendarContext.js.map +1 -0
- package/lib/module/core/CalendarProvider.js +136 -0
- package/lib/module/core/CalendarProvider.js.map +1 -0
- package/lib/module/core/CalendarStore.js +66 -0
- package/lib/module/core/CalendarStore.js.map +1 -0
- package/lib/module/core/KitText.js +19 -0
- package/lib/module/core/KitText.js.map +1 -0
- package/lib/module/core/TodayButton.js +133 -0
- package/lib/module/core/TodayButton.js.map +1 -0
- package/lib/module/core/civil.js +88 -0
- package/lib/module/core/civil.js.map +1 -0
- package/lib/module/core/dateKey.js +47 -0
- package/lib/module/core/dateKey.js.map +1 -0
- package/lib/module/core/motion.js +49 -0
- package/lib/module/core/motion.js.map +1 -0
- package/lib/module/core/worklets.js +38 -0
- package/lib/module/core/worklets.js.map +1 -0
- package/lib/module/expandable/DayCell.js +116 -0
- package/lib/module/expandable/DayCell.js.map +1 -0
- package/lib/module/expandable/ExpandableCalendar.js +275 -0
- package/lib/module/expandable/ExpandableCalendar.js.map +1 -0
- package/lib/module/expandable/Knob.js +67 -0
- package/lib/module/expandable/Knob.js.map +1 -0
- package/lib/module/expandable/MonthPager.js +175 -0
- package/lib/module/expandable/MonthPager.js.map +1 -0
- package/lib/module/expandable/WeekStrip.js +446 -0
- package/lib/module/expandable/WeekStrip.js.map +1 -0
- package/lib/module/expandable/calendarCells.js +142 -0
- package/lib/module/expandable/calendarCells.js.map +1 -0
- package/lib/module/expandable/geometry.js +58 -0
- package/lib/module/expandable/geometry.js.map +1 -0
- package/lib/module/expandable/useExpandGesture.js +118 -0
- package/lib/module/expandable/useExpandGesture.js.map +1 -0
- package/lib/module/expandable/useHorizontalPager.js +92 -0
- package/lib/module/expandable/useHorizontalPager.js.map +1 -0
- package/lib/module/index.js +35 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theme/ThemeProvider.js +65 -0
- package/lib/module/theme/ThemeProvider.js.map +1 -0
- package/lib/module/theme/index.js +6 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/theme.js +74 -0
- package/lib/module/theme/theme.js.map +1 -0
- package/lib/module/theme/tokens.js +50 -0
- package/lib/module/theme/tokens.js.map +1 -0
- package/lib/module/timeline/DayColumn.js +91 -0
- package/lib/module/timeline/DayColumn.js.map +1 -0
- package/lib/module/timeline/DayPager.js +245 -0
- package/lib/module/timeline/DayPager.js.map +1 -0
- package/lib/module/timeline/EventBlock.js +87 -0
- package/lib/module/timeline/EventBlock.js.map +1 -0
- package/lib/module/timeline/GridLines.js +43 -0
- package/lib/module/timeline/GridLines.js.map +1 -0
- package/lib/module/timeline/HourGrid.js +94 -0
- package/lib/module/timeline/HourGrid.js.map +1 -0
- package/lib/module/timeline/NowIndicator.js +126 -0
- package/lib/module/timeline/NowIndicator.js.map +1 -0
- package/lib/module/timeline/TimelineDay.js +122 -0
- package/lib/module/timeline/TimelineDay.js.map +1 -0
- package/lib/module/timeline/packEvents.js +97 -0
- package/lib/module/timeline/packEvents.js.map +1 -0
- package/lib/module/timeline/timelineGeometry.js +22 -0
- package/lib/module/timeline/timelineGeometry.js.map +1 -0
- package/lib/module/timeline/timelineMath.js +75 -0
- package/lib/module/timeline/timelineMath.js.map +1 -0
- package/lib/module/types.js +67 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/agenda/AgendaBackdrop.d.ts +20 -0
- package/lib/typescript/commonjs/agenda/AgendaBackdrop.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/AgendaList.d.ts +12 -0
- package/lib/typescript/commonjs/agenda/AgendaList.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/AgendaSlot.d.ts +45 -0
- package/lib/typescript/commonjs/agenda/AgendaSlot.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/AgendaWindow.d.ts +49 -0
- package/lib/typescript/commonjs/agenda/AgendaWindow.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/StickyHeaderOverlay.d.ts +39 -0
- package/lib/typescript/commonjs/agenda/StickyHeaderOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/buildAgendaLayout.d.ts +57 -0
- package/lib/typescript/commonjs/agenda/buildAgendaLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/constants.d.ts +19 -0
- package/lib/typescript/commonjs/agenda/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/heights.d.ts +20 -0
- package/lib/typescript/commonjs/agenda/heights.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/useAgendaScrollSync.d.ts +44 -0
- package/lib/typescript/commonjs/agenda/useAgendaScrollSync.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/ArrowGlyph.d.ts +14 -0
- package/lib/typescript/commonjs/core/ArrowGlyph.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/CalendarContext.d.ts +35 -0
- package/lib/typescript/commonjs/core/CalendarContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/CalendarProvider.d.ts +41 -0
- package/lib/typescript/commonjs/core/CalendarProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/CalendarStore.d.ts +28 -0
- package/lib/typescript/commonjs/core/CalendarStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/KitText.d.ts +10 -0
- package/lib/typescript/commonjs/core/KitText.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/TodayButton.d.ts +18 -0
- package/lib/typescript/commonjs/core/TodayButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/civil.d.ts +26 -0
- package/lib/typescript/commonjs/core/civil.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/dateKey.d.ts +21 -0
- package/lib/typescript/commonjs/core/dateKey.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/motion.d.ts +18 -0
- package/lib/typescript/commonjs/core/motion.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/worklets.d.ts +12 -0
- package/lib/typescript/commonjs/core/worklets.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/DayCell.d.ts +22 -0
- package/lib/typescript/commonjs/expandable/DayCell.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/ExpandableCalendar.d.ts +40 -0
- package/lib/typescript/commonjs/expandable/ExpandableCalendar.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/Knob.d.ts +19 -0
- package/lib/typescript/commonjs/expandable/Knob.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/MonthPager.d.ts +35 -0
- package/lib/typescript/commonjs/expandable/MonthPager.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/WeekStrip.d.ts +34 -0
- package/lib/typescript/commonjs/expandable/WeekStrip.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/calendarCells.d.ts +52 -0
- package/lib/typescript/commonjs/expandable/calendarCells.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/geometry.d.ts +43 -0
- package/lib/typescript/commonjs/expandable/geometry.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/useExpandGesture.d.ts +35 -0
- package/lib/typescript/commonjs/expandable/useExpandGesture.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/useHorizontalPager.d.ts +35 -0
- package/lib/typescript/commonjs/expandable/useHorizontalPager.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +26 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/theme/ThemeProvider.d.ts +27 -0
- package/lib/typescript/commonjs/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/index.d.ts +4 -0
- package/lib/typescript/commonjs/theme/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/theme.d.ts +62 -0
- package/lib/typescript/commonjs/theme/theme.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/tokens.d.ts +46 -0
- package/lib/typescript/commonjs/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/DayColumn.d.ts +32 -0
- package/lib/typescript/commonjs/timeline/DayColumn.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/DayPager.d.ts +32 -0
- package/lib/typescript/commonjs/timeline/DayPager.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/EventBlock.d.ts +17 -0
- package/lib/typescript/commonjs/timeline/EventBlock.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/GridLines.d.ts +5 -0
- package/lib/typescript/commonjs/timeline/GridLines.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/HourGrid.d.ts +12 -0
- package/lib/typescript/commonjs/timeline/HourGrid.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/NowIndicator.d.ts +28 -0
- package/lib/typescript/commonjs/timeline/NowIndicator.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/TimelineDay.d.ts +14 -0
- package/lib/typescript/commonjs/timeline/TimelineDay.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/packEvents.d.ts +25 -0
- package/lib/typescript/commonjs/timeline/packEvents.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/timelineGeometry.d.ts +14 -0
- package/lib/typescript/commonjs/timeline/timelineGeometry.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/timelineMath.d.ts +32 -0
- package/lib/typescript/commonjs/timeline/timelineMath.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts +237 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/module/agenda/AgendaBackdrop.d.ts +20 -0
- package/lib/typescript/module/agenda/AgendaBackdrop.d.ts.map +1 -0
- package/lib/typescript/module/agenda/AgendaList.d.ts +12 -0
- package/lib/typescript/module/agenda/AgendaList.d.ts.map +1 -0
- package/lib/typescript/module/agenda/AgendaSlot.d.ts +45 -0
- package/lib/typescript/module/agenda/AgendaSlot.d.ts.map +1 -0
- package/lib/typescript/module/agenda/AgendaWindow.d.ts +49 -0
- package/lib/typescript/module/agenda/AgendaWindow.d.ts.map +1 -0
- package/lib/typescript/module/agenda/StickyHeaderOverlay.d.ts +39 -0
- package/lib/typescript/module/agenda/StickyHeaderOverlay.d.ts.map +1 -0
- package/lib/typescript/module/agenda/buildAgendaLayout.d.ts +57 -0
- package/lib/typescript/module/agenda/buildAgendaLayout.d.ts.map +1 -0
- package/lib/typescript/module/agenda/constants.d.ts +19 -0
- package/lib/typescript/module/agenda/constants.d.ts.map +1 -0
- package/lib/typescript/module/agenda/heights.d.ts +20 -0
- package/lib/typescript/module/agenda/heights.d.ts.map +1 -0
- package/lib/typescript/module/agenda/useAgendaScrollSync.d.ts +44 -0
- package/lib/typescript/module/agenda/useAgendaScrollSync.d.ts.map +1 -0
- package/lib/typescript/module/core/ArrowGlyph.d.ts +14 -0
- package/lib/typescript/module/core/ArrowGlyph.d.ts.map +1 -0
- package/lib/typescript/module/core/CalendarContext.d.ts +35 -0
- package/lib/typescript/module/core/CalendarContext.d.ts.map +1 -0
- package/lib/typescript/module/core/CalendarProvider.d.ts +41 -0
- package/lib/typescript/module/core/CalendarProvider.d.ts.map +1 -0
- package/lib/typescript/module/core/CalendarStore.d.ts +28 -0
- package/lib/typescript/module/core/CalendarStore.d.ts.map +1 -0
- package/lib/typescript/module/core/KitText.d.ts +10 -0
- package/lib/typescript/module/core/KitText.d.ts.map +1 -0
- package/lib/typescript/module/core/TodayButton.d.ts +18 -0
- package/lib/typescript/module/core/TodayButton.d.ts.map +1 -0
- package/lib/typescript/module/core/civil.d.ts +26 -0
- package/lib/typescript/module/core/civil.d.ts.map +1 -0
- package/lib/typescript/module/core/dateKey.d.ts +21 -0
- package/lib/typescript/module/core/dateKey.d.ts.map +1 -0
- package/lib/typescript/module/core/motion.d.ts +18 -0
- package/lib/typescript/module/core/motion.d.ts.map +1 -0
- package/lib/typescript/module/core/worklets.d.ts +12 -0
- package/lib/typescript/module/core/worklets.d.ts.map +1 -0
- package/lib/typescript/module/expandable/DayCell.d.ts +22 -0
- package/lib/typescript/module/expandable/DayCell.d.ts.map +1 -0
- package/lib/typescript/module/expandable/ExpandableCalendar.d.ts +40 -0
- package/lib/typescript/module/expandable/ExpandableCalendar.d.ts.map +1 -0
- package/lib/typescript/module/expandable/Knob.d.ts +19 -0
- package/lib/typescript/module/expandable/Knob.d.ts.map +1 -0
- package/lib/typescript/module/expandable/MonthPager.d.ts +35 -0
- package/lib/typescript/module/expandable/MonthPager.d.ts.map +1 -0
- package/lib/typescript/module/expandable/WeekStrip.d.ts +34 -0
- package/lib/typescript/module/expandable/WeekStrip.d.ts.map +1 -0
- package/lib/typescript/module/expandable/calendarCells.d.ts +52 -0
- package/lib/typescript/module/expandable/calendarCells.d.ts.map +1 -0
- package/lib/typescript/module/expandable/geometry.d.ts +43 -0
- package/lib/typescript/module/expandable/geometry.d.ts.map +1 -0
- package/lib/typescript/module/expandable/useExpandGesture.d.ts +35 -0
- package/lib/typescript/module/expandable/useExpandGesture.d.ts.map +1 -0
- package/lib/typescript/module/expandable/useHorizontalPager.d.ts +35 -0
- package/lib/typescript/module/expandable/useHorizontalPager.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +26 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/theme/ThemeProvider.d.ts +27 -0
- package/lib/typescript/module/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/module/theme/index.d.ts +4 -0
- package/lib/typescript/module/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/theme/theme.d.ts +62 -0
- package/lib/typescript/module/theme/theme.d.ts.map +1 -0
- package/lib/typescript/module/theme/tokens.d.ts +46 -0
- package/lib/typescript/module/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/module/timeline/DayColumn.d.ts +32 -0
- package/lib/typescript/module/timeline/DayColumn.d.ts.map +1 -0
- package/lib/typescript/module/timeline/DayPager.d.ts +32 -0
- package/lib/typescript/module/timeline/DayPager.d.ts.map +1 -0
- package/lib/typescript/module/timeline/EventBlock.d.ts +17 -0
- package/lib/typescript/module/timeline/EventBlock.d.ts.map +1 -0
- package/lib/typescript/module/timeline/GridLines.d.ts +5 -0
- package/lib/typescript/module/timeline/GridLines.d.ts.map +1 -0
- package/lib/typescript/module/timeline/HourGrid.d.ts +12 -0
- package/lib/typescript/module/timeline/HourGrid.d.ts.map +1 -0
- package/lib/typescript/module/timeline/NowIndicator.d.ts +28 -0
- package/lib/typescript/module/timeline/NowIndicator.d.ts.map +1 -0
- package/lib/typescript/module/timeline/TimelineDay.d.ts +14 -0
- package/lib/typescript/module/timeline/TimelineDay.d.ts.map +1 -0
- package/lib/typescript/module/timeline/packEvents.d.ts +25 -0
- package/lib/typescript/module/timeline/packEvents.d.ts.map +1 -0
- package/lib/typescript/module/timeline/timelineGeometry.d.ts +14 -0
- package/lib/typescript/module/timeline/timelineGeometry.d.ts.map +1 -0
- package/lib/typescript/module/timeline/timelineMath.d.ts +32 -0
- package/lib/typescript/module/timeline/timelineMath.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +237 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/package.json +105 -0
- package/src/agenda/AgendaBackdrop.tsx +55 -0
- package/src/agenda/AgendaList.tsx +370 -0
- package/src/agenda/AgendaSlot.tsx +88 -0
- package/src/agenda/AgendaWindow.tsx +183 -0
- package/src/agenda/StickyHeaderOverlay.tsx +126 -0
- package/src/agenda/buildAgendaLayout.ts +110 -0
- package/src/agenda/constants.ts +22 -0
- package/src/agenda/heights.ts +44 -0
- package/src/agenda/useAgendaScrollSync.ts +251 -0
- package/src/core/ArrowGlyph.tsx +53 -0
- package/src/core/CalendarContext.ts +47 -0
- package/src/core/CalendarProvider.tsx +165 -0
- package/src/core/CalendarStore.ts +64 -0
- package/src/core/KitText.tsx +10 -0
- package/src/core/TodayButton.tsx +121 -0
- package/src/core/civil.ts +92 -0
- package/src/core/dateKey.ts +52 -0
- package/src/core/motion.ts +51 -0
- package/src/core/worklets.ts +37 -0
- package/src/expandable/DayCell.tsx +97 -0
- package/src/expandable/ExpandableCalendar.tsx +278 -0
- package/src/expandable/Knob.tsx +67 -0
- package/src/expandable/MonthPager.tsx +208 -0
- package/src/expandable/WeekStrip.tsx +439 -0
- package/src/expandable/calendarCells.ts +155 -0
- package/src/expandable/geometry.ts +51 -0
- package/src/expandable/useExpandGesture.ts +147 -0
- package/src/expandable/useHorizontalPager.ts +116 -0
- package/src/index.ts +62 -0
- package/src/theme/ThemeProvider.tsx +85 -0
- package/src/theme/index.ts +18 -0
- package/src/theme/theme.ts +110 -0
- package/src/theme/tokens.ts +50 -0
- package/src/timeline/DayColumn.tsx +84 -0
- package/src/timeline/DayPager.tsx +295 -0
- package/src/timeline/EventBlock.tsx +76 -0
- package/src/timeline/GridLines.tsx +36 -0
- package/src/timeline/HourGrid.tsx +90 -0
- package/src/timeline/NowIndicator.tsx +123 -0
- package/src/timeline/TimelineDay.tsx +112 -0
- package/src/timeline/packEvents.ts +118 -0
- package/src/timeline/timelineGeometry.ts +23 -0
- package/src/timeline/timelineMath.ts +86 -0
- package/src/types.ts +252 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shivam Pandey
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# react-native-agenda-kit
|
|
4
|
+
|
|
5
|
+
**An expandable month/week calendar, an agenda list and a day timeline for React
|
|
6
|
+
Native — built to stay smooth under a hard fling on a low-end Android phone.**
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/react-native-agenda-kit)
|
|
9
|
+
[](./LICENSE)
|
|
10
|
+
[](./docs/compatibility.md)
|
|
11
|
+
[](./docs/api.md)
|
|
12
|
+
|
|
13
|
+
[Install](#install) · [Quick start](#quick-start) · [Features](#features) ·
|
|
14
|
+
[Docs](./docs/README.md) · [API](./docs/api.md) ·
|
|
15
|
+
[Migration](./docs/migration.md)
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
Three surfaces share **one date owner** and **one integer index space**, so
|
|
22
|
+
tapping a day, flinging the agenda, swiping the week strip and paging the
|
|
23
|
+
timeline all stay in sync without latches, timers or `changedItems`
|
|
24
|
+
bookkeeping.
|
|
25
|
+
|
|
26
|
+
## Why another calendar
|
|
27
|
+
|
|
28
|
+
It is a rewrite of the parts of `react-native-calendars` that get slow, with the
|
|
29
|
+
same public API so a migration is a copy, not a rewrite.
|
|
30
|
+
|
|
31
|
+
- **Nothing is measured.** Row heights are *declared* per row type. A wrong
|
|
32
|
+
number clips inside its slot instead of shifting the list — so a fling never
|
|
33
|
+
jumps, and there is no `onLayout` round-trip on the critical path.
|
|
34
|
+
- **Scroll sync runs on the UI thread.** Every scroll handler is a worklet; the
|
|
35
|
+
JS thread is told only at settle. The originating scroller ignores moves it
|
|
36
|
+
produced itself, which is the whole echo-proofing story.
|
|
37
|
+
- **A windowed agenda with a moving backdrop.** Rows entering the window during
|
|
38
|
+
a fast fling are deferred and skeleton tiles show through their slots, so a
|
|
39
|
+
fling that outruns JS never shows bare ground.
|
|
40
|
+
- **No date library.** Civil-date arithmetic is integer maths on epoch days.
|
|
41
|
+
Worklets never touch strings.
|
|
42
|
+
- **One accent, eleven colours.** The whole visual surface is eleven colour
|
|
43
|
+
tokens and three font families.
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Install
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
npm install react-native-agenda-kit
|
|
53
|
+
npm install react-native-reanimated react-native-worklets react-native-gesture-handler
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
With Expo, use `npx expo install` for the three peers so the versions match
|
|
57
|
+
your SDK.
|
|
58
|
+
|
|
59
|
+
Every scroll handler is a worklet, so **the worklets Babel plugin must run over
|
|
60
|
+
this package**. With Expo (`babel-preset-expo`) it already does. Bare React
|
|
61
|
+
Native, in `babel.config.js`:
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
module.exports = {
|
|
65
|
+
presets: ['module:@react-native/babel-preset'],
|
|
66
|
+
plugins: ['react-native-worklets/plugin'], // must be last
|
|
67
|
+
};
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then wrap your app once, as gesture-handler requires, and rebuild:
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
<GestureHandlerRootView style={{ flex: 1 }}>{/* … */}</GestureHandlerRootView>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If the plugin is missing, the kit says so by name in development rather than
|
|
77
|
+
scrolling wrongly.
|
|
78
|
+
|
|
79
|
+
📖 **Full walkthrough, including Expo vs bare and the rebuild step:
|
|
80
|
+
[docs/installation.md](./docs/installation.md)**
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Compatibility
|
|
85
|
+
|
|
86
|
+
| Peer | Minimum | Developed against |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| `react` | ≥ 18.0.0 | 19.2.0 |
|
|
89
|
+
| `react-native` | ≥ 0.74.0 | 0.83.6 |
|
|
90
|
+
| `react-native-reanimated` | ≥ 4.0.0 | 4.2.1 |
|
|
91
|
+
| `react-native-worklets` | ≥ 0.3.0 | 0.7.4 |
|
|
92
|
+
| `react-native-gesture-handler` | ≥ 2.16.0 | 2.30.0 |
|
|
93
|
+
|
|
94
|
+
| | |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| **New Architecture** | ✅ Required — Reanimated 4 runs only on it |
|
|
97
|
+
| **Old Architecture** | ❌ |
|
|
98
|
+
| **iOS / Android** | ✅ Supported and tested |
|
|
99
|
+
| **Web** | ❌ Not supported |
|
|
100
|
+
| **Expo** | ✅ Managed and bare; use a development build rather than Expo Go |
|
|
101
|
+
| **TypeScript** | ✅ Types ship for both ESM and CJS |
|
|
102
|
+
|
|
103
|
+
📖 **Module formats, accessibility behaviour, font scaling, time zones:
|
|
104
|
+
[docs/compatibility.md](./docs/compatibility.md)**
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Quick start
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import { useMemo, useState } from 'react';
|
|
112
|
+
import { Text, View } from 'react-native';
|
|
113
|
+
import {
|
|
114
|
+
AgendaList,
|
|
115
|
+
CalendarProvider,
|
|
116
|
+
ExpandableCalendar,
|
|
117
|
+
buildRange,
|
|
118
|
+
type AgendaSection,
|
|
119
|
+
type DateString,
|
|
120
|
+
} from 'react-native-agenda-kit';
|
|
121
|
+
|
|
122
|
+
type Item = { id: string; time: string; title: string };
|
|
123
|
+
|
|
124
|
+
const ROW_HEIGHTS = { Regular: 64 }; // declared, never measured
|
|
125
|
+
|
|
126
|
+
export default function Screen() {
|
|
127
|
+
const [date, setDate] = useState<DateString>('2026-09-10');
|
|
128
|
+
|
|
129
|
+
// The index space: a padded-to-whole-weeks window. Build it once.
|
|
130
|
+
const range = useMemo(
|
|
131
|
+
() => buildRange(new Date(2026, 6, 1), new Date(2026, 10, 30), 1),
|
|
132
|
+
[],
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
const sections: AgendaSection<Item>[] = useMemo(
|
|
136
|
+
() => [
|
|
137
|
+
{
|
|
138
|
+
title: '2026-09-10',
|
|
139
|
+
data: [{ id: 'a', time: '09:00', title: 'Consultation' }],
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
[],
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<CalendarProvider
|
|
147
|
+
range={range}
|
|
148
|
+
date={date}
|
|
149
|
+
onDateChanged={(next) => setDate(next)}
|
|
150
|
+
showTodayButton
|
|
151
|
+
todayLabel="Today"
|
|
152
|
+
>
|
|
153
|
+
<ExpandableCalendar closeOnDayPress>
|
|
154
|
+
<AgendaList<Item>
|
|
155
|
+
sections={sections}
|
|
156
|
+
itemHeightByType={ROW_HEIGHTS}
|
|
157
|
+
renderItem={({ item }) => (
|
|
158
|
+
<View style={{ height: ROW_HEIGHTS.Regular, justifyContent: 'center' }}>
|
|
159
|
+
<Text>{item.time} · {item.title}</Text>
|
|
160
|
+
</View>
|
|
161
|
+
)}
|
|
162
|
+
renderSectionHeader={(title) => <Text>{title}</Text>}
|
|
163
|
+
stickySectionHeadersEnabled
|
|
164
|
+
/>
|
|
165
|
+
</ExpandableCalendar>
|
|
166
|
+
</CalendarProvider>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
`ExpandableCalendar`'s children are rendered in the body it pushes down — put
|
|
172
|
+
the agenda or the timeline there.
|
|
173
|
+
|
|
174
|
+
### A day timeline instead
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
import { TimelineList } from 'react-native-agenda-kit';
|
|
178
|
+
|
|
179
|
+
<TimelineList
|
|
180
|
+
events={{
|
|
181
|
+
'2026-09-10': [
|
|
182
|
+
{ id: '1', start: '2026-09-10 09:00:00', end: '2026-09-10 09:30:00', title: 'Consultation' },
|
|
183
|
+
],
|
|
184
|
+
}}
|
|
185
|
+
showNowIndicator
|
|
186
|
+
scrollToFirst
|
|
187
|
+
timelineProps={{
|
|
188
|
+
format24h: true,
|
|
189
|
+
hourHeight: 60,
|
|
190
|
+
availableHours: { '2026-09-10': [{ start: 8, end: 18 }] },
|
|
191
|
+
onEventPress: (event) => console.log(event.id),
|
|
192
|
+
}}
|
|
193
|
+
/>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Neighbouring dates must be present in `events` or a swipe shows a blank day.
|
|
197
|
+
Note `availableHours` takes the **available** windows, not the unavailable ones
|
|
198
|
+
— the one deliberate rename from `react-native-calendars`.
|
|
199
|
+
|
|
200
|
+
📖 **Recipes for data loading, view switching, dark mode, refresh, localisation
|
|
201
|
+
and more: [docs/usage.md](./docs/usage.md)**
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Features
|
|
206
|
+
|
|
207
|
+
Every behaviour, its default, and the prop that switches it. The full
|
|
208
|
+
switchboard — including what is deliberately always on, and why — is in
|
|
209
|
+
**[docs/features.md](./docs/features.md)**.
|
|
210
|
+
|
|
211
|
+
### `ExpandableCalendar` — week strip ⇄ month grid
|
|
212
|
+
|
|
213
|
+
| Feature | Default | Switch |
|
|
214
|
+
| --- | --- | --- |
|
|
215
|
+
| Drag the knob to expand | on | `disablePan` |
|
|
216
|
+
| Open at mount | closed | `initialPosition="open"` |
|
|
217
|
+
| Collapse on day press | **on** | `closeOnDayPress={false}` |
|
|
218
|
+
| Collapse when the list scrolls | **on** | `closeOnListScroll={false}` |
|
|
219
|
+
| Drag distance before it commits | 30 px | `openThreshold`, `closeThreshold` |
|
|
220
|
+
| Dots, selection, disabled days | off | `markedDates` |
|
|
221
|
+
| Month names over each 1st | off | `monthShortLabels` |
|
|
222
|
+
| Screen-reader labels | off | `knobAccessibilityLabel`, `dayAccessibilityLabel` |
|
|
223
|
+
| Toggle from your own button | — | `ref.current.toggleCalendarPosition()` |
|
|
224
|
+
|
|
225
|
+
### `AgendaList` — windowed section list
|
|
226
|
+
|
|
227
|
+
| Feature | Default | Switch |
|
|
228
|
+
| --- | --- | --- |
|
|
229
|
+
| Declared row heights | — | `itemHeightByType` (**required**) |
|
|
230
|
+
| Row type resolution | `item.itemCustomHeightType` → `'Regular'` | `getItemType` |
|
|
231
|
+
| Section header height | 32 px | `sectionHeaderHeight` |
|
|
232
|
+
| Sticky headers (a real overlay) | off | `stickySectionHeadersEnabled` |
|
|
233
|
+
| Pull to refresh | off | `onRefresh` + `refreshing` |
|
|
234
|
+
| Skeleton backdrop during a fling | off | `backdrop`, `rowGroundColor` |
|
|
235
|
+
| Drag / settle callbacks | off | `onDragBegin`, `onSettle` |
|
|
236
|
+
| Scroll deceleration | 0.985 | `decelerationRate` |
|
|
237
|
+
| Imperative scrolling | — | `ref` → `scrollToDate`, `scrollToSection`, `scrollToOffset` |
|
|
238
|
+
|
|
239
|
+
### `TimelineList` — day view
|
|
240
|
+
|
|
241
|
+
| Feature | Default | Switch |
|
|
242
|
+
| --- | --- | --- |
|
|
243
|
+
| Now indicator | off | `showNowIndicator` |
|
|
244
|
+
| Open at now / first event / a time | top of day | `scrollToNow`, `scrollToFirst`, `initialTime` |
|
|
245
|
+
| 24-hour clock | **on** | `timelineProps.format24h` |
|
|
246
|
+
| Hour height | 100 px | `timelineProps.hourHeight` |
|
|
247
|
+
| Available-hours wash | off | `timelineProps.availableHours` (+ `availableHoursColor`) |
|
|
248
|
+
| Overlap packing | always on | `overlapEventsSpacing`, `rightEdgeSpacing` |
|
|
249
|
+
| Custom event blocks | default fill | `renderEvent`, `onEventPress`, or `event.color` |
|
|
250
|
+
| Day paging | always on | include neighbouring dates in `events` |
|
|
251
|
+
|
|
252
|
+
### `CalendarProvider` — the date owner
|
|
253
|
+
|
|
254
|
+
| Feature | Default | Switch |
|
|
255
|
+
| --- | --- | --- |
|
|
256
|
+
| Today pill | off | `showTodayButton` + `todayLabel` |
|
|
257
|
+
| Lift the pill above a tab bar | 0 | `todayBottomMargin` |
|
|
258
|
+
| Date / month callbacks | — | `onDateChanged`, `onMonthChange` |
|
|
259
|
+
| Dark theme | light | `themeBase={darkTheme}` |
|
|
260
|
+
| Brand colours and fonts | built-in | `theme` |
|
|
261
|
+
|
|
262
|
+
### Always on, on purpose
|
|
263
|
+
|
|
264
|
+
Worklet scroll handlers · declared row heights · windowing · echo-proofing the
|
|
265
|
+
controlled date · `allowFontScaling={false}` inside the kit · integer epoch-day
|
|
266
|
+
date maths. [Why each one is not a prop →](./docs/features.md#always-on--and-why)
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Theming
|
|
271
|
+
|
|
272
|
+
Eleven colours and three font families. If a colour is not on this list, the
|
|
273
|
+
kit does not draw it.
|
|
274
|
+
|
|
275
|
+

|
|
276
|
+
|
|
277
|
+
```tsx
|
|
278
|
+
import { CalendarProvider, darkTheme } from 'react-native-agenda-kit';
|
|
279
|
+
|
|
280
|
+
// Hoist it: a fresh object every render rebuilds every stylesheet in the tree.
|
|
281
|
+
const THEME = {
|
|
282
|
+
colors: { accent: '#0F766E', accentFill: '#0F766E' },
|
|
283
|
+
fonts: { regular: 'Inter-Regular', medium: 'Inter-Medium', semiBold: 'Inter-SemiBold' },
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
<CalendarProvider theme={THEME} themeBase={darkTheme} {...rest}>
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
`lightTheme` and `darkTheme` are exported, as are the static metrics
|
|
290
|
+
(`SPACING`, `FONT_SIZE`, `RADIUS`, `ANIMATION`, `EASING`) if you want to match
|
|
291
|
+
them elsewhere. `AgendaKitThemeProvider` is available if you would rather theme
|
|
292
|
+
above `CalendarProvider`.
|
|
293
|
+
|
|
294
|
+
📖 **What each token paints, ink vs fill, and what is deliberately not
|
|
295
|
+
themeable: [docs/theming.md](./docs/theming.md)**
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Migrating from `react-native-calendars`
|
|
300
|
+
|
|
301
|
+
The component and prop names match deliberately. Six differences matter:
|
|
302
|
+
|
|
303
|
+
| | `react-native-calendars` | this kit |
|
|
304
|
+
| --- | --- | --- |
|
|
305
|
+
| Row heights | measured | **declared** via `itemHeightByType` (required) |
|
|
306
|
+
| Sticky headers | emulated | a real fixed overlay |
|
|
307
|
+
| `unavailableHours` | the unavailable windows | `availableHours` — the **available** ones |
|
|
308
|
+
| `theme` object | a large nested theme | eleven colours + three fonts |
|
|
309
|
+
| Strings | ships English defaults | ships **none** — pass `todayLabel`, `monthShortLabels`, a11y labels |
|
|
310
|
+
| Date range | `pastScrollRange` / `futureScrollRange` | one `range` from `buildRange` |
|
|
311
|
+
|
|
312
|
+
`ExpandableCalendar` still accepts `firstDay`, `renderHeader`, `headerStyle`,
|
|
313
|
+
`minDate`, `maxDate`, `pastScrollRange`, `futureScrollRange`, `hideArrows`,
|
|
314
|
+
`hideDayNames`, `theme` and friends — **typed and ignored**, so copied JSX
|
|
315
|
+
compiles while you delete them. No header band or day-names row is rendered;
|
|
316
|
+
render your own above the calendar.
|
|
317
|
+
|
|
318
|
+
📖 **Step-by-step diffs: [docs/migration.md](./docs/migration.md)**
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Notes and limits
|
|
323
|
+
|
|
324
|
+
- `AgendaList` heights are contracts. A row taller than its declared type clips.
|
|
325
|
+
- `TimelineList` needs neighbouring dates present in `events` to swipe into.
|
|
326
|
+
- Text ignores OS font scaling inside the kit (`allowFontScaling={false}`),
|
|
327
|
+
because declared heights and scaled text cannot both be right. Scale your
|
|
328
|
+
`itemHeightByType` yourself if you need to honour it.
|
|
329
|
+
- Reduce Motion collapses every duration to 0; a running screen reader switches
|
|
330
|
+
`ExpandableCalendar` to a static open grid.
|
|
331
|
+
- Tested on iOS and Android. Web is not supported.
|
|
332
|
+
|
|
333
|
+
Something not behaving? [docs/troubleshooting.md](./docs/troubleshooting.md)
|
|
334
|
+
lists every error message the kit can emit and what causes it.
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Documentation
|
|
339
|
+
|
|
340
|
+
| | |
|
|
341
|
+
| --- | --- |
|
|
342
|
+
| [Installation](./docs/installation.md) | Peers, the Babel plugin, rebuilding |
|
|
343
|
+
| [Compatibility](./docs/compatibility.md) | Versions, architecture, platforms, a11y, time zones |
|
|
344
|
+
| [Usage](./docs/usage.md) | Quick starts and recipes |
|
|
345
|
+
| [Features](./docs/features.md) | Every toggle, default and switch |
|
|
346
|
+
| [API](./docs/api.md) | Every prop, ref, helper and type |
|
|
347
|
+
| [Theming](./docs/theming.md) | The eleven tokens |
|
|
348
|
+
| [Migration](./docs/migration.md) | From `react-native-calendars` |
|
|
349
|
+
| [Troubleshooting](./docs/troubleshooting.md) | Errors and failure modes |
|
|
350
|
+
|
|
351
|
+
## Contributing
|
|
352
|
+
|
|
353
|
+
```sh
|
|
354
|
+
npm install
|
|
355
|
+
npm run typecheck
|
|
356
|
+
npm run build
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Issues and pull requests:
|
|
360
|
+
[github.com/shivampandey-07/react-native-agenda-kit](https://github.com/shivampandey-07/react-native-agenda-kit)
|
|
361
|
+
|
|
362
|
+
## License
|
|
363
|
+
|
|
364
|
+
MIT © Shivam Pandey
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AgendaBackdrop = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
/**
|
|
13
|
+
* The "never white" layer: static skeleton tiles BEHIND the list, moved by the
|
|
14
|
+
* scroll offset modulo one tile.
|
|
15
|
+
*
|
|
16
|
+
* Every list renders rows from JavaScript, so a fling faster than the JS thread
|
|
17
|
+
* can mount rows leaves slots with nothing drawn. This layer exists before the
|
|
18
|
+
* rows do; drawn rows cover it (their slots paint the list ground). Measured
|
|
19
|
+
* with the list-library trial: 25–51 % white frames without it, 0 % with it, on
|
|
20
|
+
* every engine. No shimmer — it sits hidden behind real rows almost always.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const AgendaBackdropInner = ({
|
|
24
|
+
scrollY,
|
|
25
|
+
tileHeight,
|
|
26
|
+
renderTile
|
|
27
|
+
}) => {
|
|
28
|
+
const tiles = (0, _react.useMemo)(() => {
|
|
29
|
+
if (tileHeight <= 0) return null;
|
|
30
|
+
const count = Math.ceil(_reactNative.Dimensions.get('window').height / tileHeight) + 2;
|
|
31
|
+
const tileStyle = {
|
|
32
|
+
height: tileHeight
|
|
33
|
+
};
|
|
34
|
+
const out = [];
|
|
35
|
+
for (let i = 0; i < count; i += 1) {
|
|
36
|
+
out.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
37
|
+
style: tileStyle,
|
|
38
|
+
children: renderTile()
|
|
39
|
+
}, i));
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
}, [renderTile, tileHeight]);
|
|
43
|
+
const style = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
44
|
+
const r = tileHeight > 0 ? scrollY.value % tileHeight : 0;
|
|
45
|
+
return {
|
|
46
|
+
transform: [{
|
|
47
|
+
translateY: -(r < 0 ? r + tileHeight : r)
|
|
48
|
+
}]
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
52
|
+
pointerEvents: "none",
|
|
53
|
+
style: styles.fill,
|
|
54
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
55
|
+
style: style,
|
|
56
|
+
children: tiles
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const AgendaBackdrop = exports.AgendaBackdrop = /*#__PURE__*/(0, _react.memo)(AgendaBackdropInner);
|
|
61
|
+
AgendaBackdrop.displayName = 'AgendaBackdrop';
|
|
62
|
+
const styles = _reactNative.StyleSheet.create({
|
|
63
|
+
fill: {
|
|
64
|
+
..._reactNative.StyleSheet.absoluteFillObject,
|
|
65
|
+
overflow: 'hidden'
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=AgendaBackdrop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AgendaBackdropInner","scrollY","tileHeight","renderTile","tiles","useMemo","count","Math","ceil","Dimensions","height","tileStyle","out","push","jsx","View","style","children","useAnimatedStyle","value","transform","translateY","pointerEvents","styles","fill","AgendaBackdrop","exports","memo","displayName","StyleSheet","create","absoluteFillObject","overflow"],"sourceRoot":"../../../src","sources":["agenda/AgendaBackdrop.tsx"],"mappings":";;;;;;AAWA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAAuF,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAG,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAbvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,MAAMkB,mBAAmB,GAAGA,CAAC;EAAEC,OAAO;EAAEC,UAAU;EAAEC;AAAkB,CAAC,KAAK;EAC1E,MAAMC,KAAK,GAAG,IAAAC,cAAO,EAAC,MAAM;IAC1B,IAAIH,UAAU,IAAI,CAAC,EAAE,OAAO,IAAI;IAChC,MAAMI,KAAK,GAAGC,IAAI,CAACC,IAAI,CAACC,uBAAU,CAAChB,GAAG,CAAC,QAAQ,CAAC,CAACiB,MAAM,GAAGR,UAAU,CAAC,GAAG,CAAC;IACzE,MAAMS,SAAS,GAAG;MAAED,MAAM,EAAER;IAAW,CAAC;IACxC,MAAMU,GAAmB,GAAG,EAAE;IAC9B,KAAK,IAAIxB,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGkB,KAAK,EAAElB,CAAC,IAAI,CAAC,EAAE;MACjCwB,GAAG,CAACC,IAAI,cACN,IAAAjC,WAAA,CAAAkC,GAAA,EAACrC,YAAA,CAAAsC,IAAI;QAASC,KAAK,EAAEL,SAAU;QAAAM,QAAA,EAC5Bd,UAAU,CAAC;MAAC,GADJf,CAEL,CACR,CAAC;IACH;IACA,OAAOwB,GAAG;EACZ,CAAC,EAAE,CAACT,UAAU,EAAED,UAAU,CAAC,CAAC;EAE5B,MAAMc,KAAK,GAAG,IAAAE,uCAAgB,EAAC,MAAM;IACnC,MAAMlC,CAAC,GAAGkB,UAAU,GAAG,CAAC,GAAGD,OAAO,CAACkB,KAAK,GAAGjB,UAAU,GAAG,CAAC;IACzD,OAAO;MAAEkB,SAAS,EAAE,CAAC;QAAEC,UAAU,EAAE,EAAErC,CAAC,GAAG,CAAC,GAAGA,CAAC,GAAGkB,UAAU,GAAGlB,CAAC;MAAE,CAAC;IAAE,CAAC;EACvE,CAAC,CAAC;EAEF,oBACE,IAAAJ,WAAA,CAAAkC,GAAA,EAACrC,YAAA,CAAAsC,IAAI;IAACO,aAAa,EAAC,MAAM;IAACN,KAAK,EAAEO,MAAM,CAACC,IAAK;IAAAP,QAAA,eAC5C,IAAArC,WAAA,CAAAkC,GAAA,EAACpC,sBAAA,CAAAa,OAAQ,CAACwB,IAAI;MAACC,KAAK,EAAEA,KAAM;MAAAC,QAAA,EAAEb;IAAK,CAAgB;EAAC,CAChD,CAAC;AAEX,CAAC;AAEM,MAAMqB,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,WAAI,EAAC3B,mBAAmB,CAAC;AACvDyB,cAAc,CAACG,WAAW,GAAG,gBAAgB;AAE7C,MAAML,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC/BN,IAAI,EAAE;IAAE,GAAGK,uBAAU,CAACE,kBAAkB;IAAEC,QAAQ,EAAE;EAAS;AAC/D,CAAC,CAAC","ignoreList":[]}
|