@gymmymac/bob-widget 3.2.20 → 3.2.21
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 +10 -0
- package/dist/components/ProductTile.d.ts +0 -8
- package/dist/components/mobile/ContainedMobileBobLayout.d.ts +1 -1
- package/dist/components/mobile/MobileBobLayout.d.ts +1 -1
- package/dist/components/mobile/MobileBobLayoutCore.d.ts +2 -15
- package/dist/components/mobile/MobileProductColumn.d.ts +5 -41
- package/dist/components/mobile/index.d.ts +2 -1
- package/dist/components/shelf/HorizontalRow.d.ts +19 -0
- package/dist/components/shelf/PartslotSection.d.ts +16 -0
- package/dist/components/shelf/ServicePackageCard.d.ts +11 -0
- package/dist/components/shelf/ShelfColumn.d.ts +40 -0
- package/dist/components/shelf/ShelfHeader.d.ts +9 -0
- package/dist/components/shelf/ShelfLoadingState.d.ts +7 -0
- package/dist/components/shelf/TierCard.d.ts +15 -0
- package/dist/components/shelf/TierProductList.d.ts +8 -0
- package/dist/components/shelf/VariantSelector.d.ts +11 -0
- package/dist/components/shelf/index.d.ts +10 -0
- package/dist/hooks/useBobChat.d.ts +3 -2
- package/dist/index.js +32 -31
- package/dist/index.mjs +4616 -4204
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ 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.21] - 2026-04-01
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Product tile visual refinements** — Inverted product tiles to dark navy theme (`#0F172A`) with light text, distinguishing individual parts from white service package cards. Hero image zone uses a white background so product image edges blend seamlessly. Price font increased to 28px bold for prominence. Brand fallback text enlarged to 22px for better readability when no product image is available.
|
|
13
|
+
- **Heart/wishlist button on product tiles** — Added a red heart (♡) icon button alongside the green "Add" button, allowing customers to save individual products to their wishlist, matching the service package tier card pattern.
|
|
14
|
+
- **Green gradient Add button** — Product tile CTA now uses a vibrant green gradient (`#22C55E → #16A34A`) with drop shadow for high visibility on the dark card background.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
8
18
|
## [v3.2.20] - 2026-03-30
|
|
9
19
|
|
|
10
20
|
### Fixed
|
|
@@ -7,13 +7,5 @@ interface ProductTileProps {
|
|
|
7
7
|
onProductClick?: (product: Product) => void;
|
|
8
8
|
onAddToCart?: (product: Product) => void;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
11
|
-
* ProductTile - Premium Glassmorphism Product Cards
|
|
12
|
-
*
|
|
13
|
-
* Image fallback chain:
|
|
14
|
-
* 1. product.image_url (product photo)
|
|
15
|
-
* 2. product.brandImageUrl (brand logo)
|
|
16
|
-
* 3. "No Image" placeholder
|
|
17
|
-
*/
|
|
18
10
|
export declare const ProductTile: React.FC<ProductTileProps>;
|
|
19
11
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { VariantCard } from '
|
|
2
|
+
import { VariantCard } from '../shelf';
|
|
3
3
|
import { Message, HighlightedProduct } from '../../types/message';
|
|
4
4
|
import { Product, ServicePackage } from '../../types';
|
|
5
5
|
import { Vehicle } from '../../types/vehicle';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { VariantCard } from '
|
|
2
|
+
import { VariantCard } from '../shelf';
|
|
3
3
|
import { Message, HighlightedProduct } from '../../types/message';
|
|
4
4
|
import { Product, ServicePackage } from '../../types';
|
|
5
5
|
import { Vehicle } from '../../types/vehicle';
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BobPosition } from './MobileBobCharacter';
|
|
3
|
+
import { VariantCard } from '../shelf';
|
|
3
4
|
import { Product, ServicePackage } from '../../types';
|
|
4
5
|
import { HighlightedProduct } from '../../types/message';
|
|
5
6
|
import { Vehicle } from '../../types/vehicle';
|
|
6
7
|
|
|
7
|
-
export
|
|
8
|
-
vehicle_id: number;
|
|
9
|
-
optionNumber: number;
|
|
10
|
-
displayTitle: string;
|
|
11
|
-
displaySubtitle: string;
|
|
12
|
-
characterization: string;
|
|
13
|
-
kw?: number | null;
|
|
14
|
-
cc?: number | null;
|
|
15
|
-
ccDisplay?: string | null;
|
|
16
|
-
fuelType?: string | null;
|
|
17
|
-
engineCode?: string | null;
|
|
18
|
-
make: string;
|
|
19
|
-
model: string;
|
|
20
|
-
}
|
|
8
|
+
export type { VariantCard };
|
|
21
9
|
interface MobileBobLayoutCoreProps {
|
|
22
10
|
currentImage: string;
|
|
23
11
|
animationState: string;
|
|
@@ -54,4 +42,3 @@ interface MobileBobLayoutCoreProps {
|
|
|
54
42
|
* - hidden: User swiped, full product view
|
|
55
43
|
*/
|
|
56
44
|
export declare const MobileBobLayoutCore: React.FC<MobileBobLayoutCoreProps>;
|
|
57
|
-
export {};
|
|
@@ -1,41 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
vehicle_id: number;
|
|
7
|
-
optionNumber: number;
|
|
8
|
-
displayTitle: string;
|
|
9
|
-
displaySubtitle: string;
|
|
10
|
-
characterization: string;
|
|
11
|
-
kw?: number | null;
|
|
12
|
-
cc?: number | null;
|
|
13
|
-
ccDisplay?: string | null;
|
|
14
|
-
fuelType?: string | null;
|
|
15
|
-
engineCode?: string | null;
|
|
16
|
-
make: string;
|
|
17
|
-
model: string;
|
|
18
|
-
}
|
|
19
|
-
interface MobileProductColumnProps {
|
|
20
|
-
products: Product[];
|
|
21
|
-
servicePackages: ServicePackage[];
|
|
22
|
-
highlightedPartType?: string | null;
|
|
23
|
-
highlightedProduct?: HighlightedProduct | null;
|
|
24
|
-
scrollToCategory?: string | null;
|
|
25
|
-
onScrollToCategoryComplete?: () => void;
|
|
26
|
-
onProductClick?: (product: Product) => void;
|
|
27
|
-
onPackageSelect?: (pkg: ServicePackage) => void;
|
|
28
|
-
isResearching?: boolean;
|
|
29
|
-
visible?: boolean;
|
|
30
|
-
counterHeightPercent?: number;
|
|
31
|
-
hasVehicle?: boolean;
|
|
32
|
-
onAddToCart?: (product: Product | Product[]) => void;
|
|
33
|
-
/** Vehicle make and model for header display */
|
|
34
|
-
vehicleMakeModel?: string;
|
|
35
|
-
pendingVariants?: VariantCard[];
|
|
36
|
-
pendingVariantMake?: string;
|
|
37
|
-
pendingVariantModel?: string;
|
|
38
|
-
onVariantSelect?: (variant: VariantCard) => void;
|
|
39
|
-
}
|
|
40
|
-
export declare const MobileProductColumn: React.FC<MobileProductColumnProps>;
|
|
41
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Legacy re-export — MobileProductColumn is now ShelfColumn.
|
|
3
|
+
* Kept for backward-compatible imports.
|
|
4
|
+
*/
|
|
5
|
+
export { ShelfColumn as MobileProductColumn } from '../shelf/ShelfColumn';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { MobileBobCharacter } from './MobileBobCharacter';
|
|
2
2
|
export { MobileBobLayoutCore } from './MobileBobLayoutCore';
|
|
3
3
|
export { MobileChatDrawer } from './MobileChatDrawer';
|
|
4
|
-
export { MobileProductColumn } from '
|
|
4
|
+
export { ShelfColumn as MobileProductColumn } from '../shelf';
|
|
5
|
+
export type { VariantCard } from '../shelf';
|
|
5
6
|
export { MobileBobLayout } from './MobileBobLayout';
|
|
6
7
|
export { ContainedMobileBobLayout } from './ContainedMobileBobLayout';
|
|
7
8
|
export { ContainedChatDrawer } from './ContainedChatDrawer';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ViewportSize } from '../../hooks/useViewportSize';
|
|
3
|
+
|
|
4
|
+
interface HorizontalRowProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
viewportSize: ViewportSize;
|
|
7
|
+
/** Extra className for the scroll track */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Extra style for the scroll track */
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* HorizontalRow — The single scroll primitive for all horizontal rows.
|
|
14
|
+
*
|
|
15
|
+
* Mobile/Tablet: snap-x mandatory, touch-action: pan-x, overscroll-behavior: contain, hidden scrollbar
|
|
16
|
+
* Desktop: no snap, orange arrow buttons, thin scrollbar, fade masks
|
|
17
|
+
*/
|
|
18
|
+
export declare const HorizontalRow: React.FC<HorizontalRowProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Product } from '../../types';
|
|
3
|
+
import { HighlightedProduct } from '../../types/message';
|
|
4
|
+
import { ViewportSize } from '../../hooks/useViewportSize';
|
|
5
|
+
|
|
6
|
+
interface PartslotSectionProps {
|
|
7
|
+
name: string;
|
|
8
|
+
products: Product[];
|
|
9
|
+
viewportSize: ViewportSize;
|
|
10
|
+
isHighlighted: boolean;
|
|
11
|
+
highlightedProduct?: HighlightedProduct | null;
|
|
12
|
+
onProductClick?: (product: Product) => void;
|
|
13
|
+
onAddToCart?: (product: Product) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const PartslotSection: React.FC<PartslotSectionProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ServicePackage, Product } from '../../types';
|
|
3
|
+
import { ViewportSize } from '../../hooks/useViewportSize';
|
|
4
|
+
|
|
5
|
+
interface ServicePackageCardProps {
|
|
6
|
+
pkg: ServicePackage;
|
|
7
|
+
viewportSize: ViewportSize;
|
|
8
|
+
onAddToCart?: (products: Product | Product[]) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ServicePackageCard: React.FC<ServicePackageCardProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Product, ServicePackage } from '../../types';
|
|
3
|
+
import { HighlightedProduct } from '../../types/message';
|
|
4
|
+
|
|
5
|
+
export interface VariantCard {
|
|
6
|
+
vehicle_id: number;
|
|
7
|
+
optionNumber: number;
|
|
8
|
+
displayTitle: string;
|
|
9
|
+
displaySubtitle: string;
|
|
10
|
+
characterization: string;
|
|
11
|
+
kw?: number | null;
|
|
12
|
+
cc?: number | null;
|
|
13
|
+
ccDisplay?: string | null;
|
|
14
|
+
fuelType?: string | null;
|
|
15
|
+
engineCode?: string | null;
|
|
16
|
+
make: string;
|
|
17
|
+
model: string;
|
|
18
|
+
}
|
|
19
|
+
interface ShelfColumnProps {
|
|
20
|
+
products: Product[];
|
|
21
|
+
servicePackages: ServicePackage[];
|
|
22
|
+
highlightedPartType?: string | null;
|
|
23
|
+
highlightedProduct?: HighlightedProduct | null;
|
|
24
|
+
scrollToCategory?: string | null;
|
|
25
|
+
onScrollToCategoryComplete?: () => void;
|
|
26
|
+
onProductClick?: (product: Product) => void;
|
|
27
|
+
onPackageSelect?: (pkg: ServicePackage) => void;
|
|
28
|
+
isResearching?: boolean;
|
|
29
|
+
visible?: boolean;
|
|
30
|
+
counterHeightPercent?: number;
|
|
31
|
+
hasVehicle?: boolean;
|
|
32
|
+
onAddToCart?: (product: Product | Product[]) => void;
|
|
33
|
+
vehicleMakeModel?: string;
|
|
34
|
+
pendingVariants?: VariantCard[];
|
|
35
|
+
pendingVariantMake?: string;
|
|
36
|
+
pendingVariantModel?: string;
|
|
37
|
+
onVariantSelect?: (variant: VariantCard) => void;
|
|
38
|
+
}
|
|
39
|
+
export declare const ShelfColumn: React.FC<ShelfColumnProps>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PreparedTier, Product } from '../../types';
|
|
3
|
+
import { ViewportSize } from '../../hooks/useViewportSize';
|
|
4
|
+
|
|
5
|
+
interface TierCardProps {
|
|
6
|
+
tier: PreparedTier;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
viewportSize: ViewportSize;
|
|
9
|
+
packageTitle: string;
|
|
10
|
+
packageId: string;
|
|
11
|
+
onSelect: () => void;
|
|
12
|
+
onAddToCart?: (products: Product[]) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const TierCard: React.FC<TierCardProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantCard } from './ShelfColumn';
|
|
3
|
+
|
|
4
|
+
interface VariantSelectorProps {
|
|
5
|
+
variants: VariantCard[];
|
|
6
|
+
make?: string;
|
|
7
|
+
model?: string;
|
|
8
|
+
onSelect: (variant: VariantCard) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const VariantSelector: React.FC<VariantSelectorProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { ShelfColumn } from './ShelfColumn';
|
|
2
|
+
export type { VariantCard } from './ShelfColumn';
|
|
3
|
+
export { HorizontalRow } from './HorizontalRow';
|
|
4
|
+
export { ShelfHeader } from './ShelfHeader';
|
|
5
|
+
export { ShelfLoading, ShelfEmpty } from './ShelfLoadingState';
|
|
6
|
+
export { VariantSelector } from './VariantSelector';
|
|
7
|
+
export { ServicePackageCard } from './ServicePackageCard';
|
|
8
|
+
export { TierCard } from './TierCard';
|
|
9
|
+
export { TierProductList } from './TierProductList';
|
|
10
|
+
export { PartslotSection } from './PartslotSection';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Vehicle } from '../types/vehicle';
|
|
2
|
-
import { VariantCard } from '../components/
|
|
2
|
+
import { VariantCard } from '../components/shelf';
|
|
3
3
|
import { Message, HighlightedProduct } from '../types/message';
|
|
4
4
|
|
|
5
5
|
export type AnimationState = string;
|
|
@@ -25,7 +25,7 @@ interface UseBobChatProps {
|
|
|
25
25
|
/** When backend requires user to pick a vehicle variant, provide UI-ready cards for the shelf */
|
|
26
26
|
onVariantSelectionRequired?: (variants: VariantCard[], make: string, model: string) => void;
|
|
27
27
|
/** Ref containing current shelf category names for post-stream scroll matching */
|
|
28
|
-
shelfCategoriesRef?: React.RefObject<
|
|
28
|
+
shelfCategoriesRef?: React.RefObject<Map<string, 'package' | 'partslot'>>;
|
|
29
29
|
/** Optional pre-identified vehicle — skips REGO lookup when no session exists */
|
|
30
30
|
initialVehicle?: {
|
|
31
31
|
vehicle_id: string | number;
|
|
@@ -53,5 +53,6 @@ export declare const useBobChat: ({ setAnimationState, manualMode, talkingState,
|
|
|
53
53
|
clearVehicle: () => void;
|
|
54
54
|
sendDirectMessage: (content: string) => void;
|
|
55
55
|
stopAllAudio: () => void;
|
|
56
|
+
refetchPartsForVehicle: () => Promise<void>;
|
|
56
57
|
};
|
|
57
58
|
export {};
|