Thank you for being patient! We're working hard on resolving the issue
Pure event/task data extraction shared across DOM and CLI. Each
provider takes a Sheet + a date range and emits the event /
task / list items the renderer for that row type expects.
DOM rendering and CLI inspection both want "give me the events this calendar row will display today". Rather than each platform re-implementing the extraction, providers live alongside the rows-side per-type spec catalog and both platforms reach for the same function.
┌─────────────────────┐
│ PerTypeSpec │
│ (id, role, │
│ dataProvider?) │
└───────┬─────────────┘
│
┌──────┴──────┐
▼ ▼
DOM renderer CLI inspector
│ │
└──────┬──────┘
▼
Same calendarListDataProvider(...) call
import {
calendarAllDayDataProvider,
calendarTimedEventsDataProvider,
calendarListDataProvider,
tasksDataProvider,
} from "@tento-lona/sheets";
| Provider | Returns | Used by |
|---|---|---|
calendarAllDayDataProvider | EventItemFullDay[] | timeline[row].event, column.calendar (all-day band) |
calendarTimedEventsDataProvider | EventItemPartialDay[] | timeline[column].event, grid.event, column.calendar (timed band) |
calendarListDataProvider | EventItem[] (sorted, unioned across visible calendars) | column.calendar list mode |
tasksDataProvider | TaskCalendarItem[] | column.task, timeline[row].task, grid.task |
interface CalendarSubcolumnDataProvider {
events(input: {
sheet: Sheet;
row: SheetRow;
range: DateRange;
subcolumns: readonly CalendarSubcolumn[];
}): EventItem[];
}
interface TimelineItemProvider {
items(input: {
sheet: Sheet;
row: SheetRow;
range: DateRange;
}): TimelineItem[];
}
Pure functions — no IO, no async. Inputs come from the rows-side
Sheet + the platform's column/range context.
App code can register custom providers on a PerTypeSpec if a
plugin needs cross-platform data extraction:
import { PerTypeSpec, calendarListDataProvider } from "@tento-lona/sheets";
export const MY_PROVIDER_SPEC: PerTypeSpec = {
id: "my.thing",
role: "renderer",
dataProvider: {
items: ({ sheet, row, range }) => {
// ... extract items from sheet/row state
return [...];
},
},
};
Then both DOM and CLI per-type plugins for my.thing consume it
via spec.dataProvider.
PerTypeSpecbuildScene threads
providers via its providers argument