Skip to content

v0.104.0

Choose a tag to compare

@Khalidabdi1 Khalidabdi1 released this 02 Oct 15:41
· 211 commits to main since this release

A minor release: a new Leaderboard component, and Map can now return to where it started.

Added

  • Leaderboard — entries ranked by a value, with the top three on a podium and the rest as rows. Pass values and it works out the places, with ties sharing one (1, 2, 2, 4). The podium is drawn as bars scaled to the leader's value (podium="bars", the default), as cards ("cards"), or left out ("none"). order="asc" ranks the lowest value first, for times and golf scores. highlightId marks the viewer's row and, when limit cuts it off, pins it under the list with its real place. change shows places moved since the last period.

    <Leaderboard data={players} limit={10} highlightId={me.id} unit="XP" />
  • Map — recenter() on the ref and recenter on Map.Controls return to the view the map opened on. Before this, resetting a map meant remounting it with a new key. useMap() returns the same recenter. (#228, requested by @yashDahiwale)

  • Map — fitBounds(bounds, options) now takes { padding, duration } as well as a padding number, and padding can be set per side, so the box can stay clear of a sheet covering part of the map. New types: MapFitBoundsOptions, ViewPadding. (#228, requested by @yashDahiwale)

    map.current?.fitBounds(bounds, { padding: { top: 48, right: 48, bottom: 320, left: 48 }, duration: 600 });
    <Map.Controls recenter />

Fixed

  • Map, Flow — the zoom-out button in Map.Controls and Flow.Controls drew a white minus sign on a white card. Every glyph in both control stacks now uses the muted-foreground token, and the minus matches the plus sign's weight. (#228, reported by @yashDahiwale)

Docs

  • Map — examples for moving the camera from code and for the recenter button, a table of the MapHandle methods, and a MapTiler source in "Bringing your own tiles".

Upgrading

npm install panelui-native@0.104.0

Nothing changes for existing code. A number passed as the second argument to fitBounds still means padding.

This version was published by hand while CI is unavailable, so it carries no npm provenance attestation.