Fishies 0.8.2
|
|
@ -32,7 +32,7 @@ import '@fishies/ui/kit.css' // the components
|
||||||
import { Button, Panel, configureIcons } from '@fishies/ui'
|
import { Button, Panel, configureIcons } from '@fishies/ui'
|
||||||
|
|
||||||
// The icons ship in this package under icons/. Serve that folder, or point at a CDN copy:
|
// The icons ship in this package under icons/. Serve that folder, or point at a CDN copy:
|
||||||
configureIcons({ url: icon => `https://cdn.jsdelivr.net/npm/@fishies/ui@0.8.1/icons/${icon.name}.png` })
|
configureIcons({ url: icon => `https://cdn.jsdelivr.net/npm/@fishies/ui@0.8.2/icons/${icon.name}.png` })
|
||||||
|
|
||||||
export function Shop() {
|
export function Shop() {
|
||||||
return <Panel title="Shop" icon="shop">
|
return <Panel title="Shop" icon="shop">
|
||||||
|
|
@ -57,4 +57,4 @@ stylesheet that does, and every component animates with them; leave them out and
|
||||||
| `icons/` | the painted icon set, one PNG per name, each twice its largest display size |
|
| `icons/` | the painted icon set, one PNG per name, each twice its largest display size |
|
||||||
| `handbook/` | the Fishies Handbook as Markdown |
|
| `handbook/` | the Fishies Handbook as Markdown |
|
||||||
|
|
||||||
Version 0.8.1: the minor version follows the Fishies release it was taken from; a patch is a fix to the kit itself.
|
Version 0.8.2: the minor version follows the Fishies release it was taken from; a patch is a fix to the kit itself.
|
||||||
|
|
|
||||||
BIN
icons/add.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
icons/block.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
icons/check.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
icons/clock.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
icons/download.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
icons/drop.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
icons/exit.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
icons/external.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
icons/gem.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
icons/gift.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
icons/globe.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
icons/keeper.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
icons/keyboard.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
icons/level.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
icons/link.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
icons/mail.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
icons/quest.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
icons/quote.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
icons/reply.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
icons/search.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
icons/sell.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
icons/send.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
icons/showcase.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
icons/smile.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
icons/tank.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
icons/thermometer.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
icons/trash.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
icons/trophy.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
icons/warning.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
icons/wave.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
icons/whisper.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@fishies/ui",
|
"name": "@fishies/ui",
|
||||||
"version": "0.8.1",
|
"version": "0.8.2",
|
||||||
"description": "The Fishies UI kit: reef-toy components, design tokens and the painted system icon set from the social aquarium game Fishies.",
|
"description": "The Fishies UI kit: reef-toy components, design tokens and the painted system icon set from the social aquarium game Fishies.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"fishies",
|
"fishies",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
|
import { SystemIcon } from './kit'
|
||||||
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, type CSSProperties, type ReactNode } from 'react'
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, type CSSProperties, type ReactNode } from 'react'
|
||||||
import { createPortal } from 'react-dom'
|
import { createPortal } from 'react-dom'
|
||||||
import { placePopup, selectedIndex, selectKey } from './select-state'
|
import { placePopup, selectedIndex, selectKey } from './select-state'
|
||||||
|
|
@ -115,7 +116,7 @@ export default function Select({ value, onChange, options, disabled, name, class
|
||||||
onClick={() => { if (option.disabled) return; close(true); choose(option.value) }}>
|
onClick={() => { if (option.disabled) return; close(true); choose(option.value) }}>
|
||||||
{option.icon && <span className="fs-select-icon" aria-hidden="true">{option.icon}</span>}
|
{option.icon && <span className="fs-select-icon" aria-hidden="true">{option.icon}</span>}
|
||||||
<span>{option.label}</span>
|
<span>{option.label}</span>
|
||||||
{option.value === value && <b aria-hidden="true">✓</b>}
|
{option.value === value && <b aria-hidden="true"><SystemIcon name="check" size={16}/></b>}
|
||||||
</li>)}
|
</li>)}
|
||||||
</ul>, document.body)}
|
</ul>, document.body)}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,8 @@ export const ICON_FACTS: Readonly<Record<string, { readonly px: number; readonly
|
||||||
"sharpTo": 84,
|
"sharpTo": 84,
|
||||||
"usedBy": [
|
"usedBy": [
|
||||||
"Game",
|
"Game",
|
||||||
"Keeper OS"
|
"Keeper OS",
|
||||||
|
"Reef Journal"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"home": {
|
"home": {
|
||||||
|
|
@ -159,7 +160,8 @@ export const ICON_FACTS: Readonly<Record<string, { readonly px: number; readonly
|
||||||
"sharpTo": 26,
|
"sharpTo": 26,
|
||||||
"usedBy": [
|
"usedBy": [
|
||||||
"Game",
|
"Game",
|
||||||
"Keeper OS"
|
"Keeper OS",
|
||||||
|
"Reef Journal"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"bell": {
|
"bell": {
|
||||||
|
|
@ -292,7 +294,8 @@ export const ICON_FACTS: Readonly<Record<string, { readonly px: number; readonly
|
||||||
"sharpTo": 84,
|
"sharpTo": 84,
|
||||||
"usedBy": [
|
"usedBy": [
|
||||||
"Game",
|
"Game",
|
||||||
"Keeper OS"
|
"Keeper OS",
|
||||||
|
"Reef Journal"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"kelp": {
|
"kelp": {
|
||||||
|
|
@ -314,7 +317,9 @@ export const ICON_FACTS: Readonly<Record<string, { readonly px: number; readonly
|
||||||
"lock": {
|
"lock": {
|
||||||
"px": 168,
|
"px": 168,
|
||||||
"sharpTo": 84,
|
"sharpTo": 84,
|
||||||
"usedBy": []
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"solved": {
|
"solved": {
|
||||||
"px": 168,
|
"px": 168,
|
||||||
|
|
@ -329,7 +334,9 @@ export const ICON_FACTS: Readonly<Record<string, { readonly px: number; readonly
|
||||||
"edit": {
|
"edit": {
|
||||||
"px": 168,
|
"px": 168,
|
||||||
"sharpTo": 84,
|
"sharpTo": 84,
|
||||||
"usedBy": []
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"upvote": {
|
"upvote": {
|
||||||
"px": 168,
|
"px": 168,
|
||||||
|
|
@ -387,6 +394,213 @@ export const ICON_FACTS: Readonly<Record<string, { readonly px: number; readonly
|
||||||
"sharpTo": 84,
|
"sharpTo": 84,
|
||||||
"usedBy": []
|
"usedBy": []
|
||||||
},
|
},
|
||||||
|
"reply": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"quote": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game",
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"showcase": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"tank": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"block": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trash": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game",
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"smile": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"send": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"whisper": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"wave": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"thermometer": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"drop": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game",
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"warning": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"gift": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game",
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"gem": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"trophy": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"level": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game",
|
||||||
|
"Keeper OS"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"quest": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"check": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game",
|
||||||
|
"Video player"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"keeper": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game",
|
||||||
|
"Keeper OS"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"exit": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"globe": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game",
|
||||||
|
"Keeper OS",
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sell": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game",
|
||||||
|
"Reef Journal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"keyboard": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"external": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"add": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"download": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": []
|
||||||
|
},
|
||||||
|
"mail": {
|
||||||
|
"px": 168,
|
||||||
|
"sharpTo": 84,
|
||||||
|
"usedBy": [
|
||||||
|
"Game"
|
||||||
|
]
|
||||||
|
},
|
||||||
"emote-hello": {
|
"emote-hello": {
|
||||||
"px": 128,
|
"px": 128,
|
||||||
"sharpTo": 64,
|
"sharpTo": 64,
|
||||||
|
|
|
||||||
18
src/icons.ts
|
|
@ -32,7 +32,7 @@ const emote = (name: string, label: string, meaning: string): SystemIcon => ({ n
|
||||||
export const SYSTEM_ICONS = [
|
export const SYSTEM_ICONS = [
|
||||||
ui('feed', 'Feed', 'care', 'give fish food'), ui('net', 'Net', 'care', 'catch a fish to sell or move'), ui('clean', 'Clean', 'care', 'wipe the glass'),
|
ui('feed', 'Feed', 'care', 'give fish food'), ui('net', 'Net', 'care', 'catch a fish to sell or move'), ui('clean', 'Clean', 'care', 'wipe the glass'),
|
||||||
ui('decorate', 'Decorate', 'care', 'place a new decoration'), ui('arrange', 'Arrange', 'care', 'move what is already placed'),
|
ui('decorate', 'Decorate', 'care', 'place a new decoration'), ui('arrange', 'Arrange', 'care', 'move what is already placed'),
|
||||||
ui('remedy', 'Remedy', 'care', 'heal a sick fish'), ui('inspect', 'Inspect', 'care', 'look closer, search'),
|
ui('remedy', 'Remedy', 'care', 'heal a sick fish'), ui('inspect', 'Inspect', 'care', 'look closer at a fish'),
|
||||||
ui('home', 'Home', 'places', 'your own aquarium'), ui('explore', 'Explore', 'places', 'find other keepers'), ui('map', 'Map', 'places', 'the ocean map and its places'),
|
ui('home', 'Home', 'places', 'your own aquarium'), ui('explore', 'Explore', 'places', 'find other keepers'), ui('map', 'Map', 'places', 'the ocean map and its places'),
|
||||||
ui('shop', 'Shop', 'places', 'buy fish, decor and care'), ui('cart', 'Cart', 'places', 'open the basket'), ui('cart-add', 'Add to cart', 'places', 'put something in the basket'),
|
ui('shop', 'Shop', 'places', 'buy fish, decor and care'), ui('cart', 'Cart', 'places', 'open the basket'), ui('cart-add', 'Add to cart', 'places', 'put something in the basket'),
|
||||||
ui('inventory', 'Stash', 'places', 'what you own but have not placed'), ui('book', 'Book', 'places', 'the Reef Journal and guides'),
|
ui('inventory', 'Stash', 'places', 'what you own but have not placed'), ui('book', 'Book', 'places', 'the Reef Journal and guides'),
|
||||||
|
|
@ -50,6 +50,22 @@ export const SYSTEM_ICONS = [
|
||||||
ui('chat', 'Chat', 'places', 'a conversation, replies, general talk'),
|
ui('chat', 'Chat', 'places', 'a conversation, replies, general talk'),
|
||||||
ui('announce', 'Announcements', 'places', 'news from the team'), ui('updates', 'Updates', 'places', 'patch notes and what changed'),
|
ui('announce', 'Announcements', 'places', 'news from the team'), ui('updates', 'Updates', 'places', 'patch notes and what changed'),
|
||||||
ui('bug', 'Bugs', 'places', 'something broken'), ui('idea', 'Ideas', 'places', 'a suggestion'),
|
ui('bug', 'Bugs', 'places', 'something broken'), ui('idea', 'Ideas', 'places', 'a suggestion'),
|
||||||
|
// Wave 2, painted 2 October 2026 (tools/ui_icons.py; meanings from the 1 October icon audit).
|
||||||
|
ui('reply', 'Reply', 'system', 'answer this'), ui('quote', 'Quote', 'system', "repeat someone's words in yours"),
|
||||||
|
ui('clock', 'Time', 'system', 'when, how long, last activity, away'), ui('showcase', 'Showcase', 'places', 'show what you made'),
|
||||||
|
ui('tank', 'Aquarium', 'things', 'an aquarium you own or buy'), ui('block', 'Block', 'system', 'block a keeper, ban'),
|
||||||
|
ui('trash', 'Remove', 'system', 'remove, delete'), ui('link', 'Link', 'system', 'copy or open a link'),
|
||||||
|
ui('smile', 'Emoji', 'system', 'pick an emoji'), ui('send', 'Send', 'system', 'send a message or post'),
|
||||||
|
ui('whisper', 'Whisper', 'places', 'a private message'), ui('wave', 'Open water', 'places', 'open water, the reef lane'),
|
||||||
|
ui('thermometer', 'Temperature', 'care', 'water temperature, the heater'), ui('drop', 'Water', 'care', 'water quality'),
|
||||||
|
ui('warning', 'Warning', 'system', 'warning, danger'), ui('gift', 'Gift', 'things', 'gifts, something given'),
|
||||||
|
ui('gem', 'Grade', 'things', 'quality tier, grade'), ui('trophy', 'Trophy', 'things', 'achievements, badges'),
|
||||||
|
ui('level', 'Level', 'things', 'level, XP, level-up'), ui('quest', 'Quest', 'things', 'a quest, a goal'),
|
||||||
|
ui('check', 'Done', 'system', 'done, selected, met'), ui('keeper', 'Keeper', 'places', 'an account, a person'),
|
||||||
|
ui('exit', 'Leave', 'system', 'sign out, quit, leave'), ui('globe', 'Language', 'system', 'language, all languages'),
|
||||||
|
ui('search', 'Search', 'system', 'search'), ui('sell', 'Sell', 'care', 'sell, a price'),
|
||||||
|
ui('keyboard', 'Keys', 'system', 'shortcuts and keys'), ui('external', 'Opens elsewhere', 'system', 'opens in a new tab'),
|
||||||
|
ui('add', 'New', 'system', 'new, create'), ui('download', 'Download', 'system', 'download'), ui('mail', 'Mail', 'system', 'email, the newsletter'),
|
||||||
emote('hello', 'Hello', 'wave hello'), emote('heart', 'Love', 'send love'), emote('question', 'Question', 'wonder aloud'), emote('surprise', 'Surprise', 'be surprised'),
|
emote('hello', 'Hello', 'wave hello'), emote('heart', 'Love', 'send love'), emote('question', 'Question', 'wonder aloud'), emote('surprise', 'Surprise', 'be surprised'),
|
||||||
emote('food', 'Food', 'ask for food'), emote('sleep', 'Sleepy', 'feel sleepy'), emote('music', 'Music', 'enjoy the music'), emote('sparkle', 'Sparkle', 'something wonderful'),
|
emote('food', 'Food', 'ask for food'), emote('sleep', 'Sleepy', 'feel sleepy'), emote('music', 'Music', 'enjoy the music'), emote('sparkle', 'Sparkle', 'something wonderful'),
|
||||||
] as const satisfies readonly SystemIcon[]
|
] as const satisfies readonly SystemIcon[]
|
||||||
|
|
|
||||||