bloby-bot 0.22.18 → 0.23.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bloby-bot",
3
- "version": "0.22.18",
3
+ "version": "0.23.0",
4
4
  "releaseNotes": [
5
5
  "1. new stuff",
6
6
  "2. ",
@@ -293,6 +293,7 @@ export default function InputBar({ onSend, onStop, streaming, whisperEnabled, on
293
293
  isHolding.current = true;
294
294
  setIsRecording(true);
295
295
  setRecordingTime(0);
296
+ if (isMobile) try { navigator.vibrate?.(50); } catch {}
296
297
  } catch (err) {
297
298
  console.error('[InputBar] recording setup failed:', err);
298
299
  }
@@ -528,14 +529,17 @@ export default function InputBar({ onSend, onStop, streaming, whisperEnabled, on
528
529
  {/* Draggable mic (DOM transform for 60fps) */}
529
530
  <div
530
531
  ref={micRef}
531
- className="shrink-0 touch-none select-none will-change-transform"
532
+ className="shrink-0 touch-none select-none will-change-transform relative z-10"
532
533
  style={{ transition: 'none' }}
533
534
  onPointerDown={handleMicDown}
534
535
  onPointerMove={handleMicMove}
535
536
  onPointerUp={handleMicUp}
536
537
  onPointerCancel={handleMicCancel}
537
538
  >
538
- <div className="flex items-center justify-center h-11 w-11 rounded-full bg-destructive text-destructive-foreground">
539
+ <div
540
+ className="flex items-center justify-center h-11 w-11 rounded-full bg-destructive text-destructive-foreground animate-mic-pulse transition-transform duration-200"
541
+ style={{ transform: 'scale(1.1) translateY(-6px)' }}
542
+ >
539
543
  <Mic className="h-5 w-5" />
540
544
  </div>
541
545
  </div>
@@ -130,3 +130,11 @@ body {
130
130
  0% { transform: rotate(0deg); }
131
131
  100% { transform: rotate(360deg); }
132
132
  }
133
+
134
+ @keyframes mic-pulse {
135
+ 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 77, 104, 0.4); }
136
+ 50% { box-shadow: 0 0 0 12px rgba(240, 77, 104, 0); }
137
+ }
138
+ .animate-mic-pulse {
139
+ animation: mic-pulse 1.5s ease-in-out infinite;
140
+ }
@@ -13,6 +13,8 @@
13
13
  '#bloby-widget-panel.open{transform:translateX(0)}',
14
14
  '#bloby-widget-panel iframe{width:100%;height:100%;border:none;background:#212121}',
15
15
  '@media(max-width:480px){#bloby-widget-panel{width:100vw}}',
16
+ '@keyframes bloby-mic-pulse{0%,100%{box-shadow:0 0 0 0 rgba(240,77,104,0.4)}50%{box-shadow:0 0 0 14px rgba(240,77,104,0)}}',
17
+ '#bloby-widget-bubble.recording{animation:bloby-mic-pulse 1.5s ease-in-out infinite}',
16
18
  ].join('\n');
17
19
  document.head.appendChild(style);
18
20
 
@@ -475,7 +477,11 @@
475
477
  loadHpSprite(function() { if (hpPointerDown) beginHpAnimation(); });
476
478
  return;
477
479
  }
480
+ try { navigator.vibrate(50); } catch(e) {}
478
481
  badgeEl.style.display = 'none';
482
+ canvas.style.transition = 'transform 0.2s ease';
483
+ canvas.style.transform = 'scale(1.1) translateY(-8px)';
484
+ canvas.classList.add('recording');
479
485
  hpState = 'activating';
480
486
  hpFrame = HP_ACTIVATE_START;
481
487
  hpPingPong = 1;
@@ -524,6 +530,10 @@
524
530
  }
525
531
  }
526
532
 
533
+ // Shrink back + remove pulse
534
+ canvas.style.transform = '';
535
+ canvas.classList.remove('recording');
536
+
527
537
  // v2 deactivation: reverse 40→11 (activate played backwards)
528
538
  if (hpState === 'activating') {
529
539
  hpState = 'activating_then_deactivate';
@@ -593,6 +603,7 @@
593
603
  // ══════════════════════════════════════════════════════════════════
594
604
 
595
605
  var isOpen = false;
606
+ var toggleCooldown = false;
596
607
 
597
608
  function toggle() {
598
609
  console.log('[widget] toggle called', { canvasPhase: canvasPhase, isOpen: isOpen });
@@ -643,8 +654,11 @@
643
654
  stopHpRecording(false);
644
655
  }
645
656
  // Tap detection: preventDefault on pointerdown suppresses click on mobile,
646
- // so we handle taps here instead.
657
+ // so we handle taps here instead. Set cooldown to prevent the synthesized
658
+ // click from hitting the backdrop (bubble is hidden by then).
647
659
  if (!hpWasHold) {
660
+ toggleCooldown = true;
661
+ setTimeout(function() { toggleCooldown = false; }, 400);
648
662
  toggle();
649
663
  }
650
664
  hpWasHold = false;
@@ -674,7 +688,7 @@
674
688
  });
675
689
 
676
690
  bubble.addEventListener('contextmenu', function(e) { e.preventDefault(); });
677
- backdrop.addEventListener('click', toggle);
691
+ backdrop.addEventListener('click', function() { if (!toggleCooldown) toggle(); });
678
692
  document.addEventListener('keydown', function (e) { if (e.key === 'Escape' && isOpen) toggle(); });
679
693
 
680
694
  // ── PWA Install ──