blixify-ui-web-mcp 0.1.3 → 0.1.18

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.
Files changed (126) hide show
  1. package/lib/components/action/button/README.md +12 -11
  2. package/lib/components/action/button/button.stories.tsx +4 -10
  3. package/lib/components/action/buttonGroup/buttonGroup.stories.tsx +4 -10
  4. package/lib/components/action/iconButton/iconButton.stories.tsx +4 -10
  5. package/lib/components/action/radioList/radioList.stories.tsx +4 -10
  6. package/lib/components/action/slider/slider.stories.tsx +4 -10
  7. package/lib/components/action/textButton/textButton.stories.tsx +4 -10
  8. package/lib/components/action/toggle/toggle.stories.tsx +4 -10
  9. package/lib/components/advanced/collapse/collapse.stories.tsx +4 -10
  10. package/lib/components/advanced/infoWindow/infoWindow.stories.tsx +4 -10
  11. package/lib/components/advanced/popUp/README.md +21 -7
  12. package/lib/components/advanced/popUp/popUp.stories.tsx +4 -10
  13. package/lib/components/auth/bareSignIn/bareSignIn.stories.tsx +30 -10
  14. package/lib/components/auth/bareSignUp/bareSignUp.stories.tsx +4 -10
  15. package/lib/components/auth/signIn/signIn.stories.tsx +4 -10
  16. package/lib/components/auth/signUp/signUp.stories.tsx +4 -10
  17. package/lib/components/chart/areaChart/areaChart.stories.tsx +7 -13
  18. package/lib/components/chart/barChart/barChart.stories.tsx +7 -13
  19. package/lib/components/chart/boxPlotChart/boxPlotChart.stories.tsx +8 -14
  20. package/lib/components/chart/bubbleChart/bubbleChart.stories.tsx +8 -14
  21. package/lib/components/chart/card/card.stories.tsx +4 -10
  22. package/lib/components/chart/ganttChart/ganttChart.stories.tsx +4 -10
  23. package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +4 -10
  24. package/lib/components/chart/lineChart/lineChart.stories.tsx +4 -10
  25. package/lib/components/chart/pieChart/pieChart.stories.tsx +4 -10
  26. package/lib/components/chart/polarAreaChart/polarAreaChart.stories.tsx +8 -14
  27. package/lib/components/chart/radarChart/radarChart.stories.tsx +4 -10
  28. package/lib/components/chart/radialBar/radialChart.stories.tsx +4 -10
  29. package/lib/components/chart/rangeBarChart/rangeBarChart.stories.tsx +4 -10
  30. package/lib/components/chart/statsCard/statsCard.stories.tsx +4 -10
  31. package/lib/components/chart/treemapChart/treemapChart.stories.tsx +8 -14
  32. package/lib/components/chat/chatAnchor/chatAnchor.stories.tsx +13 -19
  33. package/lib/components/chat/chatBase/README.md +103 -22
  34. package/lib/components/chat/chatBase/chatBase.stories.tsx +652 -52
  35. package/lib/components/chat/chatDashboard/README.md +17 -15
  36. package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +356 -44
  37. package/lib/components/data/dataGraph/dataGraph.stories.tsx +4 -10
  38. package/lib/components/data/dataReference/dataReference.stories.tsx +4 -10
  39. package/lib/components/data/dataTemplate/README.md +88 -61
  40. package/lib/components/data/dataTemplate/dataModule.stories.tsx +4 -10
  41. package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +4 -10
  42. package/lib/components/data/dataWrapper/README.md +46 -45
  43. package/lib/components/data/dataWrapper/dataWrapper.stories.tsx +258 -489
  44. package/lib/components/data/queryForm/queryForm.stories.tsx +4 -10
  45. package/lib/components/data/readQuery/readQuery.stories.tsx +4 -9
  46. package/lib/components/data/readQueryHoc/readQueryHoc.stories.tsx +4 -10
  47. package/lib/components/data/writeQuery/writeQuery.stories.tsx +4 -8
  48. package/lib/components/design/actionSection/actionSection.stories.tsx +6 -10
  49. package/lib/components/design/banner/banner.stories.tsx +4 -10
  50. package/lib/components/design/bannerAction/bannerAction.stories.tsx +4 -10
  51. package/lib/components/design/blogSection/blogSection.stories.tsx +4 -10
  52. package/lib/components/design/carouselSection/carouselSection.stories.tsx +4 -10
  53. package/lib/components/design/designList/designList.stories.tsx +4 -10
  54. package/lib/components/design/faq/faq.stories.tsx +4 -10
  55. package/lib/components/design/fileGrid/fileGrid.stories.tsx +4 -10
  56. package/lib/components/design/fileViewer/fileViewer.stories.tsx +4 -10
  57. package/lib/components/design/footerSection/footerSection.stories.tsx +4 -10
  58. package/lib/components/design/googleReview/googleReview.stories.tsx +4 -10
  59. package/lib/components/design/heroSection/heroSection.stories.tsx +4 -10
  60. package/lib/components/design/iconList/iconList.stories.tsx +4 -10
  61. package/lib/components/design/imageGallery/imageGallery.stories.tsx +4 -10
  62. package/lib/components/design/imageZoom/imageZoom.stories.tsx +4 -10
  63. package/lib/components/design/leftContent/leftContent.stories.tsx +4 -10
  64. package/lib/components/design/logoCloud/logoCloud.stories.tsx +4 -10
  65. package/lib/components/design/onboarding/onboarding.stories.tsx +4 -10
  66. package/lib/components/design/pricing/pricing.stories.tsx +4 -10
  67. package/lib/components/design/rightContent/rightContent.stories.tsx +4 -10
  68. package/lib/components/design/sectionList/sectionList.stories.tsx +4 -10
  69. package/lib/components/design/teams/teams.stories.tsx +4 -10
  70. package/lib/components/display/alert/alert.stories.tsx +4 -10
  71. package/lib/components/display/calendar/README.md +49 -0
  72. package/lib/components/display/calendar/calendar.stories.tsx +71 -28
  73. package/lib/components/display/clipboard/clipboard.stories.tsx +4 -10
  74. package/lib/components/display/detailList/detailList.stories.tsx +5 -10
  75. package/lib/components/display/drawer/drawer.stories.tsx +5 -10
  76. package/lib/components/display/emptyState/emptyState.stories.tsx +4 -10
  77. package/lib/components/display/feeds/feeds.stories.tsx +4 -10
  78. package/lib/components/display/flexTable/README.md +11 -7
  79. package/lib/components/display/flexTable/flexTable.stories.tsx +114 -11
  80. package/lib/components/display/grid/README.md +28 -27
  81. package/lib/components/display/grid/grid.stories.tsx +4 -10
  82. package/lib/components/display/kanban/kanban.stories.tsx +14 -20
  83. package/lib/components/display/list/README.md +30 -29
  84. package/lib/components/display/list/list.stories.tsx +4 -10
  85. package/lib/components/display/loading/loading.stories.tsx +5 -10
  86. package/lib/components/display/mapView/mapView.stories.tsx +4 -10
  87. package/lib/components/display/modal/modal.stories.tsx +4 -11
  88. package/lib/components/display/notification/notification.stories.tsx +4 -10
  89. package/lib/components/display/progress/progress.stories.tsx +5 -10
  90. package/lib/components/display/stepper/stepper.stories.tsx +5 -10
  91. package/lib/components/display/table/README.md +38 -37
  92. package/lib/components/display/table/table.stories.tsx +8 -14
  93. package/lib/components/display/tag/tag.stories.tsx +4 -10
  94. package/lib/components/input/address/address.stories.tsx +4 -10
  95. package/lib/components/input/canvas/canvas.stories.tsx +4 -10
  96. package/lib/components/input/checkbox/checkbox.stories.tsx +4 -10
  97. package/lib/components/input/datePicker/datePicker.stories.tsx +4 -10
  98. package/lib/components/input/form/form.stories.tsx +4 -10
  99. package/lib/components/input/markdown/markdown.stories.tsx +5 -10
  100. package/lib/components/input/monthYearPicker/monthYearPicker.stories.tsx +4 -10
  101. package/lib/components/input/netPromoterScore/netPromoterScore.stories.tsx +4 -10
  102. package/lib/components/input/rating/rating.stories.tsx +4 -10
  103. package/lib/components/input/select/README.md +30 -29
  104. package/lib/components/input/select/select.stories.tsx +4 -10
  105. package/lib/components/input/signature/signature.stories.tsx +4 -10
  106. package/lib/components/input/textArea/textArea.stories.tsx +4 -10
  107. package/lib/components/input/textInput/textinput.stories.tsx +4 -10
  108. package/lib/components/input/uploadInput/uploadInput.stories.tsx +135 -11
  109. package/lib/components/navigation/bars/bars.stories.tsx +4 -10
  110. package/lib/components/navigation/bottomTab/bottomTab.stories.tsx +5 -10
  111. package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +4 -10
  112. package/lib/components/navigation/header/header.stories.tsx +24 -12
  113. package/lib/components/navigation/leftNav/leftNav.stories.tsx +4 -10
  114. package/lib/components/navigation/tabs/tabs.stories.tsx +4 -10
  115. package/lib/components/structure/column/column.stories.tsx +5 -10
  116. package/lib/components/structure/container/container.stories.tsx +5 -10
  117. package/lib/components/structure/link/link.stories.tsx +4 -10
  118. package/lib/components/structure/text/text.stories.tsx +5 -10
  119. package/lib/components/template/authPage/authPage.stories.tsx +6 -5
  120. package/lib/components/template/landingPage/landingPage.stories.tsx +8 -6
  121. package/lib/components/template/productListing/productListing.stories.tsx +7 -13
  122. package/lib/components/template/productOverview/productOverview.stories.tsx +5 -11
  123. package/lib/components/template/shoppingCart/shoppingCart.stories.tsx +6 -12
  124. package/lib/components/template/userHomePage/userHomePage.stories.tsx +7 -6
  125. package/lib/components/template/userRankingDashboard/userRankingDashboard.stories.tsx +5 -11
  126. package/package.json +1 -1
@@ -4,7 +4,7 @@
4
4
 
5
5
  <hr>
6
6
 
7
- A chat window component with message bubbles, markdown rendering for received messages, message search, file upload (image/video), a loading reply indicator, and customisable header/footer/body slots.
7
+ A chat window component with message bubbles, markdown rendering for received messages, message search, file upload (images, videos, PDFs, and other documents), a loading reply indicator, tool report logs, tool call chips, and customisable header/footer/body slots.
8
8
 
9
9
  ##### Import
10
10
 
@@ -13,6 +13,8 @@ import {
13
13
  ChatBase,
14
14
  Conversation,
15
15
  Message,
16
+ ToolReport,
17
+ ToolCall,
16
18
  User,
17
19
  } from "blixify-ui-web/components/chat/chatBase";
18
20
  ```
@@ -80,9 +82,9 @@ With file upload:
80
82
  fileUpload={{
81
83
  allowFileUpload: true,
82
84
  file,
83
- acceptFileType: ".jpg,.jpeg,.png,.mp4,.webm",
85
+ acceptFileType: ".jpg,.jpeg,.png,.mp4,.webm,.pdf,.docx",
84
86
  onChangeUpload: (e) => setFile(e.target.files[0]),
85
- onSendUpload: (conversation) => { /* append file message */ },
87
+ onSendUpload: (conversation, file) => { /* handle upload */ },
86
88
  }}
87
89
  onSendMessage={...}
88
90
  onChangeMessage={...}
@@ -103,6 +105,43 @@ With loading reply indicator:
103
105
  />
104
106
  ```
105
107
 
108
+ With tool report (shows model + tool call status above an assistant message):
109
+
110
+ ```jsx
111
+ const assistantMessage: Message = {
112
+ sender: botUser,
113
+ messageBody: "Your order is out for delivery.",
114
+ createdAt: new Date(),
115
+ toolReport: {
116
+ model: "gemini-2.0-flash",
117
+ tools: [
118
+ { content: "search_orders", request: {}, response: {}, status: "done" },
119
+ {
120
+ content: "fetch_delivery_status",
121
+ request: {},
122
+ response: {},
123
+ status: "done",
124
+ },
125
+ ],
126
+ },
127
+ };
128
+ ```
129
+
130
+ Status dot colours: `"pending"` → yellow pulsing, `"done"` → green, `"error"` → red.
131
+
132
+ With tool call chips (for AI pipelines that log tool invocations as separate messages):
133
+
134
+ ```jsx
135
+ // Messages where author === "tool" should set isToolCall: true.
136
+ // They render as a small centred chip instead of a chat bubble.
137
+ const toolCallMessage: Message = {
138
+ sender: botUser,
139
+ messageBody: "fetch_policy_details",
140
+ createdAt: new Date(),
141
+ isToolCall: true,
142
+ };
143
+ ```
144
+
106
145
  ##### Required props
107
146
 
108
147
  | Name | Type | Description |
@@ -130,6 +169,7 @@ With loading reply indicator:
130
169
  | `sizeClassName` | `string` | `h-full w-full sm:h-[75vh] sm:w-96` | Tailwind classes controlling the component dimensions |
131
170
  | `className` | `string` | — | Additional Tailwind classes applied to the outer container |
132
171
  | `paddingTop` | `number` | `0` | Top padding in pixels. Used to offset the actions menu in mobile app layouts. |
172
+ | `inputActions` | `ReactElement[]` | — | Extra icon buttons rendered in the input row between the paperclip and the send button |
133
173
  | `onSendMessage` | `(conversation: Conversation) => void` | — | Called with the updated conversation (including the new message) when send is triggered |
134
174
  | `onChangeMessage` | `(event: any) => void` | — | Called on every keystroke in the message input |
135
175
  | `onSearch` | `(searchMessage: string) => void` | — | Called when the search form is submitted |
@@ -139,14 +179,22 @@ With loading reply indicator:
139
179
 
140
180
  ##### FileUpload
141
181
 
142
- | Name | Type | Description |
143
- | ----------------- | -------------------------------------- | ----------------------------------------------------------------------------------------- |
144
- | `allowFileUpload` | `boolean` | Shows the paperclip button to trigger file selection |
145
- | `file` | `string \| File \| any` | Currently selected file |
146
- | `maxFileSize` | `number` | Maximum file size in MB. Defaults to `15`. |
147
- | `acceptFileType` | `string` | Comma-separated accepted extensions, e.g. `".jpg,.png,.mp4"` |
148
- | `onChangeUpload` | `(event: any) => void` | Called when a file is selected via the file input |
149
- | `onSendUpload` | `(conversation: Conversation) => void` | Called with the current conversation when the send button is clicked with a file selected |
182
+ | Name | Type | Description |
183
+ | ----------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
184
+ | `allowFileUpload` | `boolean` | Shows the paperclip button to trigger file selection |
185
+ | `hasFiles` | `boolean` | Tells the component files are selected — shows the send button and triggers `onSendMessage` on send |
186
+ | `multiple` | `boolean` | Allows picking multiple files at once |
187
+ | `acceptFileType` | `string` | Comma-separated accepted extensions, e.g. `".jpg,.png,.mp4,.pdf,.docx"`. Defaults to images only if omitted. |
188
+ | `onChangeUpload` | `(event: any) => void` | Called when files are selected via the file input. Consumer extracts files from `event.target.files` and manages their own `File[]` state |
189
+
190
+ ##### File rendering in message bubbles
191
+
192
+ | File type | Behaviour |
193
+ | ----------------- | ---------------------------------------------------------------------------------------------------- |
194
+ | `image/*` | Renders as an inline image. Click to open a full-size preview modal. Hover to download. |
195
+ | `video/*` | Renders as an inline video player. Hover to download. |
196
+ | `application/pdf` | Renders as a document icon + filename. Click to open a PDF preview modal. Download link shown below. |
197
+ | Other | Renders as a document icon + filename with a "Cannot preview" label. Download link shown below. |
150
198
 
151
199
  ##### ChatBaseAction
152
200
 
@@ -166,12 +214,45 @@ With loading reply indicator:
166
214
 
167
215
  ##### Message
168
216
 
169
- | Name | Type | Description |
170
- | -------------- | ------------------- | ---------------------------------------------------------------------------------------------- |
171
- | `sender` | `User` | The user who sent the message |
172
- | `messageBody` | `string \| FileObj` | Text content (supports markdown for received messages) or a `FileObj` for image/video messages |
173
- | `reactElement` | `ReactElement` | Optional — replaces `messageBody` rendering with a custom element |
174
- | `createdAt` | `Date` | Timestamp shown below the message bubble |
217
+ | Name | Type | Description |
218
+ | -------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------- |
219
+ | `sender` | `User` | The user who sent the message |
220
+ | `messageBody` | `string \| FileObj` | Text content (supports markdown for received messages) or a `FileObj` for image, video, PDF, or document messages |
221
+ | `reactElement` | `ReactElement` | Optional — replaces `messageBody` rendering with a custom element |
222
+ | `createdAt` | `Date` | Timestamp shown below the message bubble |
223
+ | `toolReport` | `ToolReport` | Optional — renders a compact tool log panel above the message body (see ToolReport below) |
224
+ | `isToolCall` | `boolean` | Optional — renders the message as a centred chip instead of a chat bubble (see Tool Calls) |
225
+
226
+ ##### ToolReport
227
+
228
+ Attach to an assistant `Message` to show which model and tools were used to produce the reply.
229
+
230
+ | Name | Type | Description |
231
+ | ------- | ------------ | ------------------------------------ |
232
+ | `model` | `string` | Optional model name shown at the top |
233
+ | `tools` | `ToolCall[]` | List of tool calls and their status |
234
+
235
+ ##### ToolCall
236
+
237
+ | Name | Type | Description |
238
+ | ---------- | -------------------------------- | -------------------------------------------------------------------------------- |
239
+ | `content` | `string` | Tool name displayed in the summary row |
240
+ | `request` | `string \| any` | Request payload — shown in the expandable details panel |
241
+ | `response` | `any` | Response payload — shown in the expandable details panel |
242
+ | `status` | `"pending" \| "done" \| "error"` | Dot colour: yellow pulsing (pending), green (done), red (error). Default pending |
243
+
244
+ ##### Tool Calls
245
+
246
+ When an AI pipeline stores tool invocations as separate messages (e.g. `author: "tool"` in a database), set `isToolCall: true` on those messages. They render as small centred chips between conversation bubbles — visually distinct from user/assistant messages.
247
+
248
+ ```jsx
249
+ const messages = chatList.map((chat) => ({
250
+ sender: chat.author === "assistant" ? botUser : userObj,
251
+ messageBody: chat.content,
252
+ createdAt: new Date(chat.createdAt),
253
+ isToolCall: chat.author === "tool",
254
+ }));
255
+ ```
175
256
 
176
257
  ##### User
177
258
 
@@ -183,8 +264,8 @@ With loading reply indicator:
183
264
 
184
265
  ##### FileObj
185
266
 
186
- | Name | Type | Description |
187
- | ---------- | -------- | ---------------------------------------------- |
188
- | `fileName` | `string` | File URL or path |
189
- | `token` | `string` | Unique file token |
190
- | `type` | `string` | MIME type, e.g. `"image/png"` or `"video/mp4"` |
267
+ | Name | Type | Description |
268
+ | ---------- | -------- | ----------------------------------------------------------------- |
269
+ | `fileName` | `string` | File URL or path |
270
+ | `token` | `string` | Unique file token — also used as the display name in the bubble |
271
+ | `type` | `string` | MIME type, e.g. `"image/png"`, `"video/mp4"`, `"application/pdf"` |