@brainfish-ai/components 0.32.1 → 0.32.2
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/chat-search.d.ts +19 -3
- package/dist/esm/chunks/{ChatSearch.DLxjq2j8.js → ChatSearch.EPCaUj3O.js} +38 -38
- package/dist/esm/chunks/ChatSearch.EPCaUj3O.js.map +1 -0
- package/dist/esm/chunks/{header-pane.CWgwa4pd.js → header-pane.eU7f_pim.js} +2 -2
- package/dist/esm/chunks/{header-pane.CWgwa4pd.js.map → header-pane.eU7f_pim.js.map} +1 -1
- package/dist/esm/chunks/{sidebar.DNJ1Iufi.js → sidebar.CcFsNjrN.js} +9 -9
- package/dist/esm/chunks/sidebar.CcFsNjrN.js.map +1 -0
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layouts/full-layout.js +1 -1
- package/dist/esm/layouts/sidebar.js +1 -1
- package/dist/index.d.ts +19 -3
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/dist/esm/chunks/ChatSearch.DLxjq2j8.js.map +0 -1
- package/dist/esm/chunks/sidebar.DNJ1Iufi.js.map +0 -1
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/usage-indicator-pill/usage-indicator-pill.tsx"],"sourcesContent":["import { ChartBar, CreditCard } from '@phosphor-icons/react';\nimport * as React from 'react';\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu';\nimport { cn } from '@/lib/utils';\n\nexport type UsageIndicatorStatus = 'warning' | 'reached';\n\nexport interface UsageIndicatorPillProps {\n /** Current usage as a percentage 0–100 */\n percentage: number;\n /** Name of the usage metric being displayed */\n label?: string;\n /** Visual state of the pill */\n status: UsageIndicatorStatus;\n /** Called when the user selects \"View plan\" */\n onViewPlan?: () => void;\n /** Called when the user selects \"View billing settings\" */\n onViewBilling?: () => void;\n}\n\n/**\n * Gives an indication of query usage in the platform.\n *\n * A pill button for the top navigation bar that shows the team's monthly usage\n * usage percentage. At ≥80% it renders in warning (yellow) state; at 100% in\n * reached (red) state. Clicking it opens a dropdown with links to the plan and\n * billing settings pages.\n */\nexport function UsageIndicatorPill({\n percentage,\n label = 'Queries',\n status,\n onViewPlan,\n onViewBilling,\n}: UsageIndicatorPillProps) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <button\n type=\"button\"\n className={cn(\n 'flex items-center gap-1.5 rounded border bg-surface py-1 pl-2 pr-2.5',\n 'text-xs font-normal text-dark-900 cursor-pointer',\n 'hover:bg-dark-200 active:bg-dark-400',\n 'focus-visible:outline-none',\n 'transition-colors',\n {\n 'border-yellow-500/50': status === 'warning',\n 'border-red-500/50': status === 'reached',\n },\n )}\n aria-label={`${label} usage: ${percentage}%`}\n >\n <span\n className={cn('h-2 w-2 shrink-0 rounded-full', {\n 'bg-yellow-500': status === 'warning',\n 'bg-red-500': status === 'reached',\n })}\n aria-hidden=\"true\"\n />\n <span className=\"whitespace-nowrap\">\n {percentage}% of {label} used\n </span>\n <span className=\"opacity-60 whitespace-nowrap\">View plan</span>\n </button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"end\" className=\"w-52\">\n <DropdownMenuItem onClick={onViewPlan} className=\"flex items-center gap-2\">\n <ChartBar size={16} aria-hidden=\"true\" />\n View plan\n </DropdownMenuItem>\n <DropdownMenuItem onClick={onViewBilling} className=\"flex items-center gap-2\">\n <CreditCard size={16} aria-hidden=\"true\" />\n View billing settings\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"names":["UsageIndicatorPill","percentage","label","status","onViewPlan","onViewBilling","React","createElement","DropdownMenu","DropdownMenuTrigger","asChild","type","className","cn","DropdownMenuContent","align","DropdownMenuItem","onClick","ChartBar","size","CreditCard"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/usage-indicator-pill/usage-indicator-pill.tsx"],"sourcesContent":["import { ChartBar, CreditCard } from '@phosphor-icons/react';\nimport * as React from 'react';\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu';\nimport { cn } from '@/lib/utils';\n\nexport type UsageIndicatorStatus = 'warning' | 'reached';\n\nexport interface UsageIndicatorPillProps {\n /** Current usage as a percentage 0–100 */\n percentage: number;\n /** Name of the usage metric being displayed */\n label?: string;\n /** Visual state of the pill */\n status: UsageIndicatorStatus;\n /** Called when the user selects \"View plan\" */\n onViewPlan?: () => void;\n /** Called when the user selects \"View billing settings\" */\n onViewBilling?: () => void;\n}\n\n/**\n * Gives an indication of query usage in the platform.\n *\n * A pill button for the top navigation bar that shows the team's monthly usage\n * usage percentage. At ≥80% it renders in warning (yellow) state; at 100% in\n * reached (red) state. Clicking it opens a dropdown with links to the plan and\n * billing settings pages.\n */\nexport function UsageIndicatorPill({\n percentage,\n label = 'Queries',\n status,\n onViewPlan,\n onViewBilling,\n}: UsageIndicatorPillProps) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <button\n type=\"button\"\n className={cn(\n 'flex items-center gap-1.5 rounded border bg-surface py-1 pl-2 pr-2.5',\n 'text-xs font-normal text-dark-900 cursor-pointer',\n 'hover:bg-dark-200 active:bg-dark-400',\n 'focus-visible:outline-none',\n 'transition-colors',\n {\n 'border-yellow-500/50': status === 'warning',\n 'border-red-500/50': status === 'reached',\n },\n )}\n aria-label={`${label} usage: ${percentage}%`}\n >\n <span\n className={cn('h-2 w-2 shrink-0 rounded-full', {\n 'bg-yellow-500': status === 'warning',\n 'bg-red-500': status === 'reached',\n })}\n aria-hidden=\"true\"\n />\n <span className=\"whitespace-nowrap\">\n {percentage}% of {label} used\n </span>\n <span className=\"opacity-60 whitespace-nowrap\">View plan</span>\n </button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"end\" className=\"w-52\">\n <DropdownMenuItem onClick={onViewPlan} className=\"flex items-center gap-2\">\n <ChartBar size={16} aria-hidden=\"true\" />\n View plan\n </DropdownMenuItem>\n <DropdownMenuItem onClick={onViewBilling} className=\"flex items-center gap-2\">\n <CreditCard size={16} aria-hidden=\"true\" />\n View billing settings\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"names":["UsageIndicatorPill","percentage","label","status","onViewPlan","onViewBilling","React","createElement","DropdownMenu","DropdownMenuTrigger","asChild","type","className","cn","DropdownMenuContent","align","DropdownMenuItem","onClick","ChartBar","size","CreditCard"],"mappings":"0wLAkCO,SAASA,GAAmBC,WACjCA,EAAAC,MACAA,EAAQ,UAAAC,OACRA,EAAAC,WACAA,EAAAC,cACAA;AAEA,OACEC,EAAAC,cAACC,EAAA,oBACCF,EAAAC,cAACE,EAAA,CAAoBC,SAAO,kBAC1BJ,EAAAC,cAAC,SAAA,CACCI,KAAK,SACLC,UAAWC,EACT,uEACA,mDACA,uCACA,6BACA,oBACA,CACE,uBAAmC,YAAXV,EACxB,oBAAgC,YAAXA,IAGzB,aAAY,GAAGD,YAAgBD;eAE/BK,EAAAC,cAAC,OAAA,CACCK,UAAWC,EAAG,gCAAiC,CAC7C,gBAA4B,YAAXV,EACjB,aAAyB,YAAXA,IAEhB,cAAY;+BAEb,OAAA,CAAKS,UAAU,qBACbX,EAAW,QAAMC,EAAM;eAE1BI,EAAAC,cAAC,OAAA,CAAKK,UAAU,gCAA+B,8BAInDN,EAAAC,cAACO,EAAA,CAAoBC,MAAM,MAAMH,UAAU,uBACzCN,EAAAC,cAACS,EAAA,CAAiBC,QAASb,EAAYQ,UAAU,0CAC/CN,EAAAC,cAACW,EAAA,CAASC,KAAM,GAAI,cAAY,SAAS,4BAG3Cb,EAAAC,cAACS,EAAA,CAAiBC,QAASZ,EAAeO,UAAU,0CAClDN,EAAAC,cAACa,EAAA,CAAWD,KAAM,GAAI,cAAY,SAAS,0BAMrD"}
|
|
@@ -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.
|
|
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.eU7f_pim.js";
|
|
2
2
|
//# sourceMappingURL=full-layout.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{S as Sidebar,u as useSidebar}from"../chunks/sidebar.
|
|
1
|
+
export{S as Sidebar,u as useSidebar}from"../chunks/sidebar.CcFsNjrN.js";
|
|
2
2
|
//# sourceMappingURL=sidebar.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1786,15 +1786,15 @@ declare const microsoftTeamsLogoVariants: (props?: ({
|
|
|
1786
1786
|
variant?: "default" | null | undefined;
|
|
1787
1787
|
} & ClassProp) | undefined) => string;
|
|
1788
1788
|
|
|
1789
|
-
declare type NextBestAction = {
|
|
1789
|
+
export declare type NextBestAction = {
|
|
1790
1790
|
id?: string;
|
|
1791
1791
|
label: string;
|
|
1792
1792
|
type: NextBestActionType;
|
|
1793
1793
|
icon?: string | UrlString;
|
|
1794
|
-
value:
|
|
1794
|
+
value: NextBestActionValue[NextBestActionType];
|
|
1795
1795
|
};
|
|
1796
1796
|
|
|
1797
|
-
declare enum NextBestActionType {
|
|
1797
|
+
export declare enum NextBestActionType {
|
|
1798
1798
|
Link = "link",
|
|
1799
1799
|
Email = "email",
|
|
1800
1800
|
Phone = "phone",
|
|
@@ -1808,6 +1808,20 @@ declare enum NextBestActionType {
|
|
|
1808
1808
|
WebhookHandoff = "webhook_handoff"
|
|
1809
1809
|
}
|
|
1810
1810
|
|
|
1811
|
+
export declare type NextBestActionValue = {
|
|
1812
|
+
link: UrlString;
|
|
1813
|
+
email: string;
|
|
1814
|
+
phone: string;
|
|
1815
|
+
callback: string;
|
|
1816
|
+
function: string;
|
|
1817
|
+
zendesk_chat: string;
|
|
1818
|
+
zendesk_messenger: string;
|
|
1819
|
+
intercom_chat: string;
|
|
1820
|
+
freshdesk: string;
|
|
1821
|
+
zendesk_sunshine_chat: string;
|
|
1822
|
+
webhook_handoff: string;
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1811
1825
|
declare type NoArticlesFound = {
|
|
1812
1826
|
type: typeof AnswersActions.NO_ARTICLES_FOUND;
|
|
1813
1827
|
payload: {
|
|
@@ -2533,6 +2547,8 @@ export declare interface UseRightSidebarReturn {
|
|
|
2533
2547
|
|
|
2534
2548
|
export declare function useSidebar(): SidebarContextValue;
|
|
2535
2549
|
|
|
2550
|
+
export declare const validateUrlString: (value: string) => UrlString;
|
|
2551
|
+
|
|
2536
2552
|
export declare const ZoomableImage: React_2.FC<ZoomableImageProps>;
|
|
2537
2553
|
|
|
2538
2554
|
declare interface ZoomableImageProps {
|