quotacap 0.0.60 → 0.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // generated by scripts/build-embed.mjs — do not edit
2
- export const VERSION = "0.0.60";
2
+ export const VERSION = "0.0.62";
@@ -84,7 +84,7 @@ export function AdviceDrawer({ open, recommendation, providers, asOf, onClose, o
84
84
  const basis = forecastBasisWords(pick?.advisory);
85
85
  const othersMore = useMore.filter((a) => a.provider !== pickId);
86
86
  const titleId = "advice-drawer-title";
87
- return (_jsxs(_Fragment, { children: [_jsx("div", { "data-testid": "advice-scrim", className: "scrim is-open", "aria-hidden": "true", onClick: onClose }), _jsxs("aside", { ref: dialogRef, tabIndex: -1, "data-testid": "advice-drawer", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, className: "drawer is-open", onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "drawer-head", children: [_jsx("span", { className: "picon rec-picon", "aria-hidden": "true", children: _jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3z" }) }) }), _jsxs("div", { style: { flex: 1 }, children: [_jsx("h2", { id: titleId, children: "Quota Advice & Pacing" }), _jsx("span", { className: "sub", children: "Which quota to burn next, and why" })] }), _jsx("button", { className: "drawer-close", type: "button", "aria-label": "Close advice", onClick: onClose, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", "aria-hidden": "true", children: _jsx("path", { d: "M6 6l12 12M18 6L6 18" }) }) })] }), _jsxs("div", { className: "dsec", children: [_jsx("h3", { children: "Recommended for next session" }), pick && pickName ? (_jsxs("div", { className: "advice-card", style: { marginTop: 8 }, children: [_jsxs("div", { className: "advice-card-main", children: [_jsxs("div", { className: "advice-card-lead", children: [_jsx("span", { className: "sq", style: providerTint(pick.id), children: _jsx(ProviderIcon, { title: pickName, size: 16 }) }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [_jsx("span", { className: "name", children: pickName }), _jsxs("span", { className: "recommended-badge", children: [_jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3z" }) }), "Recommended"] })] })] }), waste !== null && left && (_jsxs("div", { className: "advice-card-stats", children: [_jsxs("b", { children: [waste, "%"] }), " unused at reset", pickClock ? _jsxs(_Fragment, { children: [" (", _jsx("b", { children: pickClock }), ")"] }) : null] }))] }), _jsx("p", { className: "advice-card-body", children: remaining !== null && left && !monthlyBound ? (_jsxs(_Fragment, { children: [_jsx("b", { children: pickName }), " has ", remaining, "% quota remaining with ", left, " to reset, forecast at the ", basis, "."] })) : (recommendation.reason) }), onSelectProvider && (_jsx("div", { children: _jsxs("button", { type: "button", className: "goto-link", onClick: () => onSelectProvider(pick.id), children: ["View ", pickName, " details \u2192"] }) }))] })) : (_jsx("p", { className: "advice-card-body", children: recommendation.reason }))] }), _jsxs("div", { className: "dsec", children: [_jsx("h3", { children: "Fleet Pacing Breakdown" }), _jsxs("dl", { className: "lane-group", children: [_jsxs("dt", { className: "um", children: [_jsx("span", { "aria-hidden": "true", children: "\u2191" }), " Use more"] }), _jsx("dd", { children: othersMore.length
87
+ return (_jsxs(_Fragment, { children: [_jsx("div", { "data-testid": "advice-scrim", className: "scrim is-open", "aria-hidden": "true", onClick: onClose }), _jsxs("aside", { ref: dialogRef, tabIndex: -1, "data-testid": "advice-drawer", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, className: "drawer is-open", onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "drawer-head", children: [_jsx("span", { className: "picon rec-picon", "aria-hidden": "true", children: _jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3z" }) }) }), _jsxs("div", { style: { flex: 1 }, children: [_jsx("h2", { id: titleId, children: "Quota Advice & Pacing" }), _jsx("span", { className: "sub", children: "Which quota to burn next, and why" })] }), _jsx("button", { className: "drawer-close", type: "button", "aria-label": "Close advice", onClick: onClose, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", "aria-hidden": "true", children: _jsx("path", { d: "M6 6l12 12M18 6L6 18" }) }) })] }), _jsxs("div", { className: "dsec", children: [_jsx("h3", { children: "Recommended for next session" }), pick && pickName ? (_jsxs("div", { className: "advice-card", style: { marginTop: 8 }, children: [_jsxs("div", { className: "advice-card-main", children: [_jsxs("div", { className: "advice-card-lead", children: [_jsx("span", { className: "sq", style: providerTint(pick.id), children: _jsx(ProviderIcon, { id: pick.id, title: pickName, size: 16 }) }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [_jsx("span", { className: "name", children: pickName }), _jsxs("span", { className: "recommended-badge", children: [_jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3z" }) }), "Recommended"] })] })] }), waste !== null && left && (_jsxs("div", { className: "advice-card-stats", children: [_jsxs("b", { children: [waste, "%"] }), " unused at reset", pickClock ? _jsxs(_Fragment, { children: [" (", _jsx("b", { children: pickClock }), ")"] }) : null] }))] }), _jsx("p", { className: "advice-card-body", children: remaining !== null && left && !monthlyBound ? (_jsxs(_Fragment, { children: [_jsx("b", { children: pickName }), " has ", remaining, "% quota remaining with ", left, " to reset, forecast at the ", basis, "."] })) : (recommendation.reason) }), onSelectProvider && (_jsx("div", { children: _jsxs("button", { type: "button", className: "goto-link", onClick: () => onSelectProvider(pick.id), children: ["View ", pickName, " details \u2192"] }) }))] })) : (_jsx("p", { className: "advice-card-body", children: recommendation.reason }))] }), _jsxs("div", { className: "dsec", children: [_jsx("h3", { children: "Fleet Pacing Breakdown" }), _jsxs("dl", { className: "lane-group", children: [_jsxs("dt", { className: "um", children: [_jsx("span", { "aria-hidden": "true", children: "\u2191" }), " Use more"] }), _jsx("dd", { children: othersMore.length
88
88
  ? othersMore.map((a) => {
89
89
  const p = providers.find((x) => x.id === a.provider);
90
90
  const name = p?.displayName ?? a.provider;
@@ -25,5 +25,5 @@ export function ProviderCard({ provider, recommended, asOf, onSelect, }) {
25
25
  e.preventDefault();
26
26
  onSelect(provider.id);
27
27
  }
28
- }, className: `pcard ${recommended ? "is-recommended is-top-pick" : ""}`, children: [_jsxs("div", { className: "pcard-head", children: [_jsx("span", { className: "picon", style: providerTint(provider.id), "aria-hidden": "true", children: _jsx(ProviderIcon, { title: name }) }), _jsxs("div", { className: "who", children: [_jsxs("b", { children: [name, recommended && (_jsx("span", { className: "rec-icon", title: "Recommended for next session", role: "img", "aria-label": "recommended", children: _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.3", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3z" }) }) }))] }), updated && _jsxs("span", { className: "src", children: ["Updated ", updated, " ago"] })] }), _jsx(Badge, { provider: provider })] }), _jsxs("div", { className: "pcard-body", children: [_jsx(PaceBar, { provider: provider, asOf: asOf }), _jsx(RateLimitNote, { provider: provider, asOf: asOf }), _jsx(WindowsRow, { provider: provider, asOf: asOf, variant: "card" }), _jsx(PaceStats, { provider: provider, asOf: asOf })] }), _jsxs("div", { className: "pcard-foot", children: [_jsxs("div", { className: "foot-meta", children: [_jsx("span", { children: resetsDate(provider) ?? resetCountdown(provider, asOfMs) }), last && (_jsxs("span", { className: "last-week", children: ["Last ", isMonthlyBound(provider) ? "month" : "week", " ", last.leftoverPct, "% leftover", last.resetsAtEstimated ? " (est.)" : ""] }))] }), _jsx("span", { className: "rowbtn", "aria-hidden": "true", children: "Inspect" })] })] }));
28
+ }, className: `pcard ${recommended ? "is-recommended is-top-pick" : ""}`, children: [_jsxs("div", { className: "pcard-head", children: [_jsx("span", { className: "picon", style: providerTint(provider.id), "aria-hidden": "true", children: _jsx(ProviderIcon, { id: provider.id, title: name }) }), _jsxs("div", { className: "who", children: [_jsxs("b", { children: [name, recommended && (_jsx("span", { className: "rec-icon", title: "Recommended for next session", role: "img", "aria-label": "recommended", children: _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.3", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3z" }) }) }))] }), updated && _jsxs("span", { className: "src", children: ["Updated ", updated, " ago"] })] }), _jsx(Badge, { provider: provider })] }), _jsxs("div", { className: "pcard-body", children: [_jsx(PaceBar, { provider: provider, asOf: asOf }), _jsx(RateLimitNote, { provider: provider, asOf: asOf }), _jsx(WindowsRow, { provider: provider, asOf: asOf, variant: "card" }), _jsx(PaceStats, { provider: provider, asOf: asOf })] }), _jsxs("div", { className: "pcard-foot", children: [_jsxs("div", { className: "foot-meta", children: [_jsx("span", { children: resetsDate(provider) ?? resetCountdown(provider, asOfMs) }), last && (_jsxs("span", { className: "last-week", children: ["Last ", isMonthlyBound(provider) ? "month" : "week", " ", last.leftoverPct, "% leftover", last.resetsAtEstimated ? " (est.)" : ""] }))] }), _jsx("span", { className: "rowbtn", "aria-hidden": "true", children: "Inspect" })] })] }));
29
29
  }
@@ -534,7 +534,7 @@ export function ProviderDrawer({ provider, asOf, recommendation, onClose, onRena
534
534
  model.fiveHourPct !== null &&
535
535
  Number.isFinite(model.fiveHourPct) ? (_jsx(LimitRow, { name: shortWindowLabel(provider.id) ?? "5h limit", pct: effectiveFivePct ?? 0, resetLine: fiveResetLineNode, fillStyle: limitFill(effectiveFivePct ?? 0), elapsedPct: fiveResetPassed ? null : fiveElapsed })) : null;
536
536
  const anyElapsed = [weeklyElapsed, monthlyElapsed, fiveElapsed].some((v) => v !== null);
537
- return (_jsxs(_Fragment, { children: [_jsx("div", { "data-testid": "drawer-scrim", className: "scrim is-open", "aria-hidden": "true", onClick: onClose }), _jsxs("aside", { ref: dialogRef, tabIndex: -1, "data-testid": "provider-drawer", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, className: "drawer is-open", onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "drawer-head", children: [_jsx("span", { className: "picon", style: providerTint(provider.id), children: _jsx(ProviderIcon, { title: model.name }) }), _jsxs("div", { className: "who", style: { flex: 1, minWidth: 0 }, children: [_jsxs("h2", { id: titleId, style: isEditing
537
+ return (_jsxs(_Fragment, { children: [_jsx("div", { "data-testid": "drawer-scrim", className: "scrim is-open", "aria-hidden": "true", onClick: onClose }), _jsxs("aside", { ref: dialogRef, tabIndex: -1, "data-testid": "provider-drawer", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, className: "drawer is-open", onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: "drawer-head", children: [_jsx("span", { className: "picon", style: providerTint(provider.id), children: _jsx(ProviderIcon, { id: provider.id, title: model.name }) }), _jsxs("div", { className: "who", style: { flex: 1, minWidth: 0 }, children: [_jsxs("h2", { id: titleId, style: isEditing
538
538
  ? {
539
539
  position: "absolute",
540
540
  width: 1,
@@ -1,12 +1,13 @@
1
1
  import React from "react";
2
+ export declare function iconKey(id?: string, title?: string): string;
2
3
  /**
3
- * Monogram mark: the display name's first letter, tinted by the provider
4
- * colour through `providerTint`. QuotaCap ships no vendor logos, and the
5
- * earlier stand-in glyphs (a star for Grok, a page for Claude) read as
6
- * meaning something they did not.
4
+ * Provider brand mark: renders the official vector logo for supported AI providers,
5
+ * tinted with `providerTint`. Unknown ids fall back to a styled monogram letter.
7
6
  */
8
- export declare function ProviderIcon({ title, size, }: {
7
+ export declare function ProviderIcon({ id, title, size, }: {
8
+ id?: string;
9
9
  title: string;
10
10
  size?: number;
11
11
  }): React.JSX.Element;
12
+ export declare function providerColorKey(id: string): string;
12
13
  export declare function providerTint(id: string): React.CSSProperties;
@@ -1,17 +1,77 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- function iconKey(id) {
3
- return id.split(":")[0];
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /** Official vector brand marks for supported providers. Unknown ids fall back to a monogram. */
3
+ const LOGO_PATHS = {
4
+ claude: (_jsx("path", { d: "M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z" })),
5
+ codex: (_jsx("path", { d: "M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z" })),
6
+ grok: (_jsx("path", { d: "m3.005 8.858 8.783 12.544h3.904L6.908 8.858zM6.905 15.825 3 21.402h3.907l1.951-2.788zM16.585 2l-6.75 9.64 1.953 2.79L20.492 2zM17.292 7.965v13.437h3.2V3.395z" })),
7
+ kimi: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M21.846 0a1.923 1.923 0 1 1 0 3.846H20.15a.226.226 0 0 1-.227-.226V1.923C19.923.861 20.784 0 21.846 0z" }), _jsx("path", { d: "M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 0 0-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 0 1 .205-.023l6.484 4.772a7.677 7.677 0 0 0 3.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 0 1-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z" })] })),
8
+ agy: (_jsx("path", { d: "M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z" })),
9
+ "opencode-go": (_jsx("path", { d: "M16 6H8v12h8V6zm4 16H4V2h16v20z" })),
10
+ muse: (_jsx("path", { d: "M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z" })),
11
+ };
12
+ export function iconKey(id, title) {
13
+ if (id) {
14
+ const raw = id.split(":")[0].toLowerCase();
15
+ if (raw === "claude" || raw.includes("claude") || raw.includes("anthropic"))
16
+ return "claude";
17
+ if (raw === "codex" || raw.includes("codex") || raw.includes("openai") || raw.includes("chatgpt"))
18
+ return "codex";
19
+ if (raw === "kimi" || raw.includes("kimi") || raw.includes("moonshot"))
20
+ return "kimi";
21
+ if (raw === "grok" || raw.includes("grok") || raw.includes("xai"))
22
+ return "grok";
23
+ if (raw === "agy" || raw.includes("agy") || raw.includes("gemini") || raw.includes("antigravity"))
24
+ return "agy";
25
+ if (raw === "opencode-go" || raw.includes("opencode"))
26
+ return "opencode-go";
27
+ if (raw === "muse" || raw.includes("muse"))
28
+ return "muse";
29
+ return raw;
30
+ }
31
+ if (title) {
32
+ const lower = title.toLowerCase();
33
+ if (lower.includes("claude") || lower.includes("anthropic"))
34
+ return "claude";
35
+ if (lower.includes("codex") || lower.includes("openai") || lower.includes("chatgpt"))
36
+ return "codex";
37
+ if (lower.includes("kimi") || lower.includes("moonshot"))
38
+ return "kimi";
39
+ if (lower.includes("grok") || lower.includes("xai"))
40
+ return "grok";
41
+ if (lower.includes("gemini") || lower.includes("agy") || lower.includes("antigravity"))
42
+ return "agy";
43
+ if (lower.includes("opencode"))
44
+ return "opencode-go";
45
+ if (lower.includes("muse"))
46
+ return "muse";
47
+ }
48
+ return "";
4
49
  }
5
50
  /**
6
- * Monogram mark: the display name's first letter, tinted by the provider
7
- * colour through `providerTint`. QuotaCap ships no vendor logos, and the
8
- * earlier stand-in glyphs (a star for Grok, a page for Claude) read as
9
- * meaning something they did not.
51
+ * Provider brand mark: renders the official vector logo for supported AI providers,
52
+ * tinted with `providerTint`. Unknown ids fall back to a styled monogram letter.
10
53
  */
11
- export function ProviderIcon({ title, size = 17, }) {
12
- return (_jsx("span", { className: "pmono", style: { fontSize: Math.round(size * 0.88) }, "aria-hidden": "true", children: title.trim().charAt(0).toUpperCase() }));
54
+ export function ProviderIcon({ id, title, size = 18, }) {
55
+ const key = iconKey(id, title);
56
+ const mark = LOGO_PATHS[key];
57
+ if (!mark) {
58
+ return (_jsx("span", { className: "pmono", style: { fontSize: Math.round(size * 0.88) }, "aria-hidden": "true", children: title.trim().charAt(0).toUpperCase() }));
59
+ }
60
+ return (_jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "currentColor", fillRule: "evenodd", "aria-hidden": "true", style: { display: "block" }, children: mark }));
61
+ }
62
+ export function providerColorKey(id) {
63
+ if (id === "agy:3p" || id.endsWith(":3p"))
64
+ return "agy-3p";
65
+ return iconKey(id);
13
66
  }
14
67
  export function providerTint(id) {
68
+ const is3p = id === "agy:3p" || id.endsWith(":3p");
69
+ if (is3p) {
70
+ return {
71
+ background: `color-mix(in oklch, var(--p-agy-3p, var(--p-agy, var(--surface-raised))) 18%, transparent)`,
72
+ color: `var(--p-agy-3p, var(--p-agy, var(--ink)))`,
73
+ };
74
+ }
15
75
  const key = iconKey(id);
16
76
  return {
17
77
  background: `color-mix(in oklch, var(--p-${key}, var(--surface-raised)) 18%, transparent)`,
@@ -3,6 +3,7 @@ import { Badge, PaceBar, forecastLine, isMonthlyBound, paceLines, resetCellLines
3
3
  import { lastClose } from "./ClosedWeeks.js";
4
4
  import { WindowsRow } from "./WindowsRow.js";
5
5
  import { RateLimitNote } from "./RateLimitNote.js";
6
+ import { providerColorKey } from "./ProviderIcon.js";
6
7
  export function ProviderRow({ provider, recommended, asOf, onSelect, }) {
7
8
  const quota = provider.quota;
8
9
  const advisory = provider.advisory;
@@ -11,7 +12,7 @@ export function ProviderRow({ provider, recommended, asOf, onSelect, }) {
11
12
  const name = provider.displayName;
12
13
  const reset = resetCellLines(provider, asOfMs);
13
14
  const last = lastClose(provider);
14
- return (_jsxs("div", { "data-testid": `provider-row-${provider.id}`, className: `lrow ${recommended ? "is-recommended is-top-pick" : ""}`, onClick: () => onSelect(provider.id), children: [_jsxs("div", { className: "prov", "data-label": "Provider", children: [_jsx("span", { className: "dot", style: { background: `var(--p-${provider.id.split(":")[0]}, var(--surface-raised))` }, "aria-hidden": "true" }), _jsx("span", { children: _jsxs("span", { className: "nm", children: [name, recommended && (_jsx("span", { className: "rec-icon", title: "Recommended for next session", role: "img", "aria-label": "recommended", children: _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.3", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3z" }) }) }))] }) })] }), _jsx("div", { "data-label": "Used vs elapsed", children: quota ? (_jsxs(_Fragment, { children: [_jsx(PaceBar, { provider: provider, asOf: asOf }), _jsx(RateLimitNote, { provider: provider, asOf: asOf }), _jsx(WindowsRow, { provider: provider, asOf: asOf, variant: "row" })] })) : "—" }), _jsxs("div", { "data-label": "Reset", className: "reset-cell", children: [_jsx("span", { className: "cell-b", children: reset.top }), reset.bottom && _jsx("span", { className: "cell-s", children: reset.bottom }), last && (_jsxs("span", { className: "cell-s", children: ["last ", isMonthlyBound(provider) ? "month" : "week", " ", last.leftoverPct, "% leftover", last.resetsAtEstimated ? " (est.)" : ""] }))] }), _jsxs("div", { "data-label": "Pace", children: [_jsx(Badge, { provider: provider }), lines.length > 0 && (_jsx("div", { style: { marginTop: 2 }, children: lines.map((l) => (_jsxs("div", { className: "cell-s paceline", title: l.tip, children: [_jsx("span", { children: l.label }), _jsx("span", { className: "cell-b", children: l.value })] }, l.label))) }))] }), _jsx("button", { type: "button", className: "rowbtn", onClick: (e) => {
15
+ return (_jsxs("div", { "data-testid": `provider-row-${provider.id}`, className: `lrow ${recommended ? "is-recommended is-top-pick" : ""}`, onClick: () => onSelect(provider.id), children: [_jsxs("div", { className: "prov", "data-label": "Provider", children: [_jsx("span", { className: "dot", style: { background: `var(--p-${providerColorKey(provider.id)}, var(--surface-raised))` }, "aria-hidden": "true" }), _jsx("span", { children: _jsxs("span", { className: "nm", children: [name, recommended && (_jsx("span", { className: "rec-icon", title: "Recommended for next session", role: "img", "aria-label": "recommended", children: _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.3", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3z" }) }) }))] }) })] }), _jsx("div", { "data-label": "Used vs elapsed", children: quota ? (_jsxs(_Fragment, { children: [_jsx(PaceBar, { provider: provider, asOf: asOf }), _jsx(RateLimitNote, { provider: provider, asOf: asOf }), _jsx(WindowsRow, { provider: provider, asOf: asOf, variant: "row" })] })) : "—" }), _jsxs("div", { "data-label": "Reset", className: "reset-cell", children: [_jsx("span", { className: "cell-b", children: reset.top }), reset.bottom && _jsx("span", { className: "cell-s", children: reset.bottom }), last && (_jsxs("span", { className: "cell-s", children: ["last ", isMonthlyBound(provider) ? "month" : "week", " ", last.leftoverPct, "% leftover", last.resetsAtEstimated ? " (est.)" : ""] }))] }), _jsxs("div", { "data-label": "Pace", children: [_jsx(Badge, { provider: provider }), lines.length > 0 && (_jsx("div", { style: { marginTop: 2 }, children: lines.map((l) => (_jsxs("div", { className: "cell-s paceline", title: l.tip, children: [_jsx("span", { children: l.label }), _jsx("span", { className: "cell-b", children: l.value })] }, l.label))) }))] }), _jsx("button", { type: "button", className: "rowbtn", onClick: (e) => {
15
16
  e.stopPropagation();
16
17
  onSelect(provider.id);
17
18
  }, children: "Inspect" }), _jsx("span", { className: "sr-only", children: forecastLine(provider) })] }));
@@ -60,7 +60,7 @@ function LaneSection({ testId, label, tintClass, laneClass, icon, members, provi
60
60
  // A full short window blocks the provider until the last one clears.
61
61
  const waits = memberProvider && Number.isFinite(asOfMs) ? rateLimitWaits(memberProvider, new Date(asOfMs)) : [];
62
62
  const blocked = waits[waits.length - 1];
63
- return (_jsxs("div", { className: "rsub", children: [_jsx("span", { className: "sq", style: providerTint(m.provider), "aria-hidden": "true", children: _jsx(ProviderIcon, { title: name, size: 13 }) }), _jsx("div", { className: "rnm-group", children: _jsx("button", { type: "button", className: "rnm", onClick: () => onSelectProvider?.(m.provider), "aria-label": `View ${name} details`, children: name }) }), _jsx("span", { className: "rnum", children: quota ? (_jsxs(_Fragment, { children: [_jsxs("b", { children: [usedPct, "%"] }), " used", left ? (_jsxs(_Fragment, { children: [" · ", _jsx("b", { children: left }), " left"] })) : null, blocked ? (_jsxs("span", { className: "rwait", "data-testid": `lane-wait-${m.provider}`, children: [_jsx("span", { className: "rwait-sep", children: " · " }), blocked.until ? (_jsxs(_Fragment, { children: ["back ", _jsx("b", { children: blocked.until })] })) : (`${blocked.label} reached`)] })) : null] })) : null })] }, m.provider));
63
+ return (_jsxs("div", { className: "rsub", children: [_jsx("span", { className: "sq", style: providerTint(m.provider), "aria-hidden": "true", children: _jsx(ProviderIcon, { id: m.provider, title: name, size: 13 }) }), _jsx("div", { className: "rnm-group", children: _jsx("button", { type: "button", className: "rnm", onClick: () => onSelectProvider?.(m.provider), "aria-label": `View ${name} details`, children: name }) }), _jsx("span", { className: "rnum", children: quota ? (_jsxs(_Fragment, { children: [_jsxs("b", { children: [usedPct, "%"] }), " used", left ? (_jsxs(_Fragment, { children: [" · ", _jsx("b", { children: left }), " left"] })) : null, blocked ? (_jsxs("span", { className: "rwait", "data-testid": `lane-wait-${m.provider}`, children: [_jsx("span", { className: "rwait-sep", children: " · " }), blocked.until ? (_jsxs(_Fragment, { children: ["back ", _jsx("b", { children: blocked.until })] })) : (`${blocked.label} reached`)] })) : null] })) : null })] }, m.provider));
64
64
  }) })] }));
65
65
  }
66
66
  /**