@fluxy-chat/ui-kit 0.1.4 → 0.1.5

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
@@ -1,8 +1,6 @@
1
1
  # @fluxy-chat/ui-kit
2
2
 
3
- Drop-in polished chat widget and inbox panel for FluxyChat. Closes the "headless only" gap compared to hosted SDKs.
4
-
5
- Built on `@fluxy-chat/ui` + `@fluxy-chat/react`. Optional bridge to [`assistant-ui`](https://assistant-ui.com) via `useFluxyAssistantRuntime`.
3
+ Chat widget and inbox panel on `@fluxy-chat/ui` + `@fluxy-chat/react`. Optional bridge to [`assistant-ui`](https://assistant-ui.com) via `useFluxyAssistantRuntime`.
6
4
 
7
5
  ## Install
8
6
 
@@ -19,11 +17,14 @@ import { FluxyChatWidget } from "@fluxy-chat/ui-kit";
19
17
  roomId="general"
20
18
  workerUrl={process.env.NEXT_PUBLIC_FLUXYCHAT_WORKER_URL!}
21
19
  guest
20
+ publishableKey={process.env.NEXT_PUBLIC_FLUXYCHAT_PUBLISHABLE_KEY}
22
21
  theme="brand"
23
22
  height={520}
24
23
  />
25
24
  ```
26
25
 
26
+ `guest` on a public room. Hosted multi-tenant also needs `publishableKey` (`pk_`). Member JWT still works via `token` or a `client`.
27
+
27
28
  ## Inbox
28
29
 
29
30
  ```tsx
@@ -5,12 +5,12 @@ import { FluxyChatClient } from "@fluxy-chat/sdk";
5
5
  import { useChat } from "@fluxy-chat/react";
6
6
  import { ChatWindow, applyFluxyTheme, fluxyThemeClassName, } from "@fluxy-chat/ui";
7
7
  function WidgetInner({ roomId, title, client, }) {
8
- const { messages, sendMessage, connectionState, typingUsers, online } = useChat({
8
+ const { messages, sendMessage, connectionState, typingUsers, online, agentTyping } = useChat({
9
9
  roomId,
10
10
  client,
11
11
  markReadLatest: true,
12
12
  });
13
- return (_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [title && (_jsxs("header", { className: "border-b border-border px-4 py-2 text-sm font-semibold", children: [title, _jsx("span", { className: "ml-2 font-normal text-muted-foreground", children: connectionState.status })] })), _jsx("div", { className: "min-h-0 flex-1", children: _jsx(ChatWindow, { messages: messages, online: online, typingUsers: typingUsers, onSend: (text) => sendMessage(text) }) })] }));
13
+ return (_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [title && (_jsxs("header", { className: "border-b border-border px-4 py-2 text-sm font-semibold", children: [title, _jsx("span", { className: "ml-2 font-normal text-muted-foreground", children: connectionState.status })] })), _jsx("div", { className: "min-h-0 flex-1", children: _jsx(ChatWindow, { messages: messages, online: online, typingUsers: typingUsers, agentTyping: agentTyping && !messages.some((m) => m.streaming), onSend: (text) => sendMessage(text) }) })] }));
14
14
  }
15
15
  /** Drop-in chat widget — polished UI out of the box. */
16
16
  export function FluxyChatWidget({ roomId, client: clientProp, workerUrl, token, userId = "user-1", guest = false, publishableKey, displayName, theme = "default", className, height = 480, title, }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluxy-chat/ui-kit",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Polished drop-in FluxyChat widget and inbox — built on @fluxy-chat/ui with optional assistant-ui runtime",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,8 +19,8 @@
19
19
  ],
20
20
  "peerDependencies": {
21
21
  "react": ">=18",
22
- "@fluxy-chat/sdk": "^0.6.5",
23
- "@fluxy-chat/react": "^0.1.4",
22
+ "@fluxy-chat/sdk": "^0.6.12",
23
+ "@fluxy-chat/react": "^0.1.7",
24
24
  "@fluxy-chat/ui": "^0.1.4",
25
25
  "@assistant-ui/react": ">=0.10.0"
26
26
  },
@@ -30,8 +30,8 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@fluxy-chat/react": "0.1.6",
34
- "@fluxy-chat/sdk": "0.6.8",
33
+ "@fluxy-chat/sdk": "0.6.12",
34
+ "@fluxy-chat/react": "0.1.7",
35
35
  "@fluxy-chat/ui": "0.1.4"
36
36
  },
37
37
  "devDependencies": {