@sakaniui/react 0.14.1 → 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.
- package/AGENTS.md +12 -2
- package/CHANGELOG.md +39 -2
- package/dist/{TopBar-D-xZskqG.js → TopBar-BIBDb_-Y.js} +2601 -1868
- package/dist/TopBar-BTHYgyhs.cjs +1 -0
- package/dist/blocks/AiChatBlock/AiChatBlock.d.ts +6 -0
- package/dist/blocks/AiChatBlock/index.d.ts +2 -0
- package/dist/blocks/AiChatBlock/parts/AiSidebar.d.ts +44 -0
- package/dist/blocks/AiChatBlock/parts/ComposerOptions.d.ts +9 -0
- package/dist/blocks/AiWelcomeBlock/AiWelcomeBlock.d.ts +12 -0
- package/dist/blocks/AiWelcomeBlock/index.d.ts +2 -0
- package/dist/blocks/index.d.ts +4 -0
- package/dist/blocks.cjs +2 -2
- package/dist/blocks.mjs +2704 -2174
- package/dist/building-warehouse-DclrayB9.cjs +1 -0
- package/dist/{building-warehouse-_n8EvYUt.js → building-warehouse-LeVw9LPU.js} +48 -42
- package/dist/components/AiMessage/AiMessage.d.ts +17 -0
- package/dist/components/AiMessage/index.d.ts +2 -0
- package/dist/components/AttachmentChip/AttachmentChip.d.ts +17 -0
- package/dist/components/AttachmentChip/index.d.ts +2 -0
- package/dist/components/ChatOrb/ChatOrb.d.ts +21 -0
- package/dist/components/ChatOrb/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/PromptComposer/PromptComposer.d.ts +34 -0
- package/dist/components/PromptComposer/index.d.ts +2 -0
- package/dist/components/ReasoningTrace/ReasoningTrace.d.ts +17 -0
- package/dist/components/ReasoningTrace/index.d.ts +2 -0
- package/dist/components/SuggestionChip/SuggestionChip.d.ts +16 -0
- package/dist/components/SuggestionChip/index.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/ThinkingLoader/ThinkingLoader.d.ts +8 -0
- package/dist/components/ThinkingLoader/index.d.ts +2 -0
- package/dist/components/ToolCall/ToolCall.d.ts +21 -0
- package/dist/components/ToolCall/index.d.ts +2 -0
- package/dist/current-location-D6hMSldS.cjs +1 -0
- package/dist/current-location-xo8zXAPZ.js +40 -0
- package/dist/emoji-index.json +1 -1
- package/dist/help-circle-BKFYrUSW.cjs +1 -0
- package/dist/help-circle-D7EwSQUH.js +123 -0
- package/dist/icon-index.json +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.mjs +3927 -3954
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +2209 -2186
- package/dist/lib/AiGlow.d.ts +3 -2
- package/dist/lib/EmberRing.d.ts +6 -0
- package/dist/lib/LiquidGlass.d.ts +4 -1
- package/dist/lib/RayLoader.d.ts +8 -0
- package/dist/manifest.json +747 -42
- package/dist/style.css +1 -1
- package/dist/tokens.css +17 -0
- package/package.json +1 -1
- package/dist/TopBar-BbIHT61j.cjs +0 -1
- package/dist/building-warehouse-BUtjAEPH.cjs +0 -1
- package/dist/help-circle-qEEVeIea.js +0 -99
- package/dist/help-circle-rtL4juBJ.cjs +0 -1
- package/dist/logout-BLSXL3qV.js +0 -43
- 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
|
|
220
|
-
`"
|
|
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,43 @@
|
|
|
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
|
+
|
|
34
|
+
## 0.14.2
|
|
35
|
+
|
|
36
|
+
- **New: `reducedTransparency="ignore"` on `LiquidGlass`.** By default liquid glass turns into a plain opaque surface under
|
|
37
|
+
`prefers-reduced-transparency` (macOS "Reduce transparency", Windows "Transparency effects" off, which Windows also does on its own in
|
|
38
|
+
battery saver), and that is still the default, so a surface that holds your content stays readable. Pass `"ignore"` on a purely decorative
|
|
39
|
+
showcase, such as a demo of the glass over a photo, that means nothing as a plain surface: it keeps the tint, the blur, the refraction and
|
|
40
|
+
the rim light. Do not use it on anything that carries the user's content.
|
|
41
|
+
|
|
5
42
|
## 0.14.1
|
|
6
43
|
|
|
7
44
|
- **Fixed: a bare `LiquidGlass` lens became a solid disc under `prefers-reduced-transparency`.** With "Reduce transparency" on
|
|
@@ -20,8 +57,8 @@ All notable changes to `@sakaniui/react` are documented here.
|
|
|
20
57
|
- **Textarea:** a 16px-radius box with the field on top and an actions row underneath (`leading` on the left, `trailing` on the
|
|
21
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
|
|
22
59
|
1.5px ember gradient, left to right (not for `error` or `disabled`, which keep their own borders).
|
|
23
|
-
- **`glow`:** `"
|
|
24
|
-
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,
|
|
25
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
|
|
26
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
|
|
27
64
|
`prefers-reduced-motion` and where `offset-path: inset()` is not supported.
|