@brainfish-ai/components 0.18.4 → 0.18.6

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.
Files changed (37) hide show
  1. package/dist/alert-dialog.d.ts +2 -2
  2. package/dist/article-suggestions-banner.d.ts +16 -0
  3. package/dist/button-group.d.ts +3 -2
  4. package/dist/button.d.ts +1 -1
  5. package/dist/combobox.d.ts +24 -3
  6. package/dist/confirm-dialog.d.ts +1 -1
  7. package/dist/div-button.d.ts +1 -1
  8. package/dist/esm/chunks/{ChatSearch.BJtS7ZMs.js → ChatSearch.DSB-T76c.js} +2 -2
  9. package/dist/esm/chunks/{ChatSearch.BJtS7ZMs.js.map → ChatSearch.DSB-T76c.js.map} +1 -1
  10. package/dist/esm/chunks/{combobox.CkN-wAHB.js → combobox.DNYCWyub.js} +40 -21
  11. package/dist/esm/chunks/combobox.DNYCWyub.js.map +1 -0
  12. package/dist/esm/components/article-suggestions-banner.js +55 -0
  13. package/dist/esm/components/article-suggestions-banner.js.map +1 -0
  14. package/dist/esm/components/chat-search.js +1 -1
  15. package/dist/esm/components/combobox.js +1 -1
  16. package/dist/esm/components/header-nav.js +55 -0
  17. package/dist/esm/components/header-nav.js.map +1 -0
  18. package/dist/esm/components/ui/button-group.js +23 -8
  19. package/dist/esm/components/ui/button-group.js.map +1 -1
  20. package/dist/esm/components/ui/button.js +2 -8
  21. package/dist/esm/components/ui/button.js.map +1 -1
  22. package/dist/esm/components/ui/command.js +1 -1
  23. package/dist/esm/components/ui/command.js.map +1 -1
  24. package/dist/esm/components/ui/div-button.js +1 -0
  25. package/dist/esm/components/ui/div-button.js.map +1 -1
  26. package/dist/esm/global.css +1 -1
  27. package/dist/esm/index.js +179 -5
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/header-nav.d.ts +28 -0
  30. package/dist/index.d.ts +134 -9
  31. package/dist/stats.html +1 -1
  32. package/dist/two-level-combobox.d.ts +2 -0
  33. package/package.json +6 -1
  34. package/components.json +0 -16
  35. package/dist/esm/chunks/combobox.CkN-wAHB.js.map +0 -1
  36. package/markdown-editor.plan.md +0 -2101
  37. package/markdown-editor.spec.md +0 -915
@@ -6,14 +6,14 @@ import { VariantProps } from 'class-variance-authority';
6
6
  export declare const AlertDialog: React_2.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogProps & React_2.RefAttributes<never>>;
7
7
 
8
8
  export declare const AlertDialogAction: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
9
- variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
9
+ variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "suggestion" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
10
10
  size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
11
11
  } & ClassProp) | undefined) => string> & {
12
12
  asChild?: boolean | undefined;
13
13
  } & React_2.RefAttributes<HTMLButtonElement>>;
14
14
 
15
15
  export declare const AlertDialogCancel: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
16
- variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
16
+ variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "suggestion" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
17
17
  size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
18
18
  } & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLButtonElement>>;
19
19
 
@@ -0,0 +1,16 @@
1
+ import * as React_2 from 'react';
2
+
3
+ export declare const ArticleSuggestionsBanner: React_2.ForwardRefExoticComponent<ArticleSuggestionsBannerProps & React_2.RefAttributes<HTMLDivElement>>;
4
+
5
+ export declare interface ArticleSuggestionsBannerProps extends React_2.HTMLAttributes<HTMLDivElement> {
6
+ suggestionsCount: number;
7
+ currentArticleIndex: number;
8
+ totalArticles: number;
9
+ onNextArticle: () => void;
10
+ onPreviousArticle: () => void;
11
+ onStartReviewSuggestions: () => void;
12
+ onRejectAllSuggestions: () => void;
13
+ onApproveAllSuggestions: () => void;
14
+ }
15
+
16
+ export { }
@@ -4,16 +4,17 @@ import * as React_2 from 'react';
4
4
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
5
5
  import { VariantProps } from 'class-variance-authority';
6
6
 
7
- export declare function ButtonGroup({ className, orientation, ...props }: default_2.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): default_2.JSX.Element;
7
+ export declare function ButtonGroup({ className, orientation, rounded, ...props }: default_2.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>): default_2.JSX.Element;
8
8
 
9
9
  export declare function ButtonGroupSeparator({ className, orientation, ...props }: default_2.ComponentProps<typeof Separator>): default_2.JSX.Element;
10
10
 
11
- export declare function ButtonGroupText({ className, asChild, ...props }: default_2.ComponentProps<"div"> & {
11
+ export declare function ButtonGroupText({ className, asChild, ...props }: default_2.ComponentProps<'div'> & {
12
12
  asChild?: boolean;
13
13
  }): default_2.JSX.Element;
14
14
 
15
15
  export declare const buttonGroupVariants: (props?: ({
16
16
  orientation?: "horizontal" | "vertical" | null | undefined;
17
+ rounded?: boolean | null | undefined;
17
18
  } & ClassProp) | undefined) => string;
18
19
 
19
20
  declare const Separator: React_2.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
package/dist/button.d.ts CHANGED
@@ -9,7 +9,7 @@ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLBu
9
9
  }
10
10
 
11
11
  export declare const buttonVariants: (props?: ({
12
- variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
12
+ variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "suggestion" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
13
13
  size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
14
14
  } & ClassProp) | undefined) => string;
15
15
 
@@ -1,23 +1,44 @@
1
1
  import * as React_2 from 'react';
2
2
 
3
- export declare function Combobox({ options, defaultValueLabel, placeholder, noResultsLabel, className, onOpenChange, onChange, dropdownWidth, value: controlledValue, }: ComboboxProps): React_2.JSX.Element;
3
+ export declare function Combobox<T extends ComboboxItem = ComboboxItem>({ options, defaultValueLabel, placeholder, noResultsLabel, className, onOpenChange, onChange, dropdownWidth, value: controlledValue, disabled, renderItem, renderValue, renderTrigger, }: ComboboxProps<T>): React_2.JSX.Element;
4
4
 
5
5
  export declare interface ComboboxItem {
6
6
  value: string;
7
7
  label: string;
8
8
  icon?: React_2.ReactNode;
9
+ /** Additional data that can be passed to custom renderers */
10
+ data?: any;
9
11
  }
10
12
 
11
- export declare interface ComboboxProps {
12
- options: ComboboxItem[];
13
+ export declare interface ComboboxProps<T extends ComboboxItem = ComboboxItem> {
14
+ options: T[];
13
15
  defaultValueLabel: string;
14
16
  placeholder: string;
15
17
  noResultsLabel: string;
16
18
  className?: string;
17
19
  dropdownWidth?: number;
18
20
  value?: string;
21
+ /** Whether the combobox is disabled */
22
+ disabled?: boolean;
23
+ /** Callback on open state change */
19
24
  onOpenChange?: (open: boolean) => void;
25
+ /** Callback on value change */
20
26
  onChange?: (value: string) => void;
27
+ /** Custom render function for each item in the dropdown */
28
+ renderItem?: (props: ComboboxRenderItemProps<T>) => React_2.ReactNode;
29
+ /** Custom render function for the selected value in the trigger button */
30
+ renderValue?: (item: T) => React_2.ReactNode;
31
+ /** Custom render function for the entire trigger button content */
32
+ renderTrigger?: (props: {
33
+ selectedItem: T | undefined;
34
+ isOpen: boolean;
35
+ }) => React_2.ReactNode;
36
+ }
37
+
38
+ export declare interface ComboboxRenderItemProps<T extends ComboboxItem = ComboboxItem> {
39
+ item: T;
40
+ isSelected: boolean;
41
+ onSelect: () => void;
21
42
  }
22
43
 
23
44
  export { }
@@ -5,7 +5,7 @@ import * as React_2 from 'react';
5
5
  import { VariantProps } from 'class-variance-authority';
6
6
 
7
7
  declare const AlertDialogAction: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
8
- variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
8
+ variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "suggestion" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
9
9
  size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
10
10
  } & ClassProp) | undefined) => string> & {
11
11
  asChild?: boolean | undefined;
@@ -9,7 +9,7 @@ export declare interface DivButtonProps extends React_2.HTMLAttributes<HTMLDivEl
9
9
  }
10
10
 
11
11
  export declare const divButtonVariants: (props?: ({
12
- variant?: "link" | "dark" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
12
+ variant?: "link" | "dark" | "default" | "destructive" | "outline" | "secondary" | "suggestion" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
13
13
  size?: "default" | "icon" | "sm" | "lg" | null | undefined;
14
14
  } & ClassProp) | undefined) => string;
15
15
 
@@ -25,7 +25,7 @@ import { F as Feedback } from './feedback.D139-1Wr.js';
25
25
  import { G as GeneratingStar } from './generating-star.CozjECmM.js';
26
26
  import { getCountry } from 'countries-and-timezones';
27
27
  import { Switch } from '../components/ui/switch.js';
28
- import { C as Combobox } from './combobox.CkN-wAHB.js';
28
+ import { C as Combobox } from './combobox.DNYCWyub.js';
29
29
  import { T as TwoLevelCombobox } from './two-level-combobox.DsWPDcI6.js';
30
30
  import { ScrollArea } from '../components/ui/scroll-area.js';
31
31
 
@@ -6479,4 +6479,4 @@ const ChatSearch = forwardRef(({ featureFlags, ...props }, ref) => /* @__PURE__
6479
6479
  ChatSearch.displayName = "ChatSearch";
6480
6480
 
6481
6481
  export { ChatSearch as C, ChatSearchProvider as a, useIsChatSearchDirty as b, useChatSearch as u };
6482
- //# sourceMappingURL=ChatSearch.BJtS7ZMs.js.map
6482
+ //# sourceMappingURL=ChatSearch.DSB-T76c.js.map