@lettuceai/crisp 1.4.0 → 1.6.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.
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/CharacterCard.d.ts +2 -0
- package/dist/components/DatePicker.d.ts +5 -1
- package/dist/components/IconButton.d.ts +1 -1
- package/dist/components/Menu.d.ts +1 -1
- package/dist/components/Page.d.ts +1 -1
- package/dist/components/Popover.d.ts +2 -1
- package/dist/components/Sheet.d.ts +3 -2
- package/dist/components/Stepper.d.ts +1 -1
- package/dist/components/VirtualList.d.ts +4 -2
- package/dist/index.js +2391 -2282
- package/dist/index.js.map +1 -1
- package/dist/lib/calendar.d.ts +3 -0
- package/dist/lib/strings.d.ts +4 -0
- package/dist/lib/textarea.d.ts +14 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type ReactNode } from "react";
|
|
2
|
-
export type ButtonVariant = "primary" | "tonal" | "secondary" | "ghost" | "danger";
|
|
2
|
+
export type ButtonVariant = "primary" | "tonal" | "secondary" | "ghost" | "danger" | "overlay";
|
|
3
3
|
export type ButtonSize = "sm" | "md" | "lg";
|
|
4
4
|
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
5
5
|
variant?: ButtonVariant;
|
|
@@ -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
|
|
@@ -8,7 +8,11 @@ export interface CalendarProps {
|
|
|
8
8
|
locale?: string;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The month grid. Uses Intl for day and month names, so it follows the app's 20 locales.
|
|
13
|
+
* The month title opens a month and year view with a typed year, so a date centuries
|
|
14
|
+
* away is a few keystrokes rather than hundreds of clicks.
|
|
15
|
+
*/
|
|
12
16
|
export declare function Calendar({ value, onChange, min, max, weekStartsOn, locale: localeProp, className }: CalendarProps): import("react").JSX.Element;
|
|
13
17
|
export interface DatePickerProps extends Omit<CalendarProps, "className"> {
|
|
14
18
|
/** Shown when nothing is chosen. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type ReactNode } from "react";
|
|
2
|
-
export type IconButtonVariant = "ghost" | "secondary" | "tonal";
|
|
2
|
+
export type IconButtonVariant = "ghost" | "secondary" | "tonal" | "overlay";
|
|
3
3
|
export type IconButtonSize = "sm" | "md" | "lg";
|
|
4
4
|
export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
5
5
|
/** Required: icon buttons have no visible text. */
|
|
@@ -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").
|
|
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;
|
|
@@ -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
|
|
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;
|