@agentforge-io/chat-sdk 2.4.0-dev.2 → 2.4.0-dev.3

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 (2) hide show
  1. package/dist/react.js +9 -7
  2. package/package.json +1 -1
package/dist/react.js CHANGED
@@ -542,13 +542,15 @@ function ChatWidget(props) {
542
542
  // conversation has actually ended OR before the
543
543
  // session is ready at all.
544
544
  disabled: status === 'ended' || status === 'loading' || status === 'idle' }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "af-send",
545
- // `onMouseDown preventDefault` prevents the button from
546
- // stealing focus from the textarea when the visitor
547
- // taps Send. Without this, the focus shifts to the
548
- // button just before `handleSend` runs, the button
549
- // then disables (sendDisabled flips true), focus jumps
550
- // to <body>, and on mobile the keyboard collapses.
551
- onMouseDown: (e) => e.preventDefault(), onClick: handleSend, disabled: sendDisabled, "aria-label": "Send message", children: (0, jsx_runtime_1.jsx)(SendIcon, {}) })] }), !bare && (0, jsx_runtime_1.jsx)("div", { className: "af-footer", children: "Powered by AgentForge" })] })] }));
545
+ // `onPointerDown preventDefault` is the single cross-
546
+ // device guarantee that the button never steals focus
547
+ // from the textarea. PointerEvents cover touch, mouse,
548
+ // AND pen `onMouseDown` alone misses mobile touch.
549
+ // Without this, the focus shifts to the button just
550
+ // before `handleSend` runs, the button then disables
551
+ // (sendDisabled flips true on status change), focus
552
+ // jumps to <body>, and the on-screen keyboard collapses.
553
+ onPointerDown: (e) => e.preventDefault(), onClick: handleSend, disabled: sendDisabled, "aria-label": "Send message", children: (0, jsx_runtime_1.jsx)(SendIcon, {}) })] }), !bare && (0, jsx_runtime_1.jsx)("div", { className: "af-footer", children: "Powered by AgentForge" })] })] }));
552
554
  }
553
555
  function MessageBubble({ message, session, readOnly, onDecision, onContinue, bare = false, showAvatar = false, avatarTheme, avatarName, avatarAgentId, speakerLabel, }) {
554
556
  const kind = message.metadata?.kind;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/chat-sdk",
3
- "version": "2.4.0-dev.2",
3
+ "version": "2.4.0-dev.3",
4
4
  "description": "Framework-free chat session SDK for AgentForge public chat tokens. Headless — no DOM. Drop into any frontend (React, Vue, Svelte, vanilla) and listen for events.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",