@aintela/chat 0.4.28 → 0.4.30
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/dist/components.js +3301 -3282
- package/dist/components.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{predictionRows-CtyrlEUr.js → predictionRows-Cn0gzEx3.js} +15 -13
- package/dist/{predictionRows-CtyrlEUr.js.map → predictionRows-Cn0gzEx3.js.map} +1 -1
- package/dist/src/components/v2/PromptV2.d.ts +12 -0
- package/dist/src/utils/swallowNextClick.d.ts +12 -1
- package/dist/src/utils/swallowNextClick.test.d.ts +1 -0
- package/dist/utils.js +1 -1
- package/package.json +1 -1
|
@@ -75,6 +75,18 @@ interface PromptV2Props {
|
|
|
75
75
|
* (no sketch yet) so the prompt reads as the dominant surface.
|
|
76
76
|
*/
|
|
77
77
|
inputMinHeight?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Horizontal inset of the input row (theme spacing units, default `1.25`).
|
|
80
|
+
*
|
|
81
|
+
* <p>The pill draws its own border, and 10px inside it is right for a prompt that is the width
|
|
82
|
+
* of a chat column. A host that stretches the prompt across a page — the BI composer, whose
|
|
83
|
+
* `DrawablePrompt` fills the width of the composer — reads the same 10px as text jammed against
|
|
84
|
+
* the frame (issue 1259 item 5), so it asks for more. It covers the input row and the
|
|
85
|
+
* attachment strip above it — the two rows PromptV2 draws inside the pill. `topSlot` is the
|
|
86
|
+
* host's own markup and keeps its own inset, so a host that raises this should raise that to
|
|
87
|
+
* match, or the chip above the textarea will no longer share its left edge.</p>
|
|
88
|
+
*/
|
|
89
|
+
inputPaddingX?: number;
|
|
78
90
|
/**
|
|
79
91
|
* Optional async hook that runs *before* the message hits the
|
|
80
92
|
* gateway. The composer uses this to ensure a server-side
|
|
@@ -12,5 +12,16 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Capture phase, so it never reaches the target (or a document-level away-listener); self-removing,
|
|
14
14
|
* and time-boxed in case no click arrives at all (the browser is not obliged to send one).
|
|
15
|
+
*
|
|
16
|
+
* `mousedown: true` eats the gesture's compatibility `mousedown` as well. Pass it when you act on
|
|
17
|
+
* `pointerUP`: that mousedown arrives after your handler has already re-rendered, and its default
|
|
18
|
+
* action — move focus, place the caret — lands on whatever is under the finger NOW. On Android that
|
|
19
|
+
* is how a `/`-template pick lost its caret: the pick put the caret after the template's `@` and
|
|
20
|
+
* opened the docked `@` panel in the spot the command list had just vacated, and the tap's mousedown
|
|
21
|
+
* then hit that panel, blurring the textarea (keyboard down, caret gone), or hit the textarea itself
|
|
22
|
+
* and re-homed the caret to the tap point. iOS never showed it — WebKit does not move focus to a
|
|
23
|
+
* non-focusable element on tap. A new `pointerdown` disarms it, so a genuine next tap is never eaten.
|
|
15
24
|
*/
|
|
16
|
-
export declare function swallowNextClick(
|
|
25
|
+
export declare function swallowNextClick(options?: {
|
|
26
|
+
mousedown?: boolean;
|
|
27
|
+
}): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/utils.js
CHANGED
|
@@ -2,7 +2,7 @@ var u = Object.defineProperty;
|
|
|
2
2
|
var a = (e, t) => u(e, "name", { value: t, configurable: !0 });
|
|
3
3
|
import { a as c, b as s } from "./environmentUtils-VZNTCzEE.js";
|
|
4
4
|
import { A as k, D as U, g as x, c as M, d as V, e as G, f as R, i as H, r as W } from "./environmentUtils-VZNTCzEE.js";
|
|
5
|
-
import { S as Y, a as Z, b as j, c as q, d as z, e as Q, f as $, g as J, h as X, i as ee, j as te, k as oe, l as ae, p as re, m as ie, s as ne, o as se, q as le, t as ce, r as de } from "./predictionRows-
|
|
5
|
+
import { S as Y, a as Z, b as j, c as q, d as z, e as Q, f as $, g as J, h as X, i as ee, j as te, k as oe, l as ae, p as re, m as ie, s as ne, o as se, q as le, t as ce, r as de } from "./predictionRows-Cn0gzEx3.js";
|
|
6
6
|
const m = "https://agent.tripapi.com.br", p = "http://localagent:8000", S = /* @__PURE__ */ a((e) => new URLSearchParams(e.location.search).get("local") === "true" ? p : c() ?? m, "getAgentBaseUrl"), f = "https://storage.googleapis.com/aibi_artifacts_bucket", I = /* @__PURE__ */ a(() => f, "getArtifactsBaseUrl"), n = {}, h = (n == null ? void 0 : n.VITE_CADDY) == "true";
|
|
7
7
|
function w() {
|
|
8
8
|
const e = h ? "http://wsserver.localhost" : "http://localhost:8000";
|