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

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 (64) hide show
  1. package/README.md +28 -65
  2. package/dist/{Chip-SM52sUbZ.d.cts → Chip-CQCq34kS.d.cts} +1 -1
  3. package/dist/{Chip-C5impfYd.d.ts → Chip-Cj4xG7Te.d.ts} +1 -1
  4. package/dist/{compositions/app-user.cjs → app-user-menu/sdk.cjs} +148 -148
  5. package/dist/app-user-menu/sdk.cjs.map +1 -0
  6. package/dist/{compositions/app-user.js → app-user-menu/sdk.js} +127 -127
  7. package/dist/app-user-menu/sdk.js.map +1 -0
  8. package/dist/app.css +94 -3
  9. package/dist/auth/index.cjs +2 -2
  10. package/dist/auth/index.cjs.map +1 -1
  11. package/dist/auth/index.js +2 -2
  12. package/dist/auth/index.js.map +1 -1
  13. package/dist/{models → gen}/index.cjs +40 -71
  14. package/dist/gen/index.cjs.map +1 -0
  15. package/dist/gen/index.d.cts +35 -0
  16. package/dist/gen/index.d.ts +35 -0
  17. package/dist/{models → gen}/index.js +31 -66
  18. package/dist/gen/index.js.map +1 -0
  19. package/dist/index.cjs +1594 -1142
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +268 -178
  22. package/dist/index.d.ts +268 -178
  23. package/dist/index.js +1581 -1134
  24. package/dist/index.js.map +1 -1
  25. package/dist/styles.css +1 -1
  26. package/dist/theme-jRPPBmld.d.cts +20 -0
  27. package/dist/theme-jRPPBmld.d.ts +20 -0
  28. package/dist/wallet/index.cjs +4 -4
  29. package/dist/wallet/index.cjs.map +1 -1
  30. package/dist/wallet/index.d.cts +2 -2
  31. package/dist/wallet/index.d.ts +2 -2
  32. package/dist/wallet/index.js +4 -4
  33. package/dist/wallet/index.js.map +1 -1
  34. package/package.json +9 -24
  35. package/dist/Button-BvLF_Km2.d.cts +0 -26
  36. package/dist/Button-DQAZzvyQ.d.ts +0 -26
  37. package/dist/auth/sdk.cjs +0 -221
  38. package/dist/auth/sdk.cjs.map +0 -1
  39. package/dist/auth/sdk.d.cts +0 -53
  40. package/dist/auth/sdk.d.ts +0 -53
  41. package/dist/auth/sdk.js +0 -188
  42. package/dist/auth/sdk.js.map +0 -1
  43. package/dist/compositions/app-user.cjs.map +0 -1
  44. package/dist/compositions/app-user.js.map +0 -1
  45. package/dist/modality/index.cjs +0 -86
  46. package/dist/modality/index.cjs.map +0 -1
  47. package/dist/modality/index.d.cts +0 -26
  48. package/dist/modality/index.d.ts +0 -26
  49. package/dist/modality/index.js +0 -59
  50. package/dist/modality/index.js.map +0 -1
  51. package/dist/models/index.cjs.map +0 -1
  52. package/dist/models/index.d.cts +0 -22
  53. package/dist/models/index.d.ts +0 -22
  54. package/dist/models/index.js.map +0 -1
  55. package/dist/theme-VMRlhqST.d.cts +0 -9
  56. package/dist/theme-VMRlhqST.d.ts +0 -9
  57. package/dist/wallet/sdk.cjs +0 -206
  58. package/dist/wallet/sdk.cjs.map +0 -1
  59. package/dist/wallet/sdk.d.cts +0 -33
  60. package/dist/wallet/sdk.d.ts +0 -33
  61. package/dist/wallet/sdk.js +0 -175
  62. package/dist/wallet/sdk.js.map +0 -1
  63. /package/dist/{compositions/app-user.d.cts → app-user-menu/sdk.d.cts} +0 -0
  64. /package/dist/{compositions/app-user.d.ts → app-user-menu/sdk.d.ts} +0 -0
package/dist/index.cjs CHANGED
@@ -31,7 +31,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  Alert: () => Alert,
34
+ AppHeader: () => AppHeader,
34
35
  AppIcon: () => AppIcon,
36
+ AudioIcon: () => AudioIcon,
35
37
  BeakerIcon: () => BeakerIcon,
36
38
  BookIcon: () => BookIcon,
37
39
  Button: () => Button,
@@ -41,6 +43,7 @@ __export(src_exports, {
41
43
  Chip: () => Chip,
42
44
  ClipboardIcon: () => ClipboardIcon,
43
45
  ClockIcon: () => ClockIcon,
46
+ CodeBlock: () => CodeBlock,
44
47
  Collapsible: () => Collapsible,
45
48
  CopyButton: () => CopyButton,
46
49
  Dialog: () => Dialog,
@@ -55,6 +58,7 @@ __export(src_exports, {
55
58
  FileUpload: () => FileUpload,
56
59
  GenApiIcon: () => GenApiIcon,
57
60
  GitHubIcon: () => GitHubIcon,
61
+ Heading: () => Heading,
58
62
  IconButton: () => IconButton,
59
63
  ImageIcon: () => ImageIcon,
60
64
  InfoTip: () => InfoTip,
@@ -65,10 +69,12 @@ __export(src_exports, {
65
69
  MailIcon: () => MailIcon,
66
70
  Markdown: () => Markdown,
67
71
  McpIcon: () => McpIcon,
72
+ MediaPlaceholder: () => MediaPlaceholder,
68
73
  MenuIcon: () => MenuIcon,
69
74
  MultiSelect: () => MultiSelect,
70
75
  NavItem: () => NavItem,
71
76
  PeriodPicker: () => PeriodPicker,
77
+ PlusIcon: () => PlusIcon,
72
78
  Prose: () => Prose,
73
79
  ScrollArea: () => ScrollArea,
74
80
  Section: () => Section,
@@ -84,197 +90,118 @@ __export(src_exports, {
84
90
  TableHeaderCell: () => TableHeaderCell,
85
91
  TableRow: () => TableRow,
86
92
  TerminalIcon: () => TerminalIcon,
93
+ Text: () => Text,
87
94
  Textarea: () => Textarea,
88
95
  TokensIcon: () => TokensIcon,
89
96
  Tooltip: () => Tooltip,
90
97
  TrendUpIcon: () => TrendUpIcon,
91
98
  WalletIcon: () => WalletIcon,
92
99
  XIcon: () => XIcon,
93
- cn: () => cn,
100
+ cn: () => cn2,
94
101
  currentPeriod: () => currentPeriod,
95
102
  getPeriodBucketKeys: () => getPeriodBucketKeys,
103
+ headingClassName: () => headingClassName,
96
104
  periodBucketKeyToDate: () => periodBucketKeyToDate,
105
+ textClassName: () => textClassName,
106
+ themePalette: () => themePalette,
97
107
  themes: () => themes,
98
108
  useScrollLock: () => useScrollLock
99
109
  });
100
110
  module.exports = __toCommonJS(src_exports);
101
111
 
102
- // src/lib/cn-app.ts
112
+ // src/lib/cn.ts
103
113
  var import_clsx = require("clsx");
104
114
  var import_tailwind_merge = require("tailwind-merge");
115
+ var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({ prefix: "polli" });
105
116
  function cn(...inputs) {
106
- return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(...inputs));
117
+ return twMerge((0, import_clsx.clsx)(...inputs));
107
118
  }
108
119
 
109
- // src/lib/period.ts
110
- var MS_PER_DAY = 864e5;
111
- function startOfUtcDay(date = /* @__PURE__ */ new Date()) {
112
- return new Date(
113
- Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate())
114
- );
115
- }
116
- function addUtcDays(date, days) {
117
- const next = new Date(date);
118
- next.setUTCDate(next.getUTCDate() + days);
119
- return next;
120
- }
121
- function startOfUtcMonth(date) {
122
- return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 1));
123
- }
124
- function addUtcMonths(date, months) {
125
- return new Date(
126
- Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + months, 1)
127
- );
128
- }
129
- function startOfUtcIsoWeek(date) {
130
- const day = date.getUTCDay() || 7;
131
- return addUtcDays(startOfUtcDay(date), 1 - day);
132
- }
133
- function getUtcIsoWeekPeriod(date) {
134
- const day = date.getUTCDay() || 7;
135
- const thursday = addUtcDays(startOfUtcDay(date), 4 - day);
136
- const isoYear = thursday.getUTCFullYear();
137
- const yearStart = new Date(Date.UTC(isoYear, 0, 1));
138
- const isoWeek = Math.ceil(
139
- ((thursday.getTime() - yearStart.getTime()) / MS_PER_DAY + 1) / 7
120
+ // src/primitives/Typography.tsx
121
+ var import_jsx_runtime = require("react/jsx-runtime");
122
+ var headingSizeClasses = {
123
+ display: "polli:font-heading polli:text-5xl polli:leading-none",
124
+ title: "polli:font-heading polli:text-4xl polli:leading-none",
125
+ section: "polli:font-subheading polli:text-2xl polli:leading-tight",
126
+ subsection: "polli:font-subheading polli:text-xl polli:leading-tight",
127
+ card: "polli:font-subheading polli:text-lg polli:leading-tight"
128
+ };
129
+ var textSizeClasses = {
130
+ body: "polli:text-base polli:leading-relaxed",
131
+ sm: "polli:text-sm polli:leading-6",
132
+ xs: "polli:text-xs polli:leading-normal",
133
+ micro: "polli:text-micro polli:leading-normal"
134
+ };
135
+ var textToneClasses = {
136
+ base: "polli:text-theme-text-base",
137
+ strong: "polli:text-theme-text-strong",
138
+ soft: "polli:text-theme-text-soft",
139
+ muted: "polli:text-theme-text-muted"
140
+ };
141
+ var textWeightClasses = {
142
+ normal: "polli:font-normal",
143
+ medium: "polli:font-medium",
144
+ semibold: "polli:font-semibold",
145
+ bold: "polli:font-bold"
146
+ };
147
+ function headingClassName(size, className) {
148
+ return cn(
149
+ "polli:break-words polli:text-theme-text-strong",
150
+ headingSizeClasses[size],
151
+ className
140
152
  );
141
- return `${isoYear}-W${String(isoWeek).padStart(2, "0")}`;
142
- }
143
- function formatUtcDatePeriod(date) {
144
- return date.toISOString().slice(0, 10);
145
- }
146
- function formatUtcHourPeriod(date) {
147
- return date.toISOString().slice(0, 13).replace("T", " ");
148
- }
149
- function formatUtcMonthPeriod(date) {
150
- return date.toISOString().slice(0, 7);
151
- }
152
- function periodFromDate(granularity, date = /* @__PURE__ */ new Date()) {
153
- if (granularity === "day") {
154
- return {
155
- granularity,
156
- period: formatUtcDatePeriod(startOfUtcDay(date))
157
- };
158
- }
159
- if (granularity === "week") {
160
- return { granularity, period: getUtcIsoWeekPeriod(date) };
161
- }
162
- return { granularity, period: formatUtcMonthPeriod(startOfUtcMonth(date)) };
163
- }
164
- function currentPeriod() {
165
- return periodFromDate("day");
166
153
  }
167
- function periodToWindow(selection) {
168
- if (selection.granularity === "day") {
169
- const start2 = /* @__PURE__ */ new Date(`${selection.period}T00:00:00.000Z`);
170
- return { start: start2, end: addUtcDays(start2, 1) };
171
- }
172
- if (selection.granularity === "week") {
173
- const [yearText2, weekText] = selection.period.split("-W");
174
- const isoYear = Number(yearText2);
175
- const isoWeek = Number(weekText);
176
- const jan4 = new Date(Date.UTC(isoYear, 0, 4));
177
- const start2 = addUtcDays(startOfUtcIsoWeek(jan4), (isoWeek - 1) * 7);
178
- return { start: start2, end: addUtcDays(start2, 7) };
179
- }
180
- const [yearText, monthText] = selection.period.split("-");
181
- const start = new Date(
182
- Date.UTC(Number(yearText), Number(monthText) - 1, 1)
154
+ function textClassName({
155
+ size,
156
+ tone,
157
+ weight,
158
+ className
159
+ }) {
160
+ return cn(
161
+ "polli:break-words polli:font-body",
162
+ textSizeClasses[size],
163
+ textToneClasses[tone],
164
+ textWeightClasses[weight],
165
+ className
183
166
  );
184
- return { start, end: addUtcMonths(start, 1) };
185
167
  }
186
- function formatPeriodLabel(selection) {
187
- const { start, end } = periodToWindow(selection);
188
- if (selection.granularity === "day") {
189
- const today = startOfUtcDay();
190
- const yesterday = addUtcDays(today, -1);
191
- if (start.getTime() === today.getTime()) return "Today";
192
- if (start.getTime() === yesterday.getTime()) return "Yesterday";
193
- return start.toLocaleDateString("en-US", {
194
- timeZone: "UTC",
195
- month: "short",
196
- day: "numeric",
197
- year: "numeric"
198
- });
199
- }
200
- if (selection.granularity === "week") {
201
- const weekEnd = addUtcDays(end, -1);
202
- return `${start.toLocaleDateString("en-US", {
203
- timeZone: "UTC",
204
- month: "short",
205
- day: "numeric"
206
- })} - ${weekEnd.toLocaleDateString("en-US", {
207
- timeZone: "UTC",
208
- month: "short",
209
- day: "numeric",
210
- year: "numeric"
211
- })}`;
212
- }
213
- return start.toLocaleDateString("en-US", {
214
- timeZone: "UTC",
215
- month: "long",
216
- year: "numeric"
217
- });
168
+ function Heading({
169
+ as,
170
+ size = "section",
171
+ className,
172
+ children,
173
+ ...rest
174
+ }) {
175
+ const Component = as || "h2";
176
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...rest, className: headingClassName(size, className), children });
218
177
  }
219
- function getPeriodBucketKeys(selection) {
220
- const { start, end } = periodToWindow(selection);
221
- const bucketKeys = [];
222
- const cursor = new Date(start);
223
- if (selection.granularity === "day") {
224
- while (cursor < end) {
225
- bucketKeys.push(`${formatUtcHourPeriod(cursor)}:00:00`);
226
- cursor.setUTCHours(cursor.getUTCHours() + 1);
178
+ function Text({
179
+ as,
180
+ size = "body",
181
+ tone = "base",
182
+ weight = "normal",
183
+ className,
184
+ children,
185
+ ...rest
186
+ }) {
187
+ const Component = as || "p";
188
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
189
+ Component,
190
+ {
191
+ ...rest,
192
+ className: textClassName({ size, tone, weight, className }),
193
+ children
227
194
  }
228
- return bucketKeys;
229
- }
230
- while (cursor < end) {
231
- bucketKeys.push(formatUtcDatePeriod(cursor));
232
- cursor.setUTCDate(cursor.getUTCDate() + 1);
233
- }
234
- return bucketKeys;
235
- }
236
- function periodBucketKeyToDate(bucketKey, granularity) {
237
- if (granularity === "day") {
238
- return /* @__PURE__ */ new Date(`${bucketKey.replace(" ", "T")}.000Z`);
239
- }
240
- return /* @__PURE__ */ new Date(`${bucketKey}T00:00:00.000Z`);
241
- }
242
- function isPeriodSelectable(selection, minDate = /* @__PURE__ */ new Date(0), maxDate = startOfUtcDay()) {
243
- const { start, end } = periodToWindow(selection);
244
- return end > minDate && start <= maxDate;
245
- }
246
-
247
- // src/lib/use-scroll-lock.ts
248
- var import_react = require("react");
249
- function useScrollLock(enabled = true) {
250
- (0, import_react.useEffect)(() => {
251
- if (!enabled) return;
252
- const originalBody = document.body.style.overflow;
253
- const originalHtml = document.documentElement.style.overflow;
254
- document.body.style.overflow = "hidden";
255
- document.documentElement.style.overflow = "hidden";
256
- return () => {
257
- document.body.style.overflow = originalBody;
258
- document.documentElement.style.overflow = originalHtml;
259
- };
260
- }, [enabled]);
261
- }
262
-
263
- // src/lib/cn.ts
264
- var import_clsx2 = require("clsx");
265
- var import_tailwind_merge2 = require("tailwind-merge");
266
- var twMerge2 = (0, import_tailwind_merge2.extendTailwindMerge)({ prefix: "polli" });
267
- function cn2(...inputs) {
268
- return twMerge2((0, import_clsx2.clsx)(...inputs));
195
+ );
269
196
  }
270
197
 
271
- // src/primitives/Alert.tsx
272
- var import_jsx_runtime = require("react/jsx-runtime");
198
+ // src/compositions/Alert.tsx
199
+ var import_jsx_runtime2 = require("react/jsx-runtime");
273
200
  var intentClasses = {
274
- info: "polli:border-theme-border polli:bg-theme-bg-pale polli:text-theme-text-strong",
275
- success: "polli:border-intent-success-border polli:bg-intent-success-bg-light polli:text-intent-success-text",
276
- warning: "polli:border-intent-warning-border polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
277
- danger: "polli:border-intent-danger-border polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
201
+ info: "polli:bg-theme-bg-pale polli:text-theme-text-strong",
202
+ success: "polli:bg-intent-success-bg-light polli:text-intent-success-text",
203
+ warning: "polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
204
+ danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
278
205
  };
279
206
  var Alert = ({
280
207
  intent = "info",
@@ -282,117 +209,290 @@ var Alert = ({
282
209
  className,
283
210
  children,
284
211
  ...rest
285
- }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
212
+ }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
286
213
  "div",
287
214
  {
288
215
  ...rest,
289
216
  role: intent === "danger" ? "alert" : "status",
290
- className: cn2(
291
- "polli:rounded-xl polli:border polli:px-3 polli:py-2 polli:text-sm",
217
+ className: cn(
218
+ "polli:rounded-xl polli:px-3 polli:py-2 polli:text-sm",
292
219
  intentClasses[intent],
293
220
  className
294
221
  ),
295
222
  children: [
296
- title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "polli:mb-1 polli:text-xs polli:font-bold polli:uppercase polli:tracking-wide", children: title }),
297
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children })
223
+ title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
224
+ Text,
225
+ {
226
+ as: "div",
227
+ size: "xs",
228
+ tone: "strong",
229
+ weight: "bold",
230
+ className: "polli:mb-1 polli:uppercase polli:tracking-wide",
231
+ children: title
232
+ }
233
+ ),
234
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children })
298
235
  ]
299
236
  }
300
237
  );
301
238
 
302
- // src/primitives/Button.tsx
303
- var import_jsx_runtime2 = require("react/jsx-runtime");
304
- var sizes = {
305
- sm: "polli:px-2 polli:pt-0.5 polli:pb-1",
306
- md: "polli:px-4 polli:pt-1.5 polli:pb-2",
307
- lg: "polli:px-6 polli:py-3"
308
- };
309
- var themeClasses = "polli:bg-theme-bg-active polli:text-theme-text-base polli:hover:bg-theme-bg-hover polli:transition-colors";
310
- var intentClasses2 = {
311
- danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text polli:hover:bg-intent-danger-bg-hover polli:transition-colors"
312
- };
313
- var buttonClasses = ({
314
- theme: _theme,
315
- intent,
316
- size,
317
- className,
318
- disabled
319
- }) => {
320
- const colorClasses = intent ? intentClasses2[intent] : themeClasses;
321
- return cn2(
322
- "polli-control polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:self-center polli:font-medium polli:leading-normal polli:box-border",
323
- disabled ? "polli:opacity-50 polli:cursor-not-allowed" : "polli:hover:filter polli:hover:brightness-105 polli:cursor-pointer",
324
- colorClasses,
325
- sizes[size || "md"],
326
- className
327
- );
239
+ // src/compositions/AppHeader.tsx
240
+ var import_react = require("react");
241
+
242
+ // src/assets/logo-wordmark.svg
243
+ var logo_wordmark_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="16.9 37.9 212.3 26.1" fill="currentColor"><defs><clipPath id="a"><path d="M16.969 37.434h27V64h-27Zm0 0"/></clipPath></defs><g clip-path="url(%23a)"><path d="M16.996 49.113c0-.195 0-.386.012-.597.137-.004.238-.024.234-.188-.004-.074.047-.094.113-.094h.528c.097 0 .16-.035.164-.144 0-.09.043-.125.133-.121q.058.006.117 0c.129-.004.277.039.308-.157a.06.06 0 0 1 .028-.023c.11-.039.21-.11.336-.098.097.008.164-.03.156-.144-.004-.086.04-.11.121-.11q.449 0 .899-.011c.175 0 .199-.02.203-.196.004-.417 0-.835 0-1.253 0-.997.004-1.993 0-2.989 0-.113.039-.156.152-.156.805.004 1.61 0 2.414 0q1.161.001 2.316-.004c.11 0 .172.024.16.149-.007.101.06.125.145.125q.358 0 .723.003c.101 0 .156-.042.16-.148 0-.055.008-.11.086-.125.187-.031.183-.035.187-.23 0-.051.004-.106-.003-.157-.008-.105.027-.16.14-.148.098.012.133-.04.133-.133-.004-.098.004-.195.004-.289.004-.078.035-.129.12-.121q.151.01.15-.137c-.005-.101.038-.144.14-.133.09.008.137-.035.129-.12-.008-.114.043-.153.148-.145.09.004.121-.047.121-.133-.003-.098.004-.195 0-.29q-.006-.114.11-.112.153-.007.3-.008c.083-.004.122-.043.126-.125v-.29c0-.085.03-.128.125-.124.086.008.168-.004.25.004.132.011.175-.051.168-.172-.004-.074.003-.149 0-.223-.008-.098.023-.148.132-.14.094.003.184-.012.278-.012.093.004.136-.047.14-.133 0-.09.004-.18 0-.266-.007-.097.024-.148.133-.136q.14.008.133-.133v-.211c.004-.184.004-.184.18-.188q.113-.001.226-.007c.082-.004.125-.043.125-.133-.004-.102 0-.203 0-.305 0-.07.031-.105.106-.102q.19 0 .379-.003c.082 0 .109.043.109.117-.004.09.004.183 0 .277-.008.106.043.149.148.145.09 0 .176.004.266.004.082 0 .117.035.117.12a4 4 0 0 0 0 .301c0 .067.028.121.098.114.168-.024.172.07.168.195-.004.367-.043.344.336.348.21 0 .21 0 .21.21.005.372-.034.329.333.333.199 0 .199 0 .203.195 0 .39-.004.332.336.34.207.004.207 0 .207.199 0 .063.004.125.004.188-.008.109.035.167.148.156.082-.008.13.02.117.113-.011.11.04.164.153.152.082-.007.125.032.12.114q-.007.169.161.156c.078-.004.11.039.11.113 0 .082.007.168.003.25-.008.113.032.18.157.172.082-.004.113.043.113.125-.004.09 0 .184 0 .277.004.09.043.141.136.137.098-.004.137.04.13.137-.008.09.03.137.128.137h.766c.078 0 .129-.032.129-.114-.004-.144.082-.156.2-.156l4.651.008c.188 0 .204.012.204.2-.004.401-.016.8-.008 1.198.008 1 .011 1.996 0 2.992 0 .165.023.196.187.196.297.004.59 0 .883 0 .09 0 .16.015.152.129-.004.093.051.133.141.133.086 0 .176.007.262.003.101-.007.152.028.136.133-.011.102.043.145.141.145.094-.004.184.004.277 0 .086-.008.137.023.13.117-.008.117.054.152.163.148.168-.004.332.004.5 0 .102-.004.149.028.145.13-.004.105.05.144.148.136q.048.001.094.008c0 .183 0 .37-.012.566-.203.02-.207.02-.242.211-.012.074-.058.078-.113.074-.113-.004-.156.055-.152.164.003.176 0 .352 0 .528 0 .078-.024.129-.114.125-.113-.008-.16.043-.156.156.004.055-.016.113-.086.105-.164-.011-.191.083-.184.215 0 .059-.007.121-.003.184.011.105-.028.16-.137.152-.098-.008-.133.043-.129.137 0 .094-.008.184 0 .277.004.09-.035.13-.125.121q-.148-.016-.145.137c.004.086-.027.137-.12.13-.11-.013-.153.042-.145.148.008.09-.035.128-.125.128-.106-.004-.149.051-.149.153 0 .074-.035.117-.113.113-.113-.004-.156.055-.156.16 0 .059-.016.102-.086.11-.188.027-.188.03-.188.222 0 .059-.004.121 0 .184.004.09-.023.144-.12.14-.102 0-.145.051-.145.149 0 .086-.047.121-.125.117-.11-.004-.153.047-.149.148 0 .09-.047.126-.132.122s-.168.004-.25 0c-.106-.004-.165.043-.157.148.004.094-.043.121-.129.117-.07-.004-.136.02-.132.094.011.176-.09.195-.223.184-.059-.008-.113.003-.172 0-.102-.004-.164.046-.16.148.004.094-.04.125-.125.121-.074-.004-.14.024-.137.106.012.156-.074.175-.195.164-.059-.004-.117.004-.172 0-.113-.012-.18.023-.172.152.004.082-.039.117-.121.113-.094-.004-.184 0-.277 0s-.157.04-.145.14c.008.114-.05.13-.144.13-.25-.008-.5-.004-.75-.008-.114 0-.18.039-.18.156 0 .098-.047.13-.14.13-.262-.005-.52 0-.778 0-.102-.005-.164.026-.164.136.004.097-.05.129-.14.129q-1.236-.006-2.466 0c-.109 0-.152-.043-.156-.145 0-.09-.05-.125-.137-.12q-.227 0-.46.003c-.07 0-.133.016-.133.105 0 .086.066.094.129.098.078.004.125.024.117.113-.008.114.043.176.164.168q.112-.01.113.106c0 .098.059.148.149.152.097 0 .128.047.125.137q0 .146.148.14c.094-.003.188.004.277.004.063 0 .11.02.11.086-.004.16.097.188.226.188.211 0 .422.004.633 0h1.45c.05.004.117-.02.132.07.035.196.04.196.242.196.051 0 .106.003.157 0q.146-.019.14.12c0 .098.04.153.14.145q.13-.011.122.113c-.004.102.035.16.144.157.079 0 .125.039.122.12-.008.106.046.153.152.15.078-.005.125.027.117.116-.008.11.05.153.148.153q.135-.001.122.133c-.004.062.007.14.09.132.195-.02.183.106.175.23-.004.052 0 .099 0 .15-.008.113.035.175.156.167.09-.004.118.04.114.133-.008.266 0 .535-.004.8-.004.114.043.153.148.15.094-.005.184 0 .278 0 .086-.005.129.03.125.124-.008.086 0 .176-.004.262-.004.102.027.164.14.156.082-.004.133.024.13.121-.005.094.038.153.14.149.086 0 .129.039.125.129-.008.097.047.148.144.144.098-.008.133.031.133.13v1.398c.004.086-.02.144-.125.136-.101-.008-.16.043-.156.149.008.093-.04.12-.125.113-.094-.004-.14.047-.137.137.004.105-.043.144-.14.14s-.133.051-.13.141c.009.086-.027.133-.12.129-.098-.008-.149.035-.145.137.004.097-.043.132-.137.132q-.696-.006-1.398 0c-.09 0-.14-.03-.137-.129q.012-.152-.14-.14c-.086.004-.133-.031-.125-.125.007-.102-.043-.145-.141-.145-.082.004-.133-.027-.125-.12.008-.106-.05-.16-.152-.153-.094.008-.125-.035-.125-.121q-.001-.149-.149-.145c-.094.004-.117-.047-.117-.129v-1.41c0-.097.035-.14.129-.136.11.007.156-.047.148-.153-.007-.082.032-.113.11-.11q.166.014.156-.155c-.004-.075.031-.118.11-.11.132.008.16-.062.16-.18 0-.37.003-.37.378-.363.11.004.157-.043.153-.144q-.001-.238.004-.477c0-.105-.047-.156-.153-.14q-.138.012-.125-.122c.008-.109-.047-.152-.148-.152-.074.004-.121-.031-.113-.11.007-.113-.043-.163-.153-.16-.078 0-.125-.027-.117-.117.008-.11-.047-.164-.156-.156-.086.004-.121-.039-.117-.121.004-.113-.055-.148-.164-.148-.172.003-.344 0-.516 0-.059 0-.125 0-.121-.083.012-.175-.098-.183-.23-.183q-.756.006-1.516 0c-.074 0-.16.008-.153-.11.008-.12-.062-.16-.171-.16-.16 0-.325-.007-.489 0-.101 0-.156-.035-.156-.144.004-.094-.05-.137-.14-.133s-.126-.031-.13-.121c-.003-.09-.058-.137-.144-.14-.086 0-.117-.04-.117-.122 0-.097-.051-.148-.145-.148s-.129-.047-.129-.13c-.004-.097-.05-.144-.152-.14-.078 0-.121-.039-.121-.12.004-.114-.055-.161-.16-.153-.082.004-.11-.04-.106-.113q.001-.142-.004-.278c-.004-.074-.035-.137-.113-.14-.086 0-.105.066-.105.14v3.942c0 .164.027.187.191.187.074-.004.152.004.227-.004.101-.008.128.04.12.133-.003.086.005.176.005.262 0 .093.039.144.136.136.094-.003.14.032.133.13-.004.097.04.148.14.144.087-.004.137.031.13.125-.012.101.039.144.136.144.086 0 .13.036.125.13v1.41c0 .081-.023.136-.117.128-.11-.007-.156.047-.148.153.008.082-.024.125-.114.113q-.168-.017-.16.152c.004.086-.035.133-.125.125-.105-.007-.16.04-.148.149.012.094-.031.129-.121.125-.094-.012-.14.039-.14.129.003.101-.04.136-.142.136a84 84 0 0 0-1.398 0c-.086 0-.133-.023-.125-.12.012-.102-.039-.157-.144-.15q-.135.006-.13-.124c0-.098-.046-.149-.144-.145-.086 0-.129-.039-.125-.129.008-.097-.039-.156-.14-.144-.098.008-.133-.035-.13-.133.004-.094-.046-.137-.136-.133-.102.004-.13-.047-.13-.136q.008-.7 0-1.399c0-.09.028-.144.126-.14.098.007.148-.04.14-.141q-.003-.128.122-.121c.113.004.156-.055.156-.16-.004-.059.016-.114.086-.106.176.016.176-.097.176-.219 0-.316.004-.316.308-.32.227 0 .235-.008.235-.226v-3.887c0-.082-.008-.16-.114-.16-.097 0-.105.078-.11.148 0 .09-.003.176 0 .266.005.082-.023.125-.112.113q-.16-.019-.157.145c.004.085-.03.14-.128.136-.106-.004-.153.051-.149.153 0 .05 0 .113-.066.109-.118-.004-.184.055-.235.152a.3.3 0 0 1-.133.106c-.066.035-.101.082-.097.156.004.098-.043.133-.137.125s-.14.04-.137.133c.008.12-.054.144-.164.14-.168-.007-.34 0-.511.004-.059 0-.133.012-.13.082.016.2-.109.192-.245.192-.493-.004-.985 0-1.477 0-.094-.004-.184.008-.176.133.004.109-.054.132-.148.132-.172-.003-.344 0-.516-.003-.101 0-.156.042-.152.148 0 .07-.016.121-.102.117-.12-.008-.172.055-.164.168.004.086-.039.106-.113.102-.106-.012-.16.035-.152.144.007.094-.04.133-.133.133q-.141-.005-.137.137c.004.101-.043.14-.144.133-.094-.008-.137.046-.137.136v.328c0 .293 0 .293.289.293.312.004.254 0 .262.254v.121c-.008.106.035.168.148.168.086 0 .133.04.129.125-.004.11.055.149.156.149.07-.004.11.027.106.101-.012.114.043.16.152.16.07 0 .117.028.117.11v1.45c0 .07-.027.12-.105.112-.114-.007-.164.043-.164.153 0 .078-.035.125-.121.117-.106-.012-.157.043-.153.144 0 .09-.035.137-.125.125-.113-.011-.148.047-.14.149.003.09-.04.129-.125.125q-.154-.012-.149.14c.004.094-.043.13-.137.13q-.696-.008-1.398 0c-.086 0-.137-.028-.129-.122.008-.117-.05-.156-.156-.152q-.118.007-.113-.11.01-.157-.149-.156c-.09 0-.121-.043-.117-.132 0-.098-.055-.149-.148-.145-.086.004-.122-.035-.125-.117 0-.098-.055-.145-.149-.145-.094.004-.121-.047-.121-.129q.006-.712 0-1.425c0-.082.035-.125.117-.121.106.007.152-.043.152-.145 0-.07.028-.121.11-.117.117.004.168-.055.164-.168 0-.067.031-.106.094-.098.164.012.172-.082.175-.207.004-.383-.07-.32.352-.336.16-.008.176-.012.188-.168.02-.254.003-.508-.004-.765 0-.09.02-.149.132-.145.102.004.153-.055.145-.16-.004-.082.004-.164 0-.25-.004-.09.023-.145.125-.137.11.012.148-.047.14-.148q-.005-.129.118-.117c.11.007.152-.047.148-.153q-.012-.123.117-.113c.106.012.157-.04.157-.145 0-.09.039-.14.132-.136.102.004.145-.051.141-.145-.008-.094.031-.129.121-.125.078.008.14-.027.137-.105-.004-.145.07-.172.191-.16.063.003.121 0 .184 0 .098-.004.164-.036.164-.145-.004-.094.047-.121.133-.121q.222.005.449.004a115 115 0 0 1 1.645 0c.082 0 .183.004.19-.098.017-.168.122-.18.247-.176.055 0 .105-.004.16-.004.094-.003.149-.05.153-.144 0-.09.043-.125.128-.129.094-.004.145-.055.141-.152 0-.075.035-.117.113-.114q.155.013.157-.144c0-.082.03-.133.125-.129.066 0 .136-.02.128-.11-.003-.09-.078-.101-.144-.101q-.224-.005-.45-.004c-.1-.004-.16.035-.152.145.004.086-.035.12-.117.117h-2.52c-.066 0-.109-.016-.105-.094.012-.137-.058-.172-.183-.172-.262.008-.52 0-.778 0-.086 0-.136-.031-.129-.12.008-.126-.054-.161-.168-.161-.253.004-.503-.004-.753.004-.102.004-.16-.02-.149-.137.012-.094-.039-.133-.133-.133-.093.004-.183-.004-.277.004-.098.004-.14-.035-.133-.129.004-.105-.05-.14-.148-.14-.086.004-.176 0-.262.004-.09.004-.133-.032-.125-.125.012-.106-.04-.153-.145-.149-.062 0-.128-.004-.125-.082.008-.164-.09-.191-.218-.187-.059.004-.121-.004-.184 0-.098.004-.152-.028-.144-.137q.015-.147-.137-.14c-.078.007-.133-.016-.125-.106.008-.125-.051-.168-.168-.156-.05.004-.09-.012-.106-.075-.05-.195-.054-.195-.254-.199h-.144c-.098.008-.152-.027-.145-.133.004-.062-.015-.125-.09-.12-.187.011-.187-.11-.18-.239.005-.047 0-.098.005-.145.004-.113-.043-.18-.156-.187-.075-.008-.11-.04-.11-.117.004-.094-.047-.137-.137-.133-.066 0-.128-.016-.132-.098-.008-.101-.043-.168-.145-.21-.058-.028-.098-.087-.129-.15a.17.17 0 0 0-.09-.089c-.086-.043-.164-.094-.195-.2-.012-.038-.047-.07-.086-.066-.156.016-.176-.074-.168-.195.004-.058-.004-.113-.004-.172.004-.105-.027-.183-.156-.176-.09.008-.121-.042-.117-.128.004-.09-.004-.176-.004-.266.004-.094-.035-.148-.137-.145-.086.004-.137-.027-.129-.12.008-.106-.047-.153-.152-.145-.086.008-.117-.035-.113-.117 0-.18-.004-.36 0-.54.004-.113-.04-.167-.153-.16-.066.004-.117-.007-.129-.093-.023-.184-.05-.196-.238-.153m13.75.067c0-.446.004-.89 0-1.332 0-.082.008-.153.113-.153.121 0 .157-.07.157-.18-.004-.171 0-.343 0-.515 0-.062.011-.113.09-.113.144 0 .18-.086.171-.207-.004-.059.004-.117 0-.172-.007-.102.02-.16.133-.164.098-.004.137-.067.137-.16l.004-.25c.004-.082.031-.133.125-.13.11.008.156-.054.148-.152-.008-.093.035-.113.117-.113.106 0 .157-.059.153-.168-.004-.078.004-.156 0-.234 0-.082.02-.137.117-.137.102 0 .156-.055.148-.156-.007-.094.036-.13.121-.13.094 0 .153-.034.145-.14-.004-.086.04-.12.121-.113.11.008.156-.05.152-.152-.003-.09.036-.13.125-.13.067 0 .137-.019.137-.093-.004-.184.117-.184.246-.176.047.004.094 0 .145 0 .074-.004.144-.023.144-.117 0-.086-.074-.102-.14-.102-.09.004-.117-.039-.114-.12.004-.094 0-.192 0-.29-.004-.054-.02-.12-.082-.113-.207.016-.195-.117-.187-.254.004-.055-.008-.105-.008-.16 0-.094-.039-.149-.14-.14-.083.003-.13-.024-.118-.114.016-.117-.035-.164-.148-.156-.078.008-.13-.028-.125-.114.004-.117-.051-.164-.168-.16-.078.004-.106-.039-.106-.117.004-.09-.004-.183 0-.277q.014-.16-.148-.145c-.09.012-.129-.023-.121-.117.012-.105-.035-.16-.145-.148-.086.007-.133-.036-.129-.121.004-.106-.039-.16-.148-.153-.086.004-.133-.035-.125-.125.012-.105-.047-.144-.14-.144-.098.004-.137-.043-.126-.137.008-.094-.035-.145-.132-.137-.102.008-.141-.039-.133-.14.008-.079-.028-.133-.114-.121-.152.015-.152-.07-.152-.184-.004-.387.067-.356-.379-.356-.086 0-.125.04-.125.13 0 .093-.004.19 0 .288.004.082-.031.125-.117.118-.117-.012-.156.046-.152.156q.009.116-.11.11c-.113-.013-.164.042-.152.152.008.09-.035.12-.117.113-.102-.004-.157.043-.153.152.004.086-.039.13-.128.121-.09-.004-.141.04-.141.133.004.106-.04.152-.149.145-.09-.012-.132.035-.125.125.008.109-.043.148-.148.14-.082-.008-.121.043-.117.121 0 .094-.004.184 0 .278.004.09-.028.144-.125.14-.098 0-.149.04-.145.145q.006.13-.129.125-.145-.006-.144.14c.004.094-.035.137-.133.133-.098-.008-.145.043-.14.14 0 .099-.005.196-.005.294 0 .055-.015.101-.078.098-.183-.008-.195.105-.183.242.004.05-.004.105 0 .156.008.105-.028.16-.14.152-.067-.004-.126.02-.126.102 0 .078.055.105.121.11.098.003.196.007.293.003.082 0 .125.028.117.117-.011.114.043.16.153.153.078 0 .129.03.125.117 0 .105.047.156.152.156q.123-.007.117.121-.004.136.133.137.151-.002.137.148c-.008.067.015.133.094.13.16-.016.183.07.168.199-.004.058.003.113.003.171 0 .11.04.18.16.172.083 0 .122.035.11.121-.012.118.047.164.156.157.082-.008.113.03.113.105q-.001.152.004.305c0 .062.02.125.094.12.18-.015.188.09.176.224-.004.062.004.12 0 .183q-.006.153.14.14c.106-.011.13.036.126.13-.004.168 0 .336.003.5 0 .078.012.164.11.168.144.004.156.082.156.199q-.006.722 0 1.449c0 .203.04.246.215.25.258.004.285-.023.285-.285zm-7.5-.094c-.047-.016-.062-.05-.058-.094.007-.14-.079-.168-.196-.164-.164.004-.332-.004-.5 0-.086 0-.133-.035-.125-.125.012-.121-.058-.156-.16-.156h-.45c-.1 0-.16.055-.16.152q.002.369.008.739c0 .093.047.148.145.144.113-.008.133.055.129.148-.004.172.004.344 0 .516-.004.106.035.156.144.149.09-.004.13.035.125.125-.003.093 0 .187 0 .277.004.062.02.133.09.129.188-.012.184.105.172.234 0 .05.004.098 0 .145q-.007.166.156.168c.09 0 .13.039.13.125q-.007.147.14.148c.086-.004.133.031.129.121q-.005.13.125.14c.078.013.129.052.137.134.007.105.066.152.164.148.09-.004.117.04.113.121-.004.102.047.156.152.149.09-.008.117.043.114.12-.004.098.039.153.14.145s.133.047.13.137c-.005.098.046.133.136.133.09-.004.176 0 .265 0 .082-.004.137.023.133.117-.004.105.055.148.156.148q.148-.004.29.004c.07 0 .109.032.105.102-.012.14.066.176.188.176.25-.004.5 0 .75-.004.085 0 .136.023.132.117-.004.129.075.148.18.148h2.215c.055 0 .105 0 .156-.027.035-.02.067-.043.067-.09 0-.05-.036-.086-.083-.086-.144-.004-.152-.097-.144-.207q.005-.1-.008-.195c-.004-.063-.031-.129-.094-.129-.187 0-.18-.117-.172-.246.004-.055 0-.106-.003-.16 0-.098-.043-.16-.149-.157q-.128 0-.12-.117c.003-.097-.048-.14-.138-.144-.097-.004-.14-.047-.144-.145s-.059-.148-.153-.14c-.085.004-.109-.036-.105-.11.004-.101-.05-.156-.152-.152-.082 0-.121-.04-.125-.121q-.007-.153-.16-.153c-.07-.003-.106-.035-.102-.105 0-.113-.059-.16-.164-.16-.067 0-.11-.031-.106-.106.008-.113-.043-.172-.16-.168q-.11.002-.11-.113.006-.17-.171-.164c-.04 0-.094-.004-.086-.055.02-.144-.062-.203-.18-.25-.03-.011-.074-.05-.078-.082-.027-.148-.133-.152-.25-.144-.054.004-.113-.004-.168 0-.097.004-.152-.028-.144-.133.004-.105-.055-.14-.153-.14-.086 0-.175-.005-.261 0-.086 0-.133-.036-.13-.13.005-.101-.042-.156-.152-.148q-.122.014-.12-.113c.007-.114-.06-.153-.165-.153-.168.004-.336-.004-.5.004-.093 0-.14-.031-.14-.129 0-.109-.067-.14-.164-.14-.098 0-.192-.004-.313-.008m16.137-.195c0-.055-.008-.106-.004-.16.012-.13-.047-.184-.176-.184-.144.004-.289 0-.433.004-.094 0-.153.039-.149.14.008.106-.047.141-.144.137l-.528.004c-.07 0-.14.016-.136.102.011.156-.079.171-.2.16-.054-.004-.113.004-.168 0-.113-.008-.183.031-.175.156.007.086-.036.113-.122.113-.171-.004-.347.004-.523.008-.098 0-.168.027-.16.14.004.098-.043.122-.133.114-.066-.004-.133.023-.133.098.008.183-.105.195-.238.183-.05-.004-.098.004-.145 0-.109-.004-.171.04-.168.153 0 .093-.05.12-.132.117-.086-.004-.168 0-.25 0-.098 0-.153.043-.153.14 0 .094-.043.133-.136.133-.09-.004-.141.055-.137.14 0 .099-.047.134-.137.134q-.146 0-.14.148.003.117-.11.117c-.101-.004-.156.04-.152.149q.007.121-.121.12c-.102-.003-.149.056-.153.153-.004.063-.023.113-.101.113-.098 0-.149.063-.16.157-.012.07-.04.113-.121.11-.11-.009-.16.05-.157.16 0 .073-.031.116-.11.112q-.146.002-.151.145c-.008.086-.043.125-.13.129-.085.008-.14.05-.144.144 0 .083-.031.125-.125.125-.11-.003-.156.063-.16.168 0 .079-.004.157 0 .239.008.09-.02.144-.121.14-.11-.004-.145.063-.145.16.004.055-.004.11.004.16.012.13 0 .239-.176.235-.046 0-.078.035-.082.086 0 .055.036.082.082.09q.07.014.145.015.353.005.71.004h1.5c.087 0 .192.004.2-.105.016-.149.106-.156.219-.16q.35 0 .7-.012c.1 0 .167-.04.163-.156 0-.078.043-.106.117-.106.102.004.203-.008.305-.008.063-.003.121-.027.117-.097-.008-.172.102-.176.223-.164.055.004.105-.004.16 0 .102 0 .16-.04.16-.149-.004-.086.043-.12.13-.125.085-.004.14-.054.14-.144s.043-.125.129-.121c.097.004.148-.055.144-.149-.004-.093.043-.125.13-.125.093.004.148-.043.14-.14 0-.078.043-.114.113-.121.105-.008.16-.06.152-.168q-.005-.114.114-.11c.101 0 .156-.05.156-.152 0-.094.055-.121.137-.113.101.007.144-.043.144-.141-.004-.09.004-.176 0-.266s.024-.144.121-.14c.09.004.125-.051.13-.133.007-.094.015-.192.015-.29 0-.073.027-.112.11-.112.12.003.155-.067.155-.176-.004-.168 0-.336 0-.504-.004-.082.02-.137.114-.133.12.004.16-.07.16-.18-.004-.16 0-.324 0-.511m-13.774-3.715c-.007-.106-.004-.196.145-.188.078.008.121-.047.121-.125q.005-.157.004-.316c-.004-.313.047-.317-.328-.317-.149 0-.297.012-.438-.046.032-.149-.035-.227-.187-.227h-3.149c-.14 0-.18.04-.18.18 0 .168.008.336.008.5l-.003 2.582c-.004.183.023.207.203.207q.377.005.754.004c.082 0 .136.02.132.117-.003.11.063.144.16.14l.278.004c.062 0 .105.02.101.09-.011.172.07.188.215.188h.739c.054 0 .113-.008.125.078.027.187.03.187.218.187.059 0 .114.004.172 0 .102-.011.16.024.145.137-.012.106.043.133.136.129.094 0 .192.004.29.004.078-.004.125.027.117.117-.008.113.05.156.156.152.066 0 .113.024.11.102-.008.129.062.16.179.164.32.008.324 0 .324-.328 0-.113-.043-.172-.152-.164-.11.008-.125-.05-.121-.137l-.004-.277c-.004-.063-.035-.117-.102-.113-.164.011-.168-.086-.168-.211zm13.77 1.629v-2.66c0-.165-.02-.188-.164-.188q-1.56.001-3.125-.004c-.113 0-.176.043-.172.16.004.106-.055.121-.14.121-.165-.004-.325.004-.489-.004-.133-.003-.184.055-.18.184.004.145.008.29.004.434 0 .097.04.152.14.144.099-.008.13.04.13.133q-.006 1.383 0 2.766c0 .086-.02.136-.121.125-.11-.012-.149.054-.149.152 0 .086-.004.168 0 .254.004.094-.035.14-.133.129-.109-.008-.132.05-.136.144-.024.36-.004.352.351.34.086-.004.137-.05.137-.133-.004-.109.055-.136.148-.136.063 0 .122-.028.114-.098-.008-.16.086-.176.21-.168.051.004.106-.004.157 0 .113.008.18-.031.18-.152q.006-.119.129-.114c.09.004.183 0 .277 0 .078 0 .14-.035.133-.125-.004-.125.062-.144.168-.14.234.004.472-.004.71 0 .126.004.204-.043.204-.18 0-.074.039-.102.11-.102q.14 0 .288-.003c.082 0 .14-.032.137-.121 0-.114.066-.137.164-.133h.684c.222-.004.234-.012.234-.227zm-5.66 1.312c.008-.062.047-.101.105-.12.11-.036.156-.114.153-.231v-2.57c0-.075-.012-.145-.106-.153-.105-.008-.105.074-.11.145 0 .082-.027.124-.116.113q-.178-.02-.157.16c.008.09-.023.133-.12.125-.118-.012-.157.05-.15.16.005.078-.003.156 0 .234.009.106-.042.145-.14.137-.09-.004-.176.004-.266 0-.101-.004-.144.047-.144.14v.306c0 .058-.023.101-.082.097-.172-.015-.195.086-.184.223.004.066-.004.133 0 .199.004.082-.03.121-.117.117-.117-.008-.148.063-.148.164.004.172 0 .344 0 .516.004.09-.028.144-.13.137-.1-.008-.14.047-.136.144.004.086-.004.176 0 .262.004.09-.027.133-.121.125q-.148-.011-.148.137c-.004.086-.012.168-.012.25-.008.722.02 1.441 0 2.164-.008.242.008.492.015.734.004.07.02.137.106.145.086.003.098-.059.105-.125.008-.055.024-.11.09-.106.168.012.184-.098.188-.219v-.187c-.004-.082.023-.133.117-.13.098.005.148-.05.148-.144 0-.09.043-.129.13-.132.105-.004.14-.07.14-.164.004-.09.004-.176.008-.266 0-.066.027-.11.101-.106.121.004.168-.058.172-.168 0-.066.035-.093.098-.097.12-.012.16-.09.164-.2q.005-.119.004-.238c0-.054.011-.101.074-.105.172-.008.188-.125.191-.258v-.184c0-.062.024-.101.094-.101.137 0 .176-.082.176-.207-.004-.235 0-.465.008-.723m-4.836-.265c-.035-.047-.031-.102-.031-.153v-.355c-.004-.074-.032-.145-.11-.14-.148.007-.168-.071-.156-.188.004-.063-.004-.121 0-.184 0-.105-.035-.172-.152-.168-.094.004-.122-.043-.118-.129.004-.097 0-.195-.003-.289q-.007-.129-.137-.129c-.094.004-.184-.004-.278.004-.09.004-.132-.027-.128-.121.003-.082 0-.164 0-.25.003-.102-.036-.164-.141-.16-.102.004-.129-.047-.125-.14.004-.075-.027-.134-.11-.134-.12 0-.18-.043-.171-.168.004-.07-.051-.101-.114-.101-.066-.004-.09.043-.097.101-.004.028-.008.051-.008.079-.004.867-.012 1.73.008 2.593.004.098.043.153.144.149.094-.008.117.039.117.129-.003.254.004.507 0 .761 0 .118.036.188.165.18q.121-.004.113.125-.004.141.004.29c0 .062.027.124.093.12.172-.008.176.098.168.219-.003.055 0 .105 0 .16 0 .102.036.172.153.164.086 0 .129.04.125.13 0 .07.023.144.105.14.153-.004.168.082.16.203-.007.05.004.105 0 .156-.004.117.036.188.164.188q.114 0 .11.117c-.004.11.05.164.16.152.082-.004.11.031.11.11 0 .097.007.19.015.289.008.082.047.132.133.136.074.004.125.028.133.11.003.039.023.07.062.074.047.008.074-.02.094-.059.047-.074.043-.16.043-.242q.005-1.33.004-2.66a3 3 0 0 0-.004-.277c-.004-.07-.035-.125-.11-.121-.148.003-.171-.083-.152-.196.04-.219-.047-.379-.238-.515m9.207 6.035c.12.008.219-.008.21-.168 0-.059.044-.082.102-.082.09.004.184 0 .274 0 .11.004.172-.04.164-.153-.004-.101.05-.129.137-.129.07 0 .132-.023.128-.101-.011-.16.083-.168.2-.16.054.004.113-.004.168-.004.113.008.18-.028.175-.153-.003-.074.024-.12.106-.117.113.012.16-.043.16-.152q.001-.121.125-.113c.106.004.156-.051.148-.153-.003-.09.043-.12.122-.117.113 0 .16-.05.152-.164-.004-.074.039-.113.113-.11.11.005.153-.046.149-.152 0-.07.035-.12.113-.113.129.012.172-.059.168-.176-.004-.05.012-.086.078-.097.188-.028.188-.028.188-.22 0-.058.003-.112 0-.171-.004-.094.023-.152.128-.148q.152.007.145-.145c0-.082.031-.133.125-.129q.136.007.137-.133c-.004-.09.035-.136.133-.132.097.003.144-.055.144-.149q.005-.142.004-.289c-.004-.055.012-.086.078-.094.188-.023.188-.027.188-.222 0-.055.003-.106 0-.16-.008-.114.023-.176.152-.165.078.004.11-.043.11-.117.003-.082-.048-.105-.118-.105-.094 0-.184-.004-.277 0s-.14-.028-.133-.13c.008-.1-.05-.14-.148-.136-.086.004-.176-.004-.262 0-.09.004-.145-.027-.137-.129.012-.117-.055-.152-.16-.152-.219 0-.438-.004-.656 0-.184 0-.207.023-.207.203q-.005.497-.004.988c0 .098-.016.176-.14.164-.106-.007-.138.059-.138.153.004.183 0 .367.004.554 0 .055-.008.098-.082.114-.187.03-.187.035-.187.222 0 .055-.004.114 0 .172.008.094-.028.149-.133.14-.098-.003-.137.044-.137.138 0 .093-.004.183 0 .277 0 .082-.023.125-.113.117q-.16-.019-.156.145c.004.093-.032.136-.133.125s-.14.046-.14.14q-.01.142-.005.278c.004.09-.03.132-.12.125-.098-.008-.153.03-.145.136.011.106-.035.14-.137.133-.086-.008-.133.035-.125.125.004.102-.035.145-.14.145-.079-.004-.137.03-.137.12.004.11-.04.16-.157.153-.054-.004-.113.02-.105.086.016.145-.047.195-.184.195-.07 0-.093.067-.086.13.008.062.055.073.106.07.05 0 .098-.004.168-.008m-15.938-1.024c-.039-.015-.05-.05-.047-.086.008-.129-.039-.191-.175-.175-.067.007-.094-.024-.094-.094.004-.098 0-.192 0-.29-.004-.097-.043-.16-.152-.156-.082.004-.122-.03-.118-.117.012-.11-.039-.168-.152-.156-.098.012-.125-.039-.121-.125q.004-.142-.004-.289c0-.066-.027-.121-.098-.113-.16.015-.18-.075-.171-.203.007-.055 0-.114.003-.172.004-.11-.043-.18-.16-.176-.09 0-.11-.043-.11-.125.005-.168 0-.34 0-.512 0-.101-.034-.172-.151-.168-.094.004-.125-.047-.122-.133v-1.082c0-.093-.039-.148-.14-.148-.254.004-.508 0-.766.004-.066 0-.129.027-.125.101.012.168-.09.188-.215.18-.058-.004-.117.004-.172 0-.101-.004-.164.035-.16.145.004.093-.043.125-.129.12q-.144-.004-.289.005c-.066.004-.105.043-.105.109-.004.066.031.11.094.105.172-.011.18.094.168.22-.004.05.004.105 0 .156-.008.109.03.171.148.167.09-.003.121.047.117.133-.008.086 0 .176-.004.262 0 .09.032.148.13.148.093 0 .128.055.144.137.008.082.05.133.14.125.102-.008.141.043.137.14-.004.063.012.126.086.126.172-.008.191.094.18.226-.004.055 0 .106 0 .16-.004.102.043.16.144.16.086 0 .133.024.125.122-.011.097.04.152.137.148.102-.004.145.043.14.14 0 .079.036.13.118.126.113-.004.148.05.144.152 0 .086.047.137.13.13.109-.009.155.03.148.14-.008.086.039.133.129.129.105-.008.14.039.132.14-.007.086.04.13.13.121.109-.008.152.043.148.149-.004.093.054.133.14.129h.29c.05 0 .109.011.101.074-.02.187.098.2.23.191.067 0 .133.012.2.004.086-.008.12.02.113.11-.012.117.05.171.164.16.078-.008.11.027.105.097-.007.141.067.18.188.168.055-.004.105 0 .16 0 .07 0 .14-.004.14-.097.005-.09-.05-.125-.132-.121-.09.004-.133-.032-.129-.125q.012-.146-.14-.145c-.079 0-.141-.023-.133-.117.004-.11-.043-.156-.153-.152-.07.003-.12-.028-.113-.106.012-.148-.082-.176-.223-.176m15.489 8.383c-.086.008-.102.07-.102.14.004.087-.035.134-.125.126-.117-.012-.156.054-.156.16 0 .074-.028.113-.11.11-.12-.009-.16.058-.156.171.004.063 0 .121.004.184.004.09.04.152.145.14.074-.004.12.02.117.102-.012.125.05.18.172.168.078-.004.117.027.11.11-.017.128.046.175.17.163q.08-.006.157 0c.117.008.172-.039.164-.16-.008-.074.02-.117.106-.113q.17.017.164-.16c-.004-.07.031-.11.105-.102.145.02.188-.055.172-.183-.004-.059 0-.118 0-.172.004-.106-.043-.16-.148-.149-.086.004-.137-.027-.133-.12.008-.106-.04-.153-.145-.15-.07.005-.129-.023-.12-.1.015-.153-.071-.177-.196-.169-.055.008-.113.004-.195.004m-7.38.04c-.023.034-.023.073-.019.112q.007.12-.11.114c-.124-.012-.163.047-.155.164.003.07-.032.11-.102.101-.133-.007-.172.063-.168.18.004.059.004.113 0 .172-.008.11.035.168.152.156.063-.008.121.004.114.086-.008.133.062.18.183.176.07 0 .094.039.086.101-.015.133.047.184.176.172a1 1 0 0 1 .172 0c.113.008.164-.039.156-.152-.008-.082.024-.121.113-.121.106.004.164-.047.157-.16-.004-.067.027-.114.097-.11.149.008.18-.074.168-.199-.004-.05-.004-.105-.004-.156.004-.094-.043-.145-.132-.14-.098.003-.141-.036-.133-.13.011-.093-.035-.144-.13-.136-.109.007-.152-.043-.148-.149 0-.062-.02-.117-.093-.12-.121-.005-.246-.028-.38.038m-7.32 1.285c.059.254.059.25.336.25.114-.004.18-.035.172-.16-.008-.074.024-.117.106-.113.12.008.18-.055.175-.172-.003-.078.043-.102.106-.098.117 0 .156-.066.16-.168v-.183c-.008-.094-.047-.153-.148-.145-.082.004-.125-.027-.125-.113q.008-.166-.16-.156c-.075.008-.122-.028-.114-.106.012-.133-.054-.172-.176-.16-.054.004-.113 0-.168 0-.101-.004-.152.035-.144.14 0 .075-.023.13-.113.126-.11-.004-.157.05-.157.16 0 .062-.023.113-.101.105-.14-.015-.176.067-.172.184 0 .05-.004.105-.004.156-.004.113.043.176.164.168.047-.004.113-.004.11.063-.016.18.109.191.253.222m.747-8.433c.042-.13.023-.172-.098-.18a2 2 0 0 0-.25-.004c-.063.004-.09.043-.094.106 0 .062.024.109.086.109.113.004.23.027.355-.031m13.813-.188c-.043.004-.09 0-.133.012-.058.012-.09.05-.086.113 0 .067.047.09.106.094.086.004.172 0 .261 0 .07-.004.098-.047.102-.113.004-.067-.04-.094-.098-.102-.043-.004-.086-.004-.152-.004m0 0"/></g><path d="M82.117 39.523c-.152.172-.191 2.747-.172 9.192l.059 8.945h4.773l.059-9.039c.039-7.113 0-9.078-.191-9.21-.438-.266-4.278-.192-4.528.112m7.621.117c-.21.4-.265 16.895-.054 17.696.093.398.187.418 2.441.418 1.969 0 2.371-.059 2.465-.305.21-.535.133-17.43-.074-17.828-.192-.324-.422-.363-2.391-.363-1.965 0-2.195.039-2.387.383m7.774-.27c-.075.078-.133.992-.133 2.024v1.867h4.793l-.055-1.965-.058-1.945-2.215-.055c-1.203-.02-2.254.02-2.332.074m50.312.152c-.156.172-.21.88-.172 1.965l.055 1.68h4.777l.055-1.793c.04-1.316-.02-1.852-.191-1.965-.133-.074-1.164-.152-2.27-.152-1.512 0-2.101.078-2.254.265m76.512-.152c-.074.078-.133.992-.133 2.024v1.867h4.793l-.055-1.965-.058-1.945-2.215-.055c-1.203-.02-2.254.02-2.332.074m-86.539 1.527c-.059.172-.117 1.145-.117 2.192v1.887h-.84c-.973 0-1.07.136-1.07 1.601 0 1.184.21 1.45 1.183 1.45h.727v2.042c0 1.145.058 2.899.132 3.907l.118 1.87h1.832l.058.895.055.918h5.54l.058-1.316c.039-.934-.02-1.375-.192-1.469-.133-.098-.781-.172-1.449-.172h-1.187l.039-3.3.058-3.278 1.336-.098 1.336-.093v-2.86l-1.336-.097-1.336-.094-.058-2.156-.055-2.133h-2.352c-1.984 0-2.386.054-2.48.304m-88.414 4.215c-.078.055-.137 4.04-.137 8.848 0 8.14.02 8.75.344 8.883.172.097 1.3.133 2.484.097l2.14-.058v-5.13h3.532c2.695 0 3.535-.058 3.555-.245.02-.117.035-.535.054-.899.02-.668.02-.668 1.032-.722l.996-.059v-8.906l-.594-.113a7.4 7.4 0 0 0-1.05-.114c-.419 0-.458-.078-.458-.86v-.858H55.38l-.059.707c-.054.726-.054.726-.953.78l-.918.06v-1.547h-1.97c-1.085 0-2.042.058-2.097.136m9.031 6.235v3.336l-2.023.058c-1.11.035-2.063.02-2.102-.02-.039-.038-.074-1.562-.074-3.394v-3.3h4.2Zm9.32-5.473c-.054.875-.074.914-.629.875a5.6 5.6 0 0 0-.992.059l-.441.078v8.941l1.012.059.996.054.054.918.059.895 4.91-.04 4.906-.054.059-.918.059-.894h2.082v-4.461c0-4.328-.02-4.485-.383-4.598-.211-.074-.668-.094-1.012-.055-.594.055-.613.036-.707-.8l-.098-.86-4.906-.058-4.91-.04Zm6.914 5.492v3.336h-4.007v-6.676h4.007Zm22.864-6.254c-.075.055-.133 2.934-.133 6.387v6.273l2.351-.058 2.329-.055.058-6.351.035-6.332h-2.25c-1.242 0-2.332.058-2.39.136m6.972 6.196.059 6.351h4.773l.059-4.824.04-4.809h4.007l.039 4.809.059 4.824h4.773l.059-5.379.039-5.379-.996-.054-1.012-.059-.055-.914-.058-.898-3.094.039-3.094.058-.059.703-.058.727h-1.89v-1.527h-3.63Zm17-4.864.055 1.489 3.785.058 3.781.035-.058.918-.059.895-3.148.097-3.153.094-.019.762v.766l-.973.054c-.824.04-.996.133-1.09.477-.152.555-.152 1.773 0 2.879l.133.879h1.832l.059.894.058.918 2.922.055 2.903.058v-1.562l.918.055c.898.058.898.058.953.761l.058.727h3.61V46.922l-.574-.133c-.305-.074-.649-.074-.743-.02-.441.29-.785-.132-.785-.953v-.84h-10.523Zm7.602 7.399v.86h-3.629v-1.716h3.629Zm18.621-8.637c-.055.133-.074 2.992-.055 6.352l.055 6.101h4.777V45.074l-2.351-.058c-1.778-.04-2.367.02-2.426.191m9.168 0a5.3 5.3 0 0 0-.133.914c-.058.668-.058.668-1.07.727l-.992.054.039 4.426.054 4.422.997.059.992.058.058.895.055.898 4.93.055 4.906.039v-1.906h2.101v-8.961h-.742c-1.207 0-1.36-.137-1.36-1.07v-.84h-4.866c-3.746 0-4.91.058-4.969.23m6.973 6.16v3.336h-4.012v-6.676h4.012Zm7.179-6.234c-.054.113-.035 8.406.059 11.894l.02.727h2.367c1.988 0 2.386-.059 2.484-.305.059-.172.113-2.347.113-4.863v-4.574l1.97.054 1.948.059.094 4.766.098 4.77h4.773V46.98l-.957-.094-.953-.098-.094-.855-.097-.86-3.094-.058-3.113-.04v1.528h-1.91v-1.527h-1.798c-.992 0-1.851.078-1.91.156m18.321.075a5 5 0 0 0-.137.914c-.055.668-.055.668-1.05.727l-1.013.054v1.891c0 1.027.059 2 .118 2.172.074.23.379.305 1.03.305h.934l.06.8.058.82 2.73.06 2.711.058v1.695h-3.57c-1.989 0-3.707.074-3.84.172-.172.094-.23.535-.191 1.469l.058 1.316h10.313l.058-.898.055-.895.996-.058.992-.059.059-1.617c.074-2.367.035-2.48-1.11-2.48h-.937l-.055-.821-.058-.8-2.77-.094-2.77-.098v-1.715l3.516-.059c1.95-.02 3.61-.113 3.723-.207.133-.117.191-.726.152-1.527l-.074-1.355h-4.95c-3.8 0-4.984.058-5.038.23m19.902 0c-.04.133-.04.8.035 1.488l.117 1.239 3.684.058 3.668.035v1.91h-6.3v1.715h-2.102v4.176l1.011.059.992.054.06.918.054.914 2.906-.058 2.902-.055.059-.726c.055-.707.074-.707.894-.707.825 0 .844 0 .899.707l.059.726 1.87.055 1.852.058V52.32c0-4.215-.055-5.433-.226-5.453-.137-.02-.594-.039-1.012-.058-.766-.02-.766-.02-.863-.875l-.094-.86-5.176-.058c-4.05-.04-5.215 0-5.289.191m7.504 8.637v.879l-1.758-.059-1.773-.055-.059-.535c-.113-1.011 0-1.086 1.871-1.086h1.719Zm7.449-2.477v6.387h4.719l.113-2.156a67 67 0 0 0 0-8.293l-.113-2.328h-4.719Zm-22.137 2.27c-.152.172-.21.894-.171 2.133l.058 1.89 2.063.055 2.062.058-.058-2.156-.055-2.152-1.836-.059c-1.414-.039-1.89.02-2.063.23m0 0"/></svg>';
244
+
245
+ // src/compositions/AppHeader.tsx
246
+ var import_jsx_runtime3 = require("react/jsx-runtime");
247
+ var brandWordmarkMaskUrl = `url('${logo_wordmark_default}')`;
248
+ var brandWordmarkMask = {
249
+ WebkitMaskImage: brandWordmarkMaskUrl,
250
+ WebkitMaskPosition: "center",
251
+ WebkitMaskRepeat: "no-repeat",
252
+ WebkitMaskSize: "contain",
253
+ maskImage: brandWordmarkMaskUrl,
254
+ maskPosition: "center",
255
+ maskRepeat: "no-repeat",
256
+ maskSize: "contain"
328
257
  };
329
- function Button({
330
- as,
258
+ function scrollTopFor(target) {
259
+ return target === window ? window.scrollY : target.scrollTop;
260
+ }
261
+ function AppHeader({
331
262
  children,
332
- theme,
333
- intent,
334
- size,
263
+ navLabel,
264
+ autoHide = false,
265
+ scrollTargetRef,
266
+ brandHref = "https://pollinations.ai",
267
+ brandLabel = "Pollinations",
335
268
  className,
336
- disabled,
337
- ...buttonProps
269
+ innerClassName,
270
+ navClassName
338
271
  }) {
339
- const Component = as || "button";
340
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
341
- Component,
272
+ const [hidden, setHidden] = (0, import_react.useState)(false);
273
+ (0, import_react.useEffect)(() => {
274
+ if (!autoHide || typeof window === "undefined") {
275
+ setHidden(false);
276
+ return;
277
+ }
278
+ const target = scrollTargetRef?.current ?? window;
279
+ let lastScrollTop = scrollTopFor(target);
280
+ let frameId = 0;
281
+ const handleScroll = () => {
282
+ if (frameId) return;
283
+ frameId = window.requestAnimationFrame(() => {
284
+ frameId = 0;
285
+ const nextScrollTop = scrollTopFor(target);
286
+ const delta = nextScrollTop - lastScrollTop;
287
+ if (nextScrollTop < 16) {
288
+ setHidden(false);
289
+ } else if (delta > 8) {
290
+ setHidden(true);
291
+ } else if (delta < -8) {
292
+ setHidden(false);
293
+ }
294
+ lastScrollTop = nextScrollTop;
295
+ });
296
+ };
297
+ target.addEventListener("scroll", handleScroll, { passive: true });
298
+ return () => {
299
+ if (frameId) window.cancelAnimationFrame(frameId);
300
+ target.removeEventListener("scroll", handleScroll);
301
+ };
302
+ }, [autoHide, scrollTargetRef]);
303
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
304
+ "header",
342
305
  {
343
- "data-theme": intent ? void 0 : theme,
344
- "data-intent": intent,
345
- className: buttonClasses({
346
- theme,
347
- intent,
348
- size,
349
- className,
350
- disabled
351
- }),
352
- disabled,
353
- ...buttonProps,
354
- children
306
+ className: cn(
307
+ "polli:sticky polli:top-0 polli:z-30 polli:border-b polli:border-theme-border polli:bg-surface-white polli:py-4 polli:backdrop-blur",
308
+ "polli:transition-transform polli:duration-200 polli:ease-out",
309
+ autoHide && "polli:will-change-transform",
310
+ hidden ? "polli:-translate-y-full" : "polli:translate-y-0",
311
+ className
312
+ ),
313
+ onFocusCapture: () => setHidden(false),
314
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
315
+ "div",
316
+ {
317
+ className: cn(
318
+ "polli:mx-auto polli:flex polli:w-full polli:max-w-5xl polli:flex-col polli:gap-4 polli:px-4 polli:sm:flex-row polli:sm:items-center polli:sm:justify-between polli:sm:px-6",
319
+ innerClassName
320
+ ),
321
+ children: [
322
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
323
+ "a",
324
+ {
325
+ href: brandHref,
326
+ target: "_blank",
327
+ rel: "noopener noreferrer",
328
+ className: "polli:inline-flex polli:shrink-0 polli:items-center polli:text-theme-text-strong",
329
+ children: [
330
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "polli:sr-only", children: brandLabel }),
331
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
332
+ "span",
333
+ {
334
+ "aria-hidden": "true",
335
+ className: "polli:block polli:h-7 polli:w-[220px] polli:max-w-full polli:bg-current",
336
+ style: brandWordmarkMask
337
+ }
338
+ )
339
+ ]
340
+ }
341
+ ),
342
+ children ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
343
+ "nav",
344
+ {
345
+ "aria-label": navLabel,
346
+ className: cn(
347
+ "polli:flex polli:min-w-0 polli:flex-wrap polli:gap-2",
348
+ navClassName
349
+ ),
350
+ children
351
+ }
352
+ ) : null
353
+ ]
354
+ }
355
+ )
355
356
  }
356
357
  );
357
358
  }
358
359
 
359
- // src/primitives/ButtonGroup.tsx
360
- var import_jsx_runtime3 = require("react/jsx-runtime");
361
- var ButtonGroup = ({
362
- wrap = true,
363
- className,
364
- children,
365
- role = "group",
366
- ...rest
367
- }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
368
- "div",
369
- {
370
- ...rest,
371
- role,
372
- className: cn2(
373
- "polli:flex polli:min-w-0 polli:items-center polli:gap-1.5",
374
- wrap ? "polli:flex-wrap" : "polli:flex-nowrap",
360
+ // src/primitives/ScrollArea.tsx
361
+ var import_react2 = require("react");
362
+ var import_jsx_runtime4 = require("react/jsx-runtime");
363
+ var axisClasses = {
364
+ y: "polli:overflow-y-auto polli:overflow-x-hidden",
365
+ x: "polli:overflow-x-auto polli:overflow-y-hidden"
366
+ };
367
+ function assignRef(ref, value) {
368
+ if (typeof ref === "function") ref(value);
369
+ else if (ref) ref.current = value;
370
+ }
371
+ var ScrollArea = (0, import_react2.forwardRef)(
372
+ ({ theme, axis = "y", className, children, ...rest }, externalRef) => {
373
+ const innerRef = (0, import_react2.useRef)(null);
374
+ const setRef = (0, import_react2.useCallback)(
375
+ (node) => {
376
+ innerRef.current = node;
377
+ assignRef(externalRef, node);
378
+ },
379
+ [externalRef]
380
+ );
381
+ (0, import_react2.useEffect)(() => {
382
+ const element = innerRef.current;
383
+ if (!element) return;
384
+ let hideTimer = null;
385
+ const clearHideTimer = () => {
386
+ if (hideTimer !== null) {
387
+ window.clearTimeout(hideTimer);
388
+ hideTimer = null;
389
+ }
390
+ };
391
+ const show = () => {
392
+ element.dataset.scrollbarActive = "true";
393
+ clearHideTimer();
394
+ };
395
+ const hide = () => {
396
+ element.dataset.scrollbarActive = "false";
397
+ clearHideTimer();
398
+ };
399
+ const scheduleHide = () => {
400
+ clearHideTimer();
401
+ hideTimer = window.setTimeout(hide, 2e3);
402
+ };
403
+ const handleInteraction = () => {
404
+ show();
405
+ scheduleHide();
406
+ };
407
+ hide();
408
+ element.addEventListener("scroll", handleInteraction, {
409
+ passive: true
410
+ });
411
+ element.addEventListener("wheel", handleInteraction, {
412
+ passive: true
413
+ });
414
+ element.addEventListener("touchstart", handleInteraction, {
415
+ passive: true
416
+ });
417
+ element.addEventListener("pointerdown", handleInteraction);
418
+ element.addEventListener("keydown", handleInteraction);
419
+ element.addEventListener("focusin", handleInteraction);
420
+ element.addEventListener("focusout", scheduleHide);
421
+ return () => {
422
+ clearHideTimer();
423
+ element.removeEventListener("scroll", handleInteraction);
424
+ element.removeEventListener("wheel", handleInteraction);
425
+ element.removeEventListener("touchstart", handleInteraction);
426
+ element.removeEventListener("pointerdown", handleInteraction);
427
+ element.removeEventListener("keydown", handleInteraction);
428
+ element.removeEventListener("focusin", handleInteraction);
429
+ element.removeEventListener("focusout", scheduleHide);
430
+ };
431
+ }, []);
432
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
433
+ "div",
434
+ {
435
+ ...rest,
436
+ ref: setRef,
437
+ "data-theme": theme,
438
+ className: cn(
439
+ "polli-scrollbar-subtle polli:min-w-0 polli:max-w-full",
440
+ axisClasses[axis],
441
+ className
442
+ ),
443
+ children
444
+ }
445
+ );
446
+ }
447
+ );
448
+ ScrollArea.displayName = "ScrollArea";
449
+
450
+ // src/compositions/CodeBlock.tsx
451
+ var import_jsx_runtime5 = require("react/jsx-runtime");
452
+ var CodeBlock = ({
453
+ code,
454
+ theme,
455
+ codeClassName,
456
+ className,
457
+ ...rest
458
+ }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
459
+ ScrollArea,
460
+ {
461
+ ...rest,
462
+ theme,
463
+ axis: "x",
464
+ className: cn(
465
+ "polli:rounded-lg polli:border polli:border-theme-border polli:bg-theme-bg-pale",
375
466
  className
376
467
  ),
377
- children
468
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
469
+ "pre",
470
+ {
471
+ className: cn(
472
+ "polli:p-4 polli:font-mono polli:text-xs polli:leading-6 polli:text-theme-text-strong",
473
+ codeClassName
474
+ ),
475
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("code", { children: code })
476
+ }
477
+ )
378
478
  }
379
479
  );
380
480
 
381
481
  // src/primitives/ChevronIcon.tsx
382
- var import_jsx_runtime4 = require("react/jsx-runtime");
383
- var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
482
+ var import_jsx_runtime6 = require("react/jsx-runtime");
483
+ var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
384
484
  "svg",
385
485
  {
386
486
  "aria-hidden": "true",
387
487
  width: "12",
388
488
  height: "12",
389
489
  viewBox: "0 0 12 12",
390
- className: cn2(
490
+ className: cn(
391
491
  "polli:shrink-0 polli:transition-transform polli:duration-200 polli:ease-out",
392
492
  expanded && "polli:rotate-180",
393
493
  className
394
494
  ),
395
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
495
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
396
496
  "path",
397
497
  {
398
498
  d: "M3 4.5 6 7.5l3-3",
@@ -406,48 +506,8 @@ var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_ru
406
506
  }
407
507
  );
408
508
 
409
- // src/primitives/Chip.tsx
410
- var import_jsx_runtime5 = require("react/jsx-runtime");
411
- var chipSizes = {
412
- sm: "polli:px-2 polli:py-0.5 polli:text-xs",
413
- md: "polli:px-2.5 polli:py-0.5 polli:text-sm",
414
- lg: "polli:px-3 polli:py-1 polli:text-sm"
415
- };
416
- var intentClasses3 = {
417
- news: "polli:bg-intent-news-bg-light polli:text-intent-news-text",
418
- alpha: "polli:bg-intent-alpha-bg-light polli:text-intent-alpha-text",
419
- neutral: "polli:border polli:border-gray-400/70 polli:bg-gray-100/80 polli:text-gray-900",
420
- success: "polli:border polli:border-intent-success-border polli:bg-intent-success-bg-light polli:text-intent-success-text",
421
- warning: "polli:border polli:border-intent-warning-border polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
422
- danger: "polli:border polli:border-intent-danger-border polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
423
- };
424
- var Chip = ({
425
- theme,
426
- intent,
427
- size = "md",
428
- className,
429
- children,
430
- ...rest
431
- }) => {
432
- const intentClass = intent ? intentClasses3[intent] : "polli:bg-theme-bg-active polli:text-theme-text-strong";
433
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
434
- "span",
435
- {
436
- ...rest,
437
- "data-theme": theme,
438
- className: cn2(
439
- "polli:inline-flex polli:shrink-0 polli:items-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-normal",
440
- chipSizes[size],
441
- intentClass,
442
- className
443
- ),
444
- children
445
- }
446
- );
447
- };
448
-
449
- // src/primitives/Collapsible.tsx
450
- var import_jsx_runtime6 = require("react/jsx-runtime");
509
+ // src/compositions/Collapsible.tsx
510
+ var import_jsx_runtime7 = require("react/jsx-runtime");
451
511
  var Collapsible = ({
452
512
  label,
453
513
  expanded,
@@ -459,16 +519,16 @@ var Collapsible = ({
459
519
  focusClassName,
460
520
  panelClassName = "polli:border-t polli:border-theme-border polli:px-3 polli:pt-3 polli:pb-3",
461
521
  ariaLabel
462
- }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
522
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
463
523
  "div",
464
524
  {
465
- className: cn2(
525
+ className: cn(
466
526
  "polli:rounded-lg polli:border polli:transition-all",
467
527
  wrapperClassName,
468
528
  disabled && "polli:opacity-50"
469
529
  ),
470
530
  children: [
471
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
531
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
472
532
  "button",
473
533
  {
474
534
  type: "button",
@@ -476,7 +536,7 @@ var Collapsible = ({
476
536
  "aria-label": ariaLabel,
477
537
  disabled,
478
538
  onClick: onToggle,
479
- className: cn2(
539
+ className: cn(
480
540
  "polli-control polli:w-full polli:flex polli:items-center polli:gap-3 polli:px-3 polli:py-2 polli:text-left polli:transition-colors",
481
541
  expanded ? "polli:rounded-t-lg" : "polli:rounded-lg",
482
542
  !disabled && hoverClassName,
@@ -484,8 +544,8 @@ var Collapsible = ({
484
544
  disabled ? "polli:cursor-not-allowed" : "polli:cursor-pointer"
485
545
  ),
486
546
  children: [
487
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "polli:flex-1 polli:min-w-0", children: label }),
488
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
547
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "polli:flex-1 polli:min-w-0", children: label }),
548
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
489
549
  ChevronIcon,
490
550
  {
491
551
  expanded,
@@ -495,17 +555,17 @@ var Collapsible = ({
495
555
  ]
496
556
  }
497
557
  ),
498
- expanded && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: panelClassName, children })
558
+ expanded && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: panelClassName, children })
499
559
  ]
500
560
  }
501
561
  );
502
562
 
503
- // src/primitives/CopyButton.tsx
504
- var import_react3 = require("react");
563
+ // src/compositions/CopyButton.tsx
564
+ var import_react4 = require("react");
505
565
 
506
566
  // src/primitives/Tooltip.tsx
507
- var import_react2 = require("react");
508
- var import_jsx_runtime7 = require("react/jsx-runtime");
567
+ var import_react3 = require("react");
568
+ var import_jsx_runtime8 = require("react/jsx-runtime");
509
569
  var TOOLTIP_MAX_WIDTH = 288;
510
570
  var TOOLTIP_VIEWPORT_MARGIN = 12;
511
571
  var Tooltip = ({
@@ -518,13 +578,13 @@ var Tooltip = ({
518
578
  triggerAs = "button",
519
579
  displayContents = false
520
580
  }) => {
521
- const [showTooltip, setShowTooltip] = (0, import_react2.useState)(false);
522
- const [tooltipPosition, setTooltipPosition] = (0, import_react2.useState)({
581
+ const [showTooltip, setShowTooltip] = (0, import_react3.useState)(false);
582
+ const [tooltipPosition, setTooltipPosition] = (0, import_react3.useState)({
523
583
  top: 0,
524
584
  left: 0,
525
585
  maxWidth: TOOLTIP_MAX_WIDTH
526
586
  });
527
- const triggerRef = (0, import_react2.useRef)(null);
587
+ const triggerRef = (0, import_react3.useRef)(null);
528
588
  const updateTooltipPosition = () => {
529
589
  if (triggerRef.current) {
530
590
  const rect = triggerRef.current.getBoundingClientRect();
@@ -546,15 +606,15 @@ var Tooltip = ({
546
606
  });
547
607
  }
548
608
  };
549
- const triggerClassName = cn2(
609
+ const triggerClassName = cn(
550
610
  "polli-control polli:relative polli:cursor-help polli:text-left polli:inline-flex polli:items-center",
551
611
  className
552
612
  );
553
613
  const cursorClass = displayContents ? "polli:contents" : "polli:cursor-help";
554
614
  const popupClasses = "polli:fixed polli:w-max polli:px-2 polli:py-1 polli:bg-theme-bg-pale polli:text-theme-text-strong polli:border polli:border-theme-border polli:text-xs polli:rounded-md polli:shadow-sm polli:z-50 polli:pointer-events-none polli:transition-opacity polli:whitespace-pre-line polli:break-words";
555
- const contentNode = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
556
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cursorClass, children }),
557
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
615
+ const contentNode = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
616
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cursorClass, children }),
617
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
558
618
  "span",
559
619
  {
560
620
  style: {
@@ -589,7 +649,7 @@ var Tooltip = ({
589
649
  style
590
650
  };
591
651
  if (triggerAs === "span") {
592
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
652
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
593
653
  "span",
594
654
  {
595
655
  ref: (node) => {
@@ -600,7 +660,7 @@ var Tooltip = ({
600
660
  }
601
661
  );
602
662
  }
603
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
663
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
604
664
  "button",
605
665
  {
606
666
  ref: (node) => {
@@ -618,8 +678,8 @@ var Tooltip = ({
618
678
  );
619
679
  };
620
680
 
621
- // src/primitives/CopyButton.tsx
622
- var import_jsx_runtime8 = require("react/jsx-runtime");
681
+ // src/compositions/CopyButton.tsx
682
+ var import_jsx_runtime9 = require("react/jsx-runtime");
623
683
  function CopyButton({
624
684
  value,
625
685
  children,
@@ -632,9 +692,9 @@ function CopyButton({
632
692
  onCopyError,
633
693
  ...buttonProps
634
694
  }) {
635
- const [copied, setCopied] = (0, import_react3.useState)(false);
636
- const timeoutRef = (0, import_react3.useRef)(null);
637
- (0, import_react3.useEffect)(
695
+ const [copied, setCopied] = (0, import_react4.useState)(false);
696
+ const timeoutRef = (0, import_react4.useRef)(null);
697
+ (0, import_react4.useEffect)(
638
698
  () => () => {
639
699
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
640
700
  },
@@ -656,20 +716,20 @@ function CopyButton({
656
716
  onCopyError?.(error);
657
717
  }
658
718
  }
659
- const button = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
719
+ const button = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
660
720
  "button",
661
721
  {
662
722
  ...buttonProps,
663
723
  type: "button",
664
724
  onClick: handleCopy,
665
- className: cn2(
725
+ className: cn(
666
726
  "polli-control",
667
727
  typeof className === "function" ? className(copied) : className
668
728
  ),
669
729
  children: typeof children === "function" ? children(copied) : children
670
730
  }
671
731
  );
672
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
732
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
673
733
  Tooltip,
674
734
  {
675
735
  triggerAs: "span",
@@ -680,178 +740,65 @@ function CopyButton({
680
740
  );
681
741
  }
682
742
 
683
- // src/primitives/Dialog.tsx
684
- var import_dialog = require("@ark-ui/react/dialog");
685
- var import_portal = require("@ark-ui/react/portal");
686
- var import_react4 = require("react");
687
- var import_jsx_runtime9 = require("react/jsx-runtime");
688
- var sizeClasses = {
689
- sm: "polli:max-w-md",
690
- md: "polli:max-w-xl",
691
- lg: "polli:max-w-2xl"
743
+ // src/primitives/Button.tsx
744
+ var import_jsx_runtime10 = require("react/jsx-runtime");
745
+ var sizes = {
746
+ sm: "polli:px-2 polli:pt-0.5 polli:pb-1",
747
+ md: "polli:px-4 polli:pt-1.5 polli:pb-2",
748
+ lg: "polli:px-6 polli:py-3"
692
749
  };
693
- var Dialog = ({
694
- open,
695
- onOpenChange,
696
- trigger,
697
- triggerAsChild = false,
698
- triggerClassName,
699
- title,
700
- titleClassName,
701
- ariaLabel,
702
- labelledBy,
703
- theme = "blue",
704
- size = "md",
705
- showBackdrop = true,
706
- backdropClassName,
707
- positionerClassName,
708
- contentClassName,
709
- children
750
+ var themeClasses = "polli:bg-theme-bg-active polli:text-theme-text-base polli:hover:bg-theme-bg-hover polli:transition-colors";
751
+ var intentClasses2 = {
752
+ danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text polli:hover:bg-intent-danger-bg-hover polli:transition-colors"
753
+ };
754
+ var buttonClasses = ({
755
+ theme: _theme,
756
+ intent,
757
+ size,
758
+ className,
759
+ disabled
710
760
  }) => {
711
- const contentRef = (0, import_react4.useRef)(null);
712
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
713
- import_dialog.Dialog.Root,
714
- {
715
- open,
716
- initialFocusEl: () => contentRef.current,
717
- onOpenChange: (details) => onOpenChange?.(details.open),
718
- children: [
719
- trigger && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
720
- import_dialog.Dialog.Trigger,
721
- {
722
- asChild: triggerAsChild,
723
- className: triggerClassName,
724
- children: trigger
725
- }
726
- ),
727
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_portal.Portal, { children: [
728
- showBackdrop && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
729
- import_dialog.Dialog.Backdrop,
730
- {
731
- className: cn2(
732
- "polli:fixed polli:inset-0 polli:z-[100] polli:bg-gray-950/50",
733
- backdropClassName
734
- )
735
- }
736
- ),
737
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
738
- import_dialog.Dialog.Positioner,
739
- {
740
- "data-theme": theme,
741
- className: cn2(
742
- "polli:fixed polli:inset-0 polli:z-[110] polli:flex polli:h-dvh polli:items-start polli:justify-center polli:overflow-hidden polli:p-4",
743
- positionerClassName
744
- ),
745
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
746
- import_dialog.Dialog.Content,
747
- {
748
- ref: contentRef,
749
- "data-theme": theme,
750
- "aria-label": ariaLabel,
751
- "aria-labelledby": labelledBy,
752
- className: cn2(
753
- "polli:my-auto polli:w-full polli:overflow-hidden polli:rounded-lg polli:border-2 polli:border-theme-border polli:bg-white polli:shadow-lg polli:outline-none polli:focus:outline-none polli:focus-visible:outline-none",
754
- sizeClasses[size],
755
- contentClassName
756
- ),
757
- children: [
758
- title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
759
- DialogTitle,
760
- {
761
- className: cn2(
762
- "polli:px-6 polli:pt-6 polli:font-subheading polli:text-xl polli:text-theme-text-strong",
763
- titleClassName
764
- ),
765
- children: title
766
- }
767
- ),
768
- children
769
- ]
770
- }
771
- )
772
- }
773
- )
774
- ] })
775
- ]
776
- }
761
+ const colorClasses = intent ? intentClasses2[intent] : themeClasses;
762
+ return cn(
763
+ "polli-control polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:self-center polli:font-medium polli:leading-normal polli:box-border",
764
+ disabled ? "polli:opacity-50 polli:cursor-not-allowed" : "polli:hover:filter polli:hover:brightness-105 polli:cursor-pointer",
765
+ colorClasses,
766
+ sizes[size || "md"],
767
+ className
777
768
  );
778
769
  };
779
- var DialogTitle = import_dialog.Dialog.Title;
780
-
781
- // src/primitives/Dropdown.tsx
782
- var import_popover = require("@ark-ui/react/popover");
783
- var import_portal2 = require("@ark-ui/react/portal");
784
- var import_react5 = require("react");
785
- var import_jsx_runtime10 = require("react/jsx-runtime");
786
- var DEFAULT_PANEL = "polli:rounded-lg polli:border polli:border-theme-border polli:bg-theme-bg-pale polli:shadow-lg";
787
- var Dropdown = ({
770
+ function Button({
771
+ as,
772
+ children,
788
773
  theme,
789
- trigger,
790
- children,
791
- align = "start",
792
- open: openProp,
793
- onOpenChange,
794
- className
795
- }) => {
796
- const [internalOpen, setInternalOpen] = (0, import_react5.useState)(false);
797
- const isControlled = openProp !== void 0;
798
- const open = isControlled ? openProp : internalOpen;
799
- const setOpen = (next) => {
800
- if (!isControlled) setInternalOpen(next);
801
- onOpenChange?.(next);
802
- };
803
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
804
- import_popover.Popover.Root,
805
- {
806
- open,
807
- onOpenChange: (details) => setOpen(details.open),
808
- positioning: {
809
- placement: align === "end" ? "bottom-end" : "bottom-start"
810
- },
811
- children: [
812
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_popover.Popover.Trigger, { asChild: true, children: trigger(open) }),
813
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_portal2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_popover.Popover.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
814
- import_popover.Popover.Content,
815
- {
816
- "data-theme": theme,
817
- className: cn2(
818
- "polli:z-50 polli:overflow-hidden polli:focus:outline-none",
819
- DEFAULT_PANEL,
820
- className
821
- ),
822
- children: typeof children === "function" ? children(() => setOpen(false)) : children
823
- }
824
- ) }) })
825
- ]
826
- }
827
- );
828
- };
829
-
830
- // src/primitives/DropdownItem.tsx
831
- var import_jsx_runtime11 = require("react/jsx-runtime");
832
- function DropdownItem({
833
- as,
774
+ intent,
775
+ size,
834
776
  className,
835
- children,
836
- ...rest
777
+ disabled,
778
+ ...buttonProps
837
779
  }) {
838
780
  const Component = as || "button";
839
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
781
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
840
782
  Component,
841
783
  {
842
- ...Component === "button" ? { type: "button" } : void 0,
843
- ...rest,
844
- className: cn2(
845
- "polli-control polli:flex polli:w-full polli:cursor-pointer polli:items-center polli:gap-2 polli:rounded-lg polli:bg-transparent polli:px-3 polli:py-2 polli:text-left polli:text-sm polli:font-medium polli:text-theme-text-base polli:no-underline polli:transition-colors polli:hover:bg-theme-bg-hover polli:focus-visible:bg-theme-bg-hover",
846
- className
847
- ),
784
+ "data-theme": intent ? void 0 : theme,
785
+ "data-intent": intent,
786
+ className: buttonClasses({
787
+ theme,
788
+ intent,
789
+ size,
790
+ className,
791
+ disabled
792
+ }),
793
+ disabled,
794
+ ...buttonProps,
848
795
  children
849
796
  }
850
797
  );
851
798
  }
852
799
 
853
800
  // src/primitives/icons/index.tsx
854
- var import_jsx_runtime12 = require("react/jsx-runtime");
801
+ var import_jsx_runtime11 = require("react/jsx-runtime");
855
802
  var strokeProps = {
856
803
  fill: "none",
857
804
  stroke: "currentColor",
@@ -860,26 +807,26 @@ var strokeProps = {
860
807
  strokeLinejoin: "round"
861
808
  };
862
809
  function AppIcon(props) {
863
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
864
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "2", y: "4", width: "20", height: "14", rx: "2" }),
865
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M2 20h20" })
810
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
811
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "2", y: "4", width: "20", height: "14", rx: "2" }),
812
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M2 20h20" })
866
813
  ] });
867
814
  }
868
815
  function BeakerIcon(props) {
869
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
870
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M9 3h6" }),
871
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M10 3v6.5L4.5 18a2 2 0 0 0 1.7 3h11.6a2 2 0 0 0 1.7-3L14 9.5V3" }),
872
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M7 14h10" })
816
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
817
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M9 3h6" }),
818
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M10 3v6.5L4.5 18a2 2 0 0 0 1.7 3h11.6a2 2 0 0 0 1.7-3L14 9.5V3" }),
819
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M7 14h10" })
873
820
  ] });
874
821
  }
875
822
  function BookIcon(props) {
876
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
877
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M4 4h5a3 3 0 0 1 3 3v13a2 2 0 0 0-2-2H4z" }),
878
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M20 4h-5a3 3 0 0 0-3 3v13a2 2 0 0 1 2-2h6z" })
823
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
824
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M4 4h5a3 3 0 0 1 3 3v13a2 2 0 0 0-2-2H4z" }),
825
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M20 4h-5a3 3 0 0 0-3 3v13a2 2 0 0 1 2-2h6z" })
879
826
  ] });
880
827
  }
881
828
  function CheckIcon(props) {
882
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
829
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
883
830
  "svg",
884
831
  {
885
832
  "aria-hidden": "true",
@@ -887,24 +834,24 @@ function CheckIcon(props) {
887
834
  ...strokeProps,
888
835
  strokeWidth: 2.5,
889
836
  ...props,
890
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "20 6 9 17 4 12" })
837
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "20 6 9 17 4 12" })
891
838
  }
892
839
  );
893
840
  }
894
841
  function ClipboardIcon(props) {
895
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
896
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
897
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
842
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
843
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
844
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
898
845
  ] });
899
846
  }
900
847
  function ClockIcon(props) {
901
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
902
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
903
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M12 7v5l3 2" })
848
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
849
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
850
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M12 7v5l3 2" })
904
851
  ] });
905
852
  }
906
853
  function DiscordIcon(props) {
907
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
854
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
908
855
  "path",
909
856
  {
910
857
  fill: "currentColor",
@@ -913,23 +860,23 @@ function DiscordIcon(props) {
913
860
  ) });
914
861
  }
915
862
  function DownloadIcon(props) {
916
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
917
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
918
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "7 10 12 15 17 10" }),
919
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
863
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
864
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
865
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "7 10 12 15 17 10" }),
866
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
920
867
  ] });
921
868
  }
922
869
  function ExternalLinkIcon(props) {
923
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M7 17 17 7M9 7h8v8" }) });
870
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M7 17 17 7M9 7h8v8" }) });
924
871
  }
925
872
  function GenApiIcon(props) {
926
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
927
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "m8 3 4 1.5L16 3v18l-4-1.5L8 21z" }),
928
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M8 3v18M16 3v18" })
873
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
874
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "m8 3 4 1.5L16 3v18l-4-1.5L8 21z" }),
875
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M8 3v18M16 3v18" })
929
876
  ] });
930
877
  }
931
878
  function GitHubIcon(props) {
932
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
879
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
933
880
  "path",
934
881
  {
935
882
  fill: "currentColor",
@@ -938,69 +885,79 @@ function GitHubIcon(props) {
938
885
  ) });
939
886
  }
940
887
  function ImageIcon(props) {
941
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
942
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
943
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "9", cy: "9", r: "2" }),
944
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "m21 15-5-5L5 21" })
888
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
889
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
890
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { cx: "9", cy: "9", r: "2" }),
891
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "m21 15-5-5L5 21" })
892
+ ] });
893
+ }
894
+ function AudioIcon(props) {
895
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
896
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M9 18V5l12-2v13" }),
897
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { cx: "6", cy: "18", r: "3" }),
898
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { cx: "18", cy: "16", r: "3" })
945
899
  ] });
946
900
  }
947
901
  function LockIcon(props) {
948
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
949
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
950
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
902
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
903
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
904
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
951
905
  ] });
952
906
  }
953
907
  function MailIcon(props) {
954
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
955
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
956
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "m3 7 9 7 9-7" })
908
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
909
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
910
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "m3 7 9 7 9-7" })
957
911
  ] });
958
912
  }
959
913
  function McpIcon(props) {
960
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
961
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "2", y: "7", width: "8", height: "10", rx: "1.5" }),
962
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "14", y: "7", width: "8", height: "10", rx: "1.5" }),
963
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M10 12h4" })
914
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
915
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "2", y: "7", width: "8", height: "10", rx: "1.5" }),
916
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "14", y: "7", width: "8", height: "10", rx: "1.5" }),
917
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M10 12h4" })
964
918
  ] });
965
919
  }
966
920
  function MenuIcon(props) {
967
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M4 7h16M4 12h16M4 17h16" }) });
921
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M4 7h16M4 12h16M4 17h16" }) });
922
+ }
923
+ function PlusIcon(props) {
924
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M12 5v14M5 12h14" }) });
968
925
  }
969
926
  function TerminalIcon(props) {
970
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
971
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "4 8 8 12 4 16" }),
972
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("line", { x1: "12", y1: "20", x2: "20", y2: "20" })
927
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
928
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "4 8 8 12 4 16" }),
929
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("line", { x1: "12", y1: "20", x2: "20", y2: "20" })
973
930
  ] });
974
931
  }
975
932
  function TokensIcon(props) {
976
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M4 9h16M4 15h16M10 3 8 21M16 3l-2 18" }) });
933
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M4 9h16M4 15h16M10 3 8 21M16 3l-2 18" }) });
977
934
  }
978
935
  function TrendUpIcon(props) {
979
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
980
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "3 17 9 11 13 15 21 7" }),
981
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "15 7 21 7 21 13" })
936
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
937
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "3 17 9 11 13 15 21 7" }),
938
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "15 7 21 7 21 13" })
982
939
  ] });
983
940
  }
984
941
  function WalletIcon(props) {
985
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
986
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M3 7a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2v2H5a2 2 0 0 0-2 2V7Z" }),
987
- /* @__PURE__ */ (0, import_jsx_runtime12.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" }),
988
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "17", cy: "14", r: "1.25", fill: "currentColor" })
942
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
943
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M3 7a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2v2H5a2 2 0 0 0-2 2V7Z" }),
944
+ /* @__PURE__ */ (0, import_jsx_runtime11.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" }),
945
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { cx: "17", cy: "14", r: "1.25", fill: "currentColor" })
989
946
  ] });
990
947
  }
991
948
  function XIcon(props) {
992
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M18 6 6 18M6 6l12 12" }) });
949
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M18 6 6 18M6 6l12 12" }) });
993
950
  }
994
951
 
995
- // src/primitives/ExternalLinkButton.tsx
996
- var import_jsx_runtime13 = require("react/jsx-runtime");
952
+ // src/compositions/ExternalLinkButton.tsx
953
+ var import_jsx_runtime12 = require("react/jsx-runtime");
997
954
  var ExternalLinkButton = ({
998
955
  theme,
999
956
  href,
1000
957
  size = "md",
1001
958
  className,
1002
959
  children
1003
- }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
960
+ }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1004
961
  Button,
1005
962
  {
1006
963
  as: "a",
@@ -1009,10 +966,10 @@ var ExternalLinkButton = ({
1009
966
  rel: "noopener noreferrer",
1010
967
  theme,
1011
968
  size,
1012
- className: cn2("polli:gap-2", className),
969
+ className: cn("polli:gap-2", className),
1013
970
  children: [
1014
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children }),
1015
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
971
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children }),
972
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1016
973
  ExternalLinkIcon,
1017
974
  {
1018
975
  className: "polli:h-4 polli:w-4 polli:shrink-0 polli:opacity-60",
@@ -1023,11 +980,8 @@ var ExternalLinkButton = ({
1023
980
  }
1024
981
  );
1025
982
 
1026
- // src/primitives/Field.tsx
1027
- var import_field = require("@ark-ui/react/field");
1028
-
1029
- // src/primitives/FileUpload.tsx
1030
- var import_react6 = require("react");
983
+ // src/compositions/FileUpload.tsx
984
+ var import_react5 = require("react");
1031
985
 
1032
986
  // src/lib/partition-files.ts
1033
987
  function matchesAccept(file, accept) {
@@ -1065,8 +1019,8 @@ function partitionFiles(incoming, current, { maxFiles, maxSizeBytes, accept }) {
1065
1019
  }
1066
1020
 
1067
1021
  // src/primitives/IconButton.tsx
1068
- var import_jsx_runtime14 = require("react/jsx-runtime");
1069
- var intentClasses4 = {
1022
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1023
+ var intentClasses3 = {
1070
1024
  danger: "polli:bg-intent-danger-bg-light polli:hover:bg-intent-danger-bg-hover polli:text-intent-danger-text"
1071
1025
  };
1072
1026
  var defaultClasses = "polli:bg-theme-bg-active polli:hover:bg-theme-bg-hover polli:text-theme-text-soft polli:hover:text-theme-text-strong";
@@ -1076,7 +1030,7 @@ var IconButton = ({
1076
1030
  onClick,
1077
1031
  children,
1078
1032
  className
1079
- }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1033
+ }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1080
1034
  "button",
1081
1035
  {
1082
1036
  type: "button",
@@ -1084,17 +1038,17 @@ var IconButton = ({
1084
1038
  title,
1085
1039
  "aria-label": title,
1086
1040
  "data-intent": intent,
1087
- className: cn2(
1041
+ className: cn(
1088
1042
  "polli-control polli:inline-flex polli:h-6 polli:w-6 polli:cursor-pointer polli:items-center polli:justify-center polli:rounded polli:transition-colors",
1089
- intent ? intentClasses4[intent] : defaultClasses,
1043
+ intent ? intentClasses3[intent] : defaultClasses,
1090
1044
  className
1091
1045
  ),
1092
1046
  children
1093
1047
  }
1094
1048
  );
1095
1049
 
1096
- // src/primitives/FileUpload.tsx
1097
- var import_jsx_runtime15 = require("react/jsx-runtime");
1050
+ // src/compositions/FileUpload.tsx
1051
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1098
1052
  var PREVIEWABLE_IMAGE_TYPES = /* @__PURE__ */ new Set([
1099
1053
  "image/gif",
1100
1054
  "image/jpeg",
@@ -1102,18 +1056,45 @@ var PREVIEWABLE_IMAGE_TYPES = /* @__PURE__ */ new Set([
1102
1056
  "image/webp"
1103
1057
  ]);
1104
1058
  var PREVIEW_SIZE = 64;
1059
+ var LARGE_PREVIEW_SIZE = 112;
1060
+ var previewSizeClasses = {
1061
+ sm: "polli:h-16 polli:w-16",
1062
+ lg: "polli:h-28 polli:w-28"
1063
+ };
1105
1064
  function isPreviewableImage(file) {
1106
1065
  return PREVIEWABLE_IMAGE_TYPES.has(file.type);
1107
1066
  }
1108
- function PreviewPlaceholder() {
1109
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "polli:flex polli:h-16 polli:w-16 polli:items-center polli:justify-center polli:rounded-lg polli:bg-theme-bg-active polli:text-theme-text-soft", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ImageIcon, { className: "polli:h-5 polli:w-5" }) });
1067
+ function formatFileSize(bytes) {
1068
+ if (bytes < 1024) return `${bytes} B`;
1069
+ if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024)} KB`;
1070
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
1071
+ }
1072
+ function PreviewPlaceholder({
1073
+ icon,
1074
+ size
1075
+ }) {
1076
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1077
+ "div",
1078
+ {
1079
+ className: cn(
1080
+ "polli:flex polli:items-center polli:justify-center polli:rounded-lg polli:bg-theme-bg-active polli:text-theme-text-soft",
1081
+ previewSizeClasses[size]
1082
+ ),
1083
+ children: icon
1084
+ }
1085
+ );
1110
1086
  }
1111
- function FilePreview({ file }) {
1112
- const canvasRef = (0, import_react6.useRef)(null);
1113
- const [canPreview, setCanPreview] = (0, import_react6.useState)(
1087
+ function FilePreview({
1088
+ file,
1089
+ placeholderIcon,
1090
+ size = "sm"
1091
+ }) {
1092
+ const canvasRef = (0, import_react5.useRef)(null);
1093
+ const [canPreview, setCanPreview] = (0, import_react5.useState)(
1114
1094
  () => isPreviewableImage(file)
1115
1095
  );
1116
- (0, import_react6.useEffect)(() => {
1096
+ const previewSize = size === "lg" ? LARGE_PREVIEW_SIZE : PREVIEW_SIZE;
1097
+ (0, import_react5.useEffect)(() => {
1117
1098
  if (!isPreviewableImage(file)) {
1118
1099
  setCanPreview(false);
1119
1100
  return;
@@ -1134,17 +1115,17 @@ function FilePreview({ file }) {
1134
1115
  setCanPreview(false);
1135
1116
  return;
1136
1117
  }
1137
- canvas.width = PREVIEW_SIZE;
1138
- canvas.height = PREVIEW_SIZE;
1118
+ canvas.width = previewSize;
1119
+ canvas.height = previewSize;
1139
1120
  const scale = Math.max(
1140
- PREVIEW_SIZE / bitmap.width,
1141
- PREVIEW_SIZE / bitmap.height
1121
+ previewSize / bitmap.width,
1122
+ previewSize / bitmap.height
1142
1123
  );
1143
1124
  const width = bitmap.width * scale;
1144
1125
  const height = bitmap.height * scale;
1145
- const x = (PREVIEW_SIZE - width) / 2;
1146
- const y = (PREVIEW_SIZE - height) / 2;
1147
- context.clearRect(0, 0, PREVIEW_SIZE, PREVIEW_SIZE);
1126
+ const x = (previewSize - width) / 2;
1127
+ const y = (previewSize - height) / 2;
1128
+ context.clearRect(0, 0, previewSize, previewSize);
1148
1129
  context.drawImage(bitmap, x, y, width, height);
1149
1130
  bitmap.close();
1150
1131
  } catch {
@@ -1155,17 +1136,19 @@ function FilePreview({ file }) {
1155
1136
  return () => {
1156
1137
  cancelled = true;
1157
1138
  };
1158
- }, [file]);
1159
- if (!canPreview) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PreviewPlaceholder, {});
1160
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1139
+ }, [file, previewSize]);
1140
+ if (!canPreview) {
1141
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PreviewPlaceholder, { icon: placeholderIcon, size });
1142
+ }
1143
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1161
1144
  "canvas",
1162
1145
  {
1163
1146
  ref: canvasRef,
1164
1147
  role: "img",
1165
1148
  "aria-label": file.name,
1166
- className: "polli:h-16 polli:w-16 polli:rounded-lg",
1167
- width: PREVIEW_SIZE,
1168
- height: PREVIEW_SIZE
1149
+ className: cn("polli:rounded-lg", previewSizeClasses[size]),
1150
+ width: previewSize,
1151
+ height: previewSize
1169
1152
  }
1170
1153
  );
1171
1154
  }
@@ -1176,11 +1159,17 @@ function FileUpload({
1176
1159
  maxFiles = 4,
1177
1160
  maxSizeBytes = 10 * 1024 * 1024,
1178
1161
  accept = "image/*",
1162
+ icon = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ImageIcon, { className: "polli:h-6 polli:w-6" }),
1163
+ label = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1164
+ "Drag images here or ",
1165
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "polli:underline", children: "browse" })
1166
+ ] }),
1167
+ previewIcon = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ImageIcon, { className: "polli:h-5 polli:w-5" }),
1179
1168
  disabled = false,
1180
1169
  theme,
1181
1170
  className
1182
1171
  }) {
1183
- (0, import_react6.useEffect)(() => {
1172
+ (0, import_react5.useEffect)(() => {
1184
1173
  const prevent = (event) => event.preventDefault();
1185
1174
  document.addEventListener("dragover", prevent);
1186
1175
  document.addEventListener("drop", prevent);
@@ -1199,156 +1188,165 @@ function FileUpload({
1199
1188
  if (accepted.length > 0) onChange([...value, ...accepted]);
1200
1189
  if (rejected.length > 0) onReject?.(rejected);
1201
1190
  }
1202
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1191
+ const hasFiles = value.length > 0;
1192
+ const canAdd = !disabled && value.length < maxFiles;
1193
+ const isSingleFile = maxFiles === 1;
1194
+ const previewSize = isSingleFile ? "lg" : "sm";
1195
+ const inputId = (0, import_react5.useId)();
1196
+ const addInputId = `${inputId}-add`;
1197
+ function handleInputChange(event) {
1198
+ addFiles(Array.from(event.target.files ?? []));
1199
+ event.target.value = "";
1200
+ }
1201
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1203
1202
  "div",
1204
1203
  {
1205
1204
  "data-theme": theme,
1206
- className: cn2("polli:flex polli:flex-col polli:gap-3", className),
1207
- children: [
1208
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1209
- "label",
1210
- {
1211
- className: cn2(
1212
- "polli-control polli:flex polli:flex-col polli:items-center polli:justify-center polli:gap-2",
1213
- "polli:rounded-xl polli:border polli:border-dashed polli:border-theme-border",
1214
- "polli:bg-theme-bg-pale polli:px-4 polli:py-6 polli:text-center polli:text-sm",
1215
- "polli:text-theme-text-soft polli:transition-colors",
1216
- disabled ? "polli:cursor-not-allowed polli:opacity-50" : "polli:cursor-pointer polli:hover:bg-theme-bg-hover"
1217
- ),
1218
- onDragOver: (e) => e.preventDefault(),
1219
- onDrop: (e) => {
1220
- e.preventDefault();
1221
- if (disabled) return;
1222
- addFiles(Array.from(e.dataTransfer.files));
1223
- },
1224
- children: [
1225
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ImageIcon, { className: "polli:h-6 polli:w-6" }),
1226
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
1227
- "Drag images here or",
1228
- " ",
1229
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "polli:underline", children: "browse" })
1230
- ] }),
1231
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1232
- "input",
1233
- {
1234
- type: "file",
1235
- accept,
1236
- multiple: maxFiles > 1,
1237
- disabled,
1238
- className: "polli:sr-only",
1239
- onChange: (e) => {
1240
- addFiles(Array.from(e.target.files ?? []));
1241
- e.target.value = "";
1242
- }
1243
- }
1244
- )
1245
- ]
1246
- }
1247
- ),
1248
- value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "polli:m-0 polli:flex polli:flex-wrap polli:gap-3 polli:p-0", children: value.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1249
- "li",
1250
- {
1251
- className: "polli:relative polli:flex polli:list-none polli:flex-col polli:gap-1",
1252
- children: [
1253
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FilePreview, { file }),
1254
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "polli:max-w-16 polli:truncate polli:text-xs polli:text-theme-text-muted", children: file.name }),
1255
- !disabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "polli:absolute polli:-top-2 polli:-right-2", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1256
- IconButton,
1257
- {
1258
- intent: "danger",
1259
- title: `Remove ${file.name}`,
1260
- onClick: () => onChange(
1261
- value.filter(
1262
- (_, i) => i !== index
1263
- )
1264
- ),
1265
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(XIcon, { className: "polli:h-3 polli:w-3" })
1266
- }
1267
- ) })
1268
- ]
1205
+ className: cn("polli:flex polli:flex-col polli:gap-2", className),
1206
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1207
+ "fieldset",
1208
+ {
1209
+ disabled,
1210
+ className: cn(
1211
+ "polli:m-0",
1212
+ "polli:rounded-xl polli:border polli:border-dashed polli:border-theme-border polli:bg-theme-bg-pale",
1213
+ "polli:px-4 polli:py-4 polli:text-center polli:text-sm",
1214
+ "polli:text-theme-text-soft polli:transition-colors",
1215
+ disabled ? "polli:opacity-50" : "polli:hover:bg-theme-bg-hover"
1216
+ ),
1217
+ onDragOver: (e) => e.preventDefault(),
1218
+ onDrop: (e) => {
1219
+ e.preventDefault();
1220
+ if (disabled) return;
1221
+ addFiles(Array.from(e.dataTransfer.files));
1269
1222
  },
1270
- `${file.name}-${index}`
1271
- )) })
1272
- ]
1223
+ children: !hasFiles ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1224
+ "label",
1225
+ {
1226
+ htmlFor: inputId,
1227
+ className: cn(
1228
+ "polli-control polli:flex polli:min-h-32 polli:flex-col polli:items-center polli:justify-center polli:gap-2 polli:rounded-lg",
1229
+ canAdd ? "polli:cursor-pointer" : "polli:cursor-not-allowed"
1230
+ ),
1231
+ children: [
1232
+ icon,
1233
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: label }),
1234
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1235
+ "input",
1236
+ {
1237
+ id: inputId,
1238
+ type: "file",
1239
+ accept,
1240
+ multiple: maxFiles > 1,
1241
+ disabled: disabled || !canAdd,
1242
+ className: "polli:sr-only",
1243
+ onChange: handleInputChange
1244
+ }
1245
+ )
1246
+ ]
1247
+ }
1248
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "polli:flex polli:flex-col polli:gap-3", children: [
1249
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1250
+ "ul",
1251
+ {
1252
+ className: cn(
1253
+ "polli:m-0 polli:grid polli:grid-cols-[repeat(auto-fill,minmax(5rem,1fr))] polli:gap-3 polli:p-0",
1254
+ isSingleFile && "polli:flex polli:justify-center"
1255
+ ),
1256
+ children: [
1257
+ value.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1258
+ "li",
1259
+ {
1260
+ className: cn(
1261
+ "polli:relative polli:flex polli:min-w-0 polli:list-none polli:flex-col polli:items-center polli:gap-1",
1262
+ isSingleFile && "polli:max-w-full"
1263
+ ),
1264
+ children: [
1265
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1266
+ FilePreview,
1267
+ {
1268
+ file,
1269
+ placeholderIcon: previewIcon,
1270
+ size: previewSize
1271
+ }
1272
+ ),
1273
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1274
+ "span",
1275
+ {
1276
+ className: cn(
1277
+ "polli:max-w-full polli:truncate polli:text-xs polli:font-medium polli:text-theme-text-base",
1278
+ isSingleFile ? "polli:w-36" : "polli:w-16"
1279
+ ),
1280
+ children: file.name
1281
+ }
1282
+ ),
1283
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "polli:text-micro polli:text-theme-text-muted", children: formatFileSize(file.size) }),
1284
+ !disabled && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "polli:absolute polli:-top-2 polli:right-1", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1285
+ IconButton,
1286
+ {
1287
+ intent: "danger",
1288
+ title: `Remove ${file.name}`,
1289
+ onClick: () => onChange(
1290
+ value.filter(
1291
+ (_, i) => i !== index
1292
+ )
1293
+ ),
1294
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(XIcon, { className: "polli:h-3 polli:w-3" })
1295
+ }
1296
+ ) })
1297
+ ]
1298
+ },
1299
+ `${file.name}-${index}`
1300
+ )),
1301
+ !isSingleFile && canAdd && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: "polli:flex polli:list-none", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1302
+ "label",
1303
+ {
1304
+ htmlFor: addInputId,
1305
+ className: "polli-control polli:flex polli:min-h-20 polli:w-full polli:cursor-pointer polli:flex-col polli:items-center polli:justify-center polli:gap-1 polli:rounded-lg polli:bg-theme-bg-active polli:px-3 polli:py-2 polli:text-theme-text-soft polli:transition-colors polli:hover:bg-theme-bg-hover polli:hover:text-theme-text-strong",
1306
+ children: [
1307
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PlusIcon, { className: "polli:h-5 polli:w-5" }),
1308
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "polli:text-xs polli:font-medium", children: "Add" }),
1309
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1310
+ "input",
1311
+ {
1312
+ id: addInputId,
1313
+ type: "file",
1314
+ accept,
1315
+ multiple: true,
1316
+ disabled: disabled || !canAdd,
1317
+ className: "polli:sr-only",
1318
+ onChange: handleInputChange
1319
+ }
1320
+ )
1321
+ ]
1322
+ }
1323
+ ) })
1324
+ ]
1325
+ }
1326
+ ),
1327
+ maxFiles > 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "polli:text-xs polli:text-theme-text-muted", children: [
1328
+ value.length,
1329
+ " / ",
1330
+ maxFiles,
1331
+ " files"
1332
+ ] })
1333
+ ] })
1334
+ }
1335
+ )
1273
1336
  }
1274
1337
  );
1275
1338
  }
1276
1339
 
1277
- // src/primitives/InfoTip.tsx
1278
- var import_jsx_runtime16 = require("react/jsx-runtime");
1340
+ // src/compositions/InfoTip.tsx
1341
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1279
1342
  var InfoTip = ({
1280
1343
  text,
1281
1344
  content,
1282
1345
  label = "More info"
1283
- }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Tooltip, { content: content ?? text, ariaLabel: label, className: "polli:ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "polli:inline-flex polli:h-3.5 polli:w-3.5 polli:items-center polli:justify-center polli:rounded-full polli:border polli:border-theme-border polli:bg-theme-bg-active polli:font-bold polli:text-micro polli:text-theme-text-strong polli:transition-colors", children: "i" }) });
1284
-
1285
- // src/primitives/InlineLink.tsx
1286
- var import_jsx_runtime17 = require("react/jsx-runtime");
1287
- function isExternalHref(href) {
1288
- return typeof href === "string" && /^https?:\/\//.test(href);
1289
- }
1290
- function InlineLink({
1291
- as,
1292
- theme,
1293
- external,
1294
- showIcon = true,
1295
- className,
1296
- children,
1297
- ...linkProps
1298
- }) {
1299
- const Component = as || "a";
1300
- const isExternal = external ?? isExternalHref(linkProps.href);
1301
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1302
- Component,
1303
- {
1304
- "data-theme": theme,
1305
- target: isExternal ? "_blank" : void 0,
1306
- rel: isExternal ? "noopener noreferrer" : void 0,
1307
- className: cn2(
1308
- "polli-control polli:inline-flex polli:items-center polli:gap-1 polli:rounded-sm polli:font-semibold polli:text-theme-text-strong",
1309
- "polli:underline polli:decoration-theme-border polli:decoration-2 polli:underline-offset-3",
1310
- "polli:transition-colors polli:hover:text-theme-text-soft polli:hover:decoration-theme-text-soft",
1311
- className
1312
- ),
1313
- ...linkProps,
1314
- children: [
1315
- children,
1316
- showIcon && isExternal && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1317
- ExternalLinkIcon,
1318
- {
1319
- "aria-hidden": "true",
1320
- className: "polli:h-3.5 polli:w-3.5 polli:shrink-0 polli:opacity-65"
1321
- }
1322
- )
1323
- ]
1324
- }
1325
- );
1326
- }
1327
-
1328
- // src/primitives/Input.tsx
1329
- var import_react7 = require("react");
1330
- var import_jsx_runtime18 = require("react/jsx-runtime");
1331
- var Input = (0, import_react7.forwardRef)(
1332
- ({ className, error, hideNumberSteppers, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1333
- "input",
1334
- {
1335
- ref,
1336
- "data-error": error ? "true" : void 0,
1337
- className: cn2(
1338
- "polli-input polli:px-3 polli:py-2 polli:border polli:rounded-lg",
1339
- "polli:text-gray-950",
1340
- "polli:transition-colors",
1341
- "polli:disabled:opacity-50 polli:disabled:cursor-not-allowed",
1342
- hideNumberSteppers && "polli-input-number-clean",
1343
- className
1344
- ),
1345
- ...props
1346
- }
1347
- )
1348
- );
1346
+ }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Tooltip, { content: content ?? text, ariaLabel: label, className: "polli:ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "polli:inline-flex polli:h-3.5 polli:w-3.5 polli:items-center polli:justify-center polli:rounded-full polli:border polli:border-theme-border polli:bg-theme-bg-active polli:font-bold polli:text-micro polli:text-theme-text-strong polli:transition-colors", children: "i" }) });
1349
1347
 
1350
1348
  // src/primitives/Surface.tsx
1351
- var import_jsx_runtime19 = require("react/jsx-runtime");
1349
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1352
1350
  var variantClasses = {
1353
1351
  panel: "polli:rounded-2xl polli:border polli:border-theme-border polli:bg-theme-bg-subtle polli:p-6",
1354
1352
  card: "polli:rounded-xl polli:bg-surface-white polli:p-4",
@@ -1360,19 +1358,19 @@ var Surface = ({
1360
1358
  className,
1361
1359
  children,
1362
1360
  ...rest
1363
- }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1361
+ }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1364
1362
  "div",
1365
1363
  {
1366
1364
  ...rest,
1367
1365
  "data-theme": theme,
1368
- className: cn2("polli:min-w-0", variantClasses[variant], className),
1366
+ className: cn("polli:min-w-0", variantClasses[variant], className),
1369
1367
  children
1370
1368
  }
1371
1369
  );
1372
1370
 
1373
- // src/primitives/LinkCard.tsx
1374
- var import_jsx_runtime20 = require("react/jsx-runtime");
1375
- function isExternalHref2(href) {
1371
+ // src/compositions/LinkCard.tsx
1372
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1373
+ function isExternalHref(href) {
1376
1374
  return typeof href === "string" && /^https?:\/\//.test(href);
1377
1375
  }
1378
1376
  function LinkCard({
@@ -1386,32 +1384,32 @@ function LinkCard({
1386
1384
  ...linkProps
1387
1385
  }) {
1388
1386
  const Component = as || "a";
1389
- const isExternal = external ?? isExternalHref2(linkProps.href);
1390
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1387
+ const isExternal = external ?? isExternalHref(linkProps.href);
1388
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1391
1389
  Component,
1392
1390
  {
1393
1391
  "data-theme": theme,
1394
1392
  target: isExternal ? "_blank" : void 0,
1395
1393
  rel: isExternal ? "noopener noreferrer" : void 0,
1396
- className: cn2(
1394
+ className: cn(
1397
1395
  "polli:group polli:block polli:h-full polli:rounded-xl polli:outline-none",
1398
1396
  className
1399
1397
  ),
1400
1398
  ...linkProps,
1401
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1399
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1402
1400
  Surface,
1403
1401
  {
1404
1402
  theme,
1405
1403
  variant: "card",
1406
- className: cn2(
1407
- "polli:relative polli:flex polli:h-full polli:flex-col polli:gap-2 polli:bg-white/80 polli:p-5",
1404
+ className: cn(
1405
+ "polli:relative polli:flex polli:h-full polli:flex-col polli:gap-2 polli:bg-surface-opaque/80 polli:p-5",
1408
1406
  showIcon && isExternal && "polli:pr-10",
1409
- "polli:transition polli:group-hover:-translate-y-0.5 polli:group-hover:bg-white/95",
1407
+ "polli:transition polli:group-hover:-translate-y-0.5 polli:group-hover:bg-surface-opaque/95",
1410
1408
  "polli:group-focus-visible:ring-2 polli:group-focus-visible:ring-theme-border",
1411
1409
  surfaceClassName
1412
1410
  ),
1413
1411
  children: [
1414
- showIcon && isExternal && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1412
+ showIcon && isExternal && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1415
1413
  ExternalLinkIcon,
1416
1414
  {
1417
1415
  "aria-hidden": "true",
@@ -1426,41 +1424,41 @@ function LinkCard({
1426
1424
  );
1427
1425
  }
1428
1426
 
1429
- // src/primitives/Markdown.tsx
1427
+ // src/compositions/Markdown.tsx
1430
1428
  var import_react_markdown = __toESM(require("react-markdown"), 1);
1431
1429
  var import_remark_gfm = __toESM(require("remark-gfm"), 1);
1432
- var import_jsx_runtime21 = require("react/jsx-runtime");
1430
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1433
1431
  var components = {
1434
- ul: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1432
+ ul: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1435
1433
  "ul",
1436
1434
  {
1437
1435
  className: "polli:flex polli:min-w-0 polli:list-disc polli:flex-col polli:gap-1 polli:pl-5 polli:marker:text-theme-text-muted",
1438
1436
  ...props
1439
1437
  }
1440
1438
  ),
1441
- ol: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1439
+ ol: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1442
1440
  "ol",
1443
1441
  {
1444
1442
  className: "polli:flex polli:min-w-0 polli:list-decimal polli:flex-col polli:gap-1 polli:pl-5 polli:marker:text-theme-text-muted",
1445
1443
  ...props
1446
1444
  }
1447
1445
  ),
1448
- p: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "polli:mb-2 polli:last:mb-0", ...props }),
1449
- strong: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1446
+ p: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "polli:mb-2 polli:last:mb-0", ...props }),
1447
+ strong: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1450
1448
  "strong",
1451
1449
  {
1452
1450
  className: "polli:font-semibold polli:text-theme-text-strong",
1453
1451
  ...props
1454
1452
  }
1455
1453
  ),
1456
- code: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1454
+ code: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1457
1455
  "code",
1458
1456
  {
1459
1457
  className: "polli:break-words polli:rounded polli:bg-theme-bg-subtle polli:px-1 polli:py-0.5 polli:font-mono polli:text-xs",
1460
1458
  ...props
1461
1459
  }
1462
1460
  ),
1463
- a: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1461
+ a: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1464
1462
  "a",
1465
1463
  {
1466
1464
  target: "_blank",
@@ -1471,110 +1469,101 @@ var components = {
1471
1469
  )
1472
1470
  };
1473
1471
  function Markdown({ children, className }) {
1474
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1472
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1475
1473
  "div",
1476
1474
  {
1477
- className: cn2(
1475
+ className: cn(
1478
1476
  "polli:min-w-0 polli:font-body polli:leading-relaxed",
1479
1477
  className
1480
1478
  ),
1481
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default], components, children })
1479
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default], components, children })
1482
1480
  }
1483
1481
  );
1484
1482
  }
1485
1483
 
1486
- // src/primitives/ScrollArea.tsx
1487
- var import_react8 = require("react");
1488
- var import_jsx_runtime22 = require("react/jsx-runtime");
1489
- var axisClasses = {
1490
- y: "polli:overflow-y-auto polli:overflow-x-hidden",
1491
- x: "polli:overflow-x-auto polli:overflow-y-hidden"
1492
- };
1493
- function assignRef(ref, value) {
1494
- if (typeof ref === "function") ref(value);
1495
- else if (ref) ref.current = value;
1496
- }
1497
- var ScrollArea = (0, import_react8.forwardRef)(
1498
- ({ theme, axis = "y", className, children, ...rest }, externalRef) => {
1499
- const innerRef = (0, import_react8.useRef)(null);
1500
- const setRef = (0, import_react8.useCallback)(
1501
- (node) => {
1502
- innerRef.current = node;
1503
- assignRef(externalRef, node);
1504
- },
1505
- [externalRef]
1506
- );
1507
- (0, import_react8.useEffect)(() => {
1508
- const element = innerRef.current;
1509
- if (!element) return;
1510
- let hideTimer = null;
1511
- const clearHideTimer = () => {
1512
- if (hideTimer !== null) {
1513
- window.clearTimeout(hideTimer);
1514
- hideTimer = null;
1515
- }
1516
- };
1517
- const show = () => {
1518
- element.dataset.scrollbarActive = "true";
1519
- clearHideTimer();
1520
- };
1521
- const hide = () => {
1522
- element.dataset.scrollbarActive = "false";
1523
- clearHideTimer();
1524
- };
1525
- const scheduleHide = () => {
1526
- clearHideTimer();
1527
- hideTimer = window.setTimeout(hide, 2e3);
1528
- };
1529
- const handleInteraction = () => {
1530
- show();
1531
- scheduleHide();
1532
- };
1533
- hide();
1534
- element.addEventListener("scroll", handleInteraction, {
1535
- passive: true
1536
- });
1537
- element.addEventListener("wheel", handleInteraction, {
1538
- passive: true
1539
- });
1540
- element.addEventListener("touchstart", handleInteraction, {
1541
- passive: true
1542
- });
1543
- element.addEventListener("pointerdown", handleInteraction);
1544
- element.addEventListener("keydown", handleInteraction);
1545
- element.addEventListener("focusin", handleInteraction);
1546
- element.addEventListener("focusout", scheduleHide);
1547
- return () => {
1548
- clearHideTimer();
1549
- element.removeEventListener("scroll", handleInteraction);
1550
- element.removeEventListener("wheel", handleInteraction);
1551
- element.removeEventListener("touchstart", handleInteraction);
1552
- element.removeEventListener("pointerdown", handleInteraction);
1553
- element.removeEventListener("keydown", handleInteraction);
1554
- element.removeEventListener("focusin", handleInteraction);
1555
- element.removeEventListener("focusout", scheduleHide);
1556
- };
1557
- }, []);
1558
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1559
- "div",
1560
- {
1561
- ...rest,
1562
- ref: setRef,
1563
- "data-theme": theme,
1564
- className: cn2(
1565
- "polli-scrollbar-subtle polli:min-w-0 polli:max-w-full",
1566
- axisClasses[axis],
1567
- className
1568
- ),
1569
- children
1570
- }
1571
- );
1484
+ // src/compositions/MediaPlaceholder.tsx
1485
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1486
+ var MediaPlaceholder = ({
1487
+ theme,
1488
+ icon,
1489
+ label,
1490
+ detail,
1491
+ action,
1492
+ children,
1493
+ className,
1494
+ ...rest
1495
+ }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1496
+ "div",
1497
+ {
1498
+ ...rest,
1499
+ "data-theme": theme,
1500
+ className: cn(
1501
+ "polli:flex polli:aspect-video polli:min-h-40 polli:flex-col polli:items-center polli:justify-center polli:gap-3 polli:rounded-lg polli:border polli:border-dashed polli:border-theme-border polli:bg-theme-bg-pale polli:p-6 polli:text-center",
1502
+ className
1503
+ ),
1504
+ children: [
1505
+ icon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "polli:flex polli:h-10 polli:w-10 polli:items-center polli:justify-center polli:rounded-full polli:bg-theme-bg-active polli:text-theme-text-base", children: icon }),
1506
+ (label || detail) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "polli:max-w-sm", children: [
1507
+ label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { as: "p", size: "sm", tone: "strong", weight: "semibold", children: label }),
1508
+ detail && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { as: "p", size: "sm", tone: "soft", className: "polli:mt-1", children: detail })
1509
+ ] }),
1510
+ children,
1511
+ action
1512
+ ]
1572
1513
  }
1573
1514
  );
1574
- ScrollArea.displayName = "ScrollArea";
1575
1515
 
1576
- // src/primitives/MultiSelect.tsx
1577
- var import_jsx_runtime23 = require("react/jsx-runtime");
1516
+ // src/primitives/Dropdown.tsx
1517
+ var import_popover = require("@ark-ui/react/popover");
1518
+ var import_portal = require("@ark-ui/react/portal");
1519
+ var import_react6 = require("react");
1520
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1521
+ var DEFAULT_PANEL = "polli:rounded-lg polli:border polli:border-theme-border polli:bg-theme-bg-pale polli:shadow-lg";
1522
+ var Dropdown = ({
1523
+ theme,
1524
+ trigger,
1525
+ children,
1526
+ align = "start",
1527
+ open: openProp,
1528
+ onOpenChange,
1529
+ className
1530
+ }) => {
1531
+ const [internalOpen, setInternalOpen] = (0, import_react6.useState)(false);
1532
+ const isControlled = openProp !== void 0;
1533
+ const open = isControlled ? openProp : internalOpen;
1534
+ const setOpen = (next) => {
1535
+ if (!isControlled) setInternalOpen(next);
1536
+ onOpenChange?.(next);
1537
+ };
1538
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1539
+ import_popover.Popover.Root,
1540
+ {
1541
+ open,
1542
+ onOpenChange: (details) => setOpen(details.open),
1543
+ positioning: {
1544
+ placement: align === "end" ? "bottom-end" : "bottom-start"
1545
+ },
1546
+ children: [
1547
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_popover.Popover.Trigger, { asChild: true, children: trigger(open) }),
1548
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_popover.Popover.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1549
+ import_popover.Popover.Content,
1550
+ {
1551
+ "data-theme": theme,
1552
+ className: cn(
1553
+ "polli:z-50 polli:overflow-hidden polli:focus:outline-none",
1554
+ DEFAULT_PANEL,
1555
+ className
1556
+ ),
1557
+ children: typeof children === "function" ? children(() => setOpen(false)) : children
1558
+ }
1559
+ ) }) })
1560
+ ]
1561
+ }
1562
+ );
1563
+ };
1564
+
1565
+ // src/compositions/MultiSelect.tsx
1566
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1578
1567
  var TRIGGER_BASE = "polli-control polli:inline-flex polli:min-h-8 polli:min-w-[140px] polli:items-center polli:gap-2 polli:rounded-full polli:border polli:px-3 polli:py-1.5 polli:text-xs polli:font-medium polli:transition-all polli:duration-200";
1579
1568
  var ROW_BASE = "polli-control polli:flex polli:w-full polli:items-center polli:gap-3 polli:px-3 polli:py-2 polli:text-left polli:text-xs polli:transition-colors";
1580
1569
  var CHECK_BASE = "polli:flex polli:h-4 polli:w-4 polli:flex-shrink-0 polli:items-center polli:justify-center polli:rounded polli:border polli:border-theme-border polli:text-xs";
@@ -1599,27 +1588,27 @@ var MultiSelect = ({
1599
1588
  };
1600
1589
  const selectAll = () => onChange([]);
1601
1590
  const displayText = disabled ? disabledText : isAllSelected ? "All" : `${selected.length} selected`;
1602
- const labelNode = label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "polli:text-xs polli:font-medium polli:text-theme-text-soft", children: label }) : null;
1591
+ const labelNode = label ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "polli:text-xs polli:font-medium polli:text-theme-text-soft", children: label }) : null;
1603
1592
  if (disabled) {
1604
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1593
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1605
1594
  "div",
1606
1595
  {
1607
1596
  "data-theme": theme,
1608
1597
  className: "polli:group polli:relative polli:flex polli:items-center polli:gap-2",
1609
1598
  children: [
1610
1599
  labelNode,
1611
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1600
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1612
1601
  "button",
1613
1602
  {
1614
1603
  type: "button",
1615
1604
  disabled: true,
1616
- className: cn2(
1605
+ className: cn(
1617
1606
  TRIGGER_BASE,
1618
1607
  "polli:cursor-not-allowed polli:border-theme-border polli:bg-theme-bg-subtle polli:opacity-60"
1619
1608
  ),
1620
1609
  children: [
1621
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "polli:flex-1 polli:truncate polli:text-left polli:text-theme-text-soft/60", children: displayText }),
1622
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1610
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "polli:flex-1 polli:truncate polli:text-left polli:text-theme-text-soft/60", children: displayText }),
1611
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1623
1612
  ChevronIcon,
1624
1613
  {
1625
1614
  expanded: false,
@@ -1629,48 +1618,48 @@ var MultiSelect = ({
1629
1618
  ]
1630
1619
  }
1631
1620
  ),
1632
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "polli:pointer-events-none polli:absolute polli:-top-8 polli:left-1/2 polli:z-[100] polli:-translate-x-1/2 polli:whitespace-nowrap polli:rounded-md polli:border polli:border-theme-border polli:bg-theme-bg-pale polli:px-2 polli:py-1 polli:text-xs polli:text-theme-text-strong polli:opacity-0 polli:shadow-sm polli:transition-opacity polli:group-hover:opacity-100", children: "No items available" })
1621
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "polli:pointer-events-none polli:absolute polli:-top-8 polli:left-1/2 polli:z-[100] polli:-translate-x-1/2 polli:whitespace-nowrap polli:rounded-md polli:border polli:border-theme-border polli:bg-theme-bg-pale polli:px-2 polli:py-1 polli:text-xs polli:text-theme-text-strong polli:opacity-0 polli:shadow-sm polli:transition-opacity polli:group-hover:opacity-100", children: "No items available" })
1633
1622
  ]
1634
1623
  }
1635
1624
  );
1636
1625
  }
1637
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1626
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1638
1627
  "div",
1639
1628
  {
1640
1629
  "data-theme": theme,
1641
1630
  className: "polli:flex polli:items-center polli:gap-2",
1642
1631
  children: [
1643
1632
  labelNode,
1644
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1633
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1645
1634
  Dropdown,
1646
1635
  {
1647
1636
  theme,
1648
1637
  align,
1649
1638
  className: "polli:min-w-[320px]",
1650
- trigger: (open) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1639
+ trigger: (open) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1651
1640
  "button",
1652
1641
  {
1653
1642
  type: "button",
1654
- className: cn2(
1643
+ className: cn(
1655
1644
  TRIGGER_BASE,
1656
1645
  open ? "polli:border-theme-border polli:bg-theme-bg-active" : "polli:border-theme-border polli:bg-theme-bg-subtle polli:hover:bg-theme-bg-pale"
1657
1646
  ),
1658
1647
  children: [
1659
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1648
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1660
1649
  "span",
1661
1650
  {
1662
- className: cn2(
1651
+ className: cn(
1663
1652
  "polli:flex-1 polli:truncate polli:text-left",
1664
1653
  open ? "polli:text-theme-text-strong" : "polli:text-theme-text-base"
1665
1654
  ),
1666
1655
  children: displayText
1667
1656
  }
1668
1657
  ),
1669
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1658
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1670
1659
  ChevronIcon,
1671
1660
  {
1672
1661
  expanded: open,
1673
- className: cn2(
1662
+ className: cn(
1674
1663
  "polli:h-3 polli:w-3 polli:transition-transform",
1675
1664
  open ? "polli:text-theme-text-strong" : "polli:text-theme-text-soft"
1676
1665
  )
@@ -1679,21 +1668,21 @@ var MultiSelect = ({
1679
1668
  ]
1680
1669
  }
1681
1670
  ),
1682
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ScrollArea, { theme, className: "polli:max-h-64", children: [
1683
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1671
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ScrollArea, { theme, className: "polli:max-h-64", children: [
1672
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1684
1673
  "button",
1685
1674
  {
1686
1675
  type: "button",
1687
1676
  onClick: selectAll,
1688
- className: cn2(
1677
+ className: cn(
1689
1678
  ROW_BASE,
1690
1679
  isAllSelected ? "polli:bg-theme-bg-active polli:font-medium polli:text-theme-text-strong" : "polli:text-theme-text-base polli:hover:bg-theme-bg-subtle"
1691
1680
  ),
1692
1681
  children: [
1693
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1682
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1694
1683
  "span",
1695
1684
  {
1696
- className: cn2(
1685
+ className: cn(
1697
1686
  CHECK_BASE,
1698
1687
  isAllSelected && "polli:bg-theme-bg-active polli:text-theme-text-strong"
1699
1688
  ),
@@ -1706,27 +1695,27 @@ var MultiSelect = ({
1706
1695
  ),
1707
1696
  options.map((opt) => {
1708
1697
  const isChecked = selected.includes(opt.value);
1709
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1698
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1710
1699
  "button",
1711
1700
  {
1712
1701
  type: "button",
1713
1702
  onClick: () => toggleItem(opt.value),
1714
- className: cn2(
1703
+ className: cn(
1715
1704
  ROW_BASE,
1716
1705
  isChecked ? "polli:bg-theme-bg-active polli:text-theme-text-strong" : "polli:text-theme-text-base polli:hover:bg-theme-bg-subtle"
1717
1706
  ),
1718
1707
  children: [
1719
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1708
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1720
1709
  "span",
1721
1710
  {
1722
- className: cn2(
1711
+ className: cn(
1723
1712
  CHECK_BASE,
1724
1713
  isChecked && "polli:bg-theme-bg-active polli:text-theme-text-strong"
1725
1714
  ),
1726
1715
  children: isChecked && "\u2713"
1727
1716
  }
1728
1717
  ),
1729
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "polli:whitespace-nowrap", children: opt.label })
1718
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "polli:whitespace-nowrap", children: opt.label })
1730
1719
  ]
1731
1720
  },
1732
1721
  opt.value
@@ -1740,12 +1729,12 @@ var MultiSelect = ({
1740
1729
  );
1741
1730
  };
1742
1731
 
1743
- // src/primitives/NavItem.tsx
1744
- var import_jsx_runtime24 = require("react/jsx-runtime");
1732
+ // src/compositions/NavItem.tsx
1733
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1745
1734
  var base = "polli-control polli:flex polli:items-center polli:gap-2 polli:rounded-full polli:px-3 polli:py-2 polli:text-left polli:text-sm polli:font-medium polli:whitespace-nowrap polli:transition-colors";
1746
1735
  var activeClasses = "polli:bg-theme-bg-active polli:text-theme-text-strong";
1747
- var inactiveClasses = "polli:text-gray-800 polli:hover:bg-white/60 polli:hover:text-gray-950";
1748
- var dotClasses = "polli:h-2.5 polli:w-2.5 polli:shrink-0 polli:rounded-full polli:bg-theme-bg-hover polli:shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)]";
1736
+ var inactiveClasses = "polli:text-ink-800 polli:hover:bg-surface-opaque/60 polli:hover:text-ink-950";
1737
+ var dotClasses = "polli:h-2.5 polli:w-2.5 polli:shrink-0 polli:rounded-full polli:bg-theme-bg-hover polli:ring-1 polli:ring-inset polli:ring-ink-950/10";
1749
1738
  function NavItem({
1750
1739
  as,
1751
1740
  theme,
@@ -1755,31 +1744,136 @@ function NavItem({
1755
1744
  ...rest
1756
1745
  }) {
1757
1746
  const Component = as || "button";
1758
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1747
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1759
1748
  Component,
1760
1749
  {
1761
1750
  "data-theme": theme,
1762
1751
  "aria-current": active ? "page" : void 0,
1763
- className: cn2(
1752
+ className: cn(
1764
1753
  base,
1765
1754
  active ? activeClasses : inactiveClasses,
1766
1755
  className
1767
1756
  ),
1768
1757
  ...rest,
1769
1758
  children: [
1770
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": "true", className: dotClasses }),
1759
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { "aria-hidden": "true", className: dotClasses }),
1771
1760
  children
1772
1761
  ]
1773
1762
  }
1774
1763
  );
1775
1764
  }
1776
1765
 
1777
- // src/primitives/PeriodPicker.tsx
1778
- var import_react9 = require("react");
1766
+ // src/compositions/PeriodPicker.tsx
1767
+ var import_react7 = require("react");
1768
+
1769
+ // src/lib/period.ts
1770
+ var MS_PER_DAY = 864e5;
1771
+ function startOfUtcDay(date = /* @__PURE__ */ new Date()) {
1772
+ return new Date(
1773
+ Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate())
1774
+ );
1775
+ }
1776
+ function addUtcDays(date, days) {
1777
+ const next = new Date(date);
1778
+ next.setUTCDate(next.getUTCDate() + days);
1779
+ return next;
1780
+ }
1781
+ function startOfUtcMonth(date) {
1782
+ return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 1));
1783
+ }
1784
+ function addUtcMonths(date, months) {
1785
+ return new Date(
1786
+ Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + months, 1)
1787
+ );
1788
+ }
1789
+ function startOfUtcIsoWeek(date) {
1790
+ const day = date.getUTCDay() || 7;
1791
+ return addUtcDays(startOfUtcDay(date), 1 - day);
1792
+ }
1793
+ function getUtcIsoWeekPeriod(date) {
1794
+ const day = date.getUTCDay() || 7;
1795
+ const thursday = addUtcDays(startOfUtcDay(date), 4 - day);
1796
+ const isoYear = thursday.getUTCFullYear();
1797
+ const yearStart = new Date(Date.UTC(isoYear, 0, 1));
1798
+ const isoWeek = Math.ceil(
1799
+ ((thursday.getTime() - yearStart.getTime()) / MS_PER_DAY + 1) / 7
1800
+ );
1801
+ return `${isoYear}-W${String(isoWeek).padStart(2, "0")}`;
1802
+ }
1803
+ function formatUtcDatePeriod(date) {
1804
+ return date.toISOString().slice(0, 10);
1805
+ }
1806
+ function formatUtcHourPeriod(date) {
1807
+ return date.toISOString().slice(0, 13).replace("T", " ");
1808
+ }
1809
+ function formatUtcMonthPeriod(date) {
1810
+ return date.toISOString().slice(0, 7);
1811
+ }
1812
+ function periodFromDate(granularity, date = /* @__PURE__ */ new Date()) {
1813
+ if (granularity === "day") {
1814
+ return {
1815
+ granularity,
1816
+ period: formatUtcDatePeriod(startOfUtcDay(date))
1817
+ };
1818
+ }
1819
+ if (granularity === "week") {
1820
+ return { granularity, period: getUtcIsoWeekPeriod(date) };
1821
+ }
1822
+ return { granularity, period: formatUtcMonthPeriod(startOfUtcMonth(date)) };
1823
+ }
1824
+ function currentPeriod() {
1825
+ return periodFromDate("day");
1826
+ }
1827
+ function periodToWindow(selection) {
1828
+ if (selection.granularity === "day") {
1829
+ const start2 = /* @__PURE__ */ new Date(`${selection.period}T00:00:00.000Z`);
1830
+ return { start: start2, end: addUtcDays(start2, 1) };
1831
+ }
1832
+ if (selection.granularity === "week") {
1833
+ const [yearText2, weekText] = selection.period.split("-W");
1834
+ const isoYear = Number(yearText2);
1835
+ const isoWeek = Number(weekText);
1836
+ const jan4 = new Date(Date.UTC(isoYear, 0, 4));
1837
+ const start2 = addUtcDays(startOfUtcIsoWeek(jan4), (isoWeek - 1) * 7);
1838
+ return { start: start2, end: addUtcDays(start2, 7) };
1839
+ }
1840
+ const [yearText, monthText] = selection.period.split("-");
1841
+ const start = new Date(
1842
+ Date.UTC(Number(yearText), Number(monthText) - 1, 1)
1843
+ );
1844
+ return { start, end: addUtcMonths(start, 1) };
1845
+ }
1846
+ function getPeriodBucketKeys(selection) {
1847
+ const { start, end } = periodToWindow(selection);
1848
+ const bucketKeys = [];
1849
+ const cursor = new Date(start);
1850
+ if (selection.granularity === "day") {
1851
+ while (cursor < end) {
1852
+ bucketKeys.push(`${formatUtcHourPeriod(cursor)}:00:00`);
1853
+ cursor.setUTCHours(cursor.getUTCHours() + 1);
1854
+ }
1855
+ return bucketKeys;
1856
+ }
1857
+ while (cursor < end) {
1858
+ bucketKeys.push(formatUtcDatePeriod(cursor));
1859
+ cursor.setUTCDate(cursor.getUTCDate() + 1);
1860
+ }
1861
+ return bucketKeys;
1862
+ }
1863
+ function periodBucketKeyToDate(bucketKey, granularity) {
1864
+ if (granularity === "day") {
1865
+ return /* @__PURE__ */ new Date(`${bucketKey.replace(" ", "T")}.000Z`);
1866
+ }
1867
+ return /* @__PURE__ */ new Date(`${bucketKey}T00:00:00.000Z`);
1868
+ }
1869
+ function isPeriodSelectable(selection, minDate = /* @__PURE__ */ new Date(0), maxDate = startOfUtcDay()) {
1870
+ const { start, end } = periodToWindow(selection);
1871
+ return end > minDate && start <= maxDate;
1872
+ }
1779
1873
 
1780
1874
  // src/primitives/TabButton.tsx
1781
- var import_jsx_runtime25 = require("react/jsx-runtime");
1782
- var sizeClasses2 = {
1875
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1876
+ var sizeClasses = {
1783
1877
  md: "polli:px-4 polli:py-1.5 polli:text-base",
1784
1878
  sm: "polli:px-3 polli:py-1.5 polli:text-sm"
1785
1879
  };
@@ -1807,7 +1901,7 @@ var TabButton = ({
1807
1901
  className
1808
1902
  }) => {
1809
1903
  const classes = variantClasses2[variant];
1810
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1904
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1811
1905
  "button",
1812
1906
  {
1813
1907
  type: "button",
@@ -1816,12 +1910,12 @@ var TabButton = ({
1816
1910
  "aria-label": ariaLabel,
1817
1911
  "aria-pressed": active,
1818
1912
  disabled,
1819
- className: cn2(
1913
+ className: cn(
1820
1914
  "polli-control polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:font-medium polli:leading-normal polli:transition-all polli:duration-200",
1821
1915
  classes.base,
1822
1916
  active ? classes.active : classes.inactive,
1823
1917
  disabled && "polli:cursor-not-allowed polli:opacity-50",
1824
- sizeClasses2[size],
1918
+ sizeClasses[size],
1825
1919
  className
1826
1920
  ),
1827
1921
  children
@@ -1829,8 +1923,8 @@ var TabButton = ({
1829
1923
  );
1830
1924
  };
1831
1925
 
1832
- // src/primitives/PeriodPicker.tsx
1833
- var import_jsx_runtime26 = require("react/jsx-runtime");
1926
+ // src/compositions/PeriodPicker.tsx
1927
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1834
1928
  var WEEKDAY_LABELS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
1835
1929
  var MONTH_LABELS = [
1836
1930
  "Jan",
@@ -1866,6 +1960,42 @@ function sameUtcDay(left, right) {
1866
1960
  function periodDate(value) {
1867
1961
  return periodToWindow(value).start;
1868
1962
  }
1963
+ function selectionKey(value) {
1964
+ return `${value.granularity}:${value.period}`;
1965
+ }
1966
+ function formatMonthYear(date, month = "short") {
1967
+ return date.toLocaleDateString("en-US", {
1968
+ timeZone: "UTC",
1969
+ month,
1970
+ year: "numeric"
1971
+ });
1972
+ }
1973
+ function formatFullDate(date) {
1974
+ return date.toLocaleDateString("en-US", {
1975
+ timeZone: "UTC",
1976
+ month: "short",
1977
+ day: "numeric",
1978
+ year: "numeric"
1979
+ });
1980
+ }
1981
+ function formatWeekSummary(start, end) {
1982
+ const weekEnd = addUtcDays(end, -1);
1983
+ const sameMonth = start.getUTCFullYear() === weekEnd.getUTCFullYear() && start.getUTCMonth() === weekEnd.getUTCMonth();
1984
+ if (sameMonth) {
1985
+ const month = start.toLocaleDateString("en-US", {
1986
+ timeZone: "UTC",
1987
+ month: "short"
1988
+ });
1989
+ return `${month} ${start.getUTCDate()}-${weekEnd.getUTCDate()}, ${weekEnd.getUTCFullYear()}`;
1990
+ }
1991
+ return `${formatFullDate(start)} - ${formatFullDate(weekEnd)}`;
1992
+ }
1993
+ function formatPeriodSummary(value) {
1994
+ const { start, end } = periodToWindow(value);
1995
+ if (value.granularity === "day") return formatFullDate(start);
1996
+ if (value.granularity === "week") return formatWeekSummary(start, end);
1997
+ return formatMonthYear(start, "long");
1998
+ }
1869
1999
  function viewBounds(viewDate, granularity) {
1870
2000
  if (granularity === "month") {
1871
2001
  const start2 = new Date(Date.UTC(viewDate.getUTCFullYear(), 0, 1));
@@ -1883,13 +2013,22 @@ var PeriodPicker = ({
1883
2013
  minDate = /* @__PURE__ */ new Date(0),
1884
2014
  maxDate
1885
2015
  }) => {
1886
- const [open, setOpen] = (0, import_react9.useState)(false);
1887
- const [viewDate, setViewDate] = (0, import_react9.useState)(() => periodDate(value));
2016
+ const [open, setOpen] = (0, import_react7.useState)(false);
2017
+ const [viewDate, setViewDate] = (0, import_react7.useState)(() => periodDate(value));
2018
+ const [anchorDate, setAnchorDate] = (0, import_react7.useState)(() => periodDate(value));
2019
+ const emittedSelectionRef = (0, import_react7.useRef)(null);
1888
2020
  const { granularity, period } = value;
1889
- (0, import_react9.useEffect)(() => {
1890
- setViewDate(periodDate({ granularity, period }));
2021
+ (0, import_react7.useEffect)(() => {
2022
+ const currentSelectionKey = selectionKey({ granularity, period });
2023
+ if (emittedSelectionRef.current === currentSelectionKey) {
2024
+ emittedSelectionRef.current = null;
2025
+ return;
2026
+ }
2027
+ const nextAnchorDate = periodDate({ granularity, period });
2028
+ setAnchorDate(nextAnchorDate);
2029
+ setViewDate(nextAnchorDate);
1891
2030
  }, [granularity, period]);
1892
- const dates = (0, import_react9.useMemo)(() => monthGridDates(viewDate), [viewDate]);
2031
+ const dates = (0, import_react7.useMemo)(() => monthGridDates(viewDate), [viewDate]);
1893
2032
  const selectedWindow = periodToWindow(value);
1894
2033
  const today = startOfUtcDay(maxDate);
1895
2034
  const previousViewDate = value.granularity === "month" ? addUtcMonths2(viewDate, -12) : addUtcMonths2(viewDate, -1);
@@ -1898,26 +2037,29 @@ var PeriodPicker = ({
1898
2037
  const nextBounds = viewBounds(nextViewDate, value.granularity);
1899
2038
  const previousDisabled = previousBounds.end <= minDate;
1900
2039
  const nextDisabled = nextBounds.start > today;
2040
+ const summaryLabel = formatPeriodSummary(value);
2041
+ const commitSelection = (selection, anchor) => {
2042
+ emittedSelectionRef.current = selectionKey(selection);
2043
+ setAnchorDate(anchor);
2044
+ setViewDate(anchor);
2045
+ onChange(selection);
2046
+ };
1901
2047
  const setGranularity = (granularity2) => {
1902
- onChange(periodFromDate(granularity2, periodDate(value)));
2048
+ commitSelection(periodFromDate(granularity2, anchorDate), anchorDate);
1903
2049
  };
1904
2050
  const selectDate = (date) => {
1905
- onChange(periodFromDate(value.granularity, date));
2051
+ commitSelection(periodFromDate(value.granularity, date), date);
1906
2052
  setOpen(false);
1907
2053
  };
1908
- const viewLabel = value.granularity === "month" ? String(viewDate.getUTCFullYear()) : viewDate.toLocaleDateString("en-US", {
1909
- timeZone: "UTC",
1910
- month: "long",
1911
- year: "numeric"
1912
- });
1913
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2054
+ const viewLabel = value.granularity === "month" ? String(viewDate.getUTCFullYear()) : formatMonthYear(viewDate, "long");
2055
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1914
2056
  "div",
1915
2057
  {
1916
2058
  "data-theme": theme,
1917
2059
  className: "polli:flex polli:flex-wrap polli:items-center polli:gap-2",
1918
2060
  children: [
1919
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "polli:flex polli:flex-wrap polli:gap-1.5", children: ["day", "week", "month"].map(
1920
- (granularity2) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2061
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "polli:flex polli:flex-wrap polli:gap-1.5", children: ["day", "week", "month"].map(
2062
+ (granularity2) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1921
2063
  TabButton,
1922
2064
  {
1923
2065
  active: value.granularity === granularity2,
@@ -1927,55 +2069,55 @@ var PeriodPicker = ({
1927
2069
  granularity2
1928
2070
  )
1929
2071
  ) }),
1930
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2072
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1931
2073
  Dropdown,
1932
2074
  {
1933
2075
  theme,
1934
2076
  open,
1935
2077
  onOpenChange: setOpen,
1936
- className: "polli:w-[304px] polli:rounded-xl polli:p-3",
1937
- trigger: (isOpen) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2078
+ className: "polli:w-[320px] polli:rounded-xl polli:p-3.5",
2079
+ trigger: (isOpen) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1938
2080
  "button",
1939
2081
  {
1940
2082
  type: "button",
1941
- "aria-label": `Select period, current ${formatPeriodLabel(value)}`,
1942
- className: cn2(
1943
- "polli-control polli:inline-flex polli:min-w-[150px] polli:items-center polli:justify-between polli:gap-2 polli:rounded-full polli:border polli:px-4 polli:pt-1.5 polli:pb-2 polli:text-left polli:text-base polli:font-medium polli:leading-normal",
2083
+ "aria-label": `Select period, current ${summaryLabel}`,
2084
+ className: cn(
2085
+ "polli-control polli:inline-flex polli:w-[19rem] polli:max-w-full polli:items-center polli:justify-between polli:gap-2 polli:rounded-full polli:border polli:px-5 polli:pt-2 polli:pb-2.5 polli:text-left polli:text-base polli:font-medium polli:leading-normal",
1944
2086
  "polli:border-theme-border polli:bg-theme-bg-subtle polli:text-theme-text-base",
1945
2087
  "polli:transition-all polli:duration-200 polli:ease-out polli:hover:bg-theme-bg-pale",
1946
2088
  isOpen && "polli:bg-theme-bg-active polli:text-theme-text-strong polli:shadow-sm"
1947
2089
  ),
1948
2090
  children: [
1949
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: formatPeriodLabel(value) }),
1950
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronIcon, { expanded: isOpen })
2091
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "polli:truncate", children: summaryLabel }),
2092
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChevronIcon, { expanded: isOpen })
1951
2093
  ]
1952
2094
  }
1953
2095
  ),
1954
2096
  children: [
1955
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "polli:mb-3 polli:flex polli:items-center polli:justify-between", children: [
1956
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2097
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "polli:mb-3 polli:flex polli:items-center polli:justify-between", children: [
2098
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1957
2099
  "button",
1958
2100
  {
1959
2101
  type: "button",
1960
- "aria-label": value.granularity === "month" ? "Previous year" : "Previous month",
2102
+ "aria-label": "Previous",
1961
2103
  disabled: previousDisabled,
1962
2104
  onClick: () => setViewDate(previousViewDate),
1963
- className: cn2(
2105
+ className: cn(
1964
2106
  NAV_BUTTON,
1965
2107
  previousDisabled && "polli:cursor-not-allowed polli:opacity-30 polli:hover:bg-transparent"
1966
2108
  ),
1967
2109
  children: "<"
1968
2110
  }
1969
2111
  ),
1970
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "polli:text-sm polli:font-bold polli:text-theme-text-base", children: viewLabel }),
1971
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2112
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "polli:text-base polli:font-bold polli:text-theme-text-base", children: viewLabel }),
2113
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1972
2114
  "button",
1973
2115
  {
1974
2116
  type: "button",
1975
- "aria-label": value.granularity === "month" ? "Next year" : "Next month",
2117
+ "aria-label": "Next",
1976
2118
  disabled: nextDisabled,
1977
2119
  onClick: () => setViewDate(nextViewDate),
1978
- className: cn2(
2120
+ className: cn(
1979
2121
  NAV_BUTTON,
1980
2122
  nextDisabled && "polli:cursor-not-allowed polli:opacity-30 polli:hover:bg-transparent"
1981
2123
  ),
@@ -1983,7 +2125,7 @@ var PeriodPicker = ({
1983
2125
  }
1984
2126
  )
1985
2127
  ] }),
1986
- value.granularity === "month" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "polli:grid polli:grid-cols-3 polli:gap-1.5", children: MONTH_LABELS.map((label, monthIndex) => {
2128
+ value.granularity === "month" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "polli:grid polli:grid-cols-3 polli:gap-1.5", children: MONTH_LABELS.map((label, monthIndex) => {
1987
2129
  const date = new Date(
1988
2130
  Date.UTC(
1989
2131
  viewDate.getUTCFullYear(),
@@ -2002,32 +2144,32 @@ var PeriodPicker = ({
2002
2144
  year: "numeric"
2003
2145
  });
2004
2146
  const selected = date.getUTCFullYear() === selectedWindow.start.getUTCFullYear() && date.getUTCMonth() === selectedWindow.start.getUTCMonth();
2005
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2147
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2006
2148
  "button",
2007
2149
  {
2008
2150
  type: "button",
2009
2151
  "aria-label": ariaLabel,
2010
2152
  disabled: !selectable,
2011
2153
  onClick: () => selectDate(date),
2012
- className: cn2(
2013
- "polli-control polli:rounded-lg polli:px-3 polli:py-2 polli:text-xs polli:font-medium polli:transition-colors polli:duration-150",
2014
- selected ? "polli:bg-theme-bg-active polli:text-theme-text-strong" : "polli:text-gray-700 polli:hover:bg-theme-bg-subtle",
2015
- !selectable && "polli:cursor-not-allowed polli:text-gray-300 polli:hover:bg-transparent"
2154
+ className: cn(
2155
+ "polli-control polli:rounded-lg polli:px-3 polli:py-2 polli:text-sm polli:font-medium polli:transition-colors polli:duration-150",
2156
+ selected ? "polli:bg-theme-bg-active polli:text-theme-text-strong" : "polli:text-ink-700 polli:hover:bg-theme-bg-subtle",
2157
+ !selectable && "polli:cursor-not-allowed polli:text-ink-300 polli:hover:bg-transparent"
2016
2158
  ),
2017
2159
  children: label
2018
2160
  },
2019
2161
  label
2020
2162
  );
2021
- }) }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
2022
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "polli:mb-1 polli:grid polli:grid-cols-7 polli:gap-1 polli:text-center polli:text-micro polli:font-bold polli:uppercase polli:text-gray-400", children: WEEKDAY_LABELS.map((label) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { children: label }, label)) }),
2023
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "polli:grid polli:grid-cols-7 polli:gap-1", children: dates.map((date) => {
2163
+ }) }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
2164
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "polli:mb-1 polli:grid polli:grid-cols-7 polli:gap-1 polli:text-center polli:text-xs polli:font-bold polli:uppercase polli:text-ink-400", children: WEEKDAY_LABELS.map((label) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: label }, label)) }),
2165
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "polli:grid polli:grid-cols-7 polli:gap-1", children: dates.map((date) => {
2024
2166
  const inCurrentMonth = date.getUTCMonth() === viewDate.getUTCMonth();
2025
2167
  const selectable = isPeriodSelectable(
2026
2168
  periodFromDate(value.granularity, date),
2027
2169
  minDate,
2028
2170
  today
2029
2171
  );
2030
- const ariaLabel = value.granularity === "week" ? `Select week ${formatPeriodLabel(periodFromDate("week", date))}` : `Select ${date.toLocaleDateString(
2172
+ const ariaLabel = value.granularity === "week" ? `Select ${formatPeriodSummary(periodFromDate("week", date))}` : `Select ${date.toLocaleDateString(
2031
2173
  "en-US",
2032
2174
  {
2033
2175
  timeZone: "UTC",
@@ -2038,19 +2180,19 @@ var PeriodPicker = ({
2038
2180
  }
2039
2181
  )}`;
2040
2182
  const selected = value.granularity === "day" ? sameUtcDay(date, selectedWindow.start) : date >= selectedWindow.start && date < selectedWindow.end;
2041
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2183
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2042
2184
  "button",
2043
2185
  {
2044
2186
  type: "button",
2045
2187
  "aria-label": ariaLabel,
2046
2188
  disabled: !selectable,
2047
2189
  onClick: () => selectDate(date),
2048
- className: cn2(
2049
- "polli-control polli:aspect-square polli:rounded-lg polli:text-xs polli:font-medium polli:transition-colors polli:duration-150",
2050
- !inCurrentMonth && "polli:text-gray-300",
2190
+ className: cn(
2191
+ "polli-control polli:aspect-square polli:rounded-lg polli:text-sm polli:font-medium polli:transition-colors polli:duration-150",
2192
+ !inCurrentMonth && "polli:text-ink-300",
2051
2193
  sameUtcDay(date, today) && "polli:ring-1 polli:ring-theme-border",
2052
- selected ? "polli:bg-theme-bg-active polli:text-theme-text-strong" : "polli:text-gray-700 polli:hover:bg-theme-bg-subtle",
2053
- !selectable && "polli:cursor-not-allowed polli:text-gray-300 polli:hover:bg-transparent"
2194
+ selected ? "polli:bg-theme-bg-active polli:text-theme-text-strong" : "polli:text-ink-700 polli:hover:bg-theme-bg-subtle",
2195
+ !selectable && "polli:cursor-not-allowed polli:text-ink-300 polli:hover:bg-transparent"
2054
2196
  ),
2055
2197
  children: date.getUTCDate()
2056
2198
  },
@@ -2066,189 +2208,517 @@ var PeriodPicker = ({
2066
2208
  );
2067
2209
  };
2068
2210
 
2069
- // src/primitives/Prose.tsx
2070
- var import_react_markdown2 = __toESM(require("react-markdown"), 1);
2071
- var import_rehype_slug = __toESM(require("rehype-slug"), 1);
2072
- var import_remark_gfm2 = __toESM(require("remark-gfm"), 1);
2073
- var import_jsx_runtime27 = require("react/jsx-runtime");
2074
- var components2 = {
2075
- h1: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2076
- "h1",
2077
- {
2078
- className: "polli:mt-0 polli:mb-5 polli:break-words polli:font-heading polli:text-4xl polli:leading-none polli:text-theme-text-strong",
2079
- ...props
2080
- }
2081
- ),
2082
- h2: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2083
- "h2",
2084
- {
2085
- className: "polli:mt-8 polli:mb-3 polli:break-words polli:font-subheading polli:text-2xl polli:leading-tight polli:text-theme-text-strong",
2086
- ...props
2087
- }
2088
- ),
2089
- h3: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2090
- "h3",
2091
- {
2092
- className: "polli:mt-6 polli:mb-2 polli:break-words polli:font-subheading polli:text-xl polli:leading-tight polli:text-theme-text-strong",
2093
- ...props
2094
- }
2095
- ),
2096
- p: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "polli:my-4 polli:leading-relaxed", ...props }),
2097
- a: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2098
- "a",
2099
- {
2100
- className: "polli-control polli:rounded-sm polli:font-semibold polli:text-theme-text-strong polli:underline polli:decoration-theme-border polli:decoration-2 polli:underline-offset-3 polli:hover:decoration-theme-text-soft",
2101
- ...props
2102
- }
2103
- ),
2104
- ul: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2105
- "ul",
2106
- {
2107
- className: "polli:my-4 polli:list-disc polli:pl-6 polli:leading-relaxed",
2108
- ...props
2109
- }
2110
- ),
2111
- ol: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2112
- "ol",
2113
- {
2114
- className: "polli:my-4 polli:list-decimal polli:pl-6 polli:leading-relaxed",
2115
- ...props
2116
- }
2117
- ),
2118
- blockquote: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2119
- "blockquote",
2120
- {
2121
- className: "polli:my-4 polli:border-l-4 polli:border-theme-border polli:pl-4 polli:text-theme-text-soft",
2122
- ...props
2123
- }
2124
- ),
2125
- code: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2126
- "code",
2127
- {
2128
- className: "polli:rounded polli:bg-theme-bg-active polli:px-1 polli:py-0.5 polli:font-pixel polli:text-sm",
2129
- ...props
2130
- }
2131
- ),
2132
- pre: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2133
- "pre",
2134
- {
2135
- className: "polli:my-4 polli:overflow-x-auto polli:rounded-lg polli:bg-theme-bg-active polli:p-4",
2136
- ...props
2137
- }
2138
- ),
2139
- table: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2140
- "table",
2141
- {
2142
- className: "polli:my-4 polli:w-full polli:border-collapse polli:text-sm",
2143
- ...props
2144
- }
2145
- ),
2146
- th: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2147
- "th",
2148
- {
2149
- className: "polli:border polli:border-theme-border polli:px-3 polli:py-2 polli:text-left polli:font-semibold",
2150
- ...props
2151
- }
2152
- ),
2153
- td: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2154
- "td",
2155
- {
2156
- className: "polli:border polli:border-theme-border polli:px-3 polli:py-2",
2157
- ...props
2158
- }
2159
- ),
2160
- hr: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("hr", { className: "polli:my-6 polli:border-theme-border", ...props })
2161
- };
2162
- function Prose({ children, className }) {
2163
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2164
- "div",
2211
+ // src/compositions/Prose.tsx
2212
+ var import_react_markdown2 = __toESM(require("react-markdown"), 1);
2213
+ var import_rehype_slug = __toESM(require("rehype-slug"), 1);
2214
+ var import_remark_gfm2 = __toESM(require("remark-gfm"), 1);
2215
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2216
+ var components2 = {
2217
+ h1: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2218
+ "h1",
2219
+ {
2220
+ className: headingClassName("title", "polli:mt-0 polli:mb-5"),
2221
+ ...props
2222
+ }
2223
+ ),
2224
+ h2: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2225
+ "h2",
2226
+ {
2227
+ className: headingClassName("section", "polli:mt-8 polli:mb-3"),
2228
+ ...props
2229
+ }
2230
+ ),
2231
+ h3: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2232
+ "h3",
2233
+ {
2234
+ className: headingClassName("subsection", "polli:mt-6 polli:mb-2"),
2235
+ ...props
2236
+ }
2237
+ ),
2238
+ p: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "polli:my-4 polli:leading-relaxed", ...props }),
2239
+ a: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2240
+ "a",
2241
+ {
2242
+ className: "polli-control polli:rounded-sm polli:font-semibold polli:text-theme-text-strong polli:underline polli:decoration-theme-border polli:decoration-2 polli:underline-offset-3 polli:hover:decoration-theme-text-soft",
2243
+ ...props
2244
+ }
2245
+ ),
2246
+ ul: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2247
+ "ul",
2248
+ {
2249
+ className: "polli:my-4 polli:list-disc polli:pl-6 polli:leading-relaxed",
2250
+ ...props
2251
+ }
2252
+ ),
2253
+ ol: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2254
+ "ol",
2255
+ {
2256
+ className: "polli:my-4 polli:list-decimal polli:pl-6 polli:leading-relaxed",
2257
+ ...props
2258
+ }
2259
+ ),
2260
+ blockquote: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2261
+ "blockquote",
2262
+ {
2263
+ className: "polli:my-4 polli:border-l-4 polli:border-theme-border polli:pl-4 polli:text-theme-text-soft",
2264
+ ...props
2265
+ }
2266
+ ),
2267
+ code: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2268
+ "code",
2269
+ {
2270
+ className: "polli:rounded polli:bg-theme-bg-active polli:px-1 polli:py-0.5 polli:font-pixel polli:text-sm",
2271
+ ...props
2272
+ }
2273
+ ),
2274
+ pre: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2275
+ "pre",
2276
+ {
2277
+ className: "polli:my-4 polli:overflow-x-auto polli:rounded-lg polli:bg-theme-bg-active polli:p-4",
2278
+ ...props
2279
+ }
2280
+ ),
2281
+ table: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2282
+ "table",
2283
+ {
2284
+ className: "polli:my-4 polli:w-full polli:border-collapse polli:text-sm",
2285
+ ...props
2286
+ }
2287
+ ),
2288
+ th: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2289
+ "th",
2290
+ {
2291
+ className: "polli:border polli:border-theme-border polli:px-3 polli:py-2 polli:text-left polli:font-semibold",
2292
+ ...props
2293
+ }
2294
+ ),
2295
+ td: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2296
+ "td",
2297
+ {
2298
+ className: "polli:border polli:border-theme-border polli:px-3 polli:py-2",
2299
+ ...props
2300
+ }
2301
+ ),
2302
+ hr: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("hr", { className: "polli:my-6 polli:border-theme-border", ...props })
2303
+ };
2304
+ function Prose({ children, className }) {
2305
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2306
+ "div",
2307
+ {
2308
+ className: cn(
2309
+ "polli:font-body polli:text-theme-text-base polli:leading-relaxed",
2310
+ className
2311
+ ),
2312
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2313
+ import_react_markdown2.default,
2314
+ {
2315
+ remarkPlugins: [import_remark_gfm2.default],
2316
+ rehypePlugins: [import_rehype_slug.default],
2317
+ components: components2,
2318
+ children
2319
+ }
2320
+ )
2321
+ }
2322
+ );
2323
+ }
2324
+
2325
+ // src/compositions/Section.tsx
2326
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2327
+ var Section = ({
2328
+ title,
2329
+ theme,
2330
+ id,
2331
+ framed = false,
2332
+ intro,
2333
+ action,
2334
+ actionClassName,
2335
+ panelClassName,
2336
+ titleClassName,
2337
+ children,
2338
+ className
2339
+ }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2340
+ "section",
2341
+ {
2342
+ id,
2343
+ className: cn(
2344
+ "polli:flex polli:scroll-mt-10 polli:flex-col polli:gap-4",
2345
+ className
2346
+ ),
2347
+ children: [
2348
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("header", { className: "polli:flex polli:flex-wrap polli:items-center polli:justify-between polli:gap-3 polli:px-1", children: [
2349
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2350
+ Heading,
2351
+ {
2352
+ as: "h2",
2353
+ "data-theme": theme,
2354
+ size: "section",
2355
+ className: cn("polli:text-left", titleClassName),
2356
+ children: title
2357
+ }
2358
+ ),
2359
+ action && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: cn("polli:shrink-0", actionClassName), children: action })
2360
+ ] }),
2361
+ framed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2362
+ Surface,
2363
+ {
2364
+ variant: "panel",
2365
+ theme,
2366
+ className: cn(
2367
+ "polli:flex polli:flex-col polli:gap-5",
2368
+ panelClassName
2369
+ ),
2370
+ children: [
2371
+ intro && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { as: "div", className: "polli:max-w-2xl", children: intro }),
2372
+ children
2373
+ ]
2374
+ }
2375
+ ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
2376
+ intro && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2377
+ Text,
2378
+ {
2379
+ as: "div",
2380
+ "data-theme": theme,
2381
+ className: "polli:max-w-2xl",
2382
+ children: intro
2383
+ }
2384
+ ),
2385
+ children
2386
+ ] })
2387
+ ]
2388
+ }
2389
+ );
2390
+
2391
+ // src/compositions/StatCard.tsx
2392
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2393
+ var valueVariantClasses = {
2394
+ stat: "polli:min-h-8 polli:text-2xl polli:font-bold polli:leading-tight polli:tabular-nums polli:text-theme-text-strong",
2395
+ fact: "polli:text-sm polli:leading-6 polli:text-theme-text-soft"
2396
+ };
2397
+ var StatCard = ({
2398
+ label,
2399
+ value,
2400
+ detail,
2401
+ variant = "stat",
2402
+ theme,
2403
+ className,
2404
+ labelClassName,
2405
+ valueClassName,
2406
+ detailClassName
2407
+ }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { "data-theme": theme, className: cn("polli:text-sm", className), children: [
2408
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2409
+ Text,
2410
+ {
2411
+ as: "div",
2412
+ size: "micro",
2413
+ tone: "strong",
2414
+ weight: "bold",
2415
+ className: cn(
2416
+ "polli:uppercase polli:tracking-wide",
2417
+ labelClassName
2418
+ ),
2419
+ children: label
2420
+ }
2421
+ ),
2422
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2423
+ "div",
2424
+ {
2425
+ className: cn(
2426
+ "polli:mt-1 polli:break-words",
2427
+ valueVariantClasses[variant],
2428
+ valueClassName
2429
+ ),
2430
+ children: value
2431
+ }
2432
+ ),
2433
+ detail && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2434
+ Text,
2435
+ {
2436
+ as: "div",
2437
+ size: "xs",
2438
+ tone: "soft",
2439
+ className: cn("polli:mt-2", detailClassName),
2440
+ children: detail
2441
+ }
2442
+ )
2443
+ ] });
2444
+
2445
+ // src/lib/cn-app.ts
2446
+ var import_clsx2 = require("clsx");
2447
+ var import_tailwind_merge2 = require("tailwind-merge");
2448
+ function cn2(...inputs) {
2449
+ return (0, import_tailwind_merge2.twMerge)((0, import_clsx2.clsx)(...inputs));
2450
+ }
2451
+
2452
+ // src/lib/use-scroll-lock.ts
2453
+ var import_react8 = require("react");
2454
+ function useScrollLock(enabled = true) {
2455
+ (0, import_react8.useEffect)(() => {
2456
+ if (!enabled) return;
2457
+ const originalBody = document.body.style.overflow;
2458
+ const originalHtml = document.documentElement.style.overflow;
2459
+ document.body.style.overflow = "hidden";
2460
+ document.documentElement.style.overflow = "hidden";
2461
+ return () => {
2462
+ document.body.style.overflow = originalBody;
2463
+ document.documentElement.style.overflow = originalHtml;
2464
+ };
2465
+ }, [enabled]);
2466
+ }
2467
+
2468
+ // src/primitives/ButtonGroup.tsx
2469
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2470
+ var ButtonGroup = ({
2471
+ wrap = true,
2472
+ className,
2473
+ children,
2474
+ role = "group",
2475
+ ...rest
2476
+ }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2477
+ "div",
2478
+ {
2479
+ ...rest,
2480
+ role,
2481
+ className: cn(
2482
+ "polli:flex polli:min-w-0 polli:items-center polli:gap-1.5",
2483
+ wrap ? "polli:flex-wrap" : "polli:flex-nowrap",
2484
+ className
2485
+ ),
2486
+ children
2487
+ }
2488
+ );
2489
+
2490
+ // src/primitives/Chip.tsx
2491
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2492
+ var chipSizes = {
2493
+ sm: "polli:px-2 polli:py-0.5 polli:text-xs",
2494
+ md: "polli:px-2.5 polli:py-0.5 polli:text-sm",
2495
+ lg: "polli:px-3 polli:py-1 polli:text-sm"
2496
+ };
2497
+ var intentClasses4 = {
2498
+ news: "polli:bg-intent-news-bg-light polli:text-intent-news-text",
2499
+ alpha: "polli:bg-intent-alpha-bg-light polli:text-intent-alpha-text",
2500
+ neutral: "polli:bg-ink-100/80 polli:text-ink-900",
2501
+ success: "polli:bg-intent-success-bg-light polli:text-intent-success-text",
2502
+ warning: "polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
2503
+ danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
2504
+ };
2505
+ var Chip = ({
2506
+ theme,
2507
+ intent,
2508
+ size = "md",
2509
+ className,
2510
+ children,
2511
+ ...rest
2512
+ }) => {
2513
+ const intentClass = intent ? intentClasses4[intent] : "polli:bg-theme-bg-active polli:text-theme-text-strong";
2514
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2515
+ "span",
2516
+ {
2517
+ ...rest,
2518
+ "data-theme": theme,
2519
+ className: cn(
2520
+ "polli:inline-flex polli:shrink-0 polli:items-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-normal",
2521
+ chipSizes[size],
2522
+ intentClass,
2523
+ className
2524
+ ),
2525
+ children
2526
+ }
2527
+ );
2528
+ };
2529
+
2530
+ // src/primitives/Dialog.tsx
2531
+ var import_dialog = require("@ark-ui/react/dialog");
2532
+ var import_portal2 = require("@ark-ui/react/portal");
2533
+ var import_react9 = require("react");
2534
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2535
+ var sizeClasses2 = {
2536
+ sm: "polli:max-w-md",
2537
+ md: "polli:max-w-xl",
2538
+ lg: "polli:max-w-2xl"
2539
+ };
2540
+ var Dialog = ({
2541
+ open,
2542
+ onOpenChange,
2543
+ trigger,
2544
+ triggerAsChild = false,
2545
+ triggerClassName,
2546
+ title,
2547
+ titleClassName,
2548
+ ariaLabel,
2549
+ labelledBy,
2550
+ theme = "blue",
2551
+ size = "md",
2552
+ showBackdrop = true,
2553
+ backdropClassName,
2554
+ positionerClassName,
2555
+ contentClassName,
2556
+ children
2557
+ }) => {
2558
+ const contentRef = (0, import_react9.useRef)(null);
2559
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2560
+ import_dialog.Dialog.Root,
2561
+ {
2562
+ open,
2563
+ initialFocusEl: () => contentRef.current,
2564
+ onOpenChange: (details) => onOpenChange?.(details.open),
2565
+ children: [
2566
+ trigger && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2567
+ import_dialog.Dialog.Trigger,
2568
+ {
2569
+ asChild: triggerAsChild,
2570
+ className: triggerClassName,
2571
+ children: trigger
2572
+ }
2573
+ ),
2574
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_portal2.Portal, { children: [
2575
+ showBackdrop && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2576
+ import_dialog.Dialog.Backdrop,
2577
+ {
2578
+ className: cn(
2579
+ "polli:fixed polli:inset-0 polli:z-[100] polli:bg-ink-950/50",
2580
+ backdropClassName
2581
+ )
2582
+ }
2583
+ ),
2584
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2585
+ import_dialog.Dialog.Positioner,
2586
+ {
2587
+ "data-theme": theme,
2588
+ className: cn(
2589
+ "polli:fixed polli:inset-0 polli:z-[110] polli:flex polli:h-dvh polli:items-start polli:justify-center polli:overflow-hidden polli:p-4",
2590
+ positionerClassName
2591
+ ),
2592
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2593
+ import_dialog.Dialog.Content,
2594
+ {
2595
+ ref: contentRef,
2596
+ "data-theme": theme,
2597
+ "aria-label": ariaLabel,
2598
+ "aria-labelledby": labelledBy,
2599
+ className: cn(
2600
+ "polli:my-auto polli:w-full polli:overflow-hidden polli:rounded-lg polli:border-2 polli:border-theme-border polli:bg-surface-opaque polli:shadow-lg polli:outline-none polli:focus:outline-none polli:focus-visible:outline-none",
2601
+ sizeClasses2[size],
2602
+ contentClassName
2603
+ ),
2604
+ children: [
2605
+ title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2606
+ DialogTitle,
2607
+ {
2608
+ className: cn(
2609
+ "polli:px-6 polli:pt-6 polli:font-subheading polli:text-xl polli:text-theme-text-strong",
2610
+ titleClassName
2611
+ ),
2612
+ children: title
2613
+ }
2614
+ ),
2615
+ children
2616
+ ]
2617
+ }
2618
+ )
2619
+ }
2620
+ )
2621
+ ] })
2622
+ ]
2623
+ }
2624
+ );
2625
+ };
2626
+ var DialogTitle = import_dialog.Dialog.Title;
2627
+
2628
+ // src/primitives/DropdownItem.tsx
2629
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2630
+ function DropdownItem({
2631
+ as,
2632
+ className,
2633
+ children,
2634
+ ...rest
2635
+ }) {
2636
+ const Component = as || "button";
2637
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2638
+ Component,
2165
2639
  {
2166
- className: cn2(
2167
- "polli:font-body polli:text-theme-text-base polli:leading-relaxed",
2640
+ ...Component === "button" ? { type: "button" } : void 0,
2641
+ ...rest,
2642
+ className: cn(
2643
+ "polli-control polli:flex polli:w-full polli:cursor-pointer polli:items-center polli:gap-2 polli:rounded-lg polli:bg-transparent polli:px-3 polli:py-2 polli:text-left polli:text-sm polli:font-medium polli:text-theme-text-base polli:no-underline polli:transition-colors polli:hover:bg-theme-bg-hover polli:focus-visible:bg-theme-bg-hover",
2168
2644
  className
2169
2645
  ),
2170
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2171
- import_react_markdown2.default,
2172
- {
2173
- remarkPlugins: [import_remark_gfm2.default],
2174
- rehypePlugins: [import_rehype_slug.default],
2175
- components: components2,
2176
- children
2177
- }
2178
- )
2646
+ children
2179
2647
  }
2180
2648
  );
2181
2649
  }
2182
2650
 
2183
- // src/primitives/Section.tsx
2184
- var import_jsx_runtime28 = require("react/jsx-runtime");
2185
- var Section = ({
2186
- title,
2651
+ // src/primitives/Field.tsx
2652
+ var import_field = require("@ark-ui/react/field");
2653
+
2654
+ // src/primitives/InlineLink.tsx
2655
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2656
+ function isExternalHref2(href) {
2657
+ return typeof href === "string" && /^https?:\/\//.test(href);
2658
+ }
2659
+ function InlineLink({
2660
+ as,
2187
2661
  theme,
2188
- id,
2189
- framed = false,
2190
- intro,
2191
- action,
2192
- actionClassName,
2193
- panelClassName,
2194
- titleClassName,
2662
+ external,
2663
+ showIcon = true,
2664
+ className,
2195
2665
  children,
2196
- className
2197
- }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2198
- "section",
2199
- {
2200
- id,
2201
- className: cn2(
2202
- "polli:flex polli:scroll-mt-10 polli:flex-col polli:gap-4",
2203
- className
2204
- ),
2205
- children: [
2206
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "polli:flex polli:flex-wrap polli:items-center polli:justify-between polli:gap-3 polli:px-1", children: [
2207
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2208
- "h2",
2209
- {
2210
- "data-theme": theme,
2211
- className: cn2(
2212
- "polli:text-left polli:font-subheading polli:text-2xl polli:leading-tight polli:text-theme-text-strong",
2213
- titleClassName
2214
- ),
2215
- children: title
2216
- }
2217
- ),
2218
- action && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn2("polli:shrink-0", actionClassName), children: action })
2219
- ] }),
2220
- framed ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2221
- Surface,
2222
- {
2223
- variant: "panel",
2224
- theme,
2225
- className: cn2(
2226
- "polli:flex polli:flex-col polli:gap-5",
2227
- panelClassName
2228
- ),
2229
- children: [
2230
- intro && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "polli:max-w-2xl polli:text-theme-text-base", children: intro }),
2231
- children
2232
- ]
2233
- }
2234
- ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
2235
- intro && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2236
- "div",
2666
+ ...linkProps
2667
+ }) {
2668
+ const Component = as || "a";
2669
+ const isExternal = external ?? isExternalHref2(linkProps.href);
2670
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2671
+ Component,
2672
+ {
2673
+ "data-theme": theme,
2674
+ target: isExternal ? "_blank" : void 0,
2675
+ rel: isExternal ? "noopener noreferrer" : void 0,
2676
+ className: cn(
2677
+ "polli-control polli:inline-flex polli:items-center polli:gap-1 polli:rounded-sm polli:font-semibold polli:text-theme-text-strong",
2678
+ "polli:underline polli:decoration-theme-border polli:decoration-2 polli:underline-offset-3",
2679
+ "polli:transition-colors polli:hover:text-theme-text-soft polli:hover:decoration-theme-text-soft",
2680
+ className
2681
+ ),
2682
+ ...linkProps,
2683
+ children: [
2684
+ children,
2685
+ showIcon && isExternal && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2686
+ ExternalLinkIcon,
2237
2687
  {
2238
- "data-theme": theme,
2239
- className: "polli:max-w-2xl polli:text-theme-text-base",
2240
- children: intro
2688
+ "aria-hidden": "true",
2689
+ className: "polli:h-3.5 polli:w-3.5 polli:shrink-0 polli:opacity-65"
2241
2690
  }
2242
- ),
2243
- children
2244
- ] })
2245
- ]
2246
- }
2691
+ )
2692
+ ]
2693
+ }
2694
+ );
2695
+ }
2696
+
2697
+ // src/primitives/Input.tsx
2698
+ var import_react10 = require("react");
2699
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2700
+ var Input = (0, import_react10.forwardRef)(
2701
+ ({ className, error, hideNumberSteppers, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2702
+ "input",
2703
+ {
2704
+ ref,
2705
+ "data-error": error ? "true" : void 0,
2706
+ className: cn(
2707
+ "polli-input polli:px-3 polli:py-2 polli:border polli:rounded-lg",
2708
+ "polli:text-ink-950",
2709
+ "polli:transition-colors",
2710
+ "polli:disabled:opacity-50 polli:disabled:cursor-not-allowed",
2711
+ hideNumberSteppers && "polli-input-number-clean",
2712
+ className
2713
+ ),
2714
+ ...props
2715
+ }
2716
+ )
2247
2717
  );
2248
2718
 
2249
2719
  // src/primitives/Slider.tsx
2250
- var import_react10 = require("react");
2251
- var import_jsx_runtime29 = require("react/jsx-runtime");
2720
+ var import_react11 = require("react");
2721
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2252
2722
  var toNumber = (value) => {
2253
2723
  if (typeof value === "number") return value;
2254
2724
  if (typeof value !== "string" || value.trim() === "") return void 0;
@@ -2275,7 +2745,7 @@ var getProgressPercent = ({
2275
2745
  (numericValue - numericMin) / (numericMax - numericMin) * 100
2276
2746
  );
2277
2747
  };
2278
- var Slider = (0, import_react10.forwardRef)(
2748
+ var Slider = (0, import_react11.forwardRef)(
2279
2749
  ({ className, defaultValue, max, min, progress, style, value, ...props }, ref) => {
2280
2750
  const progressPercent = getProgressPercent({
2281
2751
  progress,
@@ -2288,7 +2758,7 @@ var Slider = (0, import_react10.forwardRef)(
2288
2758
  ...style,
2289
2759
  ...progressPercent === void 0 ? null : { "--polli-slider-progress": `${progressPercent}%` }
2290
2760
  };
2291
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2761
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2292
2762
  "input",
2293
2763
  {
2294
2764
  ref,
@@ -2298,61 +2768,17 @@ var Slider = (0, import_react10.forwardRef)(
2298
2768
  value,
2299
2769
  defaultValue,
2300
2770
  style: sliderStyle,
2301
- className: cn2("polli-slider", className),
2771
+ className: cn("polli-slider", className),
2302
2772
  ...props
2303
2773
  }
2304
2774
  );
2305
2775
  }
2306
2776
  );
2307
2777
 
2308
- // src/primitives/StatCard.tsx
2309
- var import_jsx_runtime30 = require("react/jsx-runtime");
2310
- var StatCard = ({
2311
- label,
2312
- value,
2313
- detail,
2314
- theme,
2315
- className,
2316
- labelClassName,
2317
- valueClassName,
2318
- detailClassName
2319
- }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { "data-theme": theme, className: cn2("polli:text-sm", className), children: [
2320
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2321
- "div",
2322
- {
2323
- className: cn2(
2324
- "polli:text-micro polli:font-bold polli:uppercase polli:tracking-wide polli:text-theme-text-strong",
2325
- labelClassName
2326
- ),
2327
- children: label
2328
- }
2329
- ),
2330
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2331
- "div",
2332
- {
2333
- className: cn2(
2334
- "polli:mt-1 polli:min-h-8 polli:break-words polli:text-2xl polli:font-bold polli:leading-tight polli:tabular-nums polli:text-theme-text-strong",
2335
- valueClassName
2336
- ),
2337
- children: value
2338
- }
2339
- ),
2340
- detail && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2341
- "div",
2342
- {
2343
- className: cn2(
2344
- "polli:mt-2 polli:text-xs polli:text-theme-text-soft",
2345
- detailClassName
2346
- ),
2347
- children: detail
2348
- }
2349
- )
2350
- ] });
2351
-
2352
2778
  // src/primitives/Switch.tsx
2353
- var import_jsx_runtime31 = require("react/jsx-runtime");
2779
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2354
2780
  var trackClasses = {
2355
- off: "polli:bg-gray-200",
2781
+ off: "polli:bg-ink-200",
2356
2782
  on: "polli:bg-intent-success-bg-light",
2357
2783
  invalid: "polli:bg-intent-danger-bg-light"
2358
2784
  };
@@ -2366,7 +2792,7 @@ var Switch = ({
2366
2792
  }) => {
2367
2793
  const effectiveStatus = status ?? (checked ? "on" : "off");
2368
2794
  const resolvedAriaLabel = ariaLabel ?? (checked ? "Turn off toggle" : "Turn on toggle");
2369
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2795
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2370
2796
  "button",
2371
2797
  {
2372
2798
  type: "button",
@@ -2375,16 +2801,16 @@ var Switch = ({
2375
2801
  "aria-label": resolvedAriaLabel,
2376
2802
  onClick: () => onChange(!checked),
2377
2803
  disabled,
2378
- className: cn2(
2804
+ className: cn(
2379
2805
  "polli-control polli:relative polli:inline-flex polli:h-7 polli:w-12 polli:shrink-0 polli:items-center polli:rounded-full polli:transition polli:disabled:cursor-not-allowed polli:disabled:opacity-60",
2380
2806
  trackClasses[effectiveStatus],
2381
2807
  className
2382
2808
  ),
2383
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2809
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2384
2810
  "span",
2385
2811
  {
2386
- className: cn2(
2387
- "polli:inline-block polli:h-5 polli:w-5 polli:rounded-full polli:bg-white polli:shadow-sm polli:transition-transform",
2812
+ className: cn(
2813
+ "polli:inline-block polli:h-5 polli:w-5 polli:rounded-full polli:bg-surface-opaque polli:shadow-sm polli:transition-transform",
2388
2814
  checked ? "polli:translate-x-6" : "polli:translate-x-1"
2389
2815
  )
2390
2816
  }
@@ -2394,7 +2820,7 @@ var Switch = ({
2394
2820
  };
2395
2821
 
2396
2822
  // src/primitives/Table.tsx
2397
- var import_jsx_runtime32 = require("react/jsx-runtime");
2823
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2398
2824
  var alignClasses = {
2399
2825
  left: "polli:text-left",
2400
2826
  center: "polli:text-center",
@@ -2406,42 +2832,42 @@ var rowIntentClasses = {
2406
2832
  warning: "polli:bg-intent-warning-bg-light/65",
2407
2833
  danger: "polli:bg-intent-danger-bg-light/65"
2408
2834
  };
2409
- var Table = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2835
+ var Table = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2410
2836
  "table",
2411
2837
  {
2412
2838
  ...rest,
2413
- className: cn2(
2839
+ className: cn(
2414
2840
  "polli:w-full polli:border-collapse polli:text-sm",
2415
2841
  className
2416
2842
  )
2417
2843
  }
2418
2844
  );
2419
- var TableHead = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2845
+ var TableHead = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2420
2846
  "thead",
2421
2847
  {
2422
2848
  ...rest,
2423
- className: cn2(
2424
- "polli:bg-theme-bg-active polli:text-micro polli:text-theme-text-muted",
2849
+ className: cn(
2850
+ "polli:bg-transparent polli:text-micro polli:text-theme-text-muted",
2425
2851
  className
2426
2852
  )
2427
2853
  }
2428
2854
  );
2429
- var TableBody = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2855
+ var TableBody = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2430
2856
  "tbody",
2431
2857
  {
2432
2858
  ...rest,
2433
- className: cn2("polli:divide-y polli:divide-theme-border/65", className)
2859
+ className: cn("polli:divide-y polli:divide-theme-border/65", className)
2434
2860
  }
2435
2861
  );
2436
2862
  var TableRow = ({
2437
2863
  intent = "default",
2438
2864
  className,
2439
2865
  ...rest
2440
- }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2866
+ }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2441
2867
  "tr",
2442
2868
  {
2443
2869
  ...rest,
2444
- className: cn2(
2870
+ className: cn(
2445
2871
  "polli:transition-colors polli:hover:bg-theme-bg-subtle",
2446
2872
  rowIntentClasses[intent],
2447
2873
  className
@@ -2457,11 +2883,11 @@ var TableHeaderCell = ({
2457
2883
  children,
2458
2884
  ...rest
2459
2885
  }) => {
2460
- const content = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
2461
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children }),
2462
- active && sortDirection && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { "aria-hidden": "true", children: sortDirection === "asc" ? "^" : "v" })
2886
+ const content = /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
2887
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children }),
2888
+ active && sortDirection && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { "aria-hidden": "true", children: sortDirection === "asc" ? "^" : "v" })
2463
2889
  ] });
2464
- const classes = cn2(
2890
+ const classes = cn(
2465
2891
  "polli:px-3 polli:py-2 polli:font-bold polli:uppercase polli:tracking-wide",
2466
2892
  alignClasses[align],
2467
2893
  active && "polli:text-theme-text-strong",
@@ -2469,14 +2895,14 @@ var TableHeaderCell = ({
2469
2895
  className
2470
2896
  );
2471
2897
  if (!onSort) {
2472
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { ...rest, className: classes, children: content });
2898
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("th", { ...rest, className: classes, children: content });
2473
2899
  }
2474
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { ...rest, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2900
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("th", { ...rest, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2475
2901
  "button",
2476
2902
  {
2477
2903
  type: "button",
2478
2904
  onClick: onSort,
2479
- className: cn2(
2905
+ className: cn(
2480
2906
  "polli-control polli:inline-flex polli:w-full polli:items-center polli:gap-1 polli:bg-transparent polli:p-0 polli:font-bold polli:text-inherit",
2481
2907
  align === "right" && "polli:justify-end",
2482
2908
  align === "center" && "polli:justify-center"
@@ -2491,11 +2917,11 @@ var TableCell = ({
2491
2917
  muted = false,
2492
2918
  className,
2493
2919
  ...rest
2494
- }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2920
+ }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2495
2921
  "td",
2496
2922
  {
2497
2923
  ...rest,
2498
- className: cn2(
2924
+ className: cn(
2499
2925
  "polli:px-3 polli:py-2 polli:align-middle",
2500
2926
  alignClasses[align],
2501
2927
  numeric && "polli:tabular-nums",
@@ -2506,19 +2932,19 @@ var TableCell = ({
2506
2932
  );
2507
2933
 
2508
2934
  // src/primitives/Textarea.tsx
2509
- var import_react11 = require("react");
2510
- var import_jsx_runtime33 = require("react/jsx-runtime");
2511
- var Textarea = (0, import_react11.forwardRef)(
2512
- ({ className, error, rows = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2935
+ var import_react12 = require("react");
2936
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2937
+ var Textarea = (0, import_react12.forwardRef)(
2938
+ ({ className, error, rows = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2513
2939
  "textarea",
2514
2940
  {
2515
2941
  ref,
2516
2942
  rows,
2517
2943
  "data-error": error ? "true" : void 0,
2518
- className: cn2(
2944
+ className: cn(
2519
2945
  "polli-textarea polli:w-full polli:rounded-lg polli:border polli:px-3 polli:py-2",
2520
2946
  "polli:min-h-20 polli:resize-y polli:font-body polli:text-base",
2521
- "polli:text-gray-950",
2947
+ "polli:text-ink-950",
2522
2948
  "polli:transition-colors",
2523
2949
  "polli:disabled:opacity-50 polli:disabled:cursor-not-allowed",
2524
2950
  className
@@ -2529,19 +2955,37 @@ var Textarea = (0, import_react11.forwardRef)(
2529
2955
  );
2530
2956
  Textarea.displayName = "Textarea";
2531
2957
 
2958
+ // src/theme-palette.json
2959
+ var theme_palette_default = {
2960
+ bgPale: {
2961
+ amber: "#fef3c7",
2962
+ blue: "#dbeafe",
2963
+ pink: "#fce7f3",
2964
+ coral: "#ffedd5",
2965
+ teal: "#ccfbf1",
2966
+ violet: "#ede9fe",
2967
+ emerald: "#d1fae5"
2968
+ },
2969
+ brandDark: "#110518"
2970
+ };
2971
+
2532
2972
  // src/theme.ts
2533
2973
  var themes = [
2534
2974
  "amber",
2535
2975
  "blue",
2536
2976
  "pink",
2977
+ "coral",
2537
2978
  "teal",
2538
2979
  "violet",
2539
- "green"
2980
+ "emerald"
2540
2981
  ];
2982
+ var themePalette = theme_palette_default;
2541
2983
  // Annotate the CommonJS export names for ESM import in node:
2542
2984
  0 && (module.exports = {
2543
2985
  Alert,
2986
+ AppHeader,
2544
2987
  AppIcon,
2988
+ AudioIcon,
2545
2989
  BeakerIcon,
2546
2990
  BookIcon,
2547
2991
  Button,
@@ -2551,6 +2995,7 @@ var themes = [
2551
2995
  Chip,
2552
2996
  ClipboardIcon,
2553
2997
  ClockIcon,
2998
+ CodeBlock,
2554
2999
  Collapsible,
2555
3000
  CopyButton,
2556
3001
  Dialog,
@@ -2565,6 +3010,7 @@ var themes = [
2565
3010
  FileUpload,
2566
3011
  GenApiIcon,
2567
3012
  GitHubIcon,
3013
+ Heading,
2568
3014
  IconButton,
2569
3015
  ImageIcon,
2570
3016
  InfoTip,
@@ -2575,10 +3021,12 @@ var themes = [
2575
3021
  MailIcon,
2576
3022
  Markdown,
2577
3023
  McpIcon,
3024
+ MediaPlaceholder,
2578
3025
  MenuIcon,
2579
3026
  MultiSelect,
2580
3027
  NavItem,
2581
3028
  PeriodPicker,
3029
+ PlusIcon,
2582
3030
  Prose,
2583
3031
  ScrollArea,
2584
3032
  Section,
@@ -2594,6 +3042,7 @@ var themes = [
2594
3042
  TableHeaderCell,
2595
3043
  TableRow,
2596
3044
  TerminalIcon,
3045
+ Text,
2597
3046
  Textarea,
2598
3047
  TokensIcon,
2599
3048
  Tooltip,
@@ -2603,7 +3052,10 @@ var themes = [
2603
3052
  cn,
2604
3053
  currentPeriod,
2605
3054
  getPeriodBucketKeys,
3055
+ headingClassName,
2606
3056
  periodBucketKeyToDate,
3057
+ textClassName,
3058
+ themePalette,
2607
3059
  themes,
2608
3060
  useScrollLock
2609
3061
  });