@wix/web5-core 1.63.18 → 1.63.19

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.
@@ -181,24 +181,39 @@ export const UserQuery = _ref => {
181
181
  className: "w-6 h-6 flex items-center justify-center text-text-body hover:text-black transition-colors bg-transparent border-0 cursor-pointer disabled:opacity-30 disabled:cursor-default"
182
182
  }, /*#__PURE__*/React.createElement(RedoIcon, null)))), /*#__PURE__*/React.createElement("div", {
183
183
  className: "flex items-center gap-[10px] ml-[10px] sm:ml-0 shrink-0"
184
- }, /*#__PURE__*/React.createElement("div", {
185
- className: "relative"
184
+ }, /*#__PURE__*/React.createElement("span", {
185
+ className: "web5-prompt-hint",
186
+ "aria-hidden": "true"
187
+ }, "Press ", /*#__PURE__*/React.createElement("kbd", {
188
+ className: "web5-prompt-hint__key"
189
+ }, "/"), " to search"), /*#__PURE__*/React.createElement("div", {
190
+ className: "web5-user-query__action group relative"
186
191
  }, /*#__PURE__*/React.createElement("button", {
187
192
  type: "button",
193
+ "aria-label": "Share this",
188
194
  onClick: handleShare,
189
195
  disabled: isLoading || isCopied,
190
196
  className: `web5-user-query__share flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 border-0 cursor-pointer transition-colors disabled:cursor-default
191
197
  ${isCopied ? 'is-copied bg-[#2b2b2b] text-white' : 'text-text-body bg-white hover:bg-gray-50'}`
192
198
  }, isCopied ? /*#__PURE__*/React.createElement(CheckIcon, null) : /*#__PURE__*/React.createElement(ShareIcon, null), /*#__PURE__*/React.createElement("span", {
193
199
  className: "hidden sm:inline"
194
- }, isLoading ? 'Sharing…' : isCopied ? copiedLabel : 'Share')), isCopied && /*#__PURE__*/React.createElement("div", {
200
+ }, isLoading ? 'Sharing…' : isCopied ? copiedLabel : 'Share')), !isCopied && /*#__PURE__*/React.createElement("span", {
201
+ className: "web5-user-query__tooltip",
202
+ role: "tooltip"
203
+ }, "Share this"), isCopied && /*#__PURE__*/React.createElement("div", {
195
204
  className: "web5-user-query__copied-toast sm:hidden absolute top-full right-0 mt-1 flex items-center gap-2 bg-[#2b2b2b] text-white text-[12px] leading-none px-3 py-2 rounded-[8px] whitespace-nowrap"
196
- }, /*#__PURE__*/React.createElement(CheckIcon, null), copiedLabel)), onNewConversation && /*#__PURE__*/React.createElement("button", {
205
+ }, /*#__PURE__*/React.createElement(CheckIcon, null), copiedLabel)), onNewConversation && /*#__PURE__*/React.createElement("div", {
206
+ className: "web5-user-query__action group relative"
207
+ }, /*#__PURE__*/React.createElement("button", {
197
208
  type: "button",
209
+ "aria-label": newConversationLabel,
198
210
  onClick: handleNewConversation,
199
211
  className: "web5-user-query__new-conversation flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 text-text-body bg-white border-0 cursor-pointer hover:bg-gray-50 transition-colors"
200
212
  }, /*#__PURE__*/React.createElement(PlusIcon, null), /*#__PURE__*/React.createElement("span", {
201
213
  className: "hidden sm:inline"
214
+ }, newConversationLabel)), /*#__PURE__*/React.createElement("span", {
215
+ className: "web5-user-query__tooltip",
216
+ role: "tooltip"
202
217
  }, newConversationLabel)), onToggleCommentMode && /*#__PURE__*/React.createElement("button", {
203
218
  type: "button",
204
219
  onClick: onToggleCommentMode,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useEffect","useMemo","useState","ShareIcon","CheckIcon","PlusIcon","UndoIcon","RedoIcon","CommentIcon","getForwardStack","pushToForwardStack","popFromForwardStack","clearForwardStack","DEFAULT_LOADING_MESSAGES","headerClassName","UserQuery","_ref","query","onNewConversation","onNavigateToTriggerId","predecessorTriggerId","currentTriggerId","onShare","onToggleCommentMode","commentMode","commentCount","loading","newConversationLabel","copiedLabel","copiedDurationMs","productBackContext","onBackToProduct","forwardStack","canGoForward","length","canGoBack","hasNavigation","handleBack","handleForward","nextTid","handleNewConversation","shareState","setShareState","productImageError","setProductImageError","imageUrl","handleShare","urlToCopy","window","location","href","err","console","warn","navigator","clipboard","writeText","catch","setTimeout","cyclingMessages","messages","cycledMessage","setCycledMessage","progressMessage","index","interval","setInterval","clearInterval","isCopied","isLoading","productBadge","title","backUrl","label","canNavigateBack","content","createElement","Fragment","className","src","alt","onError","type","onClick","progressText","role","pendingQuery","disabled"],"sources":["../../../../src/components/ui/UserQuery.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useMemo, useState } from 'react';\nimport { ShareIcon } from './icons/ShareIcon';\nimport { CheckIcon } from './icons/CheckIcon';\nimport { PlusIcon } from './icons/PlusIcon';\nimport { UndoIcon } from './icons/UndoIcon';\nimport { RedoIcon } from './icons/RedoIcon';\nimport { CommentIcon } from './icons/CommentIcon';\nimport {\n getForwardStack,\n pushToForwardStack,\n popFromForwardStack,\n clearForwardStack,\n} from '../../utils/navigationStack';\n\ntype ShareState = 'idle' | 'loading' | 'copied';\n\nconst DEFAULT_LOADING_MESSAGES = [\n 'Thinking…',\n 'Recognizing intent…',\n 'Connecting the dots…',\n 'Synthesizing insights…',\n 'Formulating a response…',\n];\n\nconst headerClassName =\n 'web5-user-query sticky top-0 z-10 flex items-center justify-between bg-white/60 backdrop-blur-sm pl-5 pr-[10px] py-[7px] sm:px-[30px] sm:py-[17px]';\n\nexport interface UserQueryLoadingState {\n pendingQuery: string;\n /** Static progress message. If omitted, falls back to cycling through `messages`. */\n progressMessage?: string;\n /** Messages cycled while loading when `progressMessage` is not set. */\n messages?: string[];\n}\n\n/**\n * Product the visitor was redirected from (DL #114). Rendered as a back badge\n * above the query: back arrow + thumbnail + product name. All fields are\n * resolved and validated app-side (allowed-domain `backUrl`, `https:`\n * `imageUrl`) before reaching this presentational component.\n */\nexport interface ProductBackContext {\n /** Product display name. Required — without it the badge does not render. */\n title: string;\n /** Validated product thumbnail URL. Omitted/failed to load → arrow + title only. */\n imageUrl?: string;\n /** Validated product-page URL to return to. Omitted → badge is non-clickable. */\n backUrl?: string;\n /** Accessible label override. Defaults to `Back to ${title}`. */\n label?: string;\n}\n\nexport interface UserQueryProps {\n query: string;\n onNewConversation?: () => void;\n onNavigateToTriggerId?: (triggerId: string) => void;\n predecessorTriggerId?: string;\n currentTriggerId?: string;\n onShare?: (triggerId: string) => Promise<string>;\n /** Optional comment-mode toggle. When provided, render the chat-bubble\n * toggle button next to Share. The button reflects `commentMode` via\n * `is-on` styling and `aria-pressed`. */\n onToggleCommentMode?: () => void;\n commentMode?: boolean;\n /** Total number of comments on this response — shown as a badge next to the\n * toggle when > 0. */\n commentCount?: number;\n loading?: UserQueryLoadingState;\n /** Label for the \"new conversation\" action. Defaults to \"New conversation\". */\n newConversationLabel?: string;\n /** Label shown after the share link is copied. Defaults to \"Link Copied\". */\n copiedLabel?: string;\n /** How long the copied state stays visible, in ms. Defaults to 2000. */\n copiedDurationMs?: number;\n /** When set (visitor arrived from a product page), render a back-to-product\n * badge above the query (DL #114). */\n productBackContext?: ProductBackContext;\n /** Invoked with the validated `backUrl` when the badge is activated. */\n onBackToProduct?: (backUrl: string) => void;\n}\n\nexport const UserQuery: FC<UserQueryProps> = ({\n query,\n onNewConversation,\n onNavigateToTriggerId,\n predecessorTriggerId,\n currentTriggerId,\n onShare,\n onToggleCommentMode,\n commentMode = false,\n commentCount = 0,\n loading,\n newConversationLabel = 'New conversation',\n copiedLabel = 'Link Copied',\n copiedDurationMs = 2000,\n productBackContext,\n onBackToProduct,\n}) => {\n const forwardStack = useMemo(() => getForwardStack(), [currentTriggerId]);\n const canGoForward = forwardStack.length > 0;\n const canGoBack = !!predecessorTriggerId;\n const hasNavigation = canGoBack || canGoForward;\n\n const handleBack = useCallback(() => {\n if (!predecessorTriggerId || !currentTriggerId || !onNavigateToTriggerId) {\n return;\n }\n pushToForwardStack(currentTriggerId);\n onNavigateToTriggerId(predecessorTriggerId);\n }, [predecessorTriggerId, currentTriggerId, onNavigateToTriggerId]);\n\n const handleForward = useCallback(() => {\n if (!onNavigateToTriggerId) {\n return;\n }\n const nextTid = popFromForwardStack();\n if (!nextTid) {\n return;\n }\n onNavigateToTriggerId(nextTid);\n }, [onNavigateToTriggerId]);\n\n const handleNewConversation = useCallback(() => {\n clearForwardStack();\n onNewConversation?.();\n }, [onNewConversation]);\n\n const [shareState, setShareState] = useState<ShareState>('idle');\n\n const [productImageError, setProductImageError] = useState(false);\n useEffect(() => {\n setProductImageError(false);\n }, [productBackContext?.imageUrl]);\n\n const handleShare = useCallback(async () => {\n if (shareState !== 'idle') {\n return;\n }\n setShareState('loading');\n let urlToCopy = window.location.href;\n try {\n if (onShare && currentTriggerId) {\n urlToCopy = await onShare(currentTriggerId);\n }\n } catch (err) {\n console.warn('[share] failed, falling back to current URL:', err);\n }\n navigator.clipboard\n .writeText(urlToCopy)\n .catch((err) => console.warn('[share] clipboard write failed:', err));\n setShareState('copied');\n setTimeout(() => setShareState('idle'), copiedDurationMs);\n }, [shareState, onShare, currentTriggerId, copiedDurationMs]);\n\n const cyclingMessages = useMemo(\n () =>\n loading?.messages && loading.messages.length > 0\n ? loading.messages\n : DEFAULT_LOADING_MESSAGES,\n [loading?.messages],\n );\n const [cycledMessage, setCycledMessage] = useState(cyclingMessages[0]);\n\n useEffect(() => {\n if (!loading || loading.progressMessage) {\n return;\n }\n setCycledMessage(cyclingMessages[0]);\n if (cyclingMessages.length <= 1) {\n return;\n }\n let index = 0;\n const interval = setInterval(() => {\n index = (index + 1) % cyclingMessages.length;\n setCycledMessage(cyclingMessages[index]);\n }, 4000);\n return () => clearInterval(interval);\n }, [loading, cyclingMessages]);\n\n if (!query && !loading) {\n return null;\n }\n\n const isCopied = shareState === 'copied';\n const isLoading = shareState === 'loading';\n\n const productBadge = productBackContext\n ? (() => {\n const { title, imageUrl, backUrl, label } = productBackContext;\n const canNavigateBack = !!backUrl && !!onBackToProduct;\n const content = (\n <>\n <UndoIcon className=\"web5-user-query__product-back-icon\" />\n {imageUrl && !productImageError && (\n <span className=\"web5-user-query__product-back-thumb\">\n <img\n src={imageUrl}\n alt=\"\"\n onError={() => setProductImageError(true)}\n />\n </span>\n )}\n <span className=\"web5-user-query__product-back-title\">{title}</span>\n </>\n );\n return canNavigateBack ? (\n <button\n type=\"button\"\n onClick={() => onBackToProduct?.(backUrl!)}\n aria-label={label ?? `Back to ${title}`}\n className=\"web5-user-query__product-back\"\n >\n {content}\n </button>\n ) : (\n <div className=\"web5-user-query__product-back web5-user-query__product-back--static\">\n {content}\n </div>\n );\n })()\n : null;\n\n if (loading) {\n const progressText = loading.progressMessage ?? cycledMessage;\n return (\n <div\n className={headerClassName}\n role=\"status\"\n aria-busy=\"true\"\n aria-live=\"polite\"\n >\n <div className=\"web5-user-query__left flex-1\">\n {productBadge}\n <p\n className=\"text-[14px] leading-5 text-text-body truncate min-w-0 max-w-[700px]\"\n title={`Asking: ${loading.pendingQuery}`}\n >\n <span className=\"text-text-body/70\">Asking: </span>\n {loading.pendingQuery}\n </p>\n </div>\n {progressText && (\n <div className=\"hidden sm:flex items-center gap-2 ml-[10px] shrink-0 min-w-0\">\n <div\n className=\"w-4 h-4 shrink-0 animate-spin inline-block border-[2px] border-current border-t-transparent text-blue-600 dark:text-blue-500 rounded-full\"\n aria-hidden=\"true\"\n />\n <p className=\"text-[13px] leading-5 text-text-body/70 truncate max-w-[240px]\">\n {progressText}\n </p>\n </div>\n )}\n </div>\n );\n }\n\n return (\n <div className={headerClassName}>\n <div className=\"flex items-center gap-[30px] flex-1 min-w-0\">\n <div className=\"web5-user-query__left\">\n {productBadge}\n <p\n className=\"web5-user-query__title text-[14px] leading-5 text-text-body truncate min-w-0 max-w-[700px]\"\n title={query}\n >\n {query}\n </p>\n </div>\n {hasNavigation && (\n <div className=\"flex items-center gap-[9px]\">\n <button\n type=\"button\"\n onClick={handleBack}\n disabled={!canGoBack}\n title=\"Go to previous conversation\"\n aria-label=\"Go to previous conversation\"\n className=\"w-6 h-6 flex items-center justify-center text-text-body hover:text-black transition-colors bg-transparent border-0 cursor-pointer disabled:opacity-30 disabled:cursor-default\"\n >\n <UndoIcon />\n </button>\n <button\n type=\"button\"\n onClick={handleForward}\n disabled={!canGoForward}\n title=\"Go to next conversation\"\n aria-label=\"Go to next conversation\"\n className=\"w-6 h-6 flex items-center justify-center text-text-body hover:text-black transition-colors bg-transparent border-0 cursor-pointer disabled:opacity-30 disabled:cursor-default\"\n >\n <RedoIcon />\n </button>\n </div>\n )}\n </div>\n <div className=\"flex items-center gap-[10px] ml-[10px] sm:ml-0 shrink-0\">\n {/* Share button — wraps button + mobile tooltip in a relative container */}\n <div className=\"relative\">\n <button\n type=\"button\"\n onClick={handleShare}\n disabled={isLoading || isCopied}\n className={`web5-user-query__share flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 border-0 cursor-pointer transition-colors disabled:cursor-default\n ${\n isCopied\n ? 'is-copied bg-[#2b2b2b] text-white'\n : 'text-text-body bg-white hover:bg-gray-50'\n }`}\n >\n {isCopied ? <CheckIcon /> : <ShareIcon />}\n <span className=\"hidden sm:inline\">\n {isLoading ? 'Sharing…' : isCopied ? copiedLabel : 'Share'}\n </span>\n </button>\n {/* Mobile-only tooltip: drops below the button when link is copied */}\n {isCopied && (\n <div className=\"web5-user-query__copied-toast sm:hidden absolute top-full right-0 mt-1 flex items-center gap-2 bg-[#2b2b2b] text-white text-[12px] leading-none px-3 py-2 rounded-[8px] whitespace-nowrap\">\n <CheckIcon />\n {copiedLabel}\n </div>\n )}\n </div>\n {onNewConversation && (\n <button\n type=\"button\"\n onClick={handleNewConversation}\n className=\"web5-user-query__new-conversation flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 text-text-body bg-white border-0 cursor-pointer hover:bg-gray-50 transition-colors\"\n >\n <PlusIcon />\n <span className=\"hidden sm:inline\">{newConversationLabel}</span>\n </button>\n )}\n {onToggleCommentMode && (\n <button\n type=\"button\"\n onClick={onToggleCommentMode}\n aria-pressed={commentMode}\n title=\"Add a comment\"\n aria-label=\"Add a comment\"\n className={`relative flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 border-0 cursor-pointer transition-colors ${\n commentMode\n ? 'bg-[#2b2b2b] text-white'\n : 'text-text-body bg-white hover:bg-gray-50'\n }`}\n >\n <CommentIcon />\n {commentCount > 0 && (\n <span\n className={`absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] leading-[18px] text-center font-semibold ${\n commentMode ? 'bg-white text-[#2b2b2b]' : 'bg-[#2b2b2b] text-white'\n }`}\n >\n {commentCount}\n </span>\n )}\n </button>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAQC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC5E,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,WAAW,QAAQ,qBAAqB;AACjD,SACEC,eAAe,EACfC,kBAAkB,EAClBC,mBAAmB,EACnBC,iBAAiB,QACZ,6BAA6B;AAIpC,MAAMC,wBAAwB,GAAG,CAC/B,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,CAC1B;AAED,MAAMC,eAAe,GACnB,oJAAoJ;;AAUtJ;AACA;AACA;AACA;AACA;AACA;;AAyCA,OAAO,MAAMC,SAA6B,GAAGC,IAAA,IAgBvC;EAAA,IAhBwC;IAC5CC,KAAK;IACLC,iBAAiB;IACjBC,qBAAqB;IACrBC,oBAAoB;IACpBC,gBAAgB;IAChBC,OAAO;IACPC,mBAAmB;IACnBC,WAAW,GAAG,KAAK;IACnBC,YAAY,GAAG,CAAC;IAChBC,OAAO;IACPC,oBAAoB,GAAG,kBAAkB;IACzCC,WAAW,GAAG,aAAa;IAC3BC,g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AA,CAAA8E,aAAA,CAACxE,SAAS,MAAE,CAAC,gBAAGN,KAAA,CAAA8E,aAAA,CAACzE,SAAS,MAAE,CAAC,eACzCL,KAAA,CAAA8E,aAAA;IAAME,SAAS,EAAC;EAAkB,GAC/BT,SAAS,GAAG,UAAU,GAAGD,QAAQ,GAAGxC,WAAW,GAAG,OAC/C,CACA,CAAC,EAERwC,QAAQ,iBACPtE,KAAA,CAAA8E,aAAA;IAAKE,SAAS,EAAC;EAA2L,gBACxMhF,KAAA,CAAA8E,aAAA,CAACxE,SAAS,MAAE,CAAC,EACZwB,WACE,CAEJ,CAAC,EACLV,iBAAiB,iBAChBpB,KAAA,CAAA8E,aAAA;IACEM,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAE3C,qBAAsB;IAC/BsC,SAAS,EAAC;EAAoN,gBAE9NhF,KAAA,CAAA8E,aAAA,CAACvE,QAAQ,MAAE,CAAC,eACZP,KAAA,CAAA8E,aAAA;IAAME,SAAS,EAAC;EAAkB,GAAEnD,oBAA2B,CACzD,CACT,EACAJ,mBAAmB,iBAClBzB,KAAA,CAAA8E,aAAA;IACEM,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAE5D,mBAAoB;IAC7B,gBAAcC,WAAY;IAC1B+C,KAAK,EAAC,eAAe;IACrB,cAAW,eAAe;IAC1BO,SAAS,EAAE,oJACTtD,WAAW,GACP,yBAAyB,GACzB,0CAA0C;EAC7C,gBAEH1B,KAAA,CAAA8E,aAAA,CAACpE,WAAW,MAAE,CAAC,EACdiB,YAAY,GAAG,CAAC,iBACf3B,KAAA,CAAA8E,aAAA;IACEE,SAAS,EAAE,yHACTtD,WAAW,GAAG,yBAAyB,GAAG,yBAAyB;EAClE,GAEFC,YACG,CAEF,CAEP,CACF,CAAC;AAEV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useEffect","useMemo","useState","ShareIcon","CheckIcon","PlusIcon","UndoIcon","RedoIcon","CommentIcon","getForwardStack","pushToForwardStack","popFromForwardStack","clearForwardStack","DEFAULT_LOADING_MESSAGES","headerClassName","UserQuery","_ref","query","onNewConversation","onNavigateToTriggerId","predecessorTriggerId","currentTriggerId","onShare","onToggleCommentMode","commentMode","commentCount","loading","newConversationLabel","copiedLabel","copiedDurationMs","productBackContext","onBackToProduct","forwardStack","canGoForward","length","canGoBack","hasNavigation","handleBack","handleForward","nextTid","handleNewConversation","shareState","setShareState","productImageError","setProductImageError","imageUrl","handleShare","urlToCopy","window","location","href","err","console","warn","navigator","clipboard","writeText","catch","setTimeout","cyclingMessages","messages","cycledMessage","setCycledMessage","progressMessage","index","interval","setInterval","clearInterval","isCopied","isLoading","productBadge","title","backUrl","label","canNavigateBack","content","createElement","Fragment","className","src","alt","onError","type","onClick","progressText","role","pendingQuery","disabled"],"sources":["../../../../src/components/ui/UserQuery.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useMemo, useState } from 'react';\nimport { ShareIcon } from './icons/ShareIcon';\nimport { CheckIcon } from './icons/CheckIcon';\nimport { PlusIcon } from './icons/PlusIcon';\nimport { UndoIcon } from './icons/UndoIcon';\nimport { RedoIcon } from './icons/RedoIcon';\nimport { CommentIcon } from './icons/CommentIcon';\nimport {\n getForwardStack,\n pushToForwardStack,\n popFromForwardStack,\n clearForwardStack,\n} from '../../utils/navigationStack';\n\ntype ShareState = 'idle' | 'loading' | 'copied';\n\nconst DEFAULT_LOADING_MESSAGES = [\n 'Thinking…',\n 'Recognizing intent…',\n 'Connecting the dots…',\n 'Synthesizing insights…',\n 'Formulating a response…',\n];\n\nconst headerClassName =\n 'web5-user-query sticky top-0 z-10 flex items-center justify-between bg-white/60 backdrop-blur-sm pl-5 pr-[10px] py-[7px] sm:px-[30px] sm:py-[17px]';\n\nexport interface UserQueryLoadingState {\n pendingQuery: string;\n /** Static progress message. If omitted, falls back to cycling through `messages`. */\n progressMessage?: string;\n /** Messages cycled while loading when `progressMessage` is not set. */\n messages?: string[];\n}\n\n/**\n * Product the visitor was redirected from (DL #114). Rendered as a back badge\n * above the query: back arrow + thumbnail + product name. All fields are\n * resolved and validated app-side (allowed-domain `backUrl`, `https:`\n * `imageUrl`) before reaching this presentational component.\n */\nexport interface ProductBackContext {\n /** Product display name. Required — without it the badge does not render. */\n title: string;\n /** Validated product thumbnail URL. Omitted/failed to load → arrow + title only. */\n imageUrl?: string;\n /** Validated product-page URL to return to. Omitted → badge is non-clickable. */\n backUrl?: string;\n /** Accessible label override. Defaults to `Back to ${title}`. */\n label?: string;\n}\n\nexport interface UserQueryProps {\n query: string;\n onNewConversation?: () => void;\n onNavigateToTriggerId?: (triggerId: string) => void;\n predecessorTriggerId?: string;\n currentTriggerId?: string;\n onShare?: (triggerId: string) => Promise<string>;\n /** Optional comment-mode toggle. When provided, render the chat-bubble\n * toggle button next to Share. The button reflects `commentMode` via\n * `is-on` styling and `aria-pressed`. */\n onToggleCommentMode?: () => void;\n commentMode?: boolean;\n /** Total number of comments on this response — shown as a badge next to the\n * toggle when > 0. */\n commentCount?: number;\n loading?: UserQueryLoadingState;\n /** Label for the \"new conversation\" action. Defaults to \"New conversation\". */\n newConversationLabel?: string;\n /** Label shown after the share link is copied. Defaults to \"Link Copied\". */\n copiedLabel?: string;\n /** How long the copied state stays visible, in ms. Defaults to 2000. */\n copiedDurationMs?: number;\n /** When set (visitor arrived from a product page), render a back-to-product\n * badge above the query (DL #114). */\n productBackContext?: ProductBackContext;\n /** Invoked with the validated `backUrl` when the badge is activated. */\n onBackToProduct?: (backUrl: string) => void;\n}\n\nexport const UserQuery: FC<UserQueryProps> = ({\n query,\n onNewConversation,\n onNavigateToTriggerId,\n predecessorTriggerId,\n currentTriggerId,\n onShare,\n onToggleCommentMode,\n commentMode = false,\n commentCount = 0,\n loading,\n newConversationLabel = 'New conversation',\n copiedLabel = 'Link Copied',\n copiedDurationMs = 2000,\n productBackContext,\n onBackToProduct,\n}) => {\n const forwardStack = useMemo(() => getForwardStack(), [currentTriggerId]);\n const canGoForward = forwardStack.length > 0;\n const canGoBack = !!predecessorTriggerId;\n const hasNavigation = canGoBack || canGoForward;\n\n const handleBack = useCallback(() => {\n if (!predecessorTriggerId || !currentTriggerId || !onNavigateToTriggerId) {\n return;\n }\n pushToForwardStack(currentTriggerId);\n onNavigateToTriggerId(predecessorTriggerId);\n }, [predecessorTriggerId, currentTriggerId, onNavigateToTriggerId]);\n\n const handleForward = useCallback(() => {\n if (!onNavigateToTriggerId) {\n return;\n }\n const nextTid = popFromForwardStack();\n if (!nextTid) {\n return;\n }\n onNavigateToTriggerId(nextTid);\n }, [onNavigateToTriggerId]);\n\n const handleNewConversation = useCallback(() => {\n clearForwardStack();\n onNewConversation?.();\n }, [onNewConversation]);\n\n const [shareState, setShareState] = useState<ShareState>('idle');\n\n const [productImageError, setProductImageError] = useState(false);\n useEffect(() => {\n setProductImageError(false);\n }, [productBackContext?.imageUrl]);\n\n const handleShare = useCallback(async () => {\n if (shareState !== 'idle') {\n return;\n }\n setShareState('loading');\n let urlToCopy = window.location.href;\n try {\n if (onShare && currentTriggerId) {\n urlToCopy = await onShare(currentTriggerId);\n }\n } catch (err) {\n console.warn('[share] failed, falling back to current URL:', err);\n }\n navigator.clipboard\n .writeText(urlToCopy)\n .catch((err) => console.warn('[share] clipboard write failed:', err));\n setShareState('copied');\n setTimeout(() => setShareState('idle'), copiedDurationMs);\n }, [shareState, onShare, currentTriggerId, copiedDurationMs]);\n\n const cyclingMessages = useMemo(\n () =>\n loading?.messages && loading.messages.length > 0\n ? loading.messages\n : DEFAULT_LOADING_MESSAGES,\n [loading?.messages],\n );\n const [cycledMessage, setCycledMessage] = useState(cyclingMessages[0]);\n\n useEffect(() => {\n if (!loading || loading.progressMessage) {\n return;\n }\n setCycledMessage(cyclingMessages[0]);\n if (cyclingMessages.length <= 1) {\n return;\n }\n let index = 0;\n const interval = setInterval(() => {\n index = (index + 1) % cyclingMessages.length;\n setCycledMessage(cyclingMessages[index]);\n }, 4000);\n return () => clearInterval(interval);\n }, [loading, cyclingMessages]);\n\n if (!query && !loading) {\n return null;\n }\n\n const isCopied = shareState === 'copied';\n const isLoading = shareState === 'loading';\n\n const productBadge = productBackContext\n ? (() => {\n const { title, imageUrl, backUrl, label } = productBackContext;\n const canNavigateBack = !!backUrl && !!onBackToProduct;\n const content = (\n <>\n <UndoIcon className=\"web5-user-query__product-back-icon\" />\n {imageUrl && !productImageError && (\n <span className=\"web5-user-query__product-back-thumb\">\n <img\n src={imageUrl}\n alt=\"\"\n onError={() => setProductImageError(true)}\n />\n </span>\n )}\n <span className=\"web5-user-query__product-back-title\">{title}</span>\n </>\n );\n return canNavigateBack ? (\n <button\n type=\"button\"\n onClick={() => onBackToProduct?.(backUrl!)}\n aria-label={label ?? `Back to ${title}`}\n className=\"web5-user-query__product-back\"\n >\n {content}\n </button>\n ) : (\n <div className=\"web5-user-query__product-back web5-user-query__product-back--static\">\n {content}\n </div>\n );\n })()\n : null;\n\n if (loading) {\n const progressText = loading.progressMessage ?? cycledMessage;\n return (\n <div\n className={headerClassName}\n role=\"status\"\n aria-busy=\"true\"\n aria-live=\"polite\"\n >\n <div className=\"web5-user-query__left flex-1\">\n {productBadge}\n <p\n className=\"text-[14px] leading-5 text-text-body truncate min-w-0 max-w-[700px]\"\n title={`Asking: ${loading.pendingQuery}`}\n >\n <span className=\"text-text-body/70\">Asking: </span>\n {loading.pendingQuery}\n </p>\n </div>\n {progressText && (\n <div className=\"hidden sm:flex items-center gap-2 ml-[10px] shrink-0 min-w-0\">\n <div\n className=\"w-4 h-4 shrink-0 animate-spin inline-block border-[2px] border-current border-t-transparent text-blue-600 dark:text-blue-500 rounded-full\"\n aria-hidden=\"true\"\n />\n <p className=\"text-[13px] leading-5 text-text-body/70 truncate max-w-[240px]\">\n {progressText}\n </p>\n </div>\n )}\n </div>\n );\n }\n\n return (\n <div className={headerClassName}>\n <div className=\"flex items-center gap-[30px] flex-1 min-w-0\">\n <div className=\"web5-user-query__left\">\n {productBadge}\n <p\n className=\"web5-user-query__title text-[14px] leading-5 text-text-body truncate min-w-0 max-w-[700px]\"\n title={query}\n >\n {query}\n </p>\n </div>\n {hasNavigation && (\n <div className=\"flex items-center gap-[9px]\">\n <button\n type=\"button\"\n onClick={handleBack}\n disabled={!canGoBack}\n title=\"Go to previous conversation\"\n aria-label=\"Go to previous conversation\"\n className=\"w-6 h-6 flex items-center justify-center text-text-body hover:text-black transition-colors bg-transparent border-0 cursor-pointer disabled:opacity-30 disabled:cursor-default\"\n >\n <UndoIcon />\n </button>\n <button\n type=\"button\"\n onClick={handleForward}\n disabled={!canGoForward}\n title=\"Go to next conversation\"\n aria-label=\"Go to next conversation\"\n className=\"w-6 h-6 flex items-center justify-center text-text-body hover:text-black transition-colors bg-transparent border-0 cursor-pointer disabled:opacity-30 disabled:cursor-default\"\n >\n <RedoIcon />\n </button>\n </div>\n )}\n </div>\n <div className=\"flex items-center gap-[10px] ml-[10px] sm:ml-0 shrink-0\">\n {/*\n Keyboard hint. It used to sit inside the prompt field, which was the\n wrong home for it twice over: it competed with the placeholder for the\n same space, and it disappeared exactly when the reader engaged with\n the input — so the shortcut was only ever advertised to someone who\n was not using it. Here it sits with the other page-level affordances\n and stays legible while the reader types.\n\n `aria-hidden` because the shortcut is already announced on the input\n itself via `aria-keyshortcuts`; this is the visual reminder, and\n repeating it to assistive tech would just be noise.\n */}\n <span className=\"web5-prompt-hint\" aria-hidden=\"true\">\n Press <kbd className=\"web5-prompt-hint__key\">/</kbd> to search\n </span>\n {/* Share button — wraps button + tooltips in a relative container */}\n <div className=\"web5-user-query__action group relative\">\n <button\n type=\"button\"\n aria-label=\"Share this\"\n onClick={handleShare}\n disabled={isLoading || isCopied}\n className={`web5-user-query__share flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 border-0 cursor-pointer transition-colors disabled:cursor-default\n ${\n isCopied\n ? 'is-copied bg-[#2b2b2b] text-white'\n : 'text-text-body bg-white hover:bg-gray-50'\n }`}\n >\n {isCopied ? <CheckIcon /> : <ShareIcon />}\n <span className=\"hidden sm:inline\">\n {isLoading ? 'Sharing…' : isCopied ? copiedLabel : 'Share'}\n </span>\n </button>\n {/*\n Hover tooltip. Suppressed once the link is copied, because the\n copied state is its own message and two overlapping bubbles saying\n different things is worse than none.\n */}\n {!isCopied && (\n <span className=\"web5-user-query__tooltip\" role=\"tooltip\">\n Share this\n </span>\n )}\n {/* Mobile-only tooltip: drops below the button when link is copied */}\n {isCopied && (\n <div className=\"web5-user-query__copied-toast sm:hidden absolute top-full right-0 mt-1 flex items-center gap-2 bg-[#2b2b2b] text-white text-[12px] leading-none px-3 py-2 rounded-[8px] whitespace-nowrap\">\n <CheckIcon />\n {copiedLabel}\n </div>\n )}\n </div>\n {onNewConversation && (\n <div className=\"web5-user-query__action group relative\">\n <button\n type=\"button\"\n aria-label={newConversationLabel}\n onClick={handleNewConversation}\n className=\"web5-user-query__new-conversation flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 text-text-body bg-white border-0 cursor-pointer hover:bg-gray-50 transition-colors\"\n >\n <PlusIcon />\n <span className=\"hidden sm:inline\">{newConversationLabel}</span>\n </button>\n <span className=\"web5-user-query__tooltip\" role=\"tooltip\">\n {newConversationLabel}\n </span>\n </div>\n )}\n {onToggleCommentMode && (\n <button\n type=\"button\"\n onClick={onToggleCommentMode}\n aria-pressed={commentMode}\n title=\"Add a comment\"\n aria-label=\"Add a comment\"\n className={`relative flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 border-0 cursor-pointer transition-colors ${\n commentMode\n ? 'bg-[#2b2b2b] text-white'\n : 'text-text-body bg-white hover:bg-gray-50'\n }`}\n >\n <CommentIcon />\n {commentCount > 0 && (\n <span\n className={`absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] leading-[18px] text-center font-semibold ${\n commentMode ? 'bg-white text-[#2b2b2b]' : 'bg-[#2b2b2b] text-white'\n }`}\n >\n {commentCount}\n </span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gB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD;;8CAE0C;IAC1C,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;2BACuB;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,+EAA+E;IAC/E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;2CACuC;IACvC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,wEAAwE;IACxE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAqTxC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wix/web5-core",
3
3
  "license": "MIT",
4
- "version": "1.63.18",
4
+ "version": "1.63.19",
5
5
  "author": {
6
6
  "name": "tsachis",
7
7
  "email": "tsachis@wix.com"
@@ -100,5 +100,5 @@
100
100
  "wallaby": {
101
101
  "autoDetect": true
102
102
  },
103
- "falconPackageHash": "f8f308fde8424dad1460ce80f953015f5637c89178f2f507163b0a92"
103
+ "falconPackageHash": "282c54cdc047b85c4f2c57b5d3144fdeee9658b61cdfea16b12809b8"
104
104
  }
@@ -373,39 +373,6 @@
373
373
  transform: translateY(-50%);
374
374
  }
375
375
 
376
- .web5-prompt-hint {
377
- display: inline-flex;
378
- align-items: center;
379
- gap: 4px;
380
- margin-right: 4px;
381
- color: var(--pi-field-placeholder);
382
- font-family: var(--pi-field-font-family);
383
- font-size: 12px;
384
- line-height: 1;
385
- white-space: nowrap;
386
- pointer-events: none;
387
- user-select: none;
388
- }
389
-
390
- .web5-prompt-hint__key {
391
- display: inline-flex;
392
- align-items: center;
393
- justify-content: center;
394
- min-width: 16px;
395
- padding: 1px 4px;
396
- border: 1px solid var(--pi-field-placeholder);
397
- border-radius: 3px;
398
- background: transparent;
399
- font-family: inherit;
400
- font-size: 11px;
401
- line-height: 1;
402
- }
403
-
404
- @media (pointer: coarse) {
405
- .web5-prompt-hint {
406
- display: none;
407
- }
408
- }
409
376
 
410
377
  .web5-prompt-field--multiline .web5-prompt-actions {
411
378
  top: auto;
@@ -589,7 +556,4 @@
589
556
  height: 20px;
590
557
  }
591
558
 
592
- .web5-prompt-hint {
593
- display: none;
594
- }
595
559
  }
@@ -70,3 +70,109 @@
70
70
  .web5-user-query__product-back:hover .web5-user-query__product-back-title {
71
71
  text-decoration: underline;
72
72
  }
73
+
74
+ /*
75
+ * Keyboard hint — "Press / to search", beside the Share action.
76
+ *
77
+ * It lived inside the prompt field until it was moved here: there it competed
78
+ * with the placeholder for the same space and vanished the moment the reader
79
+ * focused the input, so the shortcut was only ever shown to someone not using
80
+ * it. Its colour still comes from the prompt-input token family, which keeps
81
+ * it in step with the input it describes and themeable by the same knob.
82
+ */
83
+ .web5-prompt-hint {
84
+ display: inline-flex;
85
+ align-items: center;
86
+ gap: 4px;
87
+ color: var(--pi-field-placeholder);
88
+ font-family: var(--pi-field-font-family);
89
+ font-size: 12px;
90
+ line-height: 1;
91
+ white-space: nowrap;
92
+ pointer-events: none;
93
+ user-select: none;
94
+ }
95
+
96
+ .web5-prompt-hint__key {
97
+ display: inline-flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ min-width: 16px;
101
+ padding: 1px 4px;
102
+ border: 1px solid var(--pi-field-placeholder);
103
+ border-radius: 3px;
104
+ background: transparent;
105
+ font-family: inherit;
106
+ font-size: 11px;
107
+ line-height: 1;
108
+ }
109
+
110
+ /* No physical keyboard, no shortcut worth advertising. */
111
+ @media (pointer: coarse) {
112
+ .web5-prompt-hint {
113
+ display: none;
114
+ }
115
+ }
116
+
117
+ /* Mobile: the header is tight and there is no keyboard anyway. */
118
+ @media (max-width: 768px) {
119
+ .web5-prompt-hint {
120
+ display: none;
121
+ }
122
+ }
123
+
124
+ /*
125
+ * Action tooltips — "Share this", "New conversation".
126
+ *
127
+ * Brand-coloured via the theme tokens rather than the header's own greys, so a
128
+ * client that rebrands gets tooltips that match. `--primary` is the brand
129
+ * accent every client already sets; the copied-state toast beside this
130
+ * deliberately keeps its own near-black, because that one is a status message
131
+ * rather than a label and should not read as an action.
132
+ *
133
+ * Hover and focus-visible both, so a keyboard user gets the same affordance —
134
+ * the buttons are icon-only below the `sm` breakpoint, where the label is the
135
+ * only thing naming them.
136
+ */
137
+ .web5-user-query__tooltip {
138
+ position: absolute;
139
+ top: calc(100% + 6px);
140
+ right: 0;
141
+ z-index: 20;
142
+ padding: 5px 10px;
143
+ border-radius: 6px;
144
+ background: hsl(var(--primary, 262 83% 58%));
145
+ color: hsl(var(--primary-foreground, 0 0% 100%));
146
+ font-size: 12px;
147
+ line-height: 1.4;
148
+ white-space: nowrap;
149
+ pointer-events: none;
150
+ opacity: 0;
151
+ transform: translateY(-2px);
152
+ transition:
153
+ opacity 120ms ease-out,
154
+ transform 120ms ease-out;
155
+ }
156
+
157
+ .web5-user-query__action:hover .web5-user-query__tooltip,
158
+ .web5-user-query__action:focus-within .web5-user-query__tooltip {
159
+ opacity: 1;
160
+ transform: translateY(0);
161
+ }
162
+
163
+ /*
164
+ * Touch has no hover, so a tooltip there is either permanently invisible or
165
+ * permanently in the way. The buttons carry `aria-label`, which is what
166
+ * actually names them for anyone who needs it.
167
+ */
168
+ @media (pointer: coarse) {
169
+ .web5-user-query__tooltip {
170
+ display: none;
171
+ }
172
+ }
173
+
174
+ @media (prefers-reduced-motion: reduce) {
175
+ .web5-user-query__tooltip {
176
+ transition: none;
177
+ }
178
+ }