@gymmymac/bob-widget 3.2.16 → 3.2.18
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 +27 -0
- package/dist/components/Bob.d.ts +8 -0
- package/dist/hooks/useBobChat.d.ts +9 -1
- package/dist/index.js +35 -34
- package/dist/index.mjs +10928 -5788
- package/dist/style.css +1 -1
- package/dist/types/partner.d.ts +8 -0
- package/dist/utils/iosAudioUnlock.d.ts +47 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@ All notable changes to the `@gymmymac/bob-widget` package will be documented in
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v3.2.18] - 2026-03-26
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **iOS TTS now works on ALL iOS browsers (Safari, Chrome, Firefox)** — Replaced the silent-WAV `HTMLAudioElement` unlock with a shared **Web Audio API `AudioContext`** singleton. The context is `.resume()`'d on the first user gesture and stays unlocked for the page lifetime. All TTS playback now routes through `decodeAudioData()` → `AudioBufferSourceNode`, which succeeds even after async `fetch()` calls. This fixes the root cause: iOS WebKit does not transfer an audio "unlock" between different `Audio` elements.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## [v3.2.17] - 2026-03-26
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **`identifiedVehicle` now persisted in session** — Previously, navigating away and returning restored messages and conversation state but lost the identified vehicle. This caused `vehicleContext` to be `null` in subsequent requests, breaking `add_to_cart` and other vehicle-dependent tools. The vehicle is now saved/restored alongside all other session data.
|
|
21
|
+
- **Long-press on PTT no longer selects images on mobile** — Added scoped `user-select: none` and `-webkit-touch-callout: none` to the widget root and layout containers. Text selection is re-enabled on `<input>` and `<textarea>` elements. Product tiles, variant cards, and host-page elements remain fully interactive and selectable.
|
|
22
|
+
- **iOS audio playback (TTS) now works** — Added a silent-audio unlock mechanism that triggers on the first user touch within the widget. This satisfies iOS Safari's autoplay policy so that subsequent `Audio.play()` calls from Bob's TTS succeed without requiring each one to originate from a direct gesture.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## [v3.2.16] - 2026-03-21
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **Session persistence via `sessionStorage`** — Bob's conversation (messages, vehicle candidates, conversation state) is now saved to `sessionStorage` and restored on mount if less than 4 hours old. Navigating away and returning preserves the full chat context. Cleared on explicit conversation reset.
|
|
31
|
+
- **`initialVehicle` prop on `BobStandalone`** — Hosts can pass a pre-identified vehicle to skip the REGO lookup flow. Session takes priority: if a valid session exists, `initialVehicle` is ignored.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
8
35
|
## [v3.2.15] - 2026-03-11
|
|
9
36
|
|
|
10
37
|
### Fixed
|
package/dist/components/Bob.d.ts
CHANGED
|
@@ -21,6 +21,14 @@ interface BobProps {
|
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
23
|
embedded?: boolean;
|
|
24
|
+
/** Optional pre-identified vehicle — Bob skips REGO lookup */
|
|
25
|
+
initialVehicle?: {
|
|
26
|
+
vehicle_id: string | number;
|
|
27
|
+
make: string;
|
|
28
|
+
model: string;
|
|
29
|
+
year: number;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
24
32
|
}
|
|
25
33
|
export declare const Bob: React.FC<BobProps>;
|
|
26
34
|
export {};
|
|
@@ -24,8 +24,16 @@ interface UseBobChatProps {
|
|
|
24
24
|
onVariantSelectionRequired?: (variants: VariantCard[], make: string, model: string) => void;
|
|
25
25
|
/** Ref containing current shelf category names for post-stream scroll matching */
|
|
26
26
|
shelfCategoriesRef?: React.RefObject<Set<string>>;
|
|
27
|
+
/** Optional pre-identified vehicle — skips REGO lookup when no session exists */
|
|
28
|
+
initialVehicle?: {
|
|
29
|
+
vehicle_id: string | number;
|
|
30
|
+
make: string;
|
|
31
|
+
model: string;
|
|
32
|
+
year: number;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
};
|
|
27
35
|
}
|
|
28
|
-
export declare const useBobChat: ({ setAnimationState, manualMode, talkingState, thinkingState, completeState, idleState, listenState, onStreamStart, onStreamComplete, onShowingProduct, onResearchStart, onReadyToSpeak, onHighlightPart, onHighlightProduct, onNoPartsFound, onAutoFetchComplete, onVariantSelectionRequired, shelfCategoriesRef }: UseBobChatProps) => {
|
|
36
|
+
export declare const useBobChat: ({ setAnimationState, manualMode, talkingState, thinkingState, completeState, idleState, listenState, onStreamStart, onStreamComplete, onShowingProduct, onResearchStart, onReadyToSpeak, onHighlightPart, onHighlightProduct, onNoPartsFound, onAutoFetchComplete, onVariantSelectionRequired, shelfCategoriesRef, initialVehicle }: UseBobChatProps) => {
|
|
29
37
|
messages: Message[];
|
|
30
38
|
input: string;
|
|
31
39
|
setInput: import('react').Dispatch<import('react').SetStateAction<string>>;
|