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,354 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AgendaList = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
|
+
var _reactNativeWorklets = require("react-native-worklets");
|
|
11
|
+
var _index = require("../theme/index.js");
|
|
12
|
+
var _CalendarContext = require("../core/CalendarContext.js");
|
|
13
|
+
var _dateKey = require("../core/dateKey.js");
|
|
14
|
+
var _worklets = require("../core/worklets.js");
|
|
15
|
+
var _AgendaBackdrop = require("./AgendaBackdrop.js");
|
|
16
|
+
var _AgendaWindow = require("./AgendaWindow.js");
|
|
17
|
+
var _buildAgendaLayout = require("./buildAgendaLayout.js");
|
|
18
|
+
var _constants = require("./constants.js");
|
|
19
|
+
var _StickyHeaderOverlay = require("./StickyHeaderOverlay.js");
|
|
20
|
+
var _useAgendaScrollSync = require("./useAgendaScrollSync.js");
|
|
21
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
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); }
|
|
23
|
+
/**
|
|
24
|
+
* The agenda: one `Animated.ScrollView`, absolute slots over a declared layout,
|
|
25
|
+
* a skeleton backdrop behind it and the stuck header over it.
|
|
26
|
+
*
|
|
27
|
+
* Compat with the react-native-calendars screen's `AgendaList` JSX, plus two things the library
|
|
28
|
+
* only pretended to do: real sticky headers and real pull-to-refresh.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
const MY_ORIGIN = 'agenda';
|
|
32
|
+
const EMPTY_TABLES = {
|
|
33
|
+
offsets: [],
|
|
34
|
+
sectionOffset: [],
|
|
35
|
+
sectionStart: [],
|
|
36
|
+
monthOfSection: []
|
|
37
|
+
};
|
|
38
|
+
const defaultGetItemType = item => item?.itemCustomHeightType ?? 'Regular';
|
|
39
|
+
const defaultKeyExtractor = (item, index) => item?.id ?? `row-${index}`;
|
|
40
|
+
|
|
41
|
+
/** Every scroll this list issues goes through here; see `programmaticY` in the sync. */
|
|
42
|
+
const scrollListTo = (ref, programmaticY, moving, y, animated) => {
|
|
43
|
+
'worklet';
|
|
44
|
+
|
|
45
|
+
moving.value = 0;
|
|
46
|
+
programmaticY.value = animated ? y : -1;
|
|
47
|
+
(0, _reactNativeReanimated.scrollTo)(ref, 0, y, animated);
|
|
48
|
+
};
|
|
49
|
+
const AgendaListInner = ({
|
|
50
|
+
sections,
|
|
51
|
+
renderItem,
|
|
52
|
+
renderSectionHeader,
|
|
53
|
+
itemHeightByType,
|
|
54
|
+
sectionHeaderHeight = 32,
|
|
55
|
+
getItemType = defaultGetItemType,
|
|
56
|
+
keyExtractor = defaultKeyExtractor,
|
|
57
|
+
stickySectionHeadersEnabled = false,
|
|
58
|
+
refreshing = false,
|
|
59
|
+
onRefresh,
|
|
60
|
+
decelerationRate = 0.985,
|
|
61
|
+
backdrop,
|
|
62
|
+
rowGroundColor,
|
|
63
|
+
ref,
|
|
64
|
+
onDragBegin,
|
|
65
|
+
onSettle
|
|
66
|
+
}) => {
|
|
67
|
+
const {
|
|
68
|
+
colors
|
|
69
|
+
} = (0, _index.useKitTheme)();
|
|
70
|
+
const {
|
|
71
|
+
range,
|
|
72
|
+
store,
|
|
73
|
+
dateRef,
|
|
74
|
+
setDate,
|
|
75
|
+
commitDate,
|
|
76
|
+
reduceMotion
|
|
77
|
+
} = (0, _CalendarContext.useCalendarContext)();
|
|
78
|
+
const listRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
79
|
+
const headerIntern = (0, _react.useRef)(new Map());
|
|
80
|
+
const heightForType = (0, _react.useCallback)(type => itemHeightByType[type] ?? itemHeightByType.Regular ?? 0, [itemHeightByType]);
|
|
81
|
+
const layout = (0, _react.useMemo)(() => (0, _buildAgendaLayout.buildAgendaLayout)({
|
|
82
|
+
sections,
|
|
83
|
+
sectionHeaderHeight,
|
|
84
|
+
heightForType,
|
|
85
|
+
getItemType,
|
|
86
|
+
keyExtractor,
|
|
87
|
+
headerIntern: headerIntern.current
|
|
88
|
+
}), [sections, sectionHeaderHeight, heightForType, getItemType, keyExtractor]);
|
|
89
|
+
const layoutRef = (0, _react.useRef)(layout);
|
|
90
|
+
layoutRef.current = layout;
|
|
91
|
+
const tablesSV = (0, _reactNativeReanimated.useSharedValue)(EMPTY_TABLES);
|
|
92
|
+
const viewportSV = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
93
|
+
|
|
94
|
+
// Mount at the committed day with zero scroll: `contentOffset` is honoured on
|
|
95
|
+
// the first frame (M0), and the first window already holds its rows.
|
|
96
|
+
const [initialSection] = (0, _react.useState)(() => (0, _dateKey.clampIndex)(range, (0, _dateKey.dayIndexOf)(range, dateRef.current)));
|
|
97
|
+
const [initialOffset] = (0, _react.useState)(() => layout.sectionOffset[initialSection] ?? 0);
|
|
98
|
+
const [contentOffset] = (0, _react.useState)(() => ({
|
|
99
|
+
x: 0,
|
|
100
|
+
y: initialOffset
|
|
101
|
+
}));
|
|
102
|
+
const [windowRange, setWindowRange] = (0, _react.useState)(() => {
|
|
103
|
+
const row = layout.sectionStart[initialSection] ?? 0;
|
|
104
|
+
return {
|
|
105
|
+
first: Math.max(0, row - _constants.BUCKET_REST),
|
|
106
|
+
last: row + 4 * _constants.BUCKET_REST
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
const [fastMotion, setFastMotion] = (0, _react.useState)(false);
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* A long programmatic move lands on rows that are not mounted. The destination
|
|
113
|
+
* slice mounts first, beside the current rows; the jump happens once it exists
|
|
114
|
+
* and the slice is released by the next window update. No skeleton frames.
|
|
115
|
+
*/
|
|
116
|
+
const [jumpRange, setJumpRange] = (0, _react.useState)(null);
|
|
117
|
+
const pendingJumpY = (0, _react.useRef)(null);
|
|
118
|
+
const releaseJump = (0, _react.useRef)(false);
|
|
119
|
+
const onWindowChange = (0, _react.useCallback)((first, last) => {
|
|
120
|
+
setWindowRange(was => was.first === first && was.last === last ? was : {
|
|
121
|
+
first,
|
|
122
|
+
last
|
|
123
|
+
});
|
|
124
|
+
if (releaseJump.current) {
|
|
125
|
+
releaseJump.current = false;
|
|
126
|
+
setJumpRange(null);
|
|
127
|
+
}
|
|
128
|
+
}, []);
|
|
129
|
+
const onCommitDate = (0, _react.useCallback)(idx => commitDate(idx, 'listDrag', MY_ORIGIN), [commitDate]);
|
|
130
|
+
const {
|
|
131
|
+
scrollY,
|
|
132
|
+
currentSection,
|
|
133
|
+
moving,
|
|
134
|
+
fast,
|
|
135
|
+
programmaticY,
|
|
136
|
+
windowFirst,
|
|
137
|
+
windowLast,
|
|
138
|
+
scrollHandler,
|
|
139
|
+
applyOffset
|
|
140
|
+
} = (0, _useAgendaScrollSync.useAgendaScrollSync)({
|
|
141
|
+
tablesSV,
|
|
142
|
+
viewportSV,
|
|
143
|
+
headerHeight: sectionHeaderHeight,
|
|
144
|
+
dayIndex: store.dayIndex,
|
|
145
|
+
listDragSeq: store.listDragSeq,
|
|
146
|
+
onWindowChange,
|
|
147
|
+
onCommitDate,
|
|
148
|
+
onFastChange: setFastMotion,
|
|
149
|
+
onDragBegin,
|
|
150
|
+
onSettle
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Publish the tables; if the content changed under a laid-out list, keep the
|
|
155
|
+
* doctor's day in place — the current section plus how far into it we were —
|
|
156
|
+
* in the same commit that resizes the content.
|
|
157
|
+
*
|
|
158
|
+
* The anchor is computed ON the UI thread, which owns `scrollY` and
|
|
159
|
+
* `currentSection`: read from JS they can predate a queued re-anchor or
|
|
160
|
+
* `onLayout`'s seeding, and a rebuild landing in that gap kept the wrong offset.
|
|
161
|
+
*/
|
|
162
|
+
const prevSectionOffset = (0, _react.useRef)(null);
|
|
163
|
+
(0, _react.useLayoutEffect)(() => {
|
|
164
|
+
const prev = prevSectionOffset.current;
|
|
165
|
+
const next = layout.sectionOffset;
|
|
166
|
+
prevSectionOffset.current = next;
|
|
167
|
+
tablesSV.value = {
|
|
168
|
+
offsets: layout.offsets,
|
|
169
|
+
sectionOffset: layout.sectionOffset,
|
|
170
|
+
sectionStart: layout.sectionStart,
|
|
171
|
+
monthOfSection: layout.monthOfSection
|
|
172
|
+
};
|
|
173
|
+
if (prev === null || prev.length === next.length && prev.every((v, i) => v === next[i])) return;
|
|
174
|
+
(0, _reactNativeWorklets.scheduleOnUI)(() => {
|
|
175
|
+
'worklet';
|
|
176
|
+
|
|
177
|
+
// No viewport yet means no position to keep: `onLayout` anchors on the day.
|
|
178
|
+
if (viewportSV.value === 0) return;
|
|
179
|
+
const s = currentSection.value;
|
|
180
|
+
const from = prev[s];
|
|
181
|
+
const to = next[s];
|
|
182
|
+
if (from === undefined || to === undefined) return;
|
|
183
|
+
const y = to + (scrollY.value - from);
|
|
184
|
+
if (Math.abs(y - scrollY.value) <= 1) return;
|
|
185
|
+
scrollListTo(listRef, programmaticY, moving, y, false);
|
|
186
|
+
// Owned now: the next rebuild may be queued before this scroll's event arrives.
|
|
187
|
+
scrollY.value = y;
|
|
188
|
+
});
|
|
189
|
+
}, [currentSection, layout, listRef, moving, programmaticY, scrollY, tablesSV, viewportSV]);
|
|
190
|
+
const prepareJump = (0, _react.useCallback)(y => {
|
|
191
|
+
const H = viewportSV.value || 800;
|
|
192
|
+
const {
|
|
193
|
+
offsets,
|
|
194
|
+
rows
|
|
195
|
+
} = layoutRef.current;
|
|
196
|
+
pendingJumpY.current = y;
|
|
197
|
+
setJumpRange({
|
|
198
|
+
first: (0, _worklets.bsearchLE)(offsets, y - 0.5 * H) & -_constants.BUCKET_REST,
|
|
199
|
+
last: Math.min(rows.length - 1, (0, _worklets.bsearchLE)(offsets, y + 2 * H) | _constants.BUCKET_REST - 1)
|
|
200
|
+
});
|
|
201
|
+
}, [viewportSV]);
|
|
202
|
+
|
|
203
|
+
// Moves from other surfaces. Our own are ignored: that is the echo-proofing.
|
|
204
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => store.move.value, (m, prev) => {
|
|
205
|
+
if (!prev || m.seq === prev.seq || m.origin === MY_ORIGIN || viewportSV.value === 0) return;
|
|
206
|
+
const {
|
|
207
|
+
offsets,
|
|
208
|
+
sectionOffset
|
|
209
|
+
} = tablesSV.value;
|
|
210
|
+
const y = sectionOffset[m.idx];
|
|
211
|
+
if (y === undefined) return;
|
|
212
|
+
const top = offsets[windowFirst.value] ?? 0;
|
|
213
|
+
const bottom = offsets[windowLast.value + 1] ?? offsets[offsets.length - 1] ?? 0;
|
|
214
|
+
if (y >= top && y + viewportSV.value <= bottom) scrollListTo(listRef, programmaticY, moving, y, m.animated);else (0, _reactNativeWorklets.runOnJS)(prepareJump)(y);
|
|
215
|
+
}, [prepareJump]);
|
|
216
|
+
(0, _react.useLayoutEffect)(() => {
|
|
217
|
+
const y = pendingJumpY.current;
|
|
218
|
+
if (jumpRange === null || y === null) return;
|
|
219
|
+
pendingJumpY.current = null;
|
|
220
|
+
releaseJump.current = true;
|
|
221
|
+
(0, _reactNativeWorklets.scheduleOnUI)(() => {
|
|
222
|
+
'worklet';
|
|
223
|
+
|
|
224
|
+
scrollListTo(listRef, programmaticY, moving, y, false);
|
|
225
|
+
});
|
|
226
|
+
}, [jumpRange, listRef, moving, programmaticY]);
|
|
227
|
+
const scrollToY = (0, _react.useCallback)((y, animated) => {
|
|
228
|
+
const anim = animated && !reduceMotion;
|
|
229
|
+
(0, _reactNativeWorklets.scheduleOnUI)(() => {
|
|
230
|
+
'worklet';
|
|
231
|
+
|
|
232
|
+
if (viewportSV.value > 0) scrollListTo(listRef, programmaticY, moving, y, anim);
|
|
233
|
+
});
|
|
234
|
+
}, [listRef, moving, programmaticY, reduceMotion, viewportSV]);
|
|
235
|
+
(0, _react.useImperativeHandle)(ref, () => ({
|
|
236
|
+
// Dates outside the window are dropped by design: the section list is a
|
|
237
|
+
// pure function of the window and must not grow.
|
|
238
|
+
scrollToDate: (date, animated = true) => {
|
|
239
|
+
const idx = layout.sectionByTitle.get(date);
|
|
240
|
+
if (idx === undefined) return;
|
|
241
|
+
setDate(date, 'propUpdate', MY_ORIGIN, animated);
|
|
242
|
+
scrollToY(layout.sectionOffset[idx], animated);
|
|
243
|
+
},
|
|
244
|
+
scrollToSection: (title, animated = true) => {
|
|
245
|
+
const idx = layout.sectionByTitle.get(title);
|
|
246
|
+
if (idx !== undefined) scrollToY(layout.sectionOffset[idx], animated);
|
|
247
|
+
},
|
|
248
|
+
scrollToOffset: ({
|
|
249
|
+
offset,
|
|
250
|
+
animated = true
|
|
251
|
+
}) => scrollToY(offset, animated)
|
|
252
|
+
}), [layout, scrollToY, setDate]);
|
|
253
|
+
const laidOut = (0, _react.useRef)(false);
|
|
254
|
+
const onLayout = (0, _react.useCallback)(e => {
|
|
255
|
+
viewportSV.value = e.nativeEvent.layout.height;
|
|
256
|
+
if (laidOut.current) return;
|
|
257
|
+
laidOut.current = true;
|
|
258
|
+
const fallback = initialOffset;
|
|
259
|
+
(0, _reactNativeWorklets.scheduleOnUI)(() => {
|
|
260
|
+
'worklet';
|
|
261
|
+
|
|
262
|
+
// Anchor on the committed DAY in the tables as they are now, not on the
|
|
263
|
+
// first render's pixel offset: rows that change between mount and first
|
|
264
|
+
// layout (shimmer → data) move that day, and the re-anchor above cannot
|
|
265
|
+
// act without a viewport. The list opened on the right pixel of the wrong
|
|
266
|
+
// day — 238 px early on the fixture (2026-09-11). Also covers a device
|
|
267
|
+
// that ignores `contentOffset` on mount.
|
|
268
|
+
const target = tablesSV.value.sectionOffset[store.dayIndex.value] ?? fallback;
|
|
269
|
+
if (Math.abs(scrollY.value - target) > 1) scrollListTo(listRef, programmaticY, moving, target, false);
|
|
270
|
+
// No scroll event follows when the native offset already matches.
|
|
271
|
+
scrollY.value = target;
|
|
272
|
+
applyOffset(target, 0);
|
|
273
|
+
});
|
|
274
|
+
}, [applyOffset, initialOffset, listRef, moving, programmaticY, scrollY, store, tablesSV, viewportSV]);
|
|
275
|
+
const refreshControl = (0, _react.useMemo)(() => onRefresh ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
|
|
276
|
+
refreshing: refreshing,
|
|
277
|
+
onRefresh: onRefresh,
|
|
278
|
+
tintColor: colors.accent,
|
|
279
|
+
colors: [colors.accent],
|
|
280
|
+
progressBackgroundColor: colors.surface
|
|
281
|
+
}) : undefined, [colors.accent, colors.surface, onRefresh, refreshing]);
|
|
282
|
+
const contentStyle = (0, _react.useMemo)(() => ({
|
|
283
|
+
height: layout.totalHeight
|
|
284
|
+
}), [layout.totalHeight]);
|
|
285
|
+
const sticky = (0, _react.useMemo)(() => ({
|
|
286
|
+
scrollY,
|
|
287
|
+
currentSection,
|
|
288
|
+
fast,
|
|
289
|
+
tablesSV
|
|
290
|
+
}), [currentSection, fast, scrollY, tablesSV]);
|
|
291
|
+
const titleAt = (0, _react.useCallback)(s => {
|
|
292
|
+
const {
|
|
293
|
+
rows,
|
|
294
|
+
sectionStart
|
|
295
|
+
} = layoutRef.current;
|
|
296
|
+
const row = rows[sectionStart[s]];
|
|
297
|
+
return row?.kind === 'header' ? row.title : undefined;
|
|
298
|
+
}, []);
|
|
299
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
300
|
+
style: styles.host,
|
|
301
|
+
children: [backdrop ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AgendaBackdrop.AgendaBackdrop, {
|
|
302
|
+
scrollY: scrollY,
|
|
303
|
+
tileHeight: backdrop.tileHeight,
|
|
304
|
+
renderTile: backdrop.renderTile
|
|
305
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.ScrollView, {
|
|
306
|
+
ref: listRef,
|
|
307
|
+
onLayout: onLayout,
|
|
308
|
+
onScroll: scrollHandler,
|
|
309
|
+
scrollEventThrottle: 16,
|
|
310
|
+
contentOffset: contentOffset,
|
|
311
|
+
decelerationRate: decelerationRate,
|
|
312
|
+
refreshControl: refreshControl,
|
|
313
|
+
removeClippedSubviews: true,
|
|
314
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
315
|
+
style: contentStyle,
|
|
316
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AgendaWindow.AgendaWindow, {
|
|
317
|
+
layout: layout,
|
|
318
|
+
first: windowRange.first,
|
|
319
|
+
last: windowRange.last,
|
|
320
|
+
extraFirst: jumpRange?.first,
|
|
321
|
+
extraLast: jumpRange?.last,
|
|
322
|
+
renderItem: renderItem,
|
|
323
|
+
renderSectionHeader: renderSectionHeader,
|
|
324
|
+
sections: sections,
|
|
325
|
+
getItemType: getItemType,
|
|
326
|
+
fastMotion: fastMotion,
|
|
327
|
+
deferRows: backdrop !== undefined,
|
|
328
|
+
groundColor: rowGroundColor,
|
|
329
|
+
scrollY: scrollY,
|
|
330
|
+
viewportSV: viewportSV
|
|
331
|
+
})
|
|
332
|
+
})
|
|
333
|
+
}), stickySectionHeadersEnabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_StickyHeaderOverlay.StickyHeaderOverlay, {
|
|
334
|
+
initialSection: initialSection,
|
|
335
|
+
sectionCount: sections.length,
|
|
336
|
+
titleAt: titleAt,
|
|
337
|
+
height: sectionHeaderHeight,
|
|
338
|
+
sticky: sticky,
|
|
339
|
+
renderSectionHeader: renderSectionHeader
|
|
340
|
+
}) : null]
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
const AgendaList = exports.AgendaList = /*#__PURE__*/(0, _react.memo)(AgendaListInner);
|
|
344
|
+
const styles = _reactNative.StyleSheet.create({
|
|
345
|
+
// Clips at the list's own top edge. The sticky overlay's push-up translates its
|
|
346
|
+
// host — clip and all — out of the list, and the calendar sits right above: an
|
|
347
|
+
// unclipped host drew the outgoing header over the calendar's knob at every day
|
|
348
|
+
// crossing, so the knob and its gap flickered (2026-09-11).
|
|
349
|
+
host: {
|
|
350
|
+
flex: 1,
|
|
351
|
+
overflow: 'hidden'
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
//# sourceMappingURL=AgendaList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_reactNativeWorklets","_index","_CalendarContext","_dateKey","_worklets","_AgendaBackdrop","_AgendaWindow","_buildAgendaLayout","_constants","_StickyHeaderOverlay","_useAgendaScrollSync","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MY_ORIGIN","EMPTY_TABLES","offsets","sectionOffset","sectionStart","monthOfSection","defaultGetItemType","item","itemCustomHeightType","defaultKeyExtractor","index","id","scrollListTo","ref","programmaticY","moving","y","animated","value","scrollTo","AgendaListInner","sections","renderItem","renderSectionHeader","itemHeightByType","sectionHeaderHeight","getItemType","keyExtractor","stickySectionHeadersEnabled","refreshing","onRefresh","decelerationRate","backdrop","rowGroundColor","onDragBegin","onSettle","colors","useKitTheme","range","store","dateRef","setDate","commitDate","reduceMotion","useCalendarContext","listRef","useAnimatedRef","headerIntern","useRef","Map","heightForType","useCallback","type","Regular","layout","useMemo","buildAgendaLayout","current","layoutRef","tablesSV","useSharedValue","viewportSV","initialSection","useState","clampIndex","dayIndexOf","initialOffset","contentOffset","x","windowRange","setWindowRange","row","first","Math","max","BUCKET_REST","last","fastMotion","setFastMotion","jumpRange","setJumpRange","pendingJumpY","releaseJump","onWindowChange","was","onCommitDate","idx","scrollY","currentSection","fast","windowFirst","windowLast","scrollHandler","applyOffset","useAgendaScrollSync","headerHeight","dayIndex","listDragSeq","onFastChange","prevSectionOffset","useLayoutEffect","prev","next","length","every","v","scheduleOnUI","s","from","to","undefined","abs","prepareJump","H","rows","bsearchLE","min","useAnimatedReaction","move","m","seq","origin","top","bottom","runOnJS","scrollToY","anim","useImperativeHandle","scrollToDate","date","sectionByTitle","scrollToSection","title","scrollToOffset","offset","laidOut","onLayout","nativeEvent","height","fallback","target","refreshControl","jsx","RefreshControl","tintColor","accent","progressBackgroundColor","surface","contentStyle","totalHeight","sticky","titleAt","kind","jsxs","View","style","styles","host","children","AgendaBackdrop","tileHeight","renderTile","ScrollView","onScroll","scrollEventThrottle","removeClippedSubviews","AgendaWindow","extraFirst","extraLast","deferRows","groundColor","StickyHeaderOverlay","sectionCount","AgendaList","exports","memo","StyleSheet","create","flex","overflow"],"sourceRoot":"../../../src","sources":["agenda/AgendaList.tsx"],"mappings":";;;;;;AAQA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAQA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAEA,IAAAS,eAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AACA,IAAAa,oBAAA,GAAAb,OAAA;AACA,IAAAc,oBAAA,GAAAd,OAAA;AAA+E,IAAAe,WAAA,GAAAf,OAAA;AAAA,SAAAG,wBAAAa,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAf,uBAAA,YAAAA,CAAAa,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,CA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gendaItemSlot = exports.AgendaHeaderSlot = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _heights = require("./heights.js");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
/**
|
|
12
|
+
* One row or header, parked at its declared offset.
|
|
13
|
+
*
|
|
14
|
+
* Slots take the row's DATA plus a stable render function, never `children`: a
|
|
15
|
+
* child element is a new object every parent render, so `memo` would never bail
|
|
16
|
+
* out and every window commit would re-render every mounted row (M1: p90 69 ms).
|
|
17
|
+
*
|
|
18
|
+
* `overflow: 'hidden'` is the safety mechanism: a row taller than its declaration
|
|
19
|
+
* is clipped in place instead of shifting every offset below it, and the DEV
|
|
20
|
+
* drift check (`heights.ts`) makes the wrong number loud.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const AgendaItemSlotInner = ({
|
|
24
|
+
top,
|
|
25
|
+
height,
|
|
26
|
+
type,
|
|
27
|
+
item,
|
|
28
|
+
index,
|
|
29
|
+
section,
|
|
30
|
+
renderItem,
|
|
31
|
+
deferred,
|
|
32
|
+
groundColor
|
|
33
|
+
}) => {
|
|
34
|
+
const style = (0, _react.useMemo)(() => [styles.slot, {
|
|
35
|
+
top,
|
|
36
|
+
height,
|
|
37
|
+
backgroundColor: deferred ? undefined : groundColor
|
|
38
|
+
}], [deferred, groundColor, height, top]);
|
|
39
|
+
if (deferred) return null;
|
|
40
|
+
const content = renderItem({
|
|
41
|
+
item,
|
|
42
|
+
index,
|
|
43
|
+
section
|
|
44
|
+
});
|
|
45
|
+
if (__DEV__ && (0, _heights.needsMeasure)(type, height)) {
|
|
46
|
+
// Measure the CHILD: the slot is `height` by construction.
|
|
47
|
+
const onLayout = e => (0, _heights.reportHeight)(type, height, e.nativeEvent.layout.height);
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
49
|
+
style: style,
|
|
50
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
51
|
+
onLayout: onLayout,
|
|
52
|
+
children: content
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
57
|
+
style: style,
|
|
58
|
+
children: content
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
const AgendaItemSlot = exports.AgendaItemSlot = /*#__PURE__*/(0, _react.memo)(AgendaItemSlotInner);
|
|
62
|
+
const AgendaHeaderSlot = exports.AgendaHeaderSlot = /*#__PURE__*/(0, _react.memo)(({
|
|
63
|
+
top,
|
|
64
|
+
height,
|
|
65
|
+
title,
|
|
66
|
+
renderSectionHeader,
|
|
67
|
+
groundColor
|
|
68
|
+
}) => {
|
|
69
|
+
const style = (0, _react.useMemo)(() => [styles.slot, {
|
|
70
|
+
top,
|
|
71
|
+
height,
|
|
72
|
+
backgroundColor: groundColor
|
|
73
|
+
}], [groundColor, height, top]);
|
|
74
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
75
|
+
style: style,
|
|
76
|
+
children: renderSectionHeader(title)
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
AgendaHeaderSlot.displayName = 'AgendaHeaderSlot';
|
|
80
|
+
const styles = _reactNative.StyleSheet.create({
|
|
81
|
+
slot: {
|
|
82
|
+
position: 'absolute',
|
|
83
|
+
left: 0,
|
|
84
|
+
right: 0,
|
|
85
|
+
overflow: 'hidden'
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
//# sourceMappingURL=AgendaSlot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_heights","_jsxRuntime","AgendaItemSlotInner","top","height","type","item","index","section","renderItem","deferred","groundColor","style","useMemo","styles","slot","backgroundColor","undefined","content","__DEV__","needsMeasure","onLayout","e","reportHeight","nativeEvent","layout","jsx","View","children","AgendaItemSlot","exports","memo","AgendaHeaderSlot","title","renderSectionHeader","displayName","StyleSheet","create","position","left","right","overflow"],"sourceRoot":"../../../src","sources":["agenda/AgendaSlot.tsx"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAAuD,IAAAG,WAAA,GAAAH,OAAA;AAdvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA,MAAMI,mBAAmB,GAAGA,CAAK;EAC/BC,GAAG;EACHC,MAAM;EACNC,IAAI;EACJC,IAAI;EACJC,KAAK;EACLC,OAAO;EACPC,UAAU;EACVC,QAAQ;EACRC;AACgB,CAAC,KAAK;EACtB,MAAMC,KAAK,GAAG,IAAAC,cAAO,EACnB,MAAM,CAACC,MAAM,CAACC,IAAI,EAAE;IAAEZ,GAAG;IAAEC,MAAM;IAAEY,eAAe,EAAEN,QAAQ,GAAGO,SAAS,GAAGN;EAAY,CAAC,CAAC,EACzF,CAACD,QAAQ,EAAEC,WAAW,EAAEP,MAAM,EAAED,GAAG,CACrC,CAAC;EACD,IAAIO,QAAQ,EAAE,OAAO,IAAI;EAEzB,MAAMQ,OAAO,GAAGT,UAAU,CAAC;IAAEH,IAAI;IAAEC,KAAK;IAAEC;EAAQ,CAAC,CAAC;EACpD,IAAIW,OAAO,IAAI,IAAAC,qBAAY,EAACf,IAAI,EAAED,MAAM,CAAC,EAAE;IACzC;IACA,MAAMiB,QAAQ,GAAIC,CAAoB,IAAK,IAAAC,qBAAY,EAAClB,IAAI,EAAED,MAAM,EAAEkB,CAAC,CAACE,WAAW,CAACC,MAAM,CAACrB,MAAM,CAAC;IAClG,oBACE,IAAAH,WAAA,CAAAyB,GAAA,EAAC3B,YAAA,CAAA4B,IAAI;MAACf,KAAK,EAAEA,KAAM;MAAAgB,QAAA,eACjB,IAAA3B,WAAA,CAAAyB,GAAA,EAAC3B,YAAA,CAAA4B,IAAI;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|
5
|
+
});
|
|
6
|
+
exports.AgendaWindow = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _worklets = require("../core/worklets.js");
|
|
9
|
+
var _AgendaSlot = require("./AgendaSlot.js");
|
|
10
|
+
var _constants = require("./constants.js");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
/**
|
|
13
|
+
* The mounted slice of the list, keyed by row.
|
|
14
|
+
*
|
|
15
|
+
* DO NOT RECYCLE. A slot pool was built twice and measured worse on the device
|
|
16
|
+
* (p99 300 → 1000–1550 ms): keyed by row, a row that stays in the window has
|
|
17
|
+
* identical props and `memo` makes it free; a pool hands slots new rows and forces
|
|
18
|
+
* a full prop diff across every card.
|
|
19
|
+
*
|
|
20
|
+
* DO NOT KEEP ROWS MOUNTED "to avoid recreating them". Measured in release on the
|
|
21
|
+
* SM-F415F (2026-09-11): a grow-only window doubled the mounted views and took slow
|
|
22
|
+
* draw frames from ~180 to ~900 per 12 flings (p50 27 → 37 ms); pre-mounting the
|
|
23
|
+
* whole range (5,000 views, +130 MB) put every frame above 60 ms. Every mounted row
|
|
24
|
+
* costs frame time, on screen or not — the window stays tight.
|
|
25
|
+
*
|
|
26
|
+
* Deferral (only with a backdrop): a row ENTERING the window while the list is
|
|
27
|
+
* fast renders nothing and the backdrop shows through; a row already drawn stays
|
|
28
|
+
* drawn. When fast motion ends, deferred rows are released nearest the viewport
|
|
29
|
+
* first — every visible row in one batch, then a batch per frame — as transitions,
|
|
30
|
+
* so a new drag's window commit never waits behind them.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
const NO_KEYS = new Set();
|
|
34
|
+
const AgendaWindowInner = ({
|
|
35
|
+
layout,
|
|
36
|
+
first,
|
|
37
|
+
last,
|
|
38
|
+
extraFirst,
|
|
39
|
+
extraLast,
|
|
40
|
+
renderItem,
|
|
41
|
+
renderSectionHeader,
|
|
42
|
+
sections,
|
|
43
|
+
getItemType,
|
|
44
|
+
fastMotion,
|
|
45
|
+
deferRows,
|
|
46
|
+
groundColor,
|
|
47
|
+
scrollY,
|
|
48
|
+
viewportSV
|
|
49
|
+
}) => {
|
|
50
|
+
const {
|
|
51
|
+
rows,
|
|
52
|
+
offsets,
|
|
53
|
+
heights
|
|
54
|
+
} = layout;
|
|
55
|
+
const start = Math.max(0, first);
|
|
56
|
+
const end = Math.min(last, rows.length - 1);
|
|
57
|
+
|
|
58
|
+
/** Rows deferred in the last commit, and the window that commit drew. */
|
|
59
|
+
const heldRef = (0, _react.useRef)(NO_KEYS);
|
|
60
|
+
const drawnRef = (0, _react.useRef)({
|
|
61
|
+
layout,
|
|
62
|
+
start: 0,
|
|
63
|
+
end: -1
|
|
64
|
+
});
|
|
65
|
+
const [released, setReleased] = (0, _react.useState)(NO_KEYS);
|
|
66
|
+
const prev = drawnRef.current;
|
|
67
|
+
const sameLayout = prev.layout === layout;
|
|
68
|
+
const held = heldRef.current;
|
|
69
|
+
let nextHeld = null;
|
|
70
|
+
const slots = [];
|
|
71
|
+
const pushRow = i => {
|
|
72
|
+
const row = rows[i];
|
|
73
|
+
if (row.kind === 'header') {
|
|
74
|
+
slots.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AgendaSlot.AgendaHeaderSlot, {
|
|
75
|
+
top: offsets[i]
|
|
76
|
+
// The layout's pixel-snapped height, not the declared constant: with the
|
|
77
|
+
// constant, a header ending a fraction short of the next row's top left a
|
|
78
|
+
// hairline of backdrop between them.
|
|
79
|
+
,
|
|
80
|
+
height: heights[i],
|
|
81
|
+
title: row.title,
|
|
82
|
+
renderSectionHeader: renderSectionHeader,
|
|
83
|
+
groundColor: groundColor
|
|
84
|
+
}, row.key));
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
let deferred = false;
|
|
88
|
+
if (deferRows) {
|
|
89
|
+
deferred = held.has(row.key) ? fastMotion || !released.has(row.key) : fastMotion && !(sameLayout && i >= prev.start && i <= prev.end);
|
|
90
|
+
if (deferred) (nextHeld ??= new Set()).add(row.key);
|
|
91
|
+
}
|
|
92
|
+
slots.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AgendaSlot.AgendaItemSlot, {
|
|
93
|
+
top: offsets[i],
|
|
94
|
+
height: heights[i],
|
|
95
|
+
type: getItemType(row.item),
|
|
96
|
+
item: row.item,
|
|
97
|
+
index: row.indexInSection,
|
|
98
|
+
section: sections[row.section],
|
|
99
|
+
renderItem: renderItem,
|
|
100
|
+
deferred: deferred,
|
|
101
|
+
groundColor: groundColor
|
|
102
|
+
}, row.key));
|
|
103
|
+
};
|
|
104
|
+
for (let i = start; i <= end; i += 1) pushRow(i);
|
|
105
|
+
if (extraFirst !== undefined && extraLast !== undefined) {
|
|
106
|
+
const xEnd = Math.min(extraLast, rows.length - 1);
|
|
107
|
+
for (let i = Math.max(0, extraFirst); i <= xEnd; i += 1) {
|
|
108
|
+
if (i < start || i > end) pushRow(i);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
const heldNow = nextHeld ?? NO_KEYS;
|
|
112
|
+
// Committed in a layout effect, so a render React discards cannot leave the
|
|
113
|
+
// refs describing rows that never mounted.
|
|
114
|
+
(0, _react.useLayoutEffect)(() => {
|
|
115
|
+
heldRef.current = heldNow;
|
|
116
|
+
drawnRef.current = {
|
|
117
|
+
layout,
|
|
118
|
+
start,
|
|
119
|
+
end
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
const hasHeld = heldNow.size > 0;
|
|
123
|
+
(0, _react.useEffect)(() => {
|
|
124
|
+
if (fastMotion || !hasHeld) return;
|
|
125
|
+
const {
|
|
126
|
+
layout: l,
|
|
127
|
+
start: s,
|
|
128
|
+
end: e
|
|
129
|
+
} = drawnRef.current;
|
|
130
|
+
const y = scrollY.value;
|
|
131
|
+
const top = (0, _worklets.bsearchLE)(l.offsets, y);
|
|
132
|
+
const bottom = (0, _worklets.bsearchLE)(l.offsets, y + viewportSV.value);
|
|
133
|
+
const focus = top + bottom >> 1;
|
|
134
|
+
|
|
135
|
+
// Sorted ONCE; each frame then only pops a batch.
|
|
136
|
+
const queue = [];
|
|
137
|
+
const distance = [];
|
|
138
|
+
let visible = 0;
|
|
139
|
+
for (let i = s; i <= e; i += 1) {
|
|
140
|
+
const row = l.rows[i];
|
|
141
|
+
if (row.kind !== 'item' || !heldRef.current.has(row.key)) continue;
|
|
142
|
+
queue.push(row.key);
|
|
143
|
+
distance.push(Math.abs(i - focus));
|
|
144
|
+
if (i >= top && i <= bottom) visible += 1;
|
|
145
|
+
}
|
|
146
|
+
const order = queue.map((_, k) => k).sort((a, b) => distance[a] - distance[b]);
|
|
147
|
+
let cursor = 0;
|
|
148
|
+
let frame = 0;
|
|
149
|
+
const releaseNext = () => {
|
|
150
|
+
const n = cursor === 0 ? Math.max(_constants.UPGRADE_BATCH, visible) : _constants.UPGRADE_BATCH;
|
|
151
|
+
const batch = order.slice(cursor, cursor + n).map(k => queue[k]);
|
|
152
|
+
const isFirst = cursor === 0;
|
|
153
|
+
cursor += n;
|
|
154
|
+
(0, _react.startTransition)(() => {
|
|
155
|
+
setReleased(was => {
|
|
156
|
+
const next = new Set(isFirst ? NO_KEYS : was);
|
|
157
|
+
for (const key of batch) next.add(key);
|
|
158
|
+
return next;
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
if (cursor < order.length) frame = requestAnimationFrame(releaseNext);
|
|
162
|
+
};
|
|
163
|
+
frame = requestAnimationFrame(releaseNext);
|
|
164
|
+
return () => cancelAnimationFrame(frame);
|
|
165
|
+
}, [fastMotion, hasHeld, scrollY, viewportSV]);
|
|
166
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
167
|
+
children: slots
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
const AgendaWindow = exports.AgendaWindow = /*#__PURE__*/(0, _react.memo)(AgendaWindowInner);
|
|
171
|
+
//# sourceMappingURL=AgendaWindow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_worklets","_AgendaSlot","_constants","_jsxRuntime","NO_KEYS","Set","AgendaWindowInner","layout","first","last","extraFirst","extraLast","renderItem","renderSectionHeader","sections","getItemType","fastMotion","deferRows","groundColor","scrollY","viewportSV","rows","offsets","heights","start","Math","max","end","min","length","heldRef","useRef","drawnRef","released","setReleased","useState","prev","current","sameLayout","held","nextHeld","slots","pushRow","i","row","kind","push","jsx","AgendaHeaderSlot","top","height","title","key","deferred","has","add","AgendaItemSlot","type","item","index","indexInSection","section","undefined","xEnd","heldNow","useLayoutEffect","hasHeld","size","useEffect","l","s","e","y","value","bsearchLE","bottom","focus","queue","distance","visible","abs","order","map","_","k","sort","a","b","cursor","frame","releaseNext","n","UPGRADE_BATCH","batch","slice","isFirst","startTransition","was","next","requestAnimationFrame","cancelAnimationFrame","Fragment","children","AgendaWindow","exports","memo"],"sourceRoot":"../../../src","sources":["agenda/AgendaWindow.tsx"],"mappings":";;;;;;AAqBA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAA4C,IAAAI,WAAA,GAAAJ,OAAA;AA3B5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,MAAMK,OAA4B,GAAG,IAAIC,GAAG,CAAC,CAAC;AAoB9C,MAAMC,iBAAiB,GAAGA,CAAK;EAC7BC,MAAM;EACNC,KAAK;EACLC,IAAI;EACJC,UAAU;EACVC,SAAS;EACTC,UAAU;EACVC,mBAAmB;EACnBC,QAAQ;EACRC,WAAW;EACXC,UAAU;EACVC,SAAS;EACTC,WAAW;EACXC,OAAO;EACPC;AACQ,CAAC,KAAK;EACd,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC;EAAQ,CAAC,GAAGhB,MAAM;EACzC,MAAMiB,KAAK,GAAGC,IAAI,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