@dust-tt/sparkle 0.2.162 → 0.2.164-rc

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,8 @@
1
+ import React from "react";
2
+ import { PaginatedCitationsGrid } from "../index_with_tw_base";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof PaginatedCitationsGrid;
6
+ };
7
+ export default meta;
8
+ export declare const PaginatedCitationsGridExample: () => React.JSX.Element;
@@ -26,6 +26,8 @@ import { AssistantPreview } from "./components/AssistantPreview";
26
26
  export { AssistantPreview };
27
27
  import { Banner } from "./components/Banner";
28
28
  export { Banner };
29
+ import { PaginatedCitationsGrid } from "./components/PaginatedCitationsGrid";
30
+ export { PaginatedCitationsGrid };
29
31
  import { Notification } from "./components/Notification";
30
32
  export { Notification };
31
33
  import { Chip } from "./components/Chip";
@@ -1,6 +1,7 @@
1
1
  import React, { ReactNode } from "react";
2
+ export type CitationType = "confluence" | "document" | "github" | "google_drive" | "intercom" | "notion" | "slack";
2
3
  interface CitationProps {
3
- type?: "confluence" | "slack" | "google_drive" | "github" | "notion" | "intercom" | "document";
4
+ type?: CitationType;
4
5
  title: string;
5
6
  description?: string;
6
7
  index?: ReactNode;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { CitationType } from "@sparkle/components/Citation";
3
+ interface CitationItem {
4
+ title: string;
5
+ type: CitationType;
6
+ href: string;
7
+ }
8
+ interface PaginatedCitationsGridProps {
9
+ items: CitationItem[];
10
+ maxItemsPerPage?: 6 | 9 | 12 | 15;
11
+ }
12
+ export declare function PaginatedCitationsGrid({ items, maxItemsPerPage, }: PaginatedCitationsGridProps): React.JSX.Element | null;
13
+ export {};
@@ -6,9 +6,9 @@ export interface TreeProps {
6
6
  }
7
7
  export declare function Tree({ children, isLoading }: TreeProps): React.JSX.Element;
8
8
  export declare namespace Tree {
9
- var Item: ({ label, type, className, variant, visual, checkbox, onChevronClick, collapsed, children, actions, }: TreeItemProps) => React.JSX.Element;
9
+ var Item: ({ label, type, className, variant, visual, checkbox, onChevronClick, collapsed, defaultCollapsed, actions, renderTreeItems, children, }: TreeItemPropsWithChildren | TreeItemPropsWithRender) => React.JSX.Element;
10
10
  }
11
- export interface TreeItemProps {
11
+ interface TreeItemProps {
12
12
  label?: string;
13
13
  type?: "node" | "item" | "leaf";
14
14
  variant?: "file" | "folder" | "database" | "channel";
@@ -16,7 +16,16 @@ export interface TreeItemProps {
16
16
  checkbox?: CheckboxProps;
17
17
  onChevronClick?: () => void;
18
18
  collapsed?: boolean;
19
+ defaultCollapsed?: boolean;
19
20
  className?: string;
20
21
  actions?: React.ReactNode;
22
+ }
23
+ export interface TreeItemPropsWithChildren extends TreeItemProps {
24
+ renderTreeItems?: never;
21
25
  children?: React.ReactNode;
22
26
  }
27
+ export interface TreeItemPropsWithRender extends TreeItemProps {
28
+ renderTreeItems: () => React.ReactNode;
29
+ children?: never;
30
+ }
31
+ export {};