Commit Graph

7 Commits

Author SHA1 Message Date
45ca3243fe core-locale: locale-aware date formatting (currentLocale, localizedDateFormatter)
Both functions lived in Calendula's ui/common/LocaleSupport.kt. Neither is
calendar-specific — "lay this date out the way this language writes dates" is
family plumbing — so they move here, where Agendula can reach them too.

localizedDateFormatter(locale, skeleton) takes a field list ("LLLLy", "dMMMy")
and lets the locale arrange it, which is the only way to render a date correctly
in a language you didn't hand-write a template for. Dropping a field from the
skeleton drops it from the output, so callers ask for "no year" by omitting it
rather than post-processing a longer pattern.

currentLocale() reads the display locale from LocalConfiguration. This module's
own AppLanguage.apply() changes the language inside a running process, so a
locale captured once goes stale; keying on the configuration makes the UI follow
the switch.

core-locale gains Compose (runtime + ui only) for currentLocale(). Its build file
previously declared itself Compose-free, but the alternative — parking the hook
in a Compose module that depends back on this one — splits one concern across two
modules to honour a comment. core-crash is the precedent for a core-* module
carrying Compose.

Leaves core-time's Instant.formatDate() family alone despite the overlap: it is
unused by Calendula but visible to Agendula, so reconciling it is that app's
call, not a drive-by here. Noted in the changelog.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 09:47:36 +02:00
2e47271904 docs: multi-value reminders + new components; drop stray README conflict marker
Record core-reminders (multi-value) and the new components in CHANGELOG,
README module table and the ROADMAP extracted list; clarify that only the
reminder *scheduler* stays app-local. Also removes a leftover '>>>>>>> origin/main'
merge-conflict marker committed in README by an earlier merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 21:11:25 +02:00
86f44805d1 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	README.md
2026-06-28 19:20:30 +02:00
4eb9809993 core-locale: shared per-app language plumbing (AppLanguage)
Android-library module, drawn from the byte-identical AppLanguage in Agendula
and Calendula: read the shipped languages from res/xml/locales_config.xml,
get/set the applied language via AppCompatDelegate, and render each language's
autonym. The locales_config resource id is now a parameter, so the module is
app-agnostic. appcompat only, no Compose.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:12:16 +02:00
367a8ff8af core-reminders: shared reminder-lead plumbing (ReminderUnit, override model + codec)
Pure-Kotlin module, drawn from the duplicate reminder logic in Agendula and
Calendula: the lead-time unit model (ReminderUnit / decomposeReminderMinutes),
the per-target override model (ReminderOverride + reminderLeadFor /
applyReminderOverride) and the stored-format codec (ReminderOverrideCodec).

The codec's separators are configurable so each app keeps its on-disk format
(Agendula stores id:minutes, Calendula id=minutes) without a data migration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:11:55 +02:00
25ec248e73 docs: changelog, docs/ set, CONTRIBUTING, LICENSE
Bring floret-kit up to the family's repo conventions:
- CHANGELOG.md (Keep a Changelog) — what each module added.
- README.md — full module table (core-time/core-crash/identity/components) +
  consumption notes and a docs index.
- docs/README.md (index), docs/ARCHITECTURE.md (module layering, the submodule +
  composite-build consumption model, JVM vs android-library, the reproducibility
  rules, the share-mechanics-not-look contract), docs/ROADMAP.md (extracted vs
  deferred vs deliberately-not-shared, from the cross-app survey).
- CONTRIBUTING.md — the no-app-coupling rules, how to add a module, how an app
  adopts the kit.
- LICENSE (MIT, matching the apps).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 13:42:53 +02:00
d3ae83f1a4 core-time: shared date/time helpers (DayWindow + Instant formatting)
First module of floret-kit, the shared Material 3 Expressive design system +
plumbing for the Floret app family. core-time is a pure-Kotlin JVM library
(DayWindow local-day boundaries + locale/zone-aware Instant formatting),
extracted from Agendula. Standalone build + 2 unit tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 23:23:45 +02:00