@gram-ai/elements 1.0.1 → 1.0.3

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/README.md CHANGED
@@ -7,7 +7,7 @@ Elements is a library built for the agentic age. We provide customizable and ele
7
7
  First ensure that you have installed the required peer dependencies:
8
8
 
9
9
  ```bash
10
- pnpm add react react-dom
10
+ pnpm add react react-dom @assistant-ui/react @assistant-ui/react-markdown motion remark-gfm zustand
11
11
  ```
12
12
 
13
13
  ## Usage
@@ -15,16 +15,16 @@ pnpm add react react-dom
15
15
  `@gram-ai/elements` requires that you wrap your React tree with our context provider and reference our CSS:
16
16
 
17
17
  ```jsx
18
- import { GramElementsProvider, Chat } from "@gram-ai/elements";
19
- import "@gram-ai/elements/elements.css";
18
+ import { GramElementsProvider, Chat } from '@gram-ai/elements'
19
+ import '@gram-ai/elements/elements.css'
20
20
 
21
21
  export const App = () => {
22
22
  return (
23
23
  <GramElementsProvider>
24
24
  <Chat />
25
25
  </GramElementsProvider>
26
- );
27
- };
26
+ )
27
+ }
28
28
  ```
29
29
 
30
30
  ## Contributing
@@ -0,0 +1 @@
1
+ export declare const Chat: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { Chat } from '.';
2
+ import { Meta, StoryFn } from '@storybook/react-vite';
3
+ declare const meta: Meta<typeof Chat>;
4
+ export default meta;
5
+ type Story = StoryFn<typeof Chat>;
6
+ export declare const Default: Story;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ export declare const UserMessageAttachments: FC;
3
+ export declare const ComposerAttachments: FC;
4
+ export declare const ComposerAddAttachment: FC;
@@ -0,0 +1 @@
1
+ export declare const MarkdownText: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const ThreadList: FC;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const Thread: FC;
@@ -0,0 +1,2 @@
1
+ import { ToolCallMessagePartComponent } from '@assistant-ui/react';
2
+ export declare const ToolFallback: ToolCallMessagePartComponent;
@@ -0,0 +1,7 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ import { Button } from '../ui/button';
3
+ export type TooltipIconButtonProps = ComponentPropsWithRef<typeof Button> & {
4
+ tooltip: string;
5
+ side?: 'top' | 'bottom' | 'left' | 'right';
6
+ };
7
+ export declare const TooltipIconButton: import('react').ForwardRefExoticComponent<Omit<TooltipIconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
+ declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
6
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,10 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export { Button, buttonVariants };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
12
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
13
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
15
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
4
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,3 @@
1
+ import { ElementsProviderProps } from '../types';
2
+ export declare const ElementsProvider: ({ children, api }: ElementsProviderProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const useElements: () => object;