@runappsai/sdk 0.6.4 → 0.6.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runappsai/sdk",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "JavaScript / TypeScript client for the RunApps AI Gateway",
5
5
  "license": "MIT",
6
6
  "author": "RunApps",
@@ -906,6 +906,12 @@ function mountActivityBadge(opts: MountOpts): HTMLButtonElement {
906
906
  "border:1px solid rgba(255,255,255,0.12)",
907
907
  "box-shadow:0 4px 16px rgba(0,0,0,0.15)",
908
908
  "user-select:none",
909
+ "-webkit-user-select:none",
910
+ // Touch: without this the browser claims the first finger move as a
911
+ // page scroll and fires pointercancel, so the badge could not be
912
+ // dragged on phones. No callout either: a long press is a drag.
913
+ "touch-action:none",
914
+ "-webkit-touch-callout:none",
909
915
  "overflow:visible", // popover spills out the top
910
916
  "cursor:pointer",
911
917
  "appearance:none",
@@ -1188,7 +1194,11 @@ function mountActivityBadge(opts: MountOpts): HTMLButtonElement {
1188
1194
  // so further moves arrive even when the pointer escapes the
1189
1195
  // badge bounds (fast drags leave the small pill quickly).
1190
1196
  isDragging = true;
1191
- el.setPointerCapture(e.pointerId);
1197
+ try {
1198
+ el.setPointerCapture(e.pointerId);
1199
+ } catch {
1200
+ /* no active pointer of that id (synthetic events, odd WebViews): drag still works while the finger stays on the badge */
1201
+ }
1192
1202
  el.style.cursor = "grabbing";
1193
1203
  // Pre-emptively close any open popover — keeping it pinned to a
1194
1204
  // moving badge looks janky and a drag is clearly a different
@@ -1211,7 +1221,11 @@ function mountActivityBadge(opts: MountOpts): HTMLButtonElement {
1211
1221
  if (!isDragging) return;
1212
1222
  isDragging = false;
1213
1223
  el.style.cursor = "pointer";
1214
- if (el.hasPointerCapture(e.pointerId)) el.releasePointerCapture(e.pointerId);
1224
+ try {
1225
+ if (el.hasPointerCapture(e.pointerId)) el.releasePointerCapture(e.pointerId);
1226
+ } catch {
1227
+ /* same */
1228
+ }
1215
1229
  // Persist final position. Re-read the rect so what we store is
1216
1230
  // exactly what's on screen — clampToViewport may have shaved
1217
1231
  // the trailing few pixels.