widget-contracts
Variables
PRODUCT_PATH_PATTERN
const PRODUCT_PATH_PATTERN: RegExp;Extracts a product handle from a storefront URL path. Stops at /, ? and #.
RECENTLY_VIEWED_STORAGE_KEY
const RECENTLY_VIEWED_STORAGE_KEY: "joy-recently-viewed" = 'joy-recently-viewed';Storage key for the "recently viewed" carousel.
⚠️ THE VALUE MUST NEVER CHANGE — shoppers' persisted history is keyed on it and a change silently discards it.
SOCIAL_EARN_EVENT_NAMES
const SOCIAL_EARN_EVENT_NAMES: readonly ["follow_instagram", "comment_instagram", "story_mention_instagram", "like_facebook", "follow_tiktok", "share_facebook", "subscribe_youtube", "follow_twitter", "share_twitter", "follow_pinterest", "join_discord", "join_reddit", "join_telegram", "join_whatsapp", "join_line", "follow_social", "social_activity", "share", "interact_website", "custom"];The social-earn program event keys the widget claims on click. One
definition for both hosts: the Liquid widget core and the headless
@joy-loyalty/hydrogen host read the same list.