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
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The day view: ONE vertical ScrollView holding the time gutter and the day pager, so every day
|
|
5
|
+
* shares the vertical offset by construction. The start offset is a mount-time `contentOffset`;
|
|
6
|
+
* the caller mounts this conditionally, so every open recomputes it.
|
|
7
|
+
*
|
|
8
|
+
* The width is seeded from the window so the FIRST commit already holds the day columns (waiting
|
|
9
|
+
* for `onLayout` painted an empty grid first); `onLayout` corrects it when not full-width.
|
|
10
|
+
*
|
|
11
|
+
* `timelineProps.availableHours` replaces the library's inverted `unavailableHours` and also takes
|
|
12
|
+
* a per-date map, so a neighbouring day's bands are right mid-swipe.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { useKitTheme } from "../theme/index.js";
|
|
16
|
+
import { useKitStyles } from "../theme/index.js";
|
|
17
|
+
import { useCallback, useState } from 'react';
|
|
18
|
+
import { Dimensions, ScrollView, StyleSheet, View } from 'react-native';
|
|
19
|
+
import { useCalendarContext } from "../core/CalendarContext.js";
|
|
20
|
+
import { dayIndexOf } from "../core/dateKey.js";
|
|
21
|
+
import { DayPager } from "./DayPager.js";
|
|
22
|
+
import { HourGrid } from "./HourGrid.js";
|
|
23
|
+
import { CONTENT_BOTTOM_PAD, GUTTER, HOUR_HEIGHT, gridHeight } from "./timelineGeometry.js";
|
|
24
|
+
import { initialScrollY, minutesOf } from "./timelineMath.js";
|
|
25
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
export const TimelineList = ({
|
|
27
|
+
events,
|
|
28
|
+
timelineProps = {},
|
|
29
|
+
showNowIndicator = false,
|
|
30
|
+
scrollToNow,
|
|
31
|
+
scrollToFirst,
|
|
32
|
+
initialTime
|
|
33
|
+
}) => {
|
|
34
|
+
const {
|
|
35
|
+
colors
|
|
36
|
+
} = useKitTheme();
|
|
37
|
+
const styles = useKitStyles(makeStyles);
|
|
38
|
+
const {
|
|
39
|
+
renderEvent,
|
|
40
|
+
onEventPress,
|
|
41
|
+
format24h = true,
|
|
42
|
+
overlapEventsSpacing = 0,
|
|
43
|
+
rightEdgeSpacing = 0,
|
|
44
|
+
availableHours,
|
|
45
|
+
availableHoursColor = colors.accentSubtle,
|
|
46
|
+
hourHeight = HOUR_HEIGHT
|
|
47
|
+
} = timelineProps;
|
|
48
|
+
const {
|
|
49
|
+
range,
|
|
50
|
+
dateRef
|
|
51
|
+
} = useCalendarContext();
|
|
52
|
+
const [width, setWidth] = useState(() => Dimensions.get('window').width);
|
|
53
|
+
const [contentOffset] = useState(() => {
|
|
54
|
+
const ymd = dateRef.current;
|
|
55
|
+
const dayEvents = events[ymd];
|
|
56
|
+
let firstEventTop;
|
|
57
|
+
if (dayEvents?.length) {
|
|
58
|
+
let earliest = Infinity;
|
|
59
|
+
for (const e of dayEvents) earliest = Math.min(earliest, minutesOf(e.start));
|
|
60
|
+
firstEventTop = earliest / 60 * hourHeight;
|
|
61
|
+
}
|
|
62
|
+
const y = initialScrollY({
|
|
63
|
+
isToday: dayIndexOf(range, ymd) === range.todayIndex,
|
|
64
|
+
scrollToNow,
|
|
65
|
+
scrollToFirst,
|
|
66
|
+
initialTime,
|
|
67
|
+
firstEventTop,
|
|
68
|
+
hourHeight
|
|
69
|
+
});
|
|
70
|
+
return {
|
|
71
|
+
x: 0,
|
|
72
|
+
y
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
const availableHoursFor = useCallback(ymd => Array.isArray(availableHours) ? availableHours : availableHours?.[ymd], [availableHours]);
|
|
76
|
+
const onLayout = useCallback(e => {
|
|
77
|
+
const w = e.nativeEvent.layout.width;
|
|
78
|
+
setWidth(prev => Math.abs(prev - w) < 0.5 ? prev : w);
|
|
79
|
+
}, []);
|
|
80
|
+
const colW = Math.max(0, width - GUTTER);
|
|
81
|
+
const dayHeight = gridHeight(hourHeight);
|
|
82
|
+
return /*#__PURE__*/_jsx(View, {
|
|
83
|
+
style: styles.root,
|
|
84
|
+
onLayout: onLayout,
|
|
85
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
86
|
+
contentOffset: contentOffset,
|
|
87
|
+
showsVerticalScrollIndicator: false,
|
|
88
|
+
nestedScrollEnabled: true,
|
|
89
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
90
|
+
style: {
|
|
91
|
+
height: dayHeight + CONTENT_BOTTOM_PAD
|
|
92
|
+
},
|
|
93
|
+
children: [/*#__PURE__*/_jsx(HourGrid, {
|
|
94
|
+
hourHeight: hourHeight,
|
|
95
|
+
format24h: format24h
|
|
96
|
+
}), colW > 0 ? /*#__PURE__*/_jsx(DayPager, {
|
|
97
|
+
left: GUTTER,
|
|
98
|
+
width: colW,
|
|
99
|
+
height: dayHeight,
|
|
100
|
+
events: events,
|
|
101
|
+
availableHoursFor: availableHoursFor,
|
|
102
|
+
bandColor: availableHoursColor,
|
|
103
|
+
hourHeight: hourHeight,
|
|
104
|
+
overlapEventsSpacing: overlapEventsSpacing,
|
|
105
|
+
rightEdgeSpacing: rightEdgeSpacing,
|
|
106
|
+
renderEvent: renderEvent,
|
|
107
|
+
onEventPress: onEventPress,
|
|
108
|
+
showNowIndicator: showNowIndicator
|
|
109
|
+
}) : null]
|
|
110
|
+
})
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
const makeStyles = ({
|
|
115
|
+
colors
|
|
116
|
+
}) => StyleSheet.create({
|
|
117
|
+
root: {
|
|
118
|
+
flex: 1,
|
|
119
|
+
backgroundColor: colors.surface
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
//# sourceMappingURL=TimelineDay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useKitTheme","useKitStyles","useCallback","useState","Dimensions","ScrollView","StyleSheet","View","useCalendarContext","dayIndexOf","DayPager","HourGrid","CONTENT_BOTTOM_PAD","GUTTER","HOUR_HEIGHT","gridHeight","initialScrollY","minutesOf","jsx","_jsx","jsxs","_jsxs","TimelineList","events","timelineProps","showNowIndicator","scrollToNow","scrollToFirst","initialTime","colors","styles","makeStyles","renderEvent","onEventPress","format24h","overlapEventsSpacing","rightEdgeSpacing","availableHours","availableHoursColor","accentSubtle","hourHeight","range","dateRef","width","setWidth","get","contentOffset","ymd","current","dayEvents","firstEventTop","length","earliest","Infinity","e","Math","min","start","y","isToday","todayIndex","x","availableHoursFor","Array","isArray","onLayout","w","nativeEvent","layout","prev","abs","colW","max","dayHeight","style","root","children","showsVerticalScrollIndicator","nestedScrollEnabled","height","left","bandColor","create","flex","backgroundColor","surface"],"sourceRoot":"../../../src","sources":["timeline/TimelineDay.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Overlap packing for one day column — `react-native-calendars`' `Packer.js`, in minutes, so
|
|
5
|
+
* blocks land where react-native-calendars put them. Sort by start then end; a new overlap group starts
|
|
6
|
+
* at or after the latest end seen; first-fit into columns; each event gets `1/n` of the width,
|
|
7
|
+
* widened across later columns it does not collide with.
|
|
8
|
+
*
|
|
9
|
+
* Deliberate edge differences: a missing `end` is start + 60; an `end` at or before `start` is
|
|
10
|
+
* start + 15 (the library drew a negative height); collisions use an end of at least start + 15,
|
|
11
|
+
* so two zero-length events at one minute get their own columns.
|
|
12
|
+
*
|
|
13
|
+
* Invariant the span pass relies on: a column's events are sorted and pairwise disjoint, so the
|
|
14
|
+
* last event placed in a column is the only one that can still overlap a later-starting event.
|
|
15
|
+
* `lib/overlap-detection.ts` cannot execute (gap-6) — do not swap it in.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { DAY_MINUTES, minutesOf } from "./timelineMath.js";
|
|
19
|
+
const SHORT_EVENT_MINUTES = 15;
|
|
20
|
+
export const packEvents = (events, {
|
|
21
|
+
colW,
|
|
22
|
+
hourHeight,
|
|
23
|
+
overlapEventsSpacing = 0,
|
|
24
|
+
rightEdgeSpacing = 0
|
|
25
|
+
}) => {
|
|
26
|
+
if (!events?.length || colW <= 0) return [];
|
|
27
|
+
const items = events.map((ev, index) => {
|
|
28
|
+
const start = Math.min(Math.max(minutesOf(ev.start), 0), DAY_MINUTES);
|
|
29
|
+
let end = ev.end ? minutesOf(ev.end) : start + 60;
|
|
30
|
+
if (end <= start) end = start + SHORT_EVENT_MINUTES;
|
|
31
|
+
end = Math.min(end, DAY_MINUTES);
|
|
32
|
+
const collEnd = Math.max(end, start + SHORT_EVENT_MINUTES);
|
|
33
|
+
return {
|
|
34
|
+
ev,
|
|
35
|
+
index,
|
|
36
|
+
start,
|
|
37
|
+
end,
|
|
38
|
+
collEnd,
|
|
39
|
+
span: Infinity
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
items.sort((a, b) => a.start - b.start || a.end - b.end || a.index - b.index);
|
|
43
|
+
const packed = [];
|
|
44
|
+
const totalW = colW - rightEdgeSpacing;
|
|
45
|
+
let columns = [];
|
|
46
|
+
/** `collEnd` of each column's last event: the whole collision test against that column. */
|
|
47
|
+
const lastEnd = [];
|
|
48
|
+
let groupEnd = -1;
|
|
49
|
+
const flush = () => {
|
|
50
|
+
const n = columns.length;
|
|
51
|
+
for (let c = 0; c < n; c += 1) {
|
|
52
|
+
for (const item of columns[c]) {
|
|
53
|
+
const span = Math.min(item.span, n - c);
|
|
54
|
+
let width = totalW * span / n;
|
|
55
|
+
if (c + span <= n - 1) width -= overlapEventsSpacing;
|
|
56
|
+
packed.push({
|
|
57
|
+
...item.ev,
|
|
58
|
+
index: item.index,
|
|
59
|
+
left: c / n * totalW,
|
|
60
|
+
width,
|
|
61
|
+
top: item.start / 60 * hourHeight,
|
|
62
|
+
height: (item.end - item.start) / 60 * hourHeight
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
columns = [];
|
|
67
|
+
lastEnd.length = 0;
|
|
68
|
+
};
|
|
69
|
+
for (const item of items) {
|
|
70
|
+
if (columns.length && item.start >= groupEnd) {
|
|
71
|
+
flush();
|
|
72
|
+
groupEnd = -1;
|
|
73
|
+
}
|
|
74
|
+
const cols = lastEnd.length;
|
|
75
|
+
let col = 0;
|
|
76
|
+
while (col < cols && lastEnd[col] > item.start) col += 1;
|
|
77
|
+
|
|
78
|
+
// Every column left of `col` ends after this item starts: its last event stops spanning here.
|
|
79
|
+
for (let i = 0; i < col; i += 1) {
|
|
80
|
+
const last = columns[i][columns[i].length - 1];
|
|
81
|
+
if (last.span > col - i) last.span = col - i;
|
|
82
|
+
}
|
|
83
|
+
// The nearest column to the right still busy at this item's start caps its own span.
|
|
84
|
+
for (let k = col + 1; k < cols; k += 1) {
|
|
85
|
+
if (lastEnd[k] > item.start) {
|
|
86
|
+
item.span = k - col;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (col === cols) columns.push([item]);else columns[col].push(item);
|
|
91
|
+
lastEnd[col] = item.collEnd;
|
|
92
|
+
if (columns.length === 1 && columns[0].length === 1) groupEnd = item.collEnd;else if (item.collEnd > groupEnd) groupEnd = item.collEnd;
|
|
93
|
+
}
|
|
94
|
+
if (columns.length) flush();
|
|
95
|
+
return packed;
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=packEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DAY_MINUTES","minutesOf","SHORT_EVENT_MINUTES","packEvents","events","colW","hourHeight","overlapEventsSpacing","rightEdgeSpacing","length","items","map","ev","index","start","Math","min","max","end","collEnd","span","Infinity","sort","a","b","packed","totalW","columns","lastEnd","groupEnd","flush","n","c","item","width","push","left","top","height","cols","col","i","last","k"],"sourceRoot":"../../../src","sources":["timeline/packEvents.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,WAAW,EAAEC,SAAS,QAAQ,mBAAgB;AAEvD,MAAMC,mBAAmB,GAAG,EAAE;AAqB9B,OAAO,MAAMC,UAAU,GAAGA,CACxBC,MAAuB,EACvB;EAAEC,IAAI;EAAEC,UAAU;EAAEC,oBAAoB,GAAG,CAAC;EAAEC,gBAAgB,GAAG;AAAe,CAAC,KACpD;EAC7B,IAAI,CAACJ,MAAM,EAAEK,MAAM,IAAIJ,IAAI,IAAI,CAAC,EAAE,OAAO,EAAE;EAE3C,MAAMK,KAAgB,GAAGN,MAAM,CAACO,GAAG,CAAC,CAACC,EAAE,EAAEC,KAAK,KAAK;IACjD,MAAMC,KAAK,GAAGC,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,GAAG,CAAChB,SAAS,CAACW,EAAE,CAACE,KAAK,CAAC,EAAE,CAAC,CAAC,EAA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C,IAAI,CAACtB,IAAI,GAAGoB,GAAG,GAAGC,CAAC,EAAEC,IAAI,CAACtB,IAAI,GAAGoB,GAAG,GAAGC,CAAC;IAC9C;IACA;IACA,KAAK,IAAIE,CAAC,GAAGH,GAAG,GAAG,CAAC,EAAEG,CAAC,GAAGJ,IAAI,EAAEI,CAAC,IAAI,CAAC,EAAE;MACtC,IAAIf,OAAO,CAACe,CAAC,CAAC,GAAGV,IAAI,CAACnB,KAAK,EAAE;QAC3BmB,IAAI,CAACb,IAAI,GAAGuB,CAAC,GAAGH,GAAG;QACnB;MACF;IACF;IAEA,IAAIA,GAAG,KAAKD,IAAI,EAAEZ,OAAO,CAACQ,IAAI,CAAC,CAACF,IAAI,CAAC,CAAC,CAAC,KAClCN,OAAO,CAACa,GAAG,CAAC,CAACL,IAAI,CAACF,IAAI,CAAC;IAC5BL,OAAO,CAACY,GAAG,CAAC,GAAGP,IAAI,CAACd,OAAO;IAC3B,IAAIQ,OAAO,CAAClB,MAAM,KAAK,CAAC,IAAIkB,OAAO,CAAC,CAAC,CAAC,CAAClB,MAAM,KAAK,CAAC,EAAEoB,QAAQ,GAAGI,IAAI,CAACd,OAAO,CAAC,KACxE,IAAIc,IAAI,CAACd,OAAO,GAAGU,QAAQ,EAAEA,QAAQ,GAAGI,IAAI,CAACd,OAAO;EAC3D;EACA,IAAIQ,OAAO,CAAClB,MAAM,EAAEqB,KAAK,CAAC,CAAC;EAE3B,OAAOL,MAAM;AACf,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Timeline geometry, numbers only. Transcribed from `react-native-calendars` (`Packer.js`,
|
|
4
|
+
// `TimelineHours.js`, `timeline/style.js`); GUTTER is the provider's `timelineLeftInset` default.
|
|
5
|
+
|
|
6
|
+
/** px per hour. The live event card's layout branches (<25 / <50 / <70) assume it. */
|
|
7
|
+
export const HOUR_HEIGHT = 100;
|
|
8
|
+
export const GUTTER = 72;
|
|
9
|
+
|
|
10
|
+
/** Hour lines start this far inside the gutter (`timelineLeftInset - 16`). */
|
|
11
|
+
export const LINE_GUTTER_OVERHANG = 16;
|
|
12
|
+
|
|
13
|
+
/** Labels sit 6 px above their line, centred in the 56 px label box. */
|
|
14
|
+
export const LABEL_OFFSET_Y = -6;
|
|
15
|
+
export const LABEL_PADDING_LEFT = 12;
|
|
16
|
+
|
|
17
|
+
/** `contentStyle.height: calendarHeight + 10`. */
|
|
18
|
+
export const CONTENT_BOTTOM_PAD = 10;
|
|
19
|
+
export const EVENT_MIN_HEIGHT = 25;
|
|
20
|
+
export const NOW_KNOB = 7;
|
|
21
|
+
export const gridHeight = hourHeight => 24 * hourHeight;
|
|
22
|
+
//# sourceMappingURL=timelineGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HOUR_HEIGHT","GUTTER","LINE_GUTTER_OVERHANG","LABEL_OFFSET_Y","LABEL_PADDING_LEFT","CONTENT_BOTTOM_PAD","EVENT_MIN_HEIGHT","NOW_KNOB","gridHeight","hourHeight"],"sourceRoot":"../../../src","sources":["timeline/timelineGeometry.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA,OAAO,MAAMA,WAAW,GAAG,GAAG;AAE9B,OAAO,MAAMC,MAAM,GAAG,EAAE;;AAExB;AACA,OAAO,MAAMC,oBAAoB,GAAG,EAAE;;AAEtC;AACA,OAAO,MAAMC,cAAc,GAAG,CAAC,CAAC;AAChC,OAAO,MAAMC,kBAAkB,GAAG,EAAE;;AAEpC;AACA,OAAO,MAAMC,kBAAkB,GAAG,EAAE;AAEpC,OAAO,MAAMC,gBAAgB,GAAG,EAAE;AAElC,OAAO,MAAMC,QAAQ,GAAG,CAAC;AAEzB,OAAO,MAAMC,UAAU,GAAIC,UAAkB,IAAa,EAAE,GAAGA,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Pure time ↔ pixel arithmetic for the timeline, in minutes of the day — never a `Date`. */
|
|
4
|
+
|
|
5
|
+
export const DAY_MINUTES = 24 * 60;
|
|
6
|
+
const digitAt = (s, i) => {
|
|
7
|
+
const d = s.charCodeAt(i) - 48;
|
|
8
|
+
return d >= 0 && d <= 9 ? d : -1;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** Minute of the day from `'YYYY-MM-DD HH:mm:ss'` (HH at 11–12, mm at 14–15); 0 when unreadable. */
|
|
12
|
+
export const minutesOf = dateTime => {
|
|
13
|
+
if (!dateTime || dateTime.length < 16) return 0;
|
|
14
|
+
const h1 = digitAt(dateTime, 11);
|
|
15
|
+
const h2 = digitAt(dateTime, 12);
|
|
16
|
+
const m1 = digitAt(dateTime, 14);
|
|
17
|
+
const m2 = digitAt(dateTime, 15);
|
|
18
|
+
if (h1 < 0 || h2 < 0 || m1 < 0 || m2 < 0) return 0;
|
|
19
|
+
return (h1 * 10 + h2) * 60 + m1 * 10 + m2;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** `{ hour, minutes }` or `'H:mm'` → minute of the day. */
|
|
23
|
+
const initialTimeMinutes = t => {
|
|
24
|
+
if (t == null) return undefined;
|
|
25
|
+
if (typeof t === 'string') {
|
|
26
|
+
const [h, m] = t.split(':').map(Number);
|
|
27
|
+
return Number.isFinite(h) ? h * 60 + (Number.isFinite(m) ? m : 0) : undefined;
|
|
28
|
+
}
|
|
29
|
+
return t.hour * 60 + (t.minutes || 0);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Library precedence (`timeline-list`): today → `scrollToNow` only; other days → `scrollToFirst`
|
|
34
|
+
* (when the day has events) over `initialTime`. One hour above the target, as `Timeline.js` does.
|
|
35
|
+
*/
|
|
36
|
+
export const initialScrollY = ({
|
|
37
|
+
isToday,
|
|
38
|
+
scrollToNow,
|
|
39
|
+
scrollToFirst,
|
|
40
|
+
initialTime,
|
|
41
|
+
firstEventTop,
|
|
42
|
+
hourHeight,
|
|
43
|
+
now = new Date()
|
|
44
|
+
}) => {
|
|
45
|
+
let pos = 0;
|
|
46
|
+
if (isToday) {
|
|
47
|
+
if (scrollToNow) pos = (now.getHours() * 60 + now.getMinutes()) / 60 * hourHeight;
|
|
48
|
+
} else if (scrollToFirst && firstEventTop !== undefined) {
|
|
49
|
+
pos = firstEventTop;
|
|
50
|
+
} else {
|
|
51
|
+
const m = initialTimeMinutes(initialTime);
|
|
52
|
+
if (m !== undefined) pos = m / 60 * hourHeight;
|
|
53
|
+
}
|
|
54
|
+
return pos ? Math.max(0, pos - hourHeight) : 0;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Availability windows → pixel bands. Invalid windows are dropped silently: they are backend
|
|
58
|
+
* data, and the library's `console.error` raised a red box in debug builds.
|
|
59
|
+
*/
|
|
60
|
+
export const buildBands = (windows, hourHeight) => {
|
|
61
|
+
if (!windows?.length) return [];
|
|
62
|
+
const out = [];
|
|
63
|
+
for (const w of windows) {
|
|
64
|
+
if (!(w.start >= 0 && w.start < 25 && w.end >= 0 && w.end < 25)) continue;
|
|
65
|
+
if (w.start >= w.end) continue;
|
|
66
|
+
const e = Math.min(w.end, 24);
|
|
67
|
+
if (e <= w.start) continue;
|
|
68
|
+
out.push({
|
|
69
|
+
top: w.start * hourHeight,
|
|
70
|
+
height: (e - w.start) * hourHeight
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return out;
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=timelineMath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DAY_MINUTES","digitAt","s","i","d","charCodeAt","minutesOf","dateTime","length","h1","h2","m1","m2","initialTimeMinutes","t","undefined","h","m","split","map","Number","isFinite","hour","minutes","initialScrollY","isToday","scrollToNow","scrollToFirst","initialTime","firstEventTop","hourHeight","now","Date","pos","getHours","getMinutes","Math","max","buildBands","windows","out","w","start","end","e","min","push","top","height"],"sourceR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,EAAE;IACvB,IAAI,EAAEE,CAAC,CAACC,KAAK,IAAI,CAAC,IAAID,CAAC,CAACC,KAAK,GAAG,EAAE,IAAID,CAAC,CAACE,GAAG,IAAI,CAAC,IAAIF,CAAC,CAACE,GAAG,GAAG,EAAE,CAAC,EAAE;IACjE,IAAIF,CAAC,CAACC,KAAK,IAAID,CAAC,CAACE,GAAG,EAAE;IACtB,MAAMC,CAAC,GAAGR,IAAI,CAACS,GAAG,CAACJ,CAAC,CAACE,GAAG,EAAE,EAAE,CAAC;IAC7B,IAAIC,CAAC,IAAIH,CAAC,CAACC,KAAK,EAAE;IAClBF,GAAG,CAACM,IAAI,CAAC;MAAEC,GAAG,EAAEN,CAAC,CAACC,KAAK,GAAGZ,UAAU;MAAEkB,MAAM,EAAE,CAACJ,CAAC,GAAGH,CAAC,CAACC,KAAK,IAAIZ;IAAW,CAAC,CAAC;EAC7E;EACA,OAAOU,GAAG;AACZ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* react-native-agenda-kit — the public type surface.
|
|
5
|
+
*
|
|
6
|
+
* The kit is a PURE UI LIBRARY: it fetches nothing, knows no app type, and
|
|
7
|
+
* reads only design tokens. Everything domain-shaped (an appointment, a
|
|
8
|
+
* booking status, a locale) arrives as a caller-supplied render prop or a
|
|
9
|
+
* primitive. That boundary is what makes the three surfaces reusable and what
|
|
10
|
+
* keeps the CONSUMER's screen the only place that knows what a row *means*.
|
|
11
|
+
*
|
|
12
|
+
* Names deliberately match `react-native-calendars`' public API
|
|
13
|
+
* (`CalendarProvider`, `ExpandableCalendar`, `AgendaList`, `TimelineList`,
|
|
14
|
+
* `UpdateSources`) so a migrating screen's JSX is a copy, not a rewrite.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** 'YYYY-MM-DD', local calendar day. The only date string the kit accepts. */
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Why a date changed. The strings are byte-identical to the library's
|
|
21
|
+
* `commons.js` UpdateSources so the screen's `handleDateChanged` switch is a
|
|
22
|
+
* verbatim copy.
|
|
23
|
+
*/
|
|
24
|
+
export const UpdateSources = {
|
|
25
|
+
CALENDAR_INIT: 'calendarInit',
|
|
26
|
+
TODAY_PRESS: 'todayPress',
|
|
27
|
+
LIST_DRAG: 'listDrag',
|
|
28
|
+
DAY_PRESS: 'dayPress',
|
|
29
|
+
PAGE_SCROLL: 'pageScroll',
|
|
30
|
+
WEEK_SCROLL: 'weekScroll',
|
|
31
|
+
PROP_UPDATE: 'propUpdate'
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Which surface *produced* a programmatic move. The originating scroller
|
|
36
|
+
* ignores its own origin, which is the whole echo-proofing story: no latches,
|
|
37
|
+
* no 500 ms timers, no `changedItems` bookkeeping.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/** One programmatic move. `seq` makes every move distinct even when `idx` repeats. */
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The one index space. Every surface addresses a day by its integer offset
|
|
44
|
+
* from `start`: agenda section index, week page `floor(i/7)`, month page,
|
|
45
|
+
* timeline column. Worklets never touch strings.
|
|
46
|
+
*
|
|
47
|
+
* `start` is a Monday (the skeleton pads to whole weeks) and `days` is a
|
|
48
|
+
* multiple of 7, so `floor(dayIndex / 7)` is always a whole page.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/* ── Agenda ────────────────────────────────────────────────────────────── */
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A day's worth of rows. `title` is the 'YYYY-MM-DD' key — the library's
|
|
55
|
+
* SectionList convention, kept so `renderSectionHeader` stays a copy.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/* ── Expandable calendar ───────────────────────────────────────────────── */
|
|
59
|
+
|
|
60
|
+
/** Accepted and never read — typed so JSX copied from `react-native-calendars` compiles unchanged. */
|
|
61
|
+
|
|
62
|
+
/* ── Timeline ──────────────────────────────────────────────────────────── */
|
|
63
|
+
|
|
64
|
+
/** `start` / `end` are 'YYYY-MM-DD HH:mm:ss' — the library's wire format. */
|
|
65
|
+
|
|
66
|
+
/** An inclusive window of *available* time. The kit never takes the inverse. */
|
|
67
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UpdateSources","CALENDAR_INIT","TODAY_PRESS","LIST_DRAG","DAY_PRESS","PAGE_SCROLL","WEEK_SCROLL","PROP_UPDATE"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;;AAGA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,aAAa,GAAG;EAC3BC,aAAa,EAAE,cAAc;EAC7BC,WAAW,EAAE,YAAY;EACzBC,SAAS,EAAE,UAAU;EACrBC,SAAS,EAAE,UAAU;EACrBC,WAAW,EAAE,YAAY;EACzBC,WAAW,EAAE,YAAY;EACzBC,WAAW,EAAE;AACf,CAAU;;AAIV;AACA;AACA;AACA;AACA;;AAGA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;;AAEA;AACA;AACA;AACA;;AA+DA;;AAoCA;;AAmBA;;AAEA;;AAmBA","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
import { type ReactElement } from 'react';
|
|
12
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
13
|
+
type Props = {
|
|
14
|
+
scrollY: SharedValue<number>;
|
|
15
|
+
tileHeight: number;
|
|
16
|
+
renderTile: () => ReactElement;
|
|
17
|
+
};
|
|
18
|
+
export declare const AgendaBackdrop: import("react").MemoExoticComponent<({ scrollY, tileHeight, renderTile }: Props) => import("react").JSX.Element>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=AgendaBackdrop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgendaBackdrop.d.ts","sourceRoot":"","sources":["../../../../src/agenda/AgendaBackdrop.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAiB,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEvF,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,YAAY,CAAC;CAChC,CAAC;AA8BF,eAAO,MAAM,cAAc,4EA5BuC,KAAK,iCA4BhB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agenda: one `Animated.ScrollView`, absolute slots over a declared layout,
|
|
3
|
+
* a skeleton backdrop behind it and the stuck header over it.
|
|
4
|
+
*
|
|
5
|
+
* Compat with the react-native-calendars screen's `AgendaList` JSX, plus two things the library
|
|
6
|
+
* only pretended to do: real sticky headers and real pull-to-refresh.
|
|
7
|
+
*/
|
|
8
|
+
import type { AgendaListProps } from '../types';
|
|
9
|
+
declare const AgendaListInner: <T>({ sections, renderItem, renderSectionHeader, itemHeightByType, sectionHeaderHeight, getItemType, keyExtractor, stickySectionHeadersEnabled, refreshing, onRefresh, decelerationRate, backdrop, rowGroundColor, ref, onDragBegin, onSettle, }: AgendaListProps<T>) => import("react").JSX.Element;
|
|
10
|
+
export declare const AgendaList: typeof AgendaListInner;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=AgendaList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgendaList.d.ts","sourceRoot":"","sources":["../../../../src/agenda/AgendaList.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,OAAO,KAAK,EAAE,eAAe,EAA0B,MAAM,UAAU,CAAC;AAgCxE,QAAA,MAAM,eAAe,GAAI,CAAC,EAAG,8OAiB1B,eAAe,CAAC,CAAC,CAAC,gCAuRpB,CAAC;AAEF,eAAO,MAAM,UAAU,EAA4B,OAAO,eAAe,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One row or header, parked at its declared offset.
|
|
3
|
+
*
|
|
4
|
+
* Slots take the row's DATA plus a stable render function, never `children`: a
|
|
5
|
+
* child element is a new object every parent render, so `memo` would never bail
|
|
6
|
+
* out and every window commit would re-render every mounted row (M1: p90 69 ms).
|
|
7
|
+
*
|
|
8
|
+
* `overflow: 'hidden'` is the safety mechanism: a row taller than its declaration
|
|
9
|
+
* is clipped in place instead of shifting every offset below it, and the DEV
|
|
10
|
+
* drift check (`heights.ts`) makes the wrong number loud.
|
|
11
|
+
*/
|
|
12
|
+
import { type ReactElement } from 'react';
|
|
13
|
+
import type { AgendaSection, DateString } from '../types';
|
|
14
|
+
type ItemSlotProps<T> = {
|
|
15
|
+
top: number;
|
|
16
|
+
height: number;
|
|
17
|
+
/** Row type — the drift check's key. */
|
|
18
|
+
type: string;
|
|
19
|
+
item: T;
|
|
20
|
+
index: number;
|
|
21
|
+
section: AgendaSection<T>;
|
|
22
|
+
renderItem: (info: {
|
|
23
|
+
item: T;
|
|
24
|
+
index: number;
|
|
25
|
+
section: AgendaSection<T>;
|
|
26
|
+
}) => ReactElement | null;
|
|
27
|
+
/**
|
|
28
|
+
* Draw nothing: the backdrop shows through. A prop on the same component, never a
|
|
29
|
+
* different component — changing the element type under a key remounts the row.
|
|
30
|
+
*/
|
|
31
|
+
deferred: boolean;
|
|
32
|
+
groundColor?: string;
|
|
33
|
+
};
|
|
34
|
+
declare const AgendaItemSlotInner: <T>({ top, height, type, item, index, section, renderItem, deferred, groundColor, }: ItemSlotProps<T>) => import("react").JSX.Element | null;
|
|
35
|
+
export declare const AgendaItemSlot: typeof AgendaItemSlotInner;
|
|
36
|
+
type HeaderSlotProps = {
|
|
37
|
+
top: number;
|
|
38
|
+
height: number;
|
|
39
|
+
title: DateString;
|
|
40
|
+
renderSectionHeader: (title: DateString) => ReactElement | null;
|
|
41
|
+
groundColor?: string;
|
|
42
|
+
};
|
|
43
|
+
export declare const AgendaHeaderSlot: import("react").MemoExoticComponent<({ top, height, title, renderSectionHeader, groundColor }: HeaderSlotProps) => import("react").JSX.Element>;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=AgendaSlot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgendaSlot.d.ts","sourceRoot":"","sources":["../../../../src/agenda/AgendaSlot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGzD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE1D,KAAK,aAAa,CAAC,CAAC,IAAI;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1B,UAAU,EAAE,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;KAAE,KAAK,YAAY,GAAG,IAAI,CAAC;IACjG;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,mBAAmB,GAAI,CAAC,EAAG,iFAU9B,aAAa,CAAC,CAAC,CAAC,uCAkBlB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAgC,OAAO,mBAAmB,CAAC;AAEtF,KAAK,eAAe,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,CAAC;IAClB,mBAAmB,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,YAAY,GAAG,IAAI,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,iGACgC,eAAe,iCAO3E,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mounted slice of the list, keyed by row.
|
|
3
|
+
*
|
|
4
|
+
* DO NOT RECYCLE. A slot pool was built twice and measured worse on the device
|
|
5
|
+
* (p99 300 → 1000–1550 ms): keyed by row, a row that stays in the window has
|
|
6
|
+
* identical props and `memo` makes it free; a pool hands slots new rows and forces
|
|
7
|
+
* a full prop diff across every card.
|
|
8
|
+
*
|
|
9
|
+
* DO NOT KEEP ROWS MOUNTED "to avoid recreating them". Measured in release on the
|
|
10
|
+
* SM-F415F (2026-09-11): a grow-only window doubled the mounted views and took slow
|
|
11
|
+
* draw frames from ~180 to ~900 per 12 flings (p50 27 → 37 ms); pre-mounting the
|
|
12
|
+
* whole range (5,000 views, +130 MB) put every frame above 60 ms. Every mounted row
|
|
13
|
+
* costs frame time, on screen or not — the window stays tight.
|
|
14
|
+
*
|
|
15
|
+
* Deferral (only with a backdrop): a row ENTERING the window while the list is
|
|
16
|
+
* fast renders nothing and the backdrop shows through; a row already drawn stays
|
|
17
|
+
* drawn. When fast motion ends, deferred rows are released nearest the viewport
|
|
18
|
+
* first — every visible row in one batch, then a batch per frame — as transitions,
|
|
19
|
+
* so a new drag's window commit never waits behind them.
|
|
20
|
+
*/
|
|
21
|
+
import { type ReactElement } from 'react';
|
|
22
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
23
|
+
import type { AgendaSection, DateString } from '../types';
|
|
24
|
+
import type { AgendaLayout } from './buildAgendaLayout';
|
|
25
|
+
type Props<T> = {
|
|
26
|
+
layout: AgendaLayout<T>;
|
|
27
|
+
first: number;
|
|
28
|
+
last: number;
|
|
29
|
+
/** A second slice mounted while a long programmatic jump is pending — its rows exist before the list moves. */
|
|
30
|
+
extraFirst?: number;
|
|
31
|
+
extraLast?: number;
|
|
32
|
+
renderItem: (info: {
|
|
33
|
+
item: T;
|
|
34
|
+
index: number;
|
|
35
|
+
section: AgendaSection<T>;
|
|
36
|
+
}) => ReactElement | null;
|
|
37
|
+
renderSectionHeader: (title: DateString) => ReactElement | null;
|
|
38
|
+
sections: AgendaSection<T>[];
|
|
39
|
+
getItemType: (item: T) => string;
|
|
40
|
+
fastMotion: boolean;
|
|
41
|
+
deferRows: boolean;
|
|
42
|
+
groundColor?: string;
|
|
43
|
+
scrollY: SharedValue<number>;
|
|
44
|
+
viewportSV: SharedValue<number>;
|
|
45
|
+
};
|
|
46
|
+
declare const AgendaWindowInner: <T>({ layout, first, last, extraFirst, extraLast, renderItem, renderSectionHeader, sections, getItemType, fastMotion, deferRows, groundColor, scrollY, viewportSV, }: Props<T>) => import("react").JSX.Element;
|
|
47
|
+
export declare const AgendaWindow: typeof AgendaWindowInner;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=AgendaWindow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgendaWindow.d.ts","sourceRoot":"","sources":["../../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Y,EAA8B,OAAO,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stuck section header: fixed copies drawn over the list.
|
|
3
|
+
*
|
|
4
|
+
* A header INSIDE the ScrollView that sticks by translating itself lags the
|
|
5
|
+
* content by one frame, because the translate comes from a scroll event (M1c:
|
|
6
|
+
* 10–25 dp of drift mid-momentum). A copy outside the ScrollView does not scroll,
|
|
7
|
+
* so it cannot drift; only the ~32 px push-up at a section boundary is event-driven.
|
|
8
|
+
*
|
|
9
|
+
* Copies of the current section and two neighbours each side stay mounted; the UI
|
|
10
|
+
* thread picks the one that shows, so a crossing is covered the frame it happens
|
|
11
|
+
* and React only re-centres the five, at reading speed. While fast every copy hides
|
|
12
|
+
* and the in-list headers scroll past natively — nobody reads a date at that speed,
|
|
13
|
+
* and following it would cost a commit per crossing.
|
|
14
|
+
*
|
|
15
|
+
* Touches: hidden copies are translated off the host (they take none); the shown
|
|
16
|
+
* copy is `box-none`, so its buttons work and a drag anywhere else reaches the list.
|
|
17
|
+
*/
|
|
18
|
+
import { type ReactElement } from 'react';
|
|
19
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
20
|
+
import type { DateString } from '../types';
|
|
21
|
+
import type { AgendaTables } from './useAgendaScrollSync';
|
|
22
|
+
export type StickyInputs = {
|
|
23
|
+
scrollY: SharedValue<number>;
|
|
24
|
+
currentSection: SharedValue<number>;
|
|
25
|
+
fast: SharedValue<number>;
|
|
26
|
+
tablesSV: SharedValue<AgendaTables>;
|
|
27
|
+
};
|
|
28
|
+
type Props = {
|
|
29
|
+
initialSection: number;
|
|
30
|
+
sectionCount: number;
|
|
31
|
+
/** Title of section `s`; identity-stable for the life of the list. */
|
|
32
|
+
titleAt: (s: number) => DateString | undefined;
|
|
33
|
+
height: number;
|
|
34
|
+
sticky: StickyInputs;
|
|
35
|
+
renderSectionHeader: (title: DateString) => ReactElement | null;
|
|
36
|
+
};
|
|
37
|
+
export declare const StickyHeaderOverlay: import("react").MemoExoticComponent<({ initialSection, sectionCount, titleAt, height, sticky, renderSectionHeader, }: Props) => import("react").JSX.Element>;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=StickyHeaderOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StickyHeaderOverlay.d.ts","sourceRoot":"","sources":["../../../../src/agenda/StickyHeaderOverlay.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAiB,EAAyC,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CACrC,CAAC;AA8BF,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;IACrB,mBAAmB,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,YAAY,GAAG,IAAI,CAAC;CACjE,CAAC;AAmDF,eAAO,MAAM,mBAAmB,wHA1C7B,KAAK,iCA0CyD,CAAC"}
|