/** * 日历 (calendar) — the current month, at a glance. * * WHAT IT IS FOR. The rail already carries cards that reason about DAYS (峰谷定价's * holiday table, 用量日历's token heatmap, 额度预测's billing period). This one is * the plain reference they all assume the user has: which day of the week is it, * how many days are left, and which of them are 休息日. It is deliberately the * SHAPE the owner's reference widget has — month caption, weekday header, weeks — * drawn in the product's own type ladder and colours. * * WHICH DAY IS TODAY is the configured ZONE's answer, not the browser's: an * instant at 23:30 UTC is already tomorrow in Beijing, and this product's other * day-aware cards (heatmap, peak pricing) all reason in a configured zone. So the * two are read through the SAME shared function (`lib/clock-face.readClock`), and a * card whose zone is Beijing can never badge a different cell than the pricing * card calls "today". * * THE GRID IS THE WIDGET'S (`buildMonthWeeks`), not the renderer's: the offline * render snapshot (G4) then verifies the actual month layout — 5-row months, * 6-row months, the leading blanks, the today cell — and the renderer stays a * layout-only component that cannot drift from it. * * THE TINT. 'weekend' (the default) needs no table and is true in every country. * 'holiday' uses the SHARED 中国法定节假日 table the pricing cards already read * (`lib/peak-holidays`), which is why a 国庆 week shows as one blue run — and why * the card must say so when the table has no entry for the year being shown * (`card.calendar.holidayStale`): a card that silently tinted nothing would look * like a month with no holidays, which is a different claim. * * THE SCHEDULED TASKS (the 2×2's dots and the 2×4's agenda column). DSH's reminder * subsystem is read through the client Remote face (see `data/schedule.ts`), and * what lands here is: `marks` — the days of the SHOWN month that carry an active * task, dotted in the corner of their cell — and, on the wide card, an agenda * column of the upcoming ones. The two answer different questions on purpose * ("which days this month" vs "what is coming"), so the agenda is NOT restricted to * the month on screen. * * The subsystem is OPTIONAL in a DSH install, so this card owns one degradation * rule: when the face is absent (`status: 'unavailable'`) the calendar draws * NOTHING schedule-shaped — no dots, no column, no sentence — and the wide card * centres its plain month calendar. "No upcoming tasks" (a ready face with an empty * list) is the other, honest state, and it says so in the agenda column. A card that * showed an empty agenda in the first case would be claiming the user has no * reminders, which is not what an absent subsystem means. */ import type { WidgetRenderMeta, WidgetRenderOut, WidgetStats } from '../../client/lib/contract/types'; declare function calendarRender(stats: WidgetStats, meta?: WidgetRenderMeta): WidgetRenderOut; declare const _default: { id: string; name: () => string; desc: () => string; builtin: true; group: string; sizes: ("2x2" | "2x4")[]; render: typeof calendarRender; configSchema: ({ key: string; label: () => string; type: "mode"; default: string; options: [string, () => string][]; } | { key: string; label: () => string; type: "toggle"; default: false; options?: undefined; })[]; example: { stats: { schedule: { status: "ready"; entries: ({ id: string; title: string; at: number; status: "active"; kind: "daily"; time: string; timeZone: string; weekdays?: undefined; everySeconds?: undefined; } | { id: string; title: string; at: number; status: "active"; kind: "weekly"; time: string; weekdays: number[]; timeZone: string; everySeconds?: undefined; } | { id: string; title: string; at: number; status: "active"; kind: "every"; everySeconds: number; time?: undefined; timeZone?: undefined; weekdays?: undefined; } | { id: string; title: string; at: number; status: "inactive"; kind: "at"; time?: undefined; timeZone?: undefined; weekdays?: undefined; everySeconds?: undefined; })[]; }; }; sim: { at: number; tz: string; tint: string; }; simSteps: ({ at: number; tz: string; tint: string; scheduleStatus?: undefined; } | { at: number; tz: string; tint: string; scheduleStatus: string; })[]; }; }; export default _default;