Every screen and component a theme.ts may template: its input, outputs, slots, parts, host classes and the musts a template keeps.
This page is generated from the table of contracts the game embeds (apps/web/packages/@pvng/ui-contracts/contracts.json, read by the validator and by the typings of theme.d.ts). It lists 14 screens and 14 components. A screen is a whole page whose template places named slots; a contract is one component (a toolbar, a footer, a card) that a theme may restyle with its own template. The template of either is a function of a typed context c (nodes); how to write one is in templates.
Reading a contract
- Input is what a template can read: the paths of
c.bind('…') and c.field('…'). A ? marks a value that may be absent (null); [] marks a list (its item is described below it, indented); text between quotes is a closed set of values. A path that does not exist in the current state reads as empty text and never fails.
- States (contracts only): the input of a contract is a variant tagged by
state; each state has its own fields, listed under state = <name>:. A path that exists in any state is valid in a template, so test state before relying on it.
- Outputs are the actions a control may call:
c.on.press('name', args). Arguments are typed and given in order. An output marked required must be bound to a control, or the template is refused.
- Slots are the named places a template must put somewhere (
c.slot('name')). A slot marked required must be placed, anywhere, in a when or not. A slot that mounts a contract renders that component with its own template.
- Parts are the
data-part marks of the component's elements; host classes are classes of the game's own stylesheet a template may put on a node; CSS vars are variables the game sets on the element. Musts are what a replacement must keep, checked by the game's tests.
Contents
Screens: screen.chat · screen.clan · screen.download · screen.help · screen.library · screen.lobby · screen.mods · screen.profile · screen.replay · screen.result · screen.settings · screen.skins · screen.title · screen.tournaments
Components: catalog.card · download.card · leaderboard.card · library.chartRow · library.footer · library.search · library.setCard · library.toolbar · lobby.draft · maps.toPlay · player.card · rate.control · selected.header · selected.tabs
Screens
screen.chat — Chat sheet
The chat over a page: the tabs of its channels, the players' panel toggle, the close button and the pane of the channel shown (its lines, its composer, or why the chat cannot be used). The sheet's root (fixed over the window, hidden when closed, the focus it takes and gives back, its keys) stays the host's; the template composes what is inside it. The lines, their links and names, the composer and its commands stay the host's: a theme styles them by their marks.
- Template:
screens.chat (defineTheme({ screens: { chat: (c) => … } }))
- Typed context:
ThemeContext<'screen.chat'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
channels[] object
id string
label string
unread number
direct boolean
clan boolean
selected boolean
active string
gate "ready" | "login" | "offline" | "server" | "unsupported"
usersShown boolean
unread number
Regions
| Region |
Slots |
Description |
bar |
tabs, users, close |
The channel tabs, then the players' toggle and the close button at the end. |
body |
panes |
The pane of every channel (one is shown): lines and composer. |
Slots
| Slot |
Required |
Mounts |
Description |
tabs |
yes |
— |
The channel tabs: a tab list with arrows, an unread count on each tab, a close button on a private conversation (Delete closes it too). |
users |
yes |
— |
The button that shows or hides the players' band (pressed while it shows); nothing while the chat cannot be used. |
close |
yes |
— |
The button that closes the sheet. |
panes |
yes |
— |
One pane per channel, the one shown visible: the lines (with their time, speaker, links and system lines), the composer with its command list, or the reason the chat cannot be used with its action. |
Outputs
| Output |
Arguments |
Description |
channel.select |
channel: string |
Shows a channel (what a click on its tab does). An unknown id does nothing. |
users.toggle |
— |
Shows or hides the players' band. |
close |
— |
Closes the sheet and gives the focus back to what had it. |
Host classes
| Class |
Description |
card |
The sheet's plate: a column with the sheet's padding, over an opaque base. |
bar |
The row of tabs and buttons. |
push |
An empty item that takes the free width of a row: what follows it is pushed to the end. |
panes |
The column that holds the channels' panes and takes what is left of the sheet. |
pv-plate |
The design system's plate (use with pv-plate--lg, and data-tone raised or data-edge accent). |
pv-plate--lg |
The large plate: the shape of a panel (--pv-clip-lg). |
Keys
| Key |
Effect |
| F8 |
Shows or hides the sheet and the players' band. |
| Escape |
Closes, in this order: a player's menu, a link confirmation, the command list, the players' band, the sheet. |
| ArrowLeft / ArrowRight (on the tabs) |
Moves from one channel to the next and shows it. |
| Delete (on a private conversation's tab) |
Closes the conversation. |
| Enter (in the composer) |
Sends the line. |
screen.clan — Clan
The player's clan and the clans' ranking: the way back, the title and the connection chips, what could not be read (with a retry), the clan's header and facts, its members, and the chat or the ranking beside them. The screen's host builds every place from the stores and mounts it where the template says; the template only decides WHERE things go and how they are wrapped. The clan's name, rank and figures are in the input (a template writes its own header); the members, the chat and the ranking are the host's: a template places and restyles them through their marks, it never redraws them.
- Template:
screens.clan (defineTheme({ screens: { clan: (c) => … } }))
- Typed context:
ThemeContext<'screen.clan'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
gate "page" | "offline-note" | "login"
mine "loading" | "none" | "clan"
side "chat" | "ranking"
failure? object
text string
clan? object
name string
tag string
rank? number
top boolean
leader boolean
members number
memberLimit number
online number
totalPp string
averagePp string
ranking object
sort "total" | "average" | "members"
loaded boolean
empty boolean
loading boolean
total number
entries number
page number
pages number
chat object
available boolean
Regions
| Region |
Slots |
Description |
header |
back, title, online |
The way back, the title with its help bubble, and the connection chip with the chat button. |
status |
gate, failed |
The notice of offline mode and the line that says what could not be read, with its retry. |
clan |
tag, manage, facts, members, none |
The player's clan: the tag, the "manage on the site" button, the facts and the members; or the invitation to the site when the account is in none. |
side |
tabs, chat, ranking |
The tabs and the panel they open: the clan's chat or the ranking of the clans. |
Slots
| Slot |
Required |
Mounts |
Description |
back |
yes |
— |
The back arrow: it leads to the song selection. |
title |
yes |
— |
The page's heading (h1) with the help bubble that says the game only reads a clan. |
online |
yes |
— |
The online chip (the account's connection) and the chat button. |
gate |
yes |
— |
The notice of offline mode ("Clans need the server") with its button to Settings → Online; nothing otherwise. |
failed |
yes |
— |
The line that says what could not be read, with its Retry button; nothing when everything was read. |
tag |
no |
— |
The clan's tag [TAG] in the game's own style, with the clan's name as its tooltip and accessible name; nothing without a clan. |
manage |
yes |
— |
The "Manage on the site" button: it opens the site's clan page in the browser (the game never creates, invites, leads or leaves a clan); nothing without a clan. |
facts |
no |
— |
The clan's four figures as a list of terms (members of the limit, online, total and average performance); nothing without a clan. A template that writes its own figures from clan leaves it out. |
members |
yes |
— |
The members as a grid of cards, the leader first, then the ones online: the picture, the name (a button with the player's menu), the crown, "you", the flag, the title, whether the member is online with their performance, and the site's rank; nothing without a clan. |
none |
yes |
— |
What the page says when the account is in no clan, with the button that opens the site's clan page; nothing otherwise. |
tabs |
yes |
— |
The two tabs of the side (Chat, Ranking): a segmented control with arrows. |
chat |
yes |
— |
The clan's chat (the chat's own pane, lines and composer) or the line that says there is none; drawn on the chat side only. |
ranking |
yes |
— |
The ranking of the clans: its sort, the count, the table with the player's own clan marked, and the pager; drawn on the ranking side only. |
Outputs
| Output |
Arguments |
Description |
back |
— |
Leaves the page for the song selection (what the back arrow does). |
site.open |
— |
Opens the site's clan page in the browser: the place to create, invite, lead or leave a clan (what "Manage" and the invitation do). |
refresh |
— |
Reads the clan, its ranking page and the clan channel again (what Retry does). |
settings.open |
— |
Opens Settings → Online (what the offline notice's button does). |
side.select |
side: string |
Shows the clan's chat or the ranking (chat or ranking). An unknown side shows the chat. |
ranking.sort |
sort: string |
Sorts the ranking by total, average or members and goes to its first page. An unknown sort sorts by total. |
ranking.page |
offset: number |
Shows the page of the ranking that starts at this offset (a multiple of 50: the pager's previous and next); the sort is kept. |
Host classes
| Class |
Description |
clan |
The page's root: a column with the page's padding that fills the window. |
pv-screen |
A screen root (page padding and entrance). |
pv-ui |
The design system's plates and buttons under the root, in Classic too. |
pv-plate |
The design system's plate (use with pv-plate--lg, and data-tone or data-edge accent). |
pv-plate--lg |
The large plate: the shape of a panel (--pv-clip-lg). |
page-head |
The header row (back, title, chips) that wraps when the window is narrow. |
label-line |
The row of the title and its help bubble. |
push |
An empty item that takes the free width of a row: what follows it is pushed to the end. |
body |
The page under the header: a column that fills the free height. |
cols |
The clan column and the side column side by side (stacked under 1100px). |
left |
The clan column: a scrolling column. |
right |
The side column: the tabs and their panel. |
band |
The clan's header plate: a column (the title line, then the facts). |
title-line |
The row of the tag, the clan's name, its place, "you lead" and the manage button. |
place |
The clan's place as a bordered figure (data-top in the first ten). |
lead-badge |
The "You lead this clan" pill. |
note |
A line of the page's own words in the muted text (while the clan is read). |
Keys
| Key |
Effect |
| ArrowLeft / ArrowRight (on the side's tabs) |
Moves from the chat to the ranking and back. |
| Shift+F10 / context menu key (on a member) |
Opens the player's menu under the name, like in the chat's panel. |
| Enter (in the chat's composer) |
Sends the line to the clan. |
screen.download — Download
Find maps (and skins, mods, playlists) and put them in the library: a row of sources, a search with its filters, the results, and the queue of downloads beside them. The screen's host builds every place from the stores and mounts it where the template says; the template only decides WHERE things go and how they are wrapped. What a result looks like is the download.card contract (a face: the host keeps the card's root and actions, the theme draws inside it). The keyboard, the paste of a map link, the filters and the queue stay the host's.
- Template:
screens.download (defineTheme({ screens: { download: (c) => … } }))
- Typed context:
ThemeContext<'screen.download'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
tab string
mode "results" | "prism" | "catalog"
section string
previewing boolean
results object
count number
loading boolean
failed boolean
queue object
total number
active number
finished number
folder? string
Regions
| Region |
Slots |
Description |
header |
title, sources, choices |
The title, the row of sources and the choices of the open source (Prism's sections, the folder, the mirror). |
browse |
search, notices, results, catalog |
The search and its filters, the notices of a source that asks for a login, the list of results; or Prism's own listing. |
queue |
queue |
The queue of downloads (or the map preview that takes its place). |
Slots
| Slot |
Required |
Mounts |
Description |
title |
yes |
— |
The page's heading (h1). |
sources |
yes |
— |
The row of sources (Prism, osu!, Quaver, Etterna) and the menu of the sources mods added: a tab list with arrows. |
choices |
yes |
— |
What belongs to the open source: Prism's sections (Maps, Skins, Mods, Playlists), the folder the downloads go to, the mirror menu of osu!. It can be empty. |
search |
yes |
— |
The search bar (with its paste-a-link button and the backend mark) and the filters under it. Drawn in the results mode only. |
notices |
yes |
— |
The login a source asks for (Quaver's account, a mod's token) and the note of a mod's source. Drawn in the results mode, only when there is something to say. |
results |
yes |
— |
The scrolling list of cards (download.card), the errors of a download that did not start and the status line (loading, end of the list, load more). Drawn in the results mode only. |
catalog |
yes |
— |
Prism's own listing: its index of maps (search, filters, weekly challenge, cards) or the catalogue of skins, mods and playlists. Drawn in the prism and catalog modes only. |
queue |
yes |
— |
The queue of downloads, with its clear button; the map preview takes its place while it runs. |
Components drawn by the host
Lists and panels the host draws; a template of these contracts restyles each one, it cannot place them.
| Contract |
Description |
| download.card |
One result of the list (an osu!, Quaver or mod set, a Prism map, an Etterna pack): the list repeats it. |
| catalog.card |
One entry of Prism's catalogue (a skin, a mod, a playlist), in the catalog place: the list repeats it. |
Outputs
| Output |
Arguments |
Description |
tab.select |
tab: string |
Shows a source: prism, osu, quaver, etterna or a mod's mod:<id>/<source>. An unknown tab shows Prism. |
link.paste |
— |
Reads a map link from the clipboard and starts its download (what the "Paste a link" button does). |
search.focus |
— |
Puts the focus in the search bar of the list shown. |
queue.clear |
— |
Removes the finished downloads from the queue. |
Host classes
| Class |
Description |
download |
The page's root: a column with the page's padding. |
pv-screen |
A screen root (page padding and entrance). |
top |
The header row (title, sources, choices) with a hairline under it. |
body |
The browse area and the queue side by side (a narrower queue column; the choices data-layout-* do not touch it). |
panel |
The column of the browse area: search, notices and results one under the other. |
previewing |
Added to body while the map preview runs in the queue's place (the queue column gets wider). |
Keys
| Key |
Effect |
| ArrowDown (in the search) |
The focus goes to the first result card. |
| ArrowUp / ArrowDown / Home / End (on a card) |
Moves from one result card to the previous or next, the first or the last. |
| Enter (on a card) |
Does what the card's main control does: downloads it, or opens and closes an Etterna pack. |
| Ctrl+V |
A map link (osu!, Quaver, Etterna) pasted anywhere in the page starts its download; pasted in the search bar it does the same, and a line of filters replaces the filters. |
screen.help — Help
Read how the game works: a search over every topic, the topic list, and the topics' sections (the player's current keys, then a few short texts). The screen's host builds every place from the stores and the catalogs and mounts it where the template says; the template only decides WHERE things go and how they are wrapped. The sections, their keys and the words the search found are the host's: a theme styles them through their marks (data-part).
- Template:
screens.help (defineTheme({ screens: { help: (c) => … } }))
- Typed context:
ThemeContext<'screen.help'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
topics[] object
id string
title string
current boolean
total number
search object
active boolean
query string
found number
Regions
| Region |
Slots |
Description |
header |
back, title, search |
The way back, the title and the search. |
body |
topics, content |
The topic list and the scrolling content: the topics' sections, or the line that says the search found none. |
Slots
| Slot |
Required |
Mounts |
Description |
back |
yes |
— |
The back arrow: it leads to the page Help was opened from. |
title |
yes |
— |
The page's heading (h1). |
search |
yes |
— |
The search field over every topic (the rules of the Settings search: case and accents ignored, every word found, any order). |
topics |
yes |
— |
The topic list: a navigation with one button per topic, Up and Down, Home and End; a click scrolls to the section and gives its heading the focus. It follows the scroll (aria-current and data-active mark the topic at the top). |
content |
yes |
— |
The scrolling region (a focusable region, so the keyboard scrolls it): one section per topic with its title, the player's keys and its texts, the words the search found marked; or the line that says nothing matched. |
Outputs
| Output |
Arguments |
Description |
back |
— |
Leaves the page for the one Help was opened from (what the back arrow does). |
topic.jump |
id: string |
Scrolls the content to a topic's section and gives its heading the focus (what a click on its entry in the list does). An unknown id does nothing. |
search.focus |
— |
Puts the focus in the search field. |
search.clear |
— |
Empties the search and lists every topic again. |
Host classes
| Class |
Description |
help-page |
The page's root: a column with the page's padding. |
pv-screen |
A screen root (page padding and entrance). |
pv-ui |
The design system's plates and buttons under the root, in Classic too. |
page-head |
The header row (back, title, search) that wraps when the window is narrow. |
push |
An empty item that takes the free width of a row: what follows it is pushed to the end. |
body |
The topic list and the content side by side (a narrow column and a wide one); stacked under 820px. |
Keys
| Key |
Effect |
| ArrowUp / ArrowDown / Home / End (on the topic list) |
The focus moves from one topic to the previous or next, the first or the last. |
| Enter / Space (on a topic) |
Scrolls to the topic's section and gives its heading the focus. |
| Enter / ArrowDown (in the search) |
The focus goes to the content, so the arrows scroll it. |
| Escape (in the search) |
Empties the search; with the field empty, Escape opens the game's menu like on every page. |
screen.library — Map selection
Pick what to play: search and browse the library on one side, the selected map (its figures, tabs and the Play strip) on the other. The screen's host builds the input of every contract slot from the stores (null while a slot is not shown: the heading of an empty library has no tabs, no panels and no Play) and mounts it where the template says; the template only decides WHERE things go and how they are wrapped.
- Template:
screens.library (defineTheme({ screens: { library: (c) => … } }))
- Typed context:
ThemeContext<'screen.library'>
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
selection object
state "map" | "playlist" | "pick" | "empty"
shown boolean
color string
busy boolean
entering boolean
changed boolean
tab string
browser object
view "maps" | "playlists" | "mapsToPlay"
covered boolean
visualizer boolean
color string
map? object
artist string
title string
difficulty string
keysText string
keys number
creator? string
background? string
rating object
value? number
text string
unit string
label string
rate? number
duration object
text string
seconds? number
bpm string
bpmValue? number
notes string
holds string
holdShare? number
nps object
average string
peak string
averageValue? number
peakValue? number
skillsets[] object
label string
short string
display string
hue string
level number
patterns[] object
label string
short string
display string
hue string
level number
rank number
position number
equalizer[] object
i number
level number
live number
listening boolean
fresh boolean
difficultyCount number
record? object
plays number
bestAccuracy? number
bestPerformance? string
lastPlayed? string
top? object
accuracy number
performance? string
combo number
misses number
rate number
rateText string
date string
mods[] object
key string
id string
name string
short string
description string
group string
groupLabel string
icon string
enabled boolean
conflicts[] string
modsOn number
preview object
shown boolean
playing boolean
position number
duration number
progress number
positionText string
durationText string
steps[] object
i number
at number
level number
passed boolean
online object
state "offline" | "signedOut" | "connecting" | "online"
name? string
avatar? string
players? number
friendsOnline number
friends[] object
name string
avatar? string
status "online" | "inLobby" | "playing"
unread number
rateControl variant on state
state "ready" | "atDefault" | "atMin" | "atMax"
value number
text string
min number
max number
minText string
maxText string
step number
typed number
steps object
down number
up number
state = ready:
{}
state = atDefault:
{}
state = atMin:
{}
state = atMax:
{}
keys object
play string
menu string
up string
down string
previousSet string
nextSet string
random string
palette string
visualize string
chat string
Regions
| Region |
Slots |
Description |
browser |
toolbar, views, online, visualize, intent, search, searchField, searchTools, list, playlistSearch, playlists, visualizer |
The library: the bar over the list, the search and the list itself (maps, playlists, or the visualizer over them). |
selection |
header, tabs, panels, infoPanel, leaderboardPanel, modsPanel, trainingPanel, historyPanel, mapsPanel, editorPanel |
The selected map: heading and figures, the tabs with their panels (or panels placed on their own). |
footer |
footer |
The strip where the choice becomes a play. |
Slots
| Slot |
Required |
Mounts |
Description |
toolbar |
no |
library.toolbar |
The view switch, Random, the "…" menu, the online side and Visualize. Classic draws its original bar. A template that wants those pieces in different places places views, online and visualize instead (never both: the bar would be drawn twice). |
views |
no |
— |
A piece of the toolbar, placed alone: the Maps | Playlists switch with its counts, Random and the "…" menu of the rare actions (add or refresh folders, new or imported playlists). |
online |
no |
— |
A piece of the toolbar, placed alone: the online status (account, connection), the chat button and the multiplayer button. |
visualize |
no |
— |
A piece of the toolbar, placed alone: the Visualize button (pressed while the visualizer is open). |
intent |
yes |
— |
The bar that tells the selection has another purpose now (the lobby's map is being picked) and lets it be dropped. |
search |
yes |
library.search |
The maps list's search: text, filters, grouping and sort (nothing while the maps to play show: their filters are in the list slot). A template that wants the field and the tools in different places places searchField and searchTools instead (both, and never with search). |
searchField |
no |
— |
A piece of the maps search, placed alone: the text field with its recent searches, the filter chips and the lines that say a filter cannot apply. It takes the focus when the screen opens, as the whole search does. |
searchTools |
no |
— |
A piece of the maps search, placed alone: Group (and fold all), Sort with its direction, the duplicates review and the "+ Filter" button with its window. |
list |
yes |
— |
The maps list: sets and their difficulties (their rows are drawn by the library.setCard and library.chartRow contracts). While browser.view is mapsToPlay it is the maps to play instead: their filters and their list (the maps.toPlay contract), so every template shows them where it shows the maps. |
playlistSearch |
yes |
library.search |
The playlists list's search: text and sort (shown over the playlists). |
playlists |
yes |
— |
The playlists list and its notices (shown while the playlists view is on). |
visualizer |
yes |
— |
The map visualizer. Shown over the list while visualizerOpen (the Visualize button) it is the panel it always was; placed where it is always drawn (outside such a when, or as a tab of a tabs group) it plays the selected map whenever it is on screen, follows the selection and never holds the library, and the Visualize button no longer closes it. Its pieces carry data-part: visualizer-head (the card over the playfield), visualizer-viewport (the playfield: the game draws in its box, so resize it but never hide it), visualizer-deck (the player under it), visualizer-chapters, visualizer-scrubber and visualizer-transport (its rows). A template that draws its own player from preview hides the deck with [data-part="visualizer-deck"] { display: none }. |
header |
yes |
selected.header |
Title, difficulty, rating and figures; the invitation when nothing is selected. |
tabs |
yes |
selected.tabs |
The tabs of the map or the playlist. A panel the template places on its own (infoPanel, leaderboardPanel…) has no tab here. |
panels |
yes |
— |
The panel of every tab (Info, Leaderboard, Mods, Training, History, Editor, mods' tabs); the rate control, the score cards and the graphs are in them. A panel the template places on its own is not drawn here. |
infoPanel |
no |
— |
One panel placed on its own, always shown: the Info tab of the selected map (analysis, density band, rate advice). It leaves tabs and panels. Its blocks carry data-part (in panels too): analysis-radar, analysis-bars, analysis-metrics, analysis-timeline, analysis-text, analysis-plays (the rating's sections), info-density, info-advice; a theme that shows the patterns itself (map.patterns) hides one with [data-part="analysis-radar"] { display: none }. |
leaderboardPanel |
no |
— |
One panel placed on its own, always shown: the Leaderboard tab of the selected map (local and online boards, score cards). It leaves tabs and panels. |
modsPanel |
no |
— |
One panel placed on its own, always shown: the Mods tab of the selected map (rate, gameplay mods). It leaves tabs and panels. |
trainingPanel |
no |
— |
One panel placed on its own, always shown: the Training tab of the selected map. It leaves tabs and panels. |
historyPanel |
no |
— |
One panel placed on its own, always shown: the History tab of the selected map. It leaves tabs and panels. |
mapsPanel |
no |
— |
One panel placed on its own, always shown: the Maps tab (maps to play). It leaves tabs and panels. |
editorPanel |
no |
— |
One panel placed on its own, always shown: the Editor tab of the selected map. It leaves tabs and panels. |
footer |
yes |
library.footer |
Rating, judgement and Play; its confirm output must be bound to a button. |
Components drawn by the host
Lists and panels the host draws; a template of these contracts restyles each one, it cannot place them.
| Contract |
Description |
| library.setCard |
One beatmapset (or playlist) of the list; the list repeats it. |
| library.chartRow |
One difficulty of the expanded set; the list repeats it. |
| leaderboard.card |
One play of the board (the Leaderboard tab repeats it). |
| rate.control |
The playback rate (the Mods and Training tabs hold it). |
| maps.toPlay |
The maps to play: the panel of the Maps tab (charts of the library near the player's level, at a suggested rate). |
Outputs
| Output |
Arguments |
Description |
drawer.toggle |
— |
Opens or closes the menu drawer (what Escape does): the way out of the screen for a theme that draws its own "menu" button. |
random |
— |
Opens a random map of the current result (what the toolbar's Random does): the list scrolls to it, opens it and selects one of its difficulties. Never a play. |
mods.open |
— |
Opens the Mods tab of the selected map (or playlist). |
settings.open |
— |
Opens the settings (the page the menu drawer's Settings entry opens). |
mod.set |
key: string, on: boolean |
Switches a gameplay modifier on or off for the next plays (what its tile in the Mods tab does); switching one on switches off those it conflicts with. A toggle appends the new state: on.change("mod.set", item.bind("key")). |
rate.set |
value: number |
Asks for a playback rate (what the rate control does): the action moves it into the range and onto the grid of the open tab. |
mods.reset |
— |
Switches every gameplay modifier off (their parameters are kept). |
preview.seek |
at: number |
Moves the preview (music and playfield) to a fraction of the map, 0 to 1: a step of preview.steps gives its at. Nothing happens while the preview is not shown. |
preview.toggle |
— |
Pauses or resumes the preview. |
Host classes
| Class |
Description |
song-select |
The two-column screen (the choices data-layout-* place the columns). |
pv-screen |
A screen root (page padding and entrance). The root of this screen also carries data-mod-<id> for every modifier that is on and data-changed while selection.changed. |
map-browser |
The library column. |
browser-body |
The area under the toolbar that holds the lists (positioned: the playlists and the visualizer cover it). |
browser-list |
The maps search and list. |
covered |
Added to browser-list while the playlists or the visualizer cover it (the list stays mounted, hidden). |
browser-playlists |
The playlists panel laid over the maps list. |
selected-map |
The selection column. |
selected-body |
The selection column's scrolling body (heading, figures, tabs, panels). |
no-selection |
The invitation shown when nothing is selected. |
CSS variables
| Variable |
Description |
--selection-color |
The accent of the selection, for the wash behind the screen. |
--difficulty-color |
The accent of the selected difficulty (or playlist). |
--row-distance |
On each row of the maps list (a set card, a difficulty row, the face of library.setCard and library.chartRow reads it): the number of rows between the row and the one the list centres its curve on, negative above it. The centre is the selected difficulty, else the selected set, else the row in the middle of the viewport. A theme shapes a carousel with it: transform: translateX(calc(var(--row-distance) * var(--row-distance) * 4px)). |
Keys
| Key |
Effect |
| ArrowUp / ArrowDown |
Previous or next difficulty (library.up, library.down). |
| ArrowLeft / ArrowRight |
Previous or next set (library.previousSet, library.nextSet). |
| Enter |
Confirms the selection (chart.confirm): plays it, trains the section on the Training tab, or picks the lobby's map. |
| Escape |
Opens or closes the menu drawer (navigation.drawer). |
screen.lobby — Multiplayer lobby
The room of a multiplayer lobby: its name and join code with the switches that open it and rotate its host, the players with their cards, the map the lobby plays (a card that leads to the song list, with its facts), the files members shared, the lobby's chat (or the player's mods) and the bar with Leave, Spectate and Ready. The screen's host builds every place from the stores and mounts it where the template says; the template only decides WHERE things go and how they are wrapped. What a player looks like is the player.card contract (a face: the host keeps the card's root, menu and widgets, the theme draws inside it). The lobby itself, the chat, the preview and every action stay the host's.
- Template:
screens.lobby (defineTheme({ screens: { lobby: (c) => … } }))
- Typed context:
ThemeContext<'screen.lobby'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
lobby object
name string
code string
codeHidden boolean
open boolean
hostRotation boolean
started boolean
self object
host boolean
ready boolean
spectating boolean
waiting boolean
players object
count number
rivals number
results number
map object
chosen boolean
title string
artist string
rate number
shared boolean
files object
count number
replays number
draft object
active boolean
Regions
| Region |
Slots |
Description |
header |
title, code, switches, notice |
The lobby's name, its join code and its switches (open to anyone, rotate the host), and the notice of a member who joined mid-round. |
players |
playersHead, compare, roster, files |
The players: their heading and count, the HUD gap to compare with and the cards (a player.card each), then the files members shared. |
map |
map, panel |
The map the lobby plays and the panel of the lobby's chat or the player's mods. |
draft |
draft |
The pick & ban draft of the lobby. While it runs (draft.active) it takes the map's and the chat's place; otherwise it sits between the room and the player's own bar. |
actions |
leave, spectate, ready |
The player's own bar: leave, watch instead of playing, ready. |
Slots
| Slot |
Required |
Mounts |
Description |
title |
yes |
— |
The lobby's name (h2) with its pills (open, rotating host, round started). |
code |
yes |
— |
The join code with its hide and copy buttons. |
switches |
yes |
— |
The "open lobby" switch (the host only, before the round) and the "rotate the host" switch (the host's to change), each with its help bubble: two labelled switches, side by side. |
notice |
yes |
— |
The line that tells a member who joined mid-round they wait for the next one; nothing when it does not apply. |
playersHead |
no |
— |
The "Players" heading with the count and, once the round started, whether the results are in. Drawn by the host: a template that prefers its own heading writes it from players. |
compare |
yes |
— |
The "Gap to" menu that chooses the player the in-play gap is read against; nothing for a spectator, a member who waits, or with no rival. |
roster |
yes |
— |
The list of players (a player.card each, in the lobby's order or, once the round started, by accuracy), the faded cards of the members who just left and the replay button of each card whose replay the lobby holds. It scrolls. |
files |
yes |
— |
The shared files panel: the files members shared (share and download buttons) and the replays to watch. |
map |
yes |
— |
The map card: a big button that leads to the song list (the host picks there, a member finds it there) with the map's picture, title, artist, rate, judgement, density graph and facts, the download of a file the lobby shares and the preview button. With no map it says so ("No map chosen yet"). |
panel |
yes |
— |
The Chat and Mods tabs and the one panel they open: the lobby's chat (lines, composer) or the player's own modifiers. |
draft |
no |
lobby.draft |
The pick & ban draft of the lobby (lobby.draft): the host of a friendly lobby starts one, the captains ban and pick there. A template that leaves it out gets it drawn by the host after its room, so the draft stays reachable. Nothing when the server has no draft (no lobby-draft feature) or the lobby runs none and the player is not its host. A template places it where the map is while draft.active, and elsewhere otherwise. |
leave |
yes |
— |
The Leave button. |
spectate |
yes |
— |
The "Watch instead of playing" switch; nothing once the round started. |
ready |
yes |
— |
The Ready button (pressed once the player is ready, disabled for a spectator); nothing once the round started. |
Components drawn by the host
Lists and panels the host draws; a template of these contracts restyles each one, it cannot place them.
| Contract |
Description |
| player.card |
One player of the roster: the list repeats it, the card keeps its menu, its replay button and its widgets. |
Outputs
| Output |
Arguments |
Description |
leave |
— |
Leaves the lobby (what the Leave button does). |
ready.set |
ready: boolean |
Says whether the player is ready (a spectator cannot be). |
spectate.set |
spectate: boolean |
Watches the round instead of playing it, or plays again. |
code.copy |
— |
Copies the join code to the clipboard. |
map.open |
— |
Opens the song list on the lobby's map: the host picks one there, a member finds it there. |
Host classes
| Class |
Description |
room |
The room's root: a column that fills the page under its header. |
band |
The header plate: the title, the code and the switches in a row that wraps. |
grid |
The players column and the map column side by side (stacked under 1000px). |
people |
The column of the players' panel and the files panel. |
players-panel |
The plate of the players: heading, HUD gap and the scrolling roster. |
side |
The column of the map card and the chat panel. |
actions |
The bottom bar: leave and spectate at the start, ready at the end. |
push |
An empty item that takes the free width of a row: what follows it is pushed to the end. |
pv-plate |
The design system's plate (use with pv-plate--lg or pv-plate--md, and data-tone raised or data-edge accent). |
pv-plate--lg |
The large plate: the shape of a panel (--pv-clip-lg). |
pv-plate--md |
The medium plate: the shape of a button (--pv-clip-md). |
Keys
| Key |
Effect |
| Enter (in the chat's composer) |
Sends the line (one line; Shift+Enter inserts nothing). |
| Escape (in the chat's composer) |
Takes the focus out of the field, and does not leave the lobby's page on the same press. |
| Shift+F10 / context menu key (on a card) |
Opens the player's menu; the lobby host's also holds "Make host" and "Kick". |
screen.mods — Mods
See and manage the mods the game loaded: the page's title with its install, open-folder and reload buttons, the folder they are read from, one card per mod (its state, its enable switch, its permissions with the switches that grant them, Export and Uninstall with its question), the interfaces installed, and the messages the loader and the mods wrote. The screen's host builds every place from the stores and mounts it where the template says; the template only decides WHERE things go and how they are wrapped. The cards are the host's: a template never draws a switch or a permission.
- Template:
screens.mods (defineTheme({ screens: { mods: (c) => … } }))
- Typed context:
ThemeContext<'screen.mods'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
mods object
count number
active number
disabled number
failed number
folder string
interfaces number
messages number
Regions
| Region |
Slots |
Description |
header |
title, actions, folder |
The page's title with its buttons, and the folder the mods come from. |
mods |
list |
The mods: one card each. |
footer |
interfaces, messages |
The interfaces installed and the messages of the loader and the mods. |
Slots
| Slot |
Required |
Mounts |
Description |
title |
yes |
— |
The page's heading (h1) with the help bubble that says a .pvmod file can be dropped on the window. |
actions |
yes |
— |
The Install, Open folder and Reload buttons. |
folder |
yes |
— |
The line that names the folder the mods are read from. |
list |
yes |
— |
The mods' cards (a list with one tab stop and Up and Down between the switches): name, version, author, state, the enable switch, Export and Uninstall, the description, the homepage as plain text, the permissions with the switches the player grants them with, the reason a mod did not start and the question that asks before an uninstall. Or the line that says there is no mod. |
interfaces |
no |
— |
The installed interfaces as chips (picture, name, version, author) with the button that leads to the Skins page where one is worn. |
messages |
yes |
— |
The "Messages" heading and the log: what the mod loader and the mods wrote, newest at the bottom (a log region that follows the newest message). |
Outputs
| Output |
Arguments |
Description |
mod.install |
— |
Asks for a .pvmod file to install (what the Install button does). |
mods.folder |
— |
Opens the mods folder in the system's file manager. |
mods.reload |
— |
Reads the mods folder again. |
skins.open |
— |
Opens the Skins page, where the interface is chosen. |
Host classes
| Class |
Description |
mods-page |
The page's root: a column, 1100px at most, centred. |
settings-heading |
The title row of a page (the heading and what sits beside it). |
Keys
| Key |
Effect |
| ArrowUp / ArrowDown / Home / End (on a mod's switch) |
Moves the focus from one mod's enable switch to the previous or next, the first or the last. |
| Space (on a mod's switch) |
Turns the mod on or off. |
screen.profile — Profile
The player's local profile: the header (name, rating, accuracy, play time, the medals the player pinned, the trackers, the judgement and rating pickers), the loading bar while the plays are rejudged, the tabs, and the tab shown. The screen's host builds every place from the stores and mounts it where the template says; the template only decides WHERE things go and how they are wrapped. The header's words and numbers are in the input (a template may write its own big name, rating and play time), the figures that count up in place, the lists, the graphs, the heatmap, the achievements and the goals are the host's: a template places and restyles them through their marks, it never redraws them.
- Template:
screens.profile (defineTheme({ screens: { profile: (c) => … } }))
- Typed context:
ThemeContext<'screen.profile'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "pending" | "unavailable" | "empty" | "ready"
sessionOpen boolean
tab string
tabs[] object
id string
label string
count number
selected boolean
view "best" | "recent" | "pinned" | "left"
player object
name string
initial string
charts number
plays number
playTime string
account? object
name string
offline boolean
rating? object
value number
unit string
digits number
performance boolean
accuracy? number (percent)
skillsets[] object
name string
value number
text string
color string
share number
main boolean
crowded boolean
loading object
active boolean
done number
total number
progress number
Regions
| Region |
Slots |
Description |
header |
avatar, title, account, badges, rating, accuracy, trackers, choices |
The player's picture tile, name, account badge, medals, figures (rating, accuracy, trackers) and the two pickers. |
status |
loading |
The bar that says the plays are being rejudged. |
body |
tabs, panel |
The tabs and the panel of the tab shown. |
Slots
| Slot |
Required |
Mounts |
Description |
avatar |
no |
— |
The player's tile: the first letter of the name on an accent plate. Decorative (hidden from screen readers), so a template may leave it out. |
title |
yes |
— |
The page's heading (h1): the player's name (the profile is local). |
account |
yes |
— |
The online account badge (the account's name, a "no connection" icon when offline) with its tooltip; nothing when the player is not logged in. |
badges |
yes |
— |
The medals the player pinned (a group of the achievements' badges, each with its tooltip); nothing when none is pinned. |
rating |
yes |
— |
The overall rating as a figure that counts up in place (Performance in pp, or Overall for a rating that is not a sum); nothing before any rated play. Large (data-size="xl"). |
accuracy |
yes |
— |
The accuracy of the top 20 plays as a figure that counts up in place; nothing without one. |
trackers |
yes |
— |
The stat trackers the player chose (up to three: the plays and the play time when none is chosen) and the small button that picks them. |
choices |
yes |
— |
The judgement picker and the performance calculator picker the profile is evaluated under: changing either rejudges the plays. |
loading |
yes |
— |
The bar (a progress bar with "Evaluating done / total") while the plays are rejudged; nothing otherwise. |
tabs |
yes |
— |
The tab list (Overview, Plays, Analysis, Sessions, Achievements, Goals): a roving-focus tab list with arrows, Home and End; the panel is its tab panel. Nothing when the page has no profile to show. |
panel |
yes |
— |
The tab shown, as one focusable tab panel (data-section names the tab): the radar with the objectives and two short lists of plays; the filtered plays; the calendar and the sessions; the error map; the achievements; or the goals and the progress. Nothing when the page has no profile to show. |
Outputs
| Output |
Arguments |
Description |
tab.select |
tab: string |
Shows a tab: overview, plays, analysis, sessions, achievements or goals. An unknown tab does nothing. |
plays.open |
view: string |
Shows the plays tab on a filter: best, recent, pinned or left (what "See all" of the overview's lists does). An unknown filter shows the best plays. |
refresh |
— |
Rejudges the plays again under the current judgement and calculator (what changing either picker does). |
Host classes
| Class |
Description |
profile |
The page's root: a column with the page's padding that fills the window. |
pv-screen |
A screen root (page padding and entrance). |
pv-ui |
The design system's plates and buttons under the root, in Classic too. |
pv-plate |
The design system's plate (use with pv-plate--lg or pv-plate--md, and data-tone base, raised or accent, or data-edge accent). |
pv-plate--lg |
The large plate: the shape of a panel (--pv-clip-lg). |
pv-plate--md |
The medium plate: the shape of a button (--pv-clip-md). |
identity-band |
The header plate: a row (avatar, name, medals, figures, pickers) that grows as wide as the page. |
wraps |
Added to the header while pinned medals or a third tracker fill it: the row wraps and the pickers go to the end. |
identity |
The name column of the header: a block that takes the free width. |
name-line |
The row of the name and the account badge. |
figures |
The row of the rating, the accuracy and the trackers, pushed to the end of the header. |
section-bar |
The row that holds the tab list. |
status |
A line of the page's own words (no host, no play yet) in the page's muted text. |
Keys
| Key |
Effect |
| ArrowLeft / ArrowRight / Home / End (on the tab list) |
The focus and the tab shown move to the previous or next tab, the first or the last. |
| Tab (on the tab panel) |
The panel is a stop of its own, so the keyboard can scroll it; the arrows and Page Up and Page Down scroll it. |
screen.replay — Score analysis
The analysis of one recorded score, and the result screen a finished play opens: the map, the player and the score's figures (accuracy, performance, best combo, pauses, the map's difficulty at the rate played, the mean offset), the list of every judgement with its count, the three graphs (hit timing, hit-offset distribution, progression) with their zoom and inspection, the judgement, performance and difficulty pickers the figures are re-evaluated under, and the actions on the score (compare with another play of the chart, watch it, watch it beside another, export a video, share it, train its worst section). The screen's host builds every place from the stores and mounts it where the template says; the template only decides WHERE things go and how they are wrapped. The graphs, the pickers, the comparison and the judgement list stay the host's: a template arranges and dresses them, it never redraws one. The figures are plain data the template may also write in its own way (a banner, a sentence), but the host's own figures count up and down in place when the judgement changes.
- Template:
screens.replay (defineTheme({ screens: { replay: (c) => … } }))
- Typed context:
ThemeContext<'screen.replay'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
status "loading" | "ready" | "error" | "unavailable"
loading boolean
mock boolean
lobby boolean
playback "stopped" | "loading" | "playing"
map object
title string
artist string
difficulty string
keys string
creator string
picture? string
color string
rate string
mods string
score? object
replayId string
player string
received boolean
playedAt string
accuracy number (percent)
maxCombo number
misses number
ranked boolean
pauses? number
performance? number
performanceUnit string
rating? number
ratingUnit string
ratingName string
meanOffsetMs? number
judgement string
tiers[] object
id string
name string
color string
count number
share number (percent)
comparison object
shown boolean
chosen boolean
player string
rate string
newRecord boolean
firstPlay boolean
failed boolean
references[] object
replayId string
player string
rate string
mods string
accuracy number (percent)
maxCombo number
picked boolean
Regions
| Region |
Slots |
Description |
header |
back, title, judgement, performance, rating, compare, watch, sideBySide, export, share, train |
The way back, the title and the pickers the figures are re-evaluated under, then the actions on the score. |
status |
standings, notices, transport |
What the host has to say about the replay: the lobby's standings, the notices, the transport of a replay being watched. |
summary |
banner, comparison |
The map and the comparison with another play. |
score |
player, stats, tiers |
The player, the figures, and the judgement list of the score. |
analysis |
graphs, status |
The three graphs, or what the page says while there is nothing to show. |
Slots
| Slot |
Required |
Mounts |
Description |
back |
yes |
— |
The arrow that leaves the page for the song list (the selection and the leaderboard's pages are kept). |
title |
yes |
— |
The heading (h1, the page's accessible name and the first place of the focus) with, beside it, the mark of the development host and the "updating" status of a recalculation. |
judgement |
yes |
— |
The judgement picker: a menu of the judgements the figures and the graphs are evaluated under, with its quick panel of windows. |
performance |
yes |
— |
The performance picker: a menu of the calculators the performance is computed with. |
rating |
yes |
— |
The difficulty picker: a menu of the calculators the map's difficulty is read with. |
compare |
yes |
— |
The "Compare score" menu: the other plays of the chart, one to choose as the reference, and the button that clears the choice. Its panel opens under the button. |
watch |
yes |
— |
The Watch replay button: runs the recorded presses through the game at the recorded rate (never creates a score). |
sideBySide |
yes |
— |
The Watch side by side button: the score and the reference beside each other on one clock; off while no compatible reference is chosen, and its tooltip says why. |
export |
yes |
— |
The Export video button and the panel it opens (resolution, quality, encoder, a clip). |
share |
yes |
— |
The Share button: copies the replay to a file or a link. |
train |
yes |
— |
The worst-section button: puts the passage the play lost the most in training at the recorded rate (a menu when several passages tie). |
standings |
yes |
— |
The standings of a lobby round (every player's score, the gap to yours, the winner); nothing for a score that is not a lobby's. |
notices |
yes |
— |
The lines that tell what is happening: a failed update, no weak passage found, "watching, press Escape to return", a refusal or an error of a replay. Nothing when there is nothing to say. |
transport |
yes |
— |
The transport of a replay being watched (play and pause, seek, speed); nothing when no replay runs. |
banner |
no |
— |
The map's strip: its picture, the artist, the title and the difficulty, the key count, the recorded rate and the chart modifiers, the mapper. Drawn by the host: a template that prefers its own banner writes it from map. |
comparison |
yes |
— |
The line about the reference play: its player, the "new record" mark, the gaps (accuracy, combo, misses, rating, performance) that count up and down in place, or "first play of this chart", or the error of the comparison. It may be empty. |
player |
yes |
— |
The player's name (h2) with the mark of a received replay, and the date of the play. |
stats |
yes |
— |
The score's figures (dl): accuracy, performance, best combo, pauses, the map's difficulty at the rate played, the mean offset. Each figure counts up or down in place when the judgement changes and carries its own data-part (accuracy, performance, combo, pauses, difficulty, offset). |
tiers |
yes |
— |
The judgement list: one row per judgement, Miss included, with the player's own symbol, the count (a counter), the share of notes as a bar, the ratios of the first two hit tiers and the total. It has its own bounded scrolling when there are many. |
graphs |
yes |
— |
The analysis: the tabs (Hit timing, Hit-offset distribution, Progression), the zoom, the inspection of one hit, the key highlights, the long-note analysis and the comparison curves. Nothing in it is a template's to redraw. |
status |
yes |
— |
What the page says while there is no analysis to show: reading the score, the error that stopped it, "no analysis". Nothing once the score is there (place it where status is not ready). |
Outputs
| Output |
Arguments |
Description |
back |
— |
Leaves the page for the song list (what the arrow does and Escape does). |
watch |
— |
Watches the replay in the game (what the Watch replay button does); refused while another one is being watched. |
watch.sideBySide |
— |
Watches the score beside the reference play on one clock (what the Watch side by side button does); the host refuses a reference of another rate or other chart modifiers. |
share |
replayId: string |
Shares the replay (what the Share button does). |
compare.pick |
replayId: string |
Chooses the play to compare the score with (a replayId of comparison.references). |
compare.clear |
— |
Clears the chosen reference: the best earlier play is shown again. |
Host classes
| Class |
Description |
replay-page |
The page's root: a column that fills the window, with the page's padding. Keep it, with data-block: 'replay', on the root of a template that wants the host's own sizes. |
pv-screen |
A screen root (page padding and entrance). |
page-header |
The header row: the way back, the title and the pickers and actions pushed to the end. |
replay-controls |
The pickers and the actions in a row that wraps, pushed to the end of the header. |
replay-actions |
The actions on the score (compare, watch, side by side, export, share, train) as one group. |
replay-scroll |
The box that holds the page's content (it scrolls under 800px). |
replay-content |
The centred column of the content: the banner, the comparison and the analysis. |
replay-layout |
The score overview and the graphs side by side. |
score-overview |
The score's column: the player, the figures and the judgement list. |
pv-plate |
The design system's plate (use with pv-plate--lg, and data-edge accent). |
pv-plate--lg |
The large plate: the shape of a panel (--pv-clip-lg). |
CSS variables
| Variable |
Description |
--map-color |
The colour of the difficulty on the chosen rating: the host paints the difficulty's name with it, and a template may do the same (vars: { '--map-color': c.bind('map.color') } on its root). |
Keys
| Key |
Effect |
| Escape |
Closes the comparison menu when it is open, else leaves the page for the song list. |
| + / - / 0 / arrows (on a graph) |
Zoom, pan and reset of the graph the focus is in. |
| ArrowLeft / ArrowRight / Home / End (on the graph's tabs and the inspection) |
Moves between the tabs, and from one judged note to the previous or the next, the first or the last. |
screen.result — Result
What the last play came to: the accuracy, the best combo and how many hits each judgement got, with a mark when the play was aborted, was an Auto play or does not count for the rankings. The host builds the heading with its marks, the list of judgement counts (a tier's symbol is the player's own, an image or a text) and the close button, and mounts them where the template says; the template writes the figures itself from the input and decides WHERE everything goes and how it is wrapped. It lives ten seconds, then goes away.
- Template:
screens.result (defineTheme({ screens: { result: (c) => … } }))
- Typed context:
ThemeContext<'screen.result'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
aborted boolean
auto boolean
ranked boolean
judgement string
accuracy number (percent)
maxCombo number
clear "aborted" | "perfect" | "fullCombo" | "clear"
newBest boolean
hits number
misses number
tiers[] object
id string
name string
color string
count number
Regions
| Region |
Slots |
Description |
summary |
title, tiers, close |
The heading with its marks, the list of judgement counts and the close button; the figures between them are the template's own. |
Slots
| Slot |
Required |
Mounts |
Description |
title |
yes |
— |
The heading (h2): "Result" or "Aborted", followed by the marks of an Auto play and of a play that does not count for the rankings. It is the summary's name for assistive technology (the summary is a polite live region). |
tiers |
yes |
— |
The list of judgement counts: one entry per judgement with its count, its colour swatch and its symbol (the player's own symbol, else the judgement's name). |
close |
yes |
— |
The close button: it removes the summary at once (what the ten-second expiry does later). |
Outputs
| Output |
Arguments |
Description |
dismiss |
— |
Removes the summary now (what the close button does). |
Host classes
| Class |
Description |
results |
The summary's own box: fixed over the foot of the window (left, right and bottom insets), a row with the heading pushed to the left, a plate under the interface themes. A stylesheet cannot make a box fixed, so a template keeps this class on its root and moves or reshapes the box with a class of its own (top, right, bottom, left, width, padding, the plate's ::before and ::after); a root without it would sit in the page's flow, under the song list. |
screen.settings — Settings
Change how the game plays, looks and sounds: seven categories (rail), a search over every setting, the open category's sections (panel) with its live summary. The screen's host builds every place from the stores and the settings and mounts it where the template says; the template only decides WHERE things go and how they are wrapped. The keyboard (arrows in the rail, / and Ctrl+F for the search, Escape), the focus trap and the live summaries stay the host's, and the settings controls keep reading the theme tokens.
- Template:
screens.settings (defineTheme({ screens: { settings: (c) => … } }))
- Typed context:
ThemeContext<'screen.settings'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
category object
id "gameplay" | "controls" | "audio" | "display" | "library" | "online" | "system"
label string
blurb string
changed number
index number
hasSummary boolean
categories[] object
id "gameplay" | "controls" | "audio" | "display" | "library" | "online" | "system"
label string
blurb string
changed number
selected boolean
search object
active boolean
query string
found number
changed number
Regions
| Region |
Slots |
Description |
header |
title, search, actions, close |
The title, the search and the window's own buttons. |
body |
notices, rail, panel |
The notices, the category list and the sections of the open category. |
footer |
hints |
The line of keyboard hints. |
Slots
| Slot |
Required |
Mounts |
Description |
title |
yes |
— |
The window's heading (h1): it names the dialog for assistive technology. |
search |
yes |
— |
The search field over every setting (/ and Ctrl+F reach it from anywhere in the window). |
actions |
yes |
— |
Export and import of the settings, and "Restore defaults" for all of them (it asks first). |
close |
yes |
— |
The Close button. |
notices |
yes |
— |
What the game has to say over the settings (updates…), the notice of an export or an import and the review of an imported file. Position the review ([data-part='review']) with the notice box if the layout moves it. |
rail |
yes |
— |
The category list: the tab list with arrows, Home and End, the count of changed settings and the pin menu; the choice --pv-layout-settings (side, top, index, rail) shapes it. |
panel |
yes |
— |
The scrolling panel: the open category's heading with its reset button and live summary, then its sections; or the rows a search found. It is the tabpanel of the rail. |
hints |
no |
— |
The keyboard hints (search, category, page, Escape): decoration, hidden from assistive technology. |
Outputs
| Output |
Arguments |
Description |
close |
— |
Closes the settings (what Escape and the Close button do). |
category.select |
id: string |
Opens a category (what a click on its tab does: the search is emptied and the panel scrolls to the top). An unknown id does nothing. |
search.focus |
— |
Puts the focus in the search field (what / does). |
search.clear |
— |
Empties the search and shows the open category again. |
Host classes
| Class |
Description |
settings-page |
The window's content: a column that clips what overflows. |
settings-top |
The header row (title, search, buttons) with a hairline under it. |
settings-top-actions |
The group of the header's buttons, pushed to the right. |
settings-layout |
The rail and the panel side by side (the choices data-layout-settings place them); stacked under 700px. |
Keys
| Key |
Effect |
| ArrowUp / ArrowDown / ArrowLeft / ArrowRight |
On a category tab: the previous or next category opens and takes the focus; Home and End go to the first and the last. |
| / or Ctrl+F |
Puts the focus in the search field and selects what it holds. |
| Enter / ArrowDown |
In the search field: the focus goes to the first row found. |
| Escape |
Closes what is open in the window first (a list, a capture), then empties the search, then closes Settings. |
| Tab / Shift+Tab |
Stays inside the window: from the last control to the first and back. |
| A letter on a category tab |
Starts a search with that letter. |
screen.skins — Skins
Choose the menus' interface (a carousel of the installed themes) and the skin the plays run: the page's title, the notices of a skin import or a configuration review, the interface picker, and the skins' section (its search and Actions menu, one card per skin with its Use, Customize, export, reset and remove buttons, then the problems the skins folder reported). The screen's host builds every place from the stores and mounts it where the template says; the template only decides WHERE things go and how they are wrapped. The interface picker is the one place a theme can never drop or hide: the host draws the page's default composition whenever the template does not leave it on screen.
- Template:
screens.skins (defineTheme({ screens: { skins: (c) => … } }))
- Typed context:
ThemeContext<'screen.skins'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
interfaces object
count number
current string
currentName string
skins object
count number
shown number
selected string
searching boolean
importers number
problems number
Regions
| Region |
Slots |
Description |
header |
title, notices |
The page's title and the notices of an import or of a configuration review. |
interfaces |
interfaces |
The interface picker: the themes as cards in a carousel. |
skins |
skinsHead, skins, problems |
The skins' section: its header, the cards and the folder's problems. |
Slots
| Slot |
Required |
Mounts |
Description |
title |
yes |
— |
The page's heading (h1). |
notices |
yes |
— |
The review of a configuration the player imported and the progress of a skin import (what was read, with its Edit and Dismiss buttons); nothing when there is none. |
interfaces |
yes |
— |
The interface picker: a search, the arrows and the Actions menu (open the themes folder, reload) over a carousel of one card per theme with its picture, name, description and author (arrows, Home and End, drag, the wheel); choosing a card applies the theme at once. The ONE place a template cannot lose: it is how a player leaves a theme that does not suit them, so the host draws its own default page when a template does not leave it visible. |
skinsHead |
yes |
— |
The skins' section header: its title with its help, the search (from eight skins) and the Actions menu (convert a skin, per-key-count skins, import, open the folder, reload). |
skins |
yes |
— |
One card per skin: preview, name, version, author, "in use" and key-count badges, the customization line, the reset and remove questions, the problems of the skin, and its buttons (Customize, Use, export, the configuration's export and import, remove, reset). Or the line that says there is no skin or none matches. |
problems |
yes |
— |
The problems the skins folder reported; nothing when there are none. |
Outputs
| Output |
Arguments |
Description |
interface.use |
id: string |
Wears an interface (what a click on its card does); an id of no installed theme falls back to the first one the game lists. |
skin.use |
id: string |
Runs a skin from the next map launch on (what Use does). |
skin.customize |
— |
Opens the editor on the skin in use (what Customize does). |
skins.import |
— |
Asks for a skin file to import (the Actions menu's Import). |
skins.folder |
— |
Opens the skins folder in the system's file manager. |
skins.reload |
— |
Reads the skins folder again. |
Host classes
| Class |
Description |
skins-page |
The page's root: a scrolling column, 1100px at most, centred. |
settings-heading |
The title row of a page (the heading and what sits beside it). |
skins-section |
The skins' section: its header, the cards and the problems, with the section's bottom margin. |
Keys
| Key |
Effect |
| ArrowLeft / ArrowRight / Home / End (on the interface carousel) |
Moves from one theme to the previous or next, the first or the last; the card with the focus is revealed. |
| Enter (in the interface search) |
Applies the first theme the search found. |
| Escape (in a search or a question) |
Empties the search, or closes the question of a reset or a removal, and does nothing else (the menu drawer stays shut). |
screen.title — Title
The screen the game opens on, once at each launch: the logo, the name, the cue to press a key, the band that moves with the music, the version, and the map of the library that plays. Any key, click or touch enters the game whatever the template draws (the host owns the window, the keys and the music). While the screen leaves, its root carries data-leaving, and --beat (0 to 1, on the music's bass) is set on it for a theme's theme.css to swell what it likes.
- Template:
screens.title (defineTheme({ screens: { title: (c) => … } }))
- Typed context:
ThemeContext<'screen.title'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
version string
leaving boolean
nowPlaying object
known boolean
title string
artist string
Regions
| Region |
Slots |
Description |
center |
logo, name, press |
The middle of the screen: the logo, the name and the cue. |
foot |
band, version, nowPlaying |
The bottom of the screen: the band, the version and the map that plays. |
Slots
| Slot |
Required |
Mounts |
Description |
logo |
no |
— |
The game's mark with its halo, which breathes and swells on the bass (--beat). |
name |
yes |
— |
The game's name (h1): the screen's heading for assistive technology. |
press |
yes |
— |
The cue that says how to enter ("press any key"): a player must always be told. |
band |
no |
— |
The spectrum band: bars that follow the music (a calm wave while none plays), drawn by the host in a canvas that fills the box it is given. |
version |
no |
— |
The game's version in a small plate. |
nowPlaying |
no |
— |
The map that plays: its artist and title in one line, nothing while none is drawn. |
Outputs
| Output |
Arguments |
Description |
enter |
— |
Enters the game now (what any key, click or touch does). |
Host classes
| Class |
Description |
title-center |
The default middle column: the logo, the name and the cue centred, a little above the middle. |
title-foot |
The default foot: a strip along the bottom edge that holds the band, with the version over it. |
title-glow |
The soft light that breathes behind the middle. |
CSS variables
| Variable |
Description |
--beat |
The music's bass, 0 to 1: quick to rise, slow to fall (0 under reduced motion). |
Keys
| Key |
Effect |
| Any key, click or touch |
Enters the game (the first one only starts the music when the browser held it back). |
screen.tournaments — Tournaments
The tournaments of the site: the list (filtered by status), one tournament with its facts, its entries and its bracket or standings, one match with its games, and the player's own entries with the next match and its countdown. The host reads the site; the game only reads it, and sends the four actions the site lets a player take from the game. A template places the screen's places and wraps them; the lists, the bracket and the countdown are the host's.
- Template:
screens.tournaments (defineTheme({ screens: { tournaments: (c) => … } }))
- Typed context:
ThemeContext<'screen.tournaments'>
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
gate "page" | "offline-note" | "login"
view "list" | "detail" | "match" | "mine"
filter "all" | "registration" | "running" | "finished"
loading boolean
failure? object
text string
notice? object
text string
list object
total number
page number
pages number
empty boolean
items[] object
slug string
name string
format string
status "draft" | "registration" | "seeding" | "running" | "finished" | "cancelled"
statusText string
mode string
entries number
maxEntries? number
when string
winner? string
tournament? object
slug string
name string
description? string
format string
status "draft" | "registration" | "seeding" | "running" | "finished" | "cancelled"
statusText string
mode string
metric string
bestOf number
entries number
maxEntries? number
registration string
starts string
entered boolean
canRegister boolean
canWithdraw boolean
entriesList[] object
id string
seed? string
name string
status string
members[] object
userId string
username string
captain boolean
self boolean
bracket[] object
bracket "winners" | "losers" | "grand_final"
name string
matches[] object
id string
round string
state "pending" | "ready" | "running" | "done" | "void"
bestOf number
sides[] object
name string
score? string
winner boolean
seed? string
when? string
referee? string
forfeit? string
standings[]? object
rank number
name string
points string
maps[] object
slot string
value string
tiebreaks[]? object
label string
value string
forfeitAfterMin number
pool[] object
slot string
tag string
tiebreaker boolean
playbackRate string
map string
qualifier? object
rules string
phaseText string
attempts? string
sessions[] object
id string
n number
when string
countdown string
seats string
state "scheduled" | "frozen" | "open" | "running" | "closed" | "cancelled"
stateText string
seat? object
state "subscribed" | "played" | "no_show" | "withdrawn"
text string
canTake boolean
canLeave boolean
playable boolean
joinable boolean
game? object
id string
round string
bestOf number
sides[] object
name string
score? string
winner boolean
seed? string
games[] object
number number
map string
playbackRate string
pickedBy? string
winner? number
scores[] object
side number
value string
mine[] object
slug string
name string
status string
entryStatus "registered" | "incomplete" | "disqualified" | "withdrawn"
entryText string
nextMatch? object
id string
opponent string
when string
countdown string
joinCode? string
qualifier? object
attempts string
next? object
session string
when string
countdown string
playable boolean
joinable boolean
Regions
| Region |
Slots |
Description |
header |
back, title, online |
The way back (to the list, or to the tournament), the title with its help bubble, and the connection chip with the chat button. |
status |
gate, failed, notice |
The notice of offline mode, the line that says what could not be read (with its retry), and the result of the last action. |
toolbar |
tabs, filters |
The tabs between the list and the player's own entries, and the status filter of the list. |
list |
list |
The tournaments on the site, as cards, with the pager. |
detail |
detail, qualifier, entries, bracket, standings |
One tournament: its facts and its actions, then its entries, then its bracket or its standings. |
match |
match |
One match: its sides and its games. |
mine |
mine |
The player's entries with the next match (or qualifier session) and its countdown. |
Slots
| Slot |
Required |
Mounts |
Description |
back |
yes |
— |
The back arrow: from a match to its tournament, from a tournament to the list, from the list to the song selection. |
title |
yes |
— |
The page's heading (h1) with the help bubble that says the game reads the site and sends only four actions. |
online |
yes |
— |
The online chip (the account's connection) and the chat button. |
gate |
yes |
— |
The notice of offline mode with its button to Settings → Online; nothing otherwise. |
failed |
yes |
— |
The line that says what could not be read, with its Retry button; nothing when everything was read. |
notice |
yes |
— |
The line that says what the last action did (registered, withdrawn, member removed); nothing otherwise. |
tabs |
yes |
— |
The two tabs of the page (All tournaments, My entries). |
filters |
yes |
— |
The status filter of the list (all, registration, running, finished) as a segmented control. |
list |
yes |
— |
The tournaments as cards (name, format, mode, status, entries, the date that matters) and the pager; or the line that there is none. |
detail |
yes |
— |
The tournament's header: name, status, format, mode, metric, dates, entries count and its actions (register, withdraw, join a team with a code). |
qualifier |
no |
— |
The qualifier played in lobbies at fixed sessions: its rules, the attempts left and each session with its seats; the player takes a seat, gives it back, or joins the lobby the server opened. Nothing for another tournament. Added in THEME_API 2. |
entries |
yes |
— |
The entries: seed, name, state and members, the captain marked and the player's own entry marked; a captain can remove a member. |
bracket |
yes |
— |
The bracket as columns of match cards; the columns scroll sideways inside the bracket only. Nothing for a qualifier. |
standings |
yes |
— |
The ranking of a qualifier or a Swiss tournament: rank, name, points, then the map by map scores (a qualifier) or the tiebreaks (a Swiss tournament); nothing when the tournament has no standings. |
match |
yes |
— |
One match: the sides, the round, the schedule, the referee, the forfeit, and the games with their maps and scores. |
mine |
yes |
— |
The player's entries as cards: the state, the next match with its countdown, the join code of a captain's own team. |
Outputs
| Output |
Arguments |
Description |
back |
— |
Leaves the page for the song selection (what the back arrow does on the list). |
nav.up |
— |
Goes back one level: from a match to its tournament, from a tournament to the list. |
refresh |
— |
Reads the page again (what Retry does): the list or the tournament, its matches and the player's entries. |
settings.open |
— |
Opens Settings → Online (what the offline notice's button does). |
view.select |
view: string |
Shows list or mine. An unknown view shows the list. |
filter.select |
filter: string |
Filters the list by all, registration, running or finished. An unknown filter shows all. |
page.select |
offset: number |
Shows the page of the list that starts at this offset (a multiple of the page size); the filter is kept. |
tournament.open |
slug: string |
Opens a tournament: its facts, entries, bracket or standings. |
match.open |
matchId: string |
Opens one match of the tournament shown: its sides and games. |
register |
teamName: string? |
Registers the player in the tournament shown (a team name is asked for a team tournament). |
join.team |
code: string |
Joins a team with its join code (the code the captain shows, never kept after). |
withdraw |
— |
Withdraws the player's entry from the tournament shown. |
member.remove |
userId: string |
Removes a member from the captain's team in the tournament shown. |
session.take |
sessionId: string |
Takes a seat in a session of the qualifier of the tournament shown (a team: its captain seats it). |
session.join |
— |
Joins the lobby of the qualifier session the server invited the player to (the invitation the notice card also offers). |
session.leave |
sessionId: string |
Gives a seat of a qualifier session back, with its attempt. |
Host classes
| Class |
Description |
tournaments |
The page's root: a column with the page's padding that fills the window. |
pv-screen |
A screen root (page padding and entrance). |
pv-ui |
The design system's plates and buttons under the root, in Classic too. |
pv-plate |
The design system's plate (use with pv-plate--lg, and data-tone or data-edge accent). |
page-head |
The header row (back, title, chips) that wraps when the window is narrow. |
label-line |
The row of the title and its help bubble. |
push |
An empty item that takes the free width of a row: what follows it is pushed to the end. |
body |
The page under the header: a column that fills the free height. |
bar |
A row of tabs and filters, wrapping when narrow. |
cards |
A grid of cards (the list, the entries, my entries). |
card |
One tournament, entry or match card (a plate). |
facts |
A list of terms (the tournament's facts). |
bracket-scroll |
The scrolling area of the bracket: the columns side by side, scrolling sideways. |
bracket-col |
One column of the bracket: the round's name and its match cards. |
mark |
A small status mark (data-state: registration, running, finished, cancelled, ...). |
note |
A line of the page's own words in the muted text. |
pager |
The previous and next buttons and the page number of a list. |
countdown |
The countdown to the next match, tabular figures. |
Keys
| Key |
Effect |
| ArrowLeft / ArrowRight (on the tabs) |
Moves from the list to "My entries" and back. |
| Escape (on a sub-page) |
Goes back one level (match to tournament, tournament to list). |
| Enter (on a tournament card) |
Opens the tournament. |
Components
catalog.card — Catalogue entry
One skin, mod or playlist of Prism's catalogue, with the action that installs it. The card is a list item the page provides (ul.cards); its state says what the action beside it offers (install, update, cancel, installed), which is what a template must keep.
- Template:
components['catalog.card']
- Typed context:
ThemeContext<'catalog.card'>
- Default renderer:
CatalogCard
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
Face
This contract is a face: the host draws and owns the card's own root (its button or plate, keyboard, menus, tooltips, actions and accessible name); a template draws what is inside it from the input, and uses slots for the host's own widgets. A face has no button, toggle, dropdown, no slot of another contract, calls no output, and none is required of it.
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "available" | "update" | "installed" | "downloading" | "installing"
kind "skin" | "mod" | "playlist"
id string
name string
versionText string
byText string
size string
hash string
description? string
tags[] string
cover? string
shots[] object
url string
alt string
permissions[] string
badge? string
state = available:
{}
state = update:
from string
state = installed:
disabled boolean
state = downloading:
percent? number
state = installing:
{}
States
| State |
Meaning |
available |
Not installed: the action is an Install button. |
update |
Installed, and the catalogue lists a newer version: the action is an Update button. |
installed |
In the library: a check mark, the card is muted. |
downloading |
The file is being received: a Cancel button, the percentage under the card and a meter along its foot. |
installing |
Being installed: no action, "installing" under the card. |
Outputs
| Output |
Arguments |
Description |
install.ask |
— |
Starts the install (what the Install and Update button does): a skin or a playlist installs at once, a mod first asks the player to confirm what it can do. |
install.cancel |
kind: "skin" | "mod" | "playlist", id: string |
Cancels the download in progress. |
Slots
| Slot |
Description |
permissions |
The permissions a mod asks for, each with its badge and what it means in plain words (or "asks for nothing"): a face may place it; the install confirmation lists them again, so a face that leaves it out hides nothing a player must see. |
progress |
The progress and the result of an install (percentage, "installing", done with the buttons that follow, failed with its reason): the host draws it under the card itself (a face cannot place it). |
below |
The question a mod's install asks before it starts (what it can do, its hash, Install and Cancel): the host draws it under the card itself (a face cannot place it). |
Parts
| Part |
Role |
Description |
cover |
img |
The first screenshot. |
install |
button |
The Install or Update button. |
cancel |
button |
The Cancel button of a running download. |
installed |
img |
The check mark of an installed entry. |
Accessibility
- Role:
listitem
- Name: The entry's name, with its version and author.
- Focus: The list item is a focus target by program; the buttons inside are in the tab order.
| Keyboard |
Effect |
| Tab |
Reaches the card's buttons: Install, Update or Cancel, then the ones of its result and of its question. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
install-button |
install exists with role button, reachable by keyboard |
available, update |
An entry that is not installed offers a real Install or Update button, reachable by the keyboard. |
install-click |
click on install calls install.ask() |
available, update |
Pressing the button starts the install. |
install-enter |
Enter on install calls install.ask() |
available, update |
Enter on the button starts the install. |
no-install-when-running |
install is not drawn |
installed, downloading, installing |
An entry that is installed, being received or being installed offers no Install button. |
cancel-button |
cancel exists with role button, reachable by keyboard |
downloading |
A download in progress can be cancelled with a real button, reachable by the keyboard. |
cancel-click |
click on cancel calls install.cancel(kind, id) |
downloading |
Pressing Cancel cancels the download. |
installed-mark |
installed exists with role img, not a tab stop |
installed |
An installed entry shows its check mark. |
download.card — Download result
One result of the Download page: a set of osu!, Quaver, a mod's source or Prism's index, or an Etterna pack, with the action that downloads it. The card is a list item the page provides (ul.cards); its state says what the action beside it offers (download, wait, progress, installed, retry), which is what a template must keep.
- Template:
components['download.card']
- Typed context:
ThemeContext<'download.card'>
- Default renderer:
DownloadCard
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
Face
This contract is a face: the host draws and owns the card's own root (its button or plate, keyboard, menus, tooltips, actions and accessible name); a template draws what is inside it from the input, and uses slots for the host's own widgets. A face has no button, toggle, dropdown, no slot of another contract, calls no output, and none is required of it.
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "idle" | "locked" | "unavailable" | "queued" | "active" | "failed" | "installed"
shape "set" | "pack"
kind "osu" | "quaver" | "etterna" | "mod"
id number
title string
edge string
set? object
artist string
creator? string
creatorText? string
cover string
badges[] string
keySummary string
difficulties[] object
keysText string
keys number
rating? string
color string
title string
skills[] object
badge string
color string
more number
bpm? string
plays? string
longNotes? string
extra? object
tags[] string
size? string
details[] object
label string
value string
pack? object
cover? string
nsfw boolean
songs string
size string
plays string
tags string
skills[] object
key string
label string
value string
color string
main boolean
open boolean
progress? number
reason? object
text string
detail? string
message? string
startDisabled boolean
actions[] object
id string
label string
previewable boolean
state = idle:
redownload boolean
state = locked:
lock "quaver" | "mod"
state = unavailable:
{}
state = queued:
{}
state = active:
phase "downloading" | "extracting"
percent? number
state = failed:
jobId number
state = installed:
{}
States
| State |
Meaning |
idle |
Not downloaded: the action is a download button. |
locked |
Not downloaded and the source needs a login first: the action is a lock that opens the settings. |
unavailable |
Not downloaded and nothing to start from the action: a result with no public source, or one that only has the buttons its source adds. |
queued |
Waiting in the queue: a clock. |
active |
Downloading or extracting: the percentage, and a progress line along the card. |
failed |
The last try failed: a retry button, and the reason under the card. |
installed |
In the library: a check mark, the card is muted. |
Outputs
| Output |
Arguments |
Description |
download.start |
— |
Starts the download of the result (its main file). |
download.action |
action: string |
Starts the download of another file of a mod's result (a button its source adds); the argument is the action's id. |
download.retry |
jobId: number |
Starts a failed download again. |
settings.open |
target: string |
Opens the settings where the login of a locked source is made (quaver-token or mod-downloads). |
preview.open |
— |
Opens the map preview of a Prism result, over the queue. |
pack.toggle |
id: number |
Opens or closes the songs of an Etterna pack under its card. |
Slots
| Slot |
Description |
contents |
The songs of an open Etterna pack: the host draws them under the card itself (a face cannot place them). |
Parts
| Part |
Role |
Description |
toggle |
button |
The pack's main control: opens or closes its songs. |
download |
button |
The download button. |
retry |
button |
Starts the failed download again. |
lock |
button |
The lock of a source that needs a login: opens the settings. |
installed |
img |
The check mark of an installed result. |
queued |
img |
The clock of a queued download. |
progress |
text |
The percentage of a running download. |
reason |
status |
Why the download failed. |
preview |
button |
The Preview button of a Prism result. |
Accessibility
- Role:
listitem
- Name: The result's title and artist (a pack: its name).
- Focus: The list item is a focus target by program (the result list's arrows land on it); the buttons inside are in the tab order.
| Keyboard |
Effect |
| Enter |
On the card: does what its main control does (the download button; a pack: opens or closes it). |
| Tab |
Reaches the card's buttons: the pack's main control, the action, the extra buttons and the preview. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
download-button |
download exists with role button, reachable by keyboard |
idle |
An idle result with something to download has a real download button, reachable by the keyboard. |
download-click |
click on download calls download.start() |
idle |
Pressing the download button starts the download. |
download-enter |
Enter on download calls download.start() |
idle |
Enter on the download button starts the download. |
no-download-when-running |
download is not drawn |
queued, active, failed, installed, locked, unavailable |
A result that is queued, running, failed, installed, locked or without a source offers no download button. |
retry-click |
click on retry calls download.retry(jobId) |
failed |
A failed download can be started again. |
retry-enter |
Enter on retry calls download.retry(jobId) |
failed |
Enter on Retry starts the failed download again. |
lock-button |
lock exists with role button, reachable by keyboard |
locked |
A locked source offers a real lock button that opens the settings, reachable by the keyboard. |
installed-mark |
installed exists with role img, not a tab stop |
installed |
An installed result shows its check mark. |
queued-mark |
queued exists with role img, not a tab stop |
queued |
A queued result shows its clock. |
progress-shown |
progress shows percent |
active |
A running download shows its percentage. |
leaderboard.card — Leaderboard card
One score of the chart's leaderboard: rank, player, the rate it was played at, accuracy, the tiers and the combo, with the buttons beside it (ghost, share, watch, report). A list card sits in a list item the screen provides; the player's own play is drawn alone under the list. Not contracted yet and mounted as they are: TierCounts, PauseChip and the tooltip action.
- Template:
components['leaderboard.card']
- Typed context:
ThemeContext<'leaderboard.card'>
- Default renderer:
LeaderboardCard
Face
This contract is a face: the host draws and owns the card's own root (its button or plate, keyboard, menus, tooltips, actions and accessible name); a template draws what is inside it from the input, and uses slots for the host's own widgets. A face has no button, toggle, dropdown, no slot of another contract, calls no output, and none is required of it.
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "local" | "localGhost" | "online" | "onlineGhost" | "onlineLoading" | "onlineFailed" | "onlineStatic" | "own"
rank number
podium? "gold" | "silver" | "bronze"
player object
name? string
label string
badges object
received boolean
mirror boolean
osuImport boolean
unranked boolean
rate object
value number
text string
mods? string
pauses? ref @pvng/library:PauseCounts
combo number
misses? number
tiers[]? object
name string
color string
gradient[]? string
symbol? ref @pvng/desktop:JudgementSymbol
count number
accuracy object
value number
text string
performance? object
text string
unavailable boolean
nonstandard boolean
date object
ms number (ms)
iso string
text string
report? object
scoreId number
player string
label string
state = local:
replayId string
state = localGhost:
replayId string
ghost object
id string
chosen boolean
disabled? boolean
title string
state = online:
replayId number
watchLabel string
state = onlineGhost:
replayId number
watchLabel string
ghost object
id string
chosen boolean
disabled? boolean
title string
state = onlineLoading:
replayId number
watchLabel string
ghost? object
id string
chosen boolean
disabled? boolean
title string
state = onlineFailed:
replayId number
watchLabel string
ghost? object
id string
chosen boolean
disabled? boolean
title string
state = onlineStatic:
{}
state = own:
{}
States
| State |
Meaning |
local |
A play of this machine, a button that opens its replay, with a share button; no ghost button (the Ghost modifier is not published). |
localGhost |
A play of this machine with a ghost button beside the share button. |
online |
A play of the online board with a replay: a button that opens it, and a watch button. |
onlineGhost |
A play of the online board with a replay, with a ghost button before the watch button. |
onlineLoading |
A play of the online board whose replay is downloading: a wait mark replaces the watch button (the ghost button, when offered, stays). |
onlineFailed |
A play of the online board whose replay could not be downloaded: a retry button replaces the watch button (the ghost button, when offered, stays). |
onlineStatic |
A play of the online board with no replay: not a button, nothing beside it. |
own |
The player's own online play, pinned under the list: not a button, nothing beside it. |
Outputs
| Output |
Arguments |
Description |
replay.open (required) |
replayId: string |
Opens the replay of a local play. |
replay.watch (required) |
replayId: number |
Opens the replay of an online play (the host downloads it first when it is not on disk). |
replay.retry |
replayId: number |
Asks again for the replay of an online play whose download failed. |
replay.share |
replayId: string |
Shares the replay of a local play. |
ghost.pick |
ghostId: string, chosen: boolean |
Picks the play as the ghost of the next one, or clears the choice when it is the ghost already. Picking a local play switches the rate and the chart modifiers to the play's; an online play first needs its replay, which is downloaded. |
play.report |
scoreId: number, player: string |
Opens the report dialog for a play of the online board: the player tells the staff why it breaks the ranked rules. Nothing changes by itself and the reported player is never told. |
Slots
| Slot |
Description |
tiers |
The count of every tier of the judgement (the game's own widget; nothing when the counts do not name the tiers). |
pauses |
The pauses of the play (the game's own chip, with its tooltip; nothing when none). |
Parts
| Part |
Role |
Description |
open |
button |
The card itself, when the play has a replay to open (a local play, or an online play that has one). |
rank |
text |
The rank. |
name |
text |
The player's name, or the unknown player text. |
rate |
text |
The playback rate the play was made at. |
mods |
text |
The chart modifiers of the play (a local play that recorded some). |
combo |
text |
The best combo. |
misses |
text |
The notes missed, when the card has no tier counts. |
accuracy |
text |
The accuracy. |
performance |
text |
The performance value, or why there is none. |
date |
time |
When the play was made. |
ghost |
button |
The ghost toggle: pressed when the play is the ghost. |
share |
button |
Shares the replay. |
watch |
button |
Opens the replay of an online play. |
retry |
button |
Asks again for a replay that could not be downloaded. |
loading |
img |
The replay is downloading. |
report |
button |
Reports a play of the online board to the staff (another player's play, signed in and online). |
Accessibility
- Role:
none
- Name: The root has no role of its own (
display: contents). The card is a button named by its content (a local play) or "Watch the replay of <player>" (an online play); the buttons beside it are named by their own labels.
- Focus: The card, then the buttons beside it in reading order: ghost, then share (local) or watch, wait or retry (online), then report (another player's online play). The ghost button is a toggle (
aria-pressed) that stays reachable when the play cannot be a ghost (aria-disabled, the reason in its tooltip).
| Keyboard |
Effect |
| Enter / Space |
On the card: opens the replay. On a button beside it: its action (a ghost toggle, share, watch, retry, report). |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
open-is-button |
open exists with role button, reachable by keyboard |
local, localGhost, online, onlineGhost, onlineLoading, onlineFailed |
A play with a replay is a real button, reachable by the keyboard. |
no-open-without-replay |
open is not drawn |
onlineStatic, own |
A card with no replay to open is not a button. |
open-local-click |
click on open calls replay.open(replayId) |
local, localGhost |
Clicking a local play opens its replay. |
open-local-enter |
Enter on open calls replay.open(replayId) |
local, localGhost |
Enter on a local play opens its replay. |
open-online-click |
click on open calls replay.watch(replayId) |
online, onlineGhost, onlineLoading, onlineFailed |
Clicking an online play with a replay opens it. |
open-online-enter |
Enter on open calls replay.watch(replayId) |
online, onlineGhost, onlineLoading, onlineFailed |
Enter on an online play with a replay opens it. |
rate-shown |
rate shows rate.text |
all |
The rate the play was made at is shown. |
name-shown |
name shows player.label |
all |
The player's name is shown; a missing one reads as the unknown player, never as the local player. |
accuracy-shown |
accuracy shows accuracy.text |
all |
The accuracy is shown. |
date-shown |
date shows date.text |
all |
The date of the play is shown. |
no-misses-with-tiers |
misses is not drawn |
local, localGhost |
A local card counts the misses once, in the Miss tier: there is no separate total. |
ghost-toggle |
ghost exists with role button, reachable by keyboard |
localGhost, onlineGhost |
The ghost button is a real button, reachable by the keyboard. |
ghost-click |
click on ghost calls ghost.pick(ghost.id, ghost.chosen) |
localGhost, onlineGhost |
Clicking the ghost button picks the play as the ghost. |
ghost-enter |
Enter on ghost calls ghost.pick(ghost.id, ghost.chosen) |
localGhost, onlineGhost |
Enter on the ghost button picks the play as the ghost. |
no-ghost-unoffered |
ghost is not drawn |
local, online, onlineStatic, own |
Without the Ghost modifier there is no ghost button. |
share-click |
click on share calls replay.share(replayId) |
local, localGhost |
Share asks to share the replay. |
share-enter |
Enter on share calls replay.share(replayId) |
local, localGhost |
Enter on Share asks to share the replay. |
no-share-online |
share is not drawn |
online, onlineGhost, onlineLoading, onlineFailed, onlineStatic, own |
An online play is not shared from the board. |
watch-click |
click on watch calls replay.watch(replayId) |
online, onlineGhost |
Watch opens the replay of an online play. |
watch-enter |
Enter on watch calls replay.watch(replayId) |
online, onlineGhost |
Enter on Watch opens the replay of an online play. |
wait-while-loading |
loading exists with role img, not a tab stop |
onlineLoading |
A replay that is downloading shows a wait mark, not a watch button. |
no-watch-while-loading |
watch is not drawn |
onlineLoading, onlineFailed, onlineStatic, own, local, localGhost |
A replay that is downloading cannot be watched from the beside button. |
retry-click |
click on retry calls replay.retry(replayId) |
onlineFailed |
A failed download can be asked again. |
retry-enter |
Enter on retry calls replay.retry(replayId) |
onlineFailed |
Enter on Retry asks again for the replay. |
no-report-own-or-local |
report is not drawn |
local, localGhost, own |
Only a play of the online board is reported, never the player's own or one of this machine. |
library.chartRow — Difficulty row
One difficulty of the open set in the song list (or one map of an open playlist): its layout, name, the marks it carries (missing file, silent, note, goals), why it is listed, its main pattern, its rating and that rating as ten stars. The list owns the row it sits in and the context menus; this contract only draws the button and asks. MissingMark and GoalMark are mounted as they are (not contracted yet).
- Template:
components['library.chartRow']
- Typed context:
ThemeContext<'library.chartRow'>
- Default renderer:
LibraryChartRow
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
Face
This contract is a face: the host draws and owns the card's own root (its button or plate, keyboard, menus, tooltips, actions and accessible name); a template draws what is inside it from the input, and uses slots for the host's own widgets. A face has no button, toggle, dropdown, no slot of another contract, calls no output, and none is required of it.
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "normal" | "selected" | "playlist"
position number
difficulty number
path string
variant number
selected boolean
themed boolean
name string
keysText string
color string
missing? "audio" | "background" | "both"
noAudio boolean
noted boolean
goal? "open" | "reached"
rate? object
text string
title string
similar? object
text string
title string
rateOf? object
label string
help string
pattern? object
short string
color string
names string
rating string
ratingUnit string
stars[] object
lit boolean
plays? object
text string
title string
state = normal:
{}
state = selected:
{}
state = playlist:
{}
States
| State |
Meaning |
normal |
A difficulty of the open set that is not the selected one. |
selected |
The selected difficulty (aria-current). |
playlist |
A map of an open playlist: a click selects it, and the selection column then plays it alone (there is no context menu); selected says whether it is the focused one. |
Outputs
| Output |
Arguments |
Description |
activate (required) |
position: number, difficulty: number, alreadySelected: boolean, dragDistance: number (px) |
A click or Enter on the row. The first click selects the difficulty; a click on the already-selected one confirms it (plays it, or picks it as the lobby map) when the player's "click the selected map to play" setting is on, nothing is loading and the pointer did not travel (a scroll or a drag never launches). The renderer only reports how far the pointer travelled between press and release (0 for the keyboard). |
pickPlaylistMap (required) |
path: string, variant: number |
Selects the map of an open playlist, by its file and difficulty index. |
menu.open |
x: number (px), y: number (px) |
The context menu (right click, Menu key, Shift+F10) at a point of the screen; the list owns it and gives focus back to the row when it closes. A playlist's map has none. |
Slots
| Slot |
Description |
goal |
The goal mark of the chart (drawn when a goal is open or reached; nothing otherwise): the game's own widget, with its tooltip. |
missing |
The warning mark of a chart that lacks its audio or its picture (nothing when nothing is missing): the game's own widget, with its tooltip. |
Parts
| Part |
Role |
Description |
keys |
text |
The layout. |
name |
text |
The difficulty name, then its marks (missing file, silent, note, goals). |
rate |
text |
The rate a playlist plays the map at. |
similar |
text |
Why a "Similar maps" list shows the chart. |
rateOf |
text |
The proven rate copy label. |
pattern |
text |
The main pattern capsule. |
rating |
text |
The rating figure and its unit. |
plays |
text |
The own plays count. |
Accessibility
- Role:
button
- Name: The row's own text: layout, name (with the marks' words), the rate, the why, the pattern, the rating and the plays.
- Focus: One tab stop per row; the selected row carries
aria-current="true".
| Keyboard |
Effect |
| Enter / Space |
Selects the difficulty; on the selected one it confirms it when the setting is on. |
| Menu / Shift+F10 |
Opens the context menu. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
button |
root exists with role button, reachable by keyboard |
all |
A difficulty row is a button the keyboard reaches. |
activate-click |
click on root calls activate(position, difficulty, selected, 0±1) |
normal, selected |
A click selects (or confirms) the difficulty, naming its indexes. |
activate-enter |
Enter on root calls activate(position, difficulty, selected, 0±1) |
normal, selected |
Enter selects (or confirms) the difficulty, naming its indexes. |
pick-playlist-map |
click on root calls pickPlaylistMap(path, variant) |
playlist |
A click on a playlist's map picks it. |
name |
name shows name |
all |
The difficulty name is shown. |
keys |
keys shows keysText |
all |
The layout is shown. |
rating |
rating shows rating |
all |
The rating is shown. |
The rating and judgement dropdowns and the main button under the selected map (Play, Train or Choose) or the selected playlist (Play as playlist, Marathon). The reason a button is off is always readable, and the dropdowns stay usable. Not contracted yet and still bound to their stores inside the default renderer: MenuDropdown, JudgementQuick (the parameters and the tier windows of the quick judgement panel), UnrankedMark.
- Template:
components['library.footer']
- Typed context:
ThemeContext<'library.footer'>
- Default renderer:
LibraryFooter
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "mapReady" | "mapBlocked" | "mapRefused" | "mapNoPlay" | "playlistReady" | "playlistBlocked"
rating object
value string
options[] object
value string
label string
group string
detail string
judgement object
value string
label string
ariaLabel string
options[] object
value string
label string
group string
detail string
refusal? string
state = mapReady:
play object
label string
intent "play" | "train" | "pick-lobby-map"
unrankedSlot boolean
unranked boolean
state = mapBlocked:
play object
label string
intent "play" | "train" | "pick-lobby-map"
unrankedSlot boolean
unranked boolean
reason object
kind "lobby" | "loading" | "section" | "staircase" | "busy"
text string
state = mapRefused:
play object
label string
intent "play" | "train" | "pick-lobby-map"
unrankedSlot boolean
unranked boolean
state = mapNoPlay:
{}
state = playlistReady:
playlistId number
state = playlistBlocked:
playlistId number
reason object
kind "empty" | "running"
text string
| State |
Meaning |
mapReady |
A map is selected and its main button can be pressed. |
mapBlocked |
The main button of the map is off for a reason that is not the judgement: the lobby plays the map, the map is loading, no training section is chosen, the staircase options are refused, or the game is busy. reason says it. |
mapRefused |
The main button of the map is off because no judgement can be used: refusal is shown and is also what describes the button. |
mapNoPlay |
A map shown without its main button. The game does not build it any more: a map looked at from a playlist has Play, like any map. |
playlistReady |
A playlist is selected and can start. |
playlistBlocked |
A playlist is selected and cannot start (it has no map, or a run of it is going). reason says it. |
| Output |
Arguments |
Description |
rating.pick |
value: string |
Chooses the rating the game reads charts with. |
judgement.pick |
value: string |
Chooses the judgement of the next plays: a set (set:<key>) or a custom preset (custom:<index>). |
judgement.settings |
— |
Opens the Judgement page of the Settings. |
confirm (required) |
— |
The main button of a map: plays it, trains the section (Training tab) or picks it as the lobby's map, as chart.confirm decides (it is also what Enter does on the page). |
playlist.start |
playlistId: number |
Plays the playlist map after map. |
marathon.start |
playlistId: number |
Plays the playlist as one marathon map. |
| Part |
Role |
Description |
rating |
button |
The rating dropdown's trigger. |
judgement |
button |
The judgement dropdown's trigger. |
refusal |
alert |
The line that says no judgement can be used. |
play |
button |
The main button of a map. |
unranked |
none |
The room of the "unranked" mark (empty when the chart is ranked or unknown). |
reason |
none |
The visually hidden line that says why a button is off; the button is described by it. |
start |
button |
Plays the selected playlist map after map. |
marathon |
button |
Plays the selected playlist as one marathon. |
- Role:
none
- Name: The strip has no role of its own: the dropdowns and buttons are named by their labels, and a button that is off is described by the reason (the hidden line, or the visible refusal).
- Focus: The dropdowns and the buttons that are on; a button that is off is skipped, and the reason stays readable.
| Keyboard |
Effect |
| Tab |
Rating, Judgement, then the main button (for a playlist: Play as playlist, then Marathon). |
| Enter / Space |
On a button: presses it. On the page: Enter does what the main button does (chart.confirm). |
| ArrowUp / ArrowDown |
On a dropdown: opens its list. |
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
rating-picker |
rating exists with role button, reachable by keyboard |
all |
The rating can be chosen from the keyboard. |
judgement-picker |
judgement exists with role button, reachable by keyboard |
all |
The judgement can be chosen from the keyboard. |
rating-stays-on |
rating can be used |
all |
The rating stays usable whatever the state of Play. |
judgement-stays-on |
judgement can be used |
all |
The judgement stays usable whatever the state of Play, so a refusal can be fixed. |
play-is-a-button |
play exists with role button, reachable by keyboard |
mapReady |
Play is a real button, reachable by keyboard. |
play-click |
click on play calls confirm() |
mapReady |
Clicking Play confirms the chart. |
play-enter |
Enter on play calls confirm() |
mapReady |
Enter on Play confirms the chart. |
play-label |
play shows play.label |
mapReady, mapBlocked, mapRefused |
The button says what it does. |
play-off |
play cannot be pressed |
mapBlocked, mapRefused |
Play cannot be pressed while it is off. |
play-reason |
play shows reason.text |
mapBlocked |
The reason Play is off is readable (it describes the button). |
play-refusal |
play shows refusal |
mapRefused |
When no judgement can be used, the refusal describes Play. |
refusal-alert |
refusal exists with role alert, not a tab stop |
mapRefused |
The refusal is announced as an alert. |
no-play-in-playlist |
play is not drawn |
mapNoPlay |
A map shown without its main button draws none. |
marathon-is-a-button |
marathon exists with role button, reachable by keyboard |
playlistReady |
Marathon is a real button, reachable by keyboard. |
marathon-click |
click on marathon calls marathon.start(playlistId) |
playlistReady |
Clicking Marathon plays the playlist as one map. |
playlist-start-click |
click on start calls playlist.start(playlistId) |
playlistReady |
Clicking Play as playlist plays it map after map. |
playlist-off |
marathon cannot be pressed |
playlistBlocked |
Neither button of a playlist that cannot start can be pressed. |
playlist-start-off |
start cannot be pressed |
playlistBlocked |
Play as playlist cannot be pressed when the playlist cannot start. |
playlist-reason |
marathon shows reason.text |
playlistBlocked |
The reason a playlist cannot start is readable (it describes the buttons). |
playlist-start-reason |
start shows reason.text |
playlistBlocked |
The reason also describes Play as playlist. |
library.search — Song search bar
The field where the list is searched, with what narrows it (filter chips, grouping, sort) and the popover of recent searches. The same bar serves the playlists list (mode playlists), where only the text and the sort apply (the host searches the playlists' names and maps). Not contracted yet and still bound to their own stores inside the default renderer: MenuDropdown (the sort and grouping choices), HelpTip; the "Filter" button and its window (FilterWindow) are the host's content of the filterWindow slot. The popover of recent searches is a part of the renderer: it only reads the history of the input (which entries are listed, typed text narrowing them and the open state are its own view state).
- Template:
components['library.search']
- Typed context:
ThemeContext<'library.search'>
- Default renderer:
LibrarySearch
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "ready" | "filtered" | "blocked" | "invalid"
mode "maps" | "playlists"
query string
sort object
value string
label string
options[] object
value string
label string
group string
descending boolean
active boolean
caption string
directionLabel string
group? object
value string
label string
options[] object
value string
label string
group string
grouped boolean
allFolded boolean
canFoldAll boolean
caption string
filters[] object
key string
label string
value string
tip string
removeLabel string
unavailable boolean
fieldKeys[] string
history? object
enabled boolean
entries[] object
id string
query string
label string
pinned boolean
reviewing boolean
syntax object
pending? string
unrecognised? string
state = ready:
{}
state = filtered:
{}
state = blocked:
status string
error? string
state = invalid:
error string
States
| State |
Meaning |
ready |
The bar works and no filter chip is active. |
filtered |
The bar works and at least one filter chip narrows the list. |
blocked |
A filter chip cannot apply now (its provider is gone); status says why. error is set when the filters window also refused something. |
invalid |
The last filter could not be applied; error says what is wrong. |
Outputs
| Output |
Arguments |
Description |
query.set |
text: string |
The text changed (every keystroke), or was emptied. In playlists mode it is the playlists' own filter. |
query.commit |
text: string |
The field lost the focus, or Enter: the composed search is kept in the history and the closed criteria become chips. Maps only. |
sort.set |
key: string |
Another sort key (the playlists' own sort in playlists mode). |
sort.toggleDirection |
— |
Ascending or descending. |
group.set |
key: string |
Another grouping. |
group.collapseAll |
— |
Folds every group. |
group.expandAll |
— |
Opens every group. |
reshuffle |
— |
Draws the random order again (sort "random"). |
filter.edit |
key: string |
Opens the filters window on a criterion (the chip was clicked). The host gives it: the window is its own. |
filter.remove |
key: string |
Removes a filter chip. |
history.restore |
id: string |
Applies a recent search again. |
history.pin |
id: string |
Pins or unpins a recent search. |
history.remove |
id: string |
Forgets one recent search. |
history.clear |
— |
Forgets every recent search that is not pinned. |
history.pause |
— |
Stops recording the searches. |
history.resume |
— |
Records the searches again. |
duplicates.review |
— |
Starts or stops the review of the duplicates. |
duplicates.reveal |
— |
Shows the duplicate of the selected map in the list. |
Slots
| Slot |
Description |
filterWindow |
The "Filter" button and its window (FilterWindow, not contracted yet); the host sets the window's criterion when filter.edit is asked. Maps only. |
Parts
| Part |
Role |
Description |
bar |
none |
The plate under the field and the tools (a theme that draws its own field clears it: --plate: transparent). |
field |
combobox |
The search text; ArrowDown opens the recent searches. |
clear |
button |
Empties the text (shown while there is some). |
history |
region |
The recent searches popover (open on demand). |
sort |
button |
The sort choice. |
direction |
button |
Ascending or descending. |
group |
button |
The grouping choice (maps only). |
filters |
group |
The active filter chips (present while there are some). |
status |
status |
The line that says a filter cannot apply now. |
syntax |
status |
The line that previews a criterion being typed, or says a word shaped like one is not recognised. |
error |
alert |
The line that says the last filter was refused. |
Host classes
| Class |
Description |
library-search |
The bar's root (placed with its margins by the game). |
search-bar |
The plate under the field and the tools. |
filter-chips |
The row of filter chips. |
bar-menu |
A group of the tools row (grouping, sort, duplicates, filter). |
pv-plate |
A plate of the design system. |
Accessibility
- Role:
none
- Name: The bar has no role of its own: the field is a combobox named after the list it searches (the maps or the playlists), the chips and the choices by their labels.
- Focus: The field takes the focus when the screen opens; the chips, then the choices follow in reading order.
| Keyboard |
Effect |
| ArrowDown |
Opens the recent searches, then walks them. |
| Enter |
Keeps the typed criterion as a chip, or applies the recent search under the focus. |
| Escape |
Closes the recent searches, then empties the text. |
| Backspace |
In an empty field, removes the last chip. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
field |
field exists with role combobox, reachable by keyboard |
all |
The list can always be searched by text. |
sort |
sort exists with role button, reachable by keyboard |
all |
The sort can be changed. |
direction |
click on direction calls sort.toggleDirection() |
all |
The sort direction can be flipped. |
filters-listed |
filters exists with role group, not a tab stop |
filtered, blocked |
The active filters stay listed in the bar (each chip removable through filter.remove). |
filters-absent |
filters is not drawn |
ready |
Without a filter there is no chip row. |
status-shown |
status shows status |
blocked |
A filter that cannot apply is said in words. |
error-alert |
error exists with role alert, not a tab stop |
invalid |
A refused filter is announced as an alert. |
error-shown |
error shows error |
invalid |
The refusal says what is wrong. |
library.setCard — Set card
One beatmapset (or playlist) of the song list: artwork, title, artist, a line of facts, the layouts, the rating and a strip of difficulty chips. The list owns the row it sits in, the "+N" popover and the context menus; this contract only draws the card and asks. MissingMark and GoalMark are mounted as they are (not contracted yet).
- Template:
components['library.setCard']
- Typed context:
ThemeContext<'library.setCard'>
- Default renderer:
LibrarySetCard
Face
This contract is a face: the host draws and owns the card's own root (its button or plate, keyboard, menus, tooltips, actions and accessible name); a template draws what is inside it from the input, and uses slots for the host's own widgets. A face has no button, toggle, dropdown, no slot of another contract, calls no output, and none is required of it.
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "collapsed" | "selected" | "expanded" | "playlist" | "loading"
state = collapsed:
position number
id string
selected boolean
expanded boolean
themed boolean
title string
artist string
creator? object
name string
text string
color string
thumbnail string
mosaic[]? string
similar? object
text string
title string
newText? string
countText string
missing? "audio" | "background" | "both"
noted boolean
plays? object
text string
title string
keysText string
goal? "open" | "reached"
advice? object
kind "comfort" | "push" | "stretch"
text string
rating object
text string
range string
unit string
strip object
tier "dot" | "rating" | "full" | "pattern"
chipWidth number (px)
gap number (px)
maxWidth number (px)
minWidth number (px)
chips[] object
key number
color string
keysText string
short string
pattern? object
short string
color string
more? object
count number
label string
state = selected:
position number
id string
selected boolean
expanded boolean
themed boolean
title string
artist string
creator? object
name string
text string
color string
thumbnail string
mosaic[]? string
similar? object
text string
title string
newText? string
countText string
missing? "audio" | "background" | "both"
noted boolean
plays? object
text string
title string
keysText string
goal? "open" | "reached"
advice? object
kind "comfort" | "push" | "stretch"
text string
rating object
text string
range string
unit string
strip object
tier "dot" | "rating" | "full" | "pattern"
chipWidth number (px)
gap number (px)
maxWidth number (px)
minWidth number (px)
chips[] object
key number
color string
keysText string
short string
pattern? object
short string
color string
more? object
count number
label string
state = expanded:
position number
id string
selected boolean
expanded boolean
themed boolean
title string
artist string
creator? object
name string
text string
color string
thumbnail string
mosaic[]? string
similar? object
text string
title string
newText? string
countText string
missing? "audio" | "background" | "both"
noted boolean
plays? object
text string
title string
keysText string
goal? "open" | "reached"
advice? object
kind "comfort" | "push" | "stretch"
text string
rating object
text string
range string
unit string
strip object
tier "dot" | "rating" | "full" | "pattern"
chipWidth number (px)
gap number (px)
maxWidth number (px)
minWidth number (px)
chips[] object
key number
color string
keysText string
short string
pattern? object
short string
color string
more? object
count number
label string
state = playlist:
position number
id string
selected boolean
expanded boolean
themed boolean
title string
artist string
creator? object
name string
text string
color string
thumbnail string
mosaic[]? string
similar? object
text string
title string
newText? string
countText string
missing? "audio" | "background" | "both"
noted boolean
plays? object
text string
title string
keysText string
goal? "open" | "reached"
advice? object
kind "comfort" | "push" | "stretch"
text string
rating object
text string
range string
unit string
strip object
tier "dot" | "rating" | "full" | "pattern"
chipWidth number (px)
gap number (px)
maxWidth number (px)
minWidth number (px)
chips[] object
key number
color string
keysText string
short string
pattern? object
short string
color string
more? object
count number
label string
playlistId number
state = loading:
{}
States
| State |
Meaning |
collapsed |
A set of the list, closed and not holding the selected chart. |
selected |
A closed set that holds the selected chart. |
expanded |
The open set (its difficulties are listed below it); it may hold the selected chart too (selected). |
playlist |
A playlist card: its maps' pictures as a mosaic, the creator is plain text, a click selects the playlist (expanded/selected: it is the open one). |
loading |
The placeholder of a row whose page has not arrived: an empty plate, hidden from assistive technology and not interactive. |
Outputs
| Output |
Arguments |
Description |
toggle (required) |
position: number |
Opens the set (and selects its first or remembered difficulty), or closes it when it is the open one. |
selectPlaylist (required) |
playlistId: number |
Selects the playlist (a playlist card never opens a set). |
filter.name |
key: "host/artist" | "host/creator", name: string |
Ctrl/Cmd + click on the artist or the mapper filters the list on that name; it never also toggles the card. |
menu.open |
x: number (px), y: number (px) |
The context menu (right click, Menu key, Shift+F10) at a point of the screen; the list owns it and gives focus back to the card when it closes. |
more.show |
id: string, x: number (px), y: number (px), by: "pointer" | "focus" |
The popover with the full list of the set's difficulties, above a point of the screen: by pointer (over the "+N" badge) or by focus (a keyboard focus on the card). |
more.hide |
— |
The pointer left the badge or the card lost its focus: the popover goes away after a short delay. |
Slots
| Slot |
Description |
goal |
The goal mark of the set (drawn when some goal is open or reached; nothing otherwise), or in Maps to play the chart's kind badge (comfort, push, stretch, each its colour): the game's own widgets, with their tooltip. |
missing |
The warning mark of a set that lacks audio or a background (nothing when nothing is missing): the game's own widget, with its tooltip. |
Parts
| Part |
Role |
Description |
art |
presentation |
The set's picture, or the playlist's mosaic, behind the text. |
title |
text |
The song title. |
artist |
text |
The artist (a filter on Ctrl+click, except on a playlist card). |
meta |
text |
The line of facts: why it is listed, NEW, the mapper, the difficulty count, the marks, the plays. |
creator |
text |
The mapper's name inside the line of facts (a filter on Ctrl+click, except on a playlist card). |
keys |
text |
The layouts, after the goal mark when there is one. |
rating |
text |
The rating range. |
strip |
presentation |
The chips of the difficulties (hidden from assistive technology: the count is in the meta line). |
more |
img |
The "+N" badge of the difficulties the strip has no room for; hovering it opens the full list. |
Accessibility
- Role:
button
- Name: The card's own text: title, artist, the line of facts, the layouts and the rating (the picture and the chips are decoration; the badge is an image named "+N difficulties").
- Focus: One tab stop; the card has
aria-expanded. A keyboard focus (:focus-visible) on a card with a badge opens the popover with the full list of difficulties.
| Keyboard |
Effect |
| Enter / Space |
Opens or closes the set (selects the playlist on a playlist card). |
| Menu / Shift+F10 |
Opens the context menu. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
button |
root exists with role button, reachable by keyboard |
collapsed, selected, expanded, playlist |
A set card is a button the keyboard reaches. |
toggle-click |
click on root calls toggle(position) |
collapsed, selected, expanded |
A click opens or closes the set, naming its position. |
toggle-enter |
Enter on root calls toggle(position) |
collapsed, selected, expanded |
Enter opens or closes the set, naming its position. |
select-playlist |
click on root calls selectPlaylist(playlistId) |
playlist |
A click on a playlist card selects the playlist. |
select-playlist-enter |
Enter on root calls selectPlaylist(playlistId) |
playlist |
Enter on a playlist card selects the playlist. |
title |
title shows title |
collapsed, selected, expanded, playlist |
The title is shown. |
artist |
artist shows artist |
collapsed, selected, expanded, playlist |
The artist is shown. |
count |
meta shows countText |
collapsed, selected, expanded, playlist |
The difficulty count is shown. |
keys |
keys shows keysText |
collapsed, selected, expanded, playlist |
The layouts are shown. |
rating |
rating shows rating.range |
collapsed, selected, expanded, playlist |
The rating range is shown. |
loading-empty |
title is not drawn |
loading |
The loading placeholder shows no text. |
loading-no-badge |
more is not drawn |
loading |
The loading placeholder has no "+N" badge to hover. |
What the player does around the list: switch between the maps, the playlists and the maps to play, draw a random map, open the rare actions (folders, playlists), reach the online side and the map visualizer. Slant and Cabinet draw the view switch and one "…" menu for the rare actions (the screen opens it: menu.open); Classic draws a heading with the view's count, the rare actions as buttons and a Playlists toggle. Not contracted yet and still bound to their own stores inside the default renderer: the themed flag that tells the two bars apart, Segmented, IconButton and Button of the design system; OnlineChip and ChatButton are the host's content of the online slot.
- Template:
components['library.toolbar']
- Typed context:
ThemeContext<'library.toolbar'>
- Default renderer:
LibraryToolbar
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "maps" | "mapsBusy" | "mapsEmpty" | "playlists" | "mapsToPlay"
views[] object
value "maps" | "playlists" | "mapsToPlay"
label string
count number
countText string
exact? string
disabled boolean
visualizer object
open boolean
available boolean
label string
iconOnly boolean
menu[] object
id string
label string
unavailable? string
menuOpen boolean
state = maps:
{}
state = mapsBusy:
{}
state = mapsEmpty:
locked boolean
state = playlists:
{}
state = mapsToPlay:
{}
| State |
Meaning |
maps |
The maps view of a library that holds maps: Random works. |
mapsBusy |
The maps view while the library is busy (scanning) or the visualizer covers the list: Random is off. |
mapsEmpty |
The library holds no map: Random is off. |
playlists |
The playlists view: no Random. |
mapsToPlay |
The maps to play: the charts of the library to push next take the place of the maps list (no Random). |
| Output |
Arguments |
Description |
view.set (required) |
view: "maps" | "playlists" | "mapsToPlay" |
Shows the maps, the playlists or the maps to play. Opening the playlists hands the keyboard to their panel (arrows walk, Enter plays). |
random |
— |
Selects a random map. |
demo |
— |
Plays the built-in demo map. The default renderer has no button for it any more; a template may draw one. |
visualize |
— |
Opens or closes the map visualizer. |
multiplayer |
— |
Opens the multiplayer page. |
menu.open |
x: number (px), y: number (px) |
Opens the menu of the rare actions under the button; the point is where its top left corner goes. The screen gives it. |
menu.run |
id: string |
Runs one action of that menu (add, refresh, new, import or paste, the id of menu). |
| Slot |
Description |
online |
The online status chip and the chat button (not contracted yet); the multiplayer button is the renderer's own, placed after them. |
| Part |
Role |
Description |
views |
radiogroup |
The maps / playlists / maps to play switch (Slant and Cabinet). |
playlists |
radio |
The playlists choice: a segment of the switch (Slant and Cabinet) or the toggle (Classic). |
mapsToPlay |
radio |
The maps to play choice: a segment of the switch (Slant and Cabinet) or a toggle (Classic). |
random |
button |
The random map. |
menu |
button |
The menu of the rare actions (Slant and Cabinet). |
action |
button |
One of the rare actions laid out as a button (Classic). |
multiplayer |
button |
The multiplayer page. |
visualize |
button |
The visualizer toggle (pressed while it is open). |
| Class |
Description |
library-toolbar |
The bar's root. |
bar |
The bar of Slant and Cabinet (one text style, side groups). |
bar-side |
One side of the bar: the view and its tools, or the online side and Visualize. |
online |
The frame of the online side (status, chat, multiplayer). |
viz |
The Visualize button (its word is always shown while the bar is wide enough). |
viz-label |
The word of the Visualize button. |
tb-label |
A button's word in Classic's bar (hidden when the bar is narrow). |
active |
A pressed toggle of Classic's bar. |
- Role:
none
- Name: The bar has no role of its own: the view switch is a radio group named after the list, the buttons by their labels.
- Focus: Reading order; opening the playlists view hands the keyboard to the playlists panel.
| Keyboard |
Effect |
| Tab |
Walks the view switch, the tools, then the online side and Visualize. |
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
playlists-click |
click on playlists calls view.set("playlists") |
maps, mapsEmpty |
The playlists can be reached from the maps view. |
maps-to-play-click |
click on mapsToPlay calls view.set("mapsToPlay") |
maps |
The maps to play can be reached from the maps view. |
random-click |
click on random calls random() |
maps |
Random selects a random map. |
random-off |
random cannot be pressed |
mapsBusy, mapsEmpty |
Random cannot be pressed while it cannot work. |
no-random-in-playlists |
random is not drawn |
playlists, mapsToPlay |
Random is not offered over the playlists or the maps to play. |
multiplayer-is-a-button |
multiplayer exists with role button, reachable by keyboard |
all |
The multiplayer page is one button away, by keyboard. |
multiplayer-click |
click on multiplayer calls multiplayer() |
all |
Clicking it opens the multiplayer page. |
visualize |
visualize exists with role button, not a tab stop |
all |
The visualizer has its button. |
lobby.draft — Lobby draft
The pick & ban panel of a friendly lobby. The host sets the draft up (best of, bans per side, first side, pick rule, turn timer and the pool staged from the library), then the captains of the two sides ban and pick the maps in turn; the panel shows the pool (banned maps crossed out, picked and played maps marked with their side), whose turn it is with its countdown, the series score, the host's forfeit and abort, and the reason of the last refused action. A lobby whose server does not offer drafts shows nothing.
- Template:
components['lobby.draft']
- Typed context:
ThemeContext<'lobby.draft'>
- Default renderer:
LobbyDraft
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "setup" | "banning" | "picking" | "playing" | "finished"
host boolean
denial? "not_in_lobby" | "not_host" | "not_captain" | "not_your_turn" | "wrong_phase" | "bad_config" | "bad_sides" | "unknown_map" | "map_taken" | "map_reserved" | "not_members" | "started" | "draft_active" | "no_draft" | "feature_unavailable" | "unknown"
state = setup:
poolLimit number
pool[] object
slot string
title string
artist string
art? string
difficulty? string
rateText string
noteHash string
playbackRate number
judgement string
candidate? object
title string
artist string
rateText string
inPool boolean
sides? object
a[] string
b[] string
state = banning:
series object
bestOf number
a number
b number
sides object
a object
captain? string
members[] string
mine boolean
b object
captain? string
members[] string
mine boolean
bansPerSide number
pickRule "alternate" | "loser_picks" | "unknown"
maps[] object
slot string
title string
artist string
art? string
difficulty? string
rateText string
status "open" | "banned" | "picked" | "played"
by? "a" | "b"
winner? "a" | "b"
game? number
auto boolean
current boolean
tiebreaker boolean
turn? object
side "a" | "b"
kind "ban" | "pick"
mine boolean
secondsLeft? number
state = picking:
series object
bestOf number
a number
b number
sides object
a object
captain? string
members[] string
mine boolean
b object
captain? string
members[] string
mine boolean
bansPerSide number
pickRule "alternate" | "loser_picks" | "unknown"
maps[] object
slot string
title string
artist string
art? string
difficulty? string
rateText string
status "open" | "banned" | "picked" | "played"
by? "a" | "b"
winner? "a" | "b"
game? number
auto boolean
current boolean
tiebreaker boolean
turn? object
side "a" | "b"
kind "ban" | "pick"
mine boolean
secondsLeft? number
state = playing:
series object
bestOf number
a number
b number
sides object
a object
captain? string
members[] string
mine boolean
b object
captain? string
members[] string
mine boolean
bansPerSide number
pickRule "alternate" | "loser_picks" | "unknown"
maps[] object
slot string
title string
artist string
art? string
difficulty? string
rateText string
status "open" | "banned" | "picked" | "played"
by? "a" | "b"
winner? "a" | "b"
game? number
auto boolean
current boolean
tiebreaker boolean
turn? object
side "a" | "b"
kind "ban" | "pick"
mine boolean
secondsLeft? number
game object
number number
slot string
title string
state = finished:
series object
bestOf number
a number
b number
sides object
a object
captain? string
members[] string
mine boolean
b object
captain? string
members[] string
mine boolean
bansPerSide number
pickRule "alternate" | "loser_picks" | "unknown"
maps[] object
slot string
title string
artist string
art? string
difficulty? string
rateText string
status "open" | "banned" | "picked" | "played"
by? "a" | "b"
winner? "a" | "b"
game? number
auto boolean
current boolean
tiebreaker boolean
turn? object
side "a" | "b"
kind "ban" | "pick"
mine boolean
secondsLeft? number
winner? "a" | "b"
reason "won" | "forfeit" | "aborted" | "unknown"
States
| State |
Meaning |
setup |
The host sets the draft up: a form (best of, bans per side, first side, pick rule, turn timer) and the staged pool, with what the host can add from the library. |
banning |
Bans: the captain on turn bans a map with the button on its card; the others wait for theirs. |
picking |
Picks: the captain on turn picks the map of the next game. |
playing |
Playing: the series plays the picked map; the panel keeps the pool and the score. |
finished |
Finished: the series is over, with its winner or why it ended. |
Outputs
| Output |
Arguments |
Description |
start |
bestOf: number, bansPerSide: number, first: "a" | "b", pickRule: "alternate" | "loser_picks", turnSecs: number |
Starts the draft from the setup form: the best of, the bans per side, the first side, the pick rule and the turn timer in seconds (0 for none). The sides are the lobby's players. |
ban |
slot: string |
Bans a map of the pool, by its slot (the captain on turn). |
pick |
slot: string |
Picks a map of the pool, by its slot (the captain on turn). |
forfeit |
side: "a" | "b" |
Forfeits the draft for a side (the host). |
abort |
— |
Aborts the draft (the host). |
pool.add |
— |
Stages the library's selected chart in the pool (the host). |
pool.remove |
slot: string |
Takes a map out of the staged pool, by its slot (the host). |
Parts
| Part |
Role |
Description |
heading |
heading |
The panel's title. |
denial |
status |
The reason of the last refused action, in words. |
problem |
status |
What the setup form lacks to start, in words. |
start |
button |
Starts the draft from the setup form. |
poolAdd |
button |
Stages the library's selected chart in the pool. |
poolRemove |
button |
Takes a map out of the staged pool. |
pool |
list |
The staged pool, or the maps of the running draft. |
map |
listitem |
A map card of the pool: its cover, title, artist and difficulty, slot, rate and state. |
ban |
button |
Bans a map: the button on its open card (the captain on turn only). |
pick |
button |
Picks a map: the button on its open card (the captain on turn only). |
turn |
status |
Whose turn it is to ban or pick, with the countdown. |
score |
status |
The series score. |
forfeit |
button |
Forfeits the draft for a side (the host only). |
abort |
button |
Aborts the draft (the host only). |
Accessibility
- Role:
region
- Name: The panel's heading.
- Focus: Nothing takes the focus when the state changes: the panel announces its turn and its denial in its status parts.
| Keyboard |
Effect |
| Tab |
Moves through the form, the pool and the buttons in reading order. |
| Enter / Space |
Presses the focused button. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
heading |
heading exists with role heading, not a tab stop |
all |
The panel has a title. |
setup-start |
start exists with role button, reachable by keyboard |
setup |
Starting the draft is the host's button. |
setup-start-click |
click on start calls start(3, 1, "a", "alternate", 60) |
setup |
Starting sends the set-up draft. |
pool-add-click |
click on poolAdd calls pool.add() |
setup |
The library's selected chart is added to the pool. |
pool-remove-click |
click on poolRemove calls pool.remove("M1") |
setup |
A staged map is taken out of the pool. |
problem |
problem exists with role status, not a tab stop |
setup |
A form that cannot start says what it lacks. |
ban-click |
click on ban calls ban("M2") |
banning |
Banning a map is the captain on turn's button. |
pick-click |
click on pick calls pick("M3") |
picking |
Picking a map is the captain on turn's button. |
turn |
turn exists with role status, not a tab stop |
banning, picking |
The panel says whose turn it is, with the countdown when there is a timer. |
score |
score exists with role status, not a tab stop |
playing, finished |
The series score is on the panel. |
forfeit-click |
click on forfeit calls forfeit("a") |
banning, picking, playing |
Forfeiting a side is the host's button. |
abort-click |
click on abort calls abort() |
banning, picking, playing |
Aborting the draft is the host's button. |
no-times-sign |
pool never contains × |
banning, picking, playing, finished |
A rate is never written with a multiplication sign. |
no-check-mark |
pool never contains ✓ |
banning, picking, playing, finished |
The pool carries no bare check mark: a picked map says so in words on its card. |
denial |
denial exists with role status, not a tab stop |
setup, banning, picking, playing, finished |
A refused action says why, in a status. |
maps.toPlay — Maps to play
Charts of the player's own library to push next: near their level, in their strong patterns, at a suggested rate, with the expected Prism accuracy. Filtered by key count and pattern; going to a map selects it and sets the suggested rate.
- Template:
components['maps.toPlay']
- Typed context:
ThemeContext<'maps.toPlay'>
- Default renderer:
MapsToPlay
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "loading" | "ready" | "notEnough" | "noLevel" | "empty" | "unavailable" | "retry"
keys? number
keyOptions[] object
value number
label string
active boolean
pattern string
patterns[] object
id string
label string
color? string
plays number
levelText? string
listed boolean
active boolean
ratingName string
state = loading:
{}
state = ready:
entries[] object
id string
index number
title string
artist string
difficulty string
keys number
pattern string
patternColor? string
kind "comfort" | "push" | "stretch"
rate number
rateText string
ratingText string
ratingAtRateText string
expectedText string
bandText string
current boolean
state = notEnough:
have number
need number
state = noLevel:
{}
state = empty:
{}
state = unavailable:
reason "judgement" | "noRating"
state = retry:
reason "busy" | "failed"
States
| State |
Meaning |
loading |
The host is working the list out. |
ready |
A list of charts, comfort first, then push, then stretch. |
notEnough |
Fewer comparable plays than the method needs: how many there are and how many it needs. No number about any chart. |
noLevel |
Enough plays, but the accuracy is below the target at every difficulty played: there is no level to propose around. |
empty |
A level, but no chart of the library fits it (or none is rated yet). |
unavailable |
Nothing can be said: the judgement is not Prism's (the target is Prism's accuracy) or no rating names the patterns. |
retry |
The host could not answer now (a play holds the background work, or the library could not be read): it can be asked again. |
Outputs
| Output |
Arguments |
Description |
goTo (required) |
index: number, title: string, rate: number |
Goes to the map: selects it in the library and sets the suggested rate (the title is what the list searches for). |
filter.keys |
keys: number |
Shows the list for another key count. |
filter.pattern |
pattern: string |
Shows the list for one pattern; the empty text is the player's strongest ones. |
retry |
— |
Asks the host for the list again. |
Parts
| Part |
Role |
Description |
heading |
heading |
The title of the panel. |
keys |
group |
The key count filter. |
key |
button |
One key count (repeats). |
patterns |
group |
The pattern filter. |
pattern |
button |
One pattern, the first being "Strongest" (repeats). |
list |
list |
The charts. |
entry |
listitem |
One chart (repeats). |
goTo |
button |
Goes to a chart: the row is the button (repeats). |
message |
status |
What the panel says when there is no list. |
retry |
button |
Asks again. |
Accessibility
- Role:
region
- Name: Maps to play.
- Focus: The filters are tab stops; the list is ONE tab stop (the chart that was last on) and the arrows move inside it.
| Keyboard |
Effect |
| ArrowDown / ArrowUp |
Moves to the next or previous chart of the list. |
| Home / End |
First or last chart. |
| Enter |
Goes to the chart: selects it and sets its suggested rate. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
heading |
heading exists with role heading, not a tab stop |
all |
The panel has a title. |
keys |
keys exists with role group, not a tab stop |
ready, notEnough, noLevel, empty |
The key count filter is a group. |
key-click |
click on key calls filter.keys(4) |
ready, notEnough, noLevel, empty |
Pressing a key count shows the list for it. |
patterns |
patterns exists with role group, not a tab stop |
ready, notEnough, noLevel, empty |
The pattern filter is a group. |
strongest-click |
click on pattern calls filter.pattern("") |
ready, notEnough, noLevel, empty |
The first pattern button is the strongest ones. |
list |
list exists with role list, not a tab stop |
ready |
The charts are a list. |
go-to-reachable |
goTo exists with role button, reachable by keyboard |
ready |
A chart is a button the keyboard reaches. |
go-to-click |
click on goTo calls goTo(12, "Strong 280", 1.15) |
ready |
Pressing a chart goes to it, at its suggested rate. |
go-to-enter |
Enter on goTo calls goTo(12, "Strong 280", 1.15) |
ready |
Enter on a chart goes to it, at its suggested rate. |
no-times-sign |
list never contains × |
ready |
A rate is never written with a multiplication sign. |
message |
message exists with role status, not a tab stop |
loading, notEnough, noLevel, empty, unavailable, retry |
Without a list the panel says why, in a status. |
no-list-without-numbers |
goTo is not drawn |
loading, notEnough, noLevel, empty, unavailable, retry |
Without a list there is no chart on the panel. |
retry-click |
click on retry calls retry() |
retry |
Asking again asks the host again. |
player.card — Player card
One player: a member of the multiplayer lobby (before the round, or while it runs) or a connected player of the chat's players' panel. The card is a list item the host provides (the lobby's list of members, the panel's grid); its state says which of the three it is. The game keeps the item, the player's menu, the name's button, the picture, the flag, the title, the clan tag, the friend mark, the rank chip, the tier counts and the replay button; a theme draws what is inside, with the facts of the input (host, ready, standing, status…) as plain text and the game's widgets by slot.
- Template:
components['player.card']
- Typed context:
ThemeContext<'player.card'>
- Default renderer:
PlayerCard
- Added in theme API 2 (a theme must declare
"themeApi": 2 to template it)
Face
This contract is a face: the host draws and owns the card's own root (its button or plate, keyboard, menus, tooltips, actions and accessible name); a template draws what is inside it from the input, and uses slots for the host's own widgets. A face has no button, toggle, dropdown, no slot of another contract, calls no output, and none is required of it.
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "lobby" | "round" | "user"
userId string
name string
initial string
channel string
self boolean
index number
tone number
place number
picture boolean
host boolean
spectator boolean
waiting boolean
hasMap? boolean
rank? object
value number
text string
top boolean
label string
tip string
country? string
title? object
name string
style? string
colour? string
clan? object
tag string
name string
friend? object
mutual boolean
watchable boolean
side? "a" | "b"
strip boolean
state = lobby:
ready boolean
last? object
accuracy string
detail string
tiers[]? object
name string
color string
gradient[]? string
symbol? ref @pvng/desktop:JudgementSymbol
count number
state = round:
standing? object
kind "result" | "live"
figures object
accuracy string
detail string
tiers[]? object
name string
color string
gradient[]? string
symbol? ref @pvng/desktop:JudgementSymbol
count number
note "noScore" | "waiting" | "spectating" | "none"
state = user:
status "online" | "inLobby" | "playing"
statusText string
States
| State |
Meaning |
lobby |
A lobby member before the round: the name, the marks and whether the member is ready (a spectator is not asked). |
round |
A lobby member while the round runs: the accuracy and the figures of their play, live or replayed, or a note saying why there is none. |
user |
A connected player of the chat's panel: the name, the country and title, the status and the rank. |
Outputs
| Output |
Arguments |
Description |
replay.watch |
userId: string |
Opens the replay the lobby holds of this member (what the button over the card does; the argument is the member's account id). |
Slots
| Slot |
Description |
avatar |
The profile picture, to lay over the tile that holds the initial (the tile is position: relative; overflow: hidden; nothing when the player has no picture). |
playerName |
The player's name: a button in the players' panel (a left click runs the chat's primary action, a right click opens the menu), the plain name in the lobby. |
clan |
The clan tag [TAG] (nothing without a clan). |
friend |
The friend mark: a heart and its word, a second heart when mutual (nothing for the account itself or a player who is not a friend). |
flag |
The flag of the player's country as a picture with its name (nothing without a country). |
title |
The equipped title in the site's style (nothing without one). |
rank |
The site's rank as a chip with its tooltip (nothing without a rank). |
marks |
The lobby's pills: host, spectator, waiting for the next round, has or lacks the map, "you" (nothing in the players' panel). |
status |
The players' panel's status: the mark and its words, with the full text as a tooltip (nothing in the lobby). |
tiers |
The count of every tier of the judgement under a finished play's accuracy (the game's own widget; nothing when the counts do not name the tiers). |
Parts
| Part |
Role |
Description |
avatar |
img |
The tile of the picture and the initial. |
name |
text |
The player's name. |
rank |
text |
The site's rank. |
status |
text |
The status of the player in the panel. |
ready |
status |
Whether the member is ready. |
accuracy |
text |
The accuracy of the round. |
watch |
button |
The button over the card that opens the member's replay. |
Accessibility
- Role:
listitem
- Name: Nothing of its own: the card holds named parts (the name's button in the panel, the replay button over a lobby card).
- Focus: The name's button (the panel) and the replay button (a lobby member whose replay is held) are in the tab order; the card itself is not.
| Keyboard |
Effect |
| Shift+F10 / context menu key |
With the focus on or in the card: opens the player's menu under the name. |
| Enter / Space |
On the name in the players' panel: runs the chat's primary action; on the card of a member whose replay the lobby holds: opens it. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
name-shown |
name shows name |
all |
The player's name is shown. |
status-shown |
status shows statusText |
user |
The panel says what the player does. |
rate.control — Rate control
The playback rate of the selected chart: a typed value between − and +, a slider over a ruler, the quarter rates as marks a click asks for, and a reset to 1.
- Template:
components['rate.control']
- Typed context:
ThemeContext<'rate.control'>
- Default renderer:
RateControl
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "ready" | "atDefault" | "atMin" | "atMax"
value number
text string
min number
max number
minText string
maxText string
step number
typed number
steps object
down number
up number
state = ready:
{}
state = atDefault:
{}
state = atMin:
{}
state = atMax:
{}
States
| State |
Meaning |
ready |
A rate inside the range that is not 1. |
atDefault |
The rate is 1: there is nothing to reset. |
atMin |
The lowest rate: it cannot go down. |
atMax |
The highest rate: it cannot go up. |
Outputs
| Output |
Arguments |
Description |
set (required) |
value: number |
Asks for a rate. The action moves it into the range and onto the grid of the open tab. |
Slots
| Slot |
Description |
aside |
What sits beside the title (the Mods tab shows the chart's rating at this rate there). |
Parts
| Part |
Role |
Description |
heading |
heading |
The title of the control. |
value |
spinbutton |
The field where a rate is typed; the arrows step it. |
decrease |
button |
One step down. |
increase |
button |
One step up. |
slider |
slider |
The rate on its range. |
reset |
button |
Back to 1. |
mark |
button |
A rate marked under the slider (its ends and every quarter between): a click asks for it. Out of the Tab order: the slider walks every rate (repeats). |
Accessibility
- Role:
none
- Name: The root has no role of its own: the heading "Rate", the field and the slider are named by their own labels.
- Focus: Reset, Decrease, the field, Increase, then the slider (Classic: Decrease, the field, Increase, the slider, then Reset).
| Keyboard |
Effect |
| Enter |
Asks for the typed rate. |
| Escape |
Puts the current rate back in the field. |
| ArrowUp / ArrowDown |
One step up or down, from the field. |
| ArrowLeft / ArrowRight / Home / End |
Move the slider. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
value-field |
value exists with role spinbutton, reachable by keyboard |
all |
A rate can be typed freely. |
value-shows-rate |
value shows text |
all |
The field reads the rate in force. |
no-times-sign |
root never contains × |
all |
The rate is never written with a multiplication sign. |
enter-commits |
Enter on value calls set(value) |
all |
Enter asks for the typed rate. |
arrow-up |
ArrowUp on value calls set(steps.up) |
all |
The up arrow in the field is one step up. |
arrow-down |
ArrowDown on value calls set(steps.down) |
all |
The down arrow in the field is one step down. |
slider |
slider exists with role slider, reachable by keyboard |
all |
The rate is on a slider. |
increase-asks-step |
click on increase calls set(steps.up) |
ready, atDefault, atMin |
Increase asks for one step up. |
decrease-asks-step |
click on decrease calls set(steps.down) |
ready, atDefault, atMax |
Decrease asks for one step down. |
no-decrease-at-min |
decrease cannot be pressed |
atMin |
Decrease cannot be pressed at the lowest rate. |
no-increase-at-max |
increase cannot be pressed |
atMax |
Increase cannot be pressed at the highest rate. |
reset-to-one |
click on reset calls set(1) |
ready, atMin, atMax |
Reset goes back to 1. |
no-reset-at-default |
reset cannot be pressed |
atDefault |
Reset cannot be pressed at 1. |
Who and what is selected: the song and its difficulty, the rating on the chosen scale, and the duration, BPM, notes and holds (for a playlist: its length, maps count, peak rating and notes). With a map it also holds the line that says why the rate is unavailable. When nothing is selected it is the invitation: pick a playlist, or add a songs folder to an empty library. Not contracted yet and still bound to their stores inside the default renderer: AnimatedNumber, HelpTip, MissingMark.
- Template:
components['selected.header']
- Typed context:
ThemeContext<'selected.header'>
- Default renderer:
SelectedHeader
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "map" | "rateCopy" | "playlist" | "pick" | "empty" | "emptyBusy"
color string
state = map:
artist string
title string
difficulty string
keysText string
creator? string
favourite boolean
missing? object
kind "audio" | "background" | "both"
chart string
rating object
value? number
unit string
label string
title string
stats[] object
label string
text string
numbers[] number
clock boolean
icon "clock" | "activity" | "music" | "rectangle-vertical" | "library" | "zap"
rateStatus object
error? string
unavailable? string
previous? string
state = rateCopy:
artist string
title string
difficulty string
keysText string
creator? string
favourite boolean
missing? object
kind "audio" | "background" | "both"
chart string
rateCopy object
label string
help string
baseIndex number
baseTitle string
rating object
value? number
unit string
label string
title string
stats[] object
label string
text string
numbers[] number
clock boolean
icon "clock" | "activity" | "music" | "rectangle-vertical" | "library" | "zap"
rateStatus object
error? string
unavailable? string
previous? string
state = playlist:
name string
countText string
creator? string
missingText? string
rating object
value? number
unit string
label string
title string
stats[] object
label string
text string
numbers[] number
clock boolean
icon "clock" | "activity" | "music" | "rectangle-vertical" | "library" | "zap"
state = pick:
{}
state = empty:
{}
state = emptyBusy:
{}
| State |
Meaning |
map |
A chart is selected (its figures are the library's until its analysis arrives). |
rateCopy |
A chart that is a proven rate copy of another one is selected: a line says so and goes to the base map. |
playlist |
A whole playlist is selected: its heading and figures stand in for a map's. |
pick |
The playlists list is open and none is selected: the heading invites to pick one. |
empty |
Nothing is selected: the library holds no map; the heading invites to add a folder. |
emptyBusy |
The same invitation while the library is locked by a scan or an import: the button cannot be pressed. |
| Output |
Arguments |
Description |
name.filter |
key: "host/artist" | "host/creator", name: string |
Ctrl/Cmd + click on the artist or the mapper filters the list on that name. |
rateCopy.go |
index: number, title: string |
Goes to the base map of a rate copy. |
folders.add (required) |
— |
Adds a songs folder (the empty state's button; without it an empty library is a dead end). |
| Part |
Role |
Description |
heading |
none |
The plate that holds the title, the artist, the difficulty and the rating (a theme that draws its own heading folds it). |
title |
heading |
The song title, the playlist name or the invitation (level 1). |
artist |
text |
The artist (a filter on Ctrl+click). |
difficulty |
text |
The difficulty name, its key count and the mapper. |
rating |
group |
The rating on the chosen scale. |
stats |
none |
The duration, BPM, notes and holds plates, each with an icon before its label (not under Classic). |
rateCopy |
button |
Go to the base map of a rate copy. |
rateStatus |
status |
The line that says the rate cannot be used, or the one it falls back to. |
addFolders |
button |
Adds a songs folder (the empty library's invitation). |
| Class |
Description |
song-heading |
The identity plate: artist, title, difficulty and rating (a header). |
pv-plate |
A plate of the design system. |
pv-plate--lg |
The large plate (the heading). |
pv-plate--sm |
The small plate (a stat). |
pv-stat |
A label over a value. |
artist |
The artist line (the accent label of the heading). |
difficulty-name |
The difficulty line: badge, name, mapper. |
name-filter |
An artist or mapper name that is a button (Ctrl/Cmd + click filters). |
rate-copy |
The line of a rate copy with its go-to button. |
main-rating |
The rating figure, the loudest number of the heading. |
rating-value |
The rating's number (keeps room for five characters). |
favourite-mark |
The small filled star after the title of a favourite. |
map-metrics |
The row of four stat plates. |
map-stat |
One stat plate. |
rate-status |
The rate line (a fixed-height status). |
no-selection |
The invitation block. |
- Role:
none
- Name: The heading has no role of its own: the title is the level-1 heading, the rating is a group named after its calculator, the rate line is a polite status.
- Focus: Reading order; the heading itself takes no focus.
| Keyboard |
Effect |
| Tab |
The artist and mapper names are buttons (Ctrl/Cmd + Enter filters the list), then the rate copy button; for an empty library, the add button. |
| Enter / Space |
On the rate copy or the add button: presses it. |
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
title |
title exists with role heading, not a tab stop |
all |
The level-1 heading is always there: the selected map's title, the playlist's name or the invitation. |
title-shows |
title shows title |
map, rateCopy |
The heading reads the title of the map. |
playlist-name |
title shows name |
playlist |
The heading reads the name of the playlist. |
rating-named |
rating exists with role group, not a tab stop |
map, rateCopy, playlist |
The rating figure is named after the calculator that gives it. |
rating-label |
rating shows rating.label |
map, rateCopy, playlist |
The group's name says which scale the number is on. |
rate-status |
rateStatus exists with role status, not a tab stop |
map, rateCopy, playlist |
The rate line is a polite status, always there (empty when the rate is fine). |
rate-copy-reachable |
rateCopy exists with role button, reachable by keyboard |
rateCopy |
A rate copy can go back to its base map. |
rate-copy-click |
click on rateCopy calls rateCopy.go(rateCopy.baseIndex, rateCopy.baseTitle) |
rateCopy |
Going to the base map asks for it with its index and title. |
add-folders-off |
addFolders cannot be pressed |
emptyBusy |
The invitation's button cannot be pressed while the library is locked. |
add-folders |
addFolders exists with role button, reachable by keyboard |
empty |
The empty library's invitation is a button the keyboard reaches. |
add-folders-click |
click on addFolders calls folders.add() |
empty |
The invitation's button adds a songs folder. |
add-folders-enter |
Enter on addFolders calls folders.add() |
empty |
Enter on the invitation's button adds a songs folder. |
selected.tabs — Selected map tabs
What the player can look at or set for the selected map, one tab at a time. The panel of each tab is placed by the screen (controls is the id of the panel a tab shows).
- Template:
components['selected.tabs']
- Typed context:
ThemeContext<'selected.tabs'>
- Default renderer:
SelectedTabs
? optional, [] list (item below), quoted words are a closed set, ref T is an @pvng type that a template cannot look into.
state "chart" | "playlist"
active string
vertical boolean
tabs[] object
id string
label string
icon string
dirty boolean
controls string
state = chart:
{}
state = playlist:
{}
States
| State |
Meaning |
chart |
The tabs of a map, then the ones mods add (their order is the host's). |
playlist |
The three tabs of a playlist; the choice is local to the page (no action). |
Outputs
| Output |
Arguments |
Description |
select (required) |
id: string |
Shows another tab of the map. |
playlist.select |
id: string |
Shows another tab of the playlist. |
Slots
| Slot |
Description |
actions |
The "…" actions of the map at the end of the tabs (MapActions, not contracted yet and still bound to its stores; none for a playlist). |
Parts
| Part |
Role |
Description |
tablist |
tablist |
The row (or rail) of tabs. |
tab |
tab |
One tab (repeats). The tab shown carries data-selected (and aria-selected="true"): a theme's theme.css reaches it with [data-part="tab"][data-selected]. |
actions |
none |
The map's "…" actions after the tabs (a flex row holding the button and the goal pin; nothing for a playlist). |
more |
button |
The "…" button that opens the map's menu. |
moreLabel |
none |
The word of that button ("More"): hidden while the bar is narrow, so a theme that draws the button as a row of a rail shows it. |
Host classes
| Class |
Description |
chart-bar |
The bar of tabs (and the actions at its end): the layouts place it by this class; it is the container the actions' labels fold by. |
Accessibility
- Role:
tablist
- Name: The view of the selected map.
- Focus: One tab stop (the active tab); the arrows move inside the list.
| Keyboard |
Effect |
| ArrowLeft / ArrowRight (ArrowUp / ArrowDown on a rail) |
Moves to the neighbouring tab and shows it. |
| Home / End |
First or last tab. |
Musts
What a template of this component must keep. A state column says where the check holds.
| Id |
Check |
States |
Requirement |
tablist |
tablist exists with role tablist, not a tab stop |
all |
The tabs are one tab list with a single tab stop. |
tab |
tab exists with role tab, reachable by keyboard |
all |
Every tab is a tab the keyboard reaches. |
tab-click |
click on tab calls select("info") |
chart |
Pressing a tab of a map shows it. |
playlist-tab-click |
click on tab calls playlist.select("info") |
playlist |
Pressing a tab of a playlist shows it. |