Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839<script lang="ts"> import { limitMark, markMask, modelMark, providerMark } from './usageIcons';
// A model's or an account's mark, from the usage screens only: 16 px at the // base text size, growing with it (`--mark-size`, which a parent's centring // reads), in the muted text colour beside the name it belongs to, and hidden from a screen // reader because the name is already there. One prop is given: a model's name, // a usage provider string, or a limit's provider as the daemon names it, in // that order. A name in no known family draws nothing rather than a guess. let { model = '', provider = '', limit = '', }: { model?: string; provider?: string; limit?: string } = $props(); const mark = $derived( modelMark(model) ?? providerMark(provider) ?? limitMark(limit), ); const mask = $derived(mark ? markMask(mark) : '');</script>
{#if mark} <span class="mark" aria-hidden="true" style:--mark={mask}></span>{/if}
<style> /* Painted as a mask so it takes the colour around it: the file's own colours never show. */ .mark { --mark-size: calc(16px * var(--canvas-scale)); display: inline-block; flex: none; inline-size: var(--mark-size); block-size: var(--mark-size); color: var(--muted); background-color: currentColor; -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; }</style>