@inkeep/agents-ui 0.15.30 → 0.16.1
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/color-mode/index.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +74 -73
- package/dist/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
- package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +2 -2
- package/dist/primitives/atoms/cmdk/index.cjs +1 -1
- package/dist/primitives/atoms/cmdk/index.js +14 -2
- package/dist/primitives/atoms/combobox.d.ts +104 -0
- package/dist/primitives/atoms/markdown/index.cjs +1 -1
- package/dist/primitives/atoms/markdown/index.js +41 -39
- package/dist/primitives/atoms/portal.js +3 -3
- package/dist/primitives/atoms/select.cjs +1 -1
- package/dist/primitives/atoms/select.js +2 -2
- package/dist/primitives/atoms/shadow/context.js +4 -4
- package/dist/primitives/components/embedded-chat/chat-error-helpers.cjs +3 -0
- package/dist/primitives/components/embedded-chat/chat-error-helpers.d.ts +26 -0
- package/dist/primitives/components/embedded-chat/chat-error-helpers.js +32 -0
- package/dist/primitives/components/embedded-chat/file-upload-input.cjs +1 -1
- package/dist/primitives/components/embedded-chat/file-upload-input.d.ts +1 -1
- package/dist/primitives/components/embedded-chat/file-upload-input.js +119 -116
- package/dist/primitives/components/embedded-chat/image-preview-modal.js +3 -3
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -4
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +1 -2
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +305 -278
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +1 -1
- package/dist/primitives/components/embedded-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat.d.ts +1 -2
- package/dist/primitives/components/embedded-chat.js +697 -701
- package/dist/primitives/components/embedded-search/search-provider.js +3 -3
- package/dist/primitives/components/embedded-search.cjs +1 -1
- package/dist/primitives/components/embedded-search.d.ts +1 -1
- package/dist/primitives/components/embedded-search.js +3 -3
- package/dist/primitives/components/modal/modal-provider.js +2 -2
- package/dist/primitives/components/modal.js +3 -3
- package/dist/primitives/components/sidebar-chat/index.js +1 -1
- package/dist/primitives/hooks/use-simple-scroll.cjs +1 -1
- package/dist/primitives/hooks/use-simple-scroll.d.ts +7 -0
- package/dist/primitives/hooks/use-simple-scroll.js +33 -30
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +55 -54
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +22 -22
- package/dist/primitives/providers/chat-bubble-provider.js +1 -1
- package/dist/primitives/providers/chat-form-provider.d.ts +1 -1
- package/dist/primitives/providers/chat-form-provider.js +4 -4
- package/dist/primitives/providers/chat-history-provider.js +3 -3
- package/dist/primitives/providers/config-provider.js +3 -3
- package/dist/primitives/providers/feedback-provider.js +3 -3
- package/dist/primitives/providers/form-field-provider.js +3 -3
- package/dist/primitives/providers/help-menu-provider.js +4 -4
- package/dist/primitives/providers/hover-popover-provider.js +3 -3
- package/dist/primitives/providers/image-preview-provider.js +5 -5
- package/dist/primitives/providers/markdown-provider.js +2 -2
- package/dist/primitives/providers/message-provider.js +1 -1
- package/dist/primitives/providers/sidebar-chat-provider.js +3 -3
- package/dist/primitives/providers/source-item-provider.js +3 -3
- package/dist/primitives/providers/widget-provider.js +2 -2
- package/dist/primitives/utils/default-settings.cjs +1 -1
- package/dist/primitives/utils/default-settings.d.ts +1 -0
- package/dist/primitives/utils/default-settings.js +6 -5
- package/dist/primitives/utils/misc.cjs +5 -1
- package/dist/primitives/utils/misc.d.ts +2 -1
- package/dist/primitives/utils/misc.js +47 -22
- package/dist/react/chat-button.js +1 -1
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.js +6 -6
- package/dist/react/embedded-search.cjs +1 -1
- package/dist/react/embedded-search.js +18 -18
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +74 -73
- package/dist/styled/components/chat-bubble.js +4 -4
- package/dist/styled/components/chat-button.cjs +1 -1
- package/dist/styled/components/chat-button.js +9 -9
- package/dist/styled/components/chat-history.cjs +1 -1
- package/dist/styled/components/chat-history.js +22 -22
- package/dist/styled/components/embedded-chat/file-upload-input.cjs +1 -1
- package/dist/styled/components/embedded-chat/file-upload-input.js +71 -72
- package/dist/styled/components/embedded-chat/image-preview-modal.js +5 -5
- package/dist/styled/components/embedded-chat.cjs +1 -1
- package/dist/styled/components/embedded-chat.js +198 -198
- package/dist/styled/components/embedded-search.cjs +1 -1
- package/dist/styled/components/embedded-search.js +65 -65
- package/dist/styled/components/loading-indicator.cjs +1 -1
- package/dist/styled/components/loading-indicator.js +1 -1
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.js +106 -108
- package/dist/styled/components/modal.js +3 -3
- package/dist/styled/components/searchbar.js +8 -8
- package/dist/styled/components/sidebar-chat.cjs +1 -1
- package/dist/styled/components/sidebar-chat.js +5 -5
- package/dist/styled/index.cjs +1 -1
- package/dist/styled/index.js +60 -59
- package/dist/styled/inkeep.css.cjs +13 -3
- package/dist/styled/inkeep.css.js +13 -3
- package/dist/theme/utils/generate-theme-variables.js +6 -6
- package/dist/types/config/ai.d.ts +7 -0
- package/package.json +1 -1
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +0 -9
- /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +0 -0
- /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -0
- /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/shim/index.cjs +0 -0
- /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/shim/index.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("../../primitives/components/embedded-search.cjs"),n=require("../../primitives/components/embedded-search/search-provider.cjs"),c=require("../../primitives/components/tagline-logo-icon.cjs"),s=require("../utils.cjs"),i=require("./ui/recipes/citation.cjs"),l=require("./ui/recipes/scrollable.cjs"),m=require("./embedded-search/results-loading.cjs"),o=require("merge-anything"),u=require("./ui/markdown-styles.cjs"),h=e=>r.jsx(n.SearchProvider,{...e}),p=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveWrapper,{className:s.cn("data-[hidden]:hidden rounded-md flex","bg-white dark:bg-gray-dark-950",e),...t}),b=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveRoot,{className:s.cn("data-[hidden]:hidden flex flex-col w-full","[--footer-height:theme(spacing.9)]","data-[mobile]:[--input-height:theme(spacing.20)]","[--ask-ai-trigger-height:0px]","[[data-show-ask-ai-card]_&]:[--ask-ai-trigger-height:theme(spacing.11)]",e),...t}),x=a.EmbeddedSearchPrimitiveContent,g=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveInputGroup,{className:s.cn("flex items-center w-full px-5 pt-3 pb-3 gap-3","[[data-mobile]_&]:max-h-[var(--input-height)]",e),...t}),I=({className:e,...t})=>r.jsx(a.EmbeddedSearchInputIcon,{className:s.cn("min-w-5 w-5 text-xl","text-gray-500 dark:text-white-alpha-600",e),...t}),v=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveInput,{className:s.cn("min-h-[38px] overflow-hidden w-full resize-none","py-1.5 max-h-[10vh] placeholder:text-gray-500","w-full dark:placeholder:text-gray-dark-200","border-none outline-none shadow-none bg-transparent",e),...t}),S=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveLoading,{className:s.cn("min-w-5 w-5 text-xl","text-gray-500 dark:text-white-alpha-600","animate-spin",e),...t}),k=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveAskAITrigger,{className:s.cn(i.citation({slot:"root"}),"mx-5 w-[calc(100%_-_theme(spacing.10))]","mb-4 h-11 cursor-pointer","h-[var(--ask-ai-trigger-height)]","grid-template-[none] flex items-center",e),...t}),R=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveAskAITriggerIcon,{className:s.cn("[grid-area:icon] h-5 w-5 flex-shrink-0","[--start-color:theme(colors.inkeep-expanded-primary.300)]","[--end-color:theme(colors.inkeep-expanded-primary.700)]","dark:[--start-color:theme(colors.inkeep-expanded-primary.50)]","dark:[--end-color:theme(colors.inkeep-expanded-primary.300)]",e),...t}),w=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveAskAITriggerLabel,{className:s.cn(i.citation({slot:"title"}),"font-medium text-gray-700",e),...t}),E=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveAskAITriggerQuery,{className:s.cn("font-semibold !bg-clip-text text-transparent ml-2","animate-shine [background:linear-gradient(270deg,theme(colors.inkeep-primary.stronger-light),transparent)_-200%_50%_/_25%_100%_no-repeat,theme(colors.inkeep-expanded-primary.800)] ","dark:[background:linear-gradient(270deg,theme(colors.inkeep-expanded-primary.100),transparent)_-200%_50%_/_25%_100%_no-repeat,theme(colors.inkeep-expanded-primary.400)]",e),...t}),P=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveAskAITriggerIndicator,{className:s.cn(i.citation({slot:"indicator"}),"ml-1 opacity-100 text-inkeep-primary-stronger-light group-selected:text-inkeep-primary-strong dark:text-gray-dark-300 dark:group-selected:text-inkeep-expanded-primary-300 ",e),...t}),f=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveAskAITriggerIndicatorText,{className:s.cn("text-xs flex-shrink-0 ml-auto","group-selected:text-inkeep-primary-strong dark:text-gray-dark-300 dark:group-selected:text-inkeep-expanded-primary-300","text-inkeep-primary-medium-subtle bg-gray-500 bg-clip-text dark:bg-white-alpha-800",e),...t}),y=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResults,{className:s.cn(l.scrollable({section:"content"}),"h-0 max-h-full","data-[has-content]:h-[min(calc(85vh_-_72px),calc(850px_-_72px_-_275px))]","md:data-[dual-pane-search-expanded]:h-[min(calc(85vh_-_72px),calc(900px_-_72px_-_135px))]","[[data-mobile]_&]:h-[calc(100vh-var(--input-height)-var(--footer-height)-var(--ask-ai-trigger-height))]","transition-all duration-250 ease-out data-[has-content]:pb-2",e),...t}),T=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsLoading,{className:s.cn("group mb-1 relative transition-all w-full h-full",e),children:r.jsx(m.ResultsLoading,{}),...t}),j=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsEmpty,{className:s.cn("flex w-full h-full","overflow-hidden relative grow-[2]","items-center justify-center text-gray-600","dark:text-gray-dark-400 mt-8",e),...t}),A=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsTabList,{className:s.cn("shrink-0 max-w-full","flex gap-3 px-5 pb-2 pt-0","overflow-x-auto [scrollbar-width:thin]",e),...t}),N=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsTab,{className:s.cn("px-3 text-1sm font-medium rounded-full shrink-0","py-1 transition-all duration-200 leading-snug","border border-gray-300 dark:border-gray-dark-500","hover:bg-gray-50 dark:hover:bg-white-alpha-50","data-[state=active]:bg-inkeep-primary-light-subtle","hover:data-[state=active]:bg-inkeep-primary-light-subtle","data-[state=active]:text-inkeep-expanded-primary-900","data-[state=active]:border-inkeep-primary-medium-subtle","dark:data-[state=active]:bg-white-alpha-100","dark:hover:data-[state=active]:bg-white-alpha-100","dark:data-[state=active]:text-inkeep-expanded-primary-300","dark:data-[state=active]:border-inkeep-expanded-primary-300","focus:outline-inkeep-expanded-primary-700 dark:focus:outline-inkeep-expanded-primary-300",e),...t}),_=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsContent,{className:s.cn("flex overflow-hidden h-full",e),...t}),L=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsScrollArea,{className:s.cn("overflow-hidden h-full first:w-full","first:[[data-view=dual-pane]_&]:flex-1 md:first:[[data-view=dual-pane]_&]:flex-[0_0_44%]",'befter:content-[""] befter:absolute befter:inset-x-0',"befter:h-10 befter:pointer-events-none","befter:transition-opacity befter:duration-300","befter:ease-in-out ","before:top-0 after:bottom-0","before:bg-[linear-gradient(white,_transparent)] after:bg-[linear-gradient(transparent,_white)] ","dark:before:bg-[linear-gradient(var(--ikp-color-gray-dark-950),_transparent)] dark:after:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))]","has-[[data-scroll-top]]:before:opacity-0","has-[[data-scroll-bottom]]:after:opacity-0",e),...t}),O=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsScrollAreaViewport,{className:s.cn("h-full w-full rounded-[inherit]",e),...t}),B=({className:e,...t})=>r.jsx(a.ResultsScrollAreaScrollbar,{className:s.cn("flex select-none touch-none p-0.5","transition-colors duration-[160ms] ease-in-out","w-2.5 border-l border-l-transparent",e),...t}),C=({className:e,...t})=>r.jsx(a.ResultsScrollAreaThumb,{className:s.cn("relative flex-1 rounded-full","bg-gray-300 dark:bg-white-alpha-200",e),...t}),q=a.ResultsScrollAreaCorner,D=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsList,{className:s.cn("w-full flex flex-col","items-center gap-2.5 h-full shrink-0","px-5 py-1 content-center -my-[1px]",e),...t}),H=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItem,{className:s.cn(i.citation({slot:"root"}),e),...t}),F=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemBreadcrumbs,{className:s.cn(i.citation({slot:"breadcrumbs"}),e),...t}),G=({className:e,...t})=>r.jsx(a.ResultsItemBreadcrumbIcon,{className:s.cn(i.citation({slot:"breadcrumbsIcon"}),e),...t}),Q=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemIcon,{className:s.cn(i.citation({slot:"icon"}),e),...t}),V=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemTitle,{className:s.cn(i.citation({slot:"title"}),e),...t}),W=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemTag,{className:s.cn(i.citation({slot:"tag"}),e),...t}),z=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemDescription,{className:s.cn(i.citation({slot:"description"}),e),...t}),M=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemDescriptionPart,{className:s.cn(i.citation({slot:"descriptionPart"}),e),...t}),$=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemIndicator,{className:s.cn(i.citation({slot:"indicator"}),e),...t}),J=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreview,{className:s.cn("flex-1 min-w-0 break-words pt-3 pb-4 pr-10 pl-5","hidden md:flex flex-col gap-6",e),...t}),K=({className:e,...t})=>r.jsx(a.ResultsItemPreviewHeader,{className:s.cn("flex flex-col gap-5",e),...t}),U=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewHeading,{className:s.cn("inline-block",e),...t}),X=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewTitle,{className:s.cn("text-3xl leading-snug tracking-tight","font-semibold hover:text-inkeep-primary-stronger","dark:hover:text-inkeep-expanded-primary-100",e),...t}),Y=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewTitleLinkIcon,{className:s.cn("inline-block ml-2 mb-2 tracking-tight text-gray-500 dark:text-white-alpha-500",e),...t}),Z=({className:e,...t})=>r.jsx(a.ResultsItemPreviewBreadcrumbs,{className:s.cn(i.citation({slot:"breadcrumbs"}),"!line-clamp-none whitespace-normal text-gray-500 dark:text-gray-dark-200 text-sm",e),...t}),ee=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewBreadcrumbIcon,{className:s.cn(i.citation({slot:"breadcrumbsIcon"}),e),...t}),te=({className:e,componentStyles:t,...d})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewBody,{className:s.cn("max-w-full text-gray-700 dark:text-gray-dark-100 [&_em]:font-bold [&_em]:not-italic",e),componentStyles:o.merge(u.markdownStyles,t??{}),...d}),re=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutline,{className:s.cn("flex flex-col gap-3",e),...t}),ae=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineTitle,{className:s.cn("text-xs uppercase font-semibold tracking-widest","text-gray-500 dark:text-white-alpha-500",e),...t}),se=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineList,{className:s.cn("flex flex-col gap-4",e),...t}),ie=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineItem,{className:s.cn("flex items-center gap-1 text-gray-600 dark:text-white-alpha-600 font-medium ",`${t.href?"cursor-pointer hover:text-gray-800 dark:hover:text-white-alpha-800 dark:data-[is-match]:hover:text-inkeep-expanded-primary-200 data-[is-match]:hover:text-inkeep-expanded-primary-800 ":""}`,"data-[is-match]:text-inkeep-expanded-primary-700","dark:data-[is-match]:text-inkeep-expanded-primary-300",e),...t}),de=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemIcon,{className:s.cn(e),...t}),ne=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemText,{className:s.cn(e),...t}),ce=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemLinkIcon,{className:s.cn("h-3 !min-h-0 !min-w-0",e),...t}),le=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveFooter,{className:s.cn("justify-self-end","px-5 pt-1 pb-3","[[data-mobile]_&]:py-0","[[data-mobile]_&]:items-center","[[data-mobile]_&]:h-[var(--footer-height)]","hidden data-[has-results]:flex",e),...t}),me=({className:e,...t})=>r.jsx(a.TaglineContainer,{className:s.cn("flex items-center whitespace-nowrap",e),...t}),oe=({className:e,...t})=>r.jsx(a.TaglineText,{className:s.cn("text-xs text-gray-500 dark:text-white-alpha-600",e),...t}),ue=({className:e,...t})=>r.jsx(a.TaglineLogo,{className:s.cn("inline-flex items-center",e),...t,children:r.jsx(c.default,{className:"text-gray-500 dark:text-white-alpha-600 ml-1 mt-0.5 w-11 h-auto","aria-hidden":"true"})});exports.AskAITrigger=k;exports.AskAITriggerIcon=R;exports.AskAITriggerIndicator=P;exports.AskAITriggerIndicatorText=f;exports.AskAITriggerLabel=w;exports.AskAITriggerQuery=E;exports.Content=x;exports.Footer=le;exports.Input=v;exports.InputGroup=g;exports.InputIcon=I;exports.Loading=S;exports.Provider=h;exports.Results=y;exports.ResultsContent=_;exports.ResultsEmpty=j;exports.ResultsItem=H;exports.ResultsItemBreadcrumbIcon=G;exports.ResultsItemBreadcrumbs=F;exports.ResultsItemDescription=z;exports.ResultsItemDescriptionPart=M;exports.ResultsItemIcon=Q;exports.ResultsItemIndicator=$;exports.ResultsItemPreview=J;exports.ResultsItemPreviewBody=te;exports.ResultsItemPreviewBreadcrumbIcon=ee;exports.ResultsItemPreviewBreadcrumbs=Z;exports.ResultsItemPreviewHeader=K;exports.ResultsItemPreviewHeading=U;exports.ResultsItemPreviewOutline=re;exports.ResultsItemPreviewOutlineItem=ie;exports.ResultsItemPreviewOutlineItemIcon=de;exports.ResultsItemPreviewOutlineItemLinkIcon=ce;exports.ResultsItemPreviewOutlineItemText=ne;exports.ResultsItemPreviewOutlineList=se;exports.ResultsItemPreviewOutlineTitle=ae;exports.ResultsItemPreviewTitle=X;exports.ResultsItemPreviewTitleLinkIcon=Y;exports.ResultsItemTag=W;exports.ResultsItemTitle=V;exports.ResultsList=D;exports.ResultsLoading=T;exports.ResultsScrollArea=L;exports.ResultsScrollAreaCorner=q;exports.ResultsScrollAreaScrollbar=B;exports.ResultsScrollAreaThumb=C;exports.ResultsScrollAreaViewport=O;exports.ResultsTab=N;exports.ResultsTabList=A;exports.Root=b;exports.TaglineContainer=me;exports.TaglineLogo=ue;exports.TaglineText=oe;exports.Wrapper=p;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("../../primitives/components/embedded-search.cjs"),n=require("../../primitives/components/embedded-search/search-provider.cjs"),l=require("../../primitives/components/tagline-logo-icon.cjs"),s=require("../utils.cjs"),i=require("./ui/recipes/citation.cjs"),c=require("./ui/recipes/scrollable.cjs"),m=require("./embedded-search/results-loading.cjs"),o=require("merge-anything"),u=require("./ui/markdown-styles.cjs"),h=e=>r.jsx(n.SearchProvider,{...e}),p=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveWrapper,{className:s.cn("data-[hidden]:hidden rounded-md flex","bg-white dark:bg-gray-dark-950",e),...t}),b=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveRoot,{className:s.cn("data-[hidden]:hidden flex flex-col w-full","[--footer-height:theme(spacing.9)]","data-[mobile]:[--input-height:theme(spacing.20)]","[--ask-ai-trigger-height:0px]","[[data-show-ask-ai-card]_&]:[--ask-ai-trigger-height:theme(spacing.11)]",e),...t}),x=a.Content,g=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveInputGroup,{className:s.cn("flex items-center w-full px-5 pt-3 pb-3 gap-3","[[data-mobile]_&]:max-h-[var(--input-height)]",e),...t}),I=({className:e,...t})=>r.jsx(a.EmbeddedSearchInputIcon,{className:s.cn("min-w-5 w-5 text-xl","text-gray-500 dark:text-white-alpha-600",e),...t}),v=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveInput,{className:s.cn("min-h-[38px] overflow-hidden w-full resize-none","py-1.5 max-h-[10vh] placeholder:text-gray-500","w-full dark:placeholder:text-gray-dark-200","border-none outline-none shadow-none bg-transparent",e),...t}),k=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveLoading,{className:s.cn("min-w-5 w-5 text-xl","text-gray-500 dark:text-white-alpha-600","animate-spin",e),...t}),S=({className:e,...t})=>r.jsx(a.AskAITrigger,{className:s.cn(i.citation({slot:"root"}),"mx-5 w-[calc(100%_-_theme(spacing.10))]","mb-4 h-11 cursor-pointer","h-[var(--ask-ai-trigger-height)]","grid-template-[none] flex items-center",e),...t}),R=({className:e,...t})=>r.jsx(a.AskAITriggerIcon,{className:s.cn("[grid-area:icon] h-5 w-5 flex-shrink-0","[--start-color:theme(colors.inkeep-expanded-primary.300)]","[--end-color:theme(colors.inkeep-expanded-primary.700)]","dark:[--start-color:theme(colors.inkeep-expanded-primary.50)]","dark:[--end-color:theme(colors.inkeep-expanded-primary.300)]",e),...t}),w=({className:e,...t})=>r.jsx(a.AskAITriggerLabel,{className:s.cn(i.citation({slot:"title"}),"font-medium text-gray-700",e),...t}),E=({className:e,...t})=>r.jsx(a.AskAITriggerQuery,{className:s.cn("font-semibold !bg-clip-text text-transparent ml-2","animate-shine [background:linear-gradient(270deg,theme(colors.inkeep-primary.stronger-light),transparent)_-200%_50%_/_25%_100%_no-repeat,theme(colors.inkeep-expanded-primary.800)] ","dark:[background:linear-gradient(270deg,theme(colors.inkeep-expanded-primary.100),transparent)_-200%_50%_/_25%_100%_no-repeat,theme(colors.inkeep-expanded-primary.400)]",e),...t}),f=({className:e,...t})=>r.jsx(a.AskAITriggerIndicator,{className:s.cn(i.citation({slot:"indicator"}),"ml-1 opacity-100 text-inkeep-primary-stronger-light group-selected:text-inkeep-primary-strong dark:text-gray-dark-300 dark:group-selected:text-inkeep-expanded-primary-300 ",e),...t}),P=({className:e,...t})=>r.jsx(a.AskAITriggerIndicatorText,{className:s.cn("text-xs flex-shrink-0 ml-auto","group-selected:text-inkeep-primary-strong dark:text-gray-dark-300 dark:group-selected:text-inkeep-expanded-primary-300","text-inkeep-primary-medium-subtle bg-gray-500 bg-clip-text dark:bg-white-alpha-800",e),...t}),y=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResults,{className:s.cn(c.scrollable({section:"content"}),"h-0 max-h-full","data-[has-content]:h-[min(calc(85vh_-_72px),calc(850px_-_72px_-_275px))]","md:data-[dual-pane-search-expanded]:h-[min(calc(85vh_-_72px),calc(900px_-_72px_-_135px))]","[[data-mobile]_&]:h-[calc(100vh-var(--input-height)-var(--footer-height)-var(--ask-ai-trigger-height))]","transition-all duration-250 ease-out data-[has-content]:pb-2",e),...t}),T=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsLoading,{className:s.cn("group mb-1 relative transition-all w-full h-full",e),children:r.jsx(m.ResultsLoading,{}),...t}),j=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsEmpty,{className:s.cn("flex w-full h-full","overflow-hidden relative grow-[2]","items-center justify-center text-gray-600","dark:text-gray-dark-400 mt-8",e),...t}),A=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsTabList,{className:s.cn("shrink-0 max-w-full","flex gap-3 px-5 pb-2 pt-0","overflow-x-auto [scrollbar-width:thin]",e),...t}),N=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsTab,{className:s.cn("px-3 text-1sm font-medium rounded-full shrink-0","py-1 transition-all duration-200 leading-snug","border border-gray-300 dark:border-gray-dark-500","hover:bg-gray-50 dark:hover:bg-white-alpha-50","data-[state=active]:bg-inkeep-primary-light-subtle","hover:data-[state=active]:bg-inkeep-primary-light-subtle","data-[state=active]:text-inkeep-expanded-primary-900","data-[state=active]:border-inkeep-primary-medium-subtle","dark:data-[state=active]:bg-white-alpha-100","dark:hover:data-[state=active]:bg-white-alpha-100","dark:data-[state=active]:text-inkeep-expanded-primary-300","dark:data-[state=active]:border-inkeep-expanded-primary-300","focus:outline-inkeep-expanded-primary-700 dark:focus:outline-inkeep-expanded-primary-300",e),...t}),_=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsContent,{className:s.cn("flex overflow-hidden h-full",e),...t}),L=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsScrollArea,{className:s.cn("overflow-hidden h-full first:w-full","first:[[data-view=dual-pane]_&]:flex-1 md:first:[[data-view=dual-pane]_&]:flex-[0_0_44%]",'befter:content-[""] befter:absolute befter:inset-x-0',"befter:h-10 befter:pointer-events-none","befter:transition-opacity befter:duration-300","befter:ease-in-out ","before:top-0 after:bottom-0","before:bg-[linear-gradient(white,_transparent)] after:bg-[linear-gradient(transparent,_white)] ","dark:before:bg-[linear-gradient(var(--ikp-color-gray-dark-950),_transparent)] dark:after:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))]","has-[[data-scroll-top]]:before:opacity-0","has-[[data-scroll-bottom]]:after:opacity-0",e),...t}),O=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsScrollAreaViewport,{className:s.cn("h-full w-full rounded-[inherit]",e),...t}),B=({className:e,...t})=>r.jsx(a.ResultsScrollAreaScrollbar,{className:s.cn("flex select-none touch-none p-0.5","transition-colors duration-[160ms] ease-in-out","w-2.5 border-l border-l-transparent",e),...t}),C=({className:e,...t})=>r.jsx(a.ResultsScrollAreaThumb,{className:s.cn("relative flex-1 rounded-full","bg-gray-300 dark:bg-white-alpha-200",e),...t}),q=a.ResultsScrollAreaCorner,D=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsList,{className:s.cn("w-full flex flex-col","items-center gap-2.5 h-full shrink-0","px-5 py-1 content-center -my-[1px]",e),...t}),H=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItem,{className:s.cn(i.citation({slot:"root"}),e),...t}),F=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemBreadcrumbs,{className:s.cn(i.citation({slot:"breadcrumbs"}),e),...t}),G=({className:e,...t})=>r.jsx(a.ResultsItemBreadcrumbIcon,{className:s.cn(i.citation({slot:"breadcrumbsIcon"}),e),...t}),Q=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemIcon,{className:s.cn(i.citation({slot:"icon"}),e),...t}),V=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemTitle,{className:s.cn(i.citation({slot:"title"}),e),...t}),W=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemTag,{className:s.cn(i.citation({slot:"tag"}),e),...t}),z=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemDescription,{className:s.cn(i.citation({slot:"description"}),e),...t}),M=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemDescriptionPart,{className:s.cn(i.citation({slot:"descriptionPart"}),e),...t}),$=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemIndicator,{className:s.cn(i.citation({slot:"indicator"}),e),...t}),J=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreview,{className:s.cn("flex-1 min-w-0 break-words pt-3 pb-4 pr-10 pl-5","hidden md:flex flex-col gap-6",e),...t}),K=({className:e,...t})=>r.jsx(a.ResultsItemPreviewHeader,{className:s.cn("flex flex-col gap-5",e),...t}),U=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewHeading,{className:s.cn("inline-block",e),...t}),X=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewTitle,{className:s.cn("text-3xl leading-snug tracking-tight","font-semibold hover:text-inkeep-primary-stronger","dark:hover:text-inkeep-expanded-primary-100",e),...t}),Y=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewTitleLinkIcon,{className:s.cn("inline-block ml-2 mb-2 tracking-tight text-gray-500 dark:text-white-alpha-500",e),...t}),Z=({className:e,...t})=>r.jsx(a.ResultsItemPreviewBreadcrumbs,{className:s.cn(i.citation({slot:"breadcrumbs"}),"!line-clamp-none whitespace-normal text-gray-500 dark:text-gray-dark-200 text-sm",e),...t}),ee=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewBreadcrumbIcon,{className:s.cn(i.citation({slot:"breadcrumbsIcon"}),e),...t}),te=({className:e,componentStyles:t,...d})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewBody,{className:s.cn("max-w-full text-gray-700 dark:text-gray-dark-100 [&_em]:font-bold [&_em]:not-italic",e),componentStyles:o.merge(u.markdownStyles,t??{}),...d}),re=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutline,{className:s.cn("flex flex-col gap-3",e),...t}),ae=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineTitle,{className:s.cn("text-xs uppercase font-semibold tracking-widest","text-gray-500 dark:text-white-alpha-500",e),...t}),se=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineList,{className:s.cn("flex flex-col gap-4",e),...t}),ie=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineItem,{className:s.cn("flex items-center gap-1 text-gray-600 dark:text-white-alpha-600 font-medium ",`${t.href?"cursor-pointer hover:text-gray-800 dark:hover:text-white-alpha-800 dark:data-[is-match]:hover:text-inkeep-expanded-primary-200 data-[is-match]:hover:text-inkeep-expanded-primary-800 ":""}`,"data-[is-match]:text-inkeep-expanded-primary-700","dark:data-[is-match]:text-inkeep-expanded-primary-300",e),...t}),de=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemIcon,{className:s.cn(e),...t}),ne=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemText,{className:s.cn(e),...t}),le=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemLinkIcon,{className:s.cn("h-3 !min-h-0 !min-w-0",e),...t}),ce=({className:e,...t})=>r.jsx(a.EmbeddedSearchPrimitiveFooter,{className:s.cn("justify-self-end","px-5 pt-1 pb-3","[[data-mobile]_&]:py-0","[[data-mobile]_&]:items-center","[[data-mobile]_&]:h-[var(--footer-height)]","hidden data-[has-results]:flex",e),...t}),me=({className:e,...t})=>r.jsx(a.TaglineContainer,{className:s.cn("flex items-center whitespace-nowrap",e),...t}),oe=({className:e,...t})=>r.jsx(a.TaglineText,{className:s.cn("text-xs text-gray-500 dark:text-white-alpha-600",e),...t}),ue=({className:e,...t})=>r.jsx(a.TaglineLogo,{className:s.cn("inline-flex items-center",e),...t,children:r.jsx(l.default,{className:"text-gray-500 dark:text-white-alpha-600 ml-1 mt-0.5 w-11 h-auto","aria-hidden":"true"})});exports.AskAITrigger=S;exports.AskAITriggerIcon=R;exports.AskAITriggerIndicator=f;exports.AskAITriggerIndicatorText=P;exports.AskAITriggerLabel=w;exports.AskAITriggerQuery=E;exports.Content=x;exports.Footer=ce;exports.Input=v;exports.InputGroup=g;exports.InputIcon=I;exports.Loading=k;exports.Provider=h;exports.Results=y;exports.ResultsContent=_;exports.ResultsEmpty=j;exports.ResultsItem=H;exports.ResultsItemBreadcrumbIcon=G;exports.ResultsItemBreadcrumbs=F;exports.ResultsItemDescription=z;exports.ResultsItemDescriptionPart=M;exports.ResultsItemIcon=Q;exports.ResultsItemIndicator=$;exports.ResultsItemPreview=J;exports.ResultsItemPreviewBody=te;exports.ResultsItemPreviewBreadcrumbIcon=ee;exports.ResultsItemPreviewBreadcrumbs=Z;exports.ResultsItemPreviewHeader=K;exports.ResultsItemPreviewHeading=U;exports.ResultsItemPreviewOutline=re;exports.ResultsItemPreviewOutlineItem=ie;exports.ResultsItemPreviewOutlineItemIcon=de;exports.ResultsItemPreviewOutlineItemLinkIcon=le;exports.ResultsItemPreviewOutlineItemText=ne;exports.ResultsItemPreviewOutlineList=se;exports.ResultsItemPreviewOutlineTitle=ae;exports.ResultsItemPreviewTitle=X;exports.ResultsItemPreviewTitleLinkIcon=Y;exports.ResultsItemTag=W;exports.ResultsItemTitle=V;exports.ResultsList=D;exports.ResultsLoading=T;exports.ResultsScrollArea=L;exports.ResultsScrollAreaCorner=q;exports.ResultsScrollAreaScrollbar=B;exports.ResultsScrollAreaThumb=C;exports.ResultsScrollAreaViewport=O;exports.ResultsTab=N;exports.ResultsTabList=A;exports.Root=b;exports.TaglineContainer=me;exports.TaglineLogo=ue;exports.TaglineText=oe;exports.Wrapper=p;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { Content as d, ResultsScrollAreaCorner as l, AskAITrigger as m, AskAITriggerIcon as n, AskAITriggerIndicator as c, AskAITriggerIndicatorText as o, AskAITriggerLabel as h, AskAITriggerQuery as u, EmbeddedSearchPrimitiveFooter as p, EmbeddedSearchPrimitiveInput as b, EmbeddedSearchPrimitiveInputGroup as g, EmbeddedSearchInputIcon as I, EmbeddedSearchPrimitiveLoading as x, EmbeddedSearchPrimitiveResults as v, EmbeddedSearchPrimitiveResultsContent as S, EmbeddedSearchPrimitiveResultsEmpty as k, EmbeddedSearchPrimitiveResultsItem as R, ResultsItemBreadcrumbIcon as E, EmbeddedSearchPrimitiveResultsItemBreadcrumbs as P, EmbeddedSearchPrimitiveResultsItemDescription as w, EmbeddedSearchPrimitiveResultsItemDescriptionPart as f, EmbeddedSearchPrimitiveResultsItemIcon as y, EmbeddedSearchPrimitiveResultsItemIndicator as T, EmbeddedSearchPrimitiveResultsItemPreview as A, EmbeddedSearchPrimitiveResultsItemPreviewBody as N, EmbeddedSearchPrimitiveResultsItemPreviewBreadcrumbIcon as _, ResultsItemPreviewBreadcrumbs as L, ResultsItemPreviewHeader as O, EmbeddedSearchPrimitiveResultsItemPreviewHeading as B, EmbeddedSearchPrimitiveResultsItemPreviewOutline as C, EmbeddedSearchPrimitiveResultsItemPreviewOutlineItem as H, EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemIcon as D, EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemLinkIcon as Q, EmbeddedSearchPrimitiveResultsItemPreviewOutlineItemText as j, EmbeddedSearchPrimitiveResultsItemPreviewOutlineList as F, EmbeddedSearchPrimitiveResultsItemPreviewOutlineTitle as G, EmbeddedSearchPrimitiveResultsItemPreviewTitle as V, EmbeddedSearchPrimitiveResultsItemPreviewTitleLinkIcon as W, EmbeddedSearchPrimitiveResultsItemTag as $, EmbeddedSearchPrimitiveResultsItemTitle as z, EmbeddedSearchPrimitiveResultsList as q, EmbeddedSearchPrimitiveResultsLoading as J, EmbeddedSearchPrimitiveResultsScrollArea as K, ResultsScrollAreaScrollbar as M, ResultsScrollAreaThumb as U, EmbeddedSearchPrimitiveResultsScrollAreaViewport as X, EmbeddedSearchPrimitiveResultsTab as Y, EmbeddedSearchPrimitiveResultsTabList as Z, EmbeddedSearchPrimitiveRoot as ee, TaglineContainer as te, TaglineLogo as ae, TaglineText as re, EmbeddedSearchPrimitiveWrapper as se } from "../../primitives/components/embedded-search.js";
|
|
4
4
|
import { SearchProvider as ie } from "../../primitives/components/embedded-search/search-provider.js";
|
|
5
5
|
import de from "../../primitives/components/tagline-logo-icon.js";
|
|
6
6
|
import { cn as r } from "../utils.js";
|
|
@@ -9,8 +9,8 @@ import { scrollable as le } from "./ui/recipes/scrollable.js";
|
|
|
9
9
|
import { ResultsLoading as me } from "./embedded-search/results-loading.js";
|
|
10
10
|
import { merge as ne } from "merge-anything";
|
|
11
11
|
import { markdownStyles as ce } from "./ui/markdown-styles.js";
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const ke = (e) => /* @__PURE__ */ a(ie, { ...e }), Re = ({ className: e, ...t }) => /* @__PURE__ */ a(
|
|
13
|
+
se,
|
|
14
14
|
{
|
|
15
15
|
className: r(
|
|
16
16
|
"data-[hidden]:hidden rounded-md flex",
|
|
@@ -23,7 +23,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
23
23
|
className: e,
|
|
24
24
|
...t
|
|
25
25
|
}) => /* @__PURE__ */ a(
|
|
26
|
-
|
|
26
|
+
ee,
|
|
27
27
|
{
|
|
28
28
|
className: r(
|
|
29
29
|
"data-[hidden]:hidden flex flex-col w-full",
|
|
@@ -39,7 +39,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
39
39
|
className: e,
|
|
40
40
|
...t
|
|
41
41
|
}) => /* @__PURE__ */ a(
|
|
42
|
-
|
|
42
|
+
g,
|
|
43
43
|
{
|
|
44
44
|
className: r(
|
|
45
45
|
"flex items-center w-full px-5 pt-3 pb-3 gap-3",
|
|
@@ -52,7 +52,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
52
52
|
className: e,
|
|
53
53
|
...t
|
|
54
54
|
}) => /* @__PURE__ */ a(
|
|
55
|
-
|
|
55
|
+
I,
|
|
56
56
|
{
|
|
57
57
|
className: r("min-w-5 w-5 text-xl", "text-gray-500 dark:text-white-alpha-600", e),
|
|
58
58
|
...t
|
|
@@ -61,7 +61,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
61
61
|
className: e,
|
|
62
62
|
...t
|
|
63
63
|
}) => /* @__PURE__ */ a(
|
|
64
|
-
|
|
64
|
+
b,
|
|
65
65
|
{
|
|
66
66
|
className: r(
|
|
67
67
|
"min-h-[38px] overflow-hidden w-full resize-none",
|
|
@@ -76,7 +76,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
76
76
|
className: e,
|
|
77
77
|
...t
|
|
78
78
|
}) => /* @__PURE__ */ a(
|
|
79
|
-
|
|
79
|
+
x,
|
|
80
80
|
{
|
|
81
81
|
className: r(
|
|
82
82
|
"min-w-5 w-5 text-xl",
|
|
@@ -90,7 +90,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
90
90
|
className: e,
|
|
91
91
|
...t
|
|
92
92
|
}) => /* @__PURE__ */ a(
|
|
93
|
-
|
|
93
|
+
m,
|
|
94
94
|
{
|
|
95
95
|
className: r(
|
|
96
96
|
s({ slot: "root" }),
|
|
@@ -106,7 +106,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
106
106
|
className: e,
|
|
107
107
|
...t
|
|
108
108
|
}) => /* @__PURE__ */ a(
|
|
109
|
-
|
|
109
|
+
n,
|
|
110
110
|
{
|
|
111
111
|
className: r(
|
|
112
112
|
"[grid-area:icon] h-5 w-5 flex-shrink-0",
|
|
@@ -122,7 +122,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
122
122
|
className: e,
|
|
123
123
|
...t
|
|
124
124
|
}) => /* @__PURE__ */ a(
|
|
125
|
-
|
|
125
|
+
h,
|
|
126
126
|
{
|
|
127
127
|
className: r(s({ slot: "title" }), "font-medium text-gray-700", e),
|
|
128
128
|
...t
|
|
@@ -131,7 +131,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
131
131
|
className: e,
|
|
132
132
|
...t
|
|
133
133
|
}) => /* @__PURE__ */ a(
|
|
134
|
-
|
|
134
|
+
u,
|
|
135
135
|
{
|
|
136
136
|
className: r(
|
|
137
137
|
"font-semibold !bg-clip-text text-transparent ml-2",
|
|
@@ -145,7 +145,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
145
145
|
className: e,
|
|
146
146
|
...t
|
|
147
147
|
}) => /* @__PURE__ */ a(
|
|
148
|
-
|
|
148
|
+
c,
|
|
149
149
|
{
|
|
150
150
|
className: r(
|
|
151
151
|
s({ slot: "indicator" }),
|
|
@@ -158,7 +158,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
158
158
|
className: e,
|
|
159
159
|
...t
|
|
160
160
|
}) => /* @__PURE__ */ a(
|
|
161
|
-
|
|
161
|
+
o,
|
|
162
162
|
{
|
|
163
163
|
className: r(
|
|
164
164
|
"text-xs flex-shrink-0 ml-auto",
|
|
@@ -172,7 +172,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
172
172
|
className: e,
|
|
173
173
|
...t
|
|
174
174
|
}) => /* @__PURE__ */ a(
|
|
175
|
-
|
|
175
|
+
v,
|
|
176
176
|
{
|
|
177
177
|
className: r(
|
|
178
178
|
le({ section: "content" }),
|
|
@@ -189,7 +189,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
189
189
|
className: e,
|
|
190
190
|
...t
|
|
191
191
|
}) => /* @__PURE__ */ a(
|
|
192
|
-
|
|
192
|
+
J,
|
|
193
193
|
{
|
|
194
194
|
className: r("group mb-1 relative transition-all w-full h-full", e),
|
|
195
195
|
children: /* @__PURE__ */ a(me, {}),
|
|
@@ -210,11 +210,11 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
210
210
|
),
|
|
211
211
|
...t
|
|
212
212
|
}
|
|
213
|
-
),
|
|
213
|
+
), Qe = ({
|
|
214
214
|
className: e,
|
|
215
215
|
...t
|
|
216
216
|
}) => /* @__PURE__ */ a(
|
|
217
|
-
|
|
217
|
+
Z,
|
|
218
218
|
{
|
|
219
219
|
className: r(
|
|
220
220
|
"shrink-0 max-w-full",
|
|
@@ -224,11 +224,11 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
224
224
|
),
|
|
225
225
|
...t
|
|
226
226
|
}
|
|
227
|
-
),
|
|
227
|
+
), je = ({
|
|
228
228
|
className: e,
|
|
229
229
|
...t
|
|
230
230
|
}) => /* @__PURE__ */ a(
|
|
231
|
-
|
|
231
|
+
Y,
|
|
232
232
|
{
|
|
233
233
|
className: r(
|
|
234
234
|
"px-3 text-1sm font-medium rounded-full shrink-0",
|
|
@@ -248,20 +248,20 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
248
248
|
),
|
|
249
249
|
...t
|
|
250
250
|
}
|
|
251
|
-
),
|
|
251
|
+
), Fe = ({
|
|
252
252
|
className: e,
|
|
253
253
|
...t
|
|
254
254
|
}) => /* @__PURE__ */ a(
|
|
255
|
-
|
|
255
|
+
S,
|
|
256
256
|
{
|
|
257
257
|
className: r("flex overflow-hidden h-full", e),
|
|
258
258
|
...t
|
|
259
259
|
}
|
|
260
|
-
),
|
|
260
|
+
), Ge = ({
|
|
261
261
|
className: e,
|
|
262
262
|
...t
|
|
263
263
|
}) => /* @__PURE__ */ a(
|
|
264
|
-
|
|
264
|
+
K,
|
|
265
265
|
{
|
|
266
266
|
className: r(
|
|
267
267
|
"overflow-hidden h-full first:w-full",
|
|
@@ -285,7 +285,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
285
285
|
className: e,
|
|
286
286
|
...t
|
|
287
287
|
}) => /* @__PURE__ */ a(
|
|
288
|
-
|
|
288
|
+
X,
|
|
289
289
|
{
|
|
290
290
|
className: r("h-full w-full rounded-[inherit]", e),
|
|
291
291
|
...t
|
|
@@ -294,7 +294,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
294
294
|
className: e,
|
|
295
295
|
...t
|
|
296
296
|
}) => /* @__PURE__ */ a(
|
|
297
|
-
|
|
297
|
+
M,
|
|
298
298
|
{
|
|
299
299
|
className: r(
|
|
300
300
|
"flex select-none touch-none p-0.5",
|
|
@@ -308,7 +308,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
308
308
|
className: e,
|
|
309
309
|
...t
|
|
310
310
|
}) => /* @__PURE__ */ a(
|
|
311
|
-
|
|
311
|
+
U,
|
|
312
312
|
{
|
|
313
313
|
className: r("relative flex-1 rounded-full", "bg-gray-300 dark:bg-white-alpha-200", e),
|
|
314
314
|
...t
|
|
@@ -317,7 +317,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
317
317
|
className: e,
|
|
318
318
|
...t
|
|
319
319
|
}) => /* @__PURE__ */ a(
|
|
320
|
-
|
|
320
|
+
q,
|
|
321
321
|
{
|
|
322
322
|
className: r(
|
|
323
323
|
"w-full flex flex-col",
|
|
@@ -331,7 +331,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
331
331
|
className: e,
|
|
332
332
|
...t
|
|
333
333
|
}) => /* @__PURE__ */ a(
|
|
334
|
-
|
|
334
|
+
R,
|
|
335
335
|
{
|
|
336
336
|
className: r(s({ slot: "root" }), e),
|
|
337
337
|
...t
|
|
@@ -340,7 +340,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
340
340
|
className: e,
|
|
341
341
|
...t
|
|
342
342
|
}) => /* @__PURE__ */ a(
|
|
343
|
-
|
|
343
|
+
P,
|
|
344
344
|
{
|
|
345
345
|
className: r(s({ slot: "breadcrumbs" }), e),
|
|
346
346
|
...t
|
|
@@ -349,7 +349,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
349
349
|
className: e,
|
|
350
350
|
...t
|
|
351
351
|
}) => /* @__PURE__ */ a(
|
|
352
|
-
|
|
352
|
+
E,
|
|
353
353
|
{
|
|
354
354
|
className: r(s({ slot: "breadcrumbsIcon" }), e),
|
|
355
355
|
...t
|
|
@@ -358,7 +358,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
358
358
|
className: e,
|
|
359
359
|
...t
|
|
360
360
|
}) => /* @__PURE__ */ a(
|
|
361
|
-
|
|
361
|
+
y,
|
|
362
362
|
{
|
|
363
363
|
className: r(s({ slot: "icon" }), e),
|
|
364
364
|
...t
|
|
@@ -367,7 +367,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
367
367
|
className: e,
|
|
368
368
|
...t
|
|
369
369
|
}) => /* @__PURE__ */ a(
|
|
370
|
-
|
|
370
|
+
z,
|
|
371
371
|
{
|
|
372
372
|
className: r(s({ slot: "title" }), e),
|
|
373
373
|
...t
|
|
@@ -376,7 +376,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
376
376
|
className: e,
|
|
377
377
|
...t
|
|
378
378
|
}) => /* @__PURE__ */ a(
|
|
379
|
-
|
|
379
|
+
$,
|
|
380
380
|
{
|
|
381
381
|
className: r(s({ slot: "tag" }), e),
|
|
382
382
|
...t
|
|
@@ -385,7 +385,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
385
385
|
className: e,
|
|
386
386
|
...t
|
|
387
387
|
}) => /* @__PURE__ */ a(
|
|
388
|
-
|
|
388
|
+
w,
|
|
389
389
|
{
|
|
390
390
|
className: r(s({ slot: "description" }), e),
|
|
391
391
|
...t
|
|
@@ -394,7 +394,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
394
394
|
className: e,
|
|
395
395
|
...t
|
|
396
396
|
}) => /* @__PURE__ */ a(
|
|
397
|
-
|
|
397
|
+
f,
|
|
398
398
|
{
|
|
399
399
|
className: r(s({ slot: "descriptionPart" }), e),
|
|
400
400
|
...t
|
|
@@ -403,7 +403,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
403
403
|
className: e,
|
|
404
404
|
...t
|
|
405
405
|
}) => /* @__PURE__ */ a(
|
|
406
|
-
|
|
406
|
+
T,
|
|
407
407
|
{
|
|
408
408
|
className: r(s({ slot: "indicator" }), e),
|
|
409
409
|
...t
|
|
@@ -412,7 +412,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
412
412
|
className: e,
|
|
413
413
|
...t
|
|
414
414
|
}) => /* @__PURE__ */ a(
|
|
415
|
-
|
|
415
|
+
A,
|
|
416
416
|
{
|
|
417
417
|
className: r(
|
|
418
418
|
"flex-1 min-w-0 break-words pt-3 pb-4 pr-10 pl-5",
|
|
@@ -425,7 +425,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
425
425
|
className: e,
|
|
426
426
|
...t
|
|
427
427
|
}) => /* @__PURE__ */ a(
|
|
428
|
-
|
|
428
|
+
O,
|
|
429
429
|
{
|
|
430
430
|
className: r("flex flex-col gap-5", e),
|
|
431
431
|
...t
|
|
@@ -434,7 +434,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
434
434
|
className: e,
|
|
435
435
|
...t
|
|
436
436
|
}) => /* @__PURE__ */ a(
|
|
437
|
-
|
|
437
|
+
B,
|
|
438
438
|
{
|
|
439
439
|
className: r("inline-block", e),
|
|
440
440
|
...t
|
|
@@ -443,7 +443,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
443
443
|
className: e,
|
|
444
444
|
...t
|
|
445
445
|
}) => /* @__PURE__ */ a(
|
|
446
|
-
|
|
446
|
+
V,
|
|
447
447
|
{
|
|
448
448
|
className: r(
|
|
449
449
|
"text-3xl leading-snug tracking-tight",
|
|
@@ -457,7 +457,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
457
457
|
className: e,
|
|
458
458
|
...t
|
|
459
459
|
}) => /* @__PURE__ */ a(
|
|
460
|
-
|
|
460
|
+
W,
|
|
461
461
|
{
|
|
462
462
|
className: r(
|
|
463
463
|
"inline-block ml-2 mb-2 tracking-tight text-gray-500 dark:text-white-alpha-500",
|
|
@@ -469,7 +469,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
469
469
|
className: e,
|
|
470
470
|
...t
|
|
471
471
|
}) => /* @__PURE__ */ a(
|
|
472
|
-
|
|
472
|
+
L,
|
|
473
473
|
{
|
|
474
474
|
className: r(
|
|
475
475
|
s({ slot: "breadcrumbs" }),
|
|
@@ -482,7 +482,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
482
482
|
className: e,
|
|
483
483
|
...t
|
|
484
484
|
}) => /* @__PURE__ */ a(
|
|
485
|
-
|
|
485
|
+
_,
|
|
486
486
|
{
|
|
487
487
|
className: r(s({ slot: "breadcrumbsIcon" }), e),
|
|
488
488
|
...t
|
|
@@ -492,7 +492,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
492
492
|
componentStyles: t,
|
|
493
493
|
...i
|
|
494
494
|
}) => /* @__PURE__ */ a(
|
|
495
|
-
|
|
495
|
+
N,
|
|
496
496
|
{
|
|
497
497
|
className: r(
|
|
498
498
|
"max-w-full text-gray-700 dark:text-gray-dark-100 [&_em]:font-bold [&_em]:not-italic",
|
|
@@ -505,7 +505,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
505
505
|
className: e,
|
|
506
506
|
...t
|
|
507
507
|
}) => /* @__PURE__ */ a(
|
|
508
|
-
|
|
508
|
+
C,
|
|
509
509
|
{
|
|
510
510
|
className: r("flex flex-col gap-3", e),
|
|
511
511
|
...t
|
|
@@ -514,7 +514,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
514
514
|
className: e,
|
|
515
515
|
...t
|
|
516
516
|
}) => /* @__PURE__ */ a(
|
|
517
|
-
|
|
517
|
+
G,
|
|
518
518
|
{
|
|
519
519
|
className: r(
|
|
520
520
|
"text-xs uppercase font-semibold tracking-widest",
|
|
@@ -527,7 +527,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
527
527
|
className: e,
|
|
528
528
|
...t
|
|
529
529
|
}) => /* @__PURE__ */ a(
|
|
530
|
-
|
|
530
|
+
F,
|
|
531
531
|
{
|
|
532
532
|
className: r("flex flex-col gap-4", e),
|
|
533
533
|
...t
|
|
@@ -536,7 +536,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
536
536
|
className: e,
|
|
537
537
|
...t
|
|
538
538
|
}) => /* @__PURE__ */ a(
|
|
539
|
-
|
|
539
|
+
H,
|
|
540
540
|
{
|
|
541
541
|
className: r(
|
|
542
542
|
"flex items-center gap-1 text-gray-600 dark:text-white-alpha-600 font-medium ",
|
|
@@ -550,14 +550,14 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
550
550
|
), pt = ({
|
|
551
551
|
className: e,
|
|
552
552
|
...t
|
|
553
|
-
}) => /* @__PURE__ */ a(
|
|
553
|
+
}) => /* @__PURE__ */ a(D, { className: r(e), ...t }), bt = ({
|
|
554
554
|
className: e,
|
|
555
555
|
...t
|
|
556
|
-
}) => /* @__PURE__ */ a(
|
|
556
|
+
}) => /* @__PURE__ */ a(j, { className: r(e), ...t }), gt = ({
|
|
557
557
|
className: e,
|
|
558
558
|
...t
|
|
559
559
|
}) => /* @__PURE__ */ a(
|
|
560
|
-
|
|
560
|
+
Q,
|
|
561
561
|
{
|
|
562
562
|
className: r("h-3 !min-h-0 !min-w-0", e),
|
|
563
563
|
...t
|
|
@@ -566,7 +566,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
566
566
|
className: e,
|
|
567
567
|
...t
|
|
568
568
|
}) => /* @__PURE__ */ a(
|
|
569
|
-
|
|
569
|
+
p,
|
|
570
570
|
{
|
|
571
571
|
className: r(
|
|
572
572
|
"justify-self-end",
|
|
@@ -579,16 +579,16 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
579
579
|
),
|
|
580
580
|
...t
|
|
581
581
|
}
|
|
582
|
-
),
|
|
582
|
+
), xt = ({
|
|
583
583
|
className: e,
|
|
584
584
|
...t
|
|
585
585
|
}) => /* @__PURE__ */ a(
|
|
586
|
-
|
|
586
|
+
te,
|
|
587
587
|
{
|
|
588
588
|
className: r("flex items-center whitespace-nowrap", e),
|
|
589
589
|
...t
|
|
590
590
|
}
|
|
591
|
-
),
|
|
591
|
+
), vt = ({
|
|
592
592
|
className: e,
|
|
593
593
|
...t
|
|
594
594
|
}) => /* @__PURE__ */ a(
|
|
@@ -601,7 +601,7 @@ const Re = (e) => /* @__PURE__ */ a(ie, { ...e }), ke = ({ className: e, ...t })
|
|
|
601
601
|
className: e,
|
|
602
602
|
...t
|
|
603
603
|
}) => /* @__PURE__ */ a(
|
|
604
|
-
|
|
604
|
+
ae,
|
|
605
605
|
{
|
|
606
606
|
className: r("inline-flex items-center", e),
|
|
607
607
|
...t,
|
|
@@ -621,9 +621,9 @@ export {
|
|
|
621
621
|
we as InputGroup,
|
|
622
622
|
fe as InputIcon,
|
|
623
623
|
Te as Loading,
|
|
624
|
-
|
|
624
|
+
ke as Provider,
|
|
625
625
|
Ce as Results,
|
|
626
|
-
|
|
626
|
+
Fe as ResultsContent,
|
|
627
627
|
De as ResultsEmpty,
|
|
628
628
|
Je as ResultsItem,
|
|
629
629
|
Me as ResultsItemBreadcrumbIcon,
|
|
@@ -651,16 +651,16 @@ export {
|
|
|
651
651
|
Xe as ResultsItemTitle,
|
|
652
652
|
qe as ResultsList,
|
|
653
653
|
He as ResultsLoading,
|
|
654
|
-
|
|
654
|
+
Ge as ResultsScrollArea,
|
|
655
655
|
ze as ResultsScrollAreaCorner,
|
|
656
656
|
We as ResultsScrollAreaScrollbar,
|
|
657
657
|
$e as ResultsScrollAreaThumb,
|
|
658
658
|
Ve as ResultsScrollAreaViewport,
|
|
659
|
-
|
|
660
|
-
|
|
659
|
+
je as ResultsTab,
|
|
660
|
+
Qe as ResultsTabList,
|
|
661
661
|
Ee as Root,
|
|
662
|
-
|
|
662
|
+
xt as TaglineContainer,
|
|
663
663
|
St as TaglineLogo,
|
|
664
|
-
|
|
665
|
-
|
|
664
|
+
vt as TaglineText,
|
|
665
|
+
Re as Wrapper
|
|
666
666
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),n=["Thinking","
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),n=["Thinking","Processing","Analyzing"];function o(){const[i,s]=r.useState(0);return r.useEffect(()=>{const e=setInterval(()=>{s(a=>a+1<n.length?a+1:(clearInterval(e),a))},3500);return()=>clearInterval(e)},[]),t.jsxs("div",{className:"flex items-center space-x-2 font-medium text-sm text-gray-700 dark:text-gray-dark-300","aria-live":"polite",children:[t.jsx("span",{className:"animate-shimmer bg-[linear-gradient(to_bottom_right,_var(--ikp-color-gray-700),_var(--ikp-color-gray-400))] dark:bg-[linear-gradient(to_bottom_right,_var(--ikp-color-gray-dark-300),_var(--ikp-color-gray-dark-100))] bg-clip-text text-transparent",children:n[i]}),t.jsx("div",{className:"flex space-x-1",children:[0,1,2].map(e=>t.jsx("span",{className:"animate-bounce-dot opacity-30",style:{animationDelay:`${e*.2}s`},children:"."},e))})]})}exports.LoadingIndicator=o;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { useState as o, useEffect as l } from "react";
|
|
4
|
-
const r = ["Thinking", "
|
|
4
|
+
const r = ["Thinking", "Processing", "Analyzing"];
|
|
5
5
|
function g() {
|
|
6
6
|
const [n, i] = o(0);
|
|
7
7
|
return l(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),te=require("../../primitives/providers/base-events-provider.cjs"),ae=require("../../primitives/providers/config-provider.cjs"),re=require("../../primitives/providers/message-provider.cjs"),C=require("../../primitives/components/embedded-chat.cjs"),se=require("../../primitives/components/embedded-chat/chat-provider.cjs"),ne=require("merge-anything"),b=require("../utils.cjs"),oe=require("./ui/markdown-styles.cjs"),ie=require("../../primitives/components/embedded-chat/use-stream-processor.cjs"),le=require("./data-summary-group.cjs"),o=require("react"),D=require("./embedded-chat.cjs"),d=require("lucide-react"),U=require("./ui/recipes/button.cjs"),de={"input-streaming":"Pending","input-available":"Running","approval-requested":"Awaiting Approval","approval-responded":"Responded","output-available":"Completed","output-error":"Error","output-denied":"Denied"};function ce(t){if(!t||typeof t!="object")return!1;const a=t;return typeof a.type=="string"&&a.type.startsWith("tool-")}const pe=t=>{if(!t||typeof t!="object"||!("status"in t))return;const a=t.status;return typeof a=="string"?a:void 0},ue=()=>e.jsx("div",{className:"flex space-x-1",children:[0,1,2].map(t=>e.jsx("span",{className:"animate-bounce-dot opacity-30",style:{animationDelay:`${t*.2}s`},children:"."},t))}),V=({name:t,Icon:a,props:i,componentType:n})=>e.jsxs("div",{className:"border rounded-lg bg-gray-50 dark:bg-gray-dark-800 mb-3",children:[e.jsxs("div",{className:"flex justify-between px-4 py-2 text-xs",children:[e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(a,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:t})]}),e.jsx("div",{className:"flex items-center px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-200 dark:bg-white-alpha-200 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:n})]}),e.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono px-4 py-2",children:JSON.stringify(i,null,2)})]}),xe=({name:t,props:a})=>e.jsx(V,{name:t,Icon:d.ComponentIcon,props:a,componentType:"component"}),me=({name:t,props:a})=>e.jsx(V,{name:t,Icon:d.Library,props:a,componentType:"artifact"}),he=({tool:t,componentDef:a,renderText:i,approvalId:n,messagePartsLength:m,setApprovalDelayPending:s,addToolApprovalResponse:u,sendMessage:c,conversationId:g})=>{const l=o.useRef(c);l.current=c;const x=o.useRef(u);x.current=u;const p=o.useRef(s);p.current=s;const h=o.useCallback(async(A=!0)=>{n&&(p.current({partCount:m}),x.current({id:n,approved:A}),await l.current(void 0,{body:{conversationId:g}}))},[n,m,g]),k=o.useMemo(()=>({tool:t,approve:h,renderMarkdown:i}),[t]),T=a?D.DynamicComponent:G;return e.jsx(T,{name:t.type,props:k,componentDef:a})};function B(t){return t===null?e.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500 font-mono font-medium text-1xs",children:"null"}):t===void 0?e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 italic text-xs font-medium",children:"undefined"}):typeof t=="boolean"?e.jsx("span",{className:b.cn("inline-flex font-mono font-semibold items-center px-1 py-0.5 text-1xs rounded-md border",t?"bg-inkeep-expanded-primary-50 border-inkeep-expanded-primary-200 text-inkeep-expanded-primary-600 dark:bg-inkeep-expanded-primary-950 dark:border-inkeep-expanded-primary-600 dark:text-inkeep-expanded-primary-200":"bg-gray-100 dark:bg-white-alpha-50 text-gray-700 dark:text-white-alpha-700"),children:t?"true":"false"}):typeof t=="number"?e.jsx("span",{className:"tabular-nums font-medium text-inkeep-expanded-primary-600 dark:text-inkeep-expanded-primary-200",children:t.toLocaleString()}):typeof t=="string"?e.jsx("span",{className:"text-gray-800 dark:text-white-alpha-800 break-words",children:t}):e.jsx("span",{children:String(t)})}const F=({name:t,value:a,isArrayIndex:i,depth:n=0})=>{const[m,s]=o.useState(n<1),u=a!==null&&typeof a=="object"&&!Array.isArray(a),c=Array.isArray(a);if(!(u||c))return e.jsxs("div",{className:"flex items-baseline gap-2 py-1 text-xs",children:[e.jsx("span",{className:b.cn("font-medium shrink-0",i?"text-gray-300 dark:text-white-alpha-300":"text-gray-500 dark:text-white-alpha-500"),children:i?"—":t}),e.jsx("span",{children:B(a)})]});const l=c?a.map((p,h)=>[String(h),p]):Object.entries(a);return l.length===0?e.jsxs("div",{className:"flex items-baseline gap-2 py-1 text-xs",children:[e.jsx("span",{className:"font-medium text-gray-500 dark:text-white-alpha-500 shrink-0",children:t}),e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 italic",children:c?"empty list":"empty"})]}):e.jsxs("div",{children:[e.jsxs("button",{type:"button",onClick:p=>{p.stopPropagation(),s(!m)},className:"flex items-center gap-1.5 py-1 text-xs hover:bg-gray-50 dark:hover:bg-white-alpha-50 -mx-1.5 px-1.5 rounded transition-colors w-full text-left",children:[e.jsx(d.ChevronDown,{className:b.cn("h-3.5 w-3.5 text-gray-400 dark:text-white-alpha-400 shrink-0 transition-transform",!m&&"-rotate-90")}),e.jsx("span",{className:"font-medium text-gray-500 dark:text-white-alpha-500",children:t}),!m&&e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 text-1xs ml-1",children:c?`${l.length} item${l.length!==1?"s":""}`:`${l.length} field${l.length!==1?"s":""}`})]}),m&&e.jsx("div",{className:"border-l-2 border-gray-200 dark:border-white-alpha-200 ml-1.5 pl-3",children:l.map(([p,h])=>e.jsx(F,{name:p,value:h,isArrayIndex:c,depth:n+1},p))})]})},fe=({value:t})=>{if(t==null||typeof t!="object")return e.jsx("span",{className:"text-xs",children:B(t)});const a=Array.isArray(t)?t.map((i,n)=>[String(n),i]):Object.entries(t);return a.length===0?e.jsx("div",{className:"text-xs text-gray-400 dark:text-white-alpha-400 italic",children:"No arguments"}):e.jsx("div",{className:"space-y-1",children:a.map(([i,n])=>e.jsx(F,{name:i,value:n,isArrayIndex:Array.isArray(t)},i))})},G=({props:t})=>{const{tool:a,approve:i}=t,n=a.type,m=n.startsWith("tool-")?n.slice(5):n,s=a.state,u=a.approval?.id,c=!!u,g=s==="approval-requested",l=pe(a.output),[x,p]=o.useState(c),h=s?de[s]??s:"tool";o.useEffect(()=>{g&&p(!0)},[g]);const k=()=>{switch(s){case"input-streaming":return e.jsx(d.Circle,{className:"w-3 h-3"});case"input-available":return e.jsx(d.Loader2,{className:"w-3 h-3 animate-spin"});case"approval-requested":return e.jsx(d.Clock,{className:"w-3 h-3"});case"approval-responded":return e.jsx(d.CheckCircle,{className:"w-3 h-3"});case"output-available":return e.jsx(d.CheckCircle,{className:"w-3 h-3"});case"output-error":return e.jsx(d.TriangleAlert,{className:"w-3 h-3"});case"output-denied":return e.jsx(d.XCircle,{className:"w-3 h-3"});default:return null}};return e.jsxs("div",{className:"border rounded-lg mb-3 overflow-hidden",children:[e.jsxs("button",{type:"button",className:"inline-flex items-center group gap-2 text-xs text-gray-700 dark:text-white-alpha-700 hover:text-gray-800 dark:hover:text-white-alpha-800 transition-colors cursor-pointer w-full justify-between px-4 py-2 data-[expanded=true]:border-b",onClick:()=>p(!x),"aria-expanded":x,"data-expanded":x,children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(d.Hammer,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:m})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-100 dark:bg-white-alpha-100 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:[k(),h]}),e.jsx(d.ChevronDown,{className:"w-3.5 h-3.5 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform rotate-0 group-data-[expanded=true]:rotate-180"})]})]}),e.jsxs("div",{"data-expanded":x,className:b.cn("overflow-hidden transition-all duration-300 ease-in-out data-[expanded=true]:opacity-100 data-[expanded=false]:max-h-0 data-[expanded=false]:opacity-0 max-w-full"),children:[e.jsx("div",{"data-expanded":x,className:b.cn("relative",'before:content-[""] before:absolute before:inset-x-0 before:top-0 before:h-3 before:pointer-events-none before:z-10','after:content-[""] after:absolute after:inset-x-0 after:bottom-0 after:h-3 after:pointer-events-none after:z-10',"before:bg-[linear-gradient(white,_transparent)] after:bg-[linear-gradient(transparent,_white)]","dark:before:bg-[linear-gradient(var(--ikp-color-gray-dark-950),_transparent)] dark:after:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))]","data-[expanded=false]:before:opacity-0 data-[expanded=false]:after:opacity-0"),children:e.jsx("div",{"data-expanded":x,className:b.cn("[scrollbar-width:thin] px-4","data-[expanded=true]:max-h-48 data-[expanded=true]:overflow-y-auto"),children:a.input!=null&&e.jsx("div",{className:"text-xs py-2",children:e.jsx(fe,{value:a.input})})})}),g&&u&&e.jsxs("div",{className:"flex justify-end gap-2 pt-1 pb-3 px-4",children:[e.jsx("button",{type:"button",className:b.cn(U.button({size:"xs",variant:"outline"}),"px-2 py-1 rounded-md text-xs text-gray-700 dark:text-white-alpha-700"),onClick:()=>i(!1),children:"Deny"}),e.jsxs("button",{type:"button",className:b.cn(U.button({size:"xs",variant:"primaryFilled"}),"px-2 py-1 rounded-md text-xs gap-1"),onClick:()=>i(!0),children:[e.jsx(d.Check,{className:"w-3 h-3"}),"Approve"]})]}),s==="output-available"&&l&&a.output!=null&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize pb-3 px-4",children:[l==="approved"&&e.jsx(d.Check,{className:"w-3 h-3"}),l]}),s==="output-denied"&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize pb-3 px-4",children:[e.jsx(d.X,{className:"w-3 h-3"}),h]})]})]})},ge=({className:t,componentStyles:a,children:i,isLast:n,...m})=>{const{message:s}=re.useMessage(),{logEvent:u}=te.useBaseEvents(),{conversationId:c,isStreaming:g,isLoading:l,setError:x,addToolApprovalResponse:p,sendMessage:h}=se.useChat(),{aiChatSettings:{components:k,artifacts:T,headers:A}}=ae.useInkeepConfig(),K=A?.["x-emit-operations"]==="true",R=s.role==="user",W=(g||l)&&n&&s.role==="assistant",{processedParts:X,summaryTimings:H,shouldShowInitialLoading:J,shouldShowStreamDelayLoading:Q}=ie.useStreamProcessor(s.parts,W,x),[S,$]=o.useState(null),[Y,E]=o.useState(!1),y=o.useRef(null);o.useEffect(()=>{if(!S){E(!1),y.current&&(clearTimeout(y.current),y.current=null);return}return E(!1),y.current&&clearTimeout(y.current),y.current=window.setTimeout(()=>{E(!0)},1e3),()=>{y.current&&(clearTimeout(y.current),y.current=null)}},[S]),o.useEffect(()=>{S&&(!n||s.parts.length>S.partCount)&&$(null)},[S,n,s.parts.length]);const _=o.useMemo(()=>s.parts.filter(r=>r.type==="data-artifact"&&r.data?.type?.toLowerCase()==="citation"),[s.parts]),I=o.useMemo(()=>ne.merge(oe.markdownStyles,a??{}),[a]),O=o.useCallback((r,f)=>{u({eventName:"assistant_message_inline_link_opened",properties:{title:f?.toString(),url:r}})},[u]),z=o.useCallback((r,f)=>{u({eventName:"assistant_code_block_copied",properties:{conversationId:c,language:r,code:f}})},[u,c]),M=o.useCallback(r=>e.jsx(C.EmbeddedChatPrimitiveMarkdown,{text:r,componentStyles:I,onLinkClick:O,onCodeCopy:z,artifacts:_}),[I,O,z,_]),Z=o.useMemo(()=>b.cn("data-[role=user]:whitespace-pre-wrap mb-3 data-[role=user]:mb-0 [&[data-role=user]>p]:mb-0 max-w-full",t),[t]),ee=!R||s.parts.some(r=>r.type==="text"&&r.text?.trim());return e.jsxs(e.Fragment,{children:[!ee&&e.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500",children:"No message content"}),X.map((r,f)=>{const v={"data-role":s.role,"data-type":r?.type==="data-component"?r.data.type:r?.type,...m,className:Z};switch(r?.type){case"text":return e.jsx(C.PrimitiveMessagePart,{...v,children:R?r.text:M(r.text||"")},f);case"data-component":{const{type:j}=r.data;switch(j){case"text":return e.jsx("div",{...v,children:M(r.data.text||"")},f);default:{const N=r.data,{name:w,props:q}=N,P=k?.[w],L=P?D.DynamicComponent:xe;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(L,{name:w,props:q,componentDef:P})},`${w}-${f}`)}}}case"data-artifact":{const j=r.data,{name:N,type:w,artifactSummary:q}=j,P=T?.[w],L=P?D.DynamicComponent:me;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(L,{name:w,props:q,componentDef:P})},`${N}-${f}`)}case"summary-group":{const j=H.get(r.groupKey)||{isCompleted:!1};return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(le.DataSummaryGroup,{summaries:r.summaries||[],isCompleted:j.isCompleted})},`${r.groupKey}-${f}`)}default:{if(!ce(r))return null;const j=r,N=r.approval?.id;return K||N?e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(he,{tool:j,componentDef:k?.IkpTool,renderText:M,approvalId:N,messagePartsLength:s.parts.length,setApprovalDelayPending:$,addToolApprovalResponse:p,sendMessage:h,conversationId:c})},r.toolCallId??`${r.type}-${f}`):null}}}),J&&e.jsx(D.MessageLoading,{}),(Q||Y)&&e.jsx(ue,{})]})};exports.DefaultToolComponent=G;exports.EmbeddedChatMessagePart=ge;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),ae=require("../../primitives/providers/base-events-provider.cjs"),re=require("../../primitives/providers/config-provider.cjs"),se=require("../../primitives/providers/message-provider.cjs"),C=require("../../primitives/components/embedded-chat.cjs"),ne=require("../../primitives/components/embedded-chat/chat-provider.cjs"),oe=require("../../primitives/utils/misc.cjs"),ie=require("merge-anything"),b=require("../utils.cjs"),le=require("./ui/markdown-styles.cjs"),de=require("../../primitives/components/embedded-chat/use-stream-processor.cjs"),ce=require("./data-summary-group.cjs"),o=require("react"),T=require("./embedded-chat.cjs"),d=require("lucide-react"),V=require("./ui/recipes/button.cjs"),pe={"input-streaming":"Pending","input-available":"Running","approval-requested":"Awaiting Approval","approval-responded":"Responded","output-available":"Completed","output-error":"Error","output-denied":"Denied"};function ue(t){if(!t||typeof t!="object")return!1;const a=t;return typeof a.type=="string"&&a.type.startsWith("tool-")}const me=t=>{if(!t||typeof t!="object"||!("status"in t))return;const a=t.status;return typeof a=="string"?a:void 0},xe=()=>e.jsx("div",{className:"flex space-x-1",children:[0,1,2].map(t=>e.jsx("span",{className:"animate-bounce-dot opacity-30",style:{animationDelay:`${t*.2}s`},children:"."},t))}),B=({name:t,Icon:a,props:i,componentType:n})=>e.jsxs("div",{className:"border rounded-lg bg-gray-50 dark:bg-gray-dark-800 mb-3",children:[e.jsxs("div",{className:"flex justify-between px-4 py-2 text-xs",children:[e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(a,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:t})]}),e.jsx("div",{className:"flex items-center px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-200 dark:bg-white-alpha-200 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:n})]}),e.jsx("div",{className:"px-4 py-2",children:e.jsx(K,{value:i})})]}),he=({name:t,props:a})=>e.jsx(B,{name:t,Icon:d.ComponentIcon,props:a,componentType:"component"}),fe=({name:t,props:a})=>e.jsx(B,{name:t,Icon:d.Library,props:a,componentType:"artifact"}),ge=({tool:t,componentDef:a,renderText:i,approvalId:n,messagePartsLength:x,setApprovalDelayPending:s,addToolApprovalResponse:u,sendMessage:c,conversationId:g})=>{const l=o.useRef(c);l.current=c;const m=o.useRef(u);m.current=u;const p=o.useRef(s);p.current=s;const h=o.useCallback(async(E=!0)=>{n&&(p.current({partCount:x}),m.current({id:n,approved:E}),await l.current(void 0,{body:{conversationId:g}}))},[n,x,g]),k=o.useMemo(()=>({tool:t,approve:h,renderMarkdown:i}),[t]),A=a?T.DynamicComponent:W;return e.jsx(A,{name:t.type,props:k,componentDef:a})};function F(t){return t===null?e.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500 font-mono font-medium text-1xs",children:"null"}):t===void 0?e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 italic text-xs font-medium",children:"undefined"}):typeof t=="boolean"?e.jsx("span",{className:b.cn("inline-flex font-mono font-semibold items-center px-1 py-0.5 text-1xs rounded-md border",t?"bg-inkeep-expanded-primary-50 border-inkeep-expanded-primary-200 text-inkeep-expanded-primary-600 dark:bg-inkeep-expanded-primary-950 dark:border-inkeep-expanded-primary-600 dark:text-inkeep-expanded-primary-200":"bg-gray-100 dark:bg-white-alpha-50 text-gray-700 dark:text-white-alpha-700"),children:t?"true":"false"}):typeof t=="number"?e.jsx("span",{className:"tabular-nums font-medium text-inkeep-expanded-primary-600 dark:text-inkeep-expanded-primary-200",children:t.toLocaleString()}):typeof t=="string"?e.jsx("span",{className:"text-gray-800 dark:text-white-alpha-800 break-words",children:t}):e.jsx("span",{children:String(t)})}const G=({name:t,value:a,isArrayIndex:i,depth:n=0})=>{const[x,s]=o.useState(n<1),u=a!==null&&typeof a=="object"&&!Array.isArray(a),c=Array.isArray(a);if(!(u||c))return e.jsxs("div",{className:"flex items-baseline gap-2 py-1 text-xs",children:[e.jsx("span",{className:b.cn("font-medium shrink-0",i?"text-gray-300 dark:text-white-alpha-300":"text-gray-500 dark:text-white-alpha-500"),children:i?"—":t}),e.jsx("span",{className:"min-w-0",children:F(a)})]});const l=c?a.map((p,h)=>[String(h),p]):Object.entries(a);return l.length===0?e.jsxs("div",{className:"flex items-baseline gap-2 py-1 text-xs",children:[e.jsx("span",{className:"font-medium text-gray-500 dark:text-white-alpha-500 shrink-0",children:t}),e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 italic",children:c?"empty list":"empty"})]}):e.jsxs("div",{children:[e.jsxs("button",{type:"button",onClick:p=>{p.stopPropagation(),s(!x)},className:"flex items-center gap-1.5 py-1 text-xs hover:bg-gray-50 dark:hover:bg-white-alpha-50 -mx-1.5 px-1.5 rounded transition-colors w-full text-left",children:[e.jsx(d.ChevronDown,{className:b.cn("h-3.5 w-3.5 text-gray-400 dark:text-white-alpha-400 shrink-0 transition-transform",!x&&"-rotate-90")}),e.jsx("span",{className:"font-medium text-gray-500 dark:text-white-alpha-500",children:t}),!x&&e.jsx("span",{className:"text-gray-400 dark:text-white-alpha-400 text-1xs ml-1",children:c?`${l.length} item${l.length!==1?"s":""}`:`${l.length} field${l.length!==1?"s":""}`})]}),x&&e.jsx("div",{className:"border-l-2 border-gray-200 dark:border-white-alpha-200 ml-1.5 pl-3",children:l.map(([p,h])=>e.jsx(G,{name:p,value:h,isArrayIndex:c,depth:n+1},p))})]})},K=({value:t})=>{if(t==null||typeof t!="object")return e.jsx("span",{className:"text-xs",children:F(t)});const a=Array.isArray(t)?t.map((i,n)=>[String(n),i]):Object.entries(t);return a.length===0?e.jsx("div",{className:"text-xs text-gray-400 dark:text-white-alpha-400 italic",children:"No arguments"}):e.jsx("div",{className:"space-y-1",children:a.map(([i,n])=>e.jsx(G,{name:i,value:n,isArrayIndex:Array.isArray(t)},i))})},W=({props:t})=>{const{tool:a,approve:i}=t,n=a.type,x=n.startsWith("tool-")?n.slice(5):n,s=a.state,u=a.approval?.id,c=!!u,g=s==="approval-requested",l=me(a.output),[m,p]=o.useState(c),h=s?pe[s]??s:"tool";o.useEffect(()=>{g&&p(!0)},[g]);const k=()=>{switch(s){case"input-streaming":return e.jsx(d.Circle,{className:"w-3 h-3"});case"input-available":return e.jsx(d.Loader2,{className:"w-3 h-3 animate-spin"});case"approval-requested":return e.jsx(d.Clock,{className:"w-3 h-3"});case"approval-responded":return e.jsx(d.CheckCircle,{className:"w-3 h-3"});case"output-available":return e.jsx(d.CheckCircle,{className:"w-3 h-3"});case"output-error":return e.jsx(d.TriangleAlert,{className:"w-3 h-3"});case"output-denied":return e.jsx(d.XCircle,{className:"w-3 h-3"});default:return null}};return e.jsxs("div",{className:"border rounded-lg mb-3 overflow-hidden",children:[e.jsxs("button",{type:"button",className:"inline-flex items-center group gap-2 text-xs text-gray-700 dark:text-white-alpha-700 hover:text-gray-800 dark:hover:text-white-alpha-800 transition-colors cursor-pointer w-full justify-between px-4 py-2 data-[expanded=true]:border-b",onClick:()=>p(!m),"aria-expanded":m,"data-expanded":m,children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(d.Hammer,{className:"w-3 h-3 text-gray-600 dark:text-white-alpha-600"}),e.jsx("span",{children:x})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-100 dark:bg-white-alpha-100 font-medium text-gray-700 dark:text-white-alpha-700 font-mono",children:[k(),h]}),e.jsx(d.ChevronDown,{className:"w-3.5 h-3.5 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform rotate-0 group-data-[expanded=true]:rotate-180"})]})]}),e.jsxs("div",{"data-expanded":m,className:b.cn("overflow-hidden transition-all duration-300 ease-in-out data-[expanded=true]:opacity-100 data-[expanded=false]:max-h-0 data-[expanded=false]:opacity-0 max-w-full"),children:[e.jsx("div",{"data-expanded":m,className:b.cn("relative",'before:content-[""] before:absolute before:inset-x-0 before:top-0 before:h-3 before:pointer-events-none before:z-10','after:content-[""] after:absolute after:inset-x-0 after:bottom-0 after:h-3 after:pointer-events-none after:z-10',"before:bg-[linear-gradient(white,_transparent)] after:bg-[linear-gradient(transparent,_white)]","dark:before:bg-[linear-gradient(var(--ikp-color-gray-dark-950),_transparent)] dark:after:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))]","data-[expanded=false]:before:opacity-0 data-[expanded=false]:after:opacity-0"),children:e.jsx("div",{"data-expanded":m,className:b.cn("[scrollbar-width:thin] px-4","data-[expanded=true]:max-h-48 data-[expanded=true]:overflow-y-auto"),children:a.input!=null&&e.jsx("div",{className:"text-xs py-2",children:e.jsx(K,{value:a.input})})})}),g&&u&&e.jsxs("div",{className:"flex justify-end gap-2 pt-1 pb-3 px-4",children:[e.jsx("button",{type:"button",className:b.cn(V.button({size:"xs",variant:"outline"}),"px-2 py-1 rounded-md text-xs text-gray-700 dark:text-white-alpha-700"),onClick:()=>i(!1),children:"Deny"}),e.jsxs("button",{type:"button",className:b.cn(V.button({size:"xs",variant:"primaryFilled"}),"px-2 py-1 rounded-md text-xs gap-1"),onClick:()=>i(!0),children:[e.jsx(d.Check,{className:"w-3 h-3"}),"Approve"]})]}),s==="output-available"&&l&&a.output!=null&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize pb-3 px-4",children:[l==="approved"&&e.jsx(d.Check,{className:"w-3 h-3"}),l]}),s==="output-denied"&&e.jsxs("div",{className:"flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize pb-3 px-4",children:[e.jsx(d.X,{className:"w-3 h-3"}),h]})]})]})},ye=({className:t,componentStyles:a,children:i,isLast:n,...x})=>{const{message:s}=se.useMessage(),{logEvent:u}=ae.useBaseEvents(),{conversationId:c,isStreaming:g,isLoading:l,setError:m,addToolApprovalResponse:p,sendMessage:h}=ne.useChat(),{aiChatSettings:{components:k,artifacts:A,headers:E}}=re.useInkeepConfig(),X=E?.["x-emit-operations"]==="true",$=s.role==="user",q=(g||l)&&n&&s.role==="assistant",{processedParts:H,summaryTimings:J,shouldShowInitialLoading:Q,shouldShowStreamDelayLoading:Y}=de.useStreamProcessor(s.parts,q,m),[S,_]=o.useState(null),[Z,M]=o.useState(!1),y=o.useRef(null);o.useEffect(()=>{if(!S){M(!1),y.current&&(clearTimeout(y.current),y.current=null);return}return M(!1),y.current&&clearTimeout(y.current),y.current=window.setTimeout(()=>{M(!0)},1e3),()=>{y.current&&(clearTimeout(y.current),y.current=null)}},[S]),o.useEffect(()=>{S&&(!n||s.parts.length>S.partCount||!q)&&_(null)},[S,n,s.parts.length,q]);const I=o.useMemo(()=>s.parts.filter(oe.isCitationArtifact),[s.parts]),O=o.useMemo(()=>ie.merge(le.markdownStyles,a??{}),[a]),z=o.useCallback((r,f)=>{u({eventName:"assistant_message_inline_link_opened",properties:{title:f?.toString(),url:r}})},[u]),U=o.useCallback((r,f)=>{u({eventName:"assistant_code_block_copied",properties:{conversationId:c,language:r,code:f}})},[u,c]),R=o.useCallback(r=>e.jsx(C.EmbeddedChatPrimitiveMarkdown,{text:r,componentStyles:O,onLinkClick:z,onCodeCopy:U,artifacts:I}),[O,z,U,I]),ee=o.useMemo(()=>b.cn("data-[role=user]:whitespace-pre-wrap mb-3 data-[role=user]:mb-0 [&[data-role=user]>p]:mb-0 max-w-full",t),[t]),te=!$||s.parts.some(r=>r.type==="text"&&r.text?.trim());return e.jsxs(e.Fragment,{children:[!te&&e.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500",children:"No message content"}),H.map((r,f)=>{const v={"data-role":s.role,"data-type":r?.type==="data-component"?r.data.type:r?.type,...x,className:ee};switch(r?.type){case"text":return e.jsx(C.PrimitiveMessagePart,{...v,children:$?r.text:R(r.text||"")},f);case"data-component":{const{type:w}=r.data;switch(w){case"text":return e.jsx("div",{...v,children:R(r.data.text||"")},f);default:{const N=r.data,{name:j,props:D}=N,P=k?.[j],L=P?T.DynamicComponent:he;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(L,{name:j,props:D,componentDef:P})},`${j}-${f}`)}}}case"data-artifact":{const w=r.data,{name:N,type:j,artifactSummary:D}=w;if(j==="citation"&&!D?.url)return null;const P=A?.[j],L=P?T.DynamicComponent:fe;return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(L,{name:j,props:D,componentDef:P})},`${N}-${f}`)}case"summary-group":{const w=J.get(r.groupKey)||{isCompleted:!1};return e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(ce.DataSummaryGroup,{summaries:r.summaries||[],isCompleted:w.isCompleted})},`${r.groupKey}-${f}`)}default:{if(!ue(r))return null;const w=r,N=r.approval?.id;return X||N?e.jsx(C.PrimitiveMessagePart,{...v,children:e.jsx(ge,{tool:w,componentDef:k?.IkpTool,renderText:R,approvalId:N,messagePartsLength:s.parts.length,setApprovalDelayPending:_,addToolApprovalResponse:p,sendMessage:h,conversationId:c})},r.toolCallId??`${r.type}-${f}`):null}}}),Q&&e.jsx(T.MessageLoading,{}),(Y||Z)&&e.jsx(xe,{})]})};exports.DefaultToolComponent=W;exports.EmbeddedChatMessagePart=ye;
|