@pollinations/ui 0.1.0-alpha.1 → 0.1.0-alpha.4

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.
Files changed (88) hide show
  1. package/README.md +148 -36
  2. package/dist/Button-ByKwRtdw.d.cts +29 -0
  3. package/dist/Button-ByKwRtdw.d.ts +29 -0
  4. package/dist/Chip-v-ADv6cz.d.cts +18 -0
  5. package/dist/Chip-v-ADv6cz.d.ts +18 -0
  6. package/dist/Dialog-D3Nqt8cE.d.cts +66 -0
  7. package/dist/Dialog-D3Nqt8cE.d.ts +66 -0
  8. package/dist/app-user-menu/sdk.cjs +698 -242
  9. package/dist/app-user-menu/sdk.cjs.map +1 -1
  10. package/dist/app-user-menu/sdk.d.cts +22 -7
  11. package/dist/app-user-menu/sdk.d.ts +22 -7
  12. package/dist/app-user-menu/sdk.js +703 -240
  13. package/dist/app-user-menu/sdk.js.map +1 -1
  14. package/dist/app.css +12 -122
  15. package/dist/auth/index.cjs +1365 -85
  16. package/dist/auth/index.cjs.map +1 -1
  17. package/dist/auth/index.d.cts +91 -6
  18. package/dist/auth/index.d.ts +91 -6
  19. package/dist/auth/index.js +1362 -84
  20. package/dist/auth/index.js.map +1 -1
  21. package/dist/auth/sdk.cjs +244 -0
  22. package/dist/auth/sdk.cjs.map +1 -0
  23. package/dist/auth/sdk.d.cts +40 -0
  24. package/dist/auth/sdk.d.ts +40 -0
  25. package/dist/auth/sdk.js +213 -0
  26. package/dist/auth/sdk.js.map +1 -0
  27. package/dist/brand/lockup-horizontal-black.png +0 -0
  28. package/dist/brand/lockup-horizontal-black.svg +4 -0
  29. package/dist/brand/lockup-horizontal-white.png +0 -0
  30. package/dist/brand/lockup-horizontal-white.svg +4 -0
  31. package/dist/brand/lockup-horizontal.svg +4 -0
  32. package/dist/brand/lockup-stacked-black.png +0 -0
  33. package/dist/brand/lockup-stacked-black.svg +4 -0
  34. package/dist/brand/lockup-stacked-white.png +0 -0
  35. package/dist/brand/lockup-stacked-white.svg +4 -0
  36. package/dist/brand/lockup-stacked.svg +4 -0
  37. package/dist/brand/mark-black.png +0 -0
  38. package/dist/brand/mark-black.svg +1 -0
  39. package/dist/brand/mark-white.png +0 -0
  40. package/dist/brand/mark-white.svg +1 -0
  41. package/dist/brand/mark.svg +1 -0
  42. package/dist/brand/polli/polli-lockup-horizontal-black.png +0 -0
  43. package/dist/brand/polli/polli-lockup-horizontal-white.png +0 -0
  44. package/dist/brand/polli/polli-lockup-stacked-black.png +0 -0
  45. package/dist/brand/polli/polli-lockup-stacked-white.png +0 -0
  46. package/dist/brand/polli/polli.png +0 -0
  47. package/dist/brand/wordmark-black.png +0 -0
  48. package/dist/brand/wordmark-black.svg +1 -0
  49. package/dist/brand/wordmark-white.png +0 -0
  50. package/dist/brand/wordmark-white.svg +1 -0
  51. package/dist/brand/wordmark.svg +1 -0
  52. package/dist/fonts/geist-pixel-square.woff2 +0 -0
  53. package/dist/gen/index.cjs +427 -217
  54. package/dist/gen/index.cjs.map +1 -1
  55. package/dist/gen/index.d.cts +68 -19
  56. package/dist/gen/index.d.ts +68 -19
  57. package/dist/gen/index.js +421 -215
  58. package/dist/gen/index.js.map +1 -1
  59. package/dist/index.browser.min.js +2 -0
  60. package/dist/index.browser.min.js.map +1 -0
  61. package/dist/index.cjs +3711 -1590
  62. package/dist/index.cjs.map +1 -1
  63. package/dist/index.d.cts +548 -178
  64. package/dist/index.d.ts +548 -178
  65. package/dist/index.js +3713 -1655
  66. package/dist/index.js.map +1 -1
  67. package/dist/licenses/Geist-OFL.txt +93 -0
  68. package/dist/markdown.cjs +826 -0
  69. package/dist/markdown.cjs.map +1 -0
  70. package/dist/markdown.d.cts +16 -0
  71. package/dist/markdown.d.ts +16 -0
  72. package/dist/markdown.js +797 -0
  73. package/dist/markdown.js.map +1 -0
  74. package/dist/styles.css +1 -1
  75. package/dist/theme.css +87 -0
  76. package/dist/wallet/index.cjs +291 -64
  77. package/dist/wallet/index.cjs.map +1 -1
  78. package/dist/wallet/index.d.cts +30 -7
  79. package/dist/wallet/index.d.ts +30 -7
  80. package/dist/wallet/index.js +290 -64
  81. package/dist/wallet/index.js.map +1 -1
  82. package/package.json +106 -89
  83. package/dist/Chip-CQCq34kS.d.cts +0 -20
  84. package/dist/Chip-Cj4xG7Te.d.ts +0 -20
  85. package/dist/assets/logo-wordmark.svg +0 -1
  86. package/dist/assets/logo.svg +0 -4
  87. package/dist/theme-jRPPBmld.d.cts +0 -20
  88. package/dist/theme-jRPPBmld.d.ts +0 -20
@@ -20,12 +20,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/modules/wallet/index.ts
21
21
  var wallet_exports = {};
22
22
  __export(wallet_exports, {
23
+ AccountPollen: () => AccountPollen,
23
24
  PAID_BALANCE_CHART_COLOR: () => PAID_BALANCE_CHART_COLOR,
24
25
  PaidChip: () => PaidChip,
25
26
  TIER_BALANCE_CHART_COLOR: () => TIER_BALANCE_CHART_COLOR,
26
27
  TierChip: () => TierChip,
27
28
  WalletBalanceCard: () => WalletBalanceCard,
28
- WalletDot: () => WalletDot,
29
+ WalletKindIcon: () => WalletKindIcon,
29
30
  formatPollen: () => formatPollen
30
31
  });
31
32
  module.exports = __toCommonJS(wallet_exports);
@@ -41,20 +42,23 @@ function cn(...inputs) {
41
42
  // src/primitives/Chip.tsx
42
43
  var import_jsx_runtime = require("react/jsx-runtime");
43
44
  var chipSizes = {
44
- sm: "polli:px-2 polli:py-0.5 polli:text-xs",
45
- md: "polli:px-2.5 polli:py-0.5 polli:text-sm",
46
- lg: "polli:px-3 polli:py-1 polli:text-sm"
45
+ icon: "polli:h-5 polli:w-5 polli:p-0 polli:text-xs",
46
+ sm: "polli:h-5 polli:px-2 polli:text-xs",
47
+ md: "polli:h-6 polli:px-2.5 polli:text-sm",
48
+ lg: "polli:h-7 polli:px-3 polli:text-sm"
47
49
  };
48
50
  var intentClasses = {
49
51
  news: "polli:bg-intent-news-bg-light polli:text-intent-news-text",
52
+ new: "polli:bg-intent-new-bg-light polli:text-intent-new-text",
53
+ free: "polli:bg-intent-free-bg-light polli:text-intent-free-text",
50
54
  alpha: "polli:bg-intent-alpha-bg-light polli:text-intent-alpha-text",
51
55
  neutral: "polli:bg-ink-100/80 polli:text-ink-900",
52
- success: "polli:bg-intent-success-bg-light polli:text-intent-success-text",
56
+ success: "polli:bg-intent-success-bg-bright/15 polli:text-intent-success-text",
53
57
  warning: "polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
58
+ info: "polli:bg-intent-info-bg-light polli:text-intent-info-text",
54
59
  danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
55
60
  };
56
61
  var Chip = ({
57
- theme,
58
62
  intent,
59
63
  size = "md",
60
64
  className,
@@ -66,9 +70,8 @@ var Chip = ({
66
70
  "span",
67
71
  {
68
72
  ...rest,
69
- "data-theme": theme,
70
73
  className: cn(
71
- "polli:inline-flex polli:shrink-0 polli:items-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-normal",
74
+ "polli:inline-flex polli:shrink-0 polli:items-center polli:justify-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-none",
72
75
  chipSizes[size],
73
76
  intentClass,
74
77
  className
@@ -78,22 +81,95 @@ var Chip = ({
78
81
  );
79
82
  };
80
83
 
81
- // src/modules/wallet/chips.tsx
84
+ // src/lib/link.ts
85
+ function isExternalHref(href, origin = globalThis.location?.origin) {
86
+ if (typeof href !== "string" || !/^(https?:)?\/\//i.test(href))
87
+ return false;
88
+ if (!origin) return true;
89
+ try {
90
+ return new URL(href, origin).origin !== origin;
91
+ } catch {
92
+ return false;
93
+ }
94
+ }
95
+
96
+ // src/primitives/icons/index.tsx
82
97
  var import_jsx_runtime2 = require("react/jsx-runtime");
83
- var PaidChip = ({
84
- className,
85
- children,
86
- ...props
87
- }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Chip, { ...props, className: cn("polli-wallet-chip-paid", className), children });
88
- var TierChip = ({
98
+ var strokeProps = {
99
+ fill: "none",
100
+ stroke: "currentColor",
101
+ strokeWidth: 2,
102
+ strokeLinecap: "round",
103
+ strokeLinejoin: "round"
104
+ };
105
+ function ExternalLinkIcon(props) {
106
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 17 17 7M9 7h8v8" }) });
107
+ }
108
+ function WalletIcon(props) {
109
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
110
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 7a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2v2H5a2 2 0 0 0-2 2V7Z" }),
111
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
112
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "17", cy: "14", r: "1.25", fill: "currentColor" })
113
+ ] });
114
+ }
115
+ function CardIcon(props) {
116
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
117
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
118
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M2 10h20" })
119
+ ] });
120
+ }
121
+ function SproutIcon(props) {
122
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
123
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 20h10" }),
124
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M10 20c5.5-2.5.8-6.4 3-10" }),
125
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
126
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" })
127
+ ] });
128
+ }
129
+ function KeyIcon(props) {
130
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
131
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "7.5", cy: "15.5", r: "5.5" }),
132
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m21 2-9.6 9.6" }),
133
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m15.5 7.5 3 3L22 7l-3-3" })
134
+ ] });
135
+ }
136
+
137
+ // src/primitives/InlineLink.tsx
138
+ var import_jsx_runtime3 = require("react/jsx-runtime");
139
+ function InlineLink({
140
+ as,
141
+ external,
142
+ showIcon = true,
143
+ size = "inherit",
144
+ tone = "accent",
89
145
  className,
90
146
  children,
91
- ...props
92
- }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Chip, { ...props, className: cn("polli-wallet-chip-tier", className), children });
93
-
94
- // src/modules/wallet/colors.ts
95
- var PAID_BALANCE_CHART_COLOR = "var(--polli-color-paid-pale)";
96
- var TIER_BALANCE_CHART_COLOR = "var(--polli-color-tier-pale)";
147
+ ...linkProps
148
+ }) {
149
+ const Component = as || "a";
150
+ const isExternal = external ?? isExternalHref(linkProps.href);
151
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
152
+ Component,
153
+ {
154
+ target: isExternal && as !== "button" ? "_blank" : void 0,
155
+ rel: isExternal && as !== "button" ? "noopener noreferrer" : void 0,
156
+ className: ["polli-link", className].filter(Boolean).join(" "),
157
+ "data-size": size,
158
+ "data-tone": tone,
159
+ ...linkProps,
160
+ children: [
161
+ children,
162
+ showIcon && isExternal && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
163
+ ExternalLinkIcon,
164
+ {
165
+ "aria-hidden": "true",
166
+ className: "polli-link-external-icon"
167
+ }
168
+ )
169
+ ]
170
+ }
171
+ );
172
+ }
97
173
 
98
174
  // src/modules/wallet/format-pollen.ts
99
175
  var BUDGET = 5;
@@ -125,7 +201,7 @@ function formatPollen(value) {
125
201
  }
126
202
 
127
203
  // src/modules/wallet/wallet-display.tsx
128
- var import_jsx_runtime3 = require("react/jsx-runtime");
204
+ var import_jsx_runtime4 = require("react/jsx-runtime");
129
205
  var walletPanelClasses = {
130
206
  paid: "polli-wallet-panel-paid",
131
207
  tier: "polli-wallet-panel-tier"
@@ -134,69 +210,220 @@ var walletTextClasses = {
134
210
  paid: "polli-wallet-text-paid",
135
211
  tier: "polli-wallet-text-tier"
136
212
  };
137
- var WalletDot = ({ kind, className }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
138
- "span",
139
- {
140
- className: cn(
141
- "polli:h-2 polli:w-2 polli:rounded-full",
142
- kind === "paid" ? "polli-wallet-dot-paid" : "polli-wallet-dot-tier",
143
- className
144
- ),
145
- "aria-hidden": "true"
146
- }
147
- );
213
+ var walletKindIcons = {
214
+ paid: CardIcon,
215
+ tier: SproutIcon
216
+ };
217
+ var WalletKindIcon = ({
218
+ kind,
219
+ className
220
+ }) => {
221
+ const Icon = walletKindIcons[kind];
222
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
223
+ Icon,
224
+ {
225
+ "aria-hidden": "true",
226
+ className: cn(
227
+ "polli:h-3.5 polli:w-3.5 polli:shrink-0",
228
+ walletTextClasses[kind],
229
+ className
230
+ )
231
+ }
232
+ );
233
+ };
148
234
  var WalletBalanceCard = ({
235
+ tone = "balance",
149
236
  kind,
150
237
  label,
151
238
  value,
239
+ icon,
152
240
  info,
153
241
  footer,
154
242
  className
155
- }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
156
- "div",
157
- {
158
- className: cn(
159
- "polli:rounded-xl polli:p-4",
160
- walletPanelClasses[kind],
161
- className
162
- ),
163
- children: [
164
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "polli:flex polli:items-center polli:gap-2", children: [
165
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(WalletDot, { kind }),
166
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
167
- "span",
243
+ }) => {
244
+ const Icon = walletKindIcons[kind];
245
+ const textColor = tone === "neutral" ? "polli:text-theme-text-strong" : walletTextClasses[kind];
246
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
247
+ "div",
248
+ {
249
+ className: cn(
250
+ "polli:min-w-0 polli:rounded-card polli:p-3.5 polli:sm:p-5",
251
+ tone === "neutral" ? "polli:bg-surface-opaque" : walletPanelClasses[kind],
252
+ className
253
+ ),
254
+ children: [
255
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "polli:flex polli:items-center polli:gap-2", children: [
256
+ icon ?? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
257
+ Icon,
258
+ {
259
+ "aria-hidden": "true",
260
+ className: cn(
261
+ "polli:h-3.5 polli:w-3.5 polli:shrink-0",
262
+ textColor
263
+ )
264
+ }
265
+ ),
266
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
267
+ "span",
268
+ {
269
+ className: cn(
270
+ "polli:text-sm polli:font-bold polli:uppercase polli:tracking-wide",
271
+ textColor
272
+ ),
273
+ children: label
274
+ }
275
+ ),
276
+ info
277
+ ] }),
278
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
279
+ "div",
168
280
  {
169
281
  className: cn(
170
- "polli:text-sm polli:font-bold polli:uppercase polli:tracking-wide",
171
- walletTextClasses[kind]
282
+ "polli-wallet-balance-value polli:[overflow-wrap:anywhere] polli:mt-1 polli:font-bold polli:leading-none polli:tracking-tight polli:tabular-nums",
283
+ textColor
172
284
  ),
173
- children: label
285
+ children: value
286
+ }
287
+ ),
288
+ footer && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "polli:mt-1.5 polli:text-sm polli:font-bold polli:tabular-nums polli:text-intent-success-text", children: footer })
289
+ ]
290
+ }
291
+ );
292
+ };
293
+
294
+ // src/modules/wallet/AccountPollen.tsx
295
+ var import_jsx_runtime5 = require("react/jsx-runtime");
296
+ function isEmpty(amount) {
297
+ return amount != null && amount <= 0;
298
+ }
299
+ var labels = {
300
+ "limit-reached": "Limit reached",
301
+ "no-pollen": "No Pollen",
302
+ unlimited: "Unlimited"
303
+ };
304
+ function PollenStatusBadge({
305
+ state,
306
+ topUpHref
307
+ }) {
308
+ const Icon = state === "no-pollen" ? WalletIcon : KeyIcon;
309
+ const label = labels[state];
310
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
311
+ Chip,
312
+ {
313
+ size: "sm",
314
+ intent: state === "unlimited" ? "info" : "danger",
315
+ "aria-label": label,
316
+ children: [
317
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
318
+ Icon,
319
+ {
320
+ "aria-hidden": "true",
321
+ className: "polli:h-3.5 polli:w-3.5 polli:shrink-0"
174
322
  }
175
323
  ),
176
- info
177
- ] }),
178
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
179
- "div",
180
- {
181
- className: cn(
182
- "polli-wallet-balance-value polli:mt-1 polli:font-bold polli:leading-none polli:tracking-tight polli:tabular-nums",
183
- walletTextClasses[kind]
324
+ label,
325
+ state === "no-pollen" && topUpHref && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
326
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { "aria-hidden": "true", children: "\xB7" }),
327
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
328
+ InlineLink,
329
+ {
330
+ href: topUpHref,
331
+ "aria-label": `${label}. Top up`,
332
+ children: "Top up"
333
+ }
334
+ )
335
+ ] })
336
+ ]
337
+ }
338
+ );
339
+ }
340
+ function AccountPollen({
341
+ source,
342
+ topUpHref
343
+ }) {
344
+ if (source.type === "budget") {
345
+ if (source.generationEnabled === false) return null;
346
+ const unlimited = source.remaining === null;
347
+ if (!unlimited && source.remaining === void 0) return null;
348
+ if (unlimited) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PollenStatusBadge, { state: "unlimited" });
349
+ const remaining = source.remaining;
350
+ if (isEmpty(remaining))
351
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PollenStatusBadge, { state: "limit-reached" });
352
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
353
+ "span",
354
+ {
355
+ title: "App budget left",
356
+ className: "polli:inline-flex polli:items-center polli:gap-1 polli:tabular-nums",
357
+ children: [
358
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
359
+ KeyIcon,
360
+ {
361
+ "aria-hidden": "true",
362
+ className: "polli:h-3.5 polli:w-3.5 polli:shrink-0"
363
+ }
184
364
  ),
185
- children: value
186
- }
187
- ),
188
- footer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "polli:mt-1.5 polli:text-sm polli:font-bold polli:tabular-nums polli:text-intent-success-text", children: footer })
189
- ]
365
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "polli:sr-only", children: "App budget: " }),
366
+ formatPollen(remaining),
367
+ " pollen"
368
+ ]
369
+ }
370
+ );
190
371
  }
191
- );
372
+ const { balances } = source;
373
+ if (!balances) return null;
374
+ if (isEmpty(balances.paid) && isEmpty(balances.quest))
375
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PollenStatusBadge, { state: "no-pollen", topUpHref });
376
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "polli:inline-flex polli:items-center polli:gap-2 polli:tabular-nums", children: ["quest", "paid"].map((kind) => {
377
+ const amount = balances[kind];
378
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
379
+ "span",
380
+ {
381
+ className: "polli:inline-flex polli:items-center polli:gap-1",
382
+ children: [
383
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
384
+ WalletKindIcon,
385
+ {
386
+ kind: kind === "paid" ? "paid" : "tier"
387
+ }
388
+ ),
389
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "polli:sr-only", children: [
390
+ kind === "paid" ? "Paid" : "Quest",
391
+ " Pollen:",
392
+ " "
393
+ ] }),
394
+ formatPollen(Math.max(0, amount))
395
+ ]
396
+ },
397
+ kind
398
+ );
399
+ }) });
400
+ }
401
+
402
+ // src/modules/wallet/chips.tsx
403
+ var import_jsx_runtime6 = require("react/jsx-runtime");
404
+ var PaidChip = ({
405
+ className,
406
+ children,
407
+ ...props
408
+ }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Chip, { ...props, className: cn("polli-wallet-chip-paid", className), children });
409
+ var TierChip = ({
410
+ className,
411
+ children,
412
+ ...props
413
+ }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Chip, { ...props, className: cn("polli-wallet-chip-tier", className), children });
414
+
415
+ // src/modules/wallet/colors.ts
416
+ var PAID_BALANCE_CHART_COLOR = "var(--polli-color-paid-soft)";
417
+ var TIER_BALANCE_CHART_COLOR = "var(--polli-color-tier-soft)";
192
418
  // Annotate the CommonJS export names for ESM import in node:
193
419
  0 && (module.exports = {
420
+ AccountPollen,
194
421
  PAID_BALANCE_CHART_COLOR,
195
422
  PaidChip,
196
423
  TIER_BALANCE_CHART_COLOR,
197
424
  TierChip,
198
425
  WalletBalanceCard,
199
- WalletDot,
426
+ WalletKindIcon,
200
427
  formatPollen
201
428
  });
202
429
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/wallet/index.ts","../../src/lib/cn.ts","../../src/primitives/Chip.tsx","../../src/modules/wallet/chips.tsx","../../src/modules/wallet/colors.ts","../../src/modules/wallet/format-pollen.ts","../../src/modules/wallet/wallet-display.tsx"],"sourcesContent":["export { PaidChip, TierChip, type WalletChipProps } from \"./chips.tsx\";\nexport {\n PAID_BALANCE_CHART_COLOR,\n TIER_BALANCE_CHART_COLOR,\n} from \"./colors.ts\";\nexport { formatPollen } from \"./format-pollen.ts\";\nexport {\n WalletBalanceCard,\n type WalletBalanceCardProps,\n WalletDot,\n type WalletDotProps,\n} from \"./wallet-display.tsx\";\n","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\";\nimport type { ThemeName } from \"../theme.ts\";\n\n/** Semantic chip labels for status and metadata badges. */\ntype ChipIntent =\n | \"news\"\n | \"alpha\"\n | \"neutral\"\n | \"success\"\n | \"warning\"\n | \"danger\";\n\nconst chipSizes = {\n sm: \"polli:px-2 polli:py-0.5 polli:text-xs\",\n md: \"polli:px-2.5 polli:py-0.5 polli:text-sm\",\n lg: \"polli:px-3 polli:py-1 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 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: \"polli:bg-intent-success-bg-light polli:text-intent-success-text\",\n warning: \"polli:bg-intent-warning-bg-light polli:text-intent-warning-text\",\n danger: \"polli:bg-intent-danger-bg-light polli:text-intent-danger-text\",\n};\n\nexport type ChipProps = ComponentPropsWithoutRef<\"span\"> & {\n /** Override the cascade theme for this chip's subtree. */\n theme?: ThemeName;\n /** Semantic intent. Wins over `theme` when set. */\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 theme,\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 data-theme={theme}\n className={cn(\n \"polli:inline-flex polli:shrink-0 polli:items-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-normal\",\n chipSizes[size],\n intentClass,\n className,\n )}\n >\n {children}\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-pale)\";\nexport const TIER_BALANCE_CHART_COLOR = \"var(--polli-color-tier-pale)\";\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\";\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\nexport type WalletDotProps = {\n kind: WalletBalanceKind;\n className?: string;\n};\n\nexport const WalletDot: FC<WalletDotProps> = ({ kind, className }) => (\n <span\n className={cn(\n \"polli:h-2 polli:w-2 polli:rounded-full\",\n kind === \"paid\" ? \"polli-wallet-dot-paid\" : \"polli-wallet-dot-tier\",\n className,\n )}\n aria-hidden=\"true\"\n />\n);\n\nexport type WalletBalanceCardProps = {\n kind: WalletBalanceKind;\n label: ReactNode;\n value: ReactNode;\n info?: ReactNode;\n footer?: ReactNode;\n className?: string;\n};\n\nexport const WalletBalanceCard: FC<WalletBalanceCardProps> = ({\n kind,\n label,\n value,\n info,\n footer,\n className,\n}) => (\n <div\n className={cn(\n \"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 <WalletDot 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: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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAqB;AACrB,4BAAoC;AAEpC,IAAM,cAAU,2CAAoB,EAAE,QAAQ,QAAQ,CAAC;AAGhD,SAAS,MAAM,QAA+C;AACjE,SAAO,YAAQ,kBAAK,GAAG,MAAM,CAAC;AAClC;;;AC2CQ;AAtCR,IAAM,YAAY;AAAA,EACd,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACR;AAEA,IAAM,gBAA4C;AAAA,EAC9C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACZ;AAaO,IAAM,OAAsB,CAAC;AAAA,EAChC;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,GAAG;AACP,MAAM;AACF,QAAM,cA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;AAAA;AAAA,UACG,WAAW;AAAA,YACP;AAAA,YACA,kBAAkB,IAAI;AAAA,UAC1B;AAAA,UAEC;AAAA;AAAA,MACL;AAAA,MACC,UACG,6CAAC,SAAI,WAAU,gGACV,kBACL;AAAA;AAAA;AAER;","names":["import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/modules/wallet/index.ts","../../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":["export { AccountPollen } from \"./AccountPollen.tsx\";\nexport { PaidChip, TierChip, type WalletChipProps } from \"./chips.tsx\";\nexport {\n PAID_BALANCE_CHART_COLOR,\n TIER_BALANCE_CHART_COLOR,\n} from \"./colors.ts\";\nexport { formatPollen } from \"./format-pollen.ts\";\nexport {\n WalletBalanceCard,\n type WalletBalanceCardProps,\n WalletKindIcon,\n type WalletKindIconProps,\n} from \"./wallet-display.tsx\";\n","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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAqB;AACrB,4BAAoC;AAEpC,IAAM,cAAU,2CAAoB,EAAE,QAAQ,QAAQ,CAAC;AAGhD,SAAS,MAAM,QAA+C;AACjE,SAAO,YAAQ,kBAAK,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,IAA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