@sakaniui/react 0.14.2 → 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 (58) hide show
  1. package/AGENTS.md +12 -2
  2. package/CHANGELOG.md +31 -2
  3. package/dist/{TopBar-5h0LblO6.js → TopBar-BIBDb_-Y.js} +2575 -1843
  4. package/dist/TopBar-BTHYgyhs.cjs +1 -0
  5. package/dist/blocks/AiChatBlock/AiChatBlock.d.ts +6 -0
  6. package/dist/blocks/AiChatBlock/index.d.ts +2 -0
  7. package/dist/blocks/AiChatBlock/parts/AiSidebar.d.ts +44 -0
  8. package/dist/blocks/AiChatBlock/parts/ComposerOptions.d.ts +9 -0
  9. package/dist/blocks/AiWelcomeBlock/AiWelcomeBlock.d.ts +12 -0
  10. package/dist/blocks/AiWelcomeBlock/index.d.ts +2 -0
  11. package/dist/blocks/index.d.ts +4 -0
  12. package/dist/blocks.cjs +2 -2
  13. package/dist/blocks.mjs +2704 -2174
  14. package/dist/building-warehouse-DclrayB9.cjs +1 -0
  15. package/dist/{building-warehouse-_n8EvYUt.js → building-warehouse-LeVw9LPU.js} +48 -42
  16. package/dist/components/AiMessage/AiMessage.d.ts +17 -0
  17. package/dist/components/AiMessage/index.d.ts +2 -0
  18. package/dist/components/AttachmentChip/AttachmentChip.d.ts +17 -0
  19. package/dist/components/AttachmentChip/index.d.ts +2 -0
  20. package/dist/components/ChatOrb/ChatOrb.d.ts +21 -0
  21. package/dist/components/ChatOrb/index.d.ts +2 -0
  22. package/dist/components/Input/Input.d.ts +1 -1
  23. package/dist/components/PromptComposer/PromptComposer.d.ts +34 -0
  24. package/dist/components/PromptComposer/index.d.ts +2 -0
  25. package/dist/components/ReasoningTrace/ReasoningTrace.d.ts +17 -0
  26. package/dist/components/ReasoningTrace/index.d.ts +2 -0
  27. package/dist/components/SuggestionChip/SuggestionChip.d.ts +16 -0
  28. package/dist/components/SuggestionChip/index.d.ts +2 -0
  29. package/dist/components/Textarea/Textarea.d.ts +1 -1
  30. package/dist/components/ThinkingLoader/ThinkingLoader.d.ts +8 -0
  31. package/dist/components/ThinkingLoader/index.d.ts +2 -0
  32. package/dist/components/ToolCall/ToolCall.d.ts +21 -0
  33. package/dist/components/ToolCall/index.d.ts +2 -0
  34. package/dist/current-location-D6hMSldS.cjs +1 -0
  35. package/dist/current-location-xo8zXAPZ.js +40 -0
  36. package/dist/emoji-index.json +1 -1
  37. package/dist/help-circle-BKFYrUSW.cjs +1 -0
  38. package/dist/help-circle-D7EwSQUH.js +123 -0
  39. package/dist/icon-index.json +1 -1
  40. package/dist/icons.cjs +1 -1
  41. package/dist/icons.mjs +3927 -3954
  42. package/dist/index.cjs +1 -1
  43. package/dist/index.d.ts +8 -0
  44. package/dist/index.mjs +2209 -2186
  45. package/dist/lib/AiGlow.d.ts +3 -2
  46. package/dist/lib/EmberRing.d.ts +6 -0
  47. package/dist/lib/LiquidGlass.d.ts +1 -1
  48. package/dist/lib/RayLoader.d.ts +8 -0
  49. package/dist/manifest.json +737 -44
  50. package/dist/style.css +1 -1
  51. package/dist/tokens.css +17 -0
  52. package/package.json +1 -1
  53. package/dist/TopBar-D50mmITH.cjs +0 -1
  54. package/dist/building-warehouse-BUtjAEPH.cjs +0 -1
  55. package/dist/help-circle-qEEVeIea.js +0 -99
  56. package/dist/help-circle-rtL4juBJ.cjs +0 -1
  57. package/dist/logout-BLSXL3qV.js +0 -43
  58. package/dist/logout-pQUABnfO.cjs +0 -1
package/AGENTS.md CHANGED
@@ -216,8 +216,8 @@ lists its other names under `aliases` in `manifest.json`, and `search_components
216
216
  - **Input / Textarea `variant="ai"`** — The prompt box of an AI product ("Ask anything"): use `Input` for one line and
217
217
  `Textarea` when the prompt can run long (it grows with the text up to `maxRows`). Put the buttons in `leading` and
218
218
  `trailing` (an attach "+", a mic, a send button that replaces the mic once there is text); they take interactive
219
- content, unlike `leadingIcon`. A thin ember light sweeps round the border while it is idle and on focus (`glow`:
220
- `"pulse"` default, `"focus"`, `"off"`); under reduced motion it draws none. *Why:* it reads as the place to talk to the AI,
219
+ content, unlike `leadingIcon`. A thin ember light sweeps once round the border shortly after it appears, then rests: it never moves
220
+ again while someone writes in it (`glow`: `"once"` default, `"pulse"`, `"focus"`, `"off"`); under reduced motion it draws none. *Why:* it reads as the place to talk to the AI,
221
221
  not as another form field. *Not for* ordinary forms: use the default variant there, and still give it a label
222
222
  (`aria-label` if the design has none).
223
223
  - **Checkbox / Radio / Switch** — Checkbox: independent yes/no, or multiple choices. Radio: exactly one of a
@@ -300,6 +300,16 @@ user when you are composing** rather than implying a dedicated component exists.
300
300
  (`EmojiLightBulb` for planning, `EmojiPageFacingUp` for reading). Do not use a generic magnifier for every
301
301
  step. It only displays: you stream the steps in. Do not build this from `Stepper` (a
302
302
  progress bar for a known sequence) or `ActivityFeed` (a log of past events).
303
+ - **An AI conversation.** Use the AI parts instead of building a chat from bubbles: `AiMessage` (the assistant's reply
304
+ beside the `ChatOrb`, or the user's bubble; set `streaming` while it arrives), `ReasoningTrace` (the thinking panel:
305
+ `status="streaming"` while the model thinks, then `"done"` with `elapsed` and a one-line `summary`), `ToolCall` (one per
306
+ tool call: `status` `running` / `done` / `error`, `name`, `args`, `input`, `output`), `ThinkingLoader` (a status pill whose
307
+ `label` follows what the model is doing: "Thinking", "Searching the web", "Writing response"), `PromptComposer` (the prompt
308
+ box: it grows, Enter sends, `status="streaming"` turns send into Stop; put the model picker in `actions` or a row under it),
309
+ `AttachmentChip` for files above it and `SuggestionChip` (`starter` on the empty screen, `follow-up` under a reply). They are
310
+ presentational: you stream the text and set the state. `AiChatBlock` and `AiWelcomeBlock` show them composed. The assistant's
311
+ face is the `ChatOrb`, not a sparkles icon, and the ember light round the prompt box sweeps once and rests: do not set
312
+ `glow="pulse"`. *Why:* one family with one quiet motion language. *Not for* chat between people: use `MessageBubble`.
303
313
  - **The model isn't sure.** State uncertainty in words next to the claim, not hidden in colour. Use an
304
314
  `Alert` (`color="info"` or `"warning"`) or a `Badge` ("Low confidence"). Offer the next step: verify,
305
315
  rephrase, or ask for more context.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,35 @@
2
2
 
3
3
  All notable changes to `@sakaniui/react` are documented here.
4
4
 
5
+ ## 0.15.0
6
+
7
+ - **New: the AI conversation parts**, built from the new *AI Components* and *AI Blocks* pages in Figma. Presentational, with no AI SDK:
8
+ you pass text and state, and they draw it.
9
+ - **`AiMessage`**: one turn. `role="assistant"` is full-width text beside an ember-ringed avatar, with copy, regenerate and feedback
10
+ actions once done (`streaming` hides them and ends the text with a slate caret); `role="user"` is a right-aligned bubble.
11
+ - **`ChatOrb`**: the AI's face, now the assistant avatar in `AiMessage` in place of the ember-ringed sparkles. A soft white sphere with
12
+ two black eyes that turn toward the pointer anywhere on the page (easing, never snapping) and blink every 3 to 6 seconds. `glance`
13
+ (AiMessage sets it when the first text arrives) turns the eyes toward the response for 1.4s before they look straight; the eyes squint
14
+ while the pointer is over the orb (`squintOnHover`). `thinking`
15
+ makes the eyes sweep side to side, looking a little up, instead of following the pointer (AiMessage sets it while it streams with no text
16
+ yet). `size`, `look`, `blink`, `label`; decorative by default; still under reduced motion.
17
+ - **`ReasoningTrace`**: the thinking panel. `status="streaming"` turns a ray spinner, shimmers "Thinking" and counts whole seconds;
18
+ the reasoning streams in quietly (13/20, muted), each new word fading up out of a soft blur, inside a five-line window that glides
19
+ up as text arrives with the oldest line fading out at the top. Pass whole paragraphs or a paragraph growing word by word; only new
20
+ words animate. `status="done"` reads "Thought for 6s", shows a one-line `summary` when closed and folds open to the full reasoning.
21
+ - **`ToolCall`**: the row an agent leaves when it calls a tool: a running ray spinner, a check or a cross, the call in code, its duration,
22
+ and Input and Output panels when open.
23
+ - **`ThinkingLoader`**: the status pill of an AI that is working: a ray spinner and a shimmering label ("Thinking", "Searching the web",
24
+ "Writing response"). Change `label` and the text crossfades while the pill grows or shrinks to fit.
25
+ - **`SuggestionChip`**: a suggested prompt, `variant="starter"` (a card with a hint, for the empty screen) or `"follow-up"` (a pill under a reply).
26
+ - **`PromptComposer`**: the prompt box. It grows with the text up to `maxRows`, Enter sends, send becomes Stop while
27
+ `status="streaming"`, the ember light of `Textarea variant="ai"` sweeps the border while idle (`glow`) and a soft 20% ember border draws in on focus. The model picker is not inside it: put it in `actions` or in a row under the box.
28
+ - **`AttachmentChip`**: a file, an image, an upload in progress (an ember ring and progress line) or an error.
29
+ - **New blocks: `AiChatBlock` and `AiWelcomeBlock`**, composition examples built from the Sidebar parts plus the components above. The chat
30
+ block is live: send a message and it plays a reply (thinking, a tool call, then text arriving) so the streaming states show.
31
+ - **New tokens: `--ai-ember-0` to `--ai-ember-6` and `--ai-ember-gradient`**: the gradient of everything AI, the ember of `Textarea variant="ai"`
32
+ (indigo, violet, magenta, red, orange, amber, pale gold). Used by the attachment progress, the thinking spinner and the welcome cards.
33
+
5
34
  ## 0.14.2
6
35
 
7
36
  - **New: `reducedTransparency="ignore"` on `LiquidGlass`.** By default liquid glass turns into a plain opaque surface under
@@ -28,8 +57,8 @@ All notable changes to `@sakaniui/react` are documented here.
28
57
  - **Textarea:** a 16px-radius box with the field on top and an actions row underneath (`leading` on the left, `trailing` on the
29
58
  right). The field grows with what you type, up to `maxRows` lines (8 by default), then scrolls. Focus swaps the border for a static
30
59
  1.5px ember gradient, left to right (not for `error` or `disabled`, which keep their own borders).
31
- - **`glow`:** `"pulse"` (default) sweeps the light every 2.5s while idle and once each time the field takes focus; `"focus"` sweeps
32
- only on focus; `"off"` draws none. The light is a thin line in an ember gradient (indigo, violet, magenta, red, brand orange,
60
+ - **`glow`:** `"once"` (default, changed in 0.15.0; it was `"pulse"`) sweeps one lap shortly after the field appears and then stays still, focused or
61
+ not; `"pulse"` sweeps every 2.5s while idle and once each time the field takes focus; `"focus"` sweeps only on focus; `"off"` draws none. The light is a thin line in an ember gradient (indigo, violet, magenta, red, brand orange,
33
62
  amber, pale gold: a cool tail and a hot head) with a faint haze, one lap in about 1.3s, clockwise from the top-left. It follows the
34
63
  border's own path at an even speed (CSS `offset-path`), so it works on any box, wide or square. It is hidden under
35
64
  `prefers-reduced-motion` and where `offset-path: inset()` is not supported.