11import type { UsageProviderKind } from "@t3tools/contracts" ;
22
3- import { ClaudeAI , CursorIcon , GrokIcon , type Icon , OpenAI } from "../Icons" ;
4-
5- type UsageProviderPresentationKind = UsageProviderKind | "cursor" | "grok" ;
3+ import { ClaudeAI , type Icon , OpenAI } from "../Icons" ;
64
75type UsageProviderPresentation = {
86 readonly label : string ;
@@ -11,36 +9,22 @@ type UsageProviderPresentation = {
119} ;
1210
1311/**
14- * Series and table order. The chart layers both providers from a shared zero
15- * baseline, so this only fixes the reading order of legends, tables and hover
16- * rows; it does not decide which series sits above the other.
17- */
18- export const PROVIDER_ORDER : readonly UsageProviderKind [ ] = [ "codex" , "claude" ] ;
19-
20- /**
21- * Usage-series presentation, including planned Cursor and Grok support. Their
22- * monochrome marks stay on-brand while distinct mode-aware series colors keep
23- * a future four-provider chart readable.
12+ * Exhaustive presentation for providers supported by the usage contract.
13+ * Declaration order is reused by every chart, table, legend, and skeleton, so
14+ * adding a provider only requires its contract support and one entry here.
2415 */
2516export const PROVIDER_PRESENTATION = {
26- claude : {
27- label : "Claude Code" ,
28- color : "#d97757" ,
29- mark : ClaudeAI ,
30- } ,
3117 codex : {
3218 label : "Codex" ,
3319 color : "var(--foreground)" ,
3420 mark : OpenAI ,
3521 } ,
36- cursor : {
37- label : "Cursor" ,
38- color : "light-dark(var(--color-blue-700), var(--color-blue-300))" ,
39- mark : CursorIcon ,
40- } ,
41- grok : {
42- label : "Grok" ,
43- color : "light-dark(var(--color-violet-700), var(--color-violet-300))" ,
44- mark : GrokIcon ,
22+ claude : {
23+ label : "Claude Code" ,
24+ color : "#d97757" ,
25+ mark : ClaudeAI ,
4526 } ,
46- } satisfies Record < UsageProviderPresentationKind , UsageProviderPresentation > ;
27+ } satisfies Record < UsageProviderKind , UsageProviderPresentation > ;
28+
29+ /** The chart layers every series from zero, so order only controls how it is read. */
30+ export const PROVIDER_ORDER = Object . keys ( PROVIDER_PRESENTATION ) as UsageProviderKind [ ] ;
0 commit comments