inline-chat-kit 0.59.0 → 0.60.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/CHANGELOG.md +144 -0
- package/README.md +5 -1
- package/dist/{ChatExperience-BeLjIxHU.js → ChatExperience-BBd-p0wh.js} +1078 -899
- package/dist/ChatExperience-BBd-p0wh.js.map +1 -0
- package/dist/ChatHeader/ChatHeader.d.ts +7 -0
- package/dist/ChatInput/ChatInput.d.ts +7 -0
- package/dist/ChatTurnRow/ChatTurnRow.d.ts +23 -1
- package/dist/demo.js +1 -1
- package/dist/inline-chat-kit.css +1 -1
- package/dist/inline-chat-kit.js +1 -1
- package/package.json +1 -1
- package/theming.md +69 -0
- package/dist/ChatExperience-BeLjIxHU.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,150 @@ The versions before 1.0 follow the pre-release convention: **a breaking change
|
|
|
8
8
|
or new public API bumps the minor**, and the patch is for fixes. Anything that would break an
|
|
9
9
|
existing install is called out under **Breaking**, with what to do about it.
|
|
10
10
|
|
|
11
|
+
## 0.60.0 — 2026-10-15
|
|
12
|
+
|
|
13
|
+
Reported from a host running the kit in production, each one worked around
|
|
14
|
+
outside the kit there. Each was reproduced here before it was changed.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **The header's "…" menu closes when "…" is pressed again.** The press
|
|
19
|
+
moved focus from the menu to the button, the menu closed on that blur, and
|
|
20
|
+
the click toggled it straight back open. Measured in Chromium and WebKit, by
|
|
21
|
+
mouse and by touch: it could not be closed that way at all.
|
|
22
|
+
- **And on a press anywhere outside it.** It closed only on a blur, and on iOS
|
|
23
|
+
a tap on something that takes no focus moves none — so the menu stayed open
|
|
24
|
+
over whatever was touched next.
|
|
25
|
+
- **`ChatExperience` fits its container on a page with no `box-sizing`
|
|
26
|
+
reset.** It was `width: 100%` plus 64px of padding, so in a 400px side
|
|
27
|
+
panel the end of every sent message sat under the panel's edge. A host
|
|
28
|
+
with a reset saw nothing change; one without now gets the column the
|
|
29
|
+
playground was designed with — 720px overall, not 784.
|
|
30
|
+
- **A short message is no longer faded, with "Read more" on it, because of
|
|
31
|
+
the width it had for one frame.** Whether a sent message is long was
|
|
32
|
+
measured once, a frame after the answer settled. In a host's side panel
|
|
33
|
+
still opening under an instant answer, that frame had the bubble 27px wide:
|
|
34
|
+
a one-line message measured 269px tall and stayed faded at 201×25. It is
|
|
35
|
+
measured again whenever it reflows, and the fade and the button go when it
|
|
36
|
+
is no longer long. A resting message mounted from history is measured too,
|
|
37
|
+
so it is clamped the same way a freshly sent one is.
|
|
38
|
+
- **An empty composer is never two lines.** Mounted a few pixels wide in the
|
|
39
|
+
same panel, the fresh composer decided it needed a second line, and the way
|
|
40
|
+
back compared against that width, so it never returned: 68px tall, its "+"
|
|
41
|
+
on a line of its own, for the rest of the session.
|
|
42
|
+
- **A docked composer no longer jumps on a send.** The fresh composer arrived
|
|
43
|
+
like any new turn — rising 16px into place — so the box at the bottom went
|
|
44
|
+
up and back every time a message was sent (840 → 824 → 840). It fades in
|
|
45
|
+
where it is now. A sent message still goes to the top, as before.
|
|
46
|
+
- **Docked, the question lands before its answer starts.** The answer's "…"
|
|
47
|
+
appeared at the top the moment a message was sent, while the message was
|
|
48
|
+
still travelling up from the composer — two things moving in opposite
|
|
49
|
+
directions, an answer begun above a question that had not arrived. The
|
|
50
|
+
answer now waits, still taking its room so the anchor does not move, until
|
|
51
|
+
the bubble has stopped: about 0.45s, measured at 1120×700 and 390×844, and
|
|
52
|
+
for a model that is silent first. Read off the screen rather than from the
|
|
53
|
+
spring, which rests at 1.2s, and including the scroll that carries a second
|
|
54
|
+
message most of its way. `ChatTurnRow` takes it as `answerAfterTravel`;
|
|
55
|
+
`ChatInput` reports it through `onLanded`.
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
|
|
59
|
+
- **`ChatTurnRow` takes `entrance`** — `"rise"` or `"fade"`.
|
|
60
|
+
- **A host's own buttons.** A host matched the kit's buttons by hashed class
|
|
61
|
+
name (`[class*='ick-primary-']`), by position (the button in the
|
|
62
|
+
composer's surface is the send) and by `aria-label` (the stop is the one
|
|
63
|
+
labelled "Zaustavi"), so translating a label changed its colour.
|
|
64
|
+
- Every variant is painted from `--ick-btn-<variant>-*` tokens, with
|
|
65
|
+
`--ick-btn-radius` and `--ick-btn-weight`. The defaults are the values
|
|
66
|
+
the variants had: compared in both themes, at rest and on hover, 60
|
|
67
|
+
samples, no difference.
|
|
68
|
+
- Every button the kit draws says what it is for in `data-ick-role` and
|
|
69
|
+
what it is in `data-ick-variant`. `send`, `stop` and `save` are three
|
|
70
|
+
roles, not one button with three labels. A test fails on a `<Button>`
|
|
71
|
+
drawn without a role.
|
|
72
|
+
- `ChatHeaderAction` takes `variant`, so one action can be the host's
|
|
73
|
+
primary.
|
|
74
|
+
- `HostButtons` story; the tokens and the roles are listed in
|
|
75
|
+
`theming.md`.
|
|
76
|
+
|
|
77
|
+
Not a `components={{ Button }}` slot, though that was asked for: the kit's
|
|
78
|
+
buttons carry the composer's morphing glyph and its layout animation, and
|
|
79
|
+
a host component would have to take all of it on to stand in for one.
|
|
80
|
+
- **`OpensWithTheMessage` story**, and `npm run panel-check` in the gate: a
|
|
81
|
+
card's button opens a side panel and sends from it, the answer is ready at
|
|
82
|
+
once. Four failures against 0.59.2, none now — and a long message is
|
|
83
|
+
checked to still be clamped.
|
|
84
|
+
|
|
85
|
+
## 0.59.2 — 2026-09-24
|
|
86
|
+
|
|
87
|
+
### Fixed
|
|
88
|
+
|
|
89
|
+
Docked, an answer holds still while it arrives and as it finishes. Measured
|
|
90
|
+
after the frame is painted, in four windows, on every answer the demo gives:
|
|
91
|
+
from 6 failures to none.
|
|
92
|
+
|
|
93
|
+
- **An answer with a card in it no longer drops and comes back as it
|
|
94
|
+
settles.** The room under the last turn was a margin written a frame after
|
|
95
|
+
the answer changed. When anything inside the turn got shorter — the
|
|
96
|
+
reasoning folding away as a card arrived — the scroll was clamped before
|
|
97
|
+
the margin caught up, and the whole answer dropped 3–13px for a frame. The
|
|
98
|
+
room is now the last turn's `min-height`, which the browser holds in the
|
|
99
|
+
same layout.
|
|
100
|
+
- **A finished answer is no longer nudged up.** Its row of actions was drawn
|
|
101
|
+
only on settling, 36px of new height at the moment it finished, and an
|
|
102
|
+
answer near the composer was pushed up by what did not fit — 2px, or 25.
|
|
103
|
+
The row is now there, hidden, while the answer arrives.
|
|
104
|
+
- **Following the end of a long answer keeps the last line above the
|
|
105
|
+
composer**, where it went 13px behind it. And when a settled answer does
|
|
106
|
+
have to move, it glides once to where it ends up instead of travelling to
|
|
107
|
+
where the end was and creeping back.
|
|
108
|
+
- **An artifact card grows to its content** instead of jumping from 97px to
|
|
109
|
+
236px in a frame and throwing the answer under it down.
|
|
110
|
+
- **Inline, the sent bubble no longer flickers between one line and two**
|
|
111
|
+
as its stop leaves: the exit spring overshot zero by a fraction of a pixel,
|
|
112
|
+
enough to wrap, four times in 40ms. It is critically damped now.
|
|
113
|
+
- **Browser scroll anchoring is off in the conversation** — the component
|
|
114
|
+
places the view, and Safari never anchored.
|
|
115
|
+
|
|
116
|
+
### Added
|
|
117
|
+
|
|
118
|
+
- `npm run still-check` in the gate: no jolt (3px undone within two frames),
|
|
119
|
+
and an answer that fits is not moved as it settles.
|
|
120
|
+
|
|
121
|
+
### Known
|
|
122
|
+
|
|
123
|
+
- Inline, the room is still the measured margin, and a reasoning folding
|
|
124
|
+
away can still clamp the view for a frame by 3–4px, as it did before.
|
|
125
|
+
|
|
126
|
+
## 0.59.1 — 2026-09-24
|
|
127
|
+
|
|
128
|
+
### Fixed
|
|
129
|
+
|
|
130
|
+
- **A sent message goes to the top while the model is still silent.** It
|
|
131
|
+
waited for the answer: a model that thinks for a few seconds and then
|
|
132
|
+
answers all at once left the message where it was sent until the answer
|
|
133
|
+
came. Two causes, either one enough:
|
|
134
|
+
- **A host's chat published a render late.** A host that keeps its
|
|
135
|
+
`useChatTurns` in a store and publishes it from an effect hands the kit the
|
|
136
|
+
turns a render after the press. For that render the turn is still the
|
|
137
|
+
composer, and docked the composer is on the bottom edge — the anchor moved
|
|
138
|
+
the view there and was spent. The anchor now waits for the turn to have
|
|
139
|
+
been sent. Measured before: 399px in a 900px window, 526px in an 844px one.
|
|
140
|
+
- **The room under a docked conversation came up short.** While the
|
|
141
|
+
conversation is shorter than the view, the dock's `margin-top: auto`
|
|
142
|
+
swallows the first of the room, and the correction came a frame after the
|
|
143
|
+
view had set off for the old end — and the view no longer looked. The room
|
|
144
|
+
is now settled in one pass, and a travel that was overtaken is looked at
|
|
145
|
+
again when it lands. Measured before: the second message stopped at 141px
|
|
146
|
+
in a 680px window.
|
|
147
|
+
|
|
148
|
+
### Added
|
|
149
|
+
|
|
150
|
+
- **`ThinksFirst` and `ChatInAStore` stories**, and `npm run silent-check`
|
|
151
|
+
in the gate: three messages to a model silent for 2.5s, in three windows,
|
|
152
|
+
each at the anchor 700ms after the send and still there at 2300ms. Without
|
|
153
|
+
either fix it fails seven of eighteen.
|
|
154
|
+
|
|
11
155
|
## 0.59.0 — 2026-09-24
|
|
12
156
|
|
|
13
157
|
From integrating 0.58 into a host app. Nothing changes for a host that passes
|
package/README.md
CHANGED
|
@@ -211,6 +211,8 @@ input that morphs into its own bubble rather than a record of what was typed.
|
|
|
211
211
|
| `placeholder` | `string` | | |
|
|
212
212
|
| `animationConfig` | `InlineAnimConfig` | | Passed to the input |
|
|
213
213
|
| `entranceDelay` | `number` | `0` | Stagger, in seconds |
|
|
214
|
+
| `entrance` | `"rise" \| "fade"` | `"rise"` | How the row arrives — a docked composer fades in place |
|
|
215
|
+
| `answerAfterTravel` | `boolean` | `false` | The answer waits until the sent question has landed — docked, set by `ChatExperience` |
|
|
214
216
|
| `selectionMode` | `"marker" \| "precise"` | `"marker"` | Passed to the highlighter |
|
|
215
217
|
| `questionAlign` | `"end" \| "stretch"` | `"end"` | Where the composer sits — see below |
|
|
216
218
|
| `onDraft` | `(id, value) => void` | | |
|
|
@@ -1393,7 +1395,9 @@ handful of things you can do to the whole thread.
|
|
|
1393
1395
|
| `landmark` | `boolean` | `true` | `false` inside a panel, where `banner` would be a lie |
|
|
1394
1396
|
| `children` | `ReactNode` | | Anything the kit should not manage. Never collapses |
|
|
1395
1397
|
|
|
1396
|
-
Each action is `{ id, label, icon, onClick?, href?, count?, active?, disabled?, pinned? }`.
|
|
1398
|
+
Each action is `{ id, label, icon, onClick?, href?, count?, active?, disabled?, pinned?, variant? }`.
|
|
1399
|
+
`variant` is how one action stands out — `"primary"` for the host's own — and
|
|
1400
|
+
only applies while it is in the header rather than folded into the menu.
|
|
1397
1401
|
`label` is required because an icon has no name of its own, and `count` is
|
|
1398
1402
|
folded into that name — the badge is decorative, so a reader who cannot see it
|
|
1399
1403
|
still hears "Saved highlights, 3".
|