@hollis-labs/surface-page 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gallery.js CHANGED
@@ -1,6 +1,10 @@
1
1
  // ../../web/src/gallery/Gallery.tsx
2
- import { useState as useState4 } from "react";
2
+ import { PALETTES as PALETTES2, paletteById } from "@hollis-labs/surface-theme";
3
+ import { useLayoutEffect as useLayoutEffect2, useMemo, useRef as useRef4, useState as useState5 } from "react";
4
+ import { Empty as Empty2, EmptyDescription as EmptyDescription2, EmptyHeader as EmptyHeader2, EmptyTitle as EmptyTitle2 } from "@/components/ui/empty";
5
+ import { Select as Select2, SelectContent as SelectContent2, SelectItem as SelectItem2, SelectTrigger as SelectTrigger2, SelectValue as SelectValue2 } from "@/components/ui/select";
3
6
  import { Tabs as Tabs2, TabsContent as TabsContent2, TabsList as TabsList2, TabsTrigger as TabsTrigger2 } from "@/components/ui/tabs";
7
+ import { ToggleGroup as ToggleGroup2, ToggleGroupItem as ToggleGroupItem2 } from "@/components/ui/toggle-group";
4
8
 
5
9
  // ../../web/src/gallery/ade.tsx
6
10
  import { useEffect, useRef, useState } from "react";
@@ -10,9 +14,18 @@ import { Label } from "@/components/ui/label";
10
14
  import { Switch } from "@/components/ui/switch";
11
15
 
12
16
  // ../../web/src/gallery/Specimen.tsx
17
+ import { createContext, useContext } from "react";
13
18
  import { jsx, jsxs } from "react/jsx-runtime";
14
- function Section({ title, about, children }) {
15
- return /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-3", children: [
19
+ var DraftFilter = createContext({ only: false });
20
+ function Section({
21
+ title,
22
+ about,
23
+ draft,
24
+ children
25
+ }) {
26
+ const filter = useContext(DraftFilter);
27
+ if (filter.only && (!draft || filter.job && draft !== filter.job)) return null;
28
+ return /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-3", "data-gallery-draft": draft, children: [
16
29
  /* @__PURE__ */ jsxs("header", { children: [
17
30
  /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold", children: title }),
18
31
  about && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: about })
@@ -142,16 +155,298 @@ function Ade() {
142
155
  }
143
156
 
144
157
  // ../../web/src/gallery/cards.tsx
145
- import { CardApproval } from "@/components/ui/card-approval";
158
+ import { CardApproval as CardApproval2 } from "@/components/ui/card-approval";
146
159
  import { CardChoice } from "@/components/ui/card-choice";
147
- import { CardConfirm } from "@/components/ui/card-confirm";
160
+ import { CardConfirm as CardConfirm2 } from "@/components/ui/card-confirm";
148
161
  import { CardForm } from "@/components/ui/card-form";
149
162
  import { CardMiss } from "@/components/ui/card-miss";
163
+ import { CardNotice as CardNotice2 } from "@/components/ui/card-notice";
164
+ import { CardPlan as CardPlan2 } from "@/components/ui/card-plan";
165
+ import { CardProgress as CardProgress2 } from "@/components/ui/card-progress";
166
+ import { CardPrompt } from "@/components/ui/card-prompt";
167
+
168
+ // ../../web/src/gallery/approval.tsx
169
+ import { CardApproval } from "@/components/ui/card-approval";
170
+ import { CardConfirm } from "@/components/ui/card-confirm";
150
171
  import { CardNotice } from "@/components/ui/card-notice";
151
172
  import { CardPlan } from "@/components/ui/card-plan";
152
173
  import { CardProgress } from "@/components/ui/card-progress";
153
- import { CardPrompt } from "@/components/ui/card-prompt";
154
174
  import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
175
+ var open = { state: "open", expires: "in 28 min", onRespond: () => {
176
+ } };
177
+ var SHORT = [
178
+ { label: "Status", before: "ready for review", after: "approved" },
179
+ { label: "Commit", after: "9f517de" },
180
+ { label: "Branch", after: "design/d065599e-approval-card-mockup" }
181
+ ];
182
+ var LONG = [
183
+ { label: "Title", before: "Launch", after: "Launch notes" },
184
+ {
185
+ label: "Text",
186
+ before: "We launch on Monday.\nThe team meets at nine.",
187
+ after: "We launch on Monday, 24 November.\nThe team meets at nine in the main room; the agenda is in the draft.\nAfter the launch: a short review on Wednesday, notes in the shared folder.\nQuestions go to the launch thread, not to email."
188
+ }
189
+ ];
190
+ var SEVERAL = [
191
+ { label: "Rename the draft", before: "Untitled", after: "Launch notes" },
192
+ { label: "Move it", before: "Drafts", after: "Projects / Launch" },
193
+ { label: "Share it", after: "with the design team" }
194
+ ];
195
+ function Wide({ label, children }) {
196
+ return /* @__PURE__ */ jsx3(Specimen, { label, children: /* @__PURE__ */ jsx3("div", { className: "w-full", children }) });
197
+ }
198
+ function Approval() {
199
+ return /* @__PURE__ */ jsxs3(Fragment2, { children: [
200
+ /* @__PURE__ */ jsxs3(
201
+ Section,
202
+ {
203
+ draft: "d_d065599e",
204
+ title: "Approval card: risk at a glance",
205
+ about: "Proposal for job d_d065599e. Risk shows in the left edge, the icon and the badge. High risk is the only red, and its Approve leads to a second confirm.",
206
+ children: [
207
+ ["low", "medium", "high"].map((risk) => /* @__PURE__ */ jsx3(Wide, { label: `risk="${risk}"`, children: /* @__PURE__ */ jsx3(
208
+ CardApproval,
209
+ {
210
+ ...open,
211
+ title: { low: "Rename a note", medium: "Approve the design", high: "Delete 14 notes" }[risk],
212
+ summary: {
213
+ low: "The agent wants to rename one note.",
214
+ medium: "Approve PR 18 at commit 9f517de. The Design team is told to merge exactly that commit.",
215
+ high: "The agent wants to delete 14 notes from **Archive**. They cannot be restored from Surface."
216
+ }[risk],
217
+ risk,
218
+ requestedBy: risk === "medium" ? "design" : "agent",
219
+ changes: risk === "low" ? [{ label: "Title", before: "untitled", after: "Weekly review" }] : risk === "medium" ? SHORT : [{ label: "Notes", before: "14", after: "0" }]
220
+ }
221
+ ) }, risk)),
222
+ /* @__PURE__ */ jsx3(Wide, { label: "high, after Approve\u2026: the second confirm (with a typed phrase)", children: /* @__PURE__ */ jsx3(ConfirmStep, {}) })
223
+ ]
224
+ }
225
+ ),
226
+ /* @__PURE__ */ jsxs3(
227
+ Section,
228
+ {
229
+ draft: "d_d065599e",
230
+ title: "Approval card: before and after",
231
+ about: "Short values sit on one line. Long ones stack as before and after blocks, clipped until opened.",
232
+ children: [
233
+ /* @__PURE__ */ jsx3(Wide, { label: "short values", children: /* @__PURE__ */ jsx3(
234
+ CardApproval,
235
+ {
236
+ ...open,
237
+ title: "Write the draft",
238
+ summary: "Two fields change.",
239
+ risk: "low",
240
+ changes: [
241
+ { label: "Title", before: "Launch", after: "Launch notes" },
242
+ { label: "Lines", before: "4", after: "7" }
243
+ ]
244
+ }
245
+ ) }),
246
+ /* @__PURE__ */ jsx3(Wide, { label: "a longer text", children: /* @__PURE__ */ jsx3(
247
+ CardApproval,
248
+ {
249
+ ...open,
250
+ title: "Rewrite the draft",
251
+ summary: "The agent wants to replace the draft's text.",
252
+ risk: "medium",
253
+ changes: LONG,
254
+ requestedBy: "agent"
255
+ }
256
+ ) })
257
+ ]
258
+ }
259
+ ),
260
+ /* @__PURE__ */ jsxs3(
261
+ Section,
262
+ {
263
+ draft: "d_d065599e",
264
+ title: "Approval card: several changes",
265
+ about: "With perChange, each change is approved or declined on its own. The button says how many are approved, and each change is answered as its own decision.",
266
+ children: [
267
+ /* @__PURE__ */ jsx3(Wide, { label: "perChange, all approved", children: /* @__PURE__ */ jsx3(
268
+ CardApproval,
269
+ {
270
+ ...open,
271
+ title: "Tidy the launch draft",
272
+ summary: "Three changes; take any of them.",
273
+ risk: "medium",
274
+ perChange: true,
275
+ changes: SEVERAL
276
+ }
277
+ ) }),
278
+ /* @__PURE__ */ jsx3(Wide, { label: "perChange, answered: 2 of 3", children: /* @__PURE__ */ jsx3(
279
+ CardApproval,
280
+ {
281
+ state: "submitted",
282
+ onRespond: () => {
283
+ },
284
+ title: "Tidy the launch draft",
285
+ risk: "medium",
286
+ perChange: true,
287
+ changes: SEVERAL,
288
+ decision: { approved: 2, of: 3 }
289
+ }
290
+ ) })
291
+ ]
292
+ }
293
+ ),
294
+ /* @__PURE__ */ jsxs3(
295
+ Section,
296
+ {
297
+ draft: "d_d065599e",
298
+ title: "Approval card: states",
299
+ about: "Waiting shows when it expires. Once closed, the edge and colour go quiet and the foot says what happened.",
300
+ children: [
301
+ /* @__PURE__ */ jsx3(Wide, { label: "waiting for an answer", children: /* @__PURE__ */ jsx3(
302
+ CardApproval,
303
+ {
304
+ ...open,
305
+ title: "Approve the design",
306
+ summary: "PR 18 at 9f517de.",
307
+ risk: "medium",
308
+ changes: SHORT.slice(0, 2)
309
+ }
310
+ ) }),
311
+ /* @__PURE__ */ jsx3(Wide, { label: "working (answer being sent)", children: /* @__PURE__ */ jsx3(
312
+ CardApproval,
313
+ {
314
+ state: "pending",
315
+ busy: true,
316
+ onRespond: () => {
317
+ },
318
+ title: "Approve the design",
319
+ summary: "PR 18 at 9f517de.",
320
+ risk: "medium",
321
+ changes: SHORT.slice(0, 2)
322
+ }
323
+ ) }),
324
+ /* @__PURE__ */ jsx3(Wide, { label: "approved", children: /* @__PURE__ */ jsx3(
325
+ CardApproval,
326
+ {
327
+ state: "submitted",
328
+ decision: "approved",
329
+ onRespond: () => {
330
+ },
331
+ title: "Approve the design",
332
+ summary: "PR 18 at 9f517de.",
333
+ risk: "medium",
334
+ changes: SHORT.slice(0, 2)
335
+ }
336
+ ) }),
337
+ /* @__PURE__ */ jsx3(Wide, { label: "declined", children: /* @__PURE__ */ jsx3(
338
+ CardApproval,
339
+ {
340
+ state: "submitted",
341
+ decision: "declined",
342
+ onRespond: () => {
343
+ },
344
+ title: "Delete 14 notes",
345
+ summary: "From Archive.",
346
+ risk: "high"
347
+ }
348
+ ) }),
349
+ /* @__PURE__ */ jsx3(Wide, { label: "expired", children: /* @__PURE__ */ jsx3(
350
+ CardApproval,
351
+ {
352
+ state: "expired",
353
+ onRespond: () => {
354
+ },
355
+ title: "Approve the design",
356
+ summary: "PR 18 at 7f7d61f.",
357
+ risk: "medium"
358
+ }
359
+ ) }),
360
+ /* @__PURE__ */ jsx3(Wide, { label: "replaced by a newer card", children: /* @__PURE__ */ jsx3(
361
+ CardApproval,
362
+ {
363
+ state: "superseded",
364
+ onRespond: () => {
365
+ },
366
+ title: "Approve the design at 7f7d61f",
367
+ summary: "A newer commit came in; you are asked again on it.",
368
+ risk: "medium"
369
+ }
370
+ ) })
371
+ ]
372
+ }
373
+ ),
374
+ /* @__PURE__ */ jsx3(
375
+ Section,
376
+ {
377
+ draft: "d_d065599e",
378
+ title: "Approval card: next to the other cards",
379
+ about: "In a column of cards, the approval is the one with an edge and a decision. Notices, progress and plans stay flat.",
380
+ children: /* @__PURE__ */ jsx3(Specimen, { label: "a column of cards", wide: true, children: /* @__PURE__ */ jsxs3("div", { className: "mx-auto flex w-full max-w-md flex-col gap-2", children: [
381
+ /* @__PURE__ */ jsx3(
382
+ CardNotice,
383
+ {
384
+ title: "Ready to review",
385
+ body: "\u201CApproval card mockup\u201D has a preview to review: its window is open.",
386
+ tone: "info",
387
+ onDismiss: () => {
388
+ }
389
+ }
390
+ ),
391
+ /* @__PURE__ */ jsx3(CardProgress, { title: "Reading the branch", label: "files", value: 3, max: 5, status: "running" }),
392
+ /* @__PURE__ */ jsx3(
393
+ CardPlan,
394
+ {
395
+ title: "Design round 1",
396
+ steps: [
397
+ { id: "1", title: "Brief sent", status: "done" },
398
+ { id: "2", title: "Mock-up pushed", status: "done" },
399
+ { id: "3", title: "Your review", status: "active" }
400
+ ]
401
+ }
402
+ ),
403
+ /* @__PURE__ */ jsx3(
404
+ CardApproval,
405
+ {
406
+ ...open,
407
+ title: "Approve the design at 9f517de",
408
+ summary: "PR 18 at commit 9f517de.",
409
+ risk: "medium",
410
+ changes: SHORT.slice(0, 2),
411
+ requestedBy: "design"
412
+ }
413
+ ),
414
+ /* @__PURE__ */ jsx3(CardConfirm, { ...open, title: "Close three windows?", body: "Your unsaved draft stays open.", danger: false })
415
+ ] }) })
416
+ }
417
+ )
418
+ ] });
419
+ }
420
+ function ConfirmStep() {
421
+ return /* @__PURE__ */ jsx3(
422
+ "div",
423
+ {
424
+ ref: (el) => {
425
+ if (!el) return;
426
+ const b = Array.from(el.querySelectorAll("button")).find((x) => x.textContent?.endsWith("\u2026"));
427
+ if (b && !el.dataset.clicked) {
428
+ el.dataset.clicked = "1";
429
+ setTimeout(() => b.click(), 0);
430
+ }
431
+ },
432
+ children: /* @__PURE__ */ jsx3(
433
+ CardApproval,
434
+ {
435
+ ...open,
436
+ title: "Delete 14 notes",
437
+ summary: "The agent wants to delete 14 notes from **Archive**.",
438
+ risk: "high",
439
+ phrase: "delete 14 notes",
440
+ requestedBy: "agent",
441
+ changes: [{ label: "Notes", before: "14", after: "0" }]
442
+ }
443
+ )
444
+ }
445
+ );
446
+ }
447
+
448
+ // ../../web/src/gallery/cards.tsx
449
+ import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
155
450
  var STATES = [
156
451
  { label: "open", state: "open" },
157
452
  { label: "pending", state: "pending" },
@@ -181,29 +476,30 @@ var FIELDS = [
181
476
  { key: "kind", kind: "enum", title: "Kind", options: ["note", "draft", "plan"] }
182
477
  ];
183
478
  function AllStates({ name, draw }) {
184
- return /* @__PURE__ */ jsx3(Section, { title: name, children: STATES.map((s) => /* @__PURE__ */ jsx3(Specimen, { label: s.label, children: /* @__PURE__ */ jsx3("div", { className: "w-full", children: draw(base(s)) }) }, s.label)) });
479
+ return /* @__PURE__ */ jsx4(Section, { title: name, children: STATES.map((s) => /* @__PURE__ */ jsx4(Specimen, { label: s.label, children: /* @__PURE__ */ jsx4("div", { className: "w-full", children: draw(base(s)) }) }, s.label)) });
185
480
  }
186
481
  function Cards() {
187
- return /* @__PURE__ */ jsxs3(Fragment2, { children: [
188
- /* @__PURE__ */ jsx3(
482
+ return /* @__PURE__ */ jsxs4(Fragment3, { children: [
483
+ /* @__PURE__ */ jsx4(Approval, {}),
484
+ /* @__PURE__ */ jsx4(
189
485
  AllStates,
190
486
  {
191
487
  name: "card-confirm",
192
- draw: (p) => /* @__PURE__ */ jsx3(CardConfirm, { ...p, title: "Close three windows?", body: "Your unsaved draft stays open.", danger: false })
488
+ draw: (p) => /* @__PURE__ */ jsx4(CardConfirm2, { ...p, title: "Close three windows?", body: "Your unsaved draft stays open.", danger: false })
193
489
  }
194
490
  ),
195
- /* @__PURE__ */ jsx3(
491
+ /* @__PURE__ */ jsx4(
196
492
  AllStates,
197
493
  {
198
494
  name: "card-prompt",
199
- draw: (p) => /* @__PURE__ */ jsx3(CardPrompt, { ...p, title: "A name", question: "What should the flow be called?", placeholder: "Research" })
495
+ draw: (p) => /* @__PURE__ */ jsx4(CardPrompt, { ...p, title: "A name", question: "What should the flow be called?", placeholder: "Research" })
200
496
  }
201
497
  ),
202
- /* @__PURE__ */ jsx3(
498
+ /* @__PURE__ */ jsx4(
203
499
  AllStates,
204
500
  {
205
501
  name: "card-choice",
206
- draw: (p) => /* @__PURE__ */ jsx3(
502
+ draw: (p) => /* @__PURE__ */ jsx4(
207
503
  CardChoice,
208
504
  {
209
505
  ...p,
@@ -219,11 +515,11 @@ function Cards() {
219
515
  )
220
516
  }
221
517
  ),
222
- /* @__PURE__ */ jsx3(
518
+ /* @__PURE__ */ jsx4(
223
519
  AllStates,
224
520
  {
225
521
  name: "card-form",
226
- draw: (p) => /* @__PURE__ */ jsx3(
522
+ draw: (p) => /* @__PURE__ */ jsx4(
227
523
  CardForm,
228
524
  {
229
525
  ...p,
@@ -235,12 +531,12 @@ function Cards() {
235
531
  )
236
532
  }
237
533
  ),
238
- /* @__PURE__ */ jsx3(
534
+ /* @__PURE__ */ jsx4(
239
535
  AllStates,
240
536
  {
241
537
  name: "card-approval",
242
- draw: (p) => /* @__PURE__ */ jsx3(
243
- CardApproval,
538
+ draw: (p) => /* @__PURE__ */ jsx4(
539
+ CardApproval2,
244
540
  {
245
541
  ...p,
246
542
  title: "Write the draft",
@@ -255,9 +551,9 @@ function Cards() {
255
551
  )
256
552
  }
257
553
  ),
258
- /* @__PURE__ */ jsxs3(Section, { title: "card-notice", children: [
259
- ["info", "success", "warning", "error"].map((t) => /* @__PURE__ */ jsx3(Specimen, { label: `tone="${t}"`, children: /* @__PURE__ */ jsx3("div", { className: "w-full", children: /* @__PURE__ */ jsx3(
260
- CardNotice,
554
+ /* @__PURE__ */ jsxs4(Section, { title: "card-notice", children: [
555
+ ["info", "success", "warning", "error"].map((t) => /* @__PURE__ */ jsx4(Specimen, { label: `tone="${t}"`, children: /* @__PURE__ */ jsx4("div", { className: "w-full", children: /* @__PURE__ */ jsx4(
556
+ CardNotice2,
261
557
  {
262
558
  title: { info: "For your information", success: "Done", warning: "Heads up", error: "It failed" }[t],
263
559
  body: "Something happened that you should know about.",
@@ -267,11 +563,11 @@ function Cards() {
267
563
  }
268
564
  }
269
565
  ) }) }, t)),
270
- /* @__PURE__ */ jsx3(Specimen, { label: "dismissed", children: /* @__PURE__ */ jsx3("div", { className: "w-full", children: /* @__PURE__ */ jsx3(CardNotice, { title: "A notice", body: "Already dismissed.", state: "canceled" }) }) })
566
+ /* @__PURE__ */ jsx4(Specimen, { label: "dismissed", children: /* @__PURE__ */ jsx4("div", { className: "w-full", children: /* @__PURE__ */ jsx4(CardNotice2, { title: "A notice", body: "Already dismissed.", state: "canceled" }) }) })
271
567
  ] }),
272
- /* @__PURE__ */ jsxs3(Section, { title: "card-progress and card-plan", children: [
273
- ["running", "done", "failed"].map((s) => /* @__PURE__ */ jsx3(Specimen, { label: `progress ${s}`, children: /* @__PURE__ */ jsx3("div", { className: "w-full", children: /* @__PURE__ */ jsx3(
274
- CardProgress,
568
+ /* @__PURE__ */ jsxs4(Section, { title: "card-progress and card-plan", children: [
569
+ ["running", "done", "failed"].map((s) => /* @__PURE__ */ jsx4(Specimen, { label: `progress ${s}`, children: /* @__PURE__ */ jsx4("div", { className: "w-full", children: /* @__PURE__ */ jsx4(
570
+ CardProgress2,
275
571
  {
276
572
  title: "Reading the site",
277
573
  label: "pages",
@@ -281,9 +577,9 @@ function Cards() {
281
577
  detail: s === "failed" ? "The site stopped answering." : void 0
282
578
  }
283
579
  ) }) }, s)),
284
- /* @__PURE__ */ jsx3(Specimen, { label: "progress, no value", children: /* @__PURE__ */ jsx3("div", { className: "w-full", children: /* @__PURE__ */ jsx3(CardProgress, { title: "Thinking", status: "running" }) }) }),
285
- /* @__PURE__ */ jsx3(Specimen, { label: "plan", wide: true, children: /* @__PURE__ */ jsx3("div", { className: "w-full", children: /* @__PURE__ */ jsx3(
286
- CardPlan,
580
+ /* @__PURE__ */ jsx4(Specimen, { label: "progress, no value", children: /* @__PURE__ */ jsx4("div", { className: "w-full", children: /* @__PURE__ */ jsx4(CardProgress2, { title: "Thinking", status: "running" }) }) }),
581
+ /* @__PURE__ */ jsx4(Specimen, { label: "plan", wide: true, children: /* @__PURE__ */ jsx4("div", { className: "w-full", children: /* @__PURE__ */ jsx4(
582
+ CardPlan2,
287
583
  {
288
584
  title: "Write the article",
289
585
  steps: [
@@ -296,7 +592,7 @@ function Cards() {
296
592
  }
297
593
  ) }) })
298
594
  ] }),
299
- /* @__PURE__ */ jsx3(Section, { title: "card-miss", about: "What draws when no renderer can.", children: ["unknown-kind", "version-skew", "failed"].map((r) => /* @__PURE__ */ jsx3(Specimen, { label: r, children: /* @__PURE__ */ jsx3("div", { className: "w-full", children: /* @__PURE__ */ jsx3(
595
+ /* @__PURE__ */ jsx4(Section, { title: "card-miss", about: "What draws when no renderer can.", children: ["unknown-kind", "version-skew", "failed"].map((r) => /* @__PURE__ */ jsx4(Specimen, { label: r, children: /* @__PURE__ */ jsx4("div", { className: "w-full", children: /* @__PURE__ */ jsx4(
300
596
  CardMiss,
301
597
  {
302
598
  kind: "survey",
@@ -312,7 +608,6 @@ function Cards() {
312
608
 
313
609
  // ../../web/src/gallery/chat.tsx
314
610
  import { Bot } from "lucide-react";
315
- import { useState as useState2 } from "react";
316
611
  import {
317
612
  Conversation,
318
613
  ConversationContent,
@@ -322,9 +617,142 @@ import {
322
617
  } from "@/components/ui/conversation";
323
618
  import { Markdown } from "@/components/ui/markdown";
324
619
  import { Message, MessageContent, MessageNotice } from "@/components/ui/message";
325
- import { PromptInput, PromptInputFooter, PromptInputSubmit, PromptInputTextarea } from "@/components/ui/prompt-input";
326
620
  import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "@/components/ui/tool";
327
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
621
+
622
+ // ../../web/src/gallery/composer.tsx
623
+ import { Paperclip, Slash, X } from "lucide-react";
624
+ import { useId, useRef as useRef2, useState as useState2 } from "react";
625
+ import { Button } from "@/components/ui/button";
626
+ import { InputGroupAddon, InputGroupButton } from "@/components/ui/input-group";
627
+ import { PromptInput, PromptInputFooter, PromptInputSubmit, PromptInputTextarea } from "@/components/ui/prompt-input";
628
+ import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
629
+ function ComposerFixture({ initial }) {
630
+ const id = useId();
631
+ const field = useRef2(null);
632
+ const [state, setState] = useState2(initial);
633
+ const [draft, setDraft] = useState2(
634
+ initial === "typing" || initial === "sending" ? "Review the composer in light and dark.\nKeep the attachment and shortcut actions within reach." : ""
635
+ );
636
+ const [attached, setAttached] = useState2(initial === "typing");
637
+ const [notice, setNotice] = useState2("");
638
+ const locked = state === "disabled" || state === "sending" || state === "streaming";
639
+ const hint = state === "disabled" ? "Connect to an agent to send a message." : state === "sending" ? "Sending message\u2026 Your draft is kept until it is delivered." : state === "streaming" ? "The agent is answering. Stop to write another message." : "Enter sends \xB7 Shift+Enter adds a line";
640
+ return /* @__PURE__ */ jsxs5("div", { className: "flex w-full min-w-0 flex-col gap-2", "data-composer-state": initial, children: [
641
+ /* @__PURE__ */ jsxs5(
642
+ PromptInput,
643
+ {
644
+ "aria-label": `${initial} composer`,
645
+ onSubmit: (event) => {
646
+ event.preventDefault();
647
+ if (locked || !draft.trim() && !attached) return;
648
+ setState("sending");
649
+ setNotice("");
650
+ },
651
+ children: [
652
+ attached && /* @__PURE__ */ jsx5(InputGroupAddon, { align: "block-start", "aria-label": "Attachments", children: /* @__PURE__ */ jsxs5(
653
+ InputGroupButton,
654
+ {
655
+ disabled: locked,
656
+ "aria-label": "Remove example attachment notes.md",
657
+ onClick: () => setAttached(false),
658
+ children: [
659
+ /* @__PURE__ */ jsx5(Paperclip, {}),
660
+ " notes.md ",
661
+ /* @__PURE__ */ jsx5(X, {})
662
+ ]
663
+ }
664
+ ) }),
665
+ /* @__PURE__ */ jsx5(
666
+ PromptInputTextarea,
667
+ {
668
+ ref: field,
669
+ value: draft,
670
+ onChange: (event) => setDraft(event.target.value),
671
+ disabled: state === "disabled",
672
+ readOnly: state === "sending" || state === "streaming",
673
+ placeholder: "Message the agent\u2026",
674
+ "aria-label": `${initial} message`,
675
+ "aria-describedby": `${id}-hint`
676
+ }
677
+ ),
678
+ /* @__PURE__ */ jsxs5(PromptInputFooter, { children: [
679
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-1", children: [
680
+ /* @__PURE__ */ jsx5(
681
+ InputGroupButton,
682
+ {
683
+ size: "icon-xs",
684
+ disabled: locked,
685
+ "aria-label": "Add example attachment",
686
+ title: "Add example attachment",
687
+ onClick: () => {
688
+ setAttached(true);
689
+ setNotice("Example attachment added. No file was uploaded.");
690
+ },
691
+ children: /* @__PURE__ */ jsx5(Paperclip, {})
692
+ }
693
+ ),
694
+ /* @__PURE__ */ jsx5(
695
+ InputGroupButton,
696
+ {
697
+ size: "icon-xs",
698
+ disabled: locked,
699
+ "aria-label": "Insert example shortcut",
700
+ title: "Insert /summarize",
701
+ onClick: () => {
702
+ setDraft((text) => `${text}${text ? "\n" : ""}/summarize `);
703
+ field.current?.focus();
704
+ },
705
+ children: /* @__PURE__ */ jsx5(Slash, {})
706
+ }
707
+ )
708
+ ] }),
709
+ /* @__PURE__ */ jsx5(
710
+ PromptInputSubmit,
711
+ {
712
+ status: state === "sending" ? "sending" : state === "streaming" ? "streaming" : "ready",
713
+ disabled: state === "disabled" || state !== "streaming" && !draft.trim() && !attached,
714
+ onStop: () => {
715
+ setState("typing");
716
+ setNotice("Stopped. You can continue writing.");
717
+ field.current?.focus();
718
+ }
719
+ }
720
+ )
721
+ ] })
722
+ ]
723
+ }
724
+ ),
725
+ /* @__PURE__ */ jsx5("p", { id: `${id}-hint`, className: "text-xs text-muted-foreground", children: hint }),
726
+ /* @__PURE__ */ jsx5("p", { role: "status", className: "text-xs text-muted-foreground", children: notice || (state === "sending" ? "Demo: waiting for delivery." : "") }),
727
+ state === "sending" && /* @__PURE__ */ jsx5(
728
+ Button,
729
+ {
730
+ variant: "outline",
731
+ size: "sm",
732
+ onClick: () => {
733
+ setState("empty");
734
+ setDraft("");
735
+ setAttached(false);
736
+ setNotice("Demo message delivered.");
737
+ field.current?.focus();
738
+ },
739
+ children: "Simulate delivery"
740
+ }
741
+ )
742
+ ] });
743
+ }
744
+ function ComposerSpecimens() {
745
+ return /* @__PURE__ */ jsxs5(Fragment4, { children: [
746
+ /* @__PURE__ */ jsx5(Specimen, { label: "Composer \xB7 empty", children: /* @__PURE__ */ jsx5(ComposerFixture, { initial: "empty" }) }),
747
+ /* @__PURE__ */ jsx5(Specimen, { label: "Composer \xB7 typing with attachment", children: /* @__PURE__ */ jsx5(ComposerFixture, { initial: "typing" }) }),
748
+ /* @__PURE__ */ jsx5(Specimen, { label: "Composer \xB7 sending", children: /* @__PURE__ */ jsx5(ComposerFixture, { initial: "sending" }) }),
749
+ /* @__PURE__ */ jsx5(Specimen, { label: "Composer \xB7 disabled", children: /* @__PURE__ */ jsx5(ComposerFixture, { initial: "disabled" }) }),
750
+ /* @__PURE__ */ jsx5(Specimen, { label: "Composer \xB7 streaming / stop", children: /* @__PURE__ */ jsx5(ComposerFixture, { initial: "streaming" }) })
751
+ ] });
752
+ }
753
+
754
+ // ../../web/src/gallery/chat.tsx
755
+ import { Fragment as Fragment5, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
328
756
  var ANSWER = `Here is the layout I set up:
329
757
 
330
758
  - **Browser** on the left, at the page you named
@@ -341,77 +769,62 @@ var ANSWER = `Here is the layout I set up:
341
769
  | Drafts | right |`;
342
770
  var STREAMING = "Opening the **Drafts window and `drafts_get";
343
771
  function Chat() {
344
- const [draft, setDraft] = useState2("");
345
- return /* @__PURE__ */ jsxs4(Section, { title: "Conversation", about: "A canned thread: the person, the agent with Markdown, tool rows, a notice.", children: [
346
- /* @__PURE__ */ jsx4(Specimen, { label: "Conversation, Message, Markdown, Tool, MessageNotice", wide: true, children: /* @__PURE__ */ jsx4("div", { className: "h-[52rem] w-full overflow-hidden rounded-md border border-border", children: /* @__PURE__ */ jsxs4(Conversation, { className: "h-full", children: [
347
- /* @__PURE__ */ jsx4(ConversationViewport, { children: /* @__PURE__ */ jsxs4(ConversationContent, { children: [
348
- /* @__PURE__ */ jsx4(Message, { from: "user", children: /* @__PURE__ */ jsx4(MessageContent, { children: "Set up a research layout for the article." }) }),
349
- /* @__PURE__ */ jsxs4(Tool, { children: [
350
- /* @__PURE__ */ jsx4(ToolHeader, { title: "desk_arrange", status: "done" }),
351
- /* @__PURE__ */ jsxs4(ToolContent, { children: [
352
- /* @__PURE__ */ jsx4(ToolInput, { input: { windows: [{ view: "browser" }, { view: "drafts", focus: true }] } }),
353
- /* @__PURE__ */ jsx4(ToolOutput, { output: '{"arranged": true}' })
354
- ] })
355
- ] }),
356
- /* @__PURE__ */ jsxs4(Tool, { defaultOpen: true, children: [
357
- /* @__PURE__ */ jsx4(ToolHeader, { title: "browser_read", status: "error" }),
358
- /* @__PURE__ */ jsxs4(ToolContent, { children: [
359
- /* @__PURE__ */ jsx4(ToolInput, { input: { url: "https://example.invalid/" } }),
360
- /* @__PURE__ */ jsx4(ToolOutput, { output: "The site could not be reached.", error: true })
361
- ] })
362
- ] }),
363
- /* @__PURE__ */ jsx4(Tool, { children: /* @__PURE__ */ jsx4(ToolHeader, { title: "drafts_get", status: "running" }) }),
364
- /* @__PURE__ */ jsx4(Message, { from: "assistant", children: /* @__PURE__ */ jsx4(MessageContent, { children: /* @__PURE__ */ jsx4(Markdown, { children: ANSWER }) }) }),
365
- /* @__PURE__ */ jsx4(Message, { from: "assistant", children: /* @__PURE__ */ jsx4(MessageContent, { children: /* @__PURE__ */ jsx4(Markdown, { streaming: true, children: STREAMING }) }) }),
366
- /* @__PURE__ */ jsx4(MessageNotice, { children: "Stopped." }),
367
- /* @__PURE__ */ jsx4(MessageNotice, { tone: "error", children: "The agent could not finish." })
368
- ] }) }),
369
- /* @__PURE__ */ jsx4(ConversationScrollButton, {})
370
- ] }) }) }),
371
- /* @__PURE__ */ jsx4(Specimen, { label: "ConversationEmptyState", children: /* @__PURE__ */ jsx4(
372
- ConversationEmptyState,
772
+ return /* @__PURE__ */ jsxs6(Fragment5, { children: [
773
+ /* @__PURE__ */ jsxs6(Section, { title: "Conversation", about: "A canned thread: the person, the agent with Markdown, tool rows, a notice.", children: [
774
+ /* @__PURE__ */ jsx6(Specimen, { label: "Conversation, Message, Markdown, Tool, MessageNotice", wide: true, children: /* @__PURE__ */ jsx6("div", { className: "h-[52rem] w-full overflow-hidden rounded-md border border-border", children: /* @__PURE__ */ jsxs6(Conversation, { className: "h-full", children: [
775
+ /* @__PURE__ */ jsx6(ConversationViewport, { children: /* @__PURE__ */ jsxs6(ConversationContent, { children: [
776
+ /* @__PURE__ */ jsx6(Message, { from: "user", children: /* @__PURE__ */ jsx6(MessageContent, { children: "Set up a research layout for the article." }) }),
777
+ /* @__PURE__ */ jsxs6(Tool, { children: [
778
+ /* @__PURE__ */ jsx6(ToolHeader, { title: "desk_arrange", status: "done" }),
779
+ /* @__PURE__ */ jsxs6(ToolContent, { children: [
780
+ /* @__PURE__ */ jsx6(ToolInput, { input: { windows: [{ view: "browser" }, { view: "drafts", focus: true }] } }),
781
+ /* @__PURE__ */ jsx6(ToolOutput, { output: '{"arranged": true}' })
782
+ ] })
783
+ ] }),
784
+ /* @__PURE__ */ jsxs6(Tool, { defaultOpen: true, children: [
785
+ /* @__PURE__ */ jsx6(ToolHeader, { title: "browser_read", status: "error" }),
786
+ /* @__PURE__ */ jsxs6(ToolContent, { children: [
787
+ /* @__PURE__ */ jsx6(ToolInput, { input: { url: "https://example.invalid/" } }),
788
+ /* @__PURE__ */ jsx6(ToolOutput, { output: "The site could not be reached.", error: true })
789
+ ] })
790
+ ] }),
791
+ /* @__PURE__ */ jsx6(Tool, { children: /* @__PURE__ */ jsx6(ToolHeader, { title: "drafts_get", status: "running" }) }),
792
+ /* @__PURE__ */ jsx6(Message, { from: "assistant", children: /* @__PURE__ */ jsx6(MessageContent, { children: /* @__PURE__ */ jsx6(Markdown, { children: ANSWER }) }) }),
793
+ /* @__PURE__ */ jsx6(Message, { from: "assistant", children: /* @__PURE__ */ jsx6(MessageContent, { children: /* @__PURE__ */ jsx6(Markdown, { streaming: true, children: STREAMING }) }) }),
794
+ /* @__PURE__ */ jsx6(MessageNotice, { children: "Stopped." }),
795
+ /* @__PURE__ */ jsx6(MessageNotice, { tone: "error", children: "The agent could not finish." })
796
+ ] }) }),
797
+ /* @__PURE__ */ jsx6(ConversationScrollButton, {})
798
+ ] }) }) }),
799
+ /* @__PURE__ */ jsx6(Specimen, { label: "ConversationEmptyState", children: /* @__PURE__ */ jsx6(
800
+ ConversationEmptyState,
801
+ {
802
+ icon: /* @__PURE__ */ jsx6(Bot, {}),
803
+ title: "Ask the agent",
804
+ description: "It sees the window in front and can work the desk for you."
805
+ }
806
+ ) })
807
+ ] }),
808
+ /* @__PURE__ */ jsx6(
809
+ Section,
373
810
  {
374
- icon: /* @__PURE__ */ jsx4(Bot, {}),
375
- title: "Ask the agent",
376
- description: "It sees the window in front and can work the desk for you."
811
+ title: "Chat composer",
812
+ about: "The input where the owner types to the agent: grows with its text, send, attachments and shortcuts, in each state (design job d_03adcb6b).",
813
+ draft: "d_03adcb6b",
814
+ children: /* @__PURE__ */ jsx6(ComposerSpecimens, {})
377
815
  }
378
- ) }),
379
- /* @__PURE__ */ jsx4(Specimen, { label: "PromptInput: ready and streaming", children: /* @__PURE__ */ jsxs4("div", { className: "flex w-full flex-col gap-2", children: [
380
- /* @__PURE__ */ jsxs4(PromptInput, { onSubmit: (e) => e.preventDefault(), children: [
381
- /* @__PURE__ */ jsx4(
382
- PromptInputTextarea,
383
- {
384
- value: draft,
385
- onChange: (e) => setDraft(e.target.value),
386
- placeholder: "Ask, or /open, /layout, /run",
387
- "aria-label": "Message"
388
- }
389
- ),
390
- /* @__PURE__ */ jsxs4(PromptInputFooter, { children: [
391
- /* @__PURE__ */ jsx4("span", { className: "text-xs text-muted-foreground", children: "Enter sends" }),
392
- /* @__PURE__ */ jsx4(PromptInputSubmit, { disabled: !draft.trim() })
393
- ] })
394
- ] }),
395
- /* @__PURE__ */ jsxs4(PromptInput, { onSubmit: (e) => e.preventDefault(), children: [
396
- /* @__PURE__ */ jsx4(PromptInputTextarea, { placeholder: "The agent is answering", "aria-label": "Message while streaming" }),
397
- /* @__PURE__ */ jsxs4(PromptInputFooter, { children: [
398
- /* @__PURE__ */ jsx4("span", { className: "text-xs text-muted-foreground", children: "working\u2026" }),
399
- /* @__PURE__ */ jsx4(PromptInputSubmit, { status: "streaming", onStop: () => {
400
- } })
401
- ] })
402
- ] })
403
- ] }) })
816
+ )
404
817
  ] });
405
818
  }
406
819
 
407
820
  // ../../web/src/gallery/controls.tsx
408
821
  import { Bold, Italic, Mail, Plus, Search, Underline } from "lucide-react";
409
822
  import { Badge } from "@/components/ui/badge";
410
- import { Button } from "@/components/ui/button";
823
+ import { Button as Button2 } from "@/components/ui/button";
411
824
  import { Checkbox } from "@/components/ui/checkbox";
412
825
  import { Field, FieldDescription, FieldError, FieldLabel } from "@/components/ui/field";
413
826
  import { Input } from "@/components/ui/input";
414
- import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "@/components/ui/input-group";
827
+ import { InputGroup, InputGroupAddon as InputGroupAddon2, InputGroupButton as InputGroupButton2, InputGroupInput } from "@/components/ui/input-group";
415
828
  import { Kbd, KbdGroup } from "@/components/ui/kbd";
416
829
  import { Label as Label2 } from "@/components/ui/label";
417
830
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
@@ -421,7 +834,7 @@ import { TextEditor } from "@/components/ui/text-editor";
421
834
  import { Textarea } from "@/components/ui/textarea";
422
835
  import { Toggle } from "@/components/ui/toggle";
423
836
  import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
424
- import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
837
+ import { Fragment as Fragment6, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
425
838
  var VARIANTS = ["default", "outline", "secondary", "ghost", "destructive", "link"];
426
839
  var SIZES = ["xs", "sm", "default", "lg"];
427
840
  var ICON_SIZES = ["icon-xs", "icon-sm", "icon", "icon-lg"];
@@ -431,113 +844,113 @@ var FRUIT = [
431
844
  { value: "plum", label: "Plum" }
432
845
  ];
433
846
  function Controls() {
434
- return /* @__PURE__ */ jsxs5(Fragment3, { children: [
435
- /* @__PURE__ */ jsxs5(Section, { title: "Button", about: "variant \xD7 size; icon sizes; disabled.", children: [
436
- VARIANTS.map((v) => /* @__PURE__ */ jsxs5(Specimen, { label: `variant="${v}"`, children: [
437
- SIZES.map((s) => /* @__PURE__ */ jsx5(Button, { variant: v, size: s, children: s }, s)),
438
- /* @__PURE__ */ jsx5(Button, { variant: v, disabled: true, children: "disabled" })
847
+ return /* @__PURE__ */ jsxs7(Fragment6, { children: [
848
+ /* @__PURE__ */ jsxs7(Section, { title: "Button", about: "variant \xD7 size; icon sizes; disabled.", children: [
849
+ VARIANTS.map((v) => /* @__PURE__ */ jsxs7(Specimen, { label: `variant="${v}"`, children: [
850
+ SIZES.map((s) => /* @__PURE__ */ jsx7(Button2, { variant: v, size: s, children: s }, s)),
851
+ /* @__PURE__ */ jsx7(Button2, { variant: v, disabled: true, children: "disabled" })
439
852
  ] }, v)),
440
- /* @__PURE__ */ jsxs5(Specimen, { label: "icon sizes, with an icon and text", children: [
441
- ICON_SIZES.map((s) => /* @__PURE__ */ jsx5(Button, { variant: "outline", size: s, "aria-label": s, children: /* @__PURE__ */ jsx5(Plus, {}) }, s)),
442
- /* @__PURE__ */ jsxs5(Button, { children: [
443
- /* @__PURE__ */ jsx5(Mail, {}),
853
+ /* @__PURE__ */ jsxs7(Specimen, { label: "icon sizes, with an icon and text", children: [
854
+ ICON_SIZES.map((s) => /* @__PURE__ */ jsx7(Button2, { variant: "outline", size: s, "aria-label": s, children: /* @__PURE__ */ jsx7(Plus, {}) }, s)),
855
+ /* @__PURE__ */ jsxs7(Button2, { children: [
856
+ /* @__PURE__ */ jsx7(Mail, {}),
444
857
  " With icon"
445
858
  ] })
446
859
  ] })
447
860
  ] }),
448
- /* @__PURE__ */ jsxs5(Section, { title: "Badge and Kbd", children: [
449
- /* @__PURE__ */ jsx5(Specimen, { label: "Badge variants", children: ["default", "secondary", "outline", "destructive", "ghost", "link"].map((v) => /* @__PURE__ */ jsx5(Badge, { variant: v, children: v }, v)) }),
450
- /* @__PURE__ */ jsxs5(Specimen, { label: "Kbd", children: [
451
- /* @__PURE__ */ jsx5(Kbd, { children: "\u2318K" }),
452
- /* @__PURE__ */ jsxs5(KbdGroup, { children: [
453
- /* @__PURE__ */ jsx5(Kbd, { children: "Shift" }),
454
- /* @__PURE__ */ jsx5(Kbd, { children: "Enter" })
861
+ /* @__PURE__ */ jsxs7(Section, { title: "Badge and Kbd", children: [
862
+ /* @__PURE__ */ jsx7(Specimen, { label: "Badge variants", children: ["default", "secondary", "outline", "destructive", "ghost", "link"].map((v) => /* @__PURE__ */ jsx7(Badge, { variant: v, children: v }, v)) }),
863
+ /* @__PURE__ */ jsxs7(Specimen, { label: "Kbd", children: [
864
+ /* @__PURE__ */ jsx7(Kbd, { children: "\u2318K" }),
865
+ /* @__PURE__ */ jsxs7(KbdGroup, { children: [
866
+ /* @__PURE__ */ jsx7(Kbd, { children: "Shift" }),
867
+ /* @__PURE__ */ jsx7(Kbd, { children: "Enter" })
455
868
  ] })
456
869
  ] })
457
870
  ] }),
458
- /* @__PURE__ */ jsxs5(Section, { title: "Text entry", children: [
459
- /* @__PURE__ */ jsxs5(Specimen, { label: "Input: default, disabled, invalid", children: [
460
- /* @__PURE__ */ jsx5(Input, { placeholder: "Placeholder", "aria-label": "default" }),
461
- /* @__PURE__ */ jsx5(Input, { placeholder: "Disabled", disabled: true, "aria-label": "disabled" }),
462
- /* @__PURE__ */ jsx5(Input, { defaultValue: "Not an email", "aria-invalid": true, "aria-label": "invalid" })
871
+ /* @__PURE__ */ jsxs7(Section, { title: "Text entry", children: [
872
+ /* @__PURE__ */ jsxs7(Specimen, { label: "Input: default, disabled, invalid", children: [
873
+ /* @__PURE__ */ jsx7(Input, { placeholder: "Placeholder", "aria-label": "default" }),
874
+ /* @__PURE__ */ jsx7(Input, { placeholder: "Disabled", disabled: true, "aria-label": "disabled" }),
875
+ /* @__PURE__ */ jsx7(Input, { defaultValue: "Not an email", "aria-invalid": true, "aria-label": "invalid" })
463
876
  ] }),
464
- /* @__PURE__ */ jsx5(Specimen, { label: "InputGroup", children: /* @__PURE__ */ jsxs5(InputGroup, { children: [
465
- /* @__PURE__ */ jsx5(InputGroupAddon, { children: /* @__PURE__ */ jsx5(Search, {}) }),
466
- /* @__PURE__ */ jsx5(InputGroupInput, { placeholder: "Search", "aria-label": "Search" }),
467
- /* @__PURE__ */ jsx5(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx5(InputGroupButton, { children: "Go" }) })
877
+ /* @__PURE__ */ jsx7(Specimen, { label: "InputGroup", children: /* @__PURE__ */ jsxs7(InputGroup, { children: [
878
+ /* @__PURE__ */ jsx7(InputGroupAddon2, { children: /* @__PURE__ */ jsx7(Search, {}) }),
879
+ /* @__PURE__ */ jsx7(InputGroupInput, { placeholder: "Search", "aria-label": "Search" }),
880
+ /* @__PURE__ */ jsx7(InputGroupAddon2, { align: "inline-end", children: /* @__PURE__ */ jsx7(InputGroupButton2, { children: "Go" }) })
468
881
  ] }) }),
469
- /* @__PURE__ */ jsx5(Specimen, { label: "Textarea", children: /* @__PURE__ */ jsx5(Textarea, { placeholder: "Write something", "aria-label": "Textarea" }) }),
470
- /* @__PURE__ */ jsx5(Specimen, { label: "TextEditor (a document's source)", children: /* @__PURE__ */ jsx5("div", { className: "h-24 w-full rounded-md border border-border", children: /* @__PURE__ */ jsx5(TextEditor, { "aria-label": "Source", defaultValue: "# A heading\n\nSome **Markdown**, in the monospace face." }) }) }),
471
- /* @__PURE__ */ jsxs5(Specimen, { label: "Field: label, description, error", wide: true, children: [
472
- /* @__PURE__ */ jsxs5(Field, { children: [
473
- /* @__PURE__ */ jsx5(FieldLabel, { htmlFor: "g-name", children: "Name" }),
474
- /* @__PURE__ */ jsx5(Input, { id: "g-name", placeholder: "Ada" }),
475
- /* @__PURE__ */ jsx5(FieldDescription, { children: "What the agent calls you." })
882
+ /* @__PURE__ */ jsx7(Specimen, { label: "Textarea", children: /* @__PURE__ */ jsx7(Textarea, { placeholder: "Write something", "aria-label": "Textarea" }) }),
883
+ /* @__PURE__ */ jsx7(Specimen, { label: "TextEditor (a document's source)", children: /* @__PURE__ */ jsx7("div", { className: "h-24 w-full rounded-md border border-border", children: /* @__PURE__ */ jsx7(TextEditor, { "aria-label": "Source", defaultValue: "# A heading\n\nSome **Markdown**, in the monospace face." }) }) }),
884
+ /* @__PURE__ */ jsxs7(Specimen, { label: "Field: label, description, error", wide: true, children: [
885
+ /* @__PURE__ */ jsxs7(Field, { children: [
886
+ /* @__PURE__ */ jsx7(FieldLabel, { htmlFor: "g-name", children: "Name" }),
887
+ /* @__PURE__ */ jsx7(Input, { id: "g-name", placeholder: "Ada" }),
888
+ /* @__PURE__ */ jsx7(FieldDescription, { children: "What the agent calls you." })
476
889
  ] }),
477
- /* @__PURE__ */ jsxs5(Field, { "data-invalid": "true", children: [
478
- /* @__PURE__ */ jsx5(FieldLabel, { htmlFor: "g-mail", children: "Email" }),
479
- /* @__PURE__ */ jsx5(Input, { id: "g-mail", defaultValue: "ada@", "aria-invalid": true }),
480
- /* @__PURE__ */ jsx5(FieldError, { children: "That is not a whole address." })
890
+ /* @__PURE__ */ jsxs7(Field, { "data-invalid": "true", children: [
891
+ /* @__PURE__ */ jsx7(FieldLabel, { htmlFor: "g-mail", children: "Email" }),
892
+ /* @__PURE__ */ jsx7(Input, { id: "g-mail", defaultValue: "ada@", "aria-invalid": true }),
893
+ /* @__PURE__ */ jsx7(FieldError, { children: "That is not a whole address." })
481
894
  ] })
482
895
  ] })
483
896
  ] }),
484
- /* @__PURE__ */ jsxs5(Section, { title: "Choices", children: [
485
- /* @__PURE__ */ jsxs5(Specimen, { label: "Select: default, sm, disabled", children: [
486
- /* @__PURE__ */ jsxs5(Select, { defaultValue: "pear", items: FRUIT, children: [
487
- /* @__PURE__ */ jsx5(SelectTrigger, { "aria-label": "Fruit", children: /* @__PURE__ */ jsx5(SelectValue, {}) }),
488
- /* @__PURE__ */ jsx5(SelectContent, { children: FRUIT.map((f) => /* @__PURE__ */ jsx5(SelectItem, { value: f.value, children: f.label }, f.value)) })
897
+ /* @__PURE__ */ jsxs7(Section, { title: "Choices", children: [
898
+ /* @__PURE__ */ jsxs7(Specimen, { label: "Select: default, sm, disabled", children: [
899
+ /* @__PURE__ */ jsxs7(Select, { defaultValue: "pear", items: FRUIT, children: [
900
+ /* @__PURE__ */ jsx7(SelectTrigger, { "aria-label": "Fruit", children: /* @__PURE__ */ jsx7(SelectValue, {}) }),
901
+ /* @__PURE__ */ jsx7(SelectContent, { children: FRUIT.map((f) => /* @__PURE__ */ jsx7(SelectItem, { value: f.value, children: f.label }, f.value)) })
489
902
  ] }),
490
- /* @__PURE__ */ jsxs5(Select, { defaultValue: "plum", items: FRUIT, children: [
491
- /* @__PURE__ */ jsx5(SelectTrigger, { size: "sm", "aria-label": "Fruit, small", children: /* @__PURE__ */ jsx5(SelectValue, {}) }),
492
- /* @__PURE__ */ jsx5(SelectContent, { children: FRUIT.map((f) => /* @__PURE__ */ jsx5(SelectItem, { value: f.value, children: f.label }, f.value)) })
903
+ /* @__PURE__ */ jsxs7(Select, { defaultValue: "plum", items: FRUIT, children: [
904
+ /* @__PURE__ */ jsx7(SelectTrigger, { size: "sm", "aria-label": "Fruit, small", children: /* @__PURE__ */ jsx7(SelectValue, {}) }),
905
+ /* @__PURE__ */ jsx7(SelectContent, { children: FRUIT.map((f) => /* @__PURE__ */ jsx7(SelectItem, { value: f.value, children: f.label }, f.value)) })
493
906
  ] }),
494
- /* @__PURE__ */ jsxs5(Select, { disabled: true, items: FRUIT, children: [
495
- /* @__PURE__ */ jsx5(SelectTrigger, { "aria-label": "Fruit, disabled", children: /* @__PURE__ */ jsx5(SelectValue, { placeholder: "Disabled" }) }),
496
- /* @__PURE__ */ jsx5(SelectContent, {})
907
+ /* @__PURE__ */ jsxs7(Select, { disabled: true, items: FRUIT, children: [
908
+ /* @__PURE__ */ jsx7(SelectTrigger, { "aria-label": "Fruit, disabled", children: /* @__PURE__ */ jsx7(SelectValue, { placeholder: "Disabled" }) }),
909
+ /* @__PURE__ */ jsx7(SelectContent, {})
497
910
  ] })
498
911
  ] }),
499
- /* @__PURE__ */ jsxs5(Specimen, { label: "Checkbox and Switch: off, on, disabled", children: [
500
- /* @__PURE__ */ jsxs5(Label2, { className: "gap-2", children: [
501
- /* @__PURE__ */ jsx5(Checkbox, {}),
912
+ /* @__PURE__ */ jsxs7(Specimen, { label: "Checkbox and Switch: off, on, disabled", children: [
913
+ /* @__PURE__ */ jsxs7(Label2, { className: "gap-2", children: [
914
+ /* @__PURE__ */ jsx7(Checkbox, {}),
502
915
  " off"
503
916
  ] }),
504
- /* @__PURE__ */ jsxs5(Label2, { className: "gap-2", children: [
505
- /* @__PURE__ */ jsx5(Checkbox, { defaultChecked: true }),
917
+ /* @__PURE__ */ jsxs7(Label2, { className: "gap-2", children: [
918
+ /* @__PURE__ */ jsx7(Checkbox, { defaultChecked: true }),
506
919
  " on"
507
920
  ] }),
508
- /* @__PURE__ */ jsxs5(Label2, { className: "gap-2", children: [
509
- /* @__PURE__ */ jsx5(Checkbox, { disabled: true }),
921
+ /* @__PURE__ */ jsxs7(Label2, { className: "gap-2", children: [
922
+ /* @__PURE__ */ jsx7(Checkbox, { disabled: true }),
510
923
  " disabled"
511
924
  ] }),
512
- /* @__PURE__ */ jsx5(Switch2, { "aria-label": "off" }),
513
- /* @__PURE__ */ jsx5(Switch2, { defaultChecked: true, "aria-label": "on" }),
514
- /* @__PURE__ */ jsx5(Switch2, { disabled: true, "aria-label": "disabled" })
925
+ /* @__PURE__ */ jsx7(Switch2, { "aria-label": "off" }),
926
+ /* @__PURE__ */ jsx7(Switch2, { defaultChecked: true, "aria-label": "on" }),
927
+ /* @__PURE__ */ jsx7(Switch2, { disabled: true, "aria-label": "disabled" })
515
928
  ] }),
516
- /* @__PURE__ */ jsxs5(Specimen, { label: "Toggle and ToggleGroup (default, outline, sm)", children: [
517
- /* @__PURE__ */ jsx5(Toggle, { "aria-label": "Bold", defaultPressed: true, children: /* @__PURE__ */ jsx5(Bold, {}) }),
518
- /* @__PURE__ */ jsxs5(ToggleGroup, { defaultValue: ["bold"], "aria-label": "Style", children: [
519
- /* @__PURE__ */ jsx5(ToggleGroupItem, { value: "bold", "aria-label": "Bold", children: /* @__PURE__ */ jsx5(Bold, {}) }),
520
- /* @__PURE__ */ jsx5(ToggleGroupItem, { value: "italic", "aria-label": "Italic", children: /* @__PURE__ */ jsx5(Italic, {}) }),
521
- /* @__PURE__ */ jsx5(ToggleGroupItem, { value: "underline", "aria-label": "Underline", children: /* @__PURE__ */ jsx5(Underline, {}) })
929
+ /* @__PURE__ */ jsxs7(Specimen, { label: "Toggle and ToggleGroup (default, outline, sm)", children: [
930
+ /* @__PURE__ */ jsx7(Toggle, { "aria-label": "Bold", defaultPressed: true, children: /* @__PURE__ */ jsx7(Bold, {}) }),
931
+ /* @__PURE__ */ jsxs7(ToggleGroup, { defaultValue: ["bold"], "aria-label": "Style", children: [
932
+ /* @__PURE__ */ jsx7(ToggleGroupItem, { value: "bold", "aria-label": "Bold", children: /* @__PURE__ */ jsx7(Bold, {}) }),
933
+ /* @__PURE__ */ jsx7(ToggleGroupItem, { value: "italic", "aria-label": "Italic", children: /* @__PURE__ */ jsx7(Italic, {}) }),
934
+ /* @__PURE__ */ jsx7(ToggleGroupItem, { value: "underline", "aria-label": "Underline", children: /* @__PURE__ */ jsx7(Underline, {}) })
522
935
  ] }),
523
- /* @__PURE__ */ jsxs5(ToggleGroup, { variant: "outline", size: "sm", spacing: 0, defaultValue: ["review"], "aria-label": "Mode", children: [
524
- /* @__PURE__ */ jsx5(ToggleGroupItem, { value: "review", children: "Review" }),
525
- /* @__PURE__ */ jsx5(ToggleGroupItem, { value: "edit", children: "Edit" }),
526
- /* @__PURE__ */ jsx5(ToggleGroupItem, { value: "compare", children: "Compare" })
936
+ /* @__PURE__ */ jsxs7(ToggleGroup, { variant: "outline", size: "sm", spacing: 0, defaultValue: ["review"], "aria-label": "Mode", children: [
937
+ /* @__PURE__ */ jsx7(ToggleGroupItem, { value: "review", children: "Review" }),
938
+ /* @__PURE__ */ jsx7(ToggleGroupItem, { value: "edit", children: "Edit" }),
939
+ /* @__PURE__ */ jsx7(ToggleGroupItem, { value: "compare", children: "Compare" })
527
940
  ] })
528
941
  ] }),
529
- /* @__PURE__ */ jsxs5(Specimen, { label: "Tabs: default and line", children: [
530
- /* @__PURE__ */ jsxs5(Tabs, { defaultValue: "one", children: [
531
- /* @__PURE__ */ jsxs5(TabsList, { children: [
532
- /* @__PURE__ */ jsx5(TabsTrigger, { value: "one", children: "One" }),
533
- /* @__PURE__ */ jsx5(TabsTrigger, { value: "two", children: "Two" }),
534
- /* @__PURE__ */ jsx5(TabsTrigger, { value: "three", disabled: true, children: "Three" })
942
+ /* @__PURE__ */ jsxs7(Specimen, { label: "Tabs: default and line", children: [
943
+ /* @__PURE__ */ jsxs7(Tabs, { defaultValue: "one", children: [
944
+ /* @__PURE__ */ jsxs7(TabsList, { children: [
945
+ /* @__PURE__ */ jsx7(TabsTrigger, { value: "one", children: "One" }),
946
+ /* @__PURE__ */ jsx7(TabsTrigger, { value: "two", children: "Two" }),
947
+ /* @__PURE__ */ jsx7(TabsTrigger, { value: "three", disabled: true, children: "Three" })
535
948
  ] }),
536
- /* @__PURE__ */ jsx5(TabsContent, { value: "one", className: "pt-2 text-sm text-muted-foreground", children: "The first tab's content." })
949
+ /* @__PURE__ */ jsx7(TabsContent, { value: "one", className: "pt-2 text-sm text-muted-foreground", children: "The first tab's content." })
537
950
  ] }),
538
- /* @__PURE__ */ jsx5(Tabs, { defaultValue: "two", children: /* @__PURE__ */ jsxs5(TabsList, { variant: "line", children: [
539
- /* @__PURE__ */ jsx5(TabsTrigger, { value: "one", children: "One" }),
540
- /* @__PURE__ */ jsx5(TabsTrigger, { value: "two", children: "Two" })
951
+ /* @__PURE__ */ jsx7(Tabs, { defaultValue: "two", children: /* @__PURE__ */ jsxs7(TabsList, { variant: "line", children: [
952
+ /* @__PURE__ */ jsx7(TabsTrigger, { value: "one", children: "One" }),
953
+ /* @__PURE__ */ jsx7(TabsTrigger, { value: "two", children: "Two" })
541
954
  ] }) })
542
955
  ] })
543
956
  ] })
@@ -555,7 +968,7 @@ import {
555
968
  BreadcrumbPage,
556
969
  BreadcrumbSeparator
557
970
  } from "@/components/ui/breadcrumb";
558
- import { Button as Button2 } from "@/components/ui/button";
971
+ import { Button as Button3 } from "@/components/ui/button";
559
972
  import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
560
973
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
561
974
  import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/components/ui/empty";
@@ -567,106 +980,106 @@ import { Separator } from "@/components/ui/separator";
567
980
  import { Skeleton } from "@/components/ui/skeleton";
568
981
  import { Spinner } from "@/components/ui/spinner";
569
982
  import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
570
- import { Fragment as Fragment4, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
983
+ import { Fragment as Fragment7, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
571
984
  var ROWS = [
572
985
  { name: "notes", kind: "module", state: "running" },
573
986
  { name: "drafts", kind: "module", state: "running" },
574
987
  { name: "builder", kind: "module", state: "stopped" }
575
988
  ];
576
989
  function Display() {
577
- return /* @__PURE__ */ jsxs6(Fragment4, { children: [
578
- /* @__PURE__ */ jsxs6(Section, { title: "Rows", about: "Item in each variant and size; a Table.", children: [
579
- ["default", "outline", "muted"].map((v) => /* @__PURE__ */ jsx6(Specimen, { label: `Item variant="${v}"`, children: /* @__PURE__ */ jsxs6(Item, { variant: v, children: [
580
- /* @__PURE__ */ jsx6(ItemMedia, { variant: "icon", children: /* @__PURE__ */ jsx6(FileText, {}) }),
581
- /* @__PURE__ */ jsxs6(ItemContent, { children: [
582
- /* @__PURE__ */ jsx6(ItemTitle, { children: "Launch notes" }),
583
- /* @__PURE__ */ jsx6(ItemDescription, { children: "markdown \xB7 r2 \xB7 7 lines" })
990
+ return /* @__PURE__ */ jsxs8(Fragment7, { children: [
991
+ /* @__PURE__ */ jsxs8(Section, { title: "Rows", about: "Item in each variant and size; a Table.", children: [
992
+ ["default", "outline", "muted"].map((v) => /* @__PURE__ */ jsx8(Specimen, { label: `Item variant="${v}"`, children: /* @__PURE__ */ jsxs8(Item, { variant: v, children: [
993
+ /* @__PURE__ */ jsx8(ItemMedia, { variant: "icon", children: /* @__PURE__ */ jsx8(FileText, {}) }),
994
+ /* @__PURE__ */ jsxs8(ItemContent, { children: [
995
+ /* @__PURE__ */ jsx8(ItemTitle, { children: "Launch notes" }),
996
+ /* @__PURE__ */ jsx8(ItemDescription, { children: "markdown \xB7 r2 \xB7 7 lines" })
584
997
  ] }),
585
- /* @__PURE__ */ jsx6(ItemActions, { children: /* @__PURE__ */ jsx6(Button2, { variant: "ghost", size: "icon-sm", "aria-label": "Open", children: /* @__PURE__ */ jsx6(ChevronRight, {}) }) })
998
+ /* @__PURE__ */ jsx8(ItemActions, { children: /* @__PURE__ */ jsx8(Button3, { variant: "ghost", size: "icon-sm", "aria-label": "Open", children: /* @__PURE__ */ jsx8(ChevronRight, {}) }) })
586
999
  ] }) }, v)),
587
- /* @__PURE__ */ jsx6(Specimen, { label: 'Item size="sm" and "xs"', children: /* @__PURE__ */ jsxs6("div", { className: "flex w-full flex-col gap-1", children: [
588
- /* @__PURE__ */ jsx6(Item, { size: "sm", variant: "outline", children: /* @__PURE__ */ jsx6(ItemContent, { children: /* @__PURE__ */ jsx6(ItemTitle, { children: "Small" }) }) }),
589
- /* @__PURE__ */ jsx6(Item, { size: "xs", variant: "outline", children: /* @__PURE__ */ jsx6(ItemContent, { children: /* @__PURE__ */ jsx6(ItemTitle, { children: "Extra small" }) }) })
1000
+ /* @__PURE__ */ jsx8(Specimen, { label: 'Item size="sm" and "xs"', children: /* @__PURE__ */ jsxs8("div", { className: "flex w-full flex-col gap-1", children: [
1001
+ /* @__PURE__ */ jsx8(Item, { size: "sm", variant: "outline", children: /* @__PURE__ */ jsx8(ItemContent, { children: /* @__PURE__ */ jsx8(ItemTitle, { children: "Small" }) }) }),
1002
+ /* @__PURE__ */ jsx8(Item, { size: "xs", variant: "outline", children: /* @__PURE__ */ jsx8(ItemContent, { children: /* @__PURE__ */ jsx8(ItemTitle, { children: "Extra small" }) }) })
590
1003
  ] }) }),
591
- /* @__PURE__ */ jsx6(Specimen, { label: "Table", wide: true, children: /* @__PURE__ */ jsxs6(Table, { children: [
592
- /* @__PURE__ */ jsx6(TableCaption, { children: "The modules of this app." }),
593
- /* @__PURE__ */ jsx6(TableHeader, { children: /* @__PURE__ */ jsxs6(TableRow, { children: [
594
- /* @__PURE__ */ jsx6(TableHead, { children: "Name" }),
595
- /* @__PURE__ */ jsx6(TableHead, { children: "Kind" }),
596
- /* @__PURE__ */ jsx6(TableHead, { className: "text-right", children: "State" })
1004
+ /* @__PURE__ */ jsx8(Specimen, { label: "Table", wide: true, children: /* @__PURE__ */ jsxs8(Table, { children: [
1005
+ /* @__PURE__ */ jsx8(TableCaption, { children: "The modules of this app." }),
1006
+ /* @__PURE__ */ jsx8(TableHeader, { children: /* @__PURE__ */ jsxs8(TableRow, { children: [
1007
+ /* @__PURE__ */ jsx8(TableHead, { children: "Name" }),
1008
+ /* @__PURE__ */ jsx8(TableHead, { children: "Kind" }),
1009
+ /* @__PURE__ */ jsx8(TableHead, { className: "text-right", children: "State" })
597
1010
  ] }) }),
598
- /* @__PURE__ */ jsx6(TableBody, { children: ROWS.map((r) => /* @__PURE__ */ jsxs6(TableRow, { children: [
599
- /* @__PURE__ */ jsx6(TableCell, { className: "font-medium", children: r.name }),
600
- /* @__PURE__ */ jsx6(TableCell, { children: r.kind }),
601
- /* @__PURE__ */ jsx6(TableCell, { className: "text-right", children: r.state })
1011
+ /* @__PURE__ */ jsx8(TableBody, { children: ROWS.map((r) => /* @__PURE__ */ jsxs8(TableRow, { children: [
1012
+ /* @__PURE__ */ jsx8(TableCell, { className: "font-medium", children: r.name }),
1013
+ /* @__PURE__ */ jsx8(TableCell, { children: r.kind }),
1014
+ /* @__PURE__ */ jsx8(TableCell, { className: "text-right", children: r.state })
602
1015
  ] }, r.name)) })
603
1016
  ] }) })
604
1017
  ] }),
605
- /* @__PURE__ */ jsxs6(Section, { title: "Regions", children: [
606
- /* @__PURE__ */ jsxs6(Specimen, { label: "Card: default and sm", children: [
607
- /* @__PURE__ */ jsxs6(Card, { className: "w-full", children: [
608
- /* @__PURE__ */ jsxs6(CardHeader, { children: [
609
- /* @__PURE__ */ jsx6(CardTitle, { children: "A card" }),
610
- /* @__PURE__ */ jsx6(CardDescription, { children: "With a header, content and a footer." }),
611
- /* @__PURE__ */ jsx6(CardAction, { children: /* @__PURE__ */ jsx6(Button2, { variant: "outline", size: "xs", children: "Action" }) })
1018
+ /* @__PURE__ */ jsxs8(Section, { title: "Regions", children: [
1019
+ /* @__PURE__ */ jsxs8(Specimen, { label: "Card: default and sm", children: [
1020
+ /* @__PURE__ */ jsxs8(Card, { className: "w-full", children: [
1021
+ /* @__PURE__ */ jsxs8(CardHeader, { children: [
1022
+ /* @__PURE__ */ jsx8(CardTitle, { children: "A card" }),
1023
+ /* @__PURE__ */ jsx8(CardDescription, { children: "With a header, content and a footer." }),
1024
+ /* @__PURE__ */ jsx8(CardAction, { children: /* @__PURE__ */ jsx8(Button3, { variant: "outline", size: "xs", children: "Action" }) })
612
1025
  ] }),
613
- /* @__PURE__ */ jsx6(CardContent, { className: "text-sm", children: "The body of the card." }),
614
- /* @__PURE__ */ jsx6(CardFooter, { children: /* @__PURE__ */ jsx6(Button2, { size: "sm", children: "Save" }) })
1026
+ /* @__PURE__ */ jsx8(CardContent, { className: "text-sm", children: "The body of the card." }),
1027
+ /* @__PURE__ */ jsx8(CardFooter, { children: /* @__PURE__ */ jsx8(Button3, { size: "sm", children: "Save" }) })
615
1028
  ] }),
616
- /* @__PURE__ */ jsx6(Card, { size: "sm", className: "w-full", children: /* @__PURE__ */ jsxs6(CardHeader, { children: [
617
- /* @__PURE__ */ jsx6(CardTitle, { children: "Small" }),
618
- /* @__PURE__ */ jsx6(CardDescription, { children: 'size="sm"' })
1029
+ /* @__PURE__ */ jsx8(Card, { size: "sm", className: "w-full", children: /* @__PURE__ */ jsxs8(CardHeader, { children: [
1030
+ /* @__PURE__ */ jsx8(CardTitle, { children: "Small" }),
1031
+ /* @__PURE__ */ jsx8(CardDescription, { children: 'size="sm"' })
619
1032
  ] }) })
620
1033
  ] }),
621
- /* @__PURE__ */ jsx6(Specimen, { label: "Empty", children: /* @__PURE__ */ jsxs6(Empty, { className: "border border-dashed border-border", children: [
622
- /* @__PURE__ */ jsxs6(EmptyHeader, { children: [
623
- /* @__PURE__ */ jsx6(EmptyMedia, { variant: "icon", children: /* @__PURE__ */ jsx6(Inbox, {}) }),
624
- /* @__PURE__ */ jsx6(EmptyTitle, { children: "Nothing here yet" }),
625
- /* @__PURE__ */ jsx6(EmptyDescription, { children: "Things you add show up here." })
1034
+ /* @__PURE__ */ jsx8(Specimen, { label: "Empty", children: /* @__PURE__ */ jsxs8(Empty, { className: "border border-dashed border-border", children: [
1035
+ /* @__PURE__ */ jsxs8(EmptyHeader, { children: [
1036
+ /* @__PURE__ */ jsx8(EmptyMedia, { variant: "icon", children: /* @__PURE__ */ jsx8(Inbox, {}) }),
1037
+ /* @__PURE__ */ jsx8(EmptyTitle, { children: "Nothing here yet" }),
1038
+ /* @__PURE__ */ jsx8(EmptyDescription, { children: "Things you add show up here." })
626
1039
  ] }),
627
- /* @__PURE__ */ jsx6(EmptyContent, { children: /* @__PURE__ */ jsx6(Button2, { size: "sm", children: "Add one" }) })
1040
+ /* @__PURE__ */ jsx8(EmptyContent, { children: /* @__PURE__ */ jsx8(Button3, { size: "sm", children: "Add one" }) })
628
1041
  ] }) }),
629
- /* @__PURE__ */ jsx6(Specimen, { label: "ScrollArea", children: /* @__PURE__ */ jsx6(ScrollArea, { className: "h-28 w-full rounded-md border border-border", children: /* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-1 p-2 text-sm", children: Array.from({ length: 12 }, (_, i) => `Line ${i + 1}`).map((l) => /* @__PURE__ */ jsx6("span", { children: l }, l)) }) }) }),
630
- /* @__PURE__ */ jsx6(Specimen, { label: "ResizablePanelGroup", children: /* @__PURE__ */ jsx6("div", { className: "h-28 w-full rounded-md border border-border", children: /* @__PURE__ */ jsxs6(ResizablePanelGroup, { orientation: "horizontal", children: [
631
- /* @__PURE__ */ jsx6(ResizablePanel, { defaultSize: "40", className: "grid place-items-center text-sm", children: "One" }),
632
- /* @__PURE__ */ jsx6(ResizableHandle, { withHandle: true }),
633
- /* @__PURE__ */ jsx6(ResizablePanel, { className: "grid place-items-center text-sm", children: "Two" })
1042
+ /* @__PURE__ */ jsx8(Specimen, { label: "ScrollArea", children: /* @__PURE__ */ jsx8(ScrollArea, { className: "h-28 w-full rounded-md border border-border", children: /* @__PURE__ */ jsx8("div", { className: "flex flex-col gap-1 p-2 text-sm", children: Array.from({ length: 12 }, (_, i) => `Line ${i + 1}`).map((l) => /* @__PURE__ */ jsx8("span", { children: l }, l)) }) }) }),
1043
+ /* @__PURE__ */ jsx8(Specimen, { label: "ResizablePanelGroup", children: /* @__PURE__ */ jsx8("div", { className: "h-28 w-full rounded-md border border-border", children: /* @__PURE__ */ jsxs8(ResizablePanelGroup, { orientation: "horizontal", children: [
1044
+ /* @__PURE__ */ jsx8(ResizablePanel, { defaultSize: "40", className: "grid place-items-center text-sm", children: "One" }),
1045
+ /* @__PURE__ */ jsx8(ResizableHandle, { withHandle: true }),
1046
+ /* @__PURE__ */ jsx8(ResizablePanel, { className: "grid place-items-center text-sm", children: "Two" })
634
1047
  ] }) }) }),
635
- /* @__PURE__ */ jsx6(Specimen, { label: "Collapsible (open)", children: /* @__PURE__ */ jsxs6(Collapsible, { defaultOpen: true, className: "w-full", children: [
636
- /* @__PURE__ */ jsxs6(CollapsibleTrigger, { render: /* @__PURE__ */ jsx6(Button2, { variant: "ghost", size: "sm" }), children: [
637
- /* @__PURE__ */ jsx6(Folder, {}),
1048
+ /* @__PURE__ */ jsx8(Specimen, { label: "Collapsible (open)", children: /* @__PURE__ */ jsxs8(Collapsible, { defaultOpen: true, className: "w-full", children: [
1049
+ /* @__PURE__ */ jsxs8(CollapsibleTrigger, { render: /* @__PURE__ */ jsx8(Button3, { variant: "ghost", size: "sm" }), children: [
1050
+ /* @__PURE__ */ jsx8(Folder, {}),
638
1051
  " Details"
639
1052
  ] }),
640
- /* @__PURE__ */ jsx6(CollapsibleContent, { className: "px-2 pt-1 text-sm text-muted-foreground", children: "What was folded away." })
1053
+ /* @__PURE__ */ jsx8(CollapsibleContent, { className: "px-2 pt-1 text-sm text-muted-foreground", children: "What was folded away." })
641
1054
  ] }) }),
642
- /* @__PURE__ */ jsxs6(Specimen, { label: "Breadcrumb and Separator", children: [
643
- /* @__PURE__ */ jsx6(Breadcrumb, { children: /* @__PURE__ */ jsxs6(BreadcrumbList, { children: [
644
- /* @__PURE__ */ jsx6(BreadcrumbItem, { children: /* @__PURE__ */ jsx6(BreadcrumbLink, { href: "#gallery", children: "Home" }) }),
645
- /* @__PURE__ */ jsx6(BreadcrumbSeparator, {}),
646
- /* @__PURE__ */ jsx6(BreadcrumbItem, { children: /* @__PURE__ */ jsx6(BreadcrumbLink, { href: "#gallery", children: "Notes" }) }),
647
- /* @__PURE__ */ jsx6(BreadcrumbSeparator, {}),
648
- /* @__PURE__ */ jsx6(BreadcrumbItem, { children: /* @__PURE__ */ jsx6(BreadcrumbPage, { children: "Launch" }) })
1055
+ /* @__PURE__ */ jsxs8(Specimen, { label: "Breadcrumb and Separator", children: [
1056
+ /* @__PURE__ */ jsx8(Breadcrumb, { children: /* @__PURE__ */ jsxs8(BreadcrumbList, { children: [
1057
+ /* @__PURE__ */ jsx8(BreadcrumbItem, { children: /* @__PURE__ */ jsx8(BreadcrumbLink, { href: "#gallery", children: "Home" }) }),
1058
+ /* @__PURE__ */ jsx8(BreadcrumbSeparator, {}),
1059
+ /* @__PURE__ */ jsx8(BreadcrumbItem, { children: /* @__PURE__ */ jsx8(BreadcrumbLink, { href: "#gallery", children: "Notes" }) }),
1060
+ /* @__PURE__ */ jsx8(BreadcrumbSeparator, {}),
1061
+ /* @__PURE__ */ jsx8(BreadcrumbItem, { children: /* @__PURE__ */ jsx8(BreadcrumbPage, { children: "Launch" }) })
649
1062
  ] }) }),
650
- /* @__PURE__ */ jsx6(Separator, {})
1063
+ /* @__PURE__ */ jsx8(Separator, {})
651
1064
  ] })
652
1065
  ] }),
653
- /* @__PURE__ */ jsxs6(Section, { title: "Status", children: [
654
- /* @__PURE__ */ jsxs6(Specimen, { label: "Spinner, Skeleton, Progress", children: [
655
- /* @__PURE__ */ jsx6(Spinner, {}),
656
- /* @__PURE__ */ jsxs6("div", { className: "flex w-40 flex-col gap-1.5", children: [
657
- /* @__PURE__ */ jsx6(Skeleton, { className: "h-3 w-full" }),
658
- /* @__PURE__ */ jsx6(Skeleton, { className: "h-3 w-2/3" })
1066
+ /* @__PURE__ */ jsxs8(Section, { title: "Status", children: [
1067
+ /* @__PURE__ */ jsxs8(Specimen, { label: "Spinner, Skeleton, Progress", children: [
1068
+ /* @__PURE__ */ jsx8(Spinner, {}),
1069
+ /* @__PURE__ */ jsxs8("div", { className: "flex w-40 flex-col gap-1.5", children: [
1070
+ /* @__PURE__ */ jsx8(Skeleton, { className: "h-3 w-full" }),
1071
+ /* @__PURE__ */ jsx8(Skeleton, { className: "h-3 w-2/3" })
659
1072
  ] }),
660
- /* @__PURE__ */ jsx6(Progress, { value: 62, className: "w-40", "aria-label": "62 percent" })
1073
+ /* @__PURE__ */ jsx8(Progress, { value: 62, className: "w-40", "aria-label": "62 percent" })
661
1074
  ] }),
662
- /* @__PURE__ */ jsxs6(Specimen, { label: "Avatar: sizes and a group", children: [
663
- /* @__PURE__ */ jsx6(Avatar, { size: "sm", children: /* @__PURE__ */ jsx6(AvatarFallback, { children: "AL" }) }),
664
- /* @__PURE__ */ jsx6(Avatar, { children: /* @__PURE__ */ jsx6(AvatarFallback, { children: "AL" }) }),
665
- /* @__PURE__ */ jsx6(Avatar, { size: "lg", children: /* @__PURE__ */ jsx6(AvatarFallback, { children: "AL" }) }),
666
- /* @__PURE__ */ jsxs6(AvatarGroup, { children: [
667
- /* @__PURE__ */ jsx6(Avatar, { children: /* @__PURE__ */ jsx6(AvatarFallback, { children: "A" }) }),
668
- /* @__PURE__ */ jsx6(Avatar, { children: /* @__PURE__ */ jsx6(AvatarFallback, { children: "B" }) }),
669
- /* @__PURE__ */ jsx6(AvatarGroupCount, { children: "+3" })
1075
+ /* @__PURE__ */ jsxs8(Specimen, { label: "Avatar: sizes and a group", children: [
1076
+ /* @__PURE__ */ jsx8(Avatar, { size: "sm", children: /* @__PURE__ */ jsx8(AvatarFallback, { children: "AL" }) }),
1077
+ /* @__PURE__ */ jsx8(Avatar, { children: /* @__PURE__ */ jsx8(AvatarFallback, { children: "AL" }) }),
1078
+ /* @__PURE__ */ jsx8(Avatar, { size: "lg", children: /* @__PURE__ */ jsx8(AvatarFallback, { children: "AL" }) }),
1079
+ /* @__PURE__ */ jsxs8(AvatarGroup, { children: [
1080
+ /* @__PURE__ */ jsx8(Avatar, { children: /* @__PURE__ */ jsx8(AvatarFallback, { children: "A" }) }),
1081
+ /* @__PURE__ */ jsx8(Avatar, { children: /* @__PURE__ */ jsx8(AvatarFallback, { children: "B" }) }),
1082
+ /* @__PURE__ */ jsx8(AvatarGroupCount, { children: "+3" })
670
1083
  ] })
671
1084
  ] })
672
1085
  ] })
@@ -675,7 +1088,7 @@ function Display() {
675
1088
 
676
1089
  // ../../web/src/gallery/genui.tsx
677
1090
  import { GenuiSurface } from "@/components/ui/genui-surface";
678
- import { Fragment as Fragment5, jsx as jsx7 } from "react/jsx-runtime";
1091
+ import { Fragment as Fragment8, jsx as jsx9 } from "react/jsx-runtime";
679
1092
  var PATTERNS = [
680
1093
  {
681
1094
  name: "approval",
@@ -727,7 +1140,7 @@ var PHASES = [
727
1140
  { phase: "stale" }
728
1141
  ];
729
1142
  function Genui() {
730
- return /* @__PURE__ */ jsx7(Fragment5, { children: PATTERNS.map(({ name, pattern }) => /* @__PURE__ */ jsx7(Section, { title: `genui-surface: ${name}`, children: PHASES.map((p) => /* @__PURE__ */ jsx7(Specimen, { label: p.status ? `${p.phase} \xB7 ${p.status}` : p.phase, children: /* @__PURE__ */ jsx7("div", { className: "w-full", children: /* @__PURE__ */ jsx7(
1143
+ return /* @__PURE__ */ jsx9(Fragment8, { children: PATTERNS.map(({ name, pattern }) => /* @__PURE__ */ jsx9(Section, { title: `genui-surface: ${name}`, children: PHASES.map((p) => /* @__PURE__ */ jsx9(Specimen, { label: p.status ? `${p.phase} \xB7 ${p.status}` : p.phase, children: /* @__PURE__ */ jsx9("div", { className: "w-full", children: /* @__PURE__ */ jsx9(
731
1144
  GenuiSurface,
732
1145
  {
733
1146
  pattern,
@@ -761,7 +1174,7 @@ import {
761
1174
  AlertDialogTitle,
762
1175
  AlertDialogTrigger
763
1176
  } from "@/components/ui/alert-dialog";
764
- import { Button as Button3 } from "@/components/ui/button";
1177
+ import { Button as Button4 } from "@/components/ui/button";
765
1178
  import {
766
1179
  Command,
767
1180
  CommandEmpty,
@@ -815,110 +1228,303 @@ import {
815
1228
  SheetTrigger
816
1229
  } from "@/components/ui/sheet";
817
1230
  import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
818
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1231
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
819
1232
  function Overlays() {
820
- return /* @__PURE__ */ jsxs7(Section, { title: "Over the page", about: "Open each from its trigger. Command is shown inline as well.", children: [
821
- /* @__PURE__ */ jsxs7(Specimen, { label: "Dialog and AlertDialog", children: [
822
- /* @__PURE__ */ jsxs7(Dialog, { children: [
823
- /* @__PURE__ */ jsx8(DialogTrigger, { render: /* @__PURE__ */ jsx8(Button3, { variant: "outline", children: "Open dialog" }) }),
824
- /* @__PURE__ */ jsxs7(DialogContent, { children: [
825
- /* @__PURE__ */ jsxs7(DialogHeader, { children: [
826
- /* @__PURE__ */ jsx8(DialogTitle, { children: "A dialog" }),
827
- /* @__PURE__ */ jsx8(DialogDescription, { children: "Something to read or fill in before going on." })
1233
+ return /* @__PURE__ */ jsxs9(Section, { title: "Over the page", about: "Open each from its trigger. Command is shown inline as well.", children: [
1234
+ /* @__PURE__ */ jsxs9(Specimen, { label: "Dialog and AlertDialog", children: [
1235
+ /* @__PURE__ */ jsxs9(Dialog, { children: [
1236
+ /* @__PURE__ */ jsx10(DialogTrigger, { render: /* @__PURE__ */ jsx10(Button4, { variant: "outline", children: "Open dialog" }) }),
1237
+ /* @__PURE__ */ jsxs9(DialogContent, { children: [
1238
+ /* @__PURE__ */ jsxs9(DialogHeader, { children: [
1239
+ /* @__PURE__ */ jsx10(DialogTitle, { children: "A dialog" }),
1240
+ /* @__PURE__ */ jsx10(DialogDescription, { children: "Something to read or fill in before going on." })
828
1241
  ] }),
829
- /* @__PURE__ */ jsxs7(DialogFooter, { children: [
830
- /* @__PURE__ */ jsx8(DialogClose, { render: /* @__PURE__ */ jsx8(Button3, { variant: "outline", children: "Cancel" }) }),
831
- /* @__PURE__ */ jsx8(Button3, { children: "Save" })
1242
+ /* @__PURE__ */ jsxs9(DialogFooter, { children: [
1243
+ /* @__PURE__ */ jsx10(DialogClose, { render: /* @__PURE__ */ jsx10(Button4, { variant: "outline", children: "Cancel" }) }),
1244
+ /* @__PURE__ */ jsx10(Button4, { children: "Save" })
832
1245
  ] })
833
1246
  ] })
834
1247
  ] }),
835
- /* @__PURE__ */ jsxs7(AlertDialog, { children: [
836
- /* @__PURE__ */ jsx8(AlertDialogTrigger, { render: /* @__PURE__ */ jsx8(Button3, { variant: "destructive", children: "Delete\u2026" }) }),
837
- /* @__PURE__ */ jsxs7(AlertDialogContent, { children: [
838
- /* @__PURE__ */ jsxs7(AlertDialogHeader, { children: [
839
- /* @__PURE__ */ jsx8(AlertDialogTitle, { children: "Delete the draft?" }),
840
- /* @__PURE__ */ jsx8(AlertDialogDescription, { children: "Its revisions go too. This cannot be undone." })
1248
+ /* @__PURE__ */ jsxs9(AlertDialog, { children: [
1249
+ /* @__PURE__ */ jsx10(AlertDialogTrigger, { render: /* @__PURE__ */ jsx10(Button4, { variant: "destructive", children: "Delete\u2026" }) }),
1250
+ /* @__PURE__ */ jsxs9(AlertDialogContent, { children: [
1251
+ /* @__PURE__ */ jsxs9(AlertDialogHeader, { children: [
1252
+ /* @__PURE__ */ jsx10(AlertDialogTitle, { children: "Delete the draft?" }),
1253
+ /* @__PURE__ */ jsx10(AlertDialogDescription, { children: "Its revisions go too. This cannot be undone." })
841
1254
  ] }),
842
- /* @__PURE__ */ jsxs7(AlertDialogFooter, { children: [
843
- /* @__PURE__ */ jsx8(AlertDialogCancel, { children: "Cancel" }),
844
- /* @__PURE__ */ jsx8(AlertDialogAction, { children: "Delete" })
1255
+ /* @__PURE__ */ jsxs9(AlertDialogFooter, { children: [
1256
+ /* @__PURE__ */ jsx10(AlertDialogCancel, { children: "Cancel" }),
1257
+ /* @__PURE__ */ jsx10(AlertDialogAction, { children: "Delete" })
845
1258
  ] })
846
1259
  ] })
847
1260
  ] })
848
1261
  ] }),
849
- /* @__PURE__ */ jsxs7(Specimen, { label: "Sheet, Popover, Tooltip", children: [
850
- /* @__PURE__ */ jsxs7(Sheet, { children: [
851
- /* @__PURE__ */ jsx8(SheetTrigger, { render: /* @__PURE__ */ jsx8(Button3, { variant: "outline", children: "Open sheet" }) }),
852
- /* @__PURE__ */ jsxs7(SheetContent, { children: [
853
- /* @__PURE__ */ jsxs7(SheetHeader, { children: [
854
- /* @__PURE__ */ jsx8(SheetTitle, { children: "A sheet" }),
855
- /* @__PURE__ */ jsx8(SheetDescription, { children: "A panel from the edge of the screen." })
1262
+ /* @__PURE__ */ jsxs9(Specimen, { label: "Sheet, Popover, Tooltip", children: [
1263
+ /* @__PURE__ */ jsxs9(Sheet, { children: [
1264
+ /* @__PURE__ */ jsx10(SheetTrigger, { render: /* @__PURE__ */ jsx10(Button4, { variant: "outline", children: "Open sheet" }) }),
1265
+ /* @__PURE__ */ jsxs9(SheetContent, { children: [
1266
+ /* @__PURE__ */ jsxs9(SheetHeader, { children: [
1267
+ /* @__PURE__ */ jsx10(SheetTitle, { children: "A sheet" }),
1268
+ /* @__PURE__ */ jsx10(SheetDescription, { children: "A panel from the edge of the screen." })
856
1269
  ] }),
857
- /* @__PURE__ */ jsx8(SheetFooter, { children: /* @__PURE__ */ jsx8(Button3, { children: "Done" }) })
1270
+ /* @__PURE__ */ jsx10(SheetFooter, { children: /* @__PURE__ */ jsx10(Button4, { children: "Done" }) })
858
1271
  ] })
859
1272
  ] }),
860
- /* @__PURE__ */ jsxs7(Popover, { children: [
861
- /* @__PURE__ */ jsx8(PopoverTrigger, { render: /* @__PURE__ */ jsx8(Button3, { variant: "outline", children: "Open popover" }) }),
862
- /* @__PURE__ */ jsx8(PopoverContent, { children: /* @__PURE__ */ jsxs7(PopoverHeader, { children: [
863
- /* @__PURE__ */ jsx8(PopoverTitle, { children: "A popover" }),
864
- /* @__PURE__ */ jsx8(PopoverDescription, { children: "A little more, next to what it is about." })
1273
+ /* @__PURE__ */ jsxs9(Popover, { children: [
1274
+ /* @__PURE__ */ jsx10(PopoverTrigger, { render: /* @__PURE__ */ jsx10(Button4, { variant: "outline", children: "Open popover" }) }),
1275
+ /* @__PURE__ */ jsx10(PopoverContent, { children: /* @__PURE__ */ jsxs9(PopoverHeader, { children: [
1276
+ /* @__PURE__ */ jsx10(PopoverTitle, { children: "A popover" }),
1277
+ /* @__PURE__ */ jsx10(PopoverDescription, { children: "A little more, next to what it is about." })
865
1278
  ] }) })
866
1279
  ] }),
867
- /* @__PURE__ */ jsxs7(Tooltip, { children: [
868
- /* @__PURE__ */ jsx8(TooltipTrigger, { render: /* @__PURE__ */ jsx8(Button3, { variant: "ghost", size: "icon", "aria-label": "Settings" }), children: /* @__PURE__ */ jsx8(Settings, {}) }),
869
- /* @__PURE__ */ jsx8(TooltipContent, { children: "Settings" })
1280
+ /* @__PURE__ */ jsxs9(Tooltip, { children: [
1281
+ /* @__PURE__ */ jsx10(TooltipTrigger, { render: /* @__PURE__ */ jsx10(Button4, { variant: "ghost", size: "icon", "aria-label": "Settings" }), children: /* @__PURE__ */ jsx10(Settings, {}) }),
1282
+ /* @__PURE__ */ jsx10(TooltipContent, { children: "Settings" })
870
1283
  ] })
871
1284
  ] }),
872
- /* @__PURE__ */ jsxs7(Specimen, { label: "DropdownMenu and ContextMenu", children: [
873
- /* @__PURE__ */ jsxs7(DropdownMenu, { children: [
874
- /* @__PURE__ */ jsx8(DropdownMenuTrigger, { render: /* @__PURE__ */ jsx8(Button3, { variant: "outline", children: "Open menu" }) }),
875
- /* @__PURE__ */ jsxs7(DropdownMenuContent, { children: [
876
- /* @__PURE__ */ jsx8(DropdownMenuLabel, { children: "Draft" }),
877
- /* @__PURE__ */ jsxs7(DropdownMenuItem, { children: [
878
- /* @__PURE__ */ jsx8(Copy, {}),
1285
+ /* @__PURE__ */ jsxs9(Specimen, { label: "DropdownMenu and ContextMenu", children: [
1286
+ /* @__PURE__ */ jsxs9(DropdownMenu, { children: [
1287
+ /* @__PURE__ */ jsx10(DropdownMenuTrigger, { render: /* @__PURE__ */ jsx10(Button4, { variant: "outline", children: "Open menu" }) }),
1288
+ /* @__PURE__ */ jsxs9(DropdownMenuContent, { children: [
1289
+ /* @__PURE__ */ jsx10(DropdownMenuLabel, { children: "Draft" }),
1290
+ /* @__PURE__ */ jsxs9(DropdownMenuItem, { children: [
1291
+ /* @__PURE__ */ jsx10(Copy, {}),
879
1292
  " Duplicate ",
880
- /* @__PURE__ */ jsx8(DropdownMenuShortcut, { children: "\u2318D" })
1293
+ /* @__PURE__ */ jsx10(DropdownMenuShortcut, { children: "\u2318D" })
881
1294
  ] }),
882
- /* @__PURE__ */ jsx8(DropdownMenuSeparator, {}),
883
- /* @__PURE__ */ jsxs7(DropdownMenuItem, { variant: "destructive", children: [
884
- /* @__PURE__ */ jsx8(Trash2, {}),
1295
+ /* @__PURE__ */ jsx10(DropdownMenuSeparator, {}),
1296
+ /* @__PURE__ */ jsxs9(DropdownMenuItem, { variant: "destructive", children: [
1297
+ /* @__PURE__ */ jsx10(Trash2, {}),
885
1298
  " Delete"
886
1299
  ] })
887
1300
  ] })
888
1301
  ] }),
889
- /* @__PURE__ */ jsxs7(ContextMenu, { children: [
890
- /* @__PURE__ */ jsx8(ContextMenuTrigger, { className: "grid h-16 w-48 place-items-center rounded-md border border-dashed border-border text-xs text-muted-foreground", children: "Right-click here" }),
891
- /* @__PURE__ */ jsxs7(ContextMenuContent, { children: [
892
- /* @__PURE__ */ jsxs7(ContextMenuItem, { children: [
1302
+ /* @__PURE__ */ jsxs9(ContextMenu, { children: [
1303
+ /* @__PURE__ */ jsx10(ContextMenuTrigger, { className: "grid h-16 w-48 place-items-center rounded-md border border-dashed border-border text-xs text-muted-foreground", children: "Right-click here" }),
1304
+ /* @__PURE__ */ jsxs9(ContextMenuContent, { children: [
1305
+ /* @__PURE__ */ jsxs9(ContextMenuItem, { children: [
893
1306
  "Copy ",
894
- /* @__PURE__ */ jsx8(ContextMenuShortcut, { children: "\u2318C" })
1307
+ /* @__PURE__ */ jsx10(ContextMenuShortcut, { children: "\u2318C" })
895
1308
  ] }),
896
- /* @__PURE__ */ jsx8(ContextMenuItem, { children: "Rename" })
1309
+ /* @__PURE__ */ jsx10(ContextMenuItem, { children: "Rename" })
897
1310
  ] })
898
1311
  ] })
899
1312
  ] }),
900
- /* @__PURE__ */ jsx8(Specimen, { label: "Command (inline)", children: /* @__PURE__ */ jsxs7(Command, { className: "w-full rounded-lg border border-border", children: [
901
- /* @__PURE__ */ jsx8(CommandInput, { placeholder: "Run a command\u2026" }),
902
- /* @__PURE__ */ jsxs7(CommandList, { children: [
903
- /* @__PURE__ */ jsx8(CommandEmpty, { children: "Nothing matches." }),
904
- /* @__PURE__ */ jsxs7(CommandGroup, { heading: "Desk", children: [
905
- /* @__PURE__ */ jsxs7(CommandItem, { children: [
1313
+ /* @__PURE__ */ jsx10(Specimen, { label: "Command (inline)", children: /* @__PURE__ */ jsxs9(Command, { className: "w-full rounded-lg border border-border", children: [
1314
+ /* @__PURE__ */ jsx10(CommandInput, { placeholder: "Run a command\u2026" }),
1315
+ /* @__PURE__ */ jsxs9(CommandList, { children: [
1316
+ /* @__PURE__ */ jsx10(CommandEmpty, { children: "Nothing matches." }),
1317
+ /* @__PURE__ */ jsxs9(CommandGroup, { heading: "Desk", children: [
1318
+ /* @__PURE__ */ jsxs9(CommandItem, { children: [
906
1319
  "Open Notes ",
907
- /* @__PURE__ */ jsx8(CommandShortcut, { children: "\u2318N" })
1320
+ /* @__PURE__ */ jsx10(CommandShortcut, { children: "\u2318N" })
908
1321
  ] }),
909
- /* @__PURE__ */ jsx8(CommandItem, { children: "Tile every window" }),
910
- /* @__PURE__ */ jsx8(CommandItem, { children: "Show the agent" })
1322
+ /* @__PURE__ */ jsx10(CommandItem, { children: "Tile every window" }),
1323
+ /* @__PURE__ */ jsx10(CommandItem, { children: "Show the agent" })
911
1324
  ] })
912
1325
  ] })
913
1326
  ] }) })
914
1327
  ] });
915
1328
  }
916
1329
 
1330
+ // ../../web/src/gallery/theme.tsx
1331
+ import {
1332
+ applyPalette,
1333
+ checkPalette,
1334
+ PALETTES,
1335
+ paletteCSS,
1336
+ parseTheme
1337
+ } from "@hollis-labs/surface-theme";
1338
+ import { createContext as createContext2, useContext as useContext2, useLayoutEffect, useRef as useRef3, useState as useState3 } from "react";
1339
+ import { Badge as Badge2 } from "@/components/ui/badge";
1340
+ import { Button as Button5 } from "@/components/ui/button";
1341
+ import { Card as Card2, CardContent as CardContent2, CardDescription as CardDescription2, CardFooter as CardFooter2, CardHeader as CardHeader2, CardTitle as CardTitle2 } from "@/components/ui/card";
1342
+ import { Input as Input2 } from "@/components/ui/input";
1343
+ import { Textarea as Textarea2 } from "@/components/ui/textarea";
1344
+ import { Fragment as Fragment9, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1345
+ var JOB = "d_97410e09";
1346
+ var ThemeChoice = createContext2({ palette: PALETTES[0], type: "mixed", setPalette: () => {
1347
+ }, setType: () => {
1348
+ } });
1349
+ function InPalette({
1350
+ palette,
1351
+ type,
1352
+ children,
1353
+ className
1354
+ }) {
1355
+ const ref = useRef3(null);
1356
+ useLayoutEffect(() => {
1357
+ if (!ref.current) return;
1358
+ const undo = applyPalette(palette, ref.current, type ?? "mixed");
1359
+ return undo;
1360
+ }, [palette, type]);
1361
+ return /* @__PURE__ */ jsx11("div", { ref, className: `bg-background text-foreground ${className ?? ""}`, children });
1362
+ }
1363
+ var TOKENS = [
1364
+ "desk",
1365
+ "background",
1366
+ "card",
1367
+ "popover",
1368
+ "muted",
1369
+ "secondary",
1370
+ "accent",
1371
+ "border",
1372
+ "input",
1373
+ "primary",
1374
+ "ring",
1375
+ "destructive",
1376
+ "success",
1377
+ "warning",
1378
+ "info",
1379
+ "selection"
1380
+ ];
1381
+ function Swatch({ color, label, detail }) {
1382
+ return /* @__PURE__ */ jsxs10("div", { className: "flex min-w-0 items-center gap-2", children: [
1383
+ /* @__PURE__ */ jsx11("span", { className: "size-7 shrink-0 rounded-md border", style: { background: color } }),
1384
+ /* @__PURE__ */ jsxs10("span", { className: "flex min-w-0 flex-col", children: [
1385
+ /* @__PURE__ */ jsx11("span", { className: "truncate text-xs", children: label }),
1386
+ detail && /* @__PURE__ */ jsx11("span", { className: "truncate font-mono text-[10px] text-muted-foreground", children: detail })
1387
+ ] })
1388
+ ] });
1389
+ }
1390
+ function Sample({ palette }) {
1391
+ return /* @__PURE__ */ jsxs10(Card2, { size: "sm", className: "w-full", children: [
1392
+ /* @__PURE__ */ jsxs10(CardHeader2, { children: [
1393
+ /* @__PURE__ */ jsx11(CardTitle2, { children: palette.name }),
1394
+ /* @__PURE__ */ jsx11(CardDescription2, { children: palette.source ?? "palette" })
1395
+ ] }),
1396
+ /* @__PURE__ */ jsxs10(CardContent2, { className: "flex flex-col gap-2 text-sm", children: [
1397
+ /* @__PURE__ */ jsx11("p", { children: "The agent read three files and wrote a draft." }),
1398
+ /* @__PURE__ */ jsx11("p", { className: "text-muted-foreground", children: "Muted: updated 2 min ago \xB7 14 notes" }),
1399
+ /* @__PURE__ */ jsxs10("div", { className: "flex flex-wrap gap-1.5", children: [
1400
+ /* @__PURE__ */ jsx11(Badge2, { variant: "outline", className: "text-success", children: "done" }),
1401
+ /* @__PURE__ */ jsx11(Badge2, { variant: "outline", className: "text-warning", children: "waiting" }),
1402
+ /* @__PURE__ */ jsx11(Badge2, { variant: "outline", className: "text-destructive", children: "failed" }),
1403
+ /* @__PURE__ */ jsx11(Badge2, { variant: "outline", className: "text-info", children: "info" })
1404
+ ] }),
1405
+ /* @__PURE__ */ jsx11("div", { className: "flex gap-1", children: ["red", "green", "yellow", "blue", "magenta", "cyan"].map((k) => /* @__PURE__ */ jsx11("span", { className: "h-1.5 flex-1 rounded-full", style: { background: palette[k] } }, k)) })
1406
+ ] }),
1407
+ /* @__PURE__ */ jsxs10(CardFooter2, { className: "justify-end gap-2", children: [
1408
+ /* @__PURE__ */ jsx11(Button5, { size: "sm", variant: "outline", children: "Cancel" }),
1409
+ /* @__PURE__ */ jsx11(Button5, { size: "sm", children: "Run" })
1410
+ ] })
1411
+ ] });
1412
+ }
1413
+ function Checks({ palette }) {
1414
+ return /* @__PURE__ */ jsx11("ul", { className: "flex w-full flex-col gap-1 text-xs", children: checkPalette(palette).map((r) => /* @__PURE__ */ jsxs10("li", { className: "flex items-center justify-between gap-2", children: [
1415
+ /* @__PURE__ */ jsx11("span", { children: r.pair }),
1416
+ /* @__PURE__ */ jsxs10("span", { className: r.ok ? "text-success" : "text-destructive", children: [
1417
+ r.ratio.toFixed(2),
1418
+ " ",
1419
+ r.ok ? "\u2265" : "<",
1420
+ " ",
1421
+ r.min
1422
+ ] })
1423
+ ] }, r.pair)) });
1424
+ }
1425
+ function Theme() {
1426
+ const { palette, setPalette } = useContext2(ThemeChoice);
1427
+ return /* @__PURE__ */ jsxs10(Fragment9, { children: [
1428
+ /* @__PURE__ */ jsxs10(
1429
+ Section,
1430
+ {
1431
+ title: "Theme: the palette in use",
1432
+ about: "Thirteen colours a Linux theme names. Everything else is derived from them by the theme. Pick another in the header.",
1433
+ draft: JOB,
1434
+ children: [
1435
+ /* @__PURE__ */ jsx11(Specimen, { label: `palette: ${palette.name}`, wide: true, children: /* @__PURE__ */ jsx11("div", { className: "grid w-full grid-cols-2 gap-3 @lg:grid-cols-4 @3xl:grid-cols-7", children: Object.entries(paletteCSS(palette)).map(([name, v]) => /* @__PURE__ */ jsx11(Swatch, { color: v, label: name.replace("--p-", ""), detail: v }, name)) }) }),
1436
+ /* @__PURE__ */ jsx11(Specimen, { label: "derived tokens", wide: true, children: /* @__PURE__ */ jsx11("div", { className: "grid w-full grid-cols-2 gap-3 @lg:grid-cols-4 @3xl:grid-cols-8", children: TOKENS.map((t) => /* @__PURE__ */ jsx11(Swatch, { color: `var(--${t})`, label: t }, t)) }) }),
1437
+ /* @__PURE__ */ jsx11(Specimen, { label: "how it reads (WCAG contrast)", children: /* @__PURE__ */ jsx11(Checks, { palette }) }),
1438
+ /* @__PURE__ */ jsx11(Specimen, { label: "a piece of interface", children: /* @__PURE__ */ jsx11(Sample, { palette }) })
1439
+ ]
1440
+ }
1441
+ ),
1442
+ /* @__PURE__ */ jsx11(
1443
+ Section,
1444
+ {
1445
+ title: "Theme: every palette",
1446
+ about: "Each drawn in its own palette. Choose one to use it across the gallery.",
1447
+ draft: JOB,
1448
+ children: PALETTES.map((p) => {
1449
+ const fails = checkPalette(p).filter((r) => !r.ok).length;
1450
+ return /* @__PURE__ */ jsx11(Specimen, { label: `${p.id}${fails ? ` \xB7 ${fails} contrast warning(s)` : ""}`, children: /* @__PURE__ */ jsxs10(InPalette, { palette: p, className: "flex w-full flex-col gap-2 rounded-lg p-2", children: [
1451
+ /* @__PURE__ */ jsx11(Sample, { palette: p }),
1452
+ /* @__PURE__ */ jsx11(Button5, { size: "xs", variant: p.id === palette.id ? "secondary" : "ghost", onClick: () => setPalette(p), children: p.id === palette.id ? "In use" : "Use this palette" })
1453
+ ] }) }, p.id);
1454
+ })
1455
+ }
1456
+ ),
1457
+ /* @__PURE__ */ jsx11(
1458
+ Section,
1459
+ {
1460
+ title: "Theme: type",
1461
+ about: "Mono chrome (bars, buttons, tabs, badges, titles) over a sans body, or mono everywhere. Switch it for the whole gallery in the header.",
1462
+ draft: JOB,
1463
+ children: ["mixed", "mono"].map((t) => /* @__PURE__ */ jsx11(
1464
+ Specimen,
1465
+ {
1466
+ label: t === "mixed" ? "mixed: mono chrome, sans body" : "mono: everything in the mono font",
1467
+ children: /* @__PURE__ */ jsx11(InPalette, { palette, type: t, className: "w-full rounded-lg p-2", children: /* @__PURE__ */ jsx11(Sample, { palette }) })
1468
+ },
1469
+ t
1470
+ ))
1471
+ }
1472
+ ),
1473
+ /* @__PURE__ */ jsx11(
1474
+ Section,
1475
+ {
1476
+ title: "Theme: read a theme file",
1477
+ about: "Paste an Omarchy colors.toml, a base16 / tinted-theming scheme or a pywal colors.json.",
1478
+ draft: JOB,
1479
+ children: /* @__PURE__ */ jsx11(ImportSpecimen, { onUse: setPalette })
1480
+ }
1481
+ )
1482
+ ] });
1483
+ }
1484
+ function ImportSpecimen({ onUse }) {
1485
+ const [text, setText] = useState3("");
1486
+ const [name, setName] = useState3("");
1487
+ const [read, setRead] = useState3(null);
1488
+ const [error, setError] = useState3("");
1489
+ const preview = () => {
1490
+ try {
1491
+ setRead(parseTheme(text, name.trim() || void 0));
1492
+ setError("");
1493
+ } catch (e) {
1494
+ setRead(null);
1495
+ setError(e.message);
1496
+ }
1497
+ };
1498
+ return /* @__PURE__ */ jsxs10(Fragment9, { children: [
1499
+ /* @__PURE__ */ jsx11(Specimen, { label: "the file", children: /* @__PURE__ */ jsxs10("div", { className: "flex w-full flex-col gap-2", children: [
1500
+ /* @__PURE__ */ jsx11(Input2, { placeholder: "Name (optional)", value: name, onChange: (e) => setName(e.target.value) }),
1501
+ /* @__PURE__ */ jsx11(
1502
+ Textarea2,
1503
+ {
1504
+ className: "min-h-40 font-mono text-xs",
1505
+ placeholder: 'background = "#1a1b26"\nforeground = "#a9b1d6"\naccent = "#7aa2f7"\n\u2026',
1506
+ value: text,
1507
+ onChange: (e) => setText(e.target.value)
1508
+ }
1509
+ ),
1510
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-end gap-2", children: [
1511
+ error && /* @__PURE__ */ jsx11("span", { className: "mr-auto text-xs text-destructive", children: error }),
1512
+ /* @__PURE__ */ jsx11(Button5, { size: "sm", variant: "outline", disabled: !text.trim(), onClick: preview, children: "Read it" }),
1513
+ /* @__PURE__ */ jsx11(Button5, { size: "sm", disabled: !read, onClick: () => read && onUse(read), children: "Use it" })
1514
+ ] })
1515
+ ] }) }),
1516
+ /* @__PURE__ */ jsx11(Specimen, { label: read ? `read as ${read.source}: ${read.name}` : "nothing read yet", children: read ? /* @__PURE__ */ jsxs10(InPalette, { palette: read, className: "flex w-full flex-col gap-2 rounded-lg p-2", children: [
1517
+ /* @__PURE__ */ jsx11(Sample, { palette: read }),
1518
+ /* @__PURE__ */ jsx11(Checks, { palette: read })
1519
+ ] }) : /* @__PURE__ */ jsx11("p", { className: "text-xs text-muted-foreground", children: "Paste a theme and read it to see it here." }) })
1520
+ ] });
1521
+ }
1522
+
917
1523
  // ../../web/src/gallery/windows.tsx
918
1524
  import { FileText as FileText2, Globe, StickyNote } from "lucide-react";
919
- import { useState as useState3 } from "react";
1525
+ import { useState as useState4 } from "react";
920
1526
  import { WindowManager } from "@/components/ui/window-manager";
921
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1527
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
922
1528
  var START = {
923
1529
  root: {
924
1530
  type: "row",
@@ -936,25 +1542,26 @@ var START = {
936
1542
  ]
937
1543
  };
938
1544
  var WINDOWS = [
939
- { id: "draft", title: "Launch notes", icon: /* @__PURE__ */ jsx9(FileText2, { className: "size-3.5" }), dirty: true },
940
- { id: "notes", title: "Notes", icon: /* @__PURE__ */ jsx9(StickyNote, { className: "size-3.5" }) },
941
- { id: "browser", title: "Example Domain", icon: /* @__PURE__ */ jsx9(Globe, { className: "size-3.5" }) },
942
- { id: "scratch", title: "Scratch", icon: /* @__PURE__ */ jsx9(StickyNote, { className: "size-3.5" }) }
1545
+ { id: "draft", title: "Launch notes", icon: /* @__PURE__ */ jsx12(FileText2, { className: "size-3.5" }), dirty: true },
1546
+ { id: "notes", title: "Notes", icon: /* @__PURE__ */ jsx12(StickyNote, { className: "size-3.5" }) },
1547
+ { id: "browser", title: "Example Domain", icon: /* @__PURE__ */ jsx12(Globe, { className: "size-3.5" }) },
1548
+ { id: "scratch", title: "Scratch", icon: /* @__PURE__ */ jsx12(StickyNote, { className: "size-3.5" }) }
943
1549
  ];
944
1550
  function Windows() {
945
- const [tree, setTree] = useState3(START);
946
- const [focus, setFocus] = useState3("draft");
947
- return /* @__PURE__ */ jsx9(
1551
+ const [tree, setTree] = useState4(START);
1552
+ const [focus, setFocus] = useState4("draft");
1553
+ return /* @__PURE__ */ jsx12(
948
1554
  Section,
949
1555
  {
1556
+ draft: "d_3f9690aa",
950
1557
  title: "window-manager",
951
1558
  about: "Drag a tab to move, split, tab or float a window. The tree is local to this window.",
952
- children: /* @__PURE__ */ jsx9(Specimen, { label: "two stacks and a float", wide: true, children: /* @__PURE__ */ jsx9(
1559
+ children: /* @__PURE__ */ jsx12(Specimen, { label: "two stacks and a float", wide: true, children: /* @__PURE__ */ jsx12(
953
1560
  "div",
954
1561
  {
955
- className: "relative h-80 w-full overflow-hidden rounded-md border border-border bg-muted/40",
1562
+ className: "relative h-80 w-full overflow-hidden rounded-md border border-border bg-desk",
956
1563
  style: { "--window-gap": "6px" },
957
- children: /* @__PURE__ */ jsx9(
1564
+ children: /* @__PURE__ */ jsx12(
958
1565
  WindowManager,
959
1566
  {
960
1567
  tree,
@@ -966,7 +1573,7 @@ function Windows() {
966
1573
  },
967
1574
  onClose: () => {
968
1575
  },
969
- children: (id) => /* @__PURE__ */ jsxs8("div", { className: "p-3 text-xs text-muted-foreground", children: [
1576
+ children: (id) => /* @__PURE__ */ jsxs11("div", { className: "p-3 text-xs text-muted-foreground", children: [
970
1577
  "The body of \u201C",
971
1578
  WINDOWS.find((w) => w.id === id)?.title,
972
1579
  "\u201D."
@@ -980,8 +1587,9 @@ function Windows() {
980
1587
  }
981
1588
 
982
1589
  // ../../web/src/gallery/Gallery.tsx
983
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1590
+ import { Fragment as Fragment10, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
984
1591
  var SECTIONS = [
1592
+ { id: "theme", title: "Theme", draw: Theme },
985
1593
  { id: "controls", title: "Controls", draw: Controls },
986
1594
  { id: "display", title: "Display", draw: Display },
987
1595
  { id: "overlays", title: "Overlays", draw: Overlays },
@@ -991,21 +1599,127 @@ var SECTIONS = [
991
1599
  { id: "ade", title: "ADE", draw: Ade },
992
1600
  { id: "windows", title: "Windows", draw: Windows }
993
1601
  ];
1602
+ function Draft({ job }) {
1603
+ const box = useRef4(null);
1604
+ const [empty, setEmpty] = useState5(false);
1605
+ useLayoutEffect2(() => {
1606
+ const el = box.current;
1607
+ if (!el) return;
1608
+ const check = () => setEmpty(el.childElementCount === 0);
1609
+ check();
1610
+ const watch = new MutationObserver(check);
1611
+ watch.observe(el, { childList: true });
1612
+ return () => watch.disconnect();
1613
+ }, []);
1614
+ return /* @__PURE__ */ jsxs12(Fragment10, { children: [
1615
+ /* @__PURE__ */ jsx13("div", { ref: box, className: "contents", children: /* @__PURE__ */ jsx13(DraftFilter.Provider, { value: { only: true, job }, children: SECTIONS.map((s) => /* @__PURE__ */ jsx13(s.draw, {}, s.id)) }) }),
1616
+ empty && /* @__PURE__ */ jsx13(Empty2, { children: /* @__PURE__ */ jsxs12(EmptyHeader2, { children: [
1617
+ /* @__PURE__ */ jsx13(EmptyTitle2, { children: "No draft marked" }),
1618
+ /* @__PURE__ */ jsxs12(EmptyDescription2, { children: [
1619
+ job ? `No section is marked as the draft of ${job}` : "No section is marked as a draft",
1620
+ " (",
1621
+ /* @__PURE__ */ jsx13("code", { children: '<Section draft="<job id>">' }),
1622
+ "). The whole gallery is in the other tabs."
1623
+ ] })
1624
+ ] }) })
1625
+ ] });
1626
+ }
994
1627
  function Gallery({ win }) {
995
- const first = typeof win.args.section === "string" ? win.args.section : "controls";
996
- const [section, setSection] = useState4(first);
997
- return /* @__PURE__ */ jsxs9(
1628
+ return /* @__PURE__ */ jsx13(GalleryTabs, { first: typeof win.args.section === "string" ? win.args.section : void 0 });
1629
+ }
1630
+ function GalleryTabs({
1631
+ first,
1632
+ onSection,
1633
+ draft
1634
+ }) {
1635
+ const tabs = draft ? [{ id: "draft", title: "Draft" }, ...SECTIONS] : SECTIONS;
1636
+ const [section, setSection] = useState5(
1637
+ first && tabs.some((s) => s.id === first) ? first : draft ? "draft" : "controls"
1638
+ );
1639
+ const [palette, setPalette] = useState5(
1640
+ () => paletteById(remembered("palette") ?? "") ?? PALETTES2[0]
1641
+ );
1642
+ const [type, setType] = useState5(() => remembered("type") === "mono" ? "mono" : "mixed");
1643
+ const choice = useMemo(
1644
+ () => ({
1645
+ palette,
1646
+ type,
1647
+ setPalette: (p) => {
1648
+ setPalette(p);
1649
+ remember("palette", p.id);
1650
+ },
1651
+ setType: (t) => {
1652
+ setType(t);
1653
+ remember("type", t);
1654
+ }
1655
+ }),
1656
+ [palette, type]
1657
+ );
1658
+ return /* @__PURE__ */ jsx13(ThemeChoice.Provider, { value: choice, children: /* @__PURE__ */ jsx13(InPalette, { palette, type, className: "h-full min-h-0", children: /* @__PURE__ */ jsxs12(
998
1659
  Tabs2,
999
1660
  {
1000
1661
  value: section,
1001
- onValueChange: (v) => setSection(String(v)),
1662
+ onValueChange: (v) => {
1663
+ setSection(String(v));
1664
+ onSection?.(String(v));
1665
+ },
1002
1666
  className: "@container flex h-full min-h-0 flex-col",
1003
1667
  children: [
1004
- /* @__PURE__ */ jsx10("div", { className: "shrink-0 border-b border-border px-3 py-2", children: /* @__PURE__ */ jsx10(TabsList2, { variant: "line", className: "flex-wrap", children: SECTIONS.map((s) => /* @__PURE__ */ jsx10(TabsTrigger2, { value: s.id, "data-gallery-tab": s.id, children: s.title }, s.id)) }) }),
1005
- /* @__PURE__ */ jsx10("div", { className: "min-h-0 flex-1 overflow-auto bg-muted/30", children: SECTIONS.map((s) => /* @__PURE__ */ jsx10(TabsContent2, { value: s.id, "data-gallery-section": s.id, className: "flex flex-col gap-6 p-4", children: /* @__PURE__ */ jsx10(s.draw, {}) }, s.id)) })
1668
+ /* @__PURE__ */ jsxs12("div", { className: "flex shrink-0 flex-wrap items-center gap-2 border-b border-border px-3 py-2", children: [
1669
+ /* @__PURE__ */ jsx13(TabsList2, { variant: "line", className: "min-w-0 flex-wrap group-data-horizontal/tabs:h-auto", children: tabs.map((s) => /* @__PURE__ */ jsx13(TabsTrigger2, { value: s.id, "data-gallery-tab": s.id, children: s.title }, s.id)) }),
1670
+ /* @__PURE__ */ jsxs12("div", { className: "ml-auto flex items-center gap-2", children: [
1671
+ /* @__PURE__ */ jsxs12(
1672
+ Select2,
1673
+ {
1674
+ value: palette.id,
1675
+ onValueChange: (v) => {
1676
+ const p = paletteById(String(v));
1677
+ if (p) choice.setPalette(p);
1678
+ },
1679
+ items: PALETTES2.map((p) => ({ value: p.id, label: p.name })),
1680
+ children: [
1681
+ /* @__PURE__ */ jsx13(SelectTrigger2, { size: "sm", "aria-label": "Palette", children: /* @__PURE__ */ jsx13(SelectValue2, {}) }),
1682
+ /* @__PURE__ */ jsx13(SelectContent2, { children: PALETTES2.map((p) => /* @__PURE__ */ jsx13(SelectItem2, { value: p.id, children: p.name }, p.id)) })
1683
+ ]
1684
+ }
1685
+ ),
1686
+ /* @__PURE__ */ jsxs12(
1687
+ ToggleGroup2,
1688
+ {
1689
+ size: "sm",
1690
+ spacing: 0,
1691
+ value: [type],
1692
+ onValueChange: (v) => v[0] && choice.setType(v[0]),
1693
+ children: [
1694
+ /* @__PURE__ */ jsx13(ToggleGroupItem2, { value: "mixed", "aria-label": "Mono chrome, sans body", children: "Mixed" }),
1695
+ /* @__PURE__ */ jsx13(ToggleGroupItem2, { value: "mono", "aria-label": "Mono everywhere", children: "Mono" })
1696
+ ]
1697
+ }
1698
+ )
1699
+ ] })
1700
+ ] }),
1701
+ /* @__PURE__ */ jsxs12("div", { className: "min-h-0 flex-1 overflow-auto bg-muted/30", children: [
1702
+ draft && /* @__PURE__ */ jsx13(TabsContent2, { value: "draft", "data-gallery-section": "draft", className: "flex flex-col gap-6 p-4", children: /* @__PURE__ */ jsx13(Draft, { job: draft === true ? void 0 : draft }) }),
1703
+ SECTIONS.map((s) => /* @__PURE__ */ jsx13(TabsContent2, { value: s.id, "data-gallery-section": s.id, className: "flex flex-col gap-6 p-4", children: /* @__PURE__ */ jsx13(s.draw, {}) }, s.id))
1704
+ ] })
1006
1705
  ]
1007
1706
  }
1008
- );
1707
+ ) }) });
1708
+ }
1709
+ function remembered(key) {
1710
+ const fromURL = new URLSearchParams(window.location.search).get(key);
1711
+ if (fromURL) return fromURL;
1712
+ try {
1713
+ return localStorage.getItem(`surface.gallery.${key}`) ?? void 0;
1714
+ } catch {
1715
+ return void 0;
1716
+ }
1717
+ }
1718
+ function remember(key, value) {
1719
+ try {
1720
+ localStorage.setItem(`surface.gallery.${key}`, value);
1721
+ } catch {
1722
+ }
1009
1723
  }
1010
1724
 
1011
1725
  // ../../web/src/gallery/index.ts