velven
Docs
Menu

Changelog

What each release of @velven/sdk and the script tag added. Releases only add: nothing a page already calls changes or goes away. Versions explains which release a page runs.

View guide as Markdown

0.7.0

Achievements and stats, player content, rooms, presence, friends boards and the sandbox.

  • Velven.achievements (unlock, list), Velven.stats (set, add, get) and Velven.onAchievement: achievements and stats declared in the block, velven.json or the API.
  • Velven.content (upload, list, download, remove, report): player content, and contentId on scores.submit to keep a replay with a score.
  • Velven.rooms: multiplayer rooms on Velven's relay, invites and invite links. Velven.presence.set: a line friends see.
  • friends: true on top and around: friends-only boards. display on a board shows it on the space's page.
  • Velven.sandbox, and previews and velven dev write to the space's sandbox. A page on localhost inside a frame looks for Velven before it settles local.
  • data-toasts="false" and toasts: false: your space draws its own unlocks.
  • @velven/sdk/server adds unlockAchievement and setStat, contentId on postScore, and sandbox from verifyToken.

0.6.0

Send visitors to your Velven page.

0.5.1

Batch reads on an older Velven page.

  • Velven.scores.read on a Velven page opened before batch reads existed sends each read on its own, instead of waiting 30 seconds and answering failed.
  • The SDK tells the Velven page its version when it starts, so a problem can be traced to the release.

If you bundle 0.5.0 from npm, update to 0.5.1: the script tag already serves it.

0.5.0

Batch reads.

0.4.0

Gameplay and sound.

  • Velven.game.start() and Velven.game.stop() tell Velven when play is on.
  • Velven.onMute(handler) puts a sound button in the bar under your space and tells your handler the player's choice.
  • Locally, ?velven_muted=1 calls every mute handler with true, and start and stop log to the console.

0.3.0

History reads, retry keys, cancelling a sign-in and a server helper.

  • top, around and mine take bucket (current, previous or a date) and season, to read past days, weeks and seasons.
  • Every read carries info: the board's label, unit, metric, sort, mode, entries, period, bucket and season.
  • top({ after }) pages in the bucket and season the row was read from, so a board paged across midnight stays on its day.
  • scores.submit takes requestId, so a retried run is entered once.
  • signIn takes an AbortSignal as signal, and a cancelled sign-in request answers cancelled.
  • Velven.version names the release, and Velven.space the space the page runs in.
  • probeTimeoutMs on createVelven({ window, playerOrigins, probeTimeoutMs }) and data-probe-timeout on the script tag set how long a frame waits for Velven, 3 to 60 seconds.
  • A signed_out answer to a score call clears the cached token and Velven.user.
  • Locally, boards roll over by period and season, and 3 new query parameters arrive: ?velven_seed=, ?velven_strict=1 and ?velven_slow=.
  • @velven/sdk/server adds verifyToken and postScore, for Node 20 and later, Deno, Bun and Cloudflare Workers.

0.2.0

Saves, and the player's own row.

  • Velven.data keeps a player's progress with getItem, setItem, removeItem and clear, up to 1 MB per player and space.
  • scores.mine({ board }) answers the player's own row, or null before their first score.

0.1.0

The first release, as the script tag and the npm package @velven/sdk.

  • ready(), Velven.environment and Velven.user.
  • signIn(), plain or { silent: true }, and onAuth.
  • scores.submit, scores.top and scores.around.
  • The local environment, with ?velven_user=, ?velven_token=expired and ?velven_local=1.