@workerdeck/ui 0.15.0 → 0.16.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.
Files changed (65) hide show
  1. package/README.md +53 -0
  2. package/build/{SessionPanel-J2U8v88q.d.mts → SessionPanel-B9CHoq8x.d.mts} +158 -21
  3. package/build/{SessionPanel-DI1NO4l8.mjs → SessionPanel-DII9MmQ8.mjs} +4254 -1661
  4. package/build/SessionPanel-DII9MmQ8.mjs.map +1 -0
  5. package/build/{format-ljc3lKpA.d.mts → format-DfI_je9S.d.mts} +1 -1
  6. package/build/format.d.mts +39 -4
  7. package/build/format.mjs +2 -118
  8. package/build/index.d.mts +442 -45
  9. package/build/index.mjs +105 -2
  10. package/build/index.mjs.map +1 -1
  11. package/build/status-Ydzi7n6j.mjs +143 -0
  12. package/build/status-Ydzi7n6j.mjs.map +1 -0
  13. package/build/workspace.d.mts +9 -1
  14. package/build/workspace.mjs +108 -5
  15. package/build/workspace.mjs.map +1 -1
  16. package/package.json +14 -7
  17. package/src/components/agent/Composer.tsx +189 -89
  18. package/src/components/agent/Conversation.tsx +12 -12
  19. package/src/components/agent/FileCard.tsx +0 -26
  20. package/src/components/agent/FileTree.tsx +9 -8
  21. package/src/components/agent/Loader.tsx +22 -72
  22. package/src/components/agent/Message.tsx +11 -46
  23. package/src/components/agent/PermissionPrompt.tsx +0 -92
  24. package/src/components/agent/QuestionPrompt.tsx +0 -122
  25. package/src/components/agent/Reasoning.tsx +5 -19
  26. package/src/components/agent/Response.tsx +1 -132
  27. package/src/components/agent/SessionPanel.tsx +224 -28
  28. package/src/components/agent/SessionWorkspace.tsx +29 -0
  29. package/src/components/agent/StatusBar.tsx +20 -4
  30. package/src/components/agent/ToolCallCard.tsx +17 -111
  31. package/src/components/agent/Transcript.tsx +710 -203
  32. package/src/components/agent/UsageDialog.tsx +20 -106
  33. package/src/components/agent/UsageMeters.tsx +133 -0
  34. package/src/components/agent/pulse.tsx +3 -2
  35. package/src/components/agent/transcript-rows.ts +82 -0
  36. package/src/components/agent/transcript-variant.tsx +29 -51
  37. package/src/components/agent/use-height-epoch.ts +60 -0
  38. package/src/components/agent/use-path-links.ts +147 -0
  39. package/src/components/agent/use-transcript-jumps.ts +190 -0
  40. package/src/components/prompt-area/cursor-helpers.ts +65 -0
  41. package/src/components/prompt-area/use-prompt-area.ts +16 -10
  42. package/src/components/terminal/PermissionPrompt.tsx +119 -0
  43. package/src/components/terminal/QuestionPrompt.tsx +322 -0
  44. package/src/components/terminal/StatusLine.tsx +159 -0
  45. package/src/components/terminal/TerminalTranscript.tsx +147 -0
  46. package/src/components/terminal/affordances.tsx +118 -0
  47. package/src/components/terminal/diff.tsx +130 -0
  48. package/src/components/terminal/height.ts +727 -0
  49. package/src/components/terminal/items.tsx +449 -0
  50. package/src/components/terminal/markdown.tsx +191 -0
  51. package/src/components/terminal/press.tsx +120 -0
  52. package/src/components/terminal/prompt.tsx +343 -0
  53. package/src/components/terminal/result-preview.ts +72 -0
  54. package/src/components/terminal/row.tsx +132 -0
  55. package/src/components/terminal/scrubber.tsx +663 -0
  56. package/src/components/terminal/surface.tsx +80 -0
  57. package/src/components/terminal/tool-run.ts +91 -0
  58. package/src/index.ts +34 -0
  59. package/src/lib/status.ts +59 -3
  60. package/src/lib/tool-icon.ts +14 -0
  61. package/src/styles/terminal.css +1011 -0
  62. package/src/styles/theme.css +41 -0
  63. package/build/SessionPanel-DI1NO4l8.mjs.map +0 -1
  64. package/build/format.mjs.map +0 -1
  65. package/src/components/agent/line-prompt.tsx +0 -249
@@ -15,6 +15,12 @@
15
15
  * data-theme re-themes with zero JS).
16
16
  */
17
17
 
18
+ /* The terminal theme's geometry and palette — see the file's own header. Its
19
+ * tokens are deliberately independent of the app palette below: a terminal
20
+ * looks like a terminal wherever it is embedded. First, because `@import` is
21
+ * only valid ahead of rules. */
22
+ @import './terminal.css';
23
+
18
24
  :root,
19
25
  [data-theme='light'] {
20
26
  /* ---------- Backgrounds ---------- */
@@ -420,6 +426,41 @@
420
426
  transform 0.08s cubic-bezier(0.4, 0, 0.2, 1),
421
427
  box-shadow 0.05s ease;
422
428
  }
429
+ /**
430
+ * The replay hold's placeholder, revealed only if the wait is long enough to be
431
+ * worth mentioning.
432
+ *
433
+ * The hold hides the transcript while the attach replay lands — typically ~0.5s
434
+ * — and an unconditional "Loading…" line inside it is *worse than nothing*: it
435
+ * appears and vanishes within half a second, so the flicker the hold exists to
436
+ * remove comes straight back as a blinking line at the top of the panel. The
437
+ * hold is the fix; announcing it is the regression.
438
+ *
439
+ * So the placeholder starts transparent and fades in only after a delay longer
440
+ * than a healthy attach takes. A normal open paints it **never** — the element
441
+ * unmounts while still at `opacity: 0` — and only a genuinely slow attach (a
442
+ * cold gateway, a huge log) ever shows a line, which is exactly when a reader
443
+ * needs to be told something is happening rather than assume the panel is dead.
444
+ *
445
+ * CSS rather than a JS timer on purpose: there is no state to hold, nothing to
446
+ * clean up on unmount, and no render caused by the placeholder appearing.
447
+ * `prefers-reduced-motion` collapses the fade's duration (the global block
448
+ * below) but not its delay, so the behaviour survives: still nothing early,
449
+ * then a line with no animation.
450
+ */
451
+ @keyframes wd-hold-appear {
452
+ from {
453
+ opacity: 0;
454
+ }
455
+ to {
456
+ opacity: 1;
457
+ }
458
+ }
459
+ .wd-hold-appear {
460
+ opacity: 0;
461
+ animation: wd-hold-appear 150ms ease-out 600ms forwards;
462
+ }
463
+
423
464
  @keyframes prompt-area-chip-ripple {
424
465
  0% {
425
466
  transform: scale(0);