@brainfish-ai/components 0.30.7 → 0.30.9
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 +2 -2
- package/dist/esm/chunks/{ChatSearch.B0vv3DDb.js → ChatSearch.DvJtrQld.js} +2 -4
- package/dist/esm/chunks/ChatSearch.DvJtrQld.js.map +1 -0
- package/dist/esm/chunks/{Conversation.UzfPizn5.js → Conversation.CCfPtVz8.js} +11 -11
- package/dist/esm/chunks/Conversation.CCfPtVz8.js.map +1 -0
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/conversation.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/dist/esm/chunks/ChatSearch.B0vv3DDb.js.map +0 -1
- package/dist/esm/chunks/Conversation.UzfPizn5.js.map +0 -1
package/dist/conversation.d.ts
CHANGED
|
@@ -206,7 +206,7 @@ export declare type FileAttachment = {
|
|
|
206
206
|
name: string;
|
|
207
207
|
mimeType: string;
|
|
208
208
|
url?: string;
|
|
209
|
-
|
|
209
|
+
attachmentId?: string;
|
|
210
210
|
};
|
|
211
211
|
};
|
|
212
212
|
|
|
@@ -214,7 +214,7 @@ export declare type FileAttachmentBlock = {
|
|
|
214
214
|
type: 'file';
|
|
215
215
|
fileName: string;
|
|
216
216
|
mimeType: string;
|
|
217
|
-
|
|
217
|
+
attachmentId: string;
|
|
218
218
|
url?: string;
|
|
219
219
|
};
|
|
220
220
|
|
|
@@ -13,9 +13,7 @@ return e.createElement(Ut,{block:t});case"action-input-form":/* @__PURE__ */
|
|
|
13
13
|
return e.createElement(Ft,{block:t});default:return null}}const Tr="_loader_bghon_1",Ar="_monochrome_bghon_8";function Rr({className:t,colored:r=!1,...n}){const a=`ai-logo-gradient-${o()}`;/* @__PURE__ */
|
|
14
14
|
return e.createElement("svg",{className:X(Tr,!r&&Ar,t),width:48,height:48,viewBox:"0 0 72 72",role:"img","aria-label":"Loading",...n},
|
|
15
15
|
/* @__PURE__ */e.createElement(se,{variant:r?"yellowfin":"monochrome",gradientId:a}))}function jr({text:t,className:r}){/* @__PURE__ */
|
|
16
|
-
return e.createElement("div",{className:X("inline-flex items-center gap-
|
|
17
|
-
/* @__PURE__ */e.createElement(Rr,{className:"size-6 shrink-0"}),
|
|
18
|
-
/* @__PURE__ */e.createElement("span",{className:"relative overflow-hidden"},/* @__PURE__ */e.createElement(u,{mode:"wait",initial:!1},/* @__PURE__ */e.createElement(m.span,{key:t,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.2,ease:"easeInOut"},className:"block"},
|
|
16
|
+
return e.createElement("div",{className:X("inline-flex items-center gap-1 py-1",r)},/* @__PURE__ */e.createElement(Rr,{className:"size-4 shrink-0"}),/* @__PURE__ */e.createElement("span",{className:"relative overflow-hidden"},/* @__PURE__ */e.createElement(u,{mode:"wait",initial:!1},/* @__PURE__ */e.createElement(m.span,{key:t,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.2,ease:"easeInOut"},className:"block"},
|
|
19
17
|
/* @__PURE__ */e.createElement(oe,{variant:"dark-subtle"},t)))))}const Or={xs:{container:"size-12",spinner:"size-3",close:"top-0.5 right-0.5 p-0.5",closeIcon:"size-2"},sm:{container:"size-16",spinner:"size-4",close:"top-0.5 right-0.5 p-0.5",closeIcon:"size-2.5"},md:{container:"size-20",spinner:"size-5",close:"top-1 right-1 p-1",closeIcon:"size-3"}};function Dr({items:t,size:r="sm",onRemove:n,className:a}){if(0===t.length)return null;const s=Or[r];/* @__PURE__ */
|
|
20
18
|
return e.createElement("div",{className:X("flex gap-2 overflow-x-auto",a)},t.map(t=>/* @__PURE__ */e.createElement("div",{key:t.id,className:X("relative group rounded-lg overflow-hidden flex-shrink-0",s.container)},/* @__PURE__ */e.createElement("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:X(!t.url&&"pointer-events-none")},
|
|
21
19
|
/* @__PURE__ */e.createElement("img",{src:t.src,alt:t.alt||"Attachment",className:"w-full h-full object-cover"})),"uploading"===t.status&&/* @__PURE__ */e.createElement("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40"},/* @__PURE__ */e.createElement("div",{className:X("animate-spin rounded-full border-[2.5px] border-black/30 border-t-white",s.spinner)})),n&&/* @__PURE__ */e.createElement("button",{onClick:()=>n(t.id),className:X("absolute rounded-full opacity-0","group-hover:opacity-100 transition-opacity duration-200","hover:bg-black/70 bg-black/50",s.close)},
|
|
@@ -98,4 +96,4 @@ return e.createElement(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},t
|
|
|
98
96
|
/* @__PURE__ */e.createElement("div",{ref:dt})),he&&tt&&!wt&&!W&&!ht&&(()=>{const t=se.some(e=>"awaiting-knowledge-group"===e.state);/* @__PURE__ */
|
|
99
97
|
return e.createElement(en,{ref:lt,initialQuery:de,onQueryChange:ue,isSearching:me,handleFollowUpSearch:Ut,textConfig:ze,enableFileAttachment:Fe,attachedFiles:Ke,isUploading:Be,onAddFiles:He,onRemoveFile:Ge,disabled:t})})(),he&&wt&&!W&&!ht&&/* @__PURE__ */e.createElement(gn,{onStartNewConversation:()=>Lt()}),!ht&&W)});En.displayName="ChatSearch";const $n=l(({featureFlags:t,...r},n)=>/* @__PURE__ */e.createElement(ye,{flags:t},/* @__PURE__ */e.createElement(Cr,{searchPath:r.searchPath,contentTypeEndpoint:r.contentTypeEndpoint,widgetKey:r.apiKey},
|
|
100
98
|
/* @__PURE__ */e.createElement(En,{...r,ref:n}))));$n.displayName="ChatSearch";export{$n as C,gn as R,Cr as a,tn as b,Ir as u};
|
|
101
|
-
//# sourceMappingURL=ChatSearch.
|
|
99
|
+
//# sourceMappingURL=ChatSearch.DvJtrQld.js.map
|