@logicplanes/kaeso-ui 0.7.5-rc.7 → 0.7.5-rc.8

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.
@@ -11,27 +11,31 @@ import { t as f } from "./input-BMuZu79b.js";
11
11
  import { t as p } from "./command-list-DuUjJqji.js";
12
12
  import { n as m, t as h } from "./picker-popover-3iW35tmy.js";
13
13
  import { a as g, o as _, s as v } from "./field-CJmKViom.js";
14
- import { t as y } from "./collapsible-ivslPUbI.js";
15
- import { t as b } from "./code-bpAOiAx9.js";
16
- import { Check as x } from "../icons/check.js";
17
- import { t as S } from "./icon-BGgbhXWJ.js";
18
- import { ArrowBoth as C } from "../icons/arrow-both.js";
19
- import { Webhook as w } from "../icons/webhook.js";
20
- import { Broadcast as T } from "../icons/broadcast.js";
21
- import { Fragment as E, forwardRef as D, useId as O, useMemo as k, useState as A } from "react";
22
- import { jsx as j, jsxs as M } from "react/jsx-runtime";
23
- import { Radio as N } from "@base-ui/react/radio";
24
- import { RadioGroup as P } from "@base-ui/react/radio-group";
14
+ import { t as y } from "./formatters-Be5AdLB2.js";
15
+ import { r as b } from "./combobox-Co0aJbVi.js";
16
+ import { r as x } from "./switch-C1pUsVtT.js";
17
+ import { r as S } from "./tag-x-EyRR8h.js";
18
+ import { t as C } from "./collapsible-ivslPUbI.js";
19
+ import { t as w } from "./code-bpAOiAx9.js";
20
+ import { Check as T } from "../icons/check.js";
21
+ import { t as E } from "./icon-BGgbhXWJ.js";
22
+ import { ArrowBoth as D } from "../icons/arrow-both.js";
23
+ import { Webhook as O } from "../icons/webhook.js";
24
+ import { Broadcast as k } from "../icons/broadcast.js";
25
+ import { Fragment as A, forwardRef as j, useCallback as M, useId as N, useMemo as P, useState as F } from "react";
26
+ import { Fragment as ee, jsx as I, jsxs as L } from "react/jsx-runtime";
27
+ import { Radio as R } from "@base-ui/react/radio";
28
+ import { RadioGroup as z } from "@base-ui/react/radio-group";
25
29
  // src/components/kaeso/role-picker.tsx
26
- var F = { appearance: {
30
+ var B = { appearance: {
27
31
  list: { classes: "flex flex-col gap-16" },
28
32
  select: { classes: "" }
29
- } }, I = { appearance: "list" }, L = /* @__PURE__ */ D(function({ roles: e, value: t, onValueChange: n, appearance: r = "list", disabled: l, name: u, label: d, "aria-label": f, fullWidth: p, size: m = "md", className: h }, g) {
30
- let _ = c(), v = O(), y = _("rolePicker.builtInRoles", "Built-in roles"), b = _("rolePicker.customRoles", "Custom roles"), x = e.some((e) => e.custom);
31
- if (r === "select") return /* @__PURE__ */ j("div", {
33
+ } }, V = { appearance: "list" }, H = /* @__PURE__ */ j(function({ roles: e, value: t, onValueChange: n, appearance: r = "list", disabled: l, name: u, label: d, "aria-label": f, fullWidth: p, size: m = "md", className: h }, g) {
34
+ let _ = c(), v = N(), y = _("rolePicker.builtInRoles", "Built-in roles"), b = _("rolePicker.customRoles", "Custom roles"), x = e.some((e) => e.custom);
35
+ if (r === "select") return /* @__PURE__ */ I("div", {
32
36
  ref: g,
33
37
  className: i("min-w-0", p && "w-full", h),
34
- children: /* @__PURE__ */ j(s, {
38
+ children: /* @__PURE__ */ I(s, {
35
39
  ...d ? { label: d } : {},
36
40
  ...f ? { "aria-label": f } : {},
37
41
  ...u ? { name: u } : {},
@@ -60,54 +64,54 @@ var F = { appearance: {
60
64
  caption: void 0,
61
65
  items: e
62
66
  }];
63
- return /* @__PURE__ */ j(P, {
67
+ return /* @__PURE__ */ I(z, {
64
68
  ref: g,
65
69
  ...t == null ? {} : { value: t },
66
70
  ...n ? { onValueChange: (e) => n(String(e)) } : {},
67
71
  ...l === void 0 ? {} : { disabled: l },
68
72
  ...u ? { name: u } : {},
69
73
  "aria-label": f ?? d ?? _("rolePicker.role", "Role"),
70
- className: i(F.appearance.list.classes, h),
71
- children: S.filter((e) => e.items.length > 0).map((e, t) => /* @__PURE__ */ j(E, { children: /* @__PURE__ */ M("div", {
74
+ className: i(B.appearance.list.classes, h),
75
+ children: S.filter((e) => e.items.length > 0).map((e, t) => /* @__PURE__ */ I(A, { children: /* @__PURE__ */ L("div", {
72
76
  className: "flex flex-col gap-8",
73
- children: [e.caption && /* @__PURE__ */ j("span", {
77
+ children: [e.caption && /* @__PURE__ */ I("span", {
74
78
  className: "text-caption font-medium text-fg-secondary",
75
79
  children: e.caption
76
- }), /* @__PURE__ */ j("div", {
80
+ }), /* @__PURE__ */ I("div", {
77
81
  className: "flex flex-col overflow-hidden rounded-group bg-fill-1",
78
82
  children: e.items.map((e, n) => {
79
83
  let r = `${v}-${t}-${n}`, s = l || e.disabled;
80
- return /* @__PURE__ */ M("label", {
84
+ return /* @__PURE__ */ L("label", {
81
85
  htmlFor: r,
82
86
  "data-choice-row": "",
83
87
  ...e["data-force"] ? { "data-force": e["data-force"] } : {},
84
88
  className: i("flex min-h-56 cursor-pointer items-center gap-16 px-20 py-12 transition-control not-first:divider-t", s ? "cursor-not-allowed" : "hover:bg-fill-2 active:bg-fill-3 focus-ring-card-row-within"),
85
- children: [/* @__PURE__ */ M("span", {
89
+ children: [/* @__PURE__ */ L("span", {
86
90
  className: "flex min-w-0 flex-1 flex-col gap-2",
87
91
  children: [
88
- /* @__PURE__ */ M("span", {
92
+ /* @__PURE__ */ L("span", {
89
93
  className: "flex min-w-0 items-baseline gap-8",
90
- children: [/* @__PURE__ */ j("span", {
94
+ children: [/* @__PURE__ */ I("span", {
91
95
  id: `${r}-name`,
92
96
  className: i("min-w-0 wrap-break-word text-body-lg font-medium", s ? "text-fg-disabled" : "text-fg"),
93
97
  children: e.label
94
- }), e.hint && /* @__PURE__ */ j("span", {
98
+ }), e.hint && /* @__PURE__ */ I("span", {
95
99
  className: i("ml-auto shrink-0 text-small", a(e.hint), s ? "text-fg-disabled" : "text-fg-tertiary"),
96
100
  children: e.hint
97
101
  })]
98
102
  }),
99
- e.description && /* @__PURE__ */ j("span", {
103
+ e.description && /* @__PURE__ */ I("span", {
100
104
  id: `${r}-desc`,
101
105
  className: i("text-small text-pretty", s ? "text-fg-disabled" : "text-fg-secondary"),
102
106
  children: e.description
103
107
  }),
104
- e.disabled && e.disabledReason && /* @__PURE__ */ j("span", {
108
+ e.disabled && e.disabledReason && /* @__PURE__ */ I("span", {
105
109
  id: `${r}-reason`,
106
110
  className: "text-small text-pretty text-fg-secondary",
107
111
  children: e.disabledReason
108
112
  })
109
113
  ]
110
- }), /* @__PURE__ */ j(o, {
114
+ }), /* @__PURE__ */ I(o, {
111
115
  id: r,
112
116
  value: e.value,
113
117
  ...e.disabled ? { disabled: !0 } : {},
@@ -121,35 +125,35 @@ var F = { appearance: {
121
125
  }) }, e.caption ?? "all"))
122
126
  });
123
127
  });
124
- process.env.NODE_ENV !== "production" && (L.displayName = "RolePicker");
128
+ process.env.NODE_ENV !== "production" && (H.displayName = "RolePicker");
125
129
  // src/components/kaeso/effective-access.tsx
126
- var R = { layout: { rows: { classes: "flex flex-col @auth:grid @auth:grid-cols-term @auth:gap-x-16" } } }, z = { layout: "rows" }, B = /* @__PURE__ */ D(function({ groups: e, sources: t, action: n, "aria-label": r, className: a }, o) {
130
+ var U = { layout: { rows: { classes: "flex flex-col @auth:grid @auth:grid-cols-term @auth:gap-x-16" } } }, W = { layout: "rows" }, G = /* @__PURE__ */ j(function({ groups: e, sources: t, action: n, "aria-label": r, className: a }, o) {
127
131
  let s = c(), l = e.filter((e) => !e.rights.some((e) => e.granted));
128
- return /* @__PURE__ */ M("div", {
132
+ return /* @__PURE__ */ L("div", {
129
133
  ref: o,
130
134
  role: "group",
131
135
  "aria-label": r ?? s("effectiveAccess.access", "Access"),
132
136
  className: i("@container flex min-w-0 flex-col gap-12", a),
133
137
  children: [
134
- !!t?.length && /* @__PURE__ */ M("span", {
138
+ !!t?.length && /* @__PURE__ */ L("span", {
135
139
  className: "flex flex-wrap items-center gap-4",
136
- children: [/* @__PURE__ */ j("span", {
140
+ children: [/* @__PURE__ */ I("span", {
137
141
  className: "mr-4 text-small text-fg-secondary",
138
142
  children: s("effectiveAccess.from", "From")
139
- }), t.map((e) => e.detail ? /* @__PURE__ */ j(d, {
143
+ }), t.map((e) => e.detail ? /* @__PURE__ */ I(d, {
140
144
  content: e.detail,
141
- children: /* @__PURE__ */ j(u, {
145
+ children: /* @__PURE__ */ I(u, {
142
146
  tabIndex: 0,
143
147
  className: "cursor-help underline decoration-dotted underline-offset-2 focus-ring",
144
148
  children: e.label
145
149
  })
146
- }, e.label) : /* @__PURE__ */ j(u, { children: e.label }, e.label))]
150
+ }, e.label) : /* @__PURE__ */ I(u, { children: e.label }, e.label))]
147
151
  }),
148
- /* @__PURE__ */ M("dl", {
149
- className: R.layout.rows.classes,
152
+ /* @__PURE__ */ L("dl", {
153
+ className: U.layout.rows.classes,
150
154
  children: [e.filter((e) => e.rights.some((e) => e.granted)).map((e) => {
151
155
  let t = e.rights.filter((e) => e.granted), n = t.length === e.rights.length ? s("effectiveAccess.everyRight", "Every right") : t.map((e) => e.label ?? e.code).join(s("effectiveAccess.listSeparator", ", "));
152
- return /* @__PURE__ */ j(V, {
156
+ return /* @__PURE__ */ I(K, {
153
157
  term: e.label,
154
158
  count: s("effectiveAccess.grantedOfTotal", "{granted} of {total}", {
155
159
  granted: t.length,
@@ -157,32 +161,32 @@ var R = { layout: { rows: { classes: "flex flex-col @auth:grid @auth:grid-cols-t
157
161
  }),
158
162
  children: n
159
163
  }, e.label);
160
- }), l.length > 0 && /* @__PURE__ */ j(V, {
164
+ }), l.length > 0 && /* @__PURE__ */ I(K, {
161
165
  term: s("effectiveAccess.noRights", "No rights"),
162
166
  quiet: !0,
163
167
  children: l.map((e) => e.label).join(s("effectiveAccess.listSeparator", ", "))
164
168
  })]
165
169
  }),
166
- n && /* @__PURE__ */ j("div", {
170
+ n && /* @__PURE__ */ I("div", {
167
171
  className: "flex",
168
172
  children: n
169
173
  })
170
174
  ]
171
175
  });
172
176
  });
173
- process.env.NODE_ENV !== "production" && (B.displayName = "EffectiveAccess");
174
- function V({ term: e, count: t, quiet: n, children: r }) {
175
- return /* @__PURE__ */ M("div", {
177
+ process.env.NODE_ENV !== "production" && (G.displayName = "EffectiveAccess");
178
+ function K({ term: e, count: t, quiet: n, children: r }) {
179
+ return /* @__PURE__ */ L("div", {
176
180
  className: "flex min-h-40 flex-col justify-center gap-2 py-8 not-first:divider-t @auth:col-span-2 @auth:grid @auth:grid-cols-subgrid @auth:content-center @auth:items-baseline @auth:gap-16",
177
- children: [/* @__PURE__ */ j("dt", {
181
+ children: [/* @__PURE__ */ I("dt", {
178
182
  className: i("shrink-0 text-small font-medium @auth:min-w-140", n ? "text-fg-secondary" : "text-fg"),
179
183
  children: e
180
- }), /* @__PURE__ */ M("dd", {
184
+ }), /* @__PURE__ */ L("dd", {
181
185
  className: "flex min-w-0 flex-1 items-baseline gap-12",
182
- children: [/* @__PURE__ */ j("span", {
186
+ children: [/* @__PURE__ */ I("span", {
183
187
  className: "min-w-0 flex-1 text-small text-pretty text-fg-secondary",
184
188
  children: r
185
- }), t && /* @__PURE__ */ j("span", {
189
+ }), t && /* @__PURE__ */ I("span", {
186
190
  className: "shrink-0 text-small text-fg-secondary tabular",
187
191
  children: t
188
192
  })]
@@ -190,13 +194,13 @@ function V({ term: e, count: t, quiet: n, children: r }) {
190
194
  });
191
195
  }
192
196
  // src/components/kaeso/provider-picker.tsx
193
- var H = { appearance: {
197
+ var te = { appearance: {
194
198
  list: { classes: "" },
195
199
  select: { classes: "" },
196
200
  grid: { classes: "" }
197
- } }, U = { appearance: "list" }, W = "", G = 9;
198
- function ee({ providers: t, ordered: r, disabled: a, value: o, onValueChange: s, onChoose: u, autoFocus: d, label: p, className: m }) {
199
- let h = c(), g = l(), [_, v] = A(""), y = _.trim().toLowerCase(), b = (t) => e(t.id, t.name), x = (e, t) => r ? 0 : b(e).localeCompare(b(t), g, { sensitivity: "base" }), S = t.filter((e) => !y || [
201
+ } }, q = { appearance: "list" }, J = "", Y = 9;
202
+ function ne({ providers: t, ordered: r, disabled: a, value: o, onValueChange: s, onChoose: u, autoFocus: d, label: p, className: m }) {
203
+ let h = c(), g = l(), [_, v] = F(""), y = _.trim().toLowerCase(), b = (t) => e(t.id, t.name), x = (e, t) => r ? 0 : b(e).localeCompare(b(t), g, { sensitivity: "base" }), S = t.filter((e) => !y || [
200
204
  e.id,
201
205
  b(e),
202
206
  ...e.keywords ?? []
@@ -212,10 +216,10 @@ function ee({ providers: t, ordered: r, disabled: a, value: o, onValueChange: s,
212
216
  id: "providers",
213
217
  label: void 0,
214
218
  items: [...C, ...w]
215
- }], E = t.length > G;
216
- return /* @__PURE__ */ M("div", {
219
+ }], E = t.length > Y;
220
+ return /* @__PURE__ */ L("div", {
217
221
  className: i("flex min-w-0 flex-col gap-16", m),
218
- children: [E && /* @__PURE__ */ j(f, {
222
+ children: [E && /* @__PURE__ */ I(f, {
219
223
  type: "search",
220
224
  size: "sm",
221
225
  "aria-label": h("providerPicker.search", "Search providers"),
@@ -224,49 +228,49 @@ function ee({ providers: t, ordered: r, disabled: a, value: o, onValueChange: s,
224
228
  value: _,
225
229
  onChange: (e) => v(e.target.value),
226
230
  ...d ? { autoFocus: !0 } : {}
227
- }), S.length === 0 ? /* @__PURE__ */ j("p", {
231
+ }), S.length === 0 ? /* @__PURE__ */ I("p", {
228
232
  className: "py-24 text-center text-body text-fg-secondary",
229
233
  children: h("providerPicker.noMatch", "No providers match")
230
- }) : /* @__PURE__ */ j(P, {
234
+ }) : /* @__PURE__ */ I(z, {
231
235
  "aria-label": p,
232
236
  value: o ?? null,
233
237
  ...a ? { disabled: !0 } : {},
234
238
  onValueChange: (e) => s?.(e ? String(e) : null),
235
239
  className: "flex flex-col gap-20",
236
- children: T.map((e, t) => /* @__PURE__ */ M("div", {
240
+ children: T.map((e, t) => /* @__PURE__ */ L("div", {
237
241
  ...e.label ? {
238
242
  role: "group",
239
243
  "aria-label": e.label
240
244
  } : {},
241
245
  className: "flex flex-col gap-8",
242
- children: [e.label && /* @__PURE__ */ j("div", {
246
+ children: [e.label && /* @__PURE__ */ I("div", {
243
247
  "aria-hidden": !0,
244
248
  className: "text-caption font-medium text-fg-secondary",
245
249
  children: e.label
246
- }), /* @__PURE__ */ j("div", {
250
+ }), /* @__PURE__ */ I("div", {
247
251
  className: "grid grid-cols-2 gap-8 sm:grid-cols-3",
248
- children: e.items.map((e, r) => /* @__PURE__ */ M(N.Root, {
252
+ children: e.items.map((e, r) => /* @__PURE__ */ L(R.Root, {
249
253
  value: e.id,
250
254
  ...e.disabled ? { disabled: !0 } : {},
251
255
  ...e["data-force"] ? { "data-force": e["data-force"] } : {},
252
256
  ...d && !E && t === 0 && r === 0 && !o ? { autoFocus: !0 } : {},
253
257
  onClick: () => !a && !e.disabled && u?.(e.id),
254
258
  className: i("group/tile flex min-h-64 min-w-0 cursor-pointer items-center gap-10 rounded-group bg-fill-1 px-10 py-12 sm:gap-12 sm:px-12 text-left transition-control focus-ring forced-checked", "hover:not-data-checked:bg-fill-2 active:bg-fill-3", "data-checked:ring-step data-disabled:cursor-not-allowed data-disabled:opacity-40"),
255
- children: [/* @__PURE__ */ j("span", {
259
+ children: [/* @__PURE__ */ I("span", {
256
260
  "aria-hidden": !0,
257
261
  className: "flex",
258
- children: /* @__PURE__ */ j(n, {
262
+ children: /* @__PURE__ */ I(n, {
259
263
  provider: e.id,
260
264
  name: e.name,
261
265
  icon: e.icon,
262
266
  size: "lg"
263
267
  })
264
- }), /* @__PURE__ */ M("span", {
268
+ }), /* @__PURE__ */ L("span", {
265
269
  className: "flex min-w-0 flex-1 flex-col",
266
- children: [/* @__PURE__ */ j("span", {
270
+ children: [/* @__PURE__ */ I("span", {
267
271
  className: "line-clamp-3 text-body font-medium text-pretty wrap-break-word text-fg",
268
272
  children: b(e)
269
- }), e.hint !== void 0 && /* @__PURE__ */ j("span", {
273
+ }), e.hint !== void 0 && /* @__PURE__ */ I("span", {
270
274
  className: "line-clamp-2 text-small text-pretty text-fg-secondary",
271
275
  children: e.hint
272
276
  })]
@@ -277,17 +281,17 @@ function ee({ providers: t, ordered: r, disabled: a, value: o, onValueChange: s,
277
281
  })]
278
282
  });
279
283
  }
280
- function K(t, r, i) {
284
+ function X(t, r, i) {
281
285
  let a = c(), o = l();
282
- return k(() => {
286
+ return P(() => {
283
287
  let s = (t) => e(t.id, t.name), c = (e, t) => i ? 0 : s(e).localeCompare(s(t), o, { sensitivity: "base" }), l = (e) => ({
284
288
  value: e.id,
285
289
  label: s(e),
286
290
  keywords: [e.id, ...e.keywords ?? []],
287
- leading: /* @__PURE__ */ j("span", {
291
+ leading: /* @__PURE__ */ I("span", {
288
292
  "aria-hidden": !0,
289
293
  className: "flex",
290
- children: /* @__PURE__ */ j(n, {
294
+ children: /* @__PURE__ */ I(n, {
291
295
  provider: e.id,
292
296
  name: e.name,
293
297
  icon: e.icon
@@ -299,7 +303,7 @@ function K(t, r, i) {
299
303
  return r && f.push({
300
304
  id: "all",
301
305
  items: [{
302
- value: W,
306
+ value: J,
303
307
  label: r
304
308
  }]
305
309
  }), u.length && d.length ? (f.push({
@@ -322,23 +326,23 @@ function K(t, r, i) {
322
326
  o
323
327
  ]);
324
328
  }
325
- var q = /* @__PURE__ */ D(function(t, r) {
326
- let { providers: i, value: a, onValueChange: o, onChoose: s, appearance: l = "list", ordered: u, allLabel: d, placeholder: f, size: y = "md", disabled: b, autoFocus: x, "aria-label": S, className: C, "data-force": w, label: T, description: E, error: D, optional: O, required: N, layout: P } = t, F = c(), I = g(), L = _(t), [R, z] = A(!1), B = K(k(() => b && l === "list" ? i.map((e) => ({
329
+ var Z = /* @__PURE__ */ j(function(t, r) {
330
+ let { providers: i, value: a, onValueChange: o, onChoose: s, appearance: l = "list", ordered: u, allLabel: d, placeholder: f, size: y = "md", disabled: b, autoFocus: x, "aria-label": S, className: C, "data-force": w, label: T, description: E, error: D, optional: O, required: k, layout: A } = t, j = c(), M = g(), N = _(t), [ee, R] = F(!1), z = X(P(() => b && l === "list" ? i.map((e) => ({
327
331
  ...e,
328
332
  disabled: !0
329
333
  })) : i, [
330
334
  i,
331
335
  b,
332
336
  l
333
- ]), l === "select" ? d : void 0, u), V = S ?? (typeof T == "string" ? T : F("providerPicker.providers", "Providers")), H = f ?? F("providerPicker.search", "Search providers"), U = F("providerPicker.noMatch", "No providers match"), G = (e) => /* @__PURE__ */ j(p, {
334
- groups: B,
335
- "aria-label": V,
336
- value: a ?? (d ? W : null),
337
+ ]), l === "select" ? d : void 0, u), B = S ?? (typeof T == "string" ? T : j("providerPicker.providers", "Providers")), V = f ?? j("providerPicker.search", "Search providers"), H = j("providerPicker.noMatch", "No providers match"), U = (e) => /* @__PURE__ */ I(p, {
338
+ groups: z,
339
+ "aria-label": B,
340
+ value: a ?? (d ? J : null),
337
341
  onSelect: (e) => {
338
- o?.(e === W ? null : e), z(!1);
342
+ o?.(e === J ? null : e), R(!1);
339
343
  },
340
- placeholder: H,
341
- emptyText: U,
344
+ placeholder: V,
345
+ emptyText: H,
342
346
  ...e ? { height: e } : {},
343
347
  ...x || l === "select" ? { autoFocus: !0 } : {},
344
348
  ...e && w ? { "data-force": w } : {},
@@ -346,7 +350,7 @@ var q = /* @__PURE__ */ D(function(t, r) {
346
350
  ...e ? { ref: r } : {}
347
351
  });
348
352
  if (l === "grid") {
349
- let e = /* @__PURE__ */ j(ee, {
353
+ let e = /* @__PURE__ */ I(ne, {
350
354
  providers: i,
351
355
  ordered: u,
352
356
  disabled: b,
@@ -354,142 +358,396 @@ var q = /* @__PURE__ */ D(function(t, r) {
354
358
  onValueChange: o,
355
359
  onChoose: s,
356
360
  autoFocus: x,
357
- label: V,
361
+ label: B,
358
362
  className: T || E || D ? void 0 : C
359
363
  });
360
- return I ? e : v({
364
+ return M ? e : v({
361
365
  label: T,
362
366
  description: E,
363
367
  error: D,
364
368
  optional: O,
365
- required: N,
366
- layout: P,
367
- id: L.wrapId,
369
+ required: k,
370
+ layout: A,
371
+ id: N.wrapId,
368
372
  disabled: b,
369
373
  className: C
370
374
  }, e);
371
375
  }
372
376
  if (l === "list") {
373
- let e = G("inline");
374
- return I ? e : v({
377
+ let e = U("inline");
378
+ return M ? e : v({
375
379
  label: T,
376
380
  description: E,
377
381
  error: D,
378
382
  optional: O,
379
- required: N,
380
- layout: P,
381
- id: L.wrapId,
383
+ required: k,
384
+ layout: A,
385
+ id: N.wrapId,
382
386
  disabled: b,
383
387
  className: C
384
388
  }, e);
385
389
  }
386
- let q = i.find((e) => e.id === a), J = /* @__PURE__ */ j(h, {
387
- title: V,
390
+ let W = i.find((e) => e.id === a), G = /* @__PURE__ */ I(h, {
391
+ title: B,
388
392
  width: "sm",
389
- open: R,
390
- onOpenChange: z,
391
- trigger: /* @__PURE__ */ j(m, {
393
+ open: ee,
394
+ onOpenChange: R,
395
+ trigger: /* @__PURE__ */ I(m, {
392
396
  ref: r,
393
397
  size: y === "sm" ? "sm" : "md",
394
- ...L.controlProps,
398
+ ...N.controlProps,
395
399
  ...S ? { "aria-label": S } : {},
396
400
  ...b ? { disabled: b } : {},
397
401
  ...w ? { "data-force": w } : {},
398
- placeholder: f ?? F("providerPicker.choose", "Choose a provider"),
402
+ placeholder: f ?? j("providerPicker.choose", "Choose a provider"),
399
403
  ...!(T || E || D) && C ? { className: C } : {},
400
- children: q ? /* @__PURE__ */ M("span", {
404
+ children: W ? /* @__PURE__ */ L("span", {
401
405
  className: "flex min-w-0 items-center gap-8",
402
- children: [/* @__PURE__ */ j("span", {
406
+ children: [/* @__PURE__ */ I("span", {
403
407
  "aria-hidden": !0,
404
408
  className: "flex",
405
- children: /* @__PURE__ */ j(n, {
406
- provider: q.id,
407
- name: q.name
409
+ children: /* @__PURE__ */ I(n, {
410
+ provider: W.id,
411
+ name: W.name
408
412
  })
409
- }), /* @__PURE__ */ j("span", {
413
+ }), /* @__PURE__ */ I("span", {
410
414
  className: "truncate",
411
- children: e(q.id, q.name)
415
+ children: e(W.id, W.name)
412
416
  })]
413
417
  }) : d
414
418
  }),
415
- children: G()
419
+ children: U()
416
420
  });
417
- return I ? J : v({
421
+ return M ? G : v({
418
422
  label: T,
419
423
  description: E,
420
424
  error: D,
421
425
  optional: O,
422
- required: N,
423
- layout: P,
424
- id: L.wrapId,
426
+ required: k,
427
+ layout: A,
428
+ id: N.wrapId,
425
429
  disabled: b,
426
430
  className: C
427
- }, J);
431
+ }, G);
428
432
  });
429
- process.env.NODE_ENV !== "production" && (q.displayName = "ProviderPicker");
433
+ process.env.NODE_ENV !== "production" && (Z.displayName = "ProviderPicker");
434
+ // src/components/kaeso/scope-picker.tsx
435
+ var Q = { size: {
436
+ sm: { classes: "" },
437
+ md: { classes: "" }
438
+ } }, re = { size: "md" }, ie = "*", ae = {
439
+ providers: [],
440
+ models: []
441
+ }, oe = (e) => `p:${e}`, se = (e) => `m:${e}`;
442
+ function ce({ name: e, model: t, query: n, note: r }) {
443
+ return /* @__PURE__ */ L(ee, { children: [/* @__PURE__ */ L("span", {
444
+ className: "flex min-w-0 flex-1 items-baseline gap-8",
445
+ children: [/* @__PURE__ */ I("span", {
446
+ className: "min-w-0 shrink truncate",
447
+ children: /* @__PURE__ */ I(b, {
448
+ text: e,
449
+ query: n
450
+ })
451
+ }), e !== t && /* @__PURE__ */ I("span", {
452
+ className: "min-w-0 flex-1 truncate mono text-small font-regular text-fg-tertiary",
453
+ children: /* @__PURE__ */ I(b, {
454
+ text: t,
455
+ query: n
456
+ })
457
+ })]
458
+ }), r && /* @__PURE__ */ I("span", {
459
+ className: "shrink-0 text-caption font-regular text-fg-secondary",
460
+ children: r
461
+ })] });
462
+ }
463
+ var le = /* @__PURE__ */ j(function(t, r) {
464
+ let { providers: a, models: o, everyLabel: s, size: u = "md", disabled: d, "aria-label": f, "data-force": b, className: C, label: w, description: T, error: E, optional: D, required: O, layout: k } = t, A = c(), j = l(), { formatNumber: N } = y(), ee = g(), R = _(t), [z, B] = F(() => t.defaultValue ?? ae), V = t.value ?? z, [H, U] = F(""), [W, G] = F(!1), [K, te] = F(!1), q = s ?? A("scopePicker.every", "Every provider and model"), J = P(() => new Map(a.map((e) => [e.id, e])), [a]), Y = M((t) => e(t, J.get(t)?.name), [J]), ne = P(() => new Map(o.map((e) => [e.value, e])), [o]), X = P(() => new Set(V.providers), [V.providers]), Z = P(() => [.../* @__PURE__ */ new Set([...a.map((e) => e.id), ...o.map((e) => e.provider)])].sort((e, t) => Number(!!J.get(t)?.connected) - Number(!!J.get(e)?.connected) || Y(e).localeCompare(Y(t), j, { sensitivity: "base" })), [
465
+ a,
466
+ o,
467
+ J,
468
+ Y,
469
+ j
470
+ ]), Q = (e) => {
471
+ t.value === void 0 && B(e), t.onValueChange?.(e);
472
+ }, re = (e) => {
473
+ if (e === ie) {
474
+ Q(ae);
475
+ return;
476
+ }
477
+ if (e.startsWith("p:")) {
478
+ let t = e.slice(2);
479
+ X.has(t) ? Q({
480
+ ...V,
481
+ providers: V.providers.filter((e) => e !== t)
482
+ }) : Q({
483
+ providers: [...V.providers, t],
484
+ models: V.models.filter((e) => ne.get(e)?.provider !== t)
485
+ });
486
+ return;
487
+ }
488
+ let t = e.slice(2);
489
+ Q({
490
+ ...V,
491
+ models: V.models.includes(t) ? V.models.filter((e) => e !== t) : [...V.models, t]
492
+ });
493
+ }, le = H.trim() !== "", ue = P(() => {
494
+ if (!W) return [];
495
+ let e = Z.filter((e) => J.has(e) && (le || !J.get(e)?.searchOnly || X.has(e))).map((e) => ({
496
+ value: oe(e),
497
+ label: Y(e),
498
+ keywords: [e],
499
+ leading: /* @__PURE__ */ I("span", {
500
+ "aria-hidden": !0,
501
+ className: "flex",
502
+ children: /* @__PURE__ */ I(n, {
503
+ provider: e,
504
+ name: Y(e),
505
+ size: "sm"
506
+ })
507
+ }),
508
+ meta: A("scopePicker.allModels", "All its models")
509
+ })), t = /* @__PURE__ */ new Map();
510
+ for (let e of o) {
511
+ if (e.deprecated && !K && !V.models.includes(e.value)) continue;
512
+ let n = t.get(e.provider);
513
+ n ? n.push(e) : t.set(e.provider, [e]);
514
+ }
515
+ let r = Z.flatMap((e) => {
516
+ let r = t.get(e);
517
+ if (!r) return [];
518
+ let i = X.has(e);
519
+ return [{
520
+ id: `models:${e}`,
521
+ label: Y(e),
522
+ leading: /* @__PURE__ */ I("span", {
523
+ "aria-hidden": !0,
524
+ className: "flex",
525
+ children: /* @__PURE__ */ I(n, {
526
+ provider: e,
527
+ name: Y(e),
528
+ size: "sm"
529
+ })
530
+ }),
531
+ count: N(r.length),
532
+ items: r.map((t) => {
533
+ let n = t.model ?? t.value, r = t.name ?? n, a = i ? A("scopePicker.withProvider", "With {provider}", { provider: Y(e) }) : t.deprecated ? A("scopePicker.deprecated", "Deprecated") : void 0;
534
+ return {
535
+ value: se(t.value),
536
+ label: r,
537
+ keywords: [
538
+ n,
539
+ Y(e),
540
+ e
541
+ ],
542
+ render: ({ query: e }) => /* @__PURE__ */ I(ce, {
543
+ name: r,
544
+ model: n,
545
+ query: e,
546
+ note: a
547
+ }),
548
+ ...i ? { disabled: !0 } : {}
549
+ };
550
+ })
551
+ }];
552
+ });
553
+ return [
554
+ {
555
+ id: "every",
556
+ items: [{
557
+ value: ie,
558
+ label: q
559
+ }]
560
+ },
561
+ ...e.length ? [{
562
+ id: "providers",
563
+ label: A("scopePicker.providers", "Providers"),
564
+ items: e
565
+ }] : [],
566
+ ...r
567
+ ];
568
+ }, [
569
+ W,
570
+ Z,
571
+ J,
572
+ Y,
573
+ o,
574
+ V.models,
575
+ X,
576
+ q,
577
+ A,
578
+ N,
579
+ K,
580
+ le
581
+ ]), de = o.some((e) => e.deprecated && !V.models.includes(e.value)), fe = P(() => {
582
+ if (V.providers.length === 0 && V.models.length === 0) return [ie];
583
+ let e = o.filter((e) => X.has(e.provider)).map((e) => se(e.value));
584
+ return [
585
+ ...V.providers.map(oe),
586
+ ...V.models.map(se),
587
+ ...e
588
+ ];
589
+ }, [
590
+ V,
591
+ o,
592
+ X
593
+ ]), pe = V.providers.length + V.models.length, me = f ?? (typeof w == "string" ? w : A("scopePicker.label", "Providers and models")), he = [...V.providers.map((e) => ({
594
+ key: oe(e),
595
+ provider: e,
596
+ label: Y(e),
597
+ title: void 0
598
+ })), ...V.models.map((e) => {
599
+ let t = ne.get(e), n = t?.model ?? e;
600
+ return {
601
+ key: se(e),
602
+ provider: t?.provider ?? "",
603
+ label: t?.name ?? n,
604
+ title: t ? `${Y(t.provider)} · ${n}` : void 0
605
+ };
606
+ })], ge = /* @__PURE__ */ L("div", {
607
+ className: i("flex min-w-0 flex-col gap-8", !(w || T || E) && C),
608
+ children: [/* @__PURE__ */ I(h, {
609
+ title: me,
610
+ width: "lg",
611
+ open: W,
612
+ onOpenChange: (e) => {
613
+ G(e), e && U("");
614
+ },
615
+ trigger: /* @__PURE__ */ I(m, {
616
+ ref: r,
617
+ size: u,
618
+ fullWidth: !0,
619
+ ...R.controlProps,
620
+ ...f || !w ? { "aria-label": me } : {},
621
+ ...d ? { disabled: d } : {},
622
+ ...E ? { invalid: !0 } : {},
623
+ ...b ? { "data-force": b } : {},
624
+ children: pe === 0 ? q : A("scopePicker.chosen", "{count, plural, one {# provider or model} other {# providers and models}}", { count: pe })
625
+ }),
626
+ children: /* @__PURE__ */ I(p, {
627
+ groups: ue,
628
+ "aria-label": me,
629
+ value: fe,
630
+ multiple: !0,
631
+ onSelect: re,
632
+ query: H,
633
+ onQueryChange: U,
634
+ placeholder: A("scopePicker.search", "Search providers and models"),
635
+ emptyText: A("scopePicker.noMatch", "No provider or model matches"),
636
+ toolbar: de ? /* @__PURE__ */ I(x, {
637
+ size: "sm",
638
+ label: A("modelPicker.showDeprecated", "Show deprecated"),
639
+ checked: K,
640
+ onCheckedChange: te
641
+ }) : void 0,
642
+ autoFocus: !0
643
+ })
644
+ }), he.length > 0 && /* @__PURE__ */ I("ul", {
645
+ "aria-label": A("scopePicker.chosenList", "Chosen providers and models"),
646
+ className: "flex min-w-0 flex-wrap gap-6",
647
+ children: he.map((e) => /* @__PURE__ */ I("li", {
648
+ className: "flex min-w-0 max-w-full",
649
+ children: /* @__PURE__ */ I(S, {
650
+ ...d ? {} : {
651
+ onRemove: () => re(e.key),
652
+ removeLabel: A("combobox.remove", "Remove {label}", { label: e.label })
653
+ },
654
+ ...e.title ? { title: e.title } : {},
655
+ className: "max-w-full",
656
+ children: /* @__PURE__ */ L("span", {
657
+ className: "flex min-w-0 items-center gap-6",
658
+ children: [e.provider && /* @__PURE__ */ I("span", {
659
+ "aria-hidden": !0,
660
+ className: "flex shrink-0",
661
+ children: /* @__PURE__ */ I(n, {
662
+ provider: e.provider,
663
+ name: Y(e.provider),
664
+ size: "sm"
665
+ })
666
+ }), /* @__PURE__ */ I("span", {
667
+ className: "min-w-0 truncate",
668
+ children: e.label
669
+ })]
670
+ })
671
+ })
672
+ }, e.key))
673
+ })]
674
+ });
675
+ return ee ? ge : v({
676
+ label: w,
677
+ description: T,
678
+ error: E,
679
+ optional: D,
680
+ required: O,
681
+ layout: k,
682
+ id: R.wrapId,
683
+ disabled: d,
684
+ className: C
685
+ }, ge);
686
+ });
687
+ process.env.NODE_ENV !== "production" && (le.displayName = "ScopePicker");
430
688
  // src/components/kaeso/grant-summary.tsx
431
- var J = {}, te = {}, Y = /* @__PURE__ */ D(function({ items: e = [], sections: t, footer: n, action: r, "aria-label": a, className: o }, s) {
689
+ var ue = {}, de = {}, fe = /* @__PURE__ */ j(function({ items: e = [], sections: t, footer: n, action: r, "aria-label": a, className: o }, s) {
432
690
  let c = !!t?.length;
433
- return /* @__PURE__ */ M("div", {
691
+ return /* @__PURE__ */ L("div", {
434
692
  ref: s,
435
693
  className: i("flex flex-col gap-16 rounded-group bg-fill-1", c ? "px-8 pt-8 pb-12" : "p-20", o),
436
- children: [c ? /* @__PURE__ */ j("ul", {
694
+ children: [c ? /* @__PURE__ */ I("ul", {
437
695
  "aria-label": a,
438
696
  className: "flex flex-col",
439
- children: t.map((e) => /* @__PURE__ */ j("li", { children: /* @__PURE__ */ j(y, {
697
+ children: t.map((e) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I(C, {
440
698
  title: e.title,
441
699
  hint: e.hint,
442
700
  ...e.defaultOpen === void 0 ? {} : { defaultOpen: e.defaultOpen },
443
- children: /* @__PURE__ */ j("ul", {
701
+ children: /* @__PURE__ */ I("ul", {
444
702
  className: "flex flex-wrap gap-6",
445
- children: e.items.map((e, t) => /* @__PURE__ */ j("li", { children: /* @__PURE__ */ j(b, {
703
+ children: e.items.map((e, t) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I(w, {
446
704
  className: "bg-fill-2",
447
705
  children: e
448
706
  }) }, t))
449
707
  })
450
708
  }) }, e.id))
451
- }) : /* @__PURE__ */ j("ul", {
709
+ }) : /* @__PURE__ */ I("ul", {
452
710
  "aria-label": a,
453
711
  className: "flex flex-col gap-10",
454
- children: e.map((e, t) => /* @__PURE__ */ M("li", {
712
+ children: e.map((e, t) => /* @__PURE__ */ L("li", {
455
713
  className: "flex items-start gap-10 text-body text-fg",
456
- children: [/* @__PURE__ */ j(S, {
457
- icon: x,
714
+ children: [/* @__PURE__ */ I(E, {
715
+ icon: T,
458
716
  size: "sm",
459
717
  className: "mt-2 text-success-text"
460
- }), /* @__PURE__ */ j("span", {
718
+ }), /* @__PURE__ */ I("span", {
461
719
  className: "min-w-0 text-pretty",
462
720
  children: e
463
721
  })]
464
722
  }, t))
465
- }), (n || r) && /* @__PURE__ */ M("div", {
723
+ }), (n || r) && /* @__PURE__ */ L("div", {
466
724
  className: i("flex items-center justify-between gap-12 pt-12 divider-t", c && "px-12"),
467
- children: [n && /* @__PURE__ */ j("p", {
725
+ children: [n && /* @__PURE__ */ I("p", {
468
726
  className: "min-w-0 text-small text-fg-secondary text-pretty",
469
727
  children: n
470
- }), r && /* @__PURE__ */ j("div", {
728
+ }), r && /* @__PURE__ */ I("div", {
471
729
  className: "ml-auto shrink-0",
472
730
  children: r
473
731
  })]
474
732
  })]
475
733
  });
476
734
  });
477
- process.env.NODE_ENV !== "production" && (Y.displayName = "GrantSummary");
735
+ process.env.NODE_ENV !== "production" && (fe.displayName = "GrantSummary");
478
736
  // src/components/kaeso/client-button.tsx
479
- var ne = {}, re = {}, X = {
737
+ var pe = {}, me = {}, he = {
480
738
  claude: "m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",
481
739
  cursor: "M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23",
482
740
  "github-copilot": "M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z",
483
741
  chatgpt: t
484
- }, ie = {
742
+ }, ge = {
485
743
  claude: "text-mark-claude",
486
744
  cursor: "text-fg",
487
745
  "github-copilot": "text-fg",
488
746
  chatgpt: "text-fg"
489
- }, Z = /* @__PURE__ */ D(function({ client: e, "aria-label": t, onClick: n, className: r, "data-force": a }, o) {
490
- return /* @__PURE__ */ j(d, {
747
+ }, _e = /* @__PURE__ */ j(function({ client: e, "aria-label": t, onClick: n, className: r, "data-force": a }, o) {
748
+ return /* @__PURE__ */ I(d, {
491
749
  content: t,
492
- children: /* @__PURE__ */ j("button", {
750
+ children: /* @__PURE__ */ I("button", {
493
751
  ref: o,
494
752
  type: "button",
495
753
  "aria-label": t,
@@ -497,26 +755,26 @@ var ne = {}, re = {}, X = {
497
755
  ...a ? { "data-force": a } : {},
498
756
  onClick: n,
499
757
  className: i("relative inline-flex size-32 shrink-0 items-center justify-center rounded-pill text-fg material-secondary transition-control focus-ring tap-target", r),
500
- children: /* @__PURE__ */ j("svg", {
758
+ children: /* @__PURE__ */ I("svg", {
501
759
  viewBox: "0 0 24 24",
502
760
  fill: "currentColor",
503
761
  fillRule: "evenodd",
504
762
  "aria-hidden": !0,
505
763
  focusable: "false",
506
- className: i("size-16", ie[e]),
507
- children: /* @__PURE__ */ j("path", { d: X[e] })
764
+ className: i("size-16", ge[e]),
765
+ children: /* @__PURE__ */ I("path", { d: he[e] })
508
766
  })
509
767
  })
510
768
  });
511
769
  });
512
- process.env.NODE_ENV !== "production" && (Z.displayName = "ClientButton");
770
+ process.env.NODE_ENV !== "production" && (_e.displayName = "ClientButton");
513
771
  // src/components/kaeso/source-badge.tsx
514
- var Q = { size: {
772
+ var ve = { size: {
515
773
  sm: { classes: "size-16 rounded-cell" },
516
774
  md: { classes: "size-20 rounded-avatar" },
517
775
  lg: { classes: "size-28 rounded-org" },
518
776
  xl: { classes: "size-40 rounded-org" }
519
- } }, ae = { size: "md" }, $ = {
777
+ } }, ye = { size: "md" }, $ = {
520
778
  claude_code: "M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z",
521
779
  codex: "M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z",
522
780
  gemini_cli: "M16.793 10.358v3.867L7.236 18.82v-2.8l7.751-3.728-7.75-3.728V5.763l9.556 4.595z M19.608 0A4.392 4.392 0 0124 4.392v15.216A4.392 4.392 0 0119.608 24H4.392A4.392 4.392 0 010 19.608V4.392A4.392 4.392 0 014.392 0h15.216zM4.26 1.444A2.816 2.816 0 001.444 4.26v15.48a2.816 2.816 0 002.816 2.816h15.48a2.816 2.816 0 002.816-2.816V4.26a2.816 2.816 0 00-2.816-2.816H4.26z",
@@ -524,7 +782,7 @@ var Q = { size: {
524
782
  opentelemetry: "M12.6974 13.1173c-1.0224 1.0224-1.0224 2.68 0 3.7024 1.0224 1.0224 2.68 1.0224 3.7024 0 1.0224-1.0223 1.0224-2.68 0-3.7024-1.0223-1.0223-2.68-1.0223-3.7024 0zm2.7677 2.7701c-.5063.5063-1.3267.5063-1.833 0s-.5063-1.3266 0-1.833c.5063-.5062 1.3267-.5062 1.833 0 .5063.504.5063 1.3267 0 1.833zM16.356.2355l-1.6041 1.6042c-.314.314-.314.83 0 1.144L21.015 9.247c.314.314.83.314 1.144 0l1.6042-1.6041c.314-.314.314-.83 0-1.144L17.4976.2354c-.314-.314-.8276-.314-1.1416 0zM5.1173 20.734c.2848-.2848.2848-.7497 0-1.0345l-.8155-.8155c-.2848-.2848-.7497-.2848-1.0345 0l-1.6845 1.6845-.0024.0024-.4625-.4625c-.2556-.2556-.6718-.2556-.925 0-.2556.2556-.2556.6718 0 .925l2.775 2.775c.2556.2556.6718.2556.925 0 .2532-.2556.2556-.6718 0-.925l-.4625-.4625.0024-.0024zm8.4856-15.893-3.5637 3.5637c-.3164.3164-.3164.8374 0 1.1538l2.2006 2.2005c1.5554-1.1197 3.7365-.981 5.1361.4187l1.7819-1.7818c.3164-.3165.3164-.8374 0-1.1538l-4.401-4.401c-.3165-.319-.8374-.319-1.1539 0zm-2.2881 7.8455-1.2999-1.2999c-.3043-.3043-.8033-.3043-1.1076 0l-4.5836 4.586c-.3042.3043-.3042.8033 0 1.1076l2.5973 2.5973c.3043.3043.8033.3043 1.1076 0l2.9478-2.9527c-.6231-1.2877-.5112-2.8431.3384-4.0383z",
525
783
  openrouter: "M18.376 3.806c2.693 0 4.876 2.201 4.876 4.917s-2.183 4.916-4.876 4.916l4.836 4.876c.615.62.18 1.679-.689 1.679H8.626C4.138 20.194.5 16.525.5 12s3.638-8.194 8.126-8.194zm-9.75 3.278c-2.693 0-4.876 2.2-4.876 4.916 0 2.715 2.183 4.916 4.876 4.916 2.692 0 4.875-2.2 4.875-4.916 0-2.715-2.183-4.916-4.875-4.916",
526
784
  grok: "M7.168 12.02.391 7.035h5.766l4.182 3.01q-1.677.964-3.17 1.975m9.512 7.1-5.077-3.745q1.7-1.287 2.872-2.114l7.995 5.859Zm-10.844 0H0l.69-.644q3.17-3.101 8.741-6.812Q14.622 8.207 24 4.88v1.931q-1.085.482-2.196 1.005-8.846 4.158-15.968 11.304"
527
- }, oe = {
785
+ }, be = {
528
786
  claude_code: {
529
787
  d: $.claude_code,
530
788
  color: "text-mark-claude"
@@ -595,10 +853,10 @@ var Q = { size: {
595
853
  d: $.grok,
596
854
  color: "text-mark-xai"
597
855
  }
598
- }, se = {
599
- litellm: C,
600
- http: w
601
- }, ce = {
856
+ }, xe = {
857
+ litellm: D,
858
+ http: O
859
+ }, Se = {
602
860
  claude_code: "Claude Code",
603
861
  codex: "Codex",
604
862
  gemini_cli: "Gemini CLI",
@@ -608,45 +866,45 @@ var Q = { size: {
608
866
  litellm: "LiteLLM",
609
867
  openrouter: "OpenRouter",
610
868
  grok: "Grok Build"
611
- }, le = {
869
+ }, Ce = {
612
870
  sm: "size-10",
613
871
  md: "size-12",
614
872
  lg: "size-16",
615
873
  xl: "size-24"
616
- }, ue = /* @__PURE__ */ D(function({ kind: e, name: t, size: n = "md", withName: a, decorative: o, className: s }, c) {
617
- let l = t?.trim() || ce[e] || e, u = $[e], d = oe[e] ?? (u ? {
874
+ }, we = /* @__PURE__ */ j(function({ kind: e, name: t, size: n = "md", withName: a, decorative: o, className: s }, c) {
875
+ let l = t?.trim() || Se[e] || e, u = $[e], d = be[e] ?? (u ? {
618
876
  d: u,
619
877
  color: "text-fg"
620
- } : void 0), f = /* @__PURE__ */ j("span", {
878
+ } : void 0), f = /* @__PURE__ */ I("span", {
621
879
  "aria-hidden": a || o || void 0,
622
880
  ...!a && !o ? {
623
881
  role: "img",
624
882
  "aria-label": l
625
883
  } : {},
626
884
  "data-source": e,
627
- className: i("inline-flex shrink-0 items-center justify-center bg-raised text-fg shadow-ring", Q.size[n].classes),
628
- children: d ? /* @__PURE__ */ j(r, {
885
+ className: i("inline-flex shrink-0 items-center justify-center bg-raised text-fg shadow-ring", ve.size[n].classes),
886
+ children: d ? /* @__PURE__ */ I(r, {
629
887
  mark: d,
630
- className: i(le[n], d.color)
631
- }) : /* @__PURE__ */ j(S, {
632
- icon: se[e] ?? T,
633
- className: le[n]
888
+ className: i(Ce[n], d.color)
889
+ }) : /* @__PURE__ */ I(E, {
890
+ icon: xe[e] ?? k,
891
+ className: Ce[n]
634
892
  })
635
893
  });
636
- return a ? /* @__PURE__ */ M("span", {
894
+ return a ? /* @__PURE__ */ L("span", {
637
895
  ref: c,
638
896
  className: i("inline-flex max-w-full min-w-0 items-center gap-8 text-body text-fg", s),
639
- children: [f, /* @__PURE__ */ j("span", {
897
+ children: [f, /* @__PURE__ */ I("span", {
640
898
  className: "min-w-0 truncate",
641
899
  children: l
642
900
  })]
643
- }) : /* @__PURE__ */ j("span", {
901
+ }) : /* @__PURE__ */ I("span", {
644
902
  ref: c,
645
903
  className: i("inline-flex", s),
646
904
  children: f
647
905
  });
648
906
  });
649
- process.env.NODE_ENV !== "production" && (ue.displayName = "SourceBadge");
650
- export { L as S, B as _, ue as a, I as b, re as c, te as d, J as f, K as g, q as h, ce as i, ne as l, H as m, Q as n, X as o, U as p, $ as r, Z as s, ae as t, Y as u, z as v, F as x, R as y };
907
+ process.env.NODE_ENV !== "production" && (we.displayName = "SourceBadge");
908
+ export { V as C, U as S, H as T, te as _, we as a, G as b, me as c, de as d, ue as f, q as g, le as h, Se as i, pe as l, Q as m, ve as n, he as o, re as p, $ as r, _e as s, ye as t, fe as u, Z as v, B as w, W as x, X as y };
651
909
 
652
- //# sourceMappingURL=kaeso-Bm15eHaR.js.map
910
+ //# sourceMappingURL=kaeso-DIbGvfhi.js.map