@brainfish-ai/components 0.28.8 → 0.28.10
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/dist/conversation.d.ts +0 -1
- package/dist/esm/chunks/{ChatSearch.Cs9XKATE.js → ChatSearch.DIrtg9k_.js} +2 -2
- package/dist/esm/chunks/{ChatSearch.Cs9XKATE.js.map → ChatSearch.DIrtg9k_.js.map} +1 -1
- package/dist/esm/chunks/Conversation.7_k59TJL.js +20 -0
- package/dist/esm/chunks/Conversation.7_k59TJL.js.map +1 -0
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/conversation.js +1 -1
- package/dist/esm/global.css +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/tailwind.preset.js +1 -1
- package/dist/esm/tailwind.preset.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/stats.html +1 -1
- package/package.json +2 -1
- package/tailwind.preset.ts +1 -0
- package/dist/esm/chunks/Conversation.DRNYzOpI.js +0 -22
- package/dist/esm/chunks/Conversation.DRNYzOpI.js.map +0 -1
package/dist/conversation.d.ts
CHANGED
|
@@ -82,7 +82,6 @@ export declare type ConversationCallbacks = {
|
|
|
82
82
|
onStop?: () => void;
|
|
83
83
|
onSuggestionClick?: (suggestion: Suggestion) => void;
|
|
84
84
|
onActionClick?: (action: ConversationAction, messageId: string) => void;
|
|
85
|
-
onFeedback?: (messageId: string, feedback: 'positive' | 'negative') => void;
|
|
86
85
|
onCitationClick?: (citation: Citation) => void;
|
|
87
86
|
onAttachmentAction?: (action: AttachmentAction) => void;
|
|
88
87
|
onContextPillRemove?: (pill: ContextPill) => void;
|
|
@@ -66,7 +66,7 @@ return e.createElement("div",{className:Z("w-full px-3 py-4 flex items-center ju
|
|
|
66
66
|
/* @__PURE__ */e.createElement(d.h2,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:Z("m-0 text-primary-foreground @3xl:text-foreground flex gap-1 items-center font-bold text-base",s?"":"@3xl:text-5xl")},(c||h)&&/* @__PURE__ */e.createElement(v,{size:"icon",variant:"ghost",onClick:c?i:n,"aria-label":"Go back",className:Z("shrink-0 text-primary-foreground",s?"":"@3xl:hidden"),disabled:y},
|
|
67
67
|
/* @__PURE__ */e.createElement(T,null)),
|
|
68
68
|
/* @__PURE__ */e.createElement("span",null,c?"History":t)),
|
|
69
|
-
/* @__PURE__ */e.createElement("div",{className:"@3xl:hidden shrink-0","data-name":"HeaderButtons"},!w&&/* @__PURE__ */e.createElement(v,{size:"icon",variant:"ghost",onClick:()=>{g(e=>!e),r()},"aria-label":f?"Collapse widget":"Expand widget",className:"text-primary-foreground"},f?/* @__PURE__ */e.createElement(R,null):/* @__PURE__ */e.createElement(j,null)),m&&/* @__PURE__ */e.createElement(v,{size:"icon",variant:"ghost",onClick:o,"aria-label":"Conversation history",className:"relative text-primary-foreground"},
|
|
69
|
+
/* @__PURE__ */e.createElement("div",{className:"@3xl:hidden shrink-0","data-name":"HeaderButtons"},!w&&/* @__PURE__ */e.createElement(v,{size:"icon",variant:"ghost",onClick:()=>{g(e=>!e),r()},"aria-label":f?"Collapse widget":"Expand widget",className:"text-primary-foreground device-touch:hidden device-desktop:inline-flex device-desktop-touch:inline-flex"},f?/* @__PURE__ */e.createElement(R,null):/* @__PURE__ */e.createElement(j,null)),m&&/* @__PURE__ */e.createElement(v,{size:"icon",variant:"ghost",onClick:o,"aria-label":"Conversation history",className:"relative text-primary-foreground"},
|
|
70
70
|
/* @__PURE__ */e.createElement(O,null),l&&!c&&/* @__PURE__ */e.createElement("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500"})),/* @__PURE__ */e.createElement(v,{size:"icon",variant:"ghost",onClick:a,"aria-label":"Close widget",className:"text-primary-foreground"},
|
|
71
71
|
/* @__PURE__ */e.createElement(b,null))))}Jr.displayName="FollowUpSearchBar";const Xr={headerText:"How can we help you today?",searchPlaceholder:"Ask a question or type a search term here ...",attachImageText:"Attach image",allDocumentsText:"All documents",loadingSearchText:"Searching for relevant content...",loadingAnswerText:"Crafting a response...",errorText:"Sorry, we were unable to process the request right now. Please try again in a moment.",followUpPlaceholder:"Type your response or follow-up",positiveAnswerText:"Helpful",negativeAnswerText:"Not helpful",uncertaintyFallbackText:{en:"Sorry, I can't find a clear answer to your question. Please try rephrasing or check the related sources below.",es:"Lo siento, no puedo encontrar una respuesta clara. Intente reformular la pregunta o consulte las fuentes relacionadas.",fr:"Désolé, je ne trouve pas de réponse claire. Essayez de reformuler ou consultez les sources connexes.",de:"Entschuldigung, ich finde keine klare Antwort. Versuchen Sie es anders zu formulieren oder sehen Sie sich die verwandten Quellen an.",it:"Mi dispiace, non trovo una risposta chiara. Prova a riformulare o consulta le fonti correlate.",pt:"Desculpe, não encontro uma resposta clara. Tente reformular ou consulte as fontes relacionadas.",nl:"Sorry, ik kan geen duidelijk antwoord vinden. Probeer het anders te formuleren of bekijk de gerelateerde bronnen.",pl:"Przepraszam, nie znajduję jasnej odpowiedzi. Spróbuj przeformułować pytanie lub sprawdź powiązane źródła.",ru:"Извините, я не могу найти четкого ответа. Попробуйте переформулировать или ознакомьтесь со связанными источниками.",ja:"申し訳ありませんが、明確な回答が見つかりません。質問の言い換えや、関連ソースをご確認ください。",ko:"죄송합니다. 명확한 답변을 찾을 수 없습니다. 질문을 다시 작성하거나 관련 소스를 확인해 주세요.",zh:"抱歉,找不到明确的答案。请尝试重新表述或查看相关来源。","zh-TW":"抱歉,找不到明確的答案。請嘗試重新表述或查看相關來源。"}};function Yr({toasts:t,onDismiss:r}){/* @__PURE__ */
|
|
72
72
|
return e.createElement("div",{className:"fixed top-4 left-4 right-4 z-50 flex flex-col gap-2 pointer-events-none"},/* @__PURE__ */e.createElement(u,null,t.map(t=>/* @__PURE__ */e.createElement(d.div,{key:t.id,initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.2},className:"pointer-events-auto flex items-center gap-2 rounded-lg border border-border bg-card px-4 py-3 text-sm text-foreground shadow-lg"},
|
|
@@ -93,4 +93,4 @@ return e.createElement(d.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},t
|
|
|
93
93
|
/* @__PURE__ */e.createElement("div",{ref:dt})),fe&&tt&&!wt&&!W&&!ht&&(()=>{const t=oe.some(e=>"awaiting-knowledge-group"===e.state);/* @__PURE__ */
|
|
94
94
|
return e.createElement(Jr,{ref:lt,initialQuery:de,onQueryChange:ue,isSearching:me,handleFollowUpSearch:Ut,textConfig:ze,enableFileAttachment:Fe,attachedFiles:Ke,isUploading:Be,onAddFiles:He,onRemoveFile:Ge,disabled:t})})(),fe&&wt&&!W&&!ht&&/* @__PURE__ */e.createElement(cn,{onStartNewConversation:()=>Lt()}),!ht&&W)});pn.displayName="ChatSearch";const hn=c(({featureFlags:t,...r},n)=>/* @__PURE__ */e.createElement(fe,{flags:t},/* @__PURE__ */e.createElement(xr,{searchPath:r.searchPath,contentTypeEndpoint:r.contentTypeEndpoint,widgetKey:r.apiKey},
|
|
95
95
|
/* @__PURE__ */e.createElement(pn,{...r,ref:n}))));hn.displayName="ChatSearch";export{hn as C,cn as R,xr as a,Fr as b,_r as u};
|
|
96
|
-
//# sourceMappingURL=ChatSearch.
|
|
96
|
+
//# sourceMappingURL=ChatSearch.DIrtg9k_.js.map
|