@pollinations/ui 0.1.0-alpha.3 → 0.1.0-alpha.5
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/README.md +21 -10
- package/dist/{Button-CO3Dpbkj.d.cts → Button-ByKwRtdw.d.cts} +1 -1
- package/dist/{Button-CO3Dpbkj.d.ts → Button-ByKwRtdw.d.ts} +1 -1
- package/dist/{Dialog-yXzIFrDg.d.cts → Dialog-D3Nqt8cE.d.cts} +4 -1
- package/dist/{Dialog-yXzIFrDg.d.ts → Dialog-D3Nqt8cE.d.ts} +4 -1
- package/dist/app-user-menu/sdk.cjs +193 -133
- package/dist/app-user-menu/sdk.cjs.map +1 -1
- package/dist/app-user-menu/sdk.d.cts +17 -1
- package/dist/app-user-menu/sdk.d.ts +17 -1
- package/dist/app-user-menu/sdk.js +182 -122
- package/dist/app-user-menu/sdk.js.map +1 -1
- package/dist/app.css +6 -0
- package/dist/auth/index.cjs +233 -223
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +6 -3
- package/dist/auth/index.d.ts +6 -3
- package/dist/auth/index.js +226 -216
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sdk.cjs +13 -8
- package/dist/auth/sdk.cjs.map +1 -1
- package/dist/auth/sdk.d.cts +1 -1
- package/dist/auth/sdk.d.ts +1 -1
- package/dist/auth/sdk.js +13 -8
- package/dist/auth/sdk.js.map +1 -1
- package/dist/brand/lockup-horizontal-black.png +0 -0
- package/dist/brand/lockup-horizontal-black.svg +3 -3
- package/dist/brand/lockup-horizontal-white.png +0 -0
- package/dist/brand/lockup-horizontal-white.svg +3 -3
- package/dist/brand/lockup-horizontal.svg +4 -1
- package/dist/brand/lockup-stacked-black.png +0 -0
- package/dist/brand/lockup-stacked-black.svg +1 -1
- package/dist/brand/lockup-stacked-white.png +0 -0
- package/dist/brand/lockup-stacked-white.svg +1 -1
- package/dist/brand/lockup-stacked.svg +1 -1
- package/dist/brand/mark-black.png +0 -0
- package/dist/brand/mark-black.svg +1 -3
- package/dist/brand/mark-white.png +0 -0
- package/dist/brand/mark-white.svg +1 -3
- package/dist/brand/mark.svg +1 -1
- package/dist/gen/index.cjs +47 -18
- package/dist/gen/index.cjs.map +1 -1
- package/dist/gen/index.d.cts +5 -1
- package/dist/gen/index.d.ts +5 -1
- package/dist/gen/index.js +57 -30
- package/dist/gen/index.js.map +1 -1
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/index.cjs +1044 -817
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -27
- package/dist/index.d.ts +73 -27
- package/dist/index.js +1065 -843
- package/dist/index.js.map +1 -1
- package/dist/markdown.cjs +13 -8
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.js +13 -8
- package/dist/markdown.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +3 -8
- package/dist/wallet/index.cjs +45 -31
- package/dist/wallet/index.cjs.map +1 -1
- package/dist/wallet/index.d.cts +1 -0
- package/dist/wallet/index.d.ts +1 -0
- package/dist/wallet/index.js +45 -31
- package/dist/wallet/index.js.map +1 -1
- package/package.json +1 -1
package/dist/wallet/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/cn.ts","../../src/primitives/Chip.tsx","../../src/lib/link.ts","../../src/primitives/icons/index.tsx","../../src/primitives/InlineLink.tsx","../../src/modules/wallet/format-pollen.ts","../../src/modules/wallet/wallet-display.tsx","../../src/modules/wallet/AccountPollen.tsx","../../src/modules/wallet/chips.tsx","../../src/modules/wallet/colors.ts"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({ prefix: \"polli\" });\n\n/** Internal class merge for polli:-prefixed package primitive classes. */\nexport function cn(...inputs: (string | undefined | null | false)[]) {\n return twMerge(clsx(...inputs));\n}\n","import type { ComponentPropsWithoutRef, FC } from \"react\";\nimport { cn } from \"../lib/cn.ts\";\n\n/** Semantic chip labels for status and metadata badges. */\ntype ChipIntent =\n | \"news\"\n | \"new\"\n | \"free\"\n | \"alpha\"\n | \"neutral\"\n | \"success\"\n | \"warning\"\n | \"info\"\n | \"danger\";\n\nconst chipSizes = {\n icon: \"polli:h-5 polli:w-5 polli:p-0 polli:text-xs\",\n sm: \"polli:h-5 polli:px-2 polli:text-xs\",\n md: \"polli:h-6 polli:px-2.5 polli:text-sm\",\n lg: \"polli:h-7 polli:px-3 polli:text-sm\",\n} as const;\n\nconst intentClasses: Record<ChipIntent, string> = {\n news: \"polli:bg-intent-news-bg-light polli:text-intent-news-text\",\n new: \"polli:bg-intent-new-bg-light polli:text-intent-new-text\",\n free: \"polli:bg-intent-free-bg-light polli:text-intent-free-text\",\n alpha: \"polli:bg-intent-alpha-bg-light polli:text-intent-alpha-text\",\n neutral: \"polli:bg-ink-100/80 polli:text-ink-900\",\n success:\n \"polli:bg-intent-success-bg-bright/15 polli:text-intent-success-text\",\n warning: \"polli:bg-intent-warning-bg-light polli:text-intent-warning-text\",\n info: \"polli:bg-intent-info-bg-light polli:text-intent-info-text\",\n danger: \"polli:bg-intent-danger-bg-light polli:text-intent-danger-text\",\n};\n\nexport type ChipProps = ComponentPropsWithoutRef<\"span\"> & {\n /** Semantic intent. */\n intent?: ChipIntent;\n size?: keyof typeof chipSizes;\n};\n\n// Static, rectangular colored container. Round shapes are reserved for buttons.\n// Reads `bg-theme-bg-active` / `text-theme-text-strong` from the cascade unless\n// `intent` is set (semantic, theme-independent).\nexport const Chip: FC<ChipProps> = ({\n intent,\n size = \"md\",\n className,\n children,\n ...rest\n}) => {\n const intentClass = intent\n ? intentClasses[intent]\n : \"polli:bg-theme-bg-active polli:text-theme-text-strong\";\n return (\n <span\n {...rest}\n className={cn(\n \"polli:inline-flex polli:shrink-0 polli:items-center polli:justify-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-none\",\n chipSizes[size],\n intentClass,\n className,\n )}\n >\n {children}\n </span>\n );\n};\n","/** Relative URLs and same-origin absolute URLs stay in the current app. */\nexport function isExternalHref(\n href: unknown,\n origin = globalThis.location?.origin,\n): boolean {\n if (typeof href !== \"string\" || !/^(https?:)?\\/\\//i.test(href))\n return false;\n if (!origin) return true;\n try {\n return new URL(href, origin).origin !== origin;\n } catch {\n return false;\n }\n}\n","import type { IconProps } from \"./types.ts\";\n\nconst strokeProps = {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n} as const;\n\nexport function AppIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"14\" rx=\"2\" />\n <path d=\"M2 20h20\" />\n </svg>\n );\n}\n\nexport function AccountIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"8\" r=\"4\" />\n <path d=\"M4 21a8 8 0 0 1 16 0\" />\n </svg>\n );\n}\n\nexport function ArrowRightIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M5 12h14M13 6l6 6-6 6\" />\n </svg>\n );\n}\n\nexport function BeakerIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 3h6\" />\n <path d=\"M10 3v6.5L4.5 18a2 2 0 0 0 1.7 3h11.6a2 2 0 0 0 1.7-3L14 9.5V3\" />\n <path d=\"M7 14h10\" />\n </svg>\n );\n}\n\nexport function BotIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 8V4H8\" />\n <rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" rx=\"2\" />\n <path d=\"M2 14h2M20 14h2\" />\n <path d=\"M9 13v2M15 13v2\" />\n </svg>\n );\n}\n\nexport function BookIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4 4h5a3 3 0 0 1 3 3v13a2 2 0 0 0-2-2H4z\" />\n <path d=\"M20 4h-5a3 3 0 0 0-3 3v13a2 2 0 0 1 2-2h6z\" />\n </svg>\n );\n}\n\nexport function BugIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m8 2 1.9 1.9M14.1 3.9 16 2\" />\n <path d=\"M9 7V6a3 3 0 0 1 6 0v1\" />\n <path d=\"M12 20c-3.3 0-6-2.7-6-6v-3a6 6 0 0 1 12 0v3c0 3.3-2.7 6-6 6Z\" />\n <path d=\"M12 20v-9M6.5 9C4.6 8.8 3 7.1 3 5M6 13H2M3 21c0-2.1 1.7-3.9 3.8-4M17.5 9C19.4 8.8 21 7.1 21 5M18 13h4M21 21c0-2.1-1.7-3.9-3.8-4\" />\n </svg>\n );\n}\n\nexport function CheckIcon(props: IconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n {...strokeProps}\n strokeWidth={2.5}\n {...props}\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\nexport function ClipboardIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n );\n}\n\nexport function ClockIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5l3 2\" />\n </svg>\n );\n}\n\nexport function DiscordIcon(props: IconProps) {\n return (\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M20.32 4.37A19.8 19.8 0 0 0 15.36 2.83a.07.07 0 0 0-.08.04c-.21.38-.45.88-.62 1.27a18.27 18.27 0 0 0-5.52 0 12.84 12.84 0 0 0-.63-1.27.08.08 0 0 0-.08-.04A19.74 19.74 0 0 0 3.47 4.37a.07.07 0 0 0-.03.03C.31 9.07-.55 13.61-.13 18.1a.08.08 0 0 0 .03.06 19.9 19.9 0 0 0 6.08 3.07.08.08 0 0 0 .09-.03c.47-.64.88-1.31 1.24-2.02a.08.08 0 0 0-.04-.1 13.08 13.08 0 0 1-1.9-.91.08.08 0 0 1-.01-.13c.13-.1.25-.2.37-.29a.07.07 0 0 1 .08-.01 14.24 14.24 0 0 0 12.38 0 .07.07 0 0 1 .08.01c.12.1.25.2.38.3a.08.08 0 0 1-.01.12 12.22 12.22 0 0 1-1.9.9.08.08 0 0 0-.04.11c.36.7.77 1.38 1.23 2.02a.08.08 0 0 0 .1.03 19.84 19.84 0 0 0 6.08-3.07.08.08 0 0 0 .03-.05c.5-5.2-.84-9.7-3.77-13.71a.06.06 0 0 0-.03-.03ZM8.02 15.37c-1.18 0-2.16-1.08-2.16-2.4 0-1.32.96-2.4 2.16-2.4 1.2 0 2.18 1.09 2.16 2.4 0 1.32-.96 2.4-2.16 2.4Zm7.96 0c-1.18 0-2.16-1.08-2.16-2.4 0-1.32.96-2.4 2.16-2.4 1.2 0 2.18 1.09 2.16 2.4 0 1.32-.95 2.4-2.16 2.4Z\"\n />\n </svg>\n );\n}\n\nexport function InstagramIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"5\" />\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <circle\n cx=\"17.5\"\n cy=\"6.5\"\n r=\"1\"\n fill=\"currentColor\"\n stroke=\"none\"\n />\n </svg>\n );\n}\n\nexport function XSocialIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M18.24 2.25h3.31l-7.23 8.26 8.51 11.24h-6.66l-5.21-6.82-5.97 6.82H1.68l7.73-8.84L1.25 2.25h6.83l4.71 6.23 5.45-6.23Zm-1.16 17.52h1.83L7.08 4.13H5.12l11.96 15.64Z\"\n />\n </svg>\n );\n}\n\nexport function LinkedInIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M20.45 20.45h-3.56v-5.57c0-1.33-.03-3.04-1.85-3.04-1.86 0-2.14 1.45-2.14 2.94v5.67H9.34V9h3.42v1.56h.05c.47-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28ZM5.32 7.43a2.07 2.07 0 1 1 0-4.13 2.07 2.07 0 0 1 0 4.13ZM7.1 20.45H3.54V9H7.1v11.45Z\"\n />\n </svg>\n );\n}\n\nexport function DownloadIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n <polyline points=\"7 10 12 15 17 10\" />\n <line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\" />\n </svg>\n );\n}\n\nexport function ExpandIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M8 3H3v5M16 3h5v5M21 16v5h-5M3 16v5h5\" />\n </svg>\n );\n}\n\nexport function PlayIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path fill=\"currentColor\" d=\"M7 4.5v15l12-7.5z\" />\n </svg>\n );\n}\n\nexport function PauseIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path fill=\"currentColor\" d=\"M6 4h4v16H6zM14 4h4v16h-4z\" />\n </svg>\n );\n}\n\nexport function CloudUploadIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M17.5 19H19a4 4 0 0 0 .4-8A7.5 7.5 0 0 0 5 9.5 5 5 0 0 0 6 19h1.5\" />\n <path d=\"m8.5 15.5 3.5-3.5 3.5 3.5M12 12v9\" />\n </svg>\n );\n}\n\nexport function ExternalLinkIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M7 17 17 7M9 7h8v8\" />\n </svg>\n );\n}\n\nexport function GenApiIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m8 3 4 1.5L16 3v18l-4-1.5L8 21z\" />\n <path d=\"M8 3v18M16 3v18\" />\n </svg>\n );\n}\n\nexport function GitBranchIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <line x1=\"6\" y1=\"3\" x2=\"6\" y2=\"15\" />\n <circle cx=\"18\" cy=\"6\" r=\"3\" />\n <circle cx=\"6\" cy=\"18\" r=\"3\" />\n <path d=\"M18 9a9 9 0 0 1-9 9\" />\n </svg>\n );\n}\n\nexport function GitPullRequestIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"6\" cy=\"6\" r=\"3\" />\n <circle cx=\"18\" cy=\"18\" r=\"3\" />\n <path d=\"M6 9v12M13 6h3a2 2 0 0 1 2 2v7\" />\n </svg>\n );\n}\n\nexport function GraduationCapIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21.42 10.92a1 1 0 0 0-.02-1.84L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.83l8.57 3.91a2 2 0 0 0 1.66 0z\" />\n <path d=\"M22 10v6\" />\n <path d=\"M6 12.5V16a6 3 0 0 0 12 0v-3.5\" />\n </svg>\n );\n}\n\nexport function SparklesIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 3l1.9 5.8a2 2 0 0 0 1.3 1.3L21 12l-5.8 1.9a2 2 0 0 0-1.3 1.3L12 21l-1.9-5.8a2 2 0 0 0-1.3-1.3L3 12l5.8-1.9a2 2 0 0 0 1.3-1.3z\" />\n </svg>\n );\n}\n\nexport function GitHubIcon(props: IconProps) {\n return (\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12 .5A11.5 11.5 0 0 0 8.36 22.9c.58.11.79-.25.79-.56v-2.16c-3.21.7-3.89-1.38-3.89-1.38-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.04 1.76 2.71 1.25 3.37.96.11-.75.4-1.25.74-1.54-2.56-.29-5.26-1.28-5.26-5.7 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.06 0 0 .97-.31 3.16 1.18a10.88 10.88 0 0 1 5.76 0c2.19-1.49 3.15-1.18 3.15-1.18.63 1.6.23 2.77.11 3.06.74.81 1.19 1.84 1.19 3.1 0 4.43-2.7 5.4-5.27 5.69.41.36.78 1.06.78 2.14v3.19c0 .31.21.68.8.56A11.5 11.5 0 0 0 12 .5Z\"\n />\n </svg>\n );\n}\n\nexport function ImageIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" />\n <circle cx=\"9\" cy=\"9\" r=\"2\" />\n <path d=\"m21 15-5-5L5 21\" />\n </svg>\n );\n}\n\nexport function CubeIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m21 16-9 5-9-5V8l9-5 9 5z\" />\n <path d=\"m3 8 9 5 9-5\" />\n <path d=\"M12 13v8\" />\n </svg>\n );\n}\n\nexport function AudioIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 18V5l12-2v13\" />\n <circle cx=\"6\" cy=\"18\" r=\"3\" />\n <circle cx=\"18\" cy=\"16\" r=\"3\" />\n </svg>\n );\n}\n\nexport function LockIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 11V7a5 5 0 0 1 10 0v4\" />\n </svg>\n );\n}\n\nexport function LogInIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M10 17l5-5-5-5\" />\n <path d=\"M15 12H3\" />\n <path d=\"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4\" />\n </svg>\n );\n}\n\nexport function LogOutIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\" />\n <path d=\"m16 17 5-5-5-5\" />\n <path d=\"M21 12H9\" />\n </svg>\n );\n}\n\nexport function MailIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"m3 7 9 7 9-7\" />\n </svg>\n );\n}\n\nexport function McpIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"2\" y=\"4\" width=\"8\" height=\"16\" rx=\"1.5\" />\n <rect x=\"14\" y=\"4\" width=\"8\" height=\"16\" rx=\"1.5\" />\n <path d=\"M10 12h4\" />\n </svg>\n );\n}\n\nexport function MenuIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4 7h16M4 12h16M4 17h16\" />\n </svg>\n );\n}\n\nexport function NewspaperIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M5 4h12a1 1 0 0 1 1 1v14a1 1 0 0 0 1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1z\" />\n <path d=\"M18 8h2a1 1 0 0 1 1 1v9a2 2 0 0 1-2 2\" />\n <path d=\"M7 8h7M7 12h7M7 16h4\" />\n </svg>\n );\n}\n\nexport function PlusIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n );\n}\n\nexport function TerminalIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <polyline points=\"4 8 8 12 4 16\" />\n <line x1=\"12\" y1=\"20\" x2=\"20\" y2=\"20\" />\n </svg>\n );\n}\n\nexport function ToolIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l2.1 2.1a1 1 0 0 0 1.4 0l4-4a6 6 0 0 1-8 8l-8 8a2.8 2.8 0 0 1-4-4l8-8a6 6 0 0 1 8-8l-4 4Z\" />\n </svg>\n );\n}\n\nexport function TargetIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <circle cx=\"12\" cy=\"12\" r=\"5\" />\n <circle cx=\"12\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n );\n}\n\nexport function TokensIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4 9h16M4 15h16M10 3 8 21M16 3l-2 18\" />\n </svg>\n );\n}\n\nexport function UsageIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4 18a8 8 0 1 1 16 0\" />\n <path d=\"M12 18l3.5-5\" />\n <path d=\"M7 18h10\" />\n <path d=\"M7.5 12.5 6 11\" />\n <path d=\"M16.5 12.5 18 11\" />\n </svg>\n );\n}\n\nexport function WarningIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M10.3 3.1 1.8 17a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.1a2 2 0 0 0-3.4 0Z\" />\n <path d=\"M12 9v4M12 17h.01\" />\n </svg>\n );\n}\n\nexport function TrendUpIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <polyline points=\"3 17 9 11 13 15 21 7\" />\n <polyline points=\"15 7 21 7 21 13\" />\n </svg>\n );\n}\n\nexport function EarningsIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <ellipse cx=\"10\" cy=\"6\" rx=\"6\" ry=\"3\" />\n <path d=\"M4 6v8c0 1.7 2.7 3 6 3 1.2 0 2.4-.2 3.3-.5\" />\n <path d=\"M16 6v4\" />\n <path d=\"M4 10c0 1.7 2.7 3 6 3 1.1 0 2.1-.1 3-.4\" />\n <path d=\"M18 14v6\" />\n <path d=\"M15 17h6\" />\n </svg>\n );\n}\n\nexport function WalletIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M3 7a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2v2H5a2 2 0 0 0-2 2V7Z\" />\n <path d=\"M3 11a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z\" />\n <circle cx=\"17\" cy=\"14\" r=\"1.25\" fill=\"currentColor\" />\n </svg>\n );\n}\n\nexport function MoonIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z\" />\n </svg>\n );\n}\n\nexport function SunIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4\" />\n </svg>\n );\n}\n\nexport function XIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n\nexport function TrashIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4h8v2\" />\n <path d=\"m19 6-1 15H6L5 6\" />\n <path d=\"M10 11v6M14 11v6\" />\n </svg>\n );\n}\n\n// --- Model modality / capability / price glyphs (single-ink, replace emoji) ---\n\nexport function ChatIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\" />\n </svg>\n );\n}\n\nexport function RobotIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"6\" width=\"18\" height=\"15\" rx=\"3\" />\n <path d=\"M12 2v4M3 11H1v5h2M21 11h2v5h-2M8 17h8\" />\n <circle cx=\"9\" cy=\"12\" r=\"1\" />\n <circle cx=\"15\" cy=\"12\" r=\"1\" />\n </svg>\n );\n}\n\nexport function EyeIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n );\n}\n\nexport function EyeOffIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n <path d=\"M3 3l18 18\" />\n </svg>\n );\n}\n\nexport function VideoIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m22 8-6 4 6 4V8z\" />\n <rect x=\"2\" y=\"6\" width=\"14\" height=\"12\" rx=\"2\" />\n </svg>\n );\n}\n\nexport function MicIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z\" />\n <path d=\"M19 10v2a7 7 0 0 1-14 0v-2\" />\n <path d=\"M12 19v3\" />\n </svg>\n );\n}\n\nexport function SpeakerIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M11 5 6 9H2v6h4l5 4z\" />\n <path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\" />\n <path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\" />\n </svg>\n );\n}\n\nexport function MegaphoneIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m3 11 18-5v12L3 14v-3z\" />\n <path d=\"m7 15 1.5 6H14l-2-7\" />\n </svg>\n );\n}\n\nexport function ReasoningIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 18h6M10 22h4M15.1 14c.2-1 .6-1.7 1.4-2.5A4.6 4.6 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.8.8 1.2 1.5 1.4 2.5\" />\n </svg>\n );\n}\n\nexport function RocketIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\" />\n <path d=\"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z\" />\n <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0\" />\n <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n </svg>\n );\n}\n\nexport function SearchIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m21 21-4.3-4.3\" />\n </svg>\n );\n}\n\nexport function SignOutIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\" />\n <path d=\"m16 17 5-5-5-5\" />\n <path d=\"M21 12H9\" />\n </svg>\n );\n}\n\nexport function PowerIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 2v10\" />\n <path d=\"M18.4 6.6a9 9 0 1 1-12.77.04\" />\n </svg>\n );\n}\n\nexport function SparkleIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9.94 15.5A2 2 0 0 0 8.5 14.06l-6.14-1.58a.5.5 0 0 1 0-.96L8.5 9.94A2 2 0 0 0 9.94 8.5l1.58-6.14a.5.5 0 0 1 .96 0L14.06 8.5A2 2 0 0 0 15.5 9.94l6.14 1.58a.5.5 0 0 1 0 .96L15.5 14.06a2 2 0 0 0-1.44 1.44l-1.58 6.14a.5.5 0 0 1-.96 0z\" />\n <path d=\"M20 3v4\" />\n <path d=\"M22 5h-4\" />\n <path d=\"M4 17v2\" />\n <path d=\"M5 18H3\" />\n </svg>\n );\n}\n\nexport function StarIcon({\n filled = false,\n ...props\n}: IconProps & { filled?: boolean }) {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n {...strokeProps}\n fill={filled ? \"currentColor\" : \"none\"}\n {...props}\n >\n <polygon points=\"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2\" />\n </svg>\n );\n}\n\nexport function CodeIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m16 18 6-6-6-6M8 6l-6 6 6 6\" />\n </svg>\n );\n}\n\nexport function DatabaseIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <ellipse cx=\"12\" cy=\"5\" rx=\"9\" ry=\"3\" />\n <path d=\"M3 5v14a9 3 0 0 0 18 0V5\" />\n <path d=\"M3 12a9 3 0 0 0 18 0\" />\n </svg>\n );\n}\n\nexport function CardIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"2\" y=\"5\" width=\"20\" height=\"14\" rx=\"2\" />\n <path d=\"M2 10h20\" />\n </svg>\n );\n}\n\nexport function SproutIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M7 20h10\" />\n <path d=\"M10 20c5.5-2.5.8-6.4 3-10\" />\n <path d=\"M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z\" />\n <path d=\"M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z\" />\n </svg>\n );\n}\n\nexport function PencilIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 20h9\" />\n <path d=\"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z\" />\n </svg>\n );\n}\n\nexport function KeyIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"7.5\" cy=\"15.5\" r=\"5.5\" />\n <path d=\"m21 2-9.6 9.6\" />\n <path d=\"m15.5 7.5 3 3L22 7l-3-3\" />\n </svg>\n );\n}\n\nexport function GlobeIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\" />\n <path d=\"M2 12h20\" />\n </svg>\n );\n}\n\nexport function ArrowLeftIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M19 12H5\" />\n <path d=\"m12 19-7-7 7-7\" />\n </svg>\n );\n}\n\nexport function RefreshIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21 12a9 9 0 1 1-2.64-6.36\" />\n <path d=\"M21 3v6h-6\" />\n </svg>\n );\n}\n\nexport type { IconProps } from \"./types.ts\";\n","import type { PropsWithChildren } from \"react\";\nimport { isExternalHref } from \"../lib/link.ts\";\nimport { ExternalLinkIcon } from \"./icons/index.tsx\";\n\ntype BaseInlineLinkProps = {\n /** Set explicitly for non-http external links, or false for custom routing components. */\n external?: boolean;\n showIcon?: boolean;\n /** Inline text inherits its size; footers use 13px and standalone links 14px. */\n size?: \"inherit\" | \"footer\" | \"sm\";\n /** Accent for prominent links; quiet for secondary navigation. */\n tone?: \"accent\" | \"quiet\";\n className?: string;\n};\n\nexport type InlineLinkProps<T extends React.ElementType = \"a\"> =\n PropsWithChildren<BaseInlineLinkProps> & {\n as?: T;\n } & Omit<\n React.ComponentPropsWithoutRef<T>,\n keyof BaseInlineLinkProps | \"as\"\n >;\n\n/** Shared text-link rule: surrounding font, selectable ink, persistent underline,\n * visible keyboard focus, and an external arrow only when leaving the app.\n * Navigation and button-shaped actions use their own primitives.\n */\nexport function InlineLink<T extends React.ElementType = \"a\">({\n as,\n external,\n showIcon = true,\n size = \"inherit\",\n tone = \"accent\",\n className,\n children,\n ...linkProps\n}: InlineLinkProps<T>) {\n const Component: React.ElementType = as || \"a\";\n const isExternal =\n external ?? isExternalHref((linkProps as { href?: unknown }).href);\n\n return (\n <Component\n target={isExternal && as !== \"button\" ? \"_blank\" : undefined}\n rel={\n isExternal && as !== \"button\"\n ? \"noopener noreferrer\"\n : undefined\n }\n className={[\"polli-link\", className].filter(Boolean).join(\" \")}\n data-size={size}\n data-tone={tone}\n {...linkProps}\n >\n {children}\n {showIcon && isExternal && (\n <ExternalLinkIcon\n aria-hidden=\"true\"\n className=\"polli-link-external-icon\"\n />\n )}\n </Component>\n );\n}\n","// 5-digit budget for pollen display. Integer takes its space, decimals fill\n// the remainder (capped at 4), floor toward -infinity, trailing zeros stripped.\n// Integers needing >=6 digits switch to compact (K/M/B, 3 sig figs).\n// Decimal point and minus sign do not count toward the budget.\n\nconst BUDGET = 5;\nconst MAX_DECIMALS = 4;\nconst COMPACT_THRESHOLD = 100_000;\n\nfunction floorTo(value: number, decimals: number): number {\n const factor = 10 ** decimals;\n return Math.floor(value * factor) / factor;\n}\n\nfunction formatCompact(value: number): string {\n const abs = Math.abs(value);\n const sign = value < 0 ? \"-\" : \"\";\n const [unit, scale] =\n abs >= 1e9\n ? ([\"B\", 1e9] as const)\n : abs >= 1e6\n ? ([\"M\", 1e6] as const)\n : ([\"K\", 1e3] as const);\n const ratio = abs / scale;\n const intDigits = Math.max(1, Math.floor(Math.log10(ratio)) + 1);\n const decimals = Math.max(0, 3 - intDigits);\n const floored = floorTo(ratio, decimals);\n return `${sign}${Number(floored.toFixed(decimals)).toString()}${unit}`;\n}\n\nexport function formatPollen(value: number): string {\n if (!Number.isFinite(value) || value === 0) return \"0\";\n\n const abs = Math.abs(value);\n\n if (abs >= COMPACT_THRESHOLD) return formatCompact(value);\n\n const intDigits = abs >= 1 ? Math.floor(Math.log10(abs)) + 1 : 1;\n const decimals = Math.min(MAX_DECIMALS, Math.max(0, BUDGET - intDigits));\n const floored = floorTo(value, decimals);\n if (floored === 0) return \"0\";\n return Number(floored.toFixed(decimals)).toString();\n}\n","import type { FC, ReactNode } from \"react\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { CardIcon, SproutIcon } from \"../../primitives/icons/index.tsx\";\n\ntype WalletBalanceKind = \"paid\" | \"tier\";\n\nconst walletPanelClasses: Record<WalletBalanceKind, string> = {\n paid: \"polli-wallet-panel-paid\",\n tier: \"polli-wallet-panel-tier\",\n};\n\nconst walletTextClasses: Record<WalletBalanceKind, string> = {\n paid: \"polli-wallet-text-paid\",\n tier: \"polli-wallet-text-tier\",\n};\n\nconst walletKindIcons: Record<WalletBalanceKind, typeof CardIcon> = {\n paid: CardIcon,\n tier: SproutIcon,\n};\n\nexport type WalletKindIconProps = {\n kind: WalletBalanceKind;\n className?: string;\n};\n\n/** The paid/Quest marker: a card for paid balance or sprout for Quest Pollen. */\nexport const WalletKindIcon: FC<WalletKindIconProps> = ({\n kind,\n className,\n}) => {\n const Icon = walletKindIcons[kind];\n return (\n <Icon\n aria-hidden=\"true\"\n className={cn(\n \"polli:h-3.5 polli:w-3.5 polli:shrink-0\",\n walletTextClasses[kind],\n className,\n )}\n />\n );\n};\n\nexport type WalletBalanceCardProps = {\n kind: WalletBalanceKind;\n label: ReactNode;\n value: ReactNode;\n icon?: ReactNode;\n info?: ReactNode;\n footer?: ReactNode;\n className?: string;\n};\n\nexport const WalletBalanceCard: FC<WalletBalanceCardProps> = ({\n kind,\n label,\n value,\n icon,\n info,\n footer,\n className,\n}) => (\n <div\n className={cn(\n \"polli:min-w-0 polli:rounded-xl polli:p-4\",\n walletPanelClasses[kind],\n className,\n )}\n >\n <span className=\"polli:flex polli:items-center polli:gap-2\">\n {icon ?? <WalletKindIcon kind={kind} />}\n <span\n className={cn(\n \"polli:text-sm polli:font-bold polli:uppercase polli:tracking-wide\",\n walletTextClasses[kind],\n )}\n >\n {label}\n </span>\n {info}\n </span>\n <div\n className={cn(\n \"polli-wallet-balance-value polli:[overflow-wrap:anywhere] polli:mt-1 polli:font-bold polli:leading-none polli:tracking-tight polli:tabular-nums\",\n walletTextClasses[kind],\n )}\n >\n {value}\n </div>\n {footer && (\n <div className=\"polli:mt-1.5 polli:text-sm polli:font-bold polli:tabular-nums polli:text-intent-success-text\">\n {footer}\n </div>\n )}\n </div>\n);\n","import { Chip } from \"../../primitives/Chip.tsx\";\nimport { InlineLink } from \"../../primitives/InlineLink.tsx\";\nimport { KeyIcon, WalletIcon } from \"../../primitives/icons/index.tsx\";\nimport { formatPollen } from \"./format-pollen.ts\";\nimport { WalletKindIcon } from \"./wallet-display.tsx\";\n\nexport type AccountPollenSource =\n | {\n type: \"wallet\";\n /** Undefined while the balance is unavailable. */\n balances?: { paid: number; quest: number };\n }\n | {\n type: \"budget\";\n /** The app's remaining budget, never the owner's wallet total. `null` = unlimited. */\n remaining?: number | null;\n generationEnabled?: boolean;\n };\n\nfunction isEmpty(amount: number | null | undefined): boolean {\n return amount != null && amount <= 0;\n}\n\ntype PollenStatus = \"limit-reached\" | \"no-pollen\" | \"unlimited\";\n\nconst labels: Record<PollenStatus, string> = {\n \"limit-reached\": \"Limit reached\",\n \"no-pollen\": \"No Pollen\",\n unlimited: \"Unlimited\",\n};\n\nfunction PollenStatusBadge({\n state,\n topUpHref,\n}: {\n state: PollenStatus;\n topUpHref?: string;\n}) {\n const Icon = state === \"no-pollen\" ? WalletIcon : KeyIcon;\n const label = labels[state];\n return (\n <Chip\n size=\"sm\"\n intent={state === \"unlimited\" ? \"info\" : \"danger\"}\n aria-label={label}\n >\n <Icon\n aria-hidden=\"true\"\n className=\"polli:h-3.5 polli:w-3.5 polli:shrink-0\"\n />\n {label}\n {state === \"no-pollen\" && topUpHref && (\n <>\n <span aria-hidden=\"true\">·</span>\n <InlineLink\n href={topUpHref}\n aria-label={`${label}. Top up`}\n >\n Top up\n </InlineLink>\n </>\n )}\n </Chip>\n );\n}\n\n/** Icon + amount; unlimited, exhausted, or empty states become a badge. */\nexport function AccountPollen({\n source,\n topUpHref,\n}: {\n source: AccountPollenSource;\n /** Shown in the empty-wallet badge. A menu keeps recovery links in its dropdown. */\n topUpHref?: string;\n}) {\n if (source.type === \"budget\") {\n if (source.generationEnabled === false) return null;\n // null is the API's explicit \"no budget\"; undefined is not loaded yet.\n const unlimited = source.remaining === null;\n if (!unlimited && source.remaining === undefined) return null;\n if (unlimited) return <PollenStatusBadge state=\"unlimited\" />;\n const remaining = source.remaining as number;\n if (isEmpty(remaining))\n return <PollenStatusBadge state=\"limit-reached\" />;\n return (\n <span\n title=\"App budget left\"\n className=\"polli:inline-flex polli:items-center polli:gap-1 polli:tabular-nums\"\n >\n <KeyIcon\n aria-hidden=\"true\"\n className=\"polli:h-3.5 polli:w-3.5 polli:shrink-0\"\n />\n <span className=\"polli:sr-only\">App budget: </span>\n {formatPollen(remaining)} pollen\n </span>\n );\n }\n const { balances } = source;\n if (!balances) return null;\n if (isEmpty(balances.paid) && isEmpty(balances.quest))\n return <PollenStatusBadge state=\"no-pollen\" topUpHref={topUpHref} />;\n return (\n <span className=\"polli:inline-flex polli:items-center polli:gap-2 polli:tabular-nums\">\n {/* Quest Pollen is spent first, so it comes first. */}\n {([\"quest\", \"paid\"] as const).map((kind) => {\n const amount = balances[kind];\n return (\n <span\n key={kind}\n className=\"polli:inline-flex polli:items-center polli:gap-1\"\n >\n <WalletKindIcon\n kind={kind === \"paid\" ? \"paid\" : \"tier\"}\n />\n <span className=\"polli:sr-only\">\n {kind === \"paid\" ? \"Paid\" : \"Quest\"} Pollen:{\" \"}\n </span>\n {formatPollen(Math.max(0, amount))}\n </span>\n );\n })}\n </span>\n );\n}\n","import type { FC } from \"react\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { Chip, type ChipProps } from \"../../primitives/Chip.tsx\";\n\nexport type WalletChipProps = Omit<ChipProps, \"intent\">;\n\nexport const PaidChip: FC<WalletChipProps> = ({\n className,\n children,\n ...props\n}) => (\n <Chip {...props} className={cn(\"polli-wallet-chip-paid\", className)}>\n {children}\n </Chip>\n);\n\nexport const TierChip: FC<WalletChipProps> = ({\n className,\n children,\n ...props\n}) => (\n <Chip {...props} className={cn(\"polli-wallet-chip-tier\", className)}>\n {children}\n </Chip>\n);\n","export const PAID_BALANCE_CHART_COLOR = \"var(--polli-color-paid-soft)\";\nexport const TIER_BALANCE_CHART_COLOR = \"var(--polli-color-tier-soft)\";\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,2BAA2B;AAEpC,IAAM,UAAU,oBAAoB,EAAE,QAAQ,QAAQ,CAAC;AAGhD,SAAS,MAAM,QAA+C;AACjE,SAAO,QAAQ,KAAK,GAAG,MAAM,CAAC;AAClC;;;AC+CQ;AAxCR,IAAM,YAAY;AAAA,EACd,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACR;AAEA,IAAM,gBAA4C;AAAA,EAC9C,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SACI;AAAA,EACJ,SAAS;AAAA,EACT,MAAM;AAAA,EACN,QAAQ;AACZ;AAWO,IAAM,OAAsB,CAAC;AAAA,EAChC;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,GAAG;AACP,MAAM;AACF,QAAM,cAAc,SACd,cAAc,MAAM,IACpB;AACN,SACI;AAAA,IAAC;AAAA;AAAA,MACI,GAAG;AAAA,MACJ,WAAW;AAAA,QACP;AAAA,QACA,UAAU,IAAI;AAAA,QACd;AAAA,QACA;AAAA,MACJ;AAAA,MAEC;AAAA;AAAA,EACL;AAER;;;AClEO,SAAS,eACZ,MACA,SAAS,WAAW,UAAU,QACvB;AACP,MAAI,OAAO,SAAS,YAAY,CAAC,mBAAmB,KAAK,IAAI;AACzD,WAAO;AACX,MAAI,CAAC,OAAQ,QAAO;AACpB,MAAI;AACA,WAAO,IAAI,IAAI,MAAM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AAAA;AAAA,QAEG,WAAU;AAAA,QAEV;AAAA,0BAAAD;AAAA,YAAC;AAAA;AAAA,cACG,MAAM,SAAS,SAAS,SAAS;AAAA;AAAA,UACrC;AAAA,UACA,gBAAAC,MAAC,UAAK,WAAU,iBACX;AAAA,qBAAS,SAAS,SAAS;AAAA,YAAQ;AAAA,YAAS;AAAA,aACjD;AAAA,UACC,aAAa,KAAK,IAAI,GAAG,MAAM,CAAC;AAAA;AAAA;AAAA,MAT5B;AAAA,IAUT;AAAA,EAER,CAAC,GACL;AAER;;;ACjHI,gBAAAC,YAAA;AALG,IAAM,WAAgC,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA,GAAG;AACP,MACI,gBAAAA,KAAC,QAAM,GAAG,OAAO,WAAW,GAAG,0BAA0B,SAAS,GAC7D,UACL;AAGG,IAAM,WAAgC,CAAC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA,GAAG;AACP,MACI,gBAAAA,KAAC,QAAM,GAAG,OAAO,WAAW,GAAG,0BAA0B,SAAS,GAC7D,UACL;;;ACvBG,IAAM,2BAA2B;AACjC,IAAM,2BAA2B;","names":["jsx","jsx","jsx","jsx","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/lib/cn.ts","../../src/primitives/Chip.tsx","../../src/lib/link.ts","../../src/primitives/icons/index.tsx","../../src/primitives/InlineLink.tsx","../../src/modules/wallet/format-pollen.ts","../../src/modules/wallet/wallet-display.tsx","../../src/modules/wallet/AccountPollen.tsx","../../src/modules/wallet/chips.tsx","../../src/modules/wallet/colors.ts"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({ prefix: \"polli\" });\n\n/** Internal class merge for polli:-prefixed package primitive classes. */\nexport function cn(...inputs: (string | undefined | null | false)[]) {\n return twMerge(clsx(...inputs));\n}\n","import type { ComponentPropsWithoutRef, FC } from \"react\";\nimport { cn } from \"../lib/cn.ts\";\n\n/** Semantic chip labels for status and metadata badges. */\ntype ChipIntent =\n | \"news\"\n | \"new\"\n | \"free\"\n | \"alpha\"\n | \"neutral\"\n | \"success\"\n | \"warning\"\n | \"info\"\n | \"danger\";\n\nconst chipSizes = {\n icon: \"polli:h-5 polli:w-5 polli:p-0 polli:text-xs\",\n sm: \"polli:h-5 polli:px-2 polli:text-xs\",\n md: \"polli:h-6 polli:px-2.5 polli:text-sm\",\n lg: \"polli:h-7 polli:px-3 polli:text-sm\",\n} as const;\n\nconst intentClasses: Record<ChipIntent, string> = {\n news: \"polli:bg-intent-news-bg-light polli:text-intent-news-text\",\n new: \"polli:bg-intent-new-bg-light polli:text-intent-new-text\",\n free: \"polli:bg-intent-free-bg-light polli:text-intent-free-text\",\n alpha: \"polli:bg-intent-alpha-bg-light polli:text-intent-alpha-text\",\n neutral: \"polli:bg-ink-100/80 polli:text-ink-900\",\n success:\n \"polli:bg-intent-success-bg-bright/15 polli:text-intent-success-text\",\n warning: \"polli:bg-intent-warning-bg-light polli:text-intent-warning-text\",\n info: \"polli:bg-intent-info-bg-light polli:text-intent-info-text\",\n danger: \"polli:bg-intent-danger-bg-light polli:text-intent-danger-text\",\n};\n\nexport type ChipProps = ComponentPropsWithoutRef<\"span\"> & {\n /** Semantic intent. */\n intent?: ChipIntent;\n size?: keyof typeof chipSizes;\n};\n\n// Static, rectangular colored container. Round shapes are reserved for buttons.\n// Reads `bg-theme-bg-active` / `text-theme-text-strong` from the cascade unless\n// `intent` is set (semantic, theme-independent).\nexport const Chip: FC<ChipProps> = ({\n intent,\n size = \"md\",\n className,\n children,\n ...rest\n}) => {\n const intentClass = intent\n ? intentClasses[intent]\n : \"polli:bg-theme-bg-active polli:text-theme-text-strong\";\n return (\n <span\n {...rest}\n className={cn(\n \"polli:inline-flex polli:shrink-0 polli:items-center polli:justify-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-none\",\n chipSizes[size],\n intentClass,\n className,\n )}\n >\n {children}\n </span>\n );\n};\n","/** Relative URLs and same-origin absolute URLs stay in the current app. */\nexport function isExternalHref(\n href: unknown,\n origin = globalThis.location?.origin,\n): boolean {\n if (typeof href !== \"string\" || !/^(https?:)?\\/\\//i.test(href))\n return false;\n if (!origin) return true;\n try {\n return new URL(href, origin).origin !== origin;\n } catch {\n return false;\n }\n}\n","import type { IconProps } from \"./types.ts\";\n\nconst strokeProps = {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n} as const;\n\nexport function AppIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"14\" rx=\"2\" />\n <path d=\"M2 20h20\" />\n </svg>\n );\n}\n\nexport function AccountIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"8\" r=\"4\" />\n <path d=\"M4 21a8 8 0 0 1 16 0\" />\n </svg>\n );\n}\n\nexport function ArrowRightIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M5 12h14M13 6l6 6-6 6\" />\n </svg>\n );\n}\n\nexport function BeakerIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 3h6\" />\n <path d=\"M10 3v6.5L4.5 18a2 2 0 0 0 1.7 3h11.6a2 2 0 0 0 1.7-3L14 9.5V3\" />\n <path d=\"M7 14h10\" />\n </svg>\n );\n}\n\nexport function BotIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 8V4H8\" />\n <rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" rx=\"2\" />\n <path d=\"M2 14h2M20 14h2\" />\n <path d=\"M9 13v2M15 13v2\" />\n </svg>\n );\n}\n\nexport function BookIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4 4h5a3 3 0 0 1 3 3v13a2 2 0 0 0-2-2H4z\" />\n <path d=\"M20 4h-5a3 3 0 0 0-3 3v13a2 2 0 0 1 2-2h6z\" />\n </svg>\n );\n}\n\nexport function BugIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m8 2 1.9 1.9M14.1 3.9 16 2\" />\n <path d=\"M9 7V6a3 3 0 0 1 6 0v1\" />\n <path d=\"M12 20c-3.3 0-6-2.7-6-6v-3a6 6 0 0 1 12 0v3c0 3.3-2.7 6-6 6Z\" />\n <path d=\"M12 20v-9M6.5 9C4.6 8.8 3 7.1 3 5M6 13H2M3 21c0-2.1 1.7-3.9 3.8-4M17.5 9C19.4 8.8 21 7.1 21 5M18 13h4M21 21c0-2.1-1.7-3.9-3.8-4\" />\n </svg>\n );\n}\n\nexport function CheckIcon(props: IconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n {...strokeProps}\n strokeWidth={2.5}\n {...props}\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n );\n}\n\nexport function ClipboardIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n );\n}\n\nexport function ClockIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5l3 2\" />\n </svg>\n );\n}\n\nexport function DiscordIcon(props: IconProps) {\n return (\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M20.32 4.37A19.8 19.8 0 0 0 15.36 2.83a.07.07 0 0 0-.08.04c-.21.38-.45.88-.62 1.27a18.27 18.27 0 0 0-5.52 0 12.84 12.84 0 0 0-.63-1.27.08.08 0 0 0-.08-.04A19.74 19.74 0 0 0 3.47 4.37a.07.07 0 0 0-.03.03C.31 9.07-.55 13.61-.13 18.1a.08.08 0 0 0 .03.06 19.9 19.9 0 0 0 6.08 3.07.08.08 0 0 0 .09-.03c.47-.64.88-1.31 1.24-2.02a.08.08 0 0 0-.04-.1 13.08 13.08 0 0 1-1.9-.91.08.08 0 0 1-.01-.13c.13-.1.25-.2.37-.29a.07.07 0 0 1 .08-.01 14.24 14.24 0 0 0 12.38 0 .07.07 0 0 1 .08.01c.12.1.25.2.38.3a.08.08 0 0 1-.01.12 12.22 12.22 0 0 1-1.9.9.08.08 0 0 0-.04.11c.36.7.77 1.38 1.23 2.02a.08.08 0 0 0 .1.03 19.84 19.84 0 0 0 6.08-3.07.08.08 0 0 0 .03-.05c.5-5.2-.84-9.7-3.77-13.71a.06.06 0 0 0-.03-.03ZM8.02 15.37c-1.18 0-2.16-1.08-2.16-2.4 0-1.32.96-2.4 2.16-2.4 1.2 0 2.18 1.09 2.16 2.4 0 1.32-.96 2.4-2.16 2.4Zm7.96 0c-1.18 0-2.16-1.08-2.16-2.4 0-1.32.96-2.4 2.16-2.4 1.2 0 2.18 1.09 2.16 2.4 0 1.32-.95 2.4-2.16 2.4Z\"\n />\n </svg>\n );\n}\n\nexport function InstagramIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"5\" />\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <circle\n cx=\"17.5\"\n cy=\"6.5\"\n r=\"1\"\n fill=\"currentColor\"\n stroke=\"none\"\n />\n </svg>\n );\n}\n\nexport function XSocialIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M18.24 2.25h3.31l-7.23 8.26 8.51 11.24h-6.66l-5.21-6.82-5.97 6.82H1.68l7.73-8.84L1.25 2.25h6.83l4.71 6.23 5.45-6.23Zm-1.16 17.52h1.83L7.08 4.13H5.12l11.96 15.64Z\"\n />\n </svg>\n );\n}\n\nexport function LinkedInIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M20.45 20.45h-3.56v-5.57c0-1.33-.03-3.04-1.85-3.04-1.86 0-2.14 1.45-2.14 2.94v5.67H9.34V9h3.42v1.56h.05c.47-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28ZM5.32 7.43a2.07 2.07 0 1 1 0-4.13 2.07 2.07 0 0 1 0 4.13ZM7.1 20.45H3.54V9H7.1v11.45Z\"\n />\n </svg>\n );\n}\n\nexport function DownloadIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" />\n <polyline points=\"7 10 12 15 17 10\" />\n <line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\" />\n </svg>\n );\n}\n\nexport function ExpandIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M8 3H3v5M16 3h5v5M21 16v5h-5M3 16v5h5\" />\n </svg>\n );\n}\n\nexport function PlayIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path fill=\"currentColor\" d=\"M7 4.5v15l12-7.5z\" />\n </svg>\n );\n}\n\nexport function PauseIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path fill=\"currentColor\" d=\"M6 4h4v16H6zM14 4h4v16h-4z\" />\n </svg>\n );\n}\n\nexport function CloudUploadIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M17.5 19H19a4 4 0 0 0 .4-8A7.5 7.5 0 0 0 5 9.5 5 5 0 0 0 6 19h1.5\" />\n <path d=\"m8.5 15.5 3.5-3.5 3.5 3.5M12 12v9\" />\n </svg>\n );\n}\n\nexport function ExternalLinkIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M7 17 17 7M9 7h8v8\" />\n </svg>\n );\n}\n\nexport function GenApiIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m8 3 4 1.5L16 3v18l-4-1.5L8 21z\" />\n <path d=\"M8 3v18M16 3v18\" />\n </svg>\n );\n}\n\nexport function GitBranchIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <line x1=\"6\" y1=\"3\" x2=\"6\" y2=\"15\" />\n <circle cx=\"18\" cy=\"6\" r=\"3\" />\n <circle cx=\"6\" cy=\"18\" r=\"3\" />\n <path d=\"M18 9a9 9 0 0 1-9 9\" />\n </svg>\n );\n}\n\nexport function GitPullRequestIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"6\" cy=\"6\" r=\"3\" />\n <circle cx=\"18\" cy=\"18\" r=\"3\" />\n <path d=\"M6 9v12M13 6h3a2 2 0 0 1 2 2v7\" />\n </svg>\n );\n}\n\nexport function GraduationCapIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21.42 10.92a1 1 0 0 0-.02-1.84L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.83l8.57 3.91a2 2 0 0 0 1.66 0z\" />\n <path d=\"M22 10v6\" />\n <path d=\"M6 12.5V16a6 3 0 0 0 12 0v-3.5\" />\n </svg>\n );\n}\n\nexport function SparklesIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 3l1.9 5.8a2 2 0 0 0 1.3 1.3L21 12l-5.8 1.9a2 2 0 0 0-1.3 1.3L12 21l-1.9-5.8a2 2 0 0 0-1.3-1.3L3 12l5.8-1.9a2 2 0 0 0 1.3-1.3z\" />\n </svg>\n );\n}\n\nexport function GitHubIcon(props: IconProps) {\n return (\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12 .5A11.5 11.5 0 0 0 8.36 22.9c.58.11.79-.25.79-.56v-2.16c-3.21.7-3.89-1.38-3.89-1.38-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.04 1.76 2.71 1.25 3.37.96.11-.75.4-1.25.74-1.54-2.56-.29-5.26-1.28-5.26-5.7 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.06 0 0 .97-.31 3.16 1.18a10.88 10.88 0 0 1 5.76 0c2.19-1.49 3.15-1.18 3.15-1.18.63 1.6.23 2.77.11 3.06.74.81 1.19 1.84 1.19 3.1 0 4.43-2.7 5.4-5.27 5.69.41.36.78 1.06.78 2.14v3.19c0 .31.21.68.8.56A11.5 11.5 0 0 0 12 .5Z\"\n />\n </svg>\n );\n}\n\nexport function ImageIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" />\n <circle cx=\"9\" cy=\"9\" r=\"2\" />\n <path d=\"m21 15-5-5L5 21\" />\n </svg>\n );\n}\n\nexport function CubeIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m21 16-9 5-9-5V8l9-5 9 5z\" />\n <path d=\"m3 8 9 5 9-5\" />\n <path d=\"M12 13v8\" />\n </svg>\n );\n}\n\nexport function AudioIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 18V5l12-2v13\" />\n <circle cx=\"6\" cy=\"18\" r=\"3\" />\n <circle cx=\"18\" cy=\"16\" r=\"3\" />\n </svg>\n );\n}\n\nexport function LockIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\" />\n <path d=\"M7 11V7a5 5 0 0 1 10 0v4\" />\n </svg>\n );\n}\n\nexport function LogInIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M10 17l5-5-5-5\" />\n <path d=\"M15 12H3\" />\n <path d=\"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4\" />\n </svg>\n );\n}\n\nexport function LogOutIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\" />\n <path d=\"m16 17 5-5-5-5\" />\n <path d=\"M21 12H9\" />\n </svg>\n );\n}\n\nexport function MailIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"m3 7 9 7 9-7\" />\n </svg>\n );\n}\n\nexport function McpIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"2\" y=\"4\" width=\"8\" height=\"16\" rx=\"1.5\" />\n <rect x=\"14\" y=\"4\" width=\"8\" height=\"16\" rx=\"1.5\" />\n <path d=\"M10 12h4\" />\n </svg>\n );\n}\n\nexport function MenuIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4 7h16M4 12h16M4 17h16\" />\n </svg>\n );\n}\n\nexport function NewspaperIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M5 4h12a1 1 0 0 1 1 1v14a1 1 0 0 0 1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1z\" />\n <path d=\"M18 8h2a1 1 0 0 1 1 1v9a2 2 0 0 1-2 2\" />\n <path d=\"M7 8h7M7 12h7M7 16h4\" />\n </svg>\n );\n}\n\nexport function PlusIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n );\n}\n\nexport function TerminalIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <polyline points=\"4 8 8 12 4 16\" />\n <line x1=\"12\" y1=\"20\" x2=\"20\" y2=\"20\" />\n </svg>\n );\n}\n\nexport function ToolIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l2.1 2.1a1 1 0 0 0 1.4 0l4-4a6 6 0 0 1-8 8l-8 8a2.8 2.8 0 0 1-4-4l8-8a6 6 0 0 1 8-8l-4 4Z\" />\n </svg>\n );\n}\n\nexport function TargetIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <circle cx=\"12\" cy=\"12\" r=\"5\" />\n <circle cx=\"12\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n );\n}\n\nexport function TokensIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4 9h16M4 15h16M10 3 8 21M16 3l-2 18\" />\n </svg>\n );\n}\n\nexport function UsageIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4 18a8 8 0 1 1 16 0\" />\n <path d=\"M12 18l3.5-5\" />\n <path d=\"M7 18h10\" />\n <path d=\"M7.5 12.5 6 11\" />\n <path d=\"M16.5 12.5 18 11\" />\n </svg>\n );\n}\n\nexport function WarningIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M10.3 3.1 1.8 17a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.1a2 2 0 0 0-3.4 0Z\" />\n <path d=\"M12 9v4M12 17h.01\" />\n </svg>\n );\n}\n\nexport function TrendUpIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <polyline points=\"3 17 9 11 13 15 21 7\" />\n <polyline points=\"15 7 21 7 21 13\" />\n </svg>\n );\n}\n\nexport function EarningsIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <ellipse cx=\"10\" cy=\"6\" rx=\"6\" ry=\"3\" />\n <path d=\"M4 6v8c0 1.7 2.7 3 6 3 1.2 0 2.4-.2 3.3-.5\" />\n <path d=\"M16 6v4\" />\n <path d=\"M4 10c0 1.7 2.7 3 6 3 1.1 0 2.1-.1 3-.4\" />\n <path d=\"M18 14v6\" />\n <path d=\"M15 17h6\" />\n </svg>\n );\n}\n\nexport function WalletIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M3 7a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2v2H5a2 2 0 0 0-2 2V7Z\" />\n <path d=\"M3 11a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z\" />\n <circle cx=\"17\" cy=\"14\" r=\"1.25\" fill=\"currentColor\" />\n </svg>\n );\n}\n\n/** A paper receipt: what a price includes. */\nexport function ReceiptIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M6 3h12v18l-2-1.5-2 1.5-2-1.5-2 1.5-2-1.5L6 21Z\" />\n <path d=\"M9 8h6M9 12h6M9 16h3\" />\n </svg>\n );\n}\n\nexport function MoonIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z\" />\n </svg>\n );\n}\n\nexport function SunIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4\" />\n </svg>\n );\n}\n\nexport function XIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n\nexport function TrashIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4h8v2\" />\n <path d=\"m19 6-1 15H6L5 6\" />\n <path d=\"M10 11v6M14 11v6\" />\n </svg>\n );\n}\n\n// --- Model modality / capability / price glyphs (single-ink, replace emoji) ---\n\nexport function ChatIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\" />\n </svg>\n );\n}\n\nexport function RobotIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"3\" y=\"6\" width=\"18\" height=\"15\" rx=\"3\" />\n <path d=\"M12 2v4M3 11H1v5h2M21 11h2v5h-2M8 17h8\" />\n <circle cx=\"9\" cy=\"12\" r=\"1\" />\n <circle cx=\"15\" cy=\"12\" r=\"1\" />\n </svg>\n );\n}\n\nexport function EyeIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n );\n}\n\nexport function EyeOffIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n <path d=\"M3 3l18 18\" />\n </svg>\n );\n}\n\nexport function VideoIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m22 8-6 4 6 4V8z\" />\n <rect x=\"2\" y=\"6\" width=\"14\" height=\"12\" rx=\"2\" />\n </svg>\n );\n}\n\nexport function MicIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z\" />\n <path d=\"M19 10v2a7 7 0 0 1-14 0v-2\" />\n <path d=\"M12 19v3\" />\n </svg>\n );\n}\n\nexport function SpeakerIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M11 5 6 9H2v6h4l5 4z\" />\n <path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\" />\n <path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\" />\n </svg>\n );\n}\n\nexport function MegaphoneIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m3 11 18-5v12L3 14v-3z\" />\n <path d=\"m7 15 1.5 6H14l-2-7\" />\n </svg>\n );\n}\n\nexport function ReasoningIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 18h6M10 22h4M15.1 14c.2-1 .6-1.7 1.4-2.5A4.6 4.6 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.8.8 1.2 1.5 1.4 2.5\" />\n </svg>\n );\n}\n\nexport function RocketIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\" />\n <path d=\"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z\" />\n <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0\" />\n <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n </svg>\n );\n}\n\nexport function SearchIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m21 21-4.3-4.3\" />\n </svg>\n );\n}\n\nexport function SignOutIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\" />\n <path d=\"m16 17 5-5-5-5\" />\n <path d=\"M21 12H9\" />\n </svg>\n );\n}\n\nexport function PowerIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 2v10\" />\n <path d=\"M18.4 6.6a9 9 0 1 1-12.77.04\" />\n </svg>\n );\n}\n\nexport function SparkleIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M9.94 15.5A2 2 0 0 0 8.5 14.06l-6.14-1.58a.5.5 0 0 1 0-.96L8.5 9.94A2 2 0 0 0 9.94 8.5l1.58-6.14a.5.5 0 0 1 .96 0L14.06 8.5A2 2 0 0 0 15.5 9.94l6.14 1.58a.5.5 0 0 1 0 .96L15.5 14.06a2 2 0 0 0-1.44 1.44l-1.58 6.14a.5.5 0 0 1-.96 0z\" />\n <path d=\"M20 3v4\" />\n <path d=\"M22 5h-4\" />\n <path d=\"M4 17v2\" />\n <path d=\"M5 18H3\" />\n </svg>\n );\n}\n\nexport function StarIcon({\n filled = false,\n ...props\n}: IconProps & { filled?: boolean }) {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n {...strokeProps}\n fill={filled ? \"currentColor\" : \"none\"}\n {...props}\n >\n <polygon points=\"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2\" />\n </svg>\n );\n}\n\nexport function CodeIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"m16 18 6-6-6-6M8 6l-6 6 6 6\" />\n </svg>\n );\n}\n\nexport function DatabaseIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <ellipse cx=\"12\" cy=\"5\" rx=\"9\" ry=\"3\" />\n <path d=\"M3 5v14a9 3 0 0 0 18 0V5\" />\n <path d=\"M3 12a9 3 0 0 0 18 0\" />\n </svg>\n );\n}\n\nexport function CardIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <rect x=\"2\" y=\"5\" width=\"20\" height=\"14\" rx=\"2\" />\n <path d=\"M2 10h20\" />\n </svg>\n );\n}\n\nexport function SproutIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M7 20h10\" />\n <path d=\"M10 20c5.5-2.5.8-6.4 3-10\" />\n <path d=\"M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z\" />\n <path d=\"M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z\" />\n </svg>\n );\n}\n\nexport function PencilIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M12 20h9\" />\n <path d=\"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z\" />\n </svg>\n );\n}\n\nexport function KeyIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"7.5\" cy=\"15.5\" r=\"5.5\" />\n <path d=\"m21 2-9.6 9.6\" />\n <path d=\"m15.5 7.5 3 3L22 7l-3-3\" />\n </svg>\n );\n}\n\nexport function GlobeIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\" />\n <path d=\"M2 12h20\" />\n </svg>\n );\n}\n\nexport function ArrowLeftIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M19 12H5\" />\n <path d=\"m12 19-7-7 7-7\" />\n </svg>\n );\n}\n\nexport function RefreshIcon(props: IconProps) {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...strokeProps} {...props}>\n <path d=\"M21 12a9 9 0 1 1-2.64-6.36\" />\n <path d=\"M21 3v6h-6\" />\n </svg>\n );\n}\n\nexport type { IconProps } from \"./types.ts\";\n","import type { PropsWithChildren } from \"react\";\nimport { isExternalHref } from \"../lib/link.ts\";\nimport { ExternalLinkIcon } from \"./icons/index.tsx\";\n\ntype BaseInlineLinkProps = {\n /** Set explicitly for non-http external links, or false for custom routing components. */\n external?: boolean;\n showIcon?: boolean;\n /** Inline text inherits its size; footers use 13px and standalone links 14px. */\n size?: \"inherit\" | \"footer\" | \"sm\";\n /** Accent for prominent links; quiet for secondary navigation. */\n tone?: \"accent\" | \"quiet\";\n className?: string;\n};\n\nexport type InlineLinkProps<T extends React.ElementType = \"a\"> =\n PropsWithChildren<BaseInlineLinkProps> & {\n as?: T;\n } & Omit<\n React.ComponentPropsWithoutRef<T>,\n keyof BaseInlineLinkProps | \"as\"\n >;\n\n/** Shared text-link rule: surrounding font, selectable ink, persistent underline,\n * visible keyboard focus, and an external arrow only when leaving the app.\n * Navigation and button-shaped actions use their own primitives.\n */\nexport function InlineLink<T extends React.ElementType = \"a\">({\n as,\n external,\n showIcon = true,\n size = \"inherit\",\n tone = \"accent\",\n className,\n children,\n ...linkProps\n}: InlineLinkProps<T>) {\n const Component: React.ElementType = as || \"a\";\n const isExternal =\n external ?? isExternalHref((linkProps as { href?: unknown }).href);\n\n return (\n <Component\n target={isExternal && as !== \"button\" ? \"_blank\" : undefined}\n rel={\n isExternal && as !== \"button\"\n ? \"noopener noreferrer\"\n : undefined\n }\n className={[\"polli-link\", className].filter(Boolean).join(\" \")}\n data-size={size}\n data-tone={tone}\n {...linkProps}\n >\n {children}\n {showIcon && isExternal && (\n <ExternalLinkIcon\n aria-hidden=\"true\"\n className=\"polli-link-external-icon\"\n />\n )}\n </Component>\n );\n}\n","// 5-digit budget for pollen display. Integer takes its space, decimals fill\n// the remainder (capped at 4), floor toward -infinity, trailing zeros stripped.\n// Integers needing >=6 digits switch to compact (K/M/B, 3 sig figs).\n// Decimal point and minus sign do not count toward the budget.\n\nconst BUDGET = 5;\nconst MAX_DECIMALS = 4;\nconst COMPACT_THRESHOLD = 100_000;\n\nfunction floorTo(value: number, decimals: number): number {\n const factor = 10 ** decimals;\n return Math.floor(value * factor) / factor;\n}\n\nfunction formatCompact(value: number): string {\n const abs = Math.abs(value);\n const sign = value < 0 ? \"-\" : \"\";\n const [unit, scale] =\n abs >= 1e9\n ? ([\"B\", 1e9] as const)\n : abs >= 1e6\n ? ([\"M\", 1e6] as const)\n : ([\"K\", 1e3] as const);\n const ratio = abs / scale;\n const intDigits = Math.max(1, Math.floor(Math.log10(ratio)) + 1);\n const decimals = Math.max(0, 3 - intDigits);\n const floored = floorTo(ratio, decimals);\n return `${sign}${Number(floored.toFixed(decimals)).toString()}${unit}`;\n}\n\nexport function formatPollen(value: number): string {\n if (!Number.isFinite(value) || value === 0) return \"0\";\n\n const abs = Math.abs(value);\n\n if (abs >= COMPACT_THRESHOLD) return formatCompact(value);\n\n const intDigits = abs >= 1 ? Math.floor(Math.log10(abs)) + 1 : 1;\n const decimals = Math.min(MAX_DECIMALS, Math.max(0, BUDGET - intDigits));\n const floored = floorTo(value, decimals);\n if (floored === 0) return \"0\";\n return Number(floored.toFixed(decimals)).toString();\n}\n","import type { FC, ReactNode } from \"react\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { CardIcon, SproutIcon } from \"../../primitives/icons/index.tsx\";\n\ntype WalletBalanceKind = \"paid\" | \"tier\";\n\nconst walletPanelClasses: Record<WalletBalanceKind, string> = {\n paid: \"polli-wallet-panel-paid\",\n tier: \"polli-wallet-panel-tier\",\n};\n\nconst walletTextClasses: Record<WalletBalanceKind, string> = {\n paid: \"polli-wallet-text-paid\",\n tier: \"polli-wallet-text-tier\",\n};\n\nconst walletKindIcons: Record<WalletBalanceKind, typeof CardIcon> = {\n paid: CardIcon,\n tier: SproutIcon,\n};\n\nexport type WalletKindIconProps = {\n kind: WalletBalanceKind;\n className?: string;\n};\n\n/** The paid/Quest marker: a card for paid balance or sprout for Quest Pollen. */\nexport const WalletKindIcon: FC<WalletKindIconProps> = ({\n kind,\n className,\n}) => {\n const Icon = walletKindIcons[kind];\n return (\n <Icon\n aria-hidden=\"true\"\n className={cn(\n \"polli:h-3.5 polli:w-3.5 polli:shrink-0\",\n walletTextClasses[kind],\n className,\n )}\n />\n );\n};\n\nexport type WalletBalanceCardProps = {\n tone?: \"balance\" | \"neutral\";\n kind: WalletBalanceKind;\n label: ReactNode;\n value: ReactNode;\n icon?: ReactNode;\n info?: ReactNode;\n footer?: ReactNode;\n className?: string;\n};\n\nexport const WalletBalanceCard: FC<WalletBalanceCardProps> = ({\n tone = \"balance\",\n kind,\n label,\n value,\n icon,\n info,\n footer,\n className,\n}) => {\n const Icon = walletKindIcons[kind];\n const textColor =\n tone === \"neutral\"\n ? \"polli:text-theme-text-strong\"\n : walletTextClasses[kind];\n return (\n <div\n className={cn(\n \"polli:min-w-0 polli:rounded-card polli:p-3.5 polli:sm:p-5\",\n tone === \"neutral\"\n ? \"polli:bg-surface-opaque\"\n : walletPanelClasses[kind],\n className,\n )}\n >\n <span className=\"polli:flex polli:items-center polli:gap-2\">\n {icon ?? (\n <Icon\n aria-hidden=\"true\"\n className={cn(\n \"polli:h-3.5 polli:w-3.5 polli:shrink-0\",\n textColor,\n )}\n />\n )}\n <span\n className={cn(\n \"polli:text-sm polli:font-bold polli:uppercase polli:tracking-wide\",\n textColor,\n )}\n >\n {label}\n </span>\n {info}\n </span>\n <div\n className={cn(\n \"polli-wallet-balance-value polli:[overflow-wrap:anywhere] polli:mt-1 polli:font-bold polli:leading-none polli:tracking-tight polli:tabular-nums\",\n textColor,\n )}\n >\n {value}\n </div>\n {footer && (\n <div className=\"polli:mt-1.5 polli:text-sm polli:font-bold polli:tabular-nums polli:text-intent-success-text\">\n {footer}\n </div>\n )}\n </div>\n );\n};\n","import { Chip } from \"../../primitives/Chip.tsx\";\nimport { InlineLink } from \"../../primitives/InlineLink.tsx\";\nimport { KeyIcon, WalletIcon } from \"../../primitives/icons/index.tsx\";\nimport { formatPollen } from \"./format-pollen.ts\";\nimport { WalletKindIcon } from \"./wallet-display.tsx\";\n\nexport type AccountPollenSource =\n | {\n type: \"wallet\";\n /** Undefined while the balance is unavailable. */\n balances?: { paid: number; quest: number };\n }\n | {\n type: \"budget\";\n /** The app's remaining budget, never the owner's wallet total. `null` = unlimited. */\n remaining?: number | null;\n generationEnabled?: boolean;\n };\n\nfunction isEmpty(amount: number | null | undefined): boolean {\n return amount != null && amount <= 0;\n}\n\ntype PollenStatus = \"limit-reached\" | \"no-pollen\" | \"unlimited\";\n\nconst labels: Record<PollenStatus, string> = {\n \"limit-reached\": \"Limit reached\",\n \"no-pollen\": \"No Pollen\",\n unlimited: \"Unlimited\",\n};\n\nfunction PollenStatusBadge({\n state,\n topUpHref,\n}: {\n state: PollenStatus;\n topUpHref?: string;\n}) {\n const Icon = state === \"no-pollen\" ? WalletIcon : KeyIcon;\n const label = labels[state];\n return (\n <Chip\n size=\"sm\"\n intent={state === \"unlimited\" ? \"info\" : \"danger\"}\n aria-label={label}\n >\n <Icon\n aria-hidden=\"true\"\n className=\"polli:h-3.5 polli:w-3.5 polli:shrink-0\"\n />\n {label}\n {state === \"no-pollen\" && topUpHref && (\n <>\n <span aria-hidden=\"true\">·</span>\n <InlineLink\n href={topUpHref}\n aria-label={`${label}. Top up`}\n >\n Top up\n </InlineLink>\n </>\n )}\n </Chip>\n );\n}\n\n/** Icon + amount; unlimited, exhausted, or empty states become a badge. */\nexport function AccountPollen({\n source,\n topUpHref,\n}: {\n source: AccountPollenSource;\n /** Shown in the empty-wallet badge. A menu keeps recovery links in its dropdown. */\n topUpHref?: string;\n}) {\n if (source.type === \"budget\") {\n if (source.generationEnabled === false) return null;\n // null is the API's explicit \"no budget\"; undefined is not loaded yet.\n const unlimited = source.remaining === null;\n if (!unlimited && source.remaining === undefined) return null;\n if (unlimited) return <PollenStatusBadge state=\"unlimited\" />;\n const remaining = source.remaining as number;\n if (isEmpty(remaining))\n return <PollenStatusBadge state=\"limit-reached\" />;\n return (\n <span\n title=\"App budget left\"\n className=\"polli:inline-flex polli:items-center polli:gap-1 polli:tabular-nums\"\n >\n <KeyIcon\n aria-hidden=\"true\"\n className=\"polli:h-3.5 polli:w-3.5 polli:shrink-0\"\n />\n <span className=\"polli:sr-only\">App budget: </span>\n {formatPollen(remaining)} pollen\n </span>\n );\n }\n const { balances } = source;\n if (!balances) return null;\n if (isEmpty(balances.paid) && isEmpty(balances.quest))\n return <PollenStatusBadge state=\"no-pollen\" topUpHref={topUpHref} />;\n return (\n <span className=\"polli:inline-flex polli:items-center polli:gap-2 polli:tabular-nums\">\n {/* Quest Pollen is spent first, so it comes first. */}\n {([\"quest\", \"paid\"] as const).map((kind) => {\n const amount = balances[kind];\n return (\n <span\n key={kind}\n className=\"polli:inline-flex polli:items-center polli:gap-1\"\n >\n <WalletKindIcon\n kind={kind === \"paid\" ? \"paid\" : \"tier\"}\n />\n <span className=\"polli:sr-only\">\n {kind === \"paid\" ? \"Paid\" : \"Quest\"} Pollen:{\" \"}\n </span>\n {formatPollen(Math.max(0, amount))}\n </span>\n );\n })}\n </span>\n );\n}\n","import type { FC } from \"react\";\nimport { cn } from \"../../lib/cn.ts\";\nimport { Chip, type ChipProps } from \"../../primitives/Chip.tsx\";\n\nexport type WalletChipProps = Omit<ChipProps, \"intent\">;\n\nexport const PaidChip: FC<WalletChipProps> = ({\n className,\n children,\n ...props\n}) => (\n <Chip {...props} className={cn(\"polli-wallet-chip-paid\", className)}>\n {children}\n </Chip>\n);\n\nexport const TierChip: FC<WalletChipProps> = ({\n className,\n children,\n ...props\n}) => (\n <Chip {...props} className={cn(\"polli-wallet-chip-tier\", className)}>\n {children}\n </Chip>\n);\n","export const PAID_BALANCE_CHART_COLOR = \"var(--polli-color-paid-soft)\";\nexport const TIER_BALANCE_CHART_COLOR = \"var(--polli-color-tier-soft)\";\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,2BAA2B;AAEpC,IAAM,UAAU,oBAAoB,EAAE,QAAQ,QAAQ,CAAC;AAGhD,SAAS,MAAM,QAA+C;AACjE,SAAO,QAAQ,KAAK,GAAG,MAAM,CAAC;AAClC;;;AC+CQ;AAxCR,IAAM,YAAY;AAAA,EACd,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACR;AAEA,IAAM,gBAA4C;AAAA,EAC9C,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SACI;AAAA,EACJ,SAAS;AAAA,EACT,MAAM;AAAA,EACN,QAAQ;AACZ;AAWO,IAAM,OAAsB,CAAC;AAAA,EAChC;A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