Repository navigation
Releases
Releases · Particle-Academy/fancy-fun-lab-ui
v0.2.0
Added
FunLabLeaderboardnames can be links or custom content. Three optional
props:nameHref(entry)returns a URL to link that name to, or null to leave
it as text;renderName(entry, name)renders the name cell content and wins
overnameHref;linkComponent(default"a") renders the links, so a host
can pass Inertia'sLinkor a router link. The viewer's row still says
"(You)", outside the link, and keepsaria-current. Additive: with none of
them set the markup is byte-for-byte what it was, so consumers do nothing.
Changed
- Releases need a lab-run certificate.
publish.ymlgains a read-only
lab-certificatejob that every publishing job needs: a tag is published only
when the fancy-labs lab has certified that exact version and commit. Consumers
do nothing; this changes how releases are cut, not what the package does.
Fixed
- A locked achievement's description is readable (axe
color-contrast,
lab run 601, K36). A locked tile is react-fancy's muted card, and the
description was its muted text: zinc-500 on zinc-100, 4.39:1, under AA. On a
locked tile it now uses the soft text token (--fancy-text-soft, zinc-700 by
default). Earned tiles are unchanged. Nothing to do on upgrade.
v0.1.0
Added
- First release. React surfaces for laravel-fun-lab, built only from react-fancy:
FunLabProfileSummary: total XP, achievements and prizes, and each gamed metric's level and progress, said in words and asaria-valuetext. Metric selection is controlled (selectedMetric/onSelectMetric).FunLabLeaderboard: by XP, achievements or prizes, overall or for one gamed metric, over a period, paged.by,metric,periodandpageare controlled; each control shows only when its handler is set. A real table, with column headers and a row header per entry. The viewer's row says "(You)" and carriesaria-current.FunLabAchievementGrid: earned and locked tiles, each saying which in words, with a controlledfilter.FunLabXpFeed: rows from thexp.awardedandmetric.level-reachedbroadcasts;feedItemFromEchoandmergeFeedbuild and de-duplicate them.FunLabLevelUp: a level-up card that never takes focus; its celebration runs only underprefers-reduced-motion: no-preference.FunLabLiveRegionProvider/useFunLabAnnounce: one polite live region, rate-limited so a burst is one summary.createFunLabClient: a fetch-only, read-only client forapi/lfl, with host-supplied base URL and headers.- Pure helpers
levelProgress,metricProgressFromLevels,scoreFor,interpolate,interpolateNodes,pickPlural,formatNumber,createAnnouncer;defaultLabels.
- Every string is a JSON label, a
{name}template or one per CLDR plural category; numbers and plurals followlocale. Numbers render left-to-right inside right-to-left text, and{+name}keeps a sign with its number. data-fancy-fun-lab-*handles on every root, row, tile and control.- Peers:
@particle-academy/react-fancy >=6.9.0 <7.0.0, React 19, Tailwind v4. Node 22 or newer. - Per-metric leaderboards need laravel-fun-lab's
?metric=, in its release after 0.6.0. On an older server, leavemetricnull.