@baishuyun/chat-sdk 0.1.9 → 1.0.1

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 (431) hide show
  1. package/.turbo/turbo-build.log +8 -107
  2. package/CHANGELOG.md +21 -0
  3. package/dist/chat-sdk.js +14087 -13890
  4. package/dist/chat-sdk.js.map +1 -1
  5. package/dist/chat-sdk.umd.cjs +150 -150
  6. package/dist/chat-sdk.umd.cjs.map +1 -1
  7. package/dist/index.css +1 -1
  8. package/dist/src/chat.d.ts +5 -0
  9. package/dist/src/chat.d.ts.map +1 -0
  10. package/dist/src/components/biz-comp/FakeBotMsg.d.ts +8 -0
  11. package/dist/src/components/biz-comp/FakeBotMsg.d.ts.map +1 -0
  12. package/dist/src/components/biz-comp/FieldChecker.d.ts +19 -0
  13. package/dist/src/components/biz-comp/FieldChecker.d.ts.map +1 -0
  14. package/dist/src/components/biz-comp/FieldCheckerListMsg.d.ts +19 -0
  15. package/dist/src/components/biz-comp/FieldCheckerListMsg.d.ts.map +1 -0
  16. package/dist/src/components/biz-comp/FieldValueChecker.d.ts +16 -0
  17. package/dist/src/components/biz-comp/FieldValueChecker.d.ts.map +1 -0
  18. package/dist/src/components/biz-comp/SubformFieldsValueChecker.d.ts +22 -0
  19. package/dist/src/components/biz-comp/SubformFieldsValueChecker.d.ts.map +1 -0
  20. package/dist/src/components/biz-comp/chat-client.d.ts +13 -0
  21. package/dist/src/components/biz-comp/chat-client.d.ts.map +1 -0
  22. package/dist/src/components/biz-comp/chat-frame.d.ts +6 -0
  23. package/dist/src/components/biz-comp/chat-frame.d.ts.map +1 -0
  24. package/dist/src/components/biz-comp/conversation.d.ts +10 -0
  25. package/dist/src/components/biz-comp/conversation.d.ts.map +1 -0
  26. package/dist/src/components/biz-comp/dash-widget-icon.d.ts +7 -0
  27. package/dist/src/components/biz-comp/dash-widget-icon.d.ts.map +1 -0
  28. package/dist/src/components/biz-comp/dock-btn.d.ts +2 -0
  29. package/dist/src/components/biz-comp/dock-btn.d.ts.map +1 -0
  30. package/dist/src/components/biz-comp/error-boundary.d.ts +15 -0
  31. package/dist/src/components/biz-comp/error-boundary.d.ts.map +1 -0
  32. package/dist/src/components/biz-comp/error-msg.d.ts +4 -0
  33. package/dist/src/components/biz-comp/error-msg.d.ts.map +1 -0
  34. package/dist/src/components/biz-comp/field-icon.d.ts +5 -0
  35. package/dist/src/components/biz-comp/field-icon.d.ts.map +1 -0
  36. package/dist/src/components/biz-comp/highlight-msg.d.ts +4 -0
  37. package/dist/src/components/biz-comp/highlight-msg.d.ts.map +1 -0
  38. package/dist/src/components/biz-comp/markdown-part.d.ts +7 -0
  39. package/dist/src/components/biz-comp/markdown-part.d.ts.map +1 -0
  40. package/dist/src/components/biz-comp/markdown.d.ts +5 -0
  41. package/dist/src/components/biz-comp/markdown.d.ts.map +1 -0
  42. package/dist/src/components/biz-comp/message-content.d.ts +6 -0
  43. package/dist/src/components/biz-comp/message-content.d.ts.map +1 -0
  44. package/dist/src/components/biz-comp/messages.d.ts +3 -0
  45. package/dist/src/components/biz-comp/messages.d.ts.map +1 -0
  46. package/dist/src/components/biz-comp/multi-modal-input/attachment-btn.d.ts +9 -0
  47. package/dist/src/components/biz-comp/multi-modal-input/attachment-btn.d.ts.map +1 -0
  48. package/dist/src/components/biz-comp/multi-modal-input/clear-btn.d.ts +8 -0
  49. package/dist/src/components/biz-comp/multi-modal-input/clear-btn.d.ts.map +1 -0
  50. package/dist/src/components/biz-comp/multi-modal-input/index.d.ts +22 -0
  51. package/dist/src/components/biz-comp/multi-modal-input/index.d.ts.map +1 -0
  52. package/dist/src/components/biz-comp/multi-modal-input/preview-attachment.d.ts +12 -0
  53. package/dist/src/components/biz-comp/multi-modal-input/preview-attachment.d.ts.map +1 -0
  54. package/dist/src/components/biz-comp/multi-modal-input/prompt-input.d.ts +36 -0
  55. package/dist/src/components/biz-comp/multi-modal-input/prompt-input.d.ts.map +1 -0
  56. package/dist/src/components/biz-comp/multi-modal-input/voice-btn.d.ts +9 -0
  57. package/dist/src/components/biz-comp/multi-modal-input/voice-btn.d.ts.map +1 -0
  58. package/dist/src/components/biz-comp/opening-lines.d.ts +3 -0
  59. package/dist/src/components/biz-comp/opening-lines.d.ts.map +1 -0
  60. package/dist/src/components/biz-comp/preview-message-wrapper.d.ts +12 -0
  61. package/dist/src/components/biz-comp/preview-message-wrapper.d.ts.map +1 -0
  62. package/dist/src/components/biz-comp/preview-message.d.ts +13 -0
  63. package/dist/src/components/biz-comp/preview-message.d.ts.map +1 -0
  64. package/dist/src/components/biz-comp/response.d.ts +6 -0
  65. package/dist/src/components/biz-comp/response.d.ts.map +1 -0
  66. package/dist/src/components/biz-comp/suggestions.d.ts +8 -0
  67. package/dist/src/components/biz-comp/suggestions.d.ts.map +1 -0
  68. package/dist/src/components/ui/badge.d.ts +10 -0
  69. package/dist/src/components/ui/badge.d.ts.map +1 -0
  70. package/dist/src/components/ui/button.d.ts +12 -0
  71. package/dist/src/components/ui/button.d.ts.map +1 -0
  72. package/dist/src/components/ui/card.d.ts +9 -0
  73. package/dist/src/components/ui/card.d.ts.map +1 -0
  74. package/dist/src/components/ui/checkbox.d.ts +5 -0
  75. package/dist/src/components/ui/checkbox.d.ts.map +1 -0
  76. package/dist/src/components/ui/collapsible.d.ts +6 -0
  77. package/dist/src/components/ui/collapsible.d.ts.map +1 -0
  78. package/dist/src/components/ui/dialog.d.ts +24 -0
  79. package/dist/src/components/ui/dialog.d.ts.map +1 -0
  80. package/dist/src/components/ui/dropdown-menu.d.ts +28 -0
  81. package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -0
  82. package/dist/src/components/ui/icons.d.ts +176 -0
  83. package/dist/src/components/ui/icons.d.ts.map +1 -0
  84. package/dist/src/components/ui/input-group.d.ts +17 -0
  85. package/dist/src/components/ui/input-group.d.ts.map +1 -0
  86. package/dist/src/components/ui/input.d.ts +4 -0
  87. package/dist/src/components/ui/input.d.ts.map +1 -0
  88. package/dist/src/components/ui/label.d.ts +6 -0
  89. package/dist/src/components/ui/label.d.ts.map +1 -0
  90. package/dist/src/components/ui/one-time-click-btn.d.ts +4 -0
  91. package/dist/src/components/ui/one-time-click-btn.d.ts.map +1 -0
  92. package/dist/src/components/ui/select.d.ts +14 -0
  93. package/dist/src/components/ui/select.d.ts.map +1 -0
  94. package/dist/src/components/ui/spinner.d.ts +3 -0
  95. package/dist/src/components/ui/spinner.d.ts.map +1 -0
  96. package/dist/src/components/ui/tabs.d.ts +8 -0
  97. package/dist/src/components/ui/tabs.d.ts.map +1 -0
  98. package/dist/src/components/ui/textarea.d.ts +4 -0
  99. package/dist/src/components/ui/textarea.d.ts.map +1 -0
  100. package/dist/src/components/ui/tooltip.d.ts +13 -0
  101. package/dist/src/components/ui/tooltip.d.ts.map +1 -0
  102. package/dist/src/components/web-comp/fields-previewer-web-component.d.ts +60 -0
  103. package/dist/src/components/web-comp/fields-previewer-web-component.d.ts.map +1 -0
  104. package/dist/src/const/index.d.ts +5 -0
  105. package/dist/src/const/index.d.ts.map +1 -0
  106. package/dist/src/const/ui.d.ts +7 -0
  107. package/dist/src/const/ui.d.ts.map +1 -0
  108. package/dist/src/hooks/use-chat-preference.d.ts +3 -0
  109. package/dist/src/hooks/use-chat-preference.d.ts.map +1 -0
  110. package/dist/src/hooks/use-draggable.d.ts +24 -0
  111. package/dist/src/hooks/use-draggable.d.ts.map +1 -0
  112. package/dist/src/hooks/use-evt-bus.d.ts +2 -0
  113. package/dist/src/hooks/use-evt-bus.d.ts.map +1 -0
  114. package/dist/src/hooks/use-evt.d.ts +3 -0
  115. package/dist/src/hooks/use-evt.d.ts.map +1 -0
  116. package/dist/src/hooks/use-frame-mode.d.ts +20 -0
  117. package/dist/src/hooks/use-frame-mode.d.ts.map +1 -0
  118. package/dist/src/hooks/use-merged-chat.d.ts +7 -0
  119. package/dist/src/hooks/use-merged-chat.d.ts.map +1 -0
  120. package/dist/src/hooks/use-msg-status-broadcast.d.ts +3 -0
  121. package/dist/src/hooks/use-msg-status-broadcast.d.ts.map +1 -0
  122. package/dist/src/hooks/use-plugin-component.d.ts +5 -0
  123. package/dist/src/hooks/use-plugin-component.d.ts.map +1 -0
  124. package/dist/src/hooks/use-plugin-ctx.d.ts +3 -0
  125. package/dist/src/hooks/use-plugin-ctx.d.ts.map +1 -0
  126. package/dist/src/hooks/use-plugin-custom-components.d.ts +5 -0
  127. package/dist/src/hooks/use-plugin-custom-components.d.ts.map +1 -0
  128. package/dist/src/hooks/use-plugin-life-cycle-chain-runner.d.ts +5 -0
  129. package/dist/src/hooks/use-plugin-life-cycle-chain-runner.d.ts.map +1 -0
  130. package/dist/src/hooks/use-plugin-list.d.ts +2 -0
  131. package/dist/src/hooks/use-plugin-list.d.ts.map +1 -0
  132. package/dist/src/hooks/use-plugin.d.ts +2 -0
  133. package/dist/src/hooks/use-plugin.d.ts.map +1 -0
  134. package/dist/src/hooks/use-scroll-to-bottom.d.ts +9 -0
  135. package/dist/src/hooks/use-scroll-to-bottom.d.ts.map +1 -0
  136. package/dist/src/hooks/use-shadow.d.ts +25 -0
  137. package/dist/src/hooks/use-shadow.d.ts.map +1 -0
  138. package/dist/src/hooks/use-streaming-anchor.d.ts +11 -0
  139. package/dist/src/hooks/use-streaming-anchor.d.ts.map +1 -0
  140. package/dist/src/hooks/use-toast.d.ts +3 -0
  141. package/dist/src/hooks/use-toast.d.ts.map +1 -0
  142. package/dist/src/hooks/use-voice-input.d.ts +31 -0
  143. package/dist/src/hooks/use-voice-input.d.ts.map +1 -0
  144. package/dist/src/index.d.ts +6 -0
  145. package/dist/src/index.d.ts.map +1 -0
  146. package/dist/src/lib/clone.d.ts +32 -0
  147. package/dist/src/lib/clone.d.ts.map +1 -0
  148. package/dist/src/lib/event-emitter.d.ts +39 -0
  149. package/dist/src/lib/event-emitter.d.ts.map +1 -0
  150. package/dist/src/lib/parse-design-doc.d.ts +16 -0
  151. package/dist/src/lib/parse-design-doc.d.ts.map +1 -0
  152. package/dist/src/lib/readonly.d.ts +14 -0
  153. package/dist/src/lib/readonly.d.ts.map +1 -0
  154. package/dist/src/lib/utils.d.ts +72 -0
  155. package/dist/src/lib/utils.d.ts.map +1 -0
  156. package/dist/src/plugins/form-builder-base-plugin/const.d.ts +3 -0
  157. package/dist/src/plugins/form-builder-base-plugin/const.d.ts.map +1 -0
  158. package/dist/src/plugins/form-builder-base-plugin/index.d.ts +7 -0
  159. package/dist/src/plugins/form-builder-base-plugin/index.d.ts.map +1 -0
  160. package/dist/src/plugins/form-builder-base-plugin/types.d.ts +12 -0
  161. package/dist/src/plugins/form-builder-base-plugin/types.d.ts.map +1 -0
  162. package/dist/src/plugins/form-builder-plugin/components/create-form-confirm.d.ts +7 -0
  163. package/dist/src/plugins/form-builder-plugin/components/create-form-confirm.d.ts.map +1 -0
  164. package/dist/src/plugins/form-builder-plugin/components/design-doc-part.d.ts +4 -0
  165. package/dist/src/plugins/form-builder-plugin/components/design-doc-part.d.ts.map +1 -0
  166. package/dist/src/plugins/form-builder-plugin/components/design-info.d.ts +6 -0
  167. package/dist/src/plugins/form-builder-plugin/components/design-info.d.ts.map +1 -0
  168. package/dist/src/plugins/form-builder-plugin/components/entry-btn.d.ts +3 -0
  169. package/dist/src/plugins/form-builder-plugin/components/entry-btn.d.ts.map +1 -0
  170. package/dist/src/plugins/form-builder-plugin/components/fields-part.d.ts +4 -0
  171. package/dist/src/plugins/form-builder-plugin/components/fields-part.d.ts.map +1 -0
  172. package/dist/src/plugins/form-builder-plugin/components/follow-up.d.ts +3 -0
  173. package/dist/src/plugins/form-builder-plugin/components/follow-up.d.ts.map +1 -0
  174. package/dist/src/plugins/form-builder-plugin/components/msg-part.d.ts +3 -0
  175. package/dist/src/plugins/form-builder-plugin/components/msg-part.d.ts.map +1 -0
  176. package/dist/src/plugins/form-builder-plugin/components/opening-lines.d.ts +3 -0
  177. package/dist/src/plugins/form-builder-plugin/components/opening-lines.d.ts.map +1 -0
  178. package/dist/src/plugins/form-builder-plugin/components/suggestion-part.d.ts +5 -0
  179. package/dist/src/plugins/form-builder-plugin/components/suggestion-part.d.ts.map +1 -0
  180. package/dist/src/plugins/form-builder-plugin/const/index.d.ts +12 -0
  181. package/dist/src/plugins/form-builder-plugin/const/index.d.ts.map +1 -0
  182. package/dist/src/plugins/form-builder-plugin/hooks/index.d.ts +4 -0
  183. package/dist/src/plugins/form-builder-plugin/hooks/index.d.ts.map +1 -0
  184. package/dist/src/plugins/form-builder-plugin/hooks/use-fields-confirmed.d.ts +2 -0
  185. package/dist/src/plugins/form-builder-plugin/hooks/use-fields-confirmed.d.ts.map +1 -0
  186. package/dist/src/plugins/form-builder-plugin/index.d.ts +30 -0
  187. package/dist/src/plugins/form-builder-plugin/index.d.ts.map +1 -0
  188. package/dist/src/plugins/form-builder-plugin/types.d.ts +28 -0
  189. package/dist/src/plugins/form-builder-plugin/types.d.ts.map +1 -0
  190. package/dist/src/plugins/form-builder-plugin/utils/get-render-strategy.d.ts +3 -0
  191. package/dist/src/plugins/form-builder-plugin/utils/get-render-strategy.d.ts.map +1 -0
  192. package/dist/src/plugins/form-builder-plugin/utils/index.d.ts +57 -0
  193. package/dist/src/plugins/form-builder-plugin/utils/index.d.ts.map +1 -0
  194. package/dist/src/plugins/form-filling-plugin/batch-filling-data-manager.d.ts +26 -0
  195. package/dist/src/plugins/form-filling-plugin/batch-filling-data-manager.d.ts.map +1 -0
  196. package/dist/src/plugins/form-filling-plugin/components/FormFillingOpeningLines.d.ts +3 -0
  197. package/dist/src/plugins/form-filling-plugin/components/FormFillingOpeningLines.d.ts.map +1 -0
  198. package/dist/src/plugins/form-filling-plugin/components/avatar.d.ts +5 -0
  199. package/dist/src/plugins/form-filling-plugin/components/avatar.d.ts.map +1 -0
  200. package/dist/src/plugins/form-filling-plugin/components/batch-fill-part.d.ts +4 -0
  201. package/dist/src/plugins/form-filling-plugin/components/batch-fill-part.d.ts.map +1 -0
  202. package/dist/src/plugins/form-filling-plugin/components/batch-generator-action.d.ts +14 -0
  203. package/dist/src/plugins/form-filling-plugin/components/batch-generator-action.d.ts.map +1 -0
  204. package/dist/src/plugins/form-filling-plugin/components/entry-btn.d.ts +3 -0
  205. package/dist/src/plugins/form-filling-plugin/components/entry-btn.d.ts.map +1 -0
  206. package/dist/src/plugins/form-filling-plugin/components/first-batch-generating-animation.d.ts +2 -0
  207. package/dist/src/plugins/form-filling-plugin/components/first-batch-generating-animation.d.ts.map +1 -0
  208. package/dist/src/plugins/form-filling-plugin/components/generated-data-counter.d.ts +5 -0
  209. package/dist/src/plugins/form-filling-plugin/components/generated-data-counter.d.ts.map +1 -0
  210. package/dist/src/plugins/form-filling-plugin/components/mode-select.d.ts +2 -0
  211. package/dist/src/plugins/form-filling-plugin/components/mode-select.d.ts.map +1 -0
  212. package/dist/src/plugins/form-filling-plugin/components/msg-part.d.ts +3 -0
  213. package/dist/src/plugins/form-filling-plugin/components/msg-part.d.ts.map +1 -0
  214. package/dist/src/plugins/form-filling-plugin/components/non-first-batch-generating-animation.d.ts +2 -0
  215. package/dist/src/plugins/form-filling-plugin/components/non-first-batch-generating-animation.d.ts.map +1 -0
  216. package/dist/src/plugins/form-filling-plugin/components/single-fill-part.d.ts +4 -0
  217. package/dist/src/plugins/form-filling-plugin/components/single-fill-part.d.ts.map +1 -0
  218. package/dist/src/plugins/form-filling-plugin/const.d.ts +615 -0
  219. package/dist/src/plugins/form-filling-plugin/const.d.ts.map +1 -0
  220. package/dist/src/plugins/form-filling-plugin/hooks/use-conversation-id-in-ctx.d.ts +3 -0
  221. package/dist/src/plugins/form-filling-plugin/hooks/use-conversation-id-in-ctx.d.ts.map +1 -0
  222. package/dist/src/plugins/form-filling-plugin/hooks/use-fields-data.d.ts +4 -0
  223. package/dist/src/plugins/form-filling-plugin/hooks/use-fields-data.d.ts.map +1 -0
  224. package/dist/src/plugins/form-filling-plugin/index.d.ts +22 -0
  225. package/dist/src/plugins/form-filling-plugin/index.d.ts.map +1 -0
  226. package/dist/src/plugins/form-filling-plugin/types.d.ts +22 -0
  227. package/dist/src/plugins/form-filling-plugin/types.d.ts.map +1 -0
  228. package/dist/src/plugins/form-filling-plugin/utils.d.ts +6 -0
  229. package/dist/src/plugins/form-filling-plugin/utils.d.ts.map +1 -0
  230. package/dist/src/plugins/report-query-plugin/components/avatar.d.ts +5 -0
  231. package/dist/src/plugins/report-query-plugin/components/avatar.d.ts.map +1 -0
  232. package/dist/src/plugins/report-query-plugin/components/query-entry-btn.d.ts +3 -0
  233. package/dist/src/plugins/report-query-plugin/components/query-entry-btn.d.ts.map +1 -0
  234. package/dist/src/plugins/report-query-plugin/components/query-msg-part.d.ts +3 -0
  235. package/dist/src/plugins/report-query-plugin/components/query-msg-part.d.ts.map +1 -0
  236. package/dist/src/plugins/report-query-plugin/components/query-opening-lines.d.ts +2 -0
  237. package/dist/src/plugins/report-query-plugin/components/query-opening-lines.d.ts.map +1 -0
  238. package/dist/src/plugins/report-query-plugin/components/result-cards/CreatedSourceMsg.d.ts +7 -0
  239. package/dist/src/plugins/report-query-plugin/components/result-cards/CreatedSourceMsg.d.ts.map +1 -0
  240. package/dist/src/plugins/report-query-plugin/components/result-cards/DataTableCard.d.ts +5 -0
  241. package/dist/src/plugins/report-query-plugin/components/result-cards/DataTableCard.d.ts.map +1 -0
  242. package/dist/src/plugins/report-query-plugin/components/result-cards/DataTableFields.d.ts +18 -0
  243. package/dist/src/plugins/report-query-plugin/components/result-cards/DataTableFields.d.ts.map +1 -0
  244. package/dist/src/plugins/report-query-plugin/components/result-cards/FilterCondition.d.ts +4 -0
  245. package/dist/src/plugins/report-query-plugin/components/result-cards/FilterCondition.d.ts.map +1 -0
  246. package/dist/src/plugins/report-query-plugin/components/result-cards/FormulaField.d.ts +8 -0
  247. package/dist/src/plugins/report-query-plugin/components/result-cards/FormulaField.d.ts.map +1 -0
  248. package/dist/src/plugins/report-query-plugin/const.d.ts +5 -0
  249. package/dist/src/plugins/report-query-plugin/const.d.ts.map +1 -0
  250. package/dist/src/plugins/report-query-plugin/index.d.ts +19 -0
  251. package/dist/src/plugins/report-query-plugin/index.d.ts.map +1 -0
  252. package/dist/src/plugins/report-query-plugin/types.d.ts +18 -0
  253. package/dist/src/plugins/report-query-plugin/types.d.ts.map +1 -0
  254. package/dist/src/plugins/report-query-plugin/utils/build-dash-component.d.ts +17 -0
  255. package/dist/src/plugins/report-query-plugin/utils/build-dash-component.d.ts.map +1 -0
  256. package/dist/src/plugins/report-query-plugin/utils/create-default-dash-styles.d.ts +30 -0
  257. package/dist/src/plugins/report-query-plugin/utils/create-default-dash-styles.d.ts.map +1 -0
  258. package/dist/src/plugins/report-query-plugin/utils/create-default-widget-attr-list.d.ts +60 -0
  259. package/dist/src/plugins/report-query-plugin/utils/create-default-widget-attr-list.d.ts.map +1 -0
  260. package/dist/src/plugins/report-query-plugin/utils/field-enhance.d.ts +31 -0
  261. package/dist/src/plugins/report-query-plugin/utils/field-enhance.d.ts.map +1 -0
  262. package/dist/src/plugins/report-query-plugin/utils/get-field-group.d.ts +208 -0
  263. package/dist/src/plugins/report-query-plugin/utils/get-field-group.d.ts.map +1 -0
  264. package/dist/src/plugins/report-query-plugin/utils/get-field-icon.d.ts +4 -0
  265. package/dist/src/plugins/report-query-plugin/utils/get-field-icon.d.ts.map +1 -0
  266. package/dist/src/plugins/report-query-plugin/utils/get-group-rule.d.ts +4 -0
  267. package/dist/src/plugins/report-query-plugin/utils/get-group-rule.d.ts.map +1 -0
  268. package/dist/src/plugins/report-query-plugin/utils/index.d.ts +5 -0
  269. package/dist/src/plugins/report-query-plugin/utils/index.d.ts.map +1 -0
  270. package/dist/src/sdk.impl.d.ts +44 -0
  271. package/dist/src/sdk.impl.d.ts.map +1 -0
  272. package/dist/src/store/context.d.ts +12 -0
  273. package/dist/src/store/context.d.ts.map +1 -0
  274. package/dist/src/store/index.d.ts +14 -0
  275. package/dist/src/store/index.d.ts.map +1 -0
  276. package/dist/src/stories/FormulaField.stories.d.ts +24 -0
  277. package/dist/src/stories/FormulaField.stories.d.ts.map +1 -0
  278. package/package.json +5 -4
  279. package/src/components/biz-comp/FakeBotMsg.tsx +1 -1
  280. package/src/components/biz-comp/FieldChecker.tsx +2 -2
  281. package/src/components/biz-comp/FieldCheckerListMsg.tsx +3 -3
  282. package/src/components/biz-comp/FieldValueChecker.tsx +1 -1
  283. package/src/components/biz-comp/SubformFieldsValueChecker.tsx +1 -1
  284. package/src/components/biz-comp/chat-client.tsx +3 -3
  285. package/src/components/biz-comp/conversation.tsx +1 -1
  286. package/src/components/biz-comp/dash-widget-icon.tsx +1 -1
  287. package/src/components/biz-comp/field-icon.tsx +2 -2
  288. package/src/components/biz-comp/markdown-part.tsx +3 -3
  289. package/src/components/biz-comp/message-content.tsx +1 -1
  290. package/src/components/biz-comp/messages.tsx +5 -2
  291. package/src/components/biz-comp/multi-modal-input/clear-btn.tsx +2 -2
  292. package/src/components/biz-comp/multi-modal-input/index.tsx +4 -4
  293. package/src/components/biz-comp/multi-modal-input/prompt-input.tsx +2 -2
  294. package/src/components/biz-comp/multi-modal-input/voice-btn.tsx +2 -2
  295. package/src/components/biz-comp/preview-message-wrapper.tsx +14 -7
  296. package/src/components/biz-comp/preview-message.tsx +5 -5
  297. package/src/components/biz-comp/suggestions.tsx +2 -2
  298. package/src/components/web-comp/fields-previewer-web-component.ts +1 -1
  299. package/src/const/ui.ts +1 -1
  300. package/src/hooks/use-streaming-anchor.ts +42 -0
  301. package/src/plugins/form-builder-plugin/components/create-form-confirm.tsx +4 -4
  302. package/src/plugins/form-builder-plugin/components/design-info.tsx +3 -3
  303. package/src/plugins/form-builder-plugin/components/entry-btn.tsx +3 -3
  304. package/src/plugins/form-builder-plugin/components/fields-part.tsx +2 -2
  305. package/src/plugins/form-builder-plugin/components/follow-up.tsx +2 -2
  306. package/src/plugins/form-filling-plugin/components/FormFillingOpeningLines.tsx +1 -1
  307. package/src/plugins/form-filling-plugin/components/avatar.tsx +2 -2
  308. package/src/plugins/form-filling-plugin/components/batch-generator-action.tsx +1 -1
  309. package/src/plugins/form-filling-plugin/components/entry-btn.tsx +3 -3
  310. package/src/plugins/form-filling-plugin/components/first-batch-generating-animation.tsx +2 -2
  311. package/src/plugins/form-filling-plugin/components/generated-data-counter.tsx +1 -1
  312. package/src/plugins/form-filling-plugin/components/mode-select.tsx +1 -1
  313. package/src/plugins/form-filling-plugin/components/non-first-batch-generating-animation.tsx +3 -3
  314. package/src/plugins/form-filling-plugin/components/single-fill-part.tsx +1 -1
  315. package/src/plugins/report-query-plugin/components/avatar.tsx +2 -2
  316. package/src/plugins/report-query-plugin/components/query-entry-btn.tsx +2 -2
  317. package/src/plugins/report-query-plugin/components/query-opening-lines.tsx +1 -1
  318. package/src/plugins/report-query-plugin/components/result-cards/CreatedSourceMsg.tsx +1 -1
  319. package/src/plugins/report-query-plugin/components/result-cards/DataTableCard.tsx +3 -3
  320. package/src/plugins/report-query-plugin/components/result-cards/DataTableFields.tsx +3 -3
  321. package/src/plugins/report-query-plugin/components/result-cards/FormulaField.tsx +2 -2
  322. package/src/plugins/report-query-plugin/const.ts +1 -1
  323. package/src/style.css +2 -0
  324. package/tsconfig.json +5 -5
  325. package/src/components/bs-ui/abs-fullscreen-gradient-bg.tsx +0 -35
  326. package/src/components/bs-ui/attachment-part-group.tsx +0 -35
  327. package/src/components/bs-ui/attachment-part.tsx +0 -179
  328. package/src/components/bs-ui/attachments-previewer.tsx +0 -324
  329. package/src/components/bs-ui/base-button.tsx +0 -49
  330. package/src/components/bs-ui/border-animation.tsx +0 -107
  331. package/src/components/bs-ui/border-color-animation.tsx +0 -66
  332. package/src/components/bs-ui/bot-avatar-name.tsx +0 -25
  333. package/src/components/bs-ui/bot-icon.tsx +0 -23
  334. package/src/components/bs-ui/bs-icons.tsx +0 -1115
  335. package/src/components/bs-ui/card-field.tsx +0 -23
  336. package/src/components/bs-ui/card.tsx +0 -36
  337. package/src/components/bs-ui/chat-area-header.tsx +0 -65
  338. package/src/components/bs-ui/circle-checker.tsx +0 -66
  339. package/src/components/bs-ui/collapsible-txt-msg.tsx +0 -63
  340. package/src/components/bs-ui/confirm-dialog.tsx +0 -139
  341. package/src/components/bs-ui/fields-design-info-table.tsx +0 -160
  342. package/src/components/bs-ui/fields-generating-indicator.tsx +0 -95
  343. package/src/components/bs-ui/fields-portal.tsx +0 -18
  344. package/src/components/bs-ui/fields-previewer.tsx +0 -210
  345. package/src/components/bs-ui/font-icon.tsx +0 -17
  346. package/src/components/bs-ui/form-info-editor.tsx +0 -259
  347. package/src/components/bs-ui/formula-tag.tsx +0 -32
  348. package/src/components/bs-ui/generate-animation.tsx +0 -56
  349. package/src/components/bs-ui/icon-btn.tsx +0 -43
  350. package/src/components/bs-ui/img-part.tsx +0 -27
  351. package/src/components/bs-ui/line-checker.tsx +0 -160
  352. package/src/components/bs-ui/linear-gradient-border-btn.tsx +0 -48
  353. package/src/components/bs-ui/linear-gradient-color-bg-animation.tsx +0 -103
  354. package/src/components/bs-ui/number-part.tsx +0 -46
  355. package/src/components/bs-ui/option-item.tsx +0 -28
  356. package/src/components/bs-ui/previewer-header.tsx +0 -233
  357. package/src/components/bs-ui/primary-confirm-btn.tsx +0 -58
  358. package/src/components/bs-ui/primary-entry-btn.tsx +0 -48
  359. package/src/components/bs-ui/scroll-to-bottom-btn.tsx +0 -28
  360. package/src/components/bs-ui/split-line.tsx +0 -9
  361. package/src/components/bs-ui/square-checker.tsx +0 -87
  362. package/src/components/bs-ui/tab-radio-group.tsx +0 -82
  363. package/src/components/bs-ui/tooltip.tsx +0 -53
  364. package/src/components/bs-ui/user-txt-msg-bubble.tsx +0 -19
  365. package/src/components/bs-ui/warning-msg.tsx +0 -27
  366. package/src/stories/AbsFullscreenGradientBg.stories.tsx +0 -36
  367. package/src/stories/AttachmentPart.stories.tsx +0 -122
  368. package/src/stories/AttachmentPartGroup.stories.tsx +0 -151
  369. package/src/stories/AttachmentsPreviewer.stories.tsx +0 -306
  370. package/src/stories/BaseButton.stories.tsx +0 -33
  371. package/src/stories/BorderAnimation.stories.tsx +0 -116
  372. package/src/stories/BorderColorAnimation.stories.tsx +0 -63
  373. package/src/stories/BotAvatarAndName.stories.ts +0 -24
  374. package/src/stories/BotIcon.stories.ts +0 -22
  375. package/src/stories/BsTooltip.stories.tsx +0 -32
  376. package/src/stories/Card.stories.tsx +0 -28
  377. package/src/stories/CardField.stories.tsx +0 -87
  378. package/src/stories/ChatAreaHeader.stories.ts +0 -26
  379. package/src/stories/CircleChecker.stories.tsx +0 -89
  380. package/src/stories/CollapsibleTextMsg.stories.ts +0 -44
  381. package/src/stories/ConfirmDialog.stories.tsx +0 -123
  382. package/src/stories/DashWidgetIcon.stories.tsx +0 -132
  383. package/src/stories/FormInfoEditor.stories.tsx +0 -173
  384. package/src/stories/FormulaTag.stories.tsx +0 -68
  385. package/src/stories/GenerateAnimation.stories.ts +0 -20
  386. package/src/stories/IconBtn.stories.tsx +0 -32
  387. package/src/stories/IconLib.tsx +0 -45
  388. package/src/stories/Icons.stories.ts +0 -22
  389. package/src/stories/ImgMsgPart.stories.tsx +0 -42
  390. package/src/stories/LineChecker.stories.tsx +0 -134
  391. package/src/stories/LinearGradientBorderBtn.stories.tsx +0 -86
  392. package/src/stories/LinearGradientColorBgAnimation.stories.tsx +0 -60
  393. package/src/stories/NumbersMsgPart.stories.tsx +0 -42
  394. package/src/stories/OptionItem.stories.tsx +0 -77
  395. package/src/stories/PreviewerHeader.stories.tsx +0 -91
  396. package/src/stories/PrimaryConfirmBtn.stories.tsx +0 -60
  397. package/src/stories/PrimaryEntryBtn.stories.tsx +0 -74
  398. package/src/stories/ScrollToBottom.stories.tsx +0 -24
  399. package/src/stories/SplitLine.stories.tsx +0 -40
  400. package/src/stories/SquareChecker.stories.tsx +0 -96
  401. package/src/stories/TabRadioGroup.stories.tsx +0 -84
  402. package/src/stories/UserTextMsgBubble.stories.ts +0 -24
  403. package/src/stories/WarningMessage.stories.tsx +0 -23
  404. package/src/stories/assets/accessibility.png +0 -0
  405. package/src/stories/assets/accessibility.svg +0 -1
  406. package/src/stories/assets/addon-library.png +0 -0
  407. package/src/stories/assets/assets.png +0 -0
  408. package/src/stories/assets/avif-test-image.avif +0 -0
  409. package/src/stories/assets/context.png +0 -0
  410. package/src/stories/assets/demo.css +0 -539
  411. package/src/stories/assets/demo_index.html +0 -7988
  412. package/src/stories/assets/discord.svg +0 -1
  413. package/src/stories/assets/docs.png +0 -0
  414. package/src/stories/assets/figma-plugin.png +0 -0
  415. package/src/stories/assets/github.svg +0 -1
  416. package/src/stories/assets/iconfont.css +0 -1377
  417. package/src/stories/assets/iconfont.eot +0 -0
  418. package/src/stories/assets/iconfont.json +0 -2382
  419. package/src/stories/assets/iconfont.svg +0 -697
  420. package/src/stories/assets/iconfont.ttf +0 -0
  421. package/src/stories/assets/iconfont.woff +0 -0
  422. package/src/stories/assets/iconfont.woff2 +0 -0
  423. package/src/stories/assets/share.png +0 -0
  424. package/src/stories/assets/styling.png +0 -0
  425. package/src/stories/assets/testing.png +0 -0
  426. package/src/stories/assets/theming.png +0 -0
  427. package/src/stories/assets/tutorials.svg +0 -1
  428. package/src/stories/assets/youtube.svg +0 -1
  429. package/src/stories/fields-design-info-table.stories.tsx +0 -203
  430. package/src/stories/fields-generating.stories.tsx +0 -41
  431. package/src/stories/fields-previewer.stories.tsx +0 -77
@@ -1,48 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Button, ButtonProps } from '../ui/button';
3
- import { BotIcon } from './bot-icon';
4
- import { cn } from '@/lib/utils';
5
- import { transCls } from '@/const/ui';
6
-
7
- export interface PrimaryEntryBtnProps extends ButtonProps {
8
- minimal?: boolean;
9
- entryVariant?: 'default' | 'ghost' | 'selected' | 'light';
10
- icon?: ReactNode;
11
- }
12
-
13
- export const PrimaryEntryBtn = ({
14
- children,
15
- className,
16
- minimal,
17
- entryVariant = 'default',
18
- icon,
19
- ...rest
20
- }: PrimaryEntryBtnProps) => {
21
- const variantStyles = {
22
- // background: linear-gradient(180deg, #267AFF 0%, #B2EEFF 100%);
23
- default:
24
- "relative overflow-hidden bg-[linear-gradient(180deg,#DBE9FF_0%,#E9FFFD_100%)] h-[30px] hover:text-white before:content-[''] before:absolute before:inset-0 before:z-0 before:bg-[linear-gradient(180deg,#267AFF_0%,#B2EEFF_100%)] before:opacity-0 hover:before:opacity-100 before:transition-opacity before:duration-200 before:ease-out font-[500] text-[#0265ff]",
25
- ghost: 'bg-transparent text-[#030303] font-[400] px-[10px] hover:bg-[#EFF0F6] h-[34px]',
26
- light: 'text-[#030303] font-[400] px-[10px] bg-[#F0F6FF] hover:bg-[#d8dde5] h-[34px]',
27
- selected: 'bg-[#EFF0F6] text-[#030303] font-[400] px-[10px]',
28
- };
29
-
30
- return (
31
- <Button
32
- {...rest}
33
- variant="entry"
34
- size="entry"
35
- className={cn(
36
- 'rounded-[4px] cursor-pointer',
37
- transCls,
38
- variantStyles[entryVariant],
39
- className
40
- )}
41
- >
42
- <span className="relative z-10 inline-flex items-center gap-1.5">
43
- {icon ?? <BotIcon />}
44
- {minimal ? null : children}
45
- </span>
46
- </Button>
47
- );
48
- };
@@ -1,28 +0,0 @@
1
- import { cn } from '@/lib/utils';
2
- import { transCls } from '@/const/ui';
3
- import { ScrollArrowDownIcon } from './bs-icons';
4
-
5
- export interface ScrollToBottomProps {
6
- onClick?: () => void;
7
- className?: string;
8
- }
9
-
10
- export const ScrollToBottomBtn = ({ onClick, className }: ScrollToBottomProps) => {
11
- return (
12
- <button
13
- type="button"
14
- onClick={onClick}
15
- className={cn(
16
- 'inline-flex items-center justify-center',
17
- 'w-[36px] h-[36px] rounded-full',
18
- 'bg-white text-[#666] shadow-[0px_0px_14px_0px_rgba(0,0,0,0.1)]',
19
- 'hover:shadow-[0px_14px_14px_0px_rgba(0,0,0,0.14)]',
20
- 'cursor-pointer hover:text-[#333] aspect-square',
21
- transCls,
22
- className
23
- )}
24
- >
25
- <ScrollArrowDownIcon />
26
- </button>
27
- );
28
- };
@@ -1,9 +0,0 @@
1
- import { cn } from '@/lib/utils';
2
-
3
- export interface SplitLineProps {
4
- className?: string;
5
- }
6
-
7
- export const SplitLine = ({ className }: SplitLineProps) => {
8
- return <div className={cn('h-[1px] w-full bg-[#E0E0E0]', className)} />;
9
- };
@@ -1,87 +0,0 @@
1
- import * as React from 'react';
2
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- import { cn } from '@/lib/utils';
4
- import { CheckerInBoxIcon } from './bs-icons';
5
-
6
- const SquareInBoxIcon = () => {
7
- // size 8, border 1px svg
8
- return (
9
- <svg
10
- width="8"
11
- height="8"
12
- viewBox="0 0 8 8"
13
- // fill="currentColor"
14
- xmlns="http://www.w3.org/2000/svg"
15
- >
16
- <rect x="0.5" y="0.5" width="7" height="7" rx="1" fill="#0265ff" />
17
- </svg>
18
- );
19
- };
20
-
21
- export type SquareCheckerProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> & {
22
- /** Optional label rendered beside the checkbox */
23
- children?: React.ReactNode;
24
- readonly?: boolean;
25
- intermediate?: boolean;
26
- };
27
-
28
- export const SquareChecker = React.forwardRef<
29
- React.ElementRef<typeof CheckboxPrimitive.Root>,
30
- SquareCheckerProps
31
- >(({ className, children, id, readonly, disabled, intermediate, ...props }, ref) => {
32
- const generatedId = React.useId();
33
- const checkboxId = id ?? generatedId;
34
-
35
- return (
36
- <label
37
- htmlFor={checkboxId}
38
- className={cn(
39
- 'inline-flex items-center gap-[6px] select-none text-[#121111] text-[14px]',
40
- disabled ? 'cursor-not-allowed' : 'cursor-pointer',
41
- {
42
- 'pointer-events-none': readonly,
43
- }
44
- )}
45
- >
46
- <CheckboxPrimitive.Root
47
- ref={ref}
48
- id={checkboxId}
49
- disabled={disabled}
50
- className={cn(
51
- // base layout
52
- 'inline-flex shrink-0 items-center justify-center',
53
- 'w-[16px] h-[16px] rounded-[2px] box-border border',
54
- 'transition-colors duration-200',
55
- 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#0265FF] focus-visible:ring-offset-1',
56
- // normal: gray border, white bg
57
- 'border-[#E0E0E0] bg-white',
58
- // hover: blue border (browsers suppress hover on disabled <button>)
59
- 'hover:border-[#0265FF]',
60
- // checked: blue fill
61
- 'data-[state=checked]:bg-[#0265FF] data-[state=checked]:border-[#0265FF]',
62
- // disabled unchecked: gray bg + gray border
63
- 'disabled:cursor-not-allowed disabled:bg-[#F0F0F0] disabled:border-[#C2C2C2]',
64
- // disabled checked: use muted gray fill
65
- 'disabled:data-[state=checked]:bg-[#C2C2C2] disabled:data-[state=checked]:border-[#C2C2C2]',
66
- // indeterminate: blue fill
67
- intermediate && 'bg-white border-[#0265FF] text-[#0265FF]',
68
- className,
69
- {
70
- 'opacity-50': readonly,
71
- }
72
- )}
73
- {...props}
74
- >
75
- <CheckboxPrimitive.Indicator className="text-white" forceMount={intermediate || undefined}>
76
- {intermediate ? <SquareInBoxIcon /> : <CheckerInBoxIcon />}
77
- </CheckboxPrimitive.Indicator>
78
- </CheckboxPrimitive.Root>
79
-
80
- {children != null && (
81
- <span className={cn('text-sm leading-none', disabled && 'text-[#C2C2C2]')}>{children}</span>
82
- )}
83
- </label>
84
- );
85
- });
86
-
87
- SquareChecker.displayName = 'SquareChecker';
@@ -1,82 +0,0 @@
1
- import * as React from 'react';
2
- import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
-
4
- import { cn } from '@/lib/utils';
5
- import { BsTooltip } from './tooltip';
6
-
7
- export interface TabRadioOption {
8
- value: string;
9
- label: React.ReactNode;
10
- tooltips?: string;
11
- className?: string;
12
- }
13
-
14
- export interface TabRadioGroupProps extends Omit<
15
- React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>,
16
- 'children'
17
- > {
18
- options: TabRadioOption[];
19
- }
20
-
21
- const TabRadioGroup = React.forwardRef<
22
- React.ElementRef<typeof RadioGroupPrimitive.Root>,
23
- TabRadioGroupProps
24
- >(({ className, options, ...props }, ref) => {
25
- return (
26
- <RadioGroupPrimitive.Root
27
- ref={ref}
28
- className={cn(
29
- 'flex flex-col items-start justify-center p-[2px] rounded-[4px] bg-[#EFF0F6]',
30
- className
31
- )}
32
- {...props}
33
- >
34
- <div className="flex gap-[2px] items-center w-full">
35
- {options.map((option) => (
36
- <TabRadioItem
37
- key={option.value}
38
- value={option.value}
39
- tooltips={option.tooltips}
40
- className={option.className}
41
- >
42
- {option.label}
43
- </TabRadioItem>
44
- ))}
45
- </div>
46
- </RadioGroupPrimitive.Root>
47
- );
48
- });
49
- TabRadioGroup.displayName = 'TabRadioGroup';
50
-
51
- interface TabRadioItemProps extends React.ComponentPropsWithoutRef<
52
- typeof RadioGroupPrimitive.Item
53
- > {
54
- children: React.ReactNode;
55
- tooltips?: string;
56
- }
57
-
58
- const TabRadioItem = React.forwardRef<
59
- React.ElementRef<typeof RadioGroupPrimitive.Item>,
60
- TabRadioItemProps
61
- >(({ className, children, tooltips, ...props }, ref) => {
62
- return (
63
- <RadioGroupPrimitive.Item
64
- ref={ref}
65
- className={cn(
66
- 'flex-1 h-[30px] flex items-center justify-center px-[10px] py-[7px] rounded-[4px] text-[14px] text-[#121111] cursor-pointer',
67
- 'border border-solid border-[#EFF0F6] bg-transparent',
68
- 'transition-all ease-out duration-200',
69
- 'outline-none',
70
- 'hover:text-[#121111] hover:border-[#E0E0E0] hover:bg-white',
71
- 'data-[state=checked]:text-[#0265FF] data-[state=checked]:border-[#E0E0E0] data-[state=checked]:bg-white',
72
- className
73
- )}
74
- {...props}
75
- >
76
- {tooltips ? <BsTooltip content={tooltips}>{children}</BsTooltip> : children}
77
- </RadioGroupPrimitive.Item>
78
- );
79
- });
80
- TabRadioItem.displayName = 'TabRadioItem';
81
-
82
- export { TabRadioGroup, TabRadioItem };
@@ -1,53 +0,0 @@
1
- import React, { useEffect, useRef, useState } from 'react';
2
- import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
3
-
4
- export const BsTooltip = ({
5
- children,
6
- content,
7
- }: {
8
- children: React.ReactNode;
9
- content: React.ReactNode;
10
- }) => {
11
- const triggerRef = useRef<HTMLSpanElement | null>(null);
12
- const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);
13
-
14
- useEffect(() => {
15
- const triggerEl = triggerRef.current;
16
- if (!triggerEl) {
17
- return;
18
- }
19
-
20
- const rootNode = triggerEl.getRootNode();
21
- if (rootNode instanceof ShadowRoot) {
22
- const existing = rootNode.querySelector<HTMLElement>('[data-bs-tooltip-portal]');
23
- if (existing) {
24
- setPortalContainer(existing);
25
- return;
26
- }
27
-
28
- const container = document.createElement('div');
29
- container.setAttribute('data-bs-tooltip-portal', 'true');
30
- rootNode.appendChild(container);
31
- setPortalContainer(container);
32
- return;
33
- }
34
-
35
- setPortalContainer(null);
36
- }, []);
37
-
38
- return (
39
- <Tooltip>
40
- <TooltipTrigger asChild>
41
- <span ref={triggerRef} className="inline-flex">
42
- {children}
43
- </span>
44
- </TooltipTrigger>
45
- <TooltipContent
46
- portalContainer={portalContainer}
47
- className="rounded-[4px] bg-[#525867] px-[12px] !py-[7px] text-[12px] text-white leading-normal max-w-[288px] animate-in fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 duration-200"
48
- >
49
- {content}
50
- </TooltipContent>
51
- </Tooltip>
52
- );
53
- };
@@ -1,19 +0,0 @@
1
- export interface UserTextMsgBubbleProps {
2
- text?: string;
3
- children?: string;
4
- }
5
-
6
- export const UserTextMsgBubble = ({ text, children }: UserTextMsgBubbleProps) => {
7
- return (
8
- <div
9
- className="px-2.5 py-[7px] text-[#0265FF] text-[14px] w-fit"
10
- style={{
11
- borderRadius: `10px 0 10px 10px`,
12
- wordWrap: 'break-word',
13
- background: `linear-gradient(180deg, #DBE9FF 0%, #E9FFFD 100%)`,
14
- }}
15
- >
16
- {text || children}
17
- </div>
18
- );
19
- };
@@ -1,27 +0,0 @@
1
- import { cn } from '@/lib/utils';
2
- import { WarningImgUrl } from '@/const/ui';
3
-
4
- export interface WarningMessageProps {
5
- message?: string;
6
- className?: string;
7
- }
8
-
9
- export const WarningMessage = ({
10
- message = '程序错误,请刷新页面重试',
11
- className,
12
- }: WarningMessageProps) => {
13
- return (
14
- <div className={cn('flex flex-col items-center gap-[10px]', className)}>
15
- <div
16
- className="bg-no-repeat bg-center"
17
- style={{
18
- backgroundImage: WarningImgUrl,
19
- backgroundSize: '100% 100%',
20
- width: 120,
21
- height: 77,
22
- }}
23
- />
24
- <p className="text-[12px] text-[#999] leading-normal">{message}</p>
25
- </div>
26
- );
27
- };
@@ -1,36 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
-
3
- import { AbsFullscreenGradientBg } from '@/components/bs-ui/abs-fullscreen-gradient-bg';
4
-
5
- const meta = {
6
- title: 'Example/Chat/AbsFullscreenGradientBg',
7
- component: AbsFullscreenGradientBg,
8
- tags: ['autodocs'],
9
- parameters: {
10
- layout: 'fullscreen',
11
- },
12
- args: {
13
- zIndex: 1,
14
- },
15
- } satisfies Meta<typeof AbsFullscreenGradientBg>;
16
-
17
- export default meta;
18
- type Story = StoryObj<typeof meta>;
19
-
20
- export const Default: Story = {
21
- args: {
22
- zIndex: 1,
23
- },
24
- };
25
-
26
- export const WithContent: Story = {
27
- args: {
28
- zIndex: 1,
29
- children: (
30
- <div style={{ position: 'relative', zIndex: 1, padding: '40px', color: '#333' }}>
31
- <h1>Content over gradient background</h1>
32
- <p>This demonstrates how content can be placed over the gradient background.</p>
33
- </div>
34
- ),
35
- },
36
- };
@@ -1,122 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
-
3
- import { AttachmentPart, FilePart } from '@/components/bs-ui/attachment-part';
4
-
5
- const meta = {
6
- title: 'Example/Chat/AttachmentPart',
7
- component: AttachmentPart,
8
- tags: ['autodocs'],
9
- parameters: {
10
- layout: 'centered',
11
- },
12
- } satisfies Meta<typeof AttachmentPart>;
13
-
14
- export default meta;
15
-
16
- type Story = StoryObj<typeof meta>;
17
-
18
- const imagePart: FilePart = {
19
- type: 'file',
20
- url: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400',
21
- name: 'mountain.jpg',
22
- mediaType: 'image/jpeg',
23
- };
24
-
25
- const excelPart: FilePart = {
26
- type: 'file',
27
- url: 'http://example.com/test.xlsx',
28
- name: 'bot_files/uuid/test excel upload.xlsx',
29
- mediaType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
30
- };
31
-
32
- const csvPart: FilePart = {
33
- type: 'file',
34
- url: 'http://example.com/data.csv',
35
- name: 'data.csv',
36
- mediaType: 'text/csv',
37
- };
38
-
39
- const txtPart: FilePart = {
40
- type: 'file',
41
- url: 'http://example.com/readme.txt',
42
- name: 'readme.txt',
43
- mediaType: 'text/plain',
44
- };
45
-
46
- const tsPart: FilePart = {
47
- type: 'file',
48
- url: 'http://example.com/useFormChat.ts',
49
- name: 'bot_files/uuid/useFormChat_Version3.ts',
50
- mediaType: 'application/octet-stream',
51
- };
52
-
53
- const unknownPart: FilePart = {
54
- type: 'file',
55
- url: 'http://example.com/unknown.bin',
56
- name: 'unknown.bin',
57
- mediaType: 'application/x-unknown',
58
- };
59
-
60
- export const Image: Story = {
61
- args: {
62
- part: imagePart,
63
- },
64
- };
65
-
66
- export const Excel: Story = {
67
- args: {
68
- part: excelPart,
69
- },
70
- };
71
-
72
- export const CSV: Story = {
73
- args: {
74
- part: csvPart,
75
- },
76
- };
77
-
78
- export const TXT: Story = {
79
- args: {
80
- part: txtPart,
81
- },
82
- };
83
-
84
- export const TypeScript: Story = {
85
- args: {
86
- part: tsPart,
87
- },
88
- };
89
-
90
- export const Unknown: Story = {
91
- args: {
92
- part: unknownPart,
93
- },
94
- };
95
-
96
- export const LargeSize: Story = {
97
- args: {
98
- part: excelPart,
99
- size: 150,
100
- },
101
- };
102
-
103
- export const SmallSize: Story = {
104
- args: {
105
- part: csvPart,
106
- size: 64,
107
- iconOnly: true,
108
- },
109
- };
110
-
111
- export const AllTypes = {
112
- render: () => (
113
- <div className="flex gap-4 flex-wrap">
114
- <AttachmentPart part={imagePart} />
115
- <AttachmentPart part={excelPart} />
116
- <AttachmentPart part={csvPart} />
117
- <AttachmentPart part={txtPart} />
118
- <AttachmentPart part={tsPart} />
119
- <AttachmentPart part={unknownPart} />
120
- </div>
121
- ),
122
- };
@@ -1,151 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
-
3
- import { AttachmentPartGroup } from '@/components/bs-ui/attachment-part-group';
4
- import { FilePart } from '@/components/bs-ui/attachment-part';
5
-
6
- const meta = {
7
- title: 'Example/Chat/AttachmentPartGroup',
8
- component: AttachmentPartGroup,
9
- tags: ['autodocs'],
10
- parameters: {
11
- layout: 'centered',
12
- },
13
- } satisfies Meta<typeof AttachmentPartGroup>;
14
-
15
- export default meta;
16
-
17
- type Story = StoryObj<typeof meta>;
18
-
19
- const imageParts: FilePart[] = [
20
- {
21
- type: 'file',
22
- url: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400',
23
- name: 'mountain1.jpg',
24
- mediaType: 'image/jpeg',
25
- },
26
- {
27
- type: 'file',
28
- url: 'https://images.unsplash.com/photo-1519681393784-d120267933ba?w=400',
29
- name: 'mountain2.jpg',
30
- mediaType: 'image/jpeg',
31
- },
32
- {
33
- type: 'file',
34
- url: 'https://images.unsplash.com/photo-1454496522488-7a8e488e8606?w=400',
35
- name: 'mountain3.jpg',
36
- mediaType: 'image/jpeg',
37
- },
38
- ];
39
-
40
- const mixedParts: FilePart[] = [
41
- {
42
- type: 'file',
43
- url: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400',
44
- name: 'photo1.jpg',
45
- mediaType: 'image/jpeg',
46
- },
47
- {
48
- type: 'file',
49
- url: 'https://images.unsplash.com/photo-1519681393784-d120267933ba?w=400',
50
- name: 'photo2.jpg',
51
- mediaType: 'image/jpeg',
52
- },
53
- {
54
- type: 'file',
55
- url: 'https://images.unsplash.com/photo-1454496522488-7a8e488e8606?w=400',
56
- name: 'photo3.jpg',
57
- mediaType: 'image/jpeg',
58
- },
59
- {
60
- type: 'file',
61
- url: 'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=400',
62
- name: 'photo4.jpg',
63
- mediaType: 'image/jpeg',
64
- },
65
- {
66
- type: 'file',
67
- url: 'https://images.unsplash.com/photo-1486870591958-9b9d0d1dda99?w=400',
68
- name: 'photo5.jpg',
69
- mediaType: 'image/jpeg',
70
- },
71
- {
72
- type: 'file',
73
- url: 'http://example.com/test.xlsx',
74
- name: '生产小工单.excel',
75
- mediaType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
76
- },
77
- ];
78
-
79
- const fileParts: FilePart[] = [
80
- {
81
- type: 'file',
82
- url: 'http://example.com/report.xlsx',
83
- name: 'report.xlsx',
84
- mediaType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
85
- },
86
- {
87
- type: 'file',
88
- url: 'http://example.com/data.csv',
89
- name: 'data.csv',
90
- mediaType: 'text/csv',
91
- },
92
- {
93
- type: 'file',
94
- url: 'http://example.com/readme.txt',
95
- name: 'readme.txt',
96
- mediaType: 'text/plain',
97
- },
98
- {
99
- type: 'file',
100
- url: 'http://example.com/unknown.bin',
101
- name: 'unknown.bin',
102
- mediaType: 'application/x-unknown',
103
- },
104
- ];
105
-
106
- export const ImagesOnly: Story = {
107
- args: {
108
- parts: imageParts,
109
- },
110
- };
111
-
112
- export const MixedContent: Story = {
113
- args: {
114
- parts: mixedParts,
115
- },
116
- };
117
-
118
- export const FilesOnly: Story = {
119
- args: {
120
- parts: fileParts,
121
- },
122
- };
123
-
124
- export const IconOnly: Story = {
125
- args: {
126
- parts: fileParts,
127
- iconOnly: true,
128
- },
129
- };
130
-
131
- export const SmallSize: Story = {
132
- args: {
133
- parts: mixedParts,
134
- size: 80,
135
- },
136
- };
137
-
138
- export const LargeGap: Story = {
139
- args: {
140
- parts: mixedParts,
141
- gap: 20,
142
- },
143
- };
144
-
145
- export const ConstrainedWidth = {
146
- render: () => (
147
- <div style={{ width: 330 }}>
148
- <AttachmentPartGroup parts={mixedParts} />
149
- </div>
150
- ),
151
- };