import { isDarkTheme } from '../theme.js';
// Angular, straight-line glyphs to match the site's sharp-cornered,
// terminal-styled UI - rounded/organic icons (circles, bezier crescents)
// read as off-brand next to bordered rectangular buttons and monospace text.
const SUN = ``;
// A true cut-out crescent (fill-rule evenodd punches a hexagonal hole out of
// a larger hexagon) rather than a color-matched overlay, so it renders
// correctly against every theme's background without special-casing.
const MOON = ``;
// Shows the icon for the theme currently active (moon while in any
// dark-family theme, sun while in Light) rather than just checking for the
// literal string "dark" - that missed every gallery theme (Dracula, Nord,
// etc.), which are all dark-background but not literally named "dark".
export function themeIcon(theme) {
return isDarkTheme(theme) ? MOON : SUN;
}
export const STATS_ICON = ``;
// Three sliders (an equalizer/preferences glyph) - the hex-nut-with-teeth
// gear this replaced still read too much like the hexagon family shared by
// Moon/Account/Friends at a glance despite the teeth. This is unambiguous as
// "settings" on its own and shares no shape language with anything else in
// the icon set.
export const SETTINGS_ICON = ``;
// Two overlapping triangle "figures" - same flat-geometric language as the
// other corner icons, reads as "two players" without a literal person glyph.
export const MULTIPLAYER_ICON = ``;
export const LEADERBOARD_ICON = ``;
// Two overlapping copies of ACCOUNT_ICON's head-and-shoulders figure - two
// small bare hexagons (an earlier draft) blurred into two indistinct dots at
// this icon's actual render size; a head+shoulders silhouette keeps reading
// as "people" even that small.
export const FRIENDS_ICON = ``;
export const ACCOUNT_ICON = ``;
// A price tag - angular throughout (straight edges, a punched square hole
// instead of a round one), matching the rest of the set.
export const STORE_ICON = ``;
// A stroked chevron - an SVG path centers and scales identically everywhere,
// unlike a unicode "▾" glyph, whose vertical metrics vary by font and don't
// sit centered in a fixed-size box the way this does.
export const CHEVRON_DOWN_ICON = ``;
// Cosmetic flair badges (see cosmetics.rs) - angular throughout like every
// other icon here, a 4-point sparkle instead of a rounded star so it
// doesn't stand out as the one curved glyph in the set.
export const FLAIR_ICONS = {
star: ``,
bolt: ``,
skull: ``,
};
// Typing-language picker. The convention for this control is a glyph pair --
// one letterform from a non-Latin script beside a Latin "A" - which is what
// 10FastFingers, MonkeyType and browser translate buttons all use. Drawn as
// straight-edged strokes rather than set in a font, so it matches the rest of
// this angular set and does not depend on a CJK face being installed.
export const LANGUAGE_ICON = ``;
// Close. A plain X drawn as two strokes rather than a "×" glyph, so it
// matches the weight and corner style of the rest of this set at any size.
export const CLOSE_ICON = ``;
// Racer sprites. One per player in a multiplayer race, so a bar is a
// character rather than a coloured line with a name attached. Drawn in the
// same angular language as the rest of this set: straight edges, flat fill,
// no gradients, and they take their colour from the racer they belong to.
//
// Six of them, which is the room capacity, so no two racers in a full room
// share a sprite.
export const RACER_SPRITES = {
// A forward-leaning chevron, the fastest-reading shape in the set.
dart: ``,
// A blocky rocket.
rocket: ``,
// A visored helmet.
helm: ``,
// A hexagonal core.
core: ``,
// A signal mast.
signal: ``,
// A pair of stacked blades.
blade: ``,
};
export const RACER_SPRITE_IDS = Object.keys(RACER_SPRITES);
// Flair added alongside the original three. Same construction: flat fill,
// straight edges, readable at 16px beside a username.
Object.assign(FLAIR_ICONS, {
crown: ``,
circuit: ``,
eye: ``,
shard: ``,
moth: ``,
reactor: ``,
});
// A speaker, and the same speaker with the waves struck through. Two icons
// rather than one that changes colour: whether sound is on has to be readable
// at a glance without comparing it to anything.
export const SOUND_ON_ICON = ``;
export const SOUND_OFF_ICON = ``;