@brainfish-ai/components 0.34.1 → 0.34.3

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggestion-card.C32KfQa5.js","sources":["../../../src/scenes/knowledge-review/review-list/edit-count.tsx","../../../src/scenes/knowledge-review/status-source-summary.tsx","../../../src/scenes/knowledge-review/review-list/review-list-item.tsx","../../../src/scenes/knowledge-review/context.tsx","../../../src/scenes/knowledge-review/review-list/review-list.tsx","../../../src/scenes/knowledge-review/suggestion-card/suggestion-card.tsx"],"sourcesContent":["import React from 'react';\nimport { Circle } from '@phosphor-icons/react';\n\nexport function EditCount({ count }: { count: number }) {\n return (\n <span className=\"inline-flex items-center gap-1 p-1\">\n <Circle size={8} weight=\"fill\" aria-hidden=\"true\" className=\"text-blue\" />\n <span className=\"text-xs leading-4 text-subtle\">\n {count} {count === 1 ? 'edit' : 'edits'}\n </span>\n </span>\n );\n}\n","import * as React from 'react';\n\nimport { EditCount } from './review-list/edit-count';\n\nimport { StatusBadge } from '@/components/convos/status-badge';\nimport { Button } from '@/components/ui/button';\nimport { cn } from '@/lib/utils';\n\nexport interface StatusSourceSummaryProps {\n isNew?: boolean;\n isAccepted?: boolean;\n editCount?: number;\n sourceIcon?: React.ReactNode;\n sourceDescription?: string | null;\n onSourceLinkClick?: () => void;\n sourceLabel?: string;\n className?: string;\n}\n\nexport function StatusSourceSummary({\n isNew,\n isAccepted,\n editCount,\n sourceIcon,\n sourceDescription,\n onSourceLinkClick,\n sourceLabel = 'Open source',\n className,\n}: StatusSourceSummaryProps) {\n let status: React.ReactNode | undefined;\n if (isAccepted) {\n status = <StatusBadge variant=\"accepted\">Accepted</StatusBadge>;\n } else if (isNew) {\n status = (\n <StatusBadge variant=\"success\" surface=\"transparent\">\n New\n </StatusBadge>\n );\n } else if (editCount) {\n status = <EditCount count={editCount} />;\n }\n\n if (!status && !sourceIcon && !sourceDescription) {\n return null;\n }\n\n return (\n <span className={cn('flex items-center gap-1 leading-4 min-w-0', className)}>\n {status && <span className=\"shrink-0 flex items-center\">{status}</span>}\n {sourceDescription &&\n (onSourceLinkClick ? (\n <Button\n variant=\"link\"\n onClick={onSourceLinkClick}\n aria-label={sourceLabel}\n className=\"[&_svg]:size-4 h-auto p-0 text-xs font-normal text-subtle gap-1\"\n >\n {sourceIcon && <span className=\"shrink-0 flex items-center\">{sourceIcon}</span>}\n <span className=\"truncate\">{sourceDescription}</span>\n </Button>\n ) : (\n <span className=\"[&_svg]:size-4 flex items-center gap-1 text-xs text-subtle min-w-0\">\n {sourceIcon && <span className=\"shrink-0 flex items-center\">{sourceIcon}</span>}\n <span className=\"truncate\">{sourceDescription}</span>\n </span>\n ))}\n </span>\n );\n}\n","import * as React from 'react';\n\nimport { StatusSourceSummary } from '../status-source-summary';\n\nimport { cn } from '@/lib/utils';\nimport { formatDistance } from '@/lib/formatDate';\n\nexport interface ReviewListItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Unique identifier for the knowledge article */\n id: string;\n /** Primary text displayed in the first row */\n title: string;\n /** Content rendered in the top-right corner (e.g. relative timestamp) */\n timestamp: Date;\n /** Icon rendered at the start of the second row */\n icon?: React.ReactNode;\n /** Text or content next to the icon in the second row */\n description?: string | null;\n /** Whether this item is new */\n isNew?: boolean;\n /** Whether this item has been accepted (e.g. accepted as draft) */\n isAccepted?: boolean;\n /** Number of edits for this item */\n editCount?: number;\n /** Whether this item is currently selected */\n isSelected?: boolean;\n}\n\nexport const ReviewListItem = React.forwardRef<HTMLButtonElement, ReviewListItemProps>(function ReviewListItem(\n { title, timestamp, icon, description, isNew, isAccepted, editCount, isSelected = false, className, ...props },\n ref,\n) {\n return (\n <button\n {...props}\n ref={ref}\n type=\"button\"\n aria-pressed={isSelected}\n className={cn(\n 'relative flex w-full flex-col gap-1 bg-surface rounded p-4 cursor-pointer transition-colors text-left border border-transparent',\n isSelected\n ? [\n 'shadow-[0px_1px_3px_0px_rgba(95,95,95,0.26)]',\n 'after:content-[\"\"] after:block after:absolute after:right-[-2px] after:top-1/2 after:-translate-y-1/2 after:w-1 after:h-14 after:rounded-sm after:bg-primary',\n ]\n : 'hover:bg-dark-100 hover:border-dark-300',\n className,\n )}\n >\n {/* Row 1: Title + Timestamp */}\n <span className=\"flex items-center justify-between w-full gap-2\">\n <span className={cn('text-sm text-default truncate min-w-0 flex-1', isSelected ? 'font-bold' : 'font-normal')}>\n {title}\n </span>\n {timestamp && <span className=\"text-xs leading-4 text-subtlest shrink-0\">{formatDistance(timestamp)}</span>}\n </span>\n\n {/* Row 2: Status + Icon + Description */}\n <StatusSourceSummary\n isNew={isNew}\n isAccepted={isAccepted}\n editCount={editCount}\n sourceIcon={icon}\n sourceDescription={description}\n />\n </button>\n );\n});\n","import React, { createContext, useCallback, useContext, useMemo, useState } from 'react';\n\nimport type { ReviewListItemProps } from './review-list/review-list-item';\n\n/** Passed to `onAcceptAndPublish` from the split Accept dropdown (public vs internal). */\nexport type AcceptAndPublishVisibility = 'public' | 'internal';\n\nexport type LoadedDiffDoc = {\n isNew: boolean;\n diffTitle: string;\n diffContent: React.ReactNode;\n};\n\ntype ReviewsSelectionValue = {\n selectedItem: ReviewListItemProps | null;\n setSelectedItem: (item: ReviewListItemProps | null) => void;\n loadedDiffDoc: LoadedDiffDoc | null;\n setLoadedDiffDoc: (doc: LoadedDiffDoc | null) => void;\n loadingDiff: boolean;\n setLoadingDiff: (loading: boolean) => void;\n onApproveAllSuggestions: () => void | Promise<void>;\n onRejectAllSuggestions: () => void | Promise<void>;\n onAcceptAndPublish?: (visibility: AcceptAndPublishVisibility) => void | Promise<void>;\n onApplyAllInEditor?: () => Promise<void> | void;\n onRejectAllInEditor?: () => Promise<void> | void;\n onOpenArticleLink?: () => void;\n onSourceLinkClick?: () => void;\n breadcrumb?: string;\n suggestionReasonBody?: string;\n /** When true, omit the \"publish publicly\" item from the Accept & publish menu. */\n hideAcceptAndPublishPublic?: boolean;\n};\n\nconst ReviewsContext = createContext<ReviewsSelectionValue | null>(null);\n\nexport type ReviewsProviderProps = {\n children: React.ReactNode;\n /** Optional initial selection (e.g. from server or mock data) */\n defaultSelectedItem?: ReviewListItemProps | null;\n onApproveAllSuggestions: () => void | Promise<void>;\n onRejectAllSuggestions: () => void | Promise<void>;\n onAcceptAndPublish?: (visibility: AcceptAndPublishVisibility) => void | Promise<void>;\n onApplyAllInEditor?: () => Promise<void> | void;\n onRejectAllInEditor?: () => Promise<void> | void;\n onOpenArticleLink?: () => void;\n onSourceLinkClick?: () => void;\n breadcrumb?: string;\n suggestionReasonBody?: string;\n hideAcceptAndPublishPublic?: boolean;\n};\n\nexport function ReviewsSelectionProvider({\n children,\n defaultSelectedItem = null,\n onApproveAllSuggestions,\n onRejectAllSuggestions,\n onAcceptAndPublish,\n onApplyAllInEditor,\n onRejectAllInEditor,\n onOpenArticleLink,\n onSourceLinkClick,\n breadcrumb,\n suggestionReasonBody,\n hideAcceptAndPublishPublic = false,\n}: ReviewsProviderProps) {\n const [userSelectedItem, setUserSelectedItem] = useState<ReviewListItemProps | null>(null);\n const selectedItem = userSelectedItem ?? defaultSelectedItem;\n\n const [loadedDiffDoc, setLoadedDiffDoc] = useState<LoadedDiffDoc | null>(null);\n\n const [loadingDiff, setLoadingDiff] = useState(false);\n\n const handleSelect = useCallback((item: ReviewListItemProps | null) => setUserSelectedItem(item), []);\n const value = useMemo<ReviewsSelectionValue>(\n () => ({\n selectedItem,\n setSelectedItem: handleSelect,\n loadedDiffDoc,\n setLoadedDiffDoc,\n loadingDiff,\n setLoadingDiff,\n onApproveAllSuggestions,\n onRejectAllSuggestions,\n onAcceptAndPublish,\n onApplyAllInEditor,\n onRejectAllInEditor,\n onOpenArticleLink,\n onSourceLinkClick,\n breadcrumb,\n suggestionReasonBody,\n hideAcceptAndPublishPublic,\n }),\n [\n selectedItem,\n handleSelect,\n loadedDiffDoc,\n loadingDiff,\n onApproveAllSuggestions,\n onRejectAllSuggestions,\n onAcceptAndPublish,\n onApplyAllInEditor,\n onRejectAllInEditor,\n onOpenArticleLink,\n onSourceLinkClick,\n breadcrumb,\n suggestionReasonBody,\n hideAcceptAndPublishPublic,\n ],\n );\n\n return <ReviewsContext.Provider value={value}>{children}</ReviewsContext.Provider>;\n}\n\nexport function useReviewsSelection(): ReviewsSelectionValue {\n const ctx = useContext(ReviewsContext);\n if (!ctx) {\n throw new Error('useReviewsSelection must be used within ReviewsSelectionProvider');\n }\n\n return ctx;\n}\n","import React, { forwardRef } from 'react';\n\nimport { ReviewListItem, ReviewListItemProps } from './review-list-item';\nimport { useReviewsSelection } from '../context';\n\nimport { cn } from '@/lib/utils';\n\ninterface ReviewListProps {\n items: ReviewListItemProps[];\n className?: string;\n}\n\nexport const ReviewList = forwardRef<HTMLUListElement, ReviewListProps>(({ items, className, ...props }, ref) => {\n const { selectedItem, setSelectedItem } = useReviewsSelection();\n\n return (\n <ul\n ref={ref}\n className={cn(\n 'min-w-0 w-full overflow-hidden bg-muted border border-dark-300 rounded-lg p-2 space-y-2 list-none m-0',\n className,\n )}\n {...props}\n >\n {items.map((item) => (\n <li key={item.id}>\n <ReviewListItem {...item} isSelected={selectedItem?.id === item.id} onClick={() => setSelectedItem(item)} />\n </li>\n ))}\n </ul>\n );\n});\nReviewList.displayName = 'ReviewList';\n","import * as React from 'react';\nimport { CaretDown, CaretUp, CheckCircle, XCircle } from '@phosphor-icons/react';\n\nimport { Button } from '@/components/ui/button';\nimport { ScrollArea } from '@/components/ui/scroll-area';\nimport { brandShadowEffect } from '@/lib/styles';\nimport { cn } from '@/lib/utils';\n\nexport interface SuggestionCardSource {\n /** Eyebrow label, e.g. \"1 day ago from\" — rendered uppercase by the card. */\n label: string;\n /** Display name of the source, e.g. \"team-meetingFEB.mp4\". */\n name: string;\n /**\n * Optional icon next to the source name. Pass a `@phosphor-icons/react` icon.\n */\n icon?: React.ReactNode;\n}\n\n/**\n * Pagination state for the side paginator column. When omitted, the paginator\n * column (and its divider) is not rendered at all.\n */\nexport interface SuggestionCardPagination {\n /** 1-based index of this suggestion within the set. */\n currentIndex: number;\n /** Total number of suggestions in the set. */\n totalCount: number;\n /** Fires when the user navigates to the previous suggestion. Omit to hide the button. */\n onPrevious?: () => void;\n /** Fires when the user navigates to the next suggestion. Omit to hide the button. */\n onNext?: () => void;\n}\n\n/**\n * Visual diff shown between the source row and the reason. Renders as a\n * single bordered row with the old text struck-through in destructive color\n * and the new text in link color.\n *\n * - For replace ops, set both `oldText` and `newText`.\n * - For delete ops, set only `oldText`.\n * - For insert ops, set only `newText`.\n *\n * When both fields are empty/undefined the diff row is not rendered.\n */\nexport interface SuggestionCardDiff {\n /** Original text being removed. Destructive. */\n oldText?: string;\n /** Proposed replacement / insertion. Link color. */\n newText?: string;\n}\n\nexport interface SuggestionCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {\n /**\n * Source metadata shown at the top of the card. Omit to skip the source\n * row entirely — useful when the host doesn't have source info to surface.\n */\n source?: SuggestionCardSource;\n /**\n * Old vs. new text for the suggestion. Renders the bordered diff row\n * between the source and the reason. Omit to skip the diff row entirely.\n */\n diff?: SuggestionCardDiff;\n /**\n * Host-provided explanation for why this suggestion was raised. Renders\n * as the body paragraph below the diff. Omit to skip the reason line.\n */\n reason?: string;\n\n /**\n * Fires when the user accepts this suggestion. When omitted, the accept\n * button is rendered disabled (so the affordance is visible but inert).\n */\n onAccept?: () => void;\n /**\n * Fires when the user rejects this suggestion. When omitted, the reject\n * button is rendered disabled.\n */\n onReject?: () => void;\n /** Fires when the user clicks the source icon and name. */\n onSourceClick?: () => void;\n /** Disable the accept button while an accept is in-flight. */\n acceptDisabled?: boolean;\n /** Disable the reject button while a reject is in-flight. */\n rejectDisabled?: boolean;\n\n /**\n * Paginator state. When omitted, the whole paginator column (and its\n * dividing border) is not rendered.\n */\n pagination?: SuggestionCardPagination;\n readOnly?: boolean;\n}\n\n/**\n * Floating card that displays a single review suggestion with its source,\n * accept/reject actions, and an optional paginator for navigating within-article\n * suggestions. Purely presentational — the host wires callbacks to the\n * reviewSuggestions plugin / API layer.\n */\nexport const SuggestionCard = React.forwardRef<HTMLDivElement, SuggestionCardProps>(function SuggestionCard(\n {\n source,\n diff,\n reason,\n onAccept,\n onReject,\n onSourceClick,\n acceptDisabled,\n rejectDisabled,\n pagination,\n className,\n readOnly,\n ...props\n },\n ref,\n) {\n const acceptIsDisabled = acceptDisabled || !onAccept;\n const rejectIsDisabled = rejectDisabled || !onReject;\n const hasDiff = Boolean(diff && diff.oldText && diff.newText);\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label=\"Review suggestion\"\n className={cn(\n // The card grows with short suggestions, then caps so long bodies scroll.\n '!grid max-h-[calc(var(--knowledge-review-scroll-height)-250px)] w-full grid-rows-[auto_minmax(0,1fr)_auto] items-stretch gap-4 rounded-lg bg-surface p-4 border shadow-md dark:shadow-brand-dark',\n className,\n )}\n {...props}\n >\n <div className=\"flex min-w-0 flex-col justify-start gap-1\">\n {source && (\n <>\n <span className=\"text-xs font-bold uppercase leading-4 text-default\">{source.label}</span>\n <div className=\"flex items-center gap-0.5 [&_svg]:size-4 [&_svg]:shrink-0\">\n {onSourceClick ? (\n <Button\n type=\"button\"\n variant=\"link\"\n onClick={onSourceClick}\n className=\"[&_svg]:size-4 h-auto p-0 text-sm font-normal text-subtle gap-0.5 whitespace-normal break-all\"\n >\n <span className=\"flex items-center\" aria-hidden=\"true\">\n {source.icon}\n </span>\n <span className=\"leading-4\">{source.name}</span>\n </Button>\n ) : (\n <>\n <span className=\"flex items-center text-subtle\" aria-hidden=\"true\">\n {source.icon}\n </span>\n <span className=\"text-sm leading-4 text-subtle break-all\">{source.name}</span>\n </>\n )}\n </div>\n </>\n )}\n </div>\n\n <div className=\"flex min-w-0 min-h-0 items-stretch gap-2\">\n {/* min-h-0 lets this flex child shrink below its content size so the ScrollArea actually scrolls. */}\n <ScrollArea className=\"-mr-2 min-h-0 flex-1 pr-2\">\n <div className=\"flex w-full flex-col\">\n <span className=\"text-xs font-bold uppercase leading-4 text-default\">Why</span>\n {reason && <span className=\"text-sm leading-4 text-default\">{reason}</span>}\n\n {hasDiff && <SuggestionCardDiffRow oldText={diff?.oldText} newText={diff?.newText} />}\n </div>\n </ScrollArea>\n\n {pagination && pagination.totalCount > 1 && <SuggestionCardPaginator {...pagination} />}\n </div>\n\n <div className=\"flex min-w-0 items-end\">\n {!readOnly && (\n <div className=\"flex shrink-0 items-center gap-2\">\n {!acceptIsDisabled && (\n <Button\n type=\"button\"\n variant=\"default\"\n elevation=\"shadow\"\n size=\"icon\"\n onClick={onAccept}\n aria-label=\"Accept suggestion\"\n className={cn('rounded-md border-border bg-green-400 text-default', brandShadowEffect)}\n >\n <CheckCircle weight=\"regular\" aria-hidden=\"true\" />\n </Button>\n )}\n {!rejectIsDisabled && (\n <Button\n type=\"button\"\n variant=\"destructive\"\n elevation=\"shadow\"\n size=\"icon\"\n onClick={onReject}\n aria-label=\"Reject suggestion\"\n className={cn('rounded-md border-border bg-red-400 text-default', brandShadowEffect)}\n >\n <XCircle weight=\"regular\" aria-hidden=\"true\" />\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n );\n});\n\n/**\n * Bordered old/new diff row. Old text is rendered first in destructive color,\n * new text follows in link color. Either side can be\n * omitted (delete-only or insert-only).\n */\nfunction SuggestionCardDiffRow({ oldText, newText }: SuggestionCardDiff) {\n return (\n <div className=\"flex flex-col items-baseline gap-2 border-t border-dark-300 py-4 text-sm leading-4 mt-4\">\n {oldText && (\n <div className=\"text-destructive\">\n <span className=\"font-bold\">Replace: </span>\n <span>{oldText}</span>\n </div>\n )}\n {newText && (\n <div className=\"text-blue\">\n <span className=\"font-bold\">With: </span>\n <span>{newText}</span>\n </div>\n )}\n </div>\n );\n}\n\nfunction SuggestionCardPaginator({ currentIndex, totalCount, onPrevious, onNext }: SuggestionCardPagination) {\n const hasPrevious = currentIndex > 1 && !!onPrevious;\n const hasNext = currentIndex < totalCount && !!onNext;\n\n return (\n <div className=\"flex w-10 shrink-0 flex-col items-center justify-center self-stretch py-2 pl-3\">\n <div className=\"flex flex-col items-center gap-0.5\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={onPrevious}\n disabled={!hasPrevious}\n aria-label=\"Previous suggestion\"\n className=\"text-subtlest disabled:invisible\"\n >\n <CaretUp aria-hidden=\"true\" className=\"size-3.5\" />\n </Button>\n <span className=\"text-xs leading-4 text-subtlest tabular-nums\" aria-hidden=\"true\">\n {currentIndex}/{totalCount}\n </span>\n <span className=\"sr-only\" aria-live=\"polite\">\n Suggestion {currentIndex} of {totalCount}\n </span>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={onNext}\n disabled={!hasNext}\n aria-label=\"Next suggestion\"\n className=\"text-subtlest disabled:invisible\"\n >\n <CaretDown aria-hidden=\"true\" className=\"size-3.5\" />\n </Button>\n </div>\n </div>\n );\n}\n"],"names":["EditCount","count","React","createElement","className","Circle","size","weight","StatusSourceSummary","isNew","isAccepted","editCount","sourceIcon","sourceDescription","onSourceLinkClick","sourceLabel","status","StatusBadge","variant","surface","cn","Button","onClick","ReviewListItem","forwardRef","title","timestamp","icon","description","isSelected","props","ref","type","formatDistance","ReviewsContext","createContext","ReviewsSelectionProvider","children","defaultSelectedItem","onApproveAllSuggestions","onRejectAllSuggestions","onAcceptAndPublish","onApplyAllInEditor","onRejectAllInEditor","onOpenArticleLink","breadcrumb","suggestionReasonBody","hideAcceptAndPublishPublic","userSelectedItem","setUserSelectedItem","useState","selectedItem","loadedDiffDoc","setLoadedDiffDoc","loadingDiff","setLoadingDiff","handleSelect","useCallback","item","value","useMemo","setSelectedItem","Provider","useReviewsSelection","ctx","useContext","Error","ReviewList","items","map","key","id","displayName","SuggestionCard","source","diff","reason","onAccept","onReject","onSourceClick","acceptDisabled","rejectDisabled","pagination","readOnly","acceptIsDisabled","rejectIsDisabled","hasDiff","Boolean","oldText","newText","role","label","name","ScrollArea","SuggestionCardDiffRow","totalCount","SuggestionCardPaginator","elevation","brandShadowEffect","CheckCircle","XCircle","currentIndex","onPrevious","onNext","hasPrevious","hasNext","disabled","CaretUp","CaretDown"],"mappings":"ueAGO,SAASA,GAAUC,MAAEA;AAC1B,OACEC,EAAAC,cAAC,OAAA,CAAKC,UAAU,qDACdF,EAAAC,cAACE,GAAOC,KAAM,EAAGC,OAAO,OAAO,cAAY,OAAOH,UAAU,6BAC5DF,EAAAC,cAAC,OAAA,CAAKC,UAAU,iCACbH,EAAM,IAAY,IAAVA,EAAc,OAAS,SAIxC,CCOO,SAASO,GAAoBC,MAClCA,EAAAC,WACAA,EAAAC,UACAA,EAAAC,WACAA,EAAAC,kBACAA,EAAAC,kBACAA,EAAAC,YACAA,EAAc,cAAAX,UACdA,IAEA,IAAIY,EAaJ,OAZIN,EACFM,iBAASd,EAAAC,cAACc,EAAA,CAAYC,QAAQ,YAAW,YAChCT,EACTO,iCACGC,EAAA,CAAYC,QAAQ,UAAUC,QAAQ,eAAc,OAI9CR,IACTK,iBAASd,EAAAC,cAACH,EAAA,CAAUC,MAAOU,KAGxBK,GAAWJ,GAAeC,iBAK7BX,EAAAC,cAAC,OAAA,CAAKC,UAAWgB,EAAG,4CAA6ChB,IAC9DY,kBAAUd,EAAAC,cAAC,QAAKC,UAAU,8BAA8BY,GACxDH,IACEC,iBACCZ,EAAAC,cAACkB,EAAA,CACCH,QAAQ,OACRI,QAASR,EACT,aAAYC,EACZX,UAAU,mEAETQ,kBAAcV,EAAAC,cAAC,OAAA,CAAKC,UAAU,8BAA8BQ;eAC7DV,EAAAC,cAAC,OAAA,CAAKC,UAAU,YAAYS,mBAG9BX,EAAAC,cAAC,OAAA,CAAKC,UAAU,sEACbQ,kCAAe,OAAA,CAAKR,UAAU,8BAA8BQ,kBAC7DV,EAAAC,cAAC,OAAA,CAAKC,UAAU,YAAYS,MApB7B,IAyBX,CCxCO,MAAMU,EAAiBrB,EAAMsB,WAAmD,UACrFC,MAAEA,YAAOC,EAAAC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AAA,CAAKC,UAAU,aAAY,yBAC5BF,EAAAC,cAAC,OAAA,KAAMsF,IAKjB,CAEA,SAASO,GAAwBK,aAAEA,EAAAN,WAAcA,EAAAO,WAAYA,EAAAC,OAAYA,IACvE,MAAMC,EAAcH,EAAe,KAAOC,EACpCG,EAAUJ,EAAeN,KAAgBQ;AAE/C,uBACG,MAAA,CAAInG,UAAU,iGACbF,EAAAC,cAAC,MAAA,CAAIC,UAAU,qDACbF,EAAAC,cAACkB,EAAA,CACCW,KAAK,SACLd,QAAQ,QACRZ,KAAK,OACLgB,QAASgF,EACTI,UAAWF,EACX,aAAW,sBACXpG,UAAU;eAEVF,EAAAC,cAACwG,EAAA,CAAQ,cAAY,OAAOvG,UAAU,6CAEvC,OAAA,CAAKA,UAAU,+CAA+C,cAAY,QACxEiG,EAAa,IAAEN,kBAElB7F,EAAAC,cAAC,OAAA,CAAKC,UAAU,UAAU,YAAU,UAAS,cAC/BiG,EAAa,OAAKN,kBAEhC7F,EAAAC,cAACkB,EAAA,CACCW,KAAK,SACLd,QAAQ,QACRZ,KAAK,OACLgB,QAASiF,EACTG,UAAWD,EACX,aAAW,kBACXrG,UAAU;eAEVF,EAAAC,cAACyG,EAAA,CAAU,cAAY,OAAOxG,UAAU,eAKlD"}
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './global.css';/* empty css */export{BrainfishColors}from"./colors.js";export{C as ChatSearch,a as ChatSearchProvider,N as NextBestActionType,R as ResolvedConversationFooter,u as useChatSearch,b as useIsChatSearchDirty,v as validateUrlString}from"./chunks/ChatSearch.D5EABw51.js";export{C as ContextPillBadge,a as Conversation,b as ConversationActions,c as ConversationInput,d as ConversationMessageAssistant,e as ConversationMessageUser,f as ConversationMessages,g as ConversationProvider,h as ConversationStatus,i as ConversationSuggestions,j as getConversationStatusLabel,u as useConversation}from"./chunks/Conversation.Dq66Znf4.js";export{C as CodeBlock,F as FormattedMessage,M as MemoizedReactMarkdown,Z as ZoomableImage,a as addPopupWidgetUtm,b as addUtmParameters}from"./chunks/FormattedMessage.Djy5cn5F.js";export{MermaidDiagram}from"./chunks/MermaidDiagram.PRgXQ5Yh.js";export{Accordion,AccordionContent,AccordionItem,AccordionTrigger}from"./components/ui/accordion.js";export{AlertDialog,AlertDialogAction,AlertDialogCancel,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogHeader,AlertDialogOverlay,AlertDialogPortal,AlertDialogTitle,AlertDialogTrigger}from"./components/ui/alert-dialog.js";export{Alert,AlertAction,AlertContent,AlertDescription,AlertTitle}from"./components/ui/alert.js";export{Avatar,AvatarBadge,AvatarFallback,AvatarGroup,AvatarGroupCount,AvatarImage}from"./components/ui/avatar.js";export{Badge,badgeVariants}from"./components/ui/badge.js";export{ButtonGroup,ButtonGroupSeparator,ButtonGroupText,buttonGroupVariants}from"./components/ui/button-group.js";export{B as Button,b as buttonVariants}from"./chunks/button.Cs1X8upM.js";export{Calendar}from"./components/ui/calendar.js";export{Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle}from"./components/ui/card.js";export{Collapsible,CollapsibleContent,CollapsibleTrigger}from"./components/ui/collapsible.js";export{Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut}from"./components/ui/command.js";export{Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger}from"./components/ui/dialog.js";export{DivButton,divButtonVariants}from"./components/ui/div-button.js";import{DropdownMenu as o,DropdownMenuTrigger as t,DropdownMenuContent as r,DropdownMenuItem as n}from"./components/ui/dropdown-menu.js";export{DropdownMenuCheckboxItem,DropdownMenuGroup,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger}from"./components/ui/dropdown-menu.js";export{Icon,MemoizedIcon}from"./components/ui/icon.js";export{Input}from"./components/ui/input.js";export{Item,ItemActions,ItemContent,ItemDescription,ItemFooter,ItemGroup,ItemHeader,ItemMedia,ItemSeparator,ItemTitle}from"./components/ui/item.js";export{Label}from"./components/ui/label.js";export{Popover,PopoverAnchor,PopoverContent,PopoverTrigger}from"./components/ui/popover.js";export{Progress}from"./components/ui/progress.js";export{RadioGroup,RadioGroupItem}from"./components/ui/radio-group.js";export{R as Ripple,a as RippleStatus,S as SweepText}from"./chunks/ripple-status.C20jzXjF.js";export{ScrollArea,ScrollBar}from"./components/ui/scroll-area.js";export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectSeparator,SelectTrigger,SelectValue}from"./components/ui/select.js";export{Separator}from"./components/ui/separator.js";export{Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger}from"./components/ui/sheet.js";export{Spinner}from"./components/ui/spinner.js";export{Switch}from"./components/ui/switch.js";export{Table,TableBody,TableCaption,TableCell,TableFooter,TableHead,TableHeader,TableRow}from"./components/ui/table.js";export{Textarea}from"./components/ui/textarea.js";export{Tooltip,TooltipContent,TooltipProvider,TooltipTrigger}from"./components/ui/tooltip.js";export{C as Combobox}from"./chunks/combobox.CLT9CXUV.js";export{D as DataTable}from"./chunks/data-table.bjvbLk2u.js";export{D as DatePicker}from"./chunks/date-picker.D9CRxYJf.js";export{F as FileUpload,a as FileUploadStatus,f as formatFileSize}from"./chunks/file-upload-status.ClQeoQQB.js";export{F as Filter,a as Filters,O as Operator}from"./chunks/filters.BRlRsGlZ.js";export{F as FontPicker,a as FontPickerItem,c as clearFontCache,g as getCachedFonts,l as loadFont,s as setCachedFonts,u as useFontOptions}from"./chunks/font-picker.Dwwe5av-.js";export{I as InputWithTags}from"./chunks/input-with-tags.pmOKv67d.js";export{L as Logo}from"./chunks/logo.DtwFGMBj.js";export{C as ChatLogo}from"./chunks/chat-logo.CqPppEb9.js";export{A as AILogo,a as AILogoPaths}from"./chunks/ai-logo.Bh2bhNcG.js";export{S as SimpleSelect}from"./chunks/simpleSelect.CEUUfl3O.js";export{T as Trend,a as TrendValue}from"./chunks/trend-value.BPBDBsk2.js";export{T as TwoLevelCombobox}from"./chunks/two-level-combobox.SDv7qc_m.js";export{F as FullLayout,a as FullLayoutHeader,b as FullLayoutLeftSidebar,c as FullLayoutNavStateContext,d as FullLayoutProvider,e as FullLayoutRightSidebar,u as useFullLayoutContext,f as useRightSidebar}from"./chunks/header-pane.BBWfo7uv.js";export{H as HEADER_NAV_HEIGHT,a as HeaderNav}from"./chunks/header-nav.CtUIc9pI.js";export{S as Sidebar,u as useSidebar}from"./chunks/sidebar.BhcrMAU3.js";export{MicrosoftTeamsLogo}from"./logos/microsoft-teams-logo.js";export{SlackLogo}from"./logos/slack-logo.js";export{MicrosoftLogo}from"./logos/microsoft-logo.js";export{R as ReviewList,a as ReviewListItem,b as ReviewsSelectionProvider,S as SuggestionCard,u as useReviewsSelection}from"./chunks/suggestion-card.TDn-dEc0.js";import{ChartBar as p,CreditCard as m}from"@phosphor-icons/react";import*as x from"react";import{c as k}from"./chunks/utils.C6Qu-kwd.js";function w({percentage:e,label:a="Queries",status:s,onViewPlan:i,onViewBilling:l}){/* @__PURE__ */
1
+ import './global.css';/* empty css */export{BrainfishColors}from"./colors.js";export{C as ChatSearch,a as ChatSearchProvider,N as NextBestActionType,R as ResolvedConversationFooter,u as useChatSearch,b as useIsChatSearchDirty,v as validateUrlString}from"./chunks/ChatSearch.D5EABw51.js";export{C as ContextPillBadge,a as Conversation,b as ConversationActions,c as ConversationInput,d as ConversationMessageAssistant,e as ConversationMessageUser,f as ConversationMessages,g as ConversationProvider,h as ConversationStatus,i as ConversationSuggestions,j as getConversationStatusLabel,u as useConversation}from"./chunks/Conversation.Dq66Znf4.js";export{C as CodeBlock,F as FormattedMessage,M as MemoizedReactMarkdown,Z as ZoomableImage,a as addPopupWidgetUtm,b as addUtmParameters}from"./chunks/FormattedMessage.Djy5cn5F.js";export{MermaidDiagram}from"./chunks/MermaidDiagram.PRgXQ5Yh.js";export{Accordion,AccordionContent,AccordionItem,AccordionTrigger}from"./components/ui/accordion.js";export{AlertDialog,AlertDialogAction,AlertDialogCancel,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogHeader,AlertDialogOverlay,AlertDialogPortal,AlertDialogTitle,AlertDialogTrigger}from"./components/ui/alert-dialog.js";export{Alert,AlertAction,AlertContent,AlertDescription,AlertTitle}from"./components/ui/alert.js";export{Avatar,AvatarBadge,AvatarFallback,AvatarGroup,AvatarGroupCount,AvatarImage}from"./components/ui/avatar.js";export{Badge,badgeVariants}from"./components/ui/badge.js";export{ButtonGroup,ButtonGroupSeparator,ButtonGroupText,buttonGroupVariants}from"./components/ui/button-group.js";export{B as Button,b as buttonVariants}from"./chunks/button.Cs1X8upM.js";export{Calendar}from"./components/ui/calendar.js";export{Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle}from"./components/ui/card.js";export{Collapsible,CollapsibleContent,CollapsibleTrigger}from"./components/ui/collapsible.js";export{Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut}from"./components/ui/command.js";export{Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger}from"./components/ui/dialog.js";export{DivButton,divButtonVariants}from"./components/ui/div-button.js";import{DropdownMenu as o,DropdownMenuTrigger as t,DropdownMenuContent as r,DropdownMenuItem as n}from"./components/ui/dropdown-menu.js";export{DropdownMenuCheckboxItem,DropdownMenuGroup,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger}from"./components/ui/dropdown-menu.js";export{Icon,MemoizedIcon}from"./components/ui/icon.js";export{Input}from"./components/ui/input.js";export{Item,ItemActions,ItemContent,ItemDescription,ItemFooter,ItemGroup,ItemHeader,ItemMedia,ItemSeparator,ItemTitle}from"./components/ui/item.js";export{Label}from"./components/ui/label.js";export{Popover,PopoverAnchor,PopoverContent,PopoverTrigger}from"./components/ui/popover.js";export{Progress}from"./components/ui/progress.js";export{RadioGroup,RadioGroupItem}from"./components/ui/radio-group.js";export{R as Ripple,a as RippleStatus,S as SweepText}from"./chunks/ripple-status.C20jzXjF.js";export{ScrollArea,ScrollBar}from"./components/ui/scroll-area.js";export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectSeparator,SelectTrigger,SelectValue}from"./components/ui/select.js";export{Separator}from"./components/ui/separator.js";export{Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger}from"./components/ui/sheet.js";export{Spinner}from"./components/ui/spinner.js";export{Switch}from"./components/ui/switch.js";export{Table,TableBody,TableCaption,TableCell,TableFooter,TableHead,TableHeader,TableRow}from"./components/ui/table.js";export{Textarea}from"./components/ui/textarea.js";export{Tooltip,TooltipContent,TooltipProvider,TooltipTrigger}from"./components/ui/tooltip.js";export{C as Combobox}from"./chunks/combobox.CLT9CXUV.js";export{D as DataTable}from"./chunks/data-table.bjvbLk2u.js";export{D as DatePicker}from"./chunks/date-picker.D9CRxYJf.js";export{F as FileUpload,a as FileUploadStatus,f as formatFileSize}from"./chunks/file-upload-status.ClQeoQQB.js";export{F as Filter,a as Filters,O as Operator}from"./chunks/filters.BRlRsGlZ.js";export{F as FontPicker,a as FontPickerItem,c as clearFontCache,g as getCachedFonts,l as loadFont,s as setCachedFonts,u as useFontOptions}from"./chunks/font-picker.Dwwe5av-.js";export{I as InputWithTags}from"./chunks/input-with-tags.pmOKv67d.js";export{L as Logo}from"./chunks/logo.DtwFGMBj.js";export{C as ChatLogo}from"./chunks/chat-logo.CqPppEb9.js";export{A as AILogo,a as AILogoPaths}from"./chunks/ai-logo.Bh2bhNcG.js";export{S as SimpleSelect}from"./chunks/simpleSelect.CEUUfl3O.js";export{T as Trend,a as TrendValue}from"./chunks/trend-value.BPBDBsk2.js";export{T as TwoLevelCombobox}from"./chunks/two-level-combobox.SDv7qc_m.js";export{F as FullLayout,a as FullLayoutHeader,b as FullLayoutLeftSidebar,c as FullLayoutNavStateContext,d as FullLayoutProvider,e as FullLayoutRightSidebar,u as useFullLayoutContext,f as useRightSidebar}from"./chunks/header-pane.Da9cnGDq.js";export{H as HEADER_NAV_HEIGHT,a as HeaderNav}from"./chunks/header-nav.CtUIc9pI.js";export{S as Sidebar,u as useSidebar}from"./chunks/sidebar.BUQR4qJs.js";export{MicrosoftTeamsLogo}from"./logos/microsoft-teams-logo.js";export{SlackLogo}from"./logos/slack-logo.js";export{MicrosoftLogo}from"./logos/microsoft-logo.js";export{R as ReviewList,a as ReviewListItem,b as ReviewsSelectionProvider,S as SuggestionCard,u as useReviewsSelection}from"./chunks/suggestion-card.C32KfQa5.js";import{ChartBar as p,CreditCard as m}from"@phosphor-icons/react";import*as x from"react";import{c as k}from"./chunks/utils.C6Qu-kwd.js";function w({percentage:e,label:a="Queries",status:s,onViewPlan:i,onViewBilling:l}){/* @__PURE__ */
2
2
  return x.createElement(o,null,/* @__PURE__ */x.createElement(t,{asChild:!0},/* @__PURE__ */x.createElement("button",{type:"button",className:k("flex items-center gap-1.5 rounded border bg-surface py-1 pl-2 pr-2.5","text-xs font-normal text-dark-900 cursor-pointer","hover:bg-dark-200 active:bg-dark-400","focus-visible:outline-none","transition-colors",{"border-yellow-500/50":"warning"===s,"border-red-500/50":"reached"===s}),"aria-label":`${a} usage: ${e}%`},
3
3
  /* @__PURE__ */x.createElement("span",{className:k("h-2 w-2 shrink-0 rounded-full",{"bg-yellow-500":"warning"===s,"bg-red-500":"reached"===s}),"aria-hidden":"true"}),
4
4
  /* @__PURE__ */x.createElement("span",{className:"whitespace-nowrap"},e,"% of ",a," used"),
@@ -1,2 +1,2 @@
1
- export{F as FullLayout,a as FullLayoutHeader,b as FullLayoutLeftSidebar,c as FullLayoutNavStateContext,d as FullLayoutProvider,e as FullLayoutRightSidebar,u as useFullLayoutContext,f as useRightSidebar}from"../chunks/header-pane.BBWfo7uv.js";
1
+ export{F as FullLayout,a as FullLayoutHeader,b as FullLayoutLeftSidebar,c as FullLayoutNavStateContext,d as FullLayoutProvider,e as FullLayoutRightSidebar,u as useFullLayoutContext,f as useRightSidebar}from"../chunks/header-pane.Da9cnGDq.js";
2
2
  //# sourceMappingURL=full-layout.js.map
@@ -1,2 +1,2 @@
1
- export{S as Sidebar,u as useSidebar}from"../chunks/sidebar.BhcrMAU3.js";
1
+ export{S as Sidebar,u as useSidebar}from"../chunks/sidebar.BUQR4qJs.js";
2
2
  //# sourceMappingURL=sidebar.js.map
@@ -1,4 +1,4 @@
1
- import*as e from"react";import t,{useCallback as n,useEffect as l,useRef as r,useState as c,useImperativeHandle as a}from"react";import{u as i,c as s,b as o,R as d}from"../chunks/suggestion-card.TDn-dEc0.js";import '../knowledge-review.css';export{S as SuggestionCard}from"../chunks/suggestion-card.TDn-dEc0.js";import u from"html-react-parser";import{CaretDown as m,CaretUp as p,Lightbulb as f,Backspace as g,CheckCircle as A,Globe as h,LockKey as b,HandsClapping as E}from"@phosphor-icons/react";import{Card as N,CardHeader as v,CardTitle as x,CardContent as w}from"../components/ui/card.js";import{ScrollArea as y}from"../components/ui/scroll-area.js";import{Spinner as k}from"../components/ui/spinner.js";import{B as C,a as I}from"../chunks/button.Cs1X8upM.js";import{Tooltip as P,TooltipTrigger as j,TooltipContent as R}from"../components/ui/tooltip.js";import{Popover as L,PopoverTrigger as z,PopoverContent as D}from"../components/ui/popover.js";import{DropdownMenu as B,DropdownMenuTrigger as O,DropdownMenuContent as T,DropdownMenuItem as q}from"../components/ui/dropdown-menu.js";import{ButtonGroup as F}from"../components/ui/button-group.js";import{c as $}from"../chunks/utils.C6Qu-kwd.js";function M({fetchDiffForItem:e}){const{selectedItem:t,setLoadedDiffDoc:r,setLoadingDiff:c}=i(),a=n(async(t,n)=>{c(!0),r(null);try{const l=await e(t);if(n.aborted)return;r(l)}catch(l){if(n.aborted)return;console.error("Failed to fetch diff:",l),r(null)}finally{n.aborted||c(!1)}},[e,r,c]),s=t?.id;return l(()=>{if(!s)return r(null),void c(!1);const e=new AbortController;return a(s,e.signal),()=>{e.abort()}},[s,a]),null}function W({title:t,breadcrumb:n,onOpenArticleLink:l,currentArticleIndex:r,totalArticles:c,displayTotalArticles:a,onNextArticle:i,onPreviousArticle:s}){const o=c>0&&r<c-1,d=r>0,u=0===c?0:r+1,f=a??c,g=f>0;/* @__PURE__ */
1
+ import*as e from"react";import t,{useCallback as n,useEffect as l,useRef as r,useState as c,useImperativeHandle as a}from"react";import{u as i,c as s,b as o,R as d}from"../chunks/suggestion-card.C32KfQa5.js";import '../knowledge-review.css';export{S as SuggestionCard}from"../chunks/suggestion-card.C32KfQa5.js";import u from"html-react-parser";import{CaretDown as m,CaretUp as p,Lightbulb as f,Backspace as g,CheckCircle as A,Globe as h,LockKey as b,HandsClapping as E}from"@phosphor-icons/react";import{Card as N,CardHeader as v,CardTitle as x,CardContent as w}from"../components/ui/card.js";import{ScrollArea as y}from"../components/ui/scroll-area.js";import{Spinner as k}from"../components/ui/spinner.js";import{B as C,a as I}from"../chunks/button.Cs1X8upM.js";import{Tooltip as P,TooltipTrigger as j,TooltipContent as R}from"../components/ui/tooltip.js";import{Popover as L,PopoverTrigger as z,PopoverContent as D}from"../components/ui/popover.js";import{DropdownMenu as B,DropdownMenuTrigger as O,DropdownMenuContent as T,DropdownMenuItem as q}from"../components/ui/dropdown-menu.js";import{ButtonGroup as F}from"../components/ui/button-group.js";import{c as $}from"../chunks/utils.C6Qu-kwd.js";function M({fetchDiffForItem:e}){const{selectedItem:t,setLoadedDiffDoc:r,setLoadingDiff:c}=i(),a=n(async(t,n)=>{c(!0),r(null);try{const l=await e(t);if(n.aborted)return;r(l)}catch(l){if(n.aborted)return;console.error("Failed to fetch diff:",l),r(null)}finally{n.aborted||c(!1)}},[e,r,c]),s=t?.id;return l(()=>{if(!s)return r(null),void c(!1);const e=new AbortController;return a(s,e.signal),()=>{e.abort()}},[s,a]),null}function W({title:t,breadcrumb:n,onOpenArticleLink:l,currentArticleIndex:r,totalArticles:c,displayTotalArticles:a,onNextArticle:i,onPreviousArticle:s}){const o=c>0&&r<c-1,d=r>0,u=0===c?0:r+1,f=a??c,g=f>0;/* @__PURE__ */
2
2
  return e.createElement("div",{className:"flex justify-between items-center"},/* @__PURE__ */e.createElement("h1",{className:"heading-lg"},t,l&&n&&/* @__PURE__ */e.createElement(C,{variant:"link",size:"sm",onClick:l,"aria-label":"Open article",className:"block px-0 text-subtle text-xs"},n)),/* @__PURE__ */e.createElement("div",{className:"flex items-center"},/* @__PURE__ */e.createElement("p",{className:"text-xs text-foreground pr-2"},/* @__PURE__ */e.createElement("span",{"aria-hidden":"true"},g?`${u}/${f}`:"0"),/* @__PURE__ */e.createElement("span",{className:"sr-only","aria-live":"polite"},g?`Article ${u} of ${f}`:"No articles")),/* @__PURE__ */e.createElement(P,null,/* @__PURE__ */e.createElement(j,{asChild:!0},/* @__PURE__ */e.createElement(C,{variant:"ghost",size:"icon",disabled:!o,onClick:i,"aria-label":"Go to next article"},
3
3
  /* @__PURE__ */e.createElement(m,{"aria-hidden":"true"}))),/* @__PURE__ */e.createElement(R,{side:"bottom",bgColor:"--bfc-foreground",className:"text-background"},"Next Article")),/* @__PURE__ */e.createElement(P,null,/* @__PURE__ */e.createElement(j,{asChild:!0},/* @__PURE__ */e.createElement(C,{variant:"ghost",size:"icon",disabled:!d,onClick:s,"aria-label":"Go to previous article"},
4
4
  /* @__PURE__ */e.createElement(p,{"aria-hidden":"true"}))),/* @__PURE__ */e.createElement(R,{side:"top",bgColor:"--bfc-foreground",className:"text-background"},"Previous Article"))))}function _({isNew:t,isAccepted:n=!1,suggestionsCount:l,sourceIcon:r,sourceDescription:c,onSourceLinkClick:a,showActionButtons:i=!0,suggestionReasonBody:o,hideAcceptAndPublishPublic:d=!1,pendingAction:u=null,onAcceptAndPublish:p,onRejectAll:E,onAcceptAll:N,onAcceptAndPublishAction:v}){const[x,w]=e.useState(!1),y=null!=u,P="reject"===u,S="accept-draft"===u||"accept-publish-public"===u||"accept-publish-internal"===u;/* @__PURE__ */
@@ -81,6 +81,7 @@ declare type AccountDropdownTeam = {
81
81
 
82
82
  declare interface ArticleNavItem extends Omit<SidebarNavItem, 'Icon' | 'items'> {
83
83
  status?: 'discovery' | 'unpublished' | 'draft';
84
+ siteEnabled?: boolean;
84
85
  hasChildren?: boolean;
85
86
  isLoadingChildren?: boolean;
86
87
  items?: ArticleNavItem[];
package/dist/index.d.ts CHANGED
@@ -390,6 +390,7 @@ export declare type Article = {
390
390
 
391
391
  export declare interface ArticleNavItem extends Omit<SidebarNavItem, 'Icon' | 'items'> {
392
392
  status?: 'discovery' | 'unpublished' | 'draft';
393
+ siteEnabled?: boolean;
393
394
  hasChildren?: boolean;
394
395
  isLoadingChildren?: boolean;
395
396
  items?: ArticleNavItem[];
@@ -2351,6 +2352,8 @@ export declare interface SuggestionCardProps extends Omit<React_2.HTMLAttributes
2351
2352
  * button is rendered disabled.
2352
2353
  */
2353
2354
  onReject?: () => void;
2355
+ /** Fires when the user clicks the source icon and name. */
2356
+ onSourceClick?: () => void;
2354
2357
  /** Disable the accept button while an accept is in-flight. */
2355
2358
  acceptDisabled?: boolean;
2356
2359
  /** Disable the reject button while a reject is in-flight. */
@@ -198,6 +198,8 @@ export declare interface SuggestionCardProps extends Omit<React_2.HTMLAttributes
198
198
  * button is rendered disabled.
199
199
  */
200
200
  onReject?: () => void;
201
+ /** Fires when the user clicks the source icon and name. */
202
+ onSourceClick?: () => void;
201
203
  /** Disable the accept button while an accept is in-flight. */
202
204
  acceptDisabled?: boolean;
203
205
  /** Disable the reject button while a reject is in-flight. */
package/dist/sidebar.d.ts CHANGED
@@ -3,6 +3,7 @@ import * as React_2 from 'react';
3
3
 
4
4
  export declare interface ArticleNavItem extends Omit<SidebarNavItem, 'Icon' | 'items'> {
5
5
  status?: 'discovery' | 'unpublished' | 'draft';
6
+ siteEnabled?: boolean;
6
7
  hasChildren?: boolean;
7
8
  isLoadingChildren?: boolean;
8
9
  items?: ArticleNavItem[];