@workerdeck/ui 0.12.0 → 0.15.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 (32) hide show
  1. package/README.md +19 -0
  2. package/build/{SessionPanel-NQ8ksCfj.mjs → SessionPanel-DI1NO4l8.mjs} +223 -163
  3. package/build/SessionPanel-DI1NO4l8.mjs.map +1 -0
  4. package/build/{SessionPanel-Dy9lQrOV.d.mts → SessionPanel-J2U8v88q.d.mts} +86 -8
  5. package/build/index.d.mts +118 -7
  6. package/build/index.mjs +355 -169
  7. package/build/index.mjs.map +1 -1
  8. package/build/workspace.d.mts +13 -1
  9. package/build/workspace.mjs +7 -2
  10. package/build/workspace.mjs.map +1 -1
  11. package/package.json +4 -4
  12. package/src/components/agent/Composer.tsx +112 -37
  13. package/src/components/agent/EngineIcon.tsx +97 -0
  14. package/src/components/agent/Loader.tsx +4 -1
  15. package/src/components/agent/Message.tsx +12 -5
  16. package/src/components/agent/QuestionPrompt.tsx +1 -1
  17. package/src/components/agent/SessionBrowser.tsx +266 -138
  18. package/src/components/agent/SessionPanel.tsx +149 -48
  19. package/src/components/agent/SessionWorkspace.tsx +17 -0
  20. package/src/components/agent/StatusBar.tsx +58 -12
  21. package/src/components/agent/Transcript.tsx +2 -3
  22. package/src/components/agent/line-prompt.tsx +2 -2
  23. package/src/components/agent/transcript-variant.tsx +14 -0
  24. package/src/components/ui/Badge.tsx +6 -1
  25. package/src/components/ui/Empty.tsx +56 -0
  26. package/src/components/ui/Menu.tsx +1 -1
  27. package/src/components/ui/Select.tsx +1 -1
  28. package/src/components/ui/Splitter.tsx +14 -0
  29. package/src/components/ui/Tooltip.tsx +1 -1
  30. package/src/index.ts +11 -1
  31. package/src/styles/theme.css +77 -15
  32. package/build/SessionPanel-NQ8ksCfj.mjs.map +0 -1
package/README.md CHANGED
@@ -150,3 +150,22 @@ lose by forgetting a second mount isn't one.
150
150
  `2h 10m`) with no React in the graph — for a host that renders session readings outside
151
151
  React, like an extension host drawing them into a window status bar, and wants them spelled
152
152
  exactly as the panel spells them.
153
+
154
+ ## Rules you cannot infer from the types
155
+
156
+ - **Remount `SessionPanel` by key when the session id changes**, and never let its position in the
157
+ tree change otherwise: a remount drops the WebSocket attach and the whole transcript. That is why
158
+ the workspace keeps the panel's child index across the editor appearing and disappearing.
159
+ - **The panel owns the session's one attach.** External chrome reads live values through
160
+ `onVitals` and changes them through `onControls`; opening a second attach to render a status bar
161
+ means the tool bridge may ask the wrong client.
162
+ - **`transcriptVariant` and `transcriptDensity` ride context, not props.** A row component composed
163
+ by hand still gets the right treatment; restyling `data-slot`s from outside is not the seam.
164
+ - **`statusSurface: 'external'` takes the `⋯` menu's only home with it.** Combining it with
165
+ `panelSurface: 'internal'` needs a *function* `header` to receive the menu, or those panels
166
+ become unreachable.
167
+ - **Keep `monaco-editor` unreachable from `src/index.ts`.** Tree-shaking does not cover it: Vite
168
+ resolves Monaco's worker `new URL(...)`s while *transforming* the module, before shaking, and
169
+ emits megabytes of worker assets it never retracts. That is what the `/workspace` entry point is
170
+ for, and why Vite hosts need `optimizeDeps: { exclude: ['monaco-editor'] }`.
171
+