@uraiagent/react 0.0.6 → 0.0.7

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/Widget.d.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  /**
2
- * The widget's UI shell launcher trigger + chat panel. Internal: it must render
3
- * inside the providers set up by `Root`. Consumers use the unified `AgentWidget`
4
- * (which composes `Root` + this) instead of rendering it directly.
2
+ * The widget's UI shell. A fixed bottom-right dock holding two decoupled pieces:
3
+ * the standalone launcher, and the panel that mounts above it on open. The morphing
4
+ * single-surface launcher of the old design is gone opening/closing is now a clean
5
+ * swap between the two, animated by framer-motion.
6
+ *
7
+ * Internal: must render inside the providers set up by `Root`. Consumers use the
8
+ * unified `AgentWidget` (which composes `Root` + this).
5
9
  */
6
10
  export declare function WidgetShell(): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { AttachmentRef } from '../../interfaces/messages';
2
- /** Renders a message's attachments, choosing a presentation per file type. */
3
- export declare function MessageAttachments({ attachments }: {
2
+ /** Renders a message's attachments: images as a wrapping row of small thumbnails
3
+ * (Gleap-style), other file types as cards stacked below. */
4
+ export declare function MessageAttachments({ attachments, }: {
4
5
  attachments?: AttachmentRef[];
5
6
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +1,7 @@
1
+ /**
2
+ * The message composer. A single rounded card: the text area sits on top, and a
3
+ * toolbar row underneath holds the attach + voice actions on the left and a circular
4
+ * send button on the right. Always active (it only mounts inside the open panel's
5
+ * chat view), so there's no hover/open state to juggle.
6
+ */
1
7
  export declare function ChatFooter(): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,6 @@
1
+ /**
2
+ * The conversation view. Header and launcher live at the panel/dock level now, so
3
+ * this is purely the scrollable message log + the composer. Always "open" — it only
4
+ * mounts when the panel's `chat` view is active.
5
+ */
1
6
  export declare function ChatScreen(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The standalone floating launcher — the only thing on screen when the widget is closed.
3
+ *
4
+ * It's fully decoupled from the panel now: clicking it opens the panel (which slides down
5
+ * into the launcher's corner) and the launcher itself scales/fades away. Closing reverses
6
+ * it. Keeps the original pulsing brand mark as the resting icon; while open it briefly shows
7
+ * a chevron so the affordance reads as "collapse back down".
8
+ */
9
+ export declare function WidgetLauncher(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The panel's top bar. Keeps the original "Powered by uraiagent.com" strip (with the
3
+ * live connection dot) and owns the close affordance for the whole widget. On the chat
4
+ * screen it also offers a back arrow to the home screen.
5
+ */
6
+ export declare function PanelHeader(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The open widget surface. Mounts above the launcher and settles down into its
3
+ * corner (transform-origin bottom-right), so opening reads as the panel dropping
4
+ * into the launcher's place. Owns the header; the body cross-fades between the
5
+ * home screen and the conversation.
6
+ */
7
+ export declare function WidgetPanel(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The panel's landing screen. Gradient hero up top (with a bottom-aligned brand +
3
+ * welcome block, like the earlier layout), then a clean body with the single primary
4
+ * action. Owns its own close control since the panel drops its top bar on this view.
5
+ */
6
+ export declare function HomeScreen(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { UserMessageProps } from '../../interfaces/messages';
2
- export declare function UserMessage({ message, _id, createdAt, attachments }: UserMessageProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function UserMessage({ message, _id, createdAt, attachments, }: UserMessageProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,19 @@
1
1
  import { ReactNode } from 'react';
2
+ /** Which screen the open panel is showing. `home` = greeting + CTA, `chat` = the conversation. */
3
+ export type WidgetView = "home" | "chat";
2
4
  type WidgetContextType = {
3
5
  open: boolean;
6
+ /** Active panel screen. Only meaningful while `open`. */
7
+ view: WidgetView;
4
8
  maximize: {
5
9
  value: boolean;
6
10
  component: ReactNode | null;
7
11
  };
12
+ /**
13
+ * Legacy hover flag from the old morphing-launcher design. The split
14
+ * launcher/panel UI no longer drives it, but it's kept so any lingering
15
+ * consumer keeps compiling. Always `false`.
16
+ */
8
17
  hover: boolean;
9
18
  setMaximize: (data: {
10
19
  value: boolean;
@@ -12,6 +21,7 @@ type WidgetContextType = {
12
21
  }) => void;
13
22
  setOpen: (data: boolean) => void;
14
23
  setHover: (data: boolean) => void;
24
+ setView: (view: WidgetView) => void;
15
25
  toggleWidget: () => void;
16
26
  toggleMaximize: (component: ReactNode | null) => void;
17
27
  onClose: () => void;