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,245 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Day columns, paged horizontally across the SELECTABLE days (the range is padded to whole weeks;
|
|
5
|
+
* a swipe must not land on padding). Column `i` sits at `(i − minIndex) · width`; only the centre
|
|
6
|
+
* and its neighbours are mounted. Content stacking is the library's: bands → lines → events.
|
|
7
|
+
*
|
|
8
|
+
* The doctor's swipe commits at MOMENTUM END as `origin: 'timeline'`, which this pager ignores.
|
|
9
|
+
* Any other move animates to a mounted neighbour, or mounts the destination first (keeping the
|
|
10
|
+
* current columns), jumps once it exists, and releases the old columns on the first scroll there.
|
|
11
|
+
*
|
|
12
|
+
* `contentOffset` is read once: the native ScrollView re-applies it whenever its value changes, so
|
|
13
|
+
* a width-derived offset per render would throw the pager back to the day it opened on.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
17
|
+
import { StyleSheet, View } from 'react-native';
|
|
18
|
+
import Animated, { scrollTo, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated';
|
|
19
|
+
import { runOnJS, scheduleOnUI } from 'react-native-worklets';
|
|
20
|
+
import { useCalendarContext } from "../core/CalendarContext.js";
|
|
21
|
+
import { clampIndex, dayIndexOf, ymdAt } from "../core/dateKey.js";
|
|
22
|
+
import { DayBands, DayEvents } from "./DayColumn.js";
|
|
23
|
+
import { ColumnLines } from "./GridLines.js";
|
|
24
|
+
import { NowKnob, useNowMinutesSV } from "./NowIndicator.js";
|
|
25
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
26
|
+
const offsetOfIndex = (idx, minIndex, width) => {
|
|
27
|
+
'worklet';
|
|
28
|
+
|
|
29
|
+
return (idx - minIndex) * width;
|
|
30
|
+
};
|
|
31
|
+
const indexAtOffset = (x, minIndex, width) => {
|
|
32
|
+
'worklet';
|
|
33
|
+
|
|
34
|
+
return minIndex + Math.round(x / width);
|
|
35
|
+
};
|
|
36
|
+
const DayPagerInner = ({
|
|
37
|
+
left,
|
|
38
|
+
width,
|
|
39
|
+
height,
|
|
40
|
+
events,
|
|
41
|
+
availableHoursFor,
|
|
42
|
+
bandColor,
|
|
43
|
+
hourHeight,
|
|
44
|
+
overlapEventsSpacing,
|
|
45
|
+
rightEdgeSpacing,
|
|
46
|
+
renderEvent,
|
|
47
|
+
onEventPress,
|
|
48
|
+
showNowIndicator
|
|
49
|
+
}) => {
|
|
50
|
+
const {
|
|
51
|
+
range,
|
|
52
|
+
store,
|
|
53
|
+
dateRef,
|
|
54
|
+
commitDate
|
|
55
|
+
} = useCalendarContext();
|
|
56
|
+
const listRef = useAnimatedRef();
|
|
57
|
+
|
|
58
|
+
// Plain numbers for the worklets: a captured `range` would be frozen in dev.
|
|
59
|
+
const {
|
|
60
|
+
minIndex,
|
|
61
|
+
maxIndex,
|
|
62
|
+
todayIndex
|
|
63
|
+
} = range;
|
|
64
|
+
const pageCount = maxIndex - minIndex + 1;
|
|
65
|
+
const todayPage = todayIndex >= minIndex && todayIndex <= maxIndex ? todayIndex - minIndex : -1;
|
|
66
|
+
const showNow = showNowIndicator && todayPage >= 0;
|
|
67
|
+
const nowMinutes = useNowMinutesSV(showNow);
|
|
68
|
+
const [initialCenter] = useState(() => clampIndex(range, dayIndexOf(range, dateRef.current)));
|
|
69
|
+
const [initialOffset] = useState(() => ({
|
|
70
|
+
x: offsetOfIndex(initialCenter, minIndex, width),
|
|
71
|
+
y: 0
|
|
72
|
+
}));
|
|
73
|
+
const [center, setCenter] = useState(initialCenter);
|
|
74
|
+
const [jumpFrom, setJumpFrom] = useState(null);
|
|
75
|
+
const pendingX = useRef(null);
|
|
76
|
+
const centerSV = useSharedValue(initialCenter);
|
|
77
|
+
const widthSV = useSharedValue(width);
|
|
78
|
+
const scrollX = useSharedValue(initialOffset.x);
|
|
79
|
+
const userDriven = useSharedValue(0);
|
|
80
|
+
const ready = useSharedValue(0);
|
|
81
|
+
const releaseAtX = useSharedValue(-1);
|
|
82
|
+
|
|
83
|
+
// Every column just moved: land back on the day that was showing.
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
scheduleOnUI(() => {
|
|
86
|
+
'worklet';
|
|
87
|
+
|
|
88
|
+
if (widthSV.value === width) return;
|
|
89
|
+
widthSV.value = width;
|
|
90
|
+
const x = offsetOfIndex(centerSV.value, minIndex, width);
|
|
91
|
+
scrollX.value = x;
|
|
92
|
+
scrollTo(listRef, x, 0, false);
|
|
93
|
+
});
|
|
94
|
+
}, [centerSV, listRef, minIndex, scrollX, width, widthSV]);
|
|
95
|
+
|
|
96
|
+
/** The doctor's swipe settled on a new day. */
|
|
97
|
+
const onSwipeSettled = useCallback(idx => {
|
|
98
|
+
setCenter(idx);
|
|
99
|
+
commitDate(idx, 'listDrag', 'timeline');
|
|
100
|
+
}, [commitDate]);
|
|
101
|
+
const prepareJump = useCallback((idx, x) => {
|
|
102
|
+
pendingX.current = x;
|
|
103
|
+
setJumpFrom(centerSV.value);
|
|
104
|
+
setCenter(idx);
|
|
105
|
+
}, [centerSV]);
|
|
106
|
+
const releaseJump = useCallback(() => setJumpFrom(null), []);
|
|
107
|
+
|
|
108
|
+
// The destination columns are committed: land on them.
|
|
109
|
+
useLayoutEffect(() => {
|
|
110
|
+
const x = pendingX.current;
|
|
111
|
+
if (x === null) return;
|
|
112
|
+
pendingX.current = null;
|
|
113
|
+
centerSV.value = center;
|
|
114
|
+
scheduleOnUI(() => {
|
|
115
|
+
'worklet';
|
|
116
|
+
|
|
117
|
+
releaseAtX.value = x;
|
|
118
|
+
userDriven.value = 0;
|
|
119
|
+
scrollX.value = x;
|
|
120
|
+
scrollTo(listRef, x, 0, false);
|
|
121
|
+
});
|
|
122
|
+
}, [center, centerSV, listRef, releaseAtX, scrollX, userDriven]);
|
|
123
|
+
useAnimatedReaction(() => store.move.value, (m, prev) => {
|
|
124
|
+
if (!prev || m.seq === prev.seq || m.origin === 'timeline') return;
|
|
125
|
+
if (ready.value === 0) return;
|
|
126
|
+
const idx = m.idx < minIndex ? minIndex : m.idx > maxIndex ? maxIndex : m.idx;
|
|
127
|
+
const x = offsetOfIndex(idx, minIndex, widthSV.value);
|
|
128
|
+
userDriven.value = 0;
|
|
129
|
+
if (Math.abs(idx - centerSV.value) <= 1) {
|
|
130
|
+
scrollTo(listRef, x, 0, m.animated);
|
|
131
|
+
if (idx !== centerSV.value) {
|
|
132
|
+
centerSV.value = idx;
|
|
133
|
+
runOnJS(setCenter)(idx);
|
|
134
|
+
}
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
runOnJS(prepareJump)(idx, x);
|
|
138
|
+
});
|
|
139
|
+
const onScroll = useAnimatedScrollHandler({
|
|
140
|
+
onScroll: e => {
|
|
141
|
+
scrollX.value = e.contentOffset.x;
|
|
142
|
+
if (releaseAtX.value >= 0 && Math.abs(e.contentOffset.x - releaseAtX.value) < 1) {
|
|
143
|
+
releaseAtX.value = -1;
|
|
144
|
+
runOnJS(releaseJump)();
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
onBeginDrag: () => {
|
|
148
|
+
userDriven.value = 1;
|
|
149
|
+
},
|
|
150
|
+
onMomentumEnd: e => {
|
|
151
|
+
const idx = indexAtOffset(e.contentOffset.x, minIndex, widthSV.value);
|
|
152
|
+
const wasUser = userDriven.value === 1;
|
|
153
|
+
userDriven.value = 0;
|
|
154
|
+
if (!wasUser || idx === centerSV.value) return;
|
|
155
|
+
// This pager owns the position while the doctor swipes it, so it writes
|
|
156
|
+
// the UI-thread date itself; `commitDate` deliberately does not.
|
|
157
|
+
store.dayIndex.value = idx;
|
|
158
|
+
centerSV.value = idx;
|
|
159
|
+
runOnJS(onSwipeSettled)(idx);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
const onLayout = useCallback(() => {
|
|
163
|
+
ready.value = 1;
|
|
164
|
+
}, [ready]);
|
|
165
|
+
const layers = useMemo(() => {
|
|
166
|
+
const bands = [];
|
|
167
|
+
const dayEvents = [];
|
|
168
|
+
const lo = jumpFrom === null || center <= jumpFrom ? center : jumpFrom;
|
|
169
|
+
const hi = jumpFrom === null || center >= jumpFrom ? center : jumpFrom;
|
|
170
|
+
let last = minIndex - 1;
|
|
171
|
+
// Two ascending 3-day windows; starting past `last` skips the days they share.
|
|
172
|
+
for (let pass = 0; pass < 2; pass += 1) {
|
|
173
|
+
const c = pass === 0 ? lo : hi;
|
|
174
|
+
for (let i = Math.max(c - 1, last + 1); i <= c + 1 && i <= maxIndex; i += 1) {
|
|
175
|
+
last = i;
|
|
176
|
+
const ymd = ymdAt(range, i);
|
|
177
|
+
const colLeft = offsetOfIndex(i, minIndex, width);
|
|
178
|
+
bands.push(/*#__PURE__*/_jsx(DayBands, {
|
|
179
|
+
left: colLeft,
|
|
180
|
+
width: width,
|
|
181
|
+
availableHours: availableHoursFor(ymd),
|
|
182
|
+
color: bandColor,
|
|
183
|
+
hourHeight: hourHeight
|
|
184
|
+
}, ymd));
|
|
185
|
+
dayEvents.push(/*#__PURE__*/_jsx(DayEvents, {
|
|
186
|
+
left: colLeft,
|
|
187
|
+
width: width,
|
|
188
|
+
events: events[ymd],
|
|
189
|
+
hourHeight: hourHeight,
|
|
190
|
+
overlapEventsSpacing: overlapEventsSpacing,
|
|
191
|
+
rightEdgeSpacing: rightEdgeSpacing,
|
|
192
|
+
renderEvent: renderEvent,
|
|
193
|
+
onEventPress: onEventPress,
|
|
194
|
+
nowMinutes: showNow && i === todayIndex ? nowMinutes : undefined
|
|
195
|
+
}, ymd));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
bands,
|
|
200
|
+
dayEvents
|
|
201
|
+
};
|
|
202
|
+
}, [availableHoursFor, bandColor, center, events, hourHeight, jumpFrom, maxIndex, minIndex, nowMinutes, onEventPress, overlapEventsSpacing, range, renderEvent, rightEdgeSpacing, showNow, todayIndex, width]);
|
|
203
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
204
|
+
children: [/*#__PURE__*/_jsx(Animated.ScrollView, {
|
|
205
|
+
ref: listRef,
|
|
206
|
+
horizontal: true,
|
|
207
|
+
pagingEnabled: true,
|
|
208
|
+
nestedScrollEnabled: true,
|
|
209
|
+
showsHorizontalScrollIndicator: false,
|
|
210
|
+
onScroll: onScroll,
|
|
211
|
+
scrollEventThrottle: 16,
|
|
212
|
+
contentOffset: initialOffset,
|
|
213
|
+
onLayout: onLayout,
|
|
214
|
+
style: [styles.pager, {
|
|
215
|
+
left,
|
|
216
|
+
width,
|
|
217
|
+
height
|
|
218
|
+
}],
|
|
219
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
220
|
+
style: {
|
|
221
|
+
width: pageCount * width,
|
|
222
|
+
height
|
|
223
|
+
},
|
|
224
|
+
children: [layers.bands, /*#__PURE__*/_jsx(ColumnLines, {
|
|
225
|
+
hourHeight: hourHeight
|
|
226
|
+
}), layers.dayEvents]
|
|
227
|
+
})
|
|
228
|
+
}), showNow ? /*#__PURE__*/_jsx(NowKnob, {
|
|
229
|
+
left: left,
|
|
230
|
+
hourHeight: hourHeight,
|
|
231
|
+
minutes: nowMinutes,
|
|
232
|
+
page: todayPage,
|
|
233
|
+
pageWidth: widthSV,
|
|
234
|
+
scrollX: scrollX
|
|
235
|
+
}) : null]
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
export const DayPager = /*#__PURE__*/memo(DayPagerInner);
|
|
239
|
+
const styles = StyleSheet.create({
|
|
240
|
+
pager: {
|
|
241
|
+
position: 'absolute',
|
|
242
|
+
top: 0
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
//# sourceMappingURL=DayPager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useCallback","useEffect","useLayoutEffect","useMemo","useRef","useState","StyleSheet","View","Animated","scrollTo","useAnimatedReaction","useAnimatedRef","useAnimatedScrollHandler","useSharedValue","runOnJS","scheduleOnUI","useCalendarContext","clampIndex","dayIndexOf","ymdAt","DayBands","DayEvents","ColumnLines","NowKnob","useNowMinutesSV","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","offsetOfIndex","idx","minIndex","width","indexAtOffset","x","Math","round","DayPagerInner","left","height","events","availableHoursFor","bandColor","hourHeight","overlapEventsSpacing","rightEdgeSpacing","renderEvent","onEventPress","showNowIndicator","range","store","dateRef","commitDate","listRef","maxIndex","todayIndex","pageCount","todayPage","showNow","nowMinutes","initialCenter","current","initialOffset","y","center","setCenter","jumpFrom","setJumpFrom","pendingX","centerSV","widthSV","scrollX","userDriven","ready","releaseAtX","value","onSwipeSettled","prepareJump","releaseJump","move","m","prev","seq","origin","abs","animated","onScroll","e","contentOffset","onBeginDrag","onMomentumEnd","wasUser","dayIndex","onLayout","layers","bands","dayEvents","lo","hi","last","pass","c","i","max","ymd","colLeft","push","availableHours","color","undefined","children","ScrollView","ref","horizontal","pagingEnabled","nestedScrollEnabled","showsHorizontalScrollIndicator","scrollEventThrottle","style","styles","pager","minutes","page","pageWidth","DayPager","create","position","top"],"sourceRoot":"../../../src","sources":["timeline/DayPager.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,IAAI,EACJC,WAAW,EACXC,SAAS,EACTC,eAAe,EACfC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAEH,OAAO;AACd,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,QAAQ,IACbC,QAAQ,EACRC,mBAAmB,EACnBC,cAAc,EACdC,wBAAwB,EACxBC,cAAc,QACT,yBAAyB;AAChC,SAASC,OAAO,EAAEC,YAAY,QAAQ,uBAAuB;AAC7D,SAASC,kBAAkB,QAAQ,4BAAyB;AAC5D,SAASC,UAAU,EAAEC,UAAU,EAAEC,KAAK,QAAQ,oBAAiB;AAE/D,SAASC,QAAQ,EAAEC,SAAS,QAAQ,gBAAa;AACjD,SAASC,WAAW,QAAQ,gBAAa;AACzC,SAASC,OAAO,EAAEC,eAAe,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAE1D,MAAMC,aAAa,GAAGA,CAACC,GAAW,EAAEC,QAAgB,EAAEC,KAAa,KAAa;EAC9E,SAAS;;EACT,OAAO,CAACF,GAAG,GAAGC,QAAQ,IAAIC,KAAK;AACjC,CAAC;AAED,MAAMC,aAAa,GAAGA,CAACC,CAAS,EAAEH,QAAgB,EAAEC,KAAa,KAAa;EAC5E,SAAS;;EACT,OAAOD,QAAQ,GAAGI,IAAI,CAACC,KAAK,CAACF,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VC,aAAa;MACbC,mBAAmB;MACnBC,8BAA8B,EAAE,KAAM;MACtC9B,QAAQ,EAAEA,QAAS;MACnB+B,mBAAmB,EAAE,EAAG;MACxB7B,aAAa,EAAE1B,aAAc;MAC7B+B,QAAQ,EAAEA,QAAS;MACnByB,KAAK,EAAE,CAACC,MAAM,CAACC,KAAK,EAAE;QAAElF,IAAI;QAAEN,KAAK;QAAEO;MAAO,CAAC,CAAE;MAAAuE,QAAA,eAE/CpF,KAAA,CAACrB,IAAI;QAACiH,KAAK,EAAE;UAAEtF,KAAK,EAAEwB,SAAS,GAAGxB,KAAK;UAAEO;QAAO,CAAE;QAAAuE,QAAA,GAC/ChB,MAAM,CAACC,KAAK,eACbvE,IAAA,CAACJ,WAAW;UAACuB,UAAU,EAAEA;QAAW,CAAE,CAAC,EACtCmD,MAAM,CAACE,SAAS;MAAA,CACb;IAAC,CACY,CAAC,EACrBtC,OAAO,gBACNlC,IAAA,CAACH,OAAO;MACNiB,IAAI,EAAEA,IAAK;MACXK,UAAU,EAAEA,UAAW;MACvB8E,OAAO,EAAE9D,UAAW;MACpB+D,IAAI,EAAEjE,SAAU;MAChBkE,SAAS,EAAErD,OAAQ;MACnBC,OAAO,EAAEA;IAAQ,CAClB,CAAC,GACA,IAAI;EAAA,CACR,CAAC;AAEP,CAAC;AAED,OAAO,MAAMqD,QAAQ,gBAAG/H,IAAI,CAACwC,aAAa,CAAyB;AAEnE,MAAMkF,MAAM,GAAGnH,UAAU,CAACyH,MAAM,CAAC;EAC/BL,KAAK,EAAE;IAAEM,QAAQ,EAAE,UAAU;IAAEC,GAAG,EAAE;EAAE;AACxC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One packed event: the library's `EventBlock` container (absolute, `minHeight: 25`, padding 4/5,
|
|
5
|
+
* 0.9 opacity when pressed) around the caller's `renderEvent`. The fill is the event's own colour,
|
|
6
|
+
* else the soft accent token; the hairline ring gives a pastel block an edge on the dark palette
|
|
7
|
+
*.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { useKitStyles } from "../theme/index.js";
|
|
11
|
+
import { FONT_SIZE, RADIUS } from "../theme/tokens.js";
|
|
12
|
+
import { memo, useCallback, useMemo } from 'react';
|
|
13
|
+
import { Pressable, StyleSheet } from 'react-native';
|
|
14
|
+
import { KitText } from "../core/KitText.js";
|
|
15
|
+
import { EVENT_MIN_HEIGHT } from "./timelineGeometry.js";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
const EventBlockInner = ({
|
|
18
|
+
event,
|
|
19
|
+
renderEvent,
|
|
20
|
+
onPress
|
|
21
|
+
}) => {
|
|
22
|
+
const styles = useKitStyles(makeStyles);
|
|
23
|
+
const handlePress = useCallback(() => onPress?.(event), [event, onPress]);
|
|
24
|
+
const {
|
|
25
|
+
color,
|
|
26
|
+
left,
|
|
27
|
+
top,
|
|
28
|
+
width,
|
|
29
|
+
height
|
|
30
|
+
} = event;
|
|
31
|
+
const blockStyle = useMemo(() => {
|
|
32
|
+
const rest = [styles.block, color ? {
|
|
33
|
+
backgroundColor: color
|
|
34
|
+
} : styles.blockDefault, {
|
|
35
|
+
left,
|
|
36
|
+
top,
|
|
37
|
+
width,
|
|
38
|
+
height
|
|
39
|
+
}];
|
|
40
|
+
const pressed = [rest, styles.pressed];
|
|
41
|
+
return {
|
|
42
|
+
rest,
|
|
43
|
+
pressed
|
|
44
|
+
};
|
|
45
|
+
}, [color, height, left, styles, top, width]);
|
|
46
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
47
|
+
onPress: handlePress,
|
|
48
|
+
style: ({
|
|
49
|
+
pressed
|
|
50
|
+
}) => pressed ? blockStyle.pressed : blockStyle.rest,
|
|
51
|
+
children: renderEvent ? renderEvent(event) : /*#__PURE__*/_jsx(KitText, {
|
|
52
|
+
style: styles.title,
|
|
53
|
+
numberOfLines: 1,
|
|
54
|
+
children: event.title
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
export const EventBlock = /*#__PURE__*/memo(EventBlockInner);
|
|
59
|
+
const makeStyles = ({
|
|
60
|
+
colors,
|
|
61
|
+
fonts
|
|
62
|
+
}) => StyleSheet.create({
|
|
63
|
+
block: {
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
minHeight: EVENT_MIN_HEIGHT,
|
|
66
|
+
paddingLeft: 4,
|
|
67
|
+
paddingTop: 5,
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
alignItems: 'flex-start',
|
|
70
|
+
overflow: 'hidden',
|
|
71
|
+
borderRadius: RADIUS.inner,
|
|
72
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
73
|
+
borderColor: colors.border
|
|
74
|
+
},
|
|
75
|
+
blockDefault: {
|
|
76
|
+
backgroundColor: colors.accentSoft
|
|
77
|
+
},
|
|
78
|
+
pressed: {
|
|
79
|
+
opacity: 0.9
|
|
80
|
+
},
|
|
81
|
+
title: {
|
|
82
|
+
fontFamily: fonts.semiBold,
|
|
83
|
+
fontSize: FONT_SIZE.xs,
|
|
84
|
+
color: colors.text
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=EventBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useKitStyles","FONT_SIZE","RADIUS","memo","useCallback","useMemo","Pressable","StyleSheet","KitText","EVENT_MIN_HEIGHT","jsx","_jsx","EventBlockInner","event","renderEvent","onPress","styles","makeStyles","handlePress","color","left","top","width","height","blockStyle","rest","block","backgroundColor","blockDefault","pressed","style","children","title","numberOfLines","EventBlock","colors","fonts","create","position","minHeight","paddingLeft","paddingTop","flexDirection","alignItems","overflow","borderRadius","inner","borderWidth","hairlineWidth","borderColor","border","accentSoft","opacity","fontFamily","semiBold","fontSize","xs","text"],"sourceRoot":"../../../src","sources":["timeline/EventBlock.tsx"],"mappings":";;AAA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;IAAQ,CAAC,KAAMA,OAAO,GAAGL,UAAU,CAACK,OAAO,GAAGL,UAAU,CAACC,IAAM;IAAAM,QAAA,EAExEjB,WAAW,GACVA,WAAW,CAACD,KAAK,CAAC,gBAElBF,IAAA,CAACH,OAAO;MAACsB,KAAK,EAAEd,MAAM,CAACgB,KAAM;MAACC,aAAa,EAAE,CAAE;MAAAF,QAAA,EAC5ClB,KAAK,CAACmB;IAAK,CACL;EACV,CACQ,CAAC;AAEhB,CAAC;AAED,OAAO,MAAME,UAAU,gBAAG/B,IAAI,CAACS,eAAe,CAA2B;AAEzE,MAAMK,UAAU,GAAGA,CAAC;EAAEkB,MAAM;EAAEC;AAAoB,CAAC,KACjD7B,UAAU,CAAC8B,MAAM,CAAC;EAChBX,KAAK,EAAE;IACLY,QAAQ,EAAE,UAAU;IACpBC,SAAS,EAAE9B,gBAAgB;IAC3B+B,WAAW,EAAE,CAAC;IACdC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE,QAAQ;IACvBC,UAAU,EAAE,YAAY;IACxBC,QAAQ,EAAE,QAAQ;IAClBC,YAAY,EAAE3C,MAAM,CAAC4C,KAAK;IAC1BC,WAAW,EAAExC,UAAU,CAACyC,aAAa;IACrCC,WAAW,EAAEd,MAAM,CAACe;EACtB,CAAC;EACDtB,YAAY,EAAE;IAAED,eAAe,EAAEQ,MAAM,CAACgB;EAAW,CAAC;EACpDtB,OAAO,EAAE;IAAEuB,OAAO,EAAE;EAAI,CAAC;EACzBpB,KAAK,EAAE;IACLqB,UAAU,EAAEjB,KAAK,CAACkB,QAAQ;IAC1BC,QAAQ,EAAEtD,SAAS,CAACuD,EAAE;IACtBrC,KAAK,EAAEgB,MAAM,CAACsB;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** The half-hour and hour lines: ONE layer across the pager's whole content, between bands and events. */
|
|
4
|
+
|
|
5
|
+
import { useKitStyles } from "../theme/index.js";
|
|
6
|
+
import { memo, useMemo } from 'react';
|
|
7
|
+
import { StyleSheet, View } from 'react-native';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const ColumnLinesInner = ({
|
|
10
|
+
hourHeight
|
|
11
|
+
}) => {
|
|
12
|
+
const styles = useKitStyles(makeStyles);
|
|
13
|
+
const lines = useMemo(() => {
|
|
14
|
+
const out = [];
|
|
15
|
+
for (let half = 1; half <= 48; half += 1) {
|
|
16
|
+
out.push(/*#__PURE__*/_jsx(View, {
|
|
17
|
+
style: [styles.line, {
|
|
18
|
+
top: hourHeight * half / 2
|
|
19
|
+
}]
|
|
20
|
+
}, half));
|
|
21
|
+
}
|
|
22
|
+
return out;
|
|
23
|
+
}, [hourHeight, styles.line]);
|
|
24
|
+
return /*#__PURE__*/_jsx(View, {
|
|
25
|
+
pointerEvents: "none",
|
|
26
|
+
style: StyleSheet.absoluteFill,
|
|
27
|
+
children: lines
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export const ColumnLines = /*#__PURE__*/memo(ColumnLinesInner);
|
|
31
|
+
ColumnLines.displayName = 'ColumnLines';
|
|
32
|
+
const makeStyles = ({
|
|
33
|
+
colors
|
|
34
|
+
}) => StyleSheet.create({
|
|
35
|
+
line: {
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
left: 0,
|
|
38
|
+
right: 0,
|
|
39
|
+
height: 1,
|
|
40
|
+
backgroundColor: colors.border
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=GridLines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useKitStyles","memo","useMemo","StyleSheet","View","jsx","_jsx","ColumnLinesInner","hourHeight","styles","makeStyles","lines","out","half","push","style","line","top","pointerEvents","absoluteFill","children","ColumnLines","displayName","colors","create","position","left","right","height","backgroundColor","border"],"sourceRoot":"../../../src","sources":["timeline/GridLines.tsx"],"mappings":";;AAAA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","ignoreList":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The time gutter: hour labels, the gutter's edge, and each line's 16 px stub into the gutter
|
|
5
|
+
* (`TimelineHours.js` starts lines at `timelineLeftInset − 16`). The stubs stay here because the
|
|
6
|
+
* pager starts at `GUTTER` and clips, so its shared line layer cannot reach into the gutter.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useKitStyles } from "../theme/index.js";
|
|
10
|
+
import { Fragment, memo, useMemo } from 'react';
|
|
11
|
+
import { StyleSheet, View } from 'react-native';
|
|
12
|
+
import { KitText } from "../core/KitText.js";
|
|
13
|
+
import { CONTENT_BOTTOM_PAD, GUTTER, LABEL_OFFSET_Y, LABEL_PADDING_LEFT, LINE_GUTTER_OVERHANG, gridHeight } from "./timelineGeometry.js";
|
|
14
|
+
|
|
15
|
+
/** `TimelineHours.js`: no label at 0, "23:59" at 24, no zero padding. */
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
const hourLabel = (i, format24h) => {
|
|
18
|
+
if (i < 12) return format24h ? `${i}:00` : `${i} AM`;
|
|
19
|
+
if (i === 12) return format24h ? `${i}:00` : `${i} PM`;
|
|
20
|
+
if (i === 24) return format24h ? '23:59' : '12 AM';
|
|
21
|
+
return format24h ? `${i}:00` : `${i - 12} PM`;
|
|
22
|
+
};
|
|
23
|
+
const HourGridInner = ({
|
|
24
|
+
hourHeight,
|
|
25
|
+
format24h
|
|
26
|
+
}) => {
|
|
27
|
+
const styles = useKitStyles(makeStyles);
|
|
28
|
+
const nodes = useMemo(() => {
|
|
29
|
+
const out = [];
|
|
30
|
+
for (let i = 0; i < 24; i += 1) {
|
|
31
|
+
const hourTop = hourHeight * (i + 1);
|
|
32
|
+
out.push(/*#__PURE__*/_jsxs(Fragment, {
|
|
33
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
34
|
+
style: [styles.stub, {
|
|
35
|
+
top: hourHeight * (i + 0.5)
|
|
36
|
+
}]
|
|
37
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
38
|
+
style: [styles.stub, {
|
|
39
|
+
top: hourTop
|
|
40
|
+
}]
|
|
41
|
+
}), /*#__PURE__*/_jsx(KitText, {
|
|
42
|
+
style: [styles.label, {
|
|
43
|
+
top: hourTop + LABEL_OFFSET_Y
|
|
44
|
+
}],
|
|
45
|
+
children: hourLabel(i + 1, format24h)
|
|
46
|
+
})]
|
|
47
|
+
}, i));
|
|
48
|
+
}
|
|
49
|
+
out.push(/*#__PURE__*/_jsx(View, {
|
|
50
|
+
style: [styles.edge, {
|
|
51
|
+
height: gridHeight(hourHeight) + CONTENT_BOTTOM_PAD
|
|
52
|
+
}]
|
|
53
|
+
}, "edge"));
|
|
54
|
+
return out;
|
|
55
|
+
}, [format24h, hourHeight, styles.edge, styles.label, styles.stub]);
|
|
56
|
+
return /*#__PURE__*/_jsx(View, {
|
|
57
|
+
pointerEvents: "none",
|
|
58
|
+
style: StyleSheet.absoluteFill,
|
|
59
|
+
children: nodes
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
export const HourGrid = /*#__PURE__*/memo(HourGridInner);
|
|
63
|
+
HourGrid.displayName = 'HourGrid';
|
|
64
|
+
const makeStyles = ({
|
|
65
|
+
colors,
|
|
66
|
+
fonts
|
|
67
|
+
}) => StyleSheet.create({
|
|
68
|
+
label: {
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
left: 0,
|
|
71
|
+
width: GUTTER - LINE_GUTTER_OVERHANG,
|
|
72
|
+
paddingLeft: LABEL_PADDING_LEFT,
|
|
73
|
+
textAlign: 'center',
|
|
74
|
+
fontFamily: fonts.medium,
|
|
75
|
+
fontSize: 10,
|
|
76
|
+
color: colors.textMuted
|
|
77
|
+
},
|
|
78
|
+
stub: {
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
left: GUTTER - LINE_GUTTER_OVERHANG,
|
|
81
|
+
width: LINE_GUTTER_OVERHANG,
|
|
82
|
+
height: 1,
|
|
83
|
+
backgroundColor: colors.border
|
|
84
|
+
},
|
|
85
|
+
// The last gutter pixel (`TimelineHours.js`: `right: width`); at `GUTTER` the bands painted over it.
|
|
86
|
+
edge: {
|
|
87
|
+
position: 'absolute',
|
|
88
|
+
top: 0,
|
|
89
|
+
left: GUTTER - 1,
|
|
90
|
+
width: 1,
|
|
91
|
+
backgroundColor: colors.border
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=HourGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useKitStyles","Fragment","memo","useMemo","StyleSheet","View","KitText","CONTENT_BOTTOM_PAD","GUTTER","LABEL_OFFSET_Y","LABEL_PADDING_LEFT","LINE_GUTTER_OVERHANG","gridHeight","jsx","_jsx","jsxs","_jsxs","hourLabel","i","format24h","HourGridInner","hourHeight","styles","makeStyles","nodes","out","hourTop","push","children","style","stub","top","label","edge","height","pointerEvents","absoluteFill","HourGrid","displayName","colors","fonts","create","position","left","width","paddingLeft","textAlign","fontFamily","medium","fontSize","color","textMuted","backgroundColor","border"],"sourceRoot":"../../../src","sources":["timeline/HourGrid.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAA2B,mBAAU;AAC1D,SAASC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,QAA2B,OAAO;AAClE,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,oBAAiB;AACzC,SACEC,kBAAkB,EAClBC,MAAM,EACNC,cAAc,EACdC,kBAAkB,EAClBC,oBAAoB,EACpBC,UAAU,QACL,uBAAoB;;AAE3B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,SAAS,GAAGA,CAACC,CAAS,EAAEC,SAAkB,KAAa;EAC3D,IAAID,CAAC,GAAG,EA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,CAACc;EAC1B,CAAC;EACD;EACApB,IAAI,EAAE;IACJS,QAAQ,EAAE,UAAU;IACpBX,GAAG,EAAE,CAAC;IACNY,IAAI,EAAEnC,MAAM,GAAG,CAAC;IAChBoC,KAAK,EAAE,CAAC;IACRQ,eAAe,EAAEb,MAAM,CAACc;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The now-line. The minute lives in a SharedValue re-read just past each minute boundary (a bare
|
|
5
|
+
* 60 s interval started mid-minute runs late for the life of the screen) and on foreground; the
|
|
6
|
+
* line and knob move through animated styles, so a tick is zero React commits. No spring: a line
|
|
7
|
+
* that overshoots claims a time that is not now. The pager clips at the gutter, so `NowKnob` draws
|
|
8
|
+
* the whole dot above it at rest and hides mid-swipe — a worklet-driven knob trails by a frame.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { useKitStyles } from "../theme/index.js";
|
|
12
|
+
import { RADIUS } from "../theme/tokens.js";
|
|
13
|
+
import { memo, useEffect } from 'react';
|
|
14
|
+
import { AppState, StyleSheet, View } from 'react-native';
|
|
15
|
+
import Animated, { useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
|
|
16
|
+
import { NOW_KNOB } from "./timelineGeometry.js";
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
const KNOB_HANG = Math.floor(NOW_KNOB / 2);
|
|
19
|
+
const SHOWN = {
|
|
20
|
+
opacity: 1
|
|
21
|
+
};
|
|
22
|
+
const HIDDEN = {
|
|
23
|
+
opacity: 0
|
|
24
|
+
};
|
|
25
|
+
const minutesAt = d => d.getHours() * 60 + d.getMinutes();
|
|
26
|
+
|
|
27
|
+
/** Minutes since local midnight, shared by the line and the knob. Disabled means no timer. */
|
|
28
|
+
export const useNowMinutesSV = enabled => {
|
|
29
|
+
const minutes = useSharedValue(minutesAt(new Date()));
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!enabled) return;
|
|
32
|
+
let timer;
|
|
33
|
+
const tick = () => {
|
|
34
|
+
const now = new Date();
|
|
35
|
+
minutes.value = minutesAt(now);
|
|
36
|
+
// 50 ms past the boundary so the re-read lands in the new minute.
|
|
37
|
+
timer = setTimeout(tick, (60 - now.getSeconds()) * 1000 - now.getMilliseconds() + 50);
|
|
38
|
+
};
|
|
39
|
+
tick();
|
|
40
|
+
const sub = AppState.addEventListener('change', state => {
|
|
41
|
+
if (state !== 'active') return;
|
|
42
|
+
clearTimeout(timer);
|
|
43
|
+
tick();
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
clearTimeout(timer);
|
|
47
|
+
sub.remove();
|
|
48
|
+
};
|
|
49
|
+
}, [enabled, minutes]);
|
|
50
|
+
return minutes;
|
|
51
|
+
};
|
|
52
|
+
const NowIndicatorInner = ({
|
|
53
|
+
hourHeight,
|
|
54
|
+
minutes
|
|
55
|
+
}) => {
|
|
56
|
+
const styles = useKitStyles(makeStyles);
|
|
57
|
+
const position = useAnimatedStyle(() => ({
|
|
58
|
+
top: minutes.value / 60 * hourHeight
|
|
59
|
+
}));
|
|
60
|
+
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
61
|
+
pointerEvents: "none",
|
|
62
|
+
style: [styles.root, position],
|
|
63
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
64
|
+
style: styles.line
|
|
65
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
66
|
+
style: styles.knob
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
export const NowIndicator = /*#__PURE__*/memo(NowIndicatorInner);
|
|
71
|
+
NowIndicator.displayName = 'NowIndicator';
|
|
72
|
+
const NowKnobInner = ({
|
|
73
|
+
left,
|
|
74
|
+
hourHeight,
|
|
75
|
+
minutes,
|
|
76
|
+
page,
|
|
77
|
+
pageWidth,
|
|
78
|
+
scrollX
|
|
79
|
+
}) => {
|
|
80
|
+
const styles = useKitStyles(makeStyles);
|
|
81
|
+
const position = useAnimatedStyle(() => ({
|
|
82
|
+
top: minutes.value / 60 * hourHeight - KNOB_HANG
|
|
83
|
+
}));
|
|
84
|
+
// Runs every scroll frame: return the constants by reference, never a fresh object.
|
|
85
|
+
const atRest = useAnimatedStyle(() => {
|
|
86
|
+
const dx = page * pageWidth.value - scrollX.value;
|
|
87
|
+
return dx > -1 && dx < 1 ? SHOWN : HIDDEN;
|
|
88
|
+
});
|
|
89
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
90
|
+
pointerEvents: "none",
|
|
91
|
+
style: [styles.knob, {
|
|
92
|
+
left: left - KNOB_HANG
|
|
93
|
+
}, position, atRest]
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
export const NowKnob = /*#__PURE__*/memo(NowKnobInner);
|
|
97
|
+
NowKnob.displayName = 'NowKnob';
|
|
98
|
+
const makeStyles = ({
|
|
99
|
+
colors
|
|
100
|
+
}) => StyleSheet.create({
|
|
101
|
+
root: {
|
|
102
|
+
position: 'absolute',
|
|
103
|
+
left: 0,
|
|
104
|
+
right: 0,
|
|
105
|
+
height: 0
|
|
106
|
+
},
|
|
107
|
+
// The now-line carries information (this minute), so a status colour may appear.
|
|
108
|
+
line: {
|
|
109
|
+
position: 'absolute',
|
|
110
|
+
left: 0,
|
|
111
|
+
right: 0,
|
|
112
|
+
top: 0,
|
|
113
|
+
height: 1,
|
|
114
|
+
backgroundColor: colors.nowIndicator
|
|
115
|
+
},
|
|
116
|
+
knob: {
|
|
117
|
+
position: 'absolute',
|
|
118
|
+
left: -KNOB_HANG,
|
|
119
|
+
top: -KNOB_HANG,
|
|
120
|
+
width: NOW_KNOB,
|
|
121
|
+
height: NOW_KNOB,
|
|
122
|
+
borderRadius: RADIUS.full,
|
|
123
|
+
backgroundColor: colors.nowIndicator
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=NowIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useKitStyles","RADIUS","memo","useEffect","AppState","StyleSheet","View","Animated","useAnimatedStyle","useSharedValue","NOW_KNOB","jsx","_jsx","jsxs","_jsxs","KNOB_HANG","Math","floor","SHOWN","opacity","HIDDEN","minutesAt","d","getHours","getMinutes","useNowMinutesSV","enabled","minutes","Date","timer","tick","now","value","setTimeout","getSeconds","getMilliseconds","sub","addEventListener","state","clearTimeout","remove","NowIndicatorInner","hourHeight","styles","makeStyles","position","top","pointerEvents","style","root","children","line","knob","NowIndicator","displayName","NowKnobInner","left","page","pageWidth","scrollX","atRest","dx","NowKnob","colors","create","right","height","backgroundColor","nowIndicator","width","borderRadius","full"],"sourceRoot":"../../../src","sources":["timeline/NowIndicator.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAA2B,mBAAU;AAC1D,SAASC,MAAM,QAAQ,oBAAiB;AACxC,SAASC,IAAI,EAAEC,SAAS,QAAQ,OAAO;AACvC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzD,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,cAAc,QAET,yBAAyB;AAChC,SAASC,QAAQ,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9C,MAAMC,SAAS,GAAGC,IAAI,CAACC,KAAK,CAACP,QAAQ,GAAG,CAAC,CAAC;AAC1C,MAAMQ,KAAK,GAAG;EAAEC,OAAO,EAAE;AAAE,CAAC;AAC5B,MAAMC,MAAM,GAAG;EAAED,OAAO,EAAE;AAAE,CAAC;AAE7B,MAAME,SAAS,GAAIC,CAAO,IAAKA,CAAC,CAACC,QAAQ,CAAC,CAAC,GAAG,EAAE,GAAGD,CAAC,CAACE,UAAU,CAAC,CAAC;;AAEjE;AACA,OAAO,MAAMC,eAAe,GAAIC,OAAgB,IAA0B;EAC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