1.0.7 • Published 2 years ago

@ephemeris/core v1.0.7

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

core

Maven Central

The core module of Ephemeris. This provides all generic implementations for platform-specific modules to use, such as page loaders, caching and data types.

Usage

Extending interfaces for custom layouts

CalendarPageSource

CalendarPageSource is an interface that defines how pages are loaded, and what data is loaded on them. CalendarPageSource is called to create instances of CalendarPage.

Currently, the only restrictions on a CalendarPage is that it contains at least one row and at least one date.

For convenience, we've created a CalendarPage DSL to help build your calendar pages. For examples of usages, check out some of the default CalendarPageSource implementations

Platform UI development

There are currently two requirements for platform UI modules.

  1. Implement CalendarState for standardised controls.
  2. Use CalendarPageLoader to load data.

CalendarState

CalendarState defines a common interface for Ephemeris calendar views. It is expected all calendar views contain these functions in some way. For example, Android's EphemerisCalendarView implements CalendarState directly, whereas the EphemerisCalendar Composable takes a class that implements CalendarState.

It is expected these core functions work exactly the same across platforms. Any extra functions exposed from UI libraries are not guaranteed to be consistent.

CalendarPageLoader

CalendarPageLoader is a caching layer around CalendarPageSource. UI implementations should use an instance of CalendarPageLoader to handle loading data, rather than loading from CalendarPageSource directly.

When the CalendarPageSource changes, it is expected to create a new implementation of CalendarPageLoader and discard the old implementation.

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago