@lettuceai/crisp 1.4.0 → 1.5.0

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.
@@ -15,6 +15,8 @@ export interface CharacterCardProps extends Omit<HTMLMotionProps<"button">, "tit
15
15
  /** Slot on the trailing edge — a badge, a menu. Replaces the chevron. */
16
16
  trailing?: ReactNode;
17
17
  selected?: boolean;
18
+ /** Letters shown in place of a missing avatar. Defaults to the start of the name. */
19
+ initials?: string;
18
20
  }
19
21
  /**
20
22
  * The home-screen character card, in the app's two shapes. When the avatar yields a
@@ -16,7 +16,7 @@ export interface MenuContentProps {
16
16
  className?: string;
17
17
  children: ReactNode;
18
18
  }
19
- export declare function MenuContent({ align, side, className, children }: MenuContentProps): import("react").JSX.Element;
19
+ export declare function MenuContent({ align, side, className, children }: MenuContentProps): import("react").ReactPortal | null;
20
20
  export interface MenuItemProps {
21
21
  icon?: ReactNode;
22
22
  shortcut?: string;
@@ -1,4 +1,4 @@
1
- import type { ReactNode, Ref } from "react";
1
+ import { type ReactNode, type Ref } from "react";
2
2
  import { type AppBarProps } from "./AppBar";
3
3
  export interface PageProps extends AppBarProps {
4
4
  /** Pinned under the content — an ActionBar, a composer. */
@@ -23,11 +23,12 @@ export declare function PopoverAnchor({ children }: {
23
23
  children: ReactElement<Record<string, unknown>>;
24
24
  }): ReactElement<Record<string, unknown>, string | import("react").JSXElementConstructor<any>>;
25
25
  /** Anchors to the trigger and flips to the other side when it would leave the viewport. */
26
- export declare function usePopoverPosition(anchorRef: React.MutableRefObject<HTMLElement | null>, panelRef: React.RefObject<HTMLElement | null>, { open, side, align, offset }: {
26
+ export declare function usePopoverPosition(anchorRef: React.MutableRefObject<HTMLElement | null>, panelRef: React.RefObject<HTMLElement | null>, { open, side, align, offset, portal }: {
27
27
  open: boolean;
28
28
  side: PopoverSide;
29
29
  align: PopoverAlign;
30
30
  offset: number;
31
+ portal?: HTMLElement | null;
31
32
  }): {
32
33
  top: number;
33
34
  left: number;
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from "react";
1
+ import { type ReactNode, type Ref } from "react";
2
2
  export type SheetPlacement = "auto" | "bottom" | "side" | "center";
3
3
  /** Fractions of the viewport the bottom sheet rests at. Ascending. */
4
4
  export type SheetDetent = number;
@@ -44,9 +44,10 @@ export interface SheetProps {
44
44
  /** Start at this detent index. Default 0. */
45
45
  defaultDetent?: number;
46
46
  className?: string;
47
+ scrollRef?: Ref<HTMLDivElement>;
47
48
  children: ReactNode;
48
49
  }
49
- export declare function Sheet({ open, onClose, title, description, leftAction, rightAction, closeButton, dismissible, footer, placement, size, detents, defaultDetent, className, children, }: SheetProps): import("react").ReactPortal | null;
50
+ export declare function Sheet({ open, onClose, title, description, leftAction, rightAction, closeButton, dismissible, footer, placement, size, detents, defaultDetent, className, scrollRef, children, }: SheetProps): import("react").ReactPortal | null;
50
51
  /**
51
52
  * The team's name for this surface. Same component — `BottomMenu` reads better at
52
53
  * call sites that are, and always will be, a bottom menu.
@@ -10,7 +10,7 @@ export interface StepperProps {
10
10
  current: number;
11
11
  /** Jump back to a completed step. Forward jumps are never offered. */
12
12
  onStepClick?: (index: number) => void;
13
- /** `bar` is a segmented progress strip; `dots` is a compact row for a sheet header. */
13
+ /** `bar` is one row of labelled steps joined by lines; `dots` is a compact row for a sheet header. */
14
14
  variant?: "bar" | "dots";
15
15
  className?: string;
16
16
  }
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from "react";
1
+ import { type ReactNode, type RefObject } from "react";
2
2
  export interface VirtualListProps<T> {
3
3
  items: readonly T[];
4
4
  /** Rendered per row. Keep it cheap — it runs on every scroll frame. */
@@ -9,10 +9,12 @@ export interface VirtualListProps<T> {
9
9
  /** Stable key per row, so React reuses the right nodes. */
10
10
  itemKey?: (item: T, index: number) => string | number;
11
11
  className?: string;
12
+ scrollRef?: RefObject<HTMLElement | null>;
13
+ gap?: number;
12
14
  }
13
15
  /**
14
16
  * Renders only the rows in view. `@tanstack/react-virtual` is already a dependency but
15
17
  * only two of the app's long-list screens use it — chat memories, logs and the model
16
18
  * browser all mount every row.
17
19
  */
18
- export declare function VirtualList<T>({ items, children, estimateSize, overscan, itemKey, className }: VirtualListProps<T>): import("react").JSX.Element;
20
+ export declare function VirtualList<T>({ items, children, estimateSize, overscan, itemKey, className, scrollRef, gap }: VirtualListProps<T>): import("react").JSX.Element;