blixify-ui-web-mcp 0.1.22 → 0.1.23

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.
@@ -8,10 +8,20 @@ A floating chat button fixed to the viewport. Clicking it toggles the `ChatBase`
8
8
 
9
9
  The button can be dragged out of the way on desktop and touch, and where it is dropped is kept in `localStorage` so it stays there on the next visit. A short drag is still treated as a click, so tapping always opens the chat. A saved position is clamped back into view when it is restored on a smaller screen or the window is resized under it, and dragging is disabled while the panel is full screen on mobile.
10
10
 
11
+ With `resizableWidth`, an open panel gains a grab handle on its left edge — dragging it left or right resizes the panel to any width. The only bounds are physical: it cannot be dragged wider than the viewport, nor narrower than 280px, below which the header, messages and input stop being usable. The chosen width is kept in `localStorage`, re-clamped to the viewport on window resize, and the handle is hidden while the panel is full screen on mobile.
12
+
13
+ `resizableHeight` works the same way on the vertical axis: an open panel gains a grab handle on its top edge, and dragging it up or down resizes the panel to any height. Because the panel grows upward from the bottom-right anchor, the cap is the distance from its bottom edge to the top of the viewport, and the floor keeps the header and input row usable. The default height is three quarters of the viewport (matching the panel's `sm:h-[75vh]`). Width and height are independent — turn on either or both. The chosen height is kept in `localStorage` and re-clamped on window resize.
14
+
11
15
  | Prop | Type | Default | Description |
12
16
  | -------------------- | --------- | -------------------------------- | ------------------------------------------------------------------------------------------- |
13
17
  | `draggable` | `boolean` | `true` | Set `false` to pin the button to `positionOffset` and ignore any saved position |
14
18
  | `positionStorageKey` | `string` | `"blixify-chat-anchor-position"` | `localStorage` key holding `{ right, bottom }` in px, measured from the bottom-right corner |
19
+ | `resizableWidth` | `boolean` | `false` | Set `true` to show a left-edge handle that drags the open panel to any width |
20
+ | `defaultWidth` | `number` | `384` | Width (px) the panel opens at before the user has dragged (matches `sm:w-96`) |
21
+ | `widthStorageKey` | `string` | `"blixify-chat-anchor-width"` | `localStorage` key holding the panel width in px |
22
+ | `resizableHeight` | `boolean` | `false` | Set `true` to show a top-edge handle that drags the open panel to any height |
23
+ | `defaultHeight` | `number` | `75% of viewport` | Height (px) the panel opens at before the user has dragged (matches `sm:h-[75vh]`) |
24
+ | `heightStorageKey` | `string` | `"blixify-chat-anchor-height"` | `localStorage` key holding the panel height in px |
15
25
 
16
26
  ##### Import
17
27
 
@@ -70,11 +80,11 @@ return (
70
80
 
71
81
  | Name | Type | Default | Description |
72
82
  | ---------------- | ----------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------- |
73
- | `positionOffset` | `string` | `"bottom-8 right-8"` | Tailwind classes that control the fixed position of the anchor. Ignored on mobile when open. |
83
+ | `positionOffset` | `string` | `"bottom-6 right-6"` | Tailwind classes that control the fixed position of the anchor. Ignored on mobile when open. |
74
84
  | `greetingCard` | `boolean` | `false` | When `true`, shows a greeting bubble next to the anchor button while the chat is closed. |
75
85
  | `greetingText` | `string` | `"Welcome! How can I help you today?"` | Text displayed inside the greeting card bubble. |
76
- | `openIcon` | `React.ReactNode` \| `string` | `ChatBubbleOvalLeftIcon` | Icon shown when the chat is closed. A string is treated as an image URL (64×64 rounded circle). |
77
- | `closeIcon` | `React.ReactNode` \| `string` | `XMarkIcon` | Icon shown when the chat is open. A string is treated as an image URL (64×64 rounded circle). |
86
+ | `openIcon` | `React.ReactNode` \| `string` | `ChatBubbleOvalLeftIcon` | Icon shown when the chat is closed. A string is treated as an image URL (56×56 rounded circle). |
87
+ | `closeIcon` | `React.ReactNode` \| `string` | `XMarkIcon` | Icon shown when the chat is open. A string is treated as an image URL (56×56 rounded circle). |
78
88
 
79
89
  ##### Optional props — inherited from ChatBase
80
90
 
@@ -148,3 +148,53 @@ export const ChatAnchor = () => {
148
148
  </div>
149
149
  );
150
150
  }
151
+
152
+ export const Resizable = () => {
153
+ const botUser = { id: "1", name: "Bot" };
154
+ const currentUser = { id: "2", name: "Guest" };
155
+
156
+ const [openChatBase, setOpenChatBase] = useState<boolean>(true);
157
+ const [message, setMessage] = useState("");
158
+
159
+ const [conversation, setConversation] = useState<Conversation>({
160
+ id: "1",
161
+ members: [currentUser, botUser],
162
+ messageList: [
163
+ {
164
+ sender: botUser,
165
+ messageBody:
166
+ "Drag my left edge to resize the width and my top edge to resize the height. Both are remembered independently.",
167
+ createdAt: dayjs(
168
+ "Fri Nov 03 2023 12:21:14 GMT+0800 (Malaysia Time)"
169
+ ).toDate(),
170
+ },
171
+ ],
172
+ });
173
+
174
+ const handleOnClick = () => setOpenChatBase(!openChatBase);
175
+
176
+ const handleOnSendMessage = (conversation: Conversation) => {
177
+ setConversation(conversation);
178
+ setMessage("");
179
+ };
180
+
181
+ return (
182
+ <div className="h-96 w-full relative">
183
+ <ChatAnchorImpl
184
+ open={openChatBase}
185
+ value={message}
186
+ currentUser={currentUser}
187
+ conversation={conversation}
188
+ onSendMessage={handleOnSendMessage}
189
+ onChangeMessage={(e) => setMessage(e.target.value)}
190
+ onClose={handleOnClick}
191
+ onClick={handleOnClick}
192
+ className="shadow-lg border border-gray-200"
193
+ resizableWidth
194
+ defaultWidth={384}
195
+ resizableHeight
196
+ defaultHeight={384}
197
+ />
198
+ </div>
199
+ );
200
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blixify-ui-web-mcp",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "license": "MIT",
5
5
  "main": "lib/mcp/server.js",
6
6
  "bin": {