inline-chat-kit 0.51.0 → 0.54.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 +303 -0
- package/README.md +36 -0
- package/dist/Artifact/ArtifactCard.d.ts +8 -1
- package/dist/Artifact/ChatLayout.d.ts +10 -1
- package/dist/Conversation/Conversation.d.ts +51 -0
- package/dist/ReplyThreadPopup/placePanel.d.ts +43 -0
- package/dist/inline-chat-kit.css +1 -1
- package/dist/inline-chat-kit.js +1386 -1153
- package/dist/inline-chat-kit.js.map +1 -1
- package/package.json +1 -1
- package/theming.md +51 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inline-chat-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "An inline AI chat experience for React. The input is the message: it morphs into the bubble, the answer streams beneath it, and the parts around it — tool calls, reasoning, questions, artifacts, dictation — come with it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
package/theming.md
CHANGED
|
@@ -251,3 +251,54 @@ size the answer is set at instead of drifting away from it.
|
|
|
251
251
|
already honours `prefers-reduced-motion` on its own: transforms and layout snap
|
|
252
252
|
to their final values while opacity and colour still fade, so state stays
|
|
253
253
|
legible without travelling.
|
|
254
|
+
|
|
255
|
+
## On a phone: two things only the host can do
|
|
256
|
+
|
|
257
|
+
**First, what a phone is for here.** The kit is built and tuned for desktop and
|
|
258
|
+
tablet. It runs on a phone and does not break — see *Where it is meant to run*
|
|
259
|
+
in the README for what holds up, what does not, and why the inline model is a
|
|
260
|
+
weaker idea on a small screen. Everything below is true on a phone; none of it
|
|
261
|
+
makes a phone the target.
|
|
262
|
+
|
|
263
|
+
The kit sizes itself, expands its own hit areas on a coarse pointer, and keeps
|
|
264
|
+
nothing wider than its container. Two mobile faults are outside it, because
|
|
265
|
+
both live in the host document rather than in any component.
|
|
266
|
+
|
|
267
|
+
**The viewport meta.** Add `viewport-fit=cover` if you want the safe-area
|
|
268
|
+
insets to report anything but zero:
|
|
269
|
+
|
|
270
|
+
```html
|
|
271
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**The zoom on focus.** iOS zooms the page in to any editable whose text
|
|
275
|
+
computes under 16px, and it does not zoom back out. Tapping the composer threw
|
|
276
|
+
the conversation out of frame and left it there.
|
|
277
|
+
|
|
278
|
+
**The kit handles this and you do not have to do anything.** Under
|
|
279
|
+
`@media (pointer: coarse)` the type scale is raised and two tokens carry a
|
|
280
|
+
floor:
|
|
281
|
+
|
|
282
|
+
```css
|
|
283
|
+
--ick-composer-size: max(1rem, var(--ick-text-sm));
|
|
284
|
+
--ick-field-size: max(1rem, var(--ick-text-md));
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
`max()` rather than a flat `1rem`, so a theme that puts the composer at 18px
|
|
288
|
+
keeps 18 and a theme that puts it at 13 gets 16 — a floor, not an override.
|
|
289
|
+
Anything somebody types into should draw at `--ick-field-size`; that is the
|
|
290
|
+
token the guard in `tools/mobile/zoom-check.mjs` asserts against, in both
|
|
291
|
+
engines, at phone width.
|
|
292
|
+
|
|
293
|
+
There were three ways out and two of them were worse.
|
|
294
|
+
|
|
295
|
+
| | |
|
|
296
|
+
| --- | --- |
|
|
297
|
+
| `maximum-scale=1` in the meta | Works. Takes pinch-zoom away from everybody, permanently, for a fault that lasts as long as somebody is typing. |
|
|
298
|
+
| Lock the scale **while a field has focus** | What this repo shipped for a while — a hook rewriting the host's viewport meta on `pointerdown`. It cost two ordering bugs, one race, and a guard that switched itself off for good once the page was zoomed. None of it could be checked: no engine outside a real iPhone implements zoom-on-focus, so every green run proved nothing. |
|
|
299
|
+
| **Stop being under 16px** | What the kit does. Checkable everywhere, and there is nothing left to go wrong. |
|
|
300
|
+
|
|
301
|
+
The objection to the third was always that the composer would become the
|
|
302
|
+
largest text on the page, bigger than the answer it turns into — true if only
|
|
303
|
+
the composer moves. So the whole scale moves, on touch devices only. 12px
|
|
304
|
+
reading text on a 390px screen was too small anyway.
|