@djangocfg/ui-tools 2.1.404 → 2.1.408

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 (336) hide show
  1. package/README.md +9 -11
  2. package/dist/file-icon/index.cjs +449 -61
  3. package/dist/file-icon/index.cjs.map +1 -1
  4. package/dist/file-icon/index.d.cts +56 -18
  5. package/dist/file-icon/index.d.ts +56 -18
  6. package/dist/file-icon/index.mjs +448 -62
  7. package/dist/file-icon/index.mjs.map +1 -1
  8. package/dist/tree/index.cjs +49 -22
  9. package/dist/tree/index.cjs.map +1 -1
  10. package/dist/tree/index.d.cts +9 -3
  11. package/dist/tree/index.d.ts +9 -3
  12. package/dist/tree/index.mjs +49 -22
  13. package/dist/tree/index.mjs.map +1 -1
  14. package/dist/{types-B_zhyAqR.d.cts → types-eEu8SeiQ.d.cts} +4 -0
  15. package/dist/{types-B_zhyAqR.d.ts → types-eEu8SeiQ.d.ts} +4 -0
  16. package/package.json +13 -16
  17. package/src/components/FloatingToolbar/index.tsx +37 -3
  18. package/src/lib/page-snapshot/__tests__/capture-integration.test.ts +85 -0
  19. package/src/lib/page-snapshot/__tests__/engine.test.ts +36 -0
  20. package/src/lib/page-snapshot/__tests__/redaction-integration.test.ts +99 -0
  21. package/src/lib/page-snapshot/__tests__/tokens.test.ts +17 -0
  22. package/src/lib/page-snapshot/capture/__tests__/budget.test.ts +49 -0
  23. package/src/lib/page-snapshot/capture/__tests__/chrome-filter.test.ts +47 -0
  24. package/src/lib/page-snapshot/capture/__tests__/fold.test.ts +66 -0
  25. package/src/lib/page-snapshot/capture/__tests__/scope.test.ts +74 -0
  26. package/src/lib/page-snapshot/capture/__tests__/walk.test.ts +129 -0
  27. package/src/lib/page-snapshot/capture/accessible-name.ts +73 -0
  28. package/src/lib/page-snapshot/capture/budget.ts +95 -0
  29. package/src/lib/page-snapshot/capture/chrome-filter.ts +81 -0
  30. package/src/lib/page-snapshot/capture/classify.ts +111 -0
  31. package/src/lib/page-snapshot/capture/dom-utils.ts +111 -0
  32. package/src/lib/page-snapshot/capture/fold.ts +96 -0
  33. package/src/lib/page-snapshot/capture/scope.ts +169 -0
  34. package/src/lib/page-snapshot/capture/walk.ts +250 -0
  35. package/src/lib/page-snapshot/cst/__tests__/serialize.test.ts +50 -0
  36. package/src/lib/page-snapshot/cst/directives.ts +47 -0
  37. package/src/lib/page-snapshot/cst/payload.ts +50 -0
  38. package/src/lib/page-snapshot/cst/serialize.ts +84 -0
  39. package/src/lib/page-snapshot/cst/types.ts +115 -0
  40. package/src/lib/page-snapshot/engine.ts +176 -0
  41. package/src/lib/page-snapshot/index.ts +93 -0
  42. package/src/lib/page-snapshot/react/PageSnapshotChip.tsx +72 -0
  43. package/src/lib/page-snapshot/react/PageSnapshotPreview.tsx +78 -0
  44. package/src/lib/page-snapshot/react/__tests__/PageSnapshotChip.test.tsx +54 -0
  45. package/src/lib/page-snapshot/react/__tests__/provider.test.tsx +103 -0
  46. package/src/lib/page-snapshot/react/__tests__/use-page-snapshot-toggle.test.tsx +62 -0
  47. package/src/lib/page-snapshot/react/provider.tsx +162 -0
  48. package/src/lib/page-snapshot/react/use-page-snapshot-toggle.ts +47 -0
  49. package/src/lib/page-snapshot/react/use-page-snapshot.ts +67 -0
  50. package/src/lib/page-snapshot/redaction/__tests__/audit.test.ts +25 -0
  51. package/src/lib/page-snapshot/redaction/__tests__/heuristics.test.ts +73 -0
  52. package/src/lib/page-snapshot/redaction/__tests__/luhn.test.ts +26 -0
  53. package/src/lib/page-snapshot/redaction/__tests__/patterns.test.ts +60 -0
  54. package/src/lib/page-snapshot/redaction/audit.ts +58 -0
  55. package/src/lib/page-snapshot/redaction/heuristics.ts +75 -0
  56. package/src/lib/page-snapshot/redaction/index.ts +75 -0
  57. package/src/lib/page-snapshot/redaction/luhn.ts +25 -0
  58. package/src/lib/page-snapshot/redaction/patterns.ts +111 -0
  59. package/src/lib/page-snapshot/refs/__tests__/registry.test.ts +24 -0
  60. package/src/lib/page-snapshot/refs/registry.ts +46 -0
  61. package/src/lib/page-snapshot/staleness/__tests__/hash.test.ts +34 -0
  62. package/src/lib/page-snapshot/staleness/hash.ts +20 -0
  63. package/src/lib/page-snapshot/tokens.ts +15 -0
  64. package/src/tools/AudioPlayer/context/PlayerProvider.tsx +13 -14
  65. package/src/tools/AudioPlayer/hooks/useAudioElementEvents.ts +55 -6
  66. package/src/tools/AudioPlayer/lazy.tsx +13 -27
  67. package/src/tools/AudioPlayer/parts/Meta/TimeDisplay.tsx +2 -5
  68. package/src/tools/Chat/README.md +267 -39
  69. package/src/tools/Chat/composer/Composer.tsx +471 -0
  70. package/src/tools/Chat/composer/ComposerActionBar.tsx +65 -0
  71. package/src/tools/Chat/composer/ComposerBanner.tsx +128 -0
  72. package/src/tools/Chat/composer/ComposerButton.tsx +64 -0
  73. package/src/tools/Chat/composer/ComposerFooter.tsx +90 -0
  74. package/src/tools/Chat/composer/ComposerMenuButton.tsx +62 -0
  75. package/src/tools/Chat/composer/ComposerModelPicker.tsx +104 -0
  76. package/src/tools/Chat/composer/ComposerRichTextarea.tsx +88 -0
  77. package/src/tools/Chat/composer/ComposerToolPill.tsx +95 -0
  78. package/src/tools/Chat/composer/index.ts +45 -0
  79. package/src/tools/Chat/composer/size-context.tsx +26 -0
  80. package/src/tools/Chat/composer/types.ts +143 -0
  81. package/src/tools/Chat/composer/useComposerActions.tsx +164 -0
  82. package/src/tools/Chat/context/ChatProvider.tsx +54 -3
  83. package/src/tools/Chat/core/__tests__/metadata.test.ts +69 -0
  84. package/src/tools/Chat/core/index.ts +23 -1
  85. package/src/tools/Chat/core/markdown.ts +1 -1
  86. package/src/tools/Chat/core/metadata.ts +47 -0
  87. package/src/tools/Chat/core/payload-dispatch.ts +1 -1
  88. package/src/tools/Chat/core/transport/http.ts +71 -32
  89. package/src/tools/Chat/core/transport/sse.ts +18 -10
  90. package/src/tools/Chat/highlight/HighlightOverlay.tsx +101 -0
  91. package/src/tools/Chat/highlight/README.md +103 -0
  92. package/src/tools/Chat/highlight/SpotlightCanvas.tsx +153 -0
  93. package/src/tools/Chat/highlight/__tests__/HighlightOverlay.test.tsx +112 -0
  94. package/src/tools/Chat/highlight/__tests__/resolveRef.test.ts +55 -0
  95. package/src/tools/Chat/highlight/index.ts +21 -0
  96. package/src/tools/Chat/highlight/resolveRef.ts +42 -0
  97. package/src/tools/Chat/highlight/types.ts +49 -0
  98. package/src/tools/Chat/highlight/useHighlightTargets.ts +128 -0
  99. package/src/tools/Chat/hooks/index.ts +0 -5
  100. package/src/tools/Chat/hooks/useAutoFocusOnStreamEnd.ts +28 -47
  101. package/src/tools/Chat/hooks/useChat.ts +47 -14
  102. package/src/tools/Chat/hooks/useChatComposer.ts +2 -2
  103. package/src/tools/Chat/hooks/useChatLayout.ts +1 -1
  104. package/src/tools/Chat/hooks/useStreamEndFocus.ts +54 -0
  105. package/src/tools/Chat/index.ts +25 -219
  106. package/src/tools/Chat/launcher/ChatDock.tsx +1 -1
  107. package/src/tools/Chat/launcher/ChatLauncher.tsx +1 -1
  108. package/src/tools/Chat/launcher/{ChatHeader.tsx → header/ChatHeader.tsx} +24 -11
  109. package/src/tools/Chat/launcher/{ChatHeaderActionButton.tsx → header/ChatHeaderActionButton.tsx} +34 -3
  110. package/src/tools/Chat/launcher/{ChatHeaderLanguageButton.tsx → header/ChatHeaderLanguageButton.tsx} +2 -2
  111. package/src/tools/Chat/launcher/{ChatHeaderModeToggle.tsx → header/ChatHeaderModeToggle.tsx} +1 -1
  112. package/src/tools/Chat/launcher/{ChatHeaderResetButton.tsx → header/ChatHeaderResetButton.tsx} +2 -1
  113. package/src/tools/Chat/launcher/{HeaderSlots.tsx → header/HeaderSlots.tsx} +3 -3
  114. package/src/tools/Chat/launcher/header/index.ts +26 -0
  115. package/src/tools/Chat/launcher/index.ts +3 -10
  116. package/src/tools/Chat/lazy.tsx +38 -284
  117. package/src/tools/Chat/{components → messages}/MessageBubble.tsx +58 -5
  118. package/src/tools/Chat/{components → messages}/MessageList.tsx +8 -25
  119. package/src/tools/Chat/messages/blocks/MessageBlocks.tsx +131 -0
  120. package/src/tools/Chat/messages/blocks/builtin.tsx +91 -0
  121. package/src/tools/Chat/messages/blocks/index.ts +12 -0
  122. package/src/tools/Chat/messages/blocks/registry.tsx +42 -0
  123. package/src/tools/Chat/messages/blocks/renderers/AudioBlock.tsx +20 -0
  124. package/src/tools/Chat/messages/blocks/renderers/CodeBlock.tsx +19 -0
  125. package/src/tools/Chat/messages/blocks/renderers/GalleryBlock.tsx +26 -0
  126. package/src/tools/Chat/messages/blocks/renderers/ImageBlock.tsx +27 -0
  127. package/src/tools/Chat/messages/blocks/renderers/JsonBlock.tsx +12 -0
  128. package/src/tools/Chat/messages/blocks/renderers/LottieBlock.tsx +11 -0
  129. package/src/tools/Chat/messages/blocks/renderers/MapBlock.tsx +36 -0
  130. package/src/tools/Chat/messages/blocks/renderers/MermaidBlock.tsx +11 -0
  131. package/src/tools/Chat/messages/blocks/renderers/VideoBlock.tsx +24 -0
  132. package/src/tools/Chat/messages/blocks/renderers/types.ts +8 -0
  133. package/src/tools/Chat/{components → messages}/index.ts +11 -5
  134. package/src/tools/Chat/public.ts +212 -0
  135. package/src/tools/Chat/shell/ChatRoot.tsx +326 -0
  136. package/src/tools/Chat/{components → shell}/EmptyState.tsx +4 -2
  137. package/src/tools/Chat/shell/index.ts +15 -0
  138. package/src/tools/Chat/types/block.ts +120 -0
  139. package/src/tools/Chat/types/config.ts +0 -5
  140. package/src/tools/Chat/types/index.ts +17 -0
  141. package/src/tools/Chat/types/message.ts +3 -0
  142. package/src/tools/Chat/utils/index.ts +4 -0
  143. package/src/tools/CodeEditor/README.md +4 -6
  144. package/src/tools/CodeEditor/components/DiffEditor.tsx +48 -13
  145. package/src/tools/CodeEditor/components/Editor.tsx +96 -44
  146. package/src/tools/CodeEditor/context/EditorProvider.tsx +34 -17
  147. package/src/tools/CodeEditor/hooks/useEditorTheme.ts +92 -99
  148. package/src/tools/CodeEditor/hooks/useMonaco.ts +37 -22
  149. package/src/tools/CodeEditor/lazy.tsx +6 -0
  150. package/src/tools/CodeEditor/lib/index.ts +1 -1
  151. package/src/tools/CodeEditor/lib/themes.ts +3 -39
  152. package/src/tools/CronScheduler/CronScheduler.client.tsx +230 -61
  153. package/src/tools/CronScheduler/components/CustomInput.tsx +21 -4
  154. package/src/tools/CronScheduler/components/DayChips.tsx +13 -11
  155. package/src/tools/CronScheduler/components/MonthDayGrid.tsx +4 -4
  156. package/src/tools/CronScheduler/components/SchedulePreview.tsx +7 -3
  157. package/src/tools/CronScheduler/components/TimeSelector.tsx +1 -1
  158. package/src/tools/CronScheduler/index.tsx +1 -1
  159. package/src/tools/CronScheduler/types/index.ts +8 -3
  160. package/src/tools/CronScheduler/utils/cron-humanize.ts +61 -16
  161. package/src/tools/CronScheduler/utils/cron-parser.ts +13 -4
  162. package/src/tools/FileIcon/FileIcon.tsx +24 -39
  163. package/src/tools/FileIcon/get-file-icon.ts +73 -0
  164. package/src/tools/FileIcon/icons/icon-data.ts +399 -0
  165. package/src/tools/FileIcon/index.ts +4 -0
  166. package/src/tools/FileIcon/loader.ts +17 -35
  167. package/src/tools/FileIcon/specialFolders.ts +18 -0
  168. package/src/tools/Gallery/components/lightbox/GalleryLightbox.tsx +112 -35
  169. package/src/tools/Gallery/components/media/GalleryVideo.tsx +21 -2
  170. package/src/tools/Gallery/components/preview/GalleryCarousel.tsx +11 -1
  171. package/src/tools/Gallery/hooks/usePreloadImages.ts +54 -7
  172. package/src/tools/ImageViewer/components/ImageInfo.tsx +12 -1
  173. package/src/tools/ImageViewer/components/ImageToolbar.tsx +51 -43
  174. package/src/tools/ImageViewer/components/ImageViewer.tsx +106 -26
  175. package/src/tools/ImageViewer/hooks/useImageLoading.ts +13 -0
  176. package/src/tools/ImageViewer/utils/constants.ts +3 -0
  177. package/src/tools/ImageViewer/utils/index.ts +1 -0
  178. package/src/tools/JsonForm/JsonSchemaForm.tsx +4 -1
  179. package/src/tools/JsonForm/templates/ArrayFieldTemplate.tsx +5 -3
  180. package/src/tools/JsonForm/templates/BaseInputTemplate.tsx +7 -4
  181. package/src/tools/JsonForm/templates/ErrorListTemplate.tsx +3 -1
  182. package/src/tools/JsonForm/templates/ObjectFieldTemplate.tsx +23 -3
  183. package/src/tools/JsonForm/widgets/ColorWidget.tsx +20 -12
  184. package/src/tools/JsonForm/widgets/NumberWidget.tsx +14 -9
  185. package/src/tools/JsonForm/widgets/RadioWidget.tsx +78 -0
  186. package/src/tools/JsonForm/widgets/SelectWidget.tsx +1 -0
  187. package/src/tools/JsonForm/widgets/SliderWidget.tsx +7 -4
  188. package/src/tools/JsonForm/widgets/TextWidget.tsx +41 -17
  189. package/src/tools/JsonForm/widgets/index.ts +1 -0
  190. package/src/tools/JsonTree/components/JsonContent.tsx +115 -40
  191. package/src/tools/LottiePlayer/LottiePlayer.client.tsx +177 -72
  192. package/src/tools/LottiePlayer/index.tsx +14 -4
  193. package/src/tools/LottiePlayer/lazy.tsx +11 -3
  194. package/src/tools/LottiePlayer/types.ts +31 -1
  195. package/src/tools/LottiePlayer/useLottie.ts +32 -9
  196. package/src/tools/LottiePlayer/usePrefersReducedMotion.ts +46 -0
  197. package/src/tools/Map/components/LayerSwitcher.tsx +54 -21
  198. package/src/tools/Map/components/MapCluster.tsx +28 -21
  199. package/src/tools/Map/components/MapContainer.tsx +11 -4
  200. package/src/tools/Map/components/MapLegend.tsx +46 -15
  201. package/src/tools/Map/components/MapMarker.tsx +31 -2
  202. package/src/tools/Map/hooks/useMapEvents.ts +64 -105
  203. package/src/tools/MarkdownEditor/MarkdownEditor.tsx +61 -6
  204. package/src/tools/MarkdownEditor/MentionList.tsx +37 -4
  205. package/src/tools/MarkdownEditor/createMentionSuggestion.ts +11 -0
  206. package/src/tools/MarkdownEditor/lazy.tsx +32 -7
  207. package/src/tools/MarkdownEditor/styles.css +13 -0
  208. package/src/tools/MarkdownMessage/CodeBlock.tsx +40 -17
  209. package/src/tools/MarkdownMessage/MarkdownMessage.tsx +26 -6
  210. package/src/tools/MarkdownMessage/components.tsx +22 -9
  211. package/src/tools/MarkdownMessage/types.ts +24 -1
  212. package/src/tools/Mermaid/Mermaid.client.tsx +27 -5
  213. package/src/tools/Mermaid/components/MermaidErrorPanel.tsx +31 -0
  214. package/src/tools/Mermaid/components/MermaidFullscreenModal.tsx +14 -17
  215. package/src/tools/Mermaid/hooks/useMermaidRenderer.ts +264 -168
  216. package/src/tools/Mermaid/hooks/useMermaidValidation.ts +76 -10
  217. package/src/tools/Mermaid/index.tsx +6 -0
  218. package/src/tools/Mermaid/utils/mermaid-helpers.ts +141 -18
  219. package/src/tools/OpenapiViewer/components/DocsLayout/EndpointDoc/SchemaFields/FieldRow.tsx +11 -1
  220. package/src/tools/OpenapiViewer/components/DocsLayout/EndpointDoc/SchemaFields/buildTree.ts +49 -20
  221. package/src/tools/OpenapiViewer/components/DocsLayout/EndpointDoc/index.tsx +7 -0
  222. package/src/tools/OpenapiViewer/components/DocsLayout/grouping.ts +7 -4
  223. package/src/tools/OpenapiViewer/constants.ts +3 -0
  224. package/src/tools/OpenapiViewer/hooks/useOpenApiSchema.ts +73 -11
  225. package/src/tools/OpenapiViewer/utils/schemaExport.ts +26 -6
  226. package/src/tools/PrettyCode/PrettyCode.client.tsx +23 -16
  227. package/src/tools/PrettyCode/lazy.tsx +1 -1
  228. package/src/tools/SpeechRecognition/README.md +1 -1
  229. package/src/tools/SpeechRecognition/__tests__/language.test.ts +9 -3
  230. package/src/tools/SpeechRecognition/components/RecordingPulse.tsx +59 -0
  231. package/src/tools/SpeechRecognition/components/index.ts +2 -0
  232. package/src/tools/SpeechRecognition/core/engine/external.ts +24 -7
  233. package/src/tools/SpeechRecognition/core/language.ts +23 -6
  234. package/src/tools/SpeechRecognition/hooks/usePushToTalk.ts +36 -5
  235. package/src/tools/SpeechRecognition/hooks/useSpeechRecognition.ts +18 -11
  236. package/src/tools/SpeechRecognition/widgets/VoiceComposerSlot.tsx +94 -26
  237. package/src/tools/SpeechRecognition/widgets/index.ts +1 -1
  238. package/src/tools/Tree/README.md +4 -8
  239. package/src/tools/Tree/TreeRoot.tsx +22 -10
  240. package/src/tools/Tree/components/TreeContent.tsx +24 -4
  241. package/src/tools/Tree/components/TreeLabel.tsx +8 -2
  242. package/src/tools/Tree/components/TreeRow.tsx +16 -6
  243. package/src/tools/Tree/data/flatten.ts +10 -4
  244. package/src/tools/Tree/types.ts +4 -0
  245. package/src/tools/Uploader/components/UploadAddButton.tsx +29 -6
  246. package/src/tools/Uploader/components/UploadDropzone.tsx +63 -7
  247. package/src/tools/Uploader/components/UploadPageDropOverlay.tsx +19 -5
  248. package/src/tools/Uploader/components/UploadPreviewItem.tsx +47 -17
  249. package/src/tools/Uploader/components/UploadPreviewList.tsx +24 -12
  250. package/src/tools/Uploader/utils/formatters.ts +8 -3
  251. package/src/tools/VideoPlayer/README.md +87 -230
  252. package/src/tools/VideoPlayer/VideoPlayer.tsx +82 -0
  253. package/src/tools/VideoPlayer/canvas/canvas-dispatcher.tsx +34 -0
  254. package/src/tools/VideoPlayer/canvas/hls-canvas.tsx +39 -0
  255. package/src/tools/VideoPlayer/canvas/iframe-canvas.tsx +33 -0
  256. package/src/tools/VideoPlayer/canvas/index.ts +12 -0
  257. package/src/tools/VideoPlayer/canvas/jsx-augmentation.ts +47 -0
  258. package/src/tools/VideoPlayer/canvas/native-canvas.tsx +38 -0
  259. package/src/tools/VideoPlayer/canvas/vimeo-canvas.tsx +40 -0
  260. package/src/tools/VideoPlayer/canvas/youtube-canvas.tsx +78 -0
  261. package/src/tools/VideoPlayer/index.ts +51 -65
  262. package/src/tools/VideoPlayer/lazy.tsx +11 -54
  263. package/src/tools/VideoPlayer/parts/controls-bar.tsx +35 -0
  264. package/src/tools/VideoPlayer/parts/fullscreen.tsx +19 -0
  265. package/src/tools/VideoPlayer/parts/index.ts +15 -0
  266. package/src/tools/VideoPlayer/parts/pip.tsx +19 -0
  267. package/src/tools/VideoPlayer/parts/play-button.tsx +19 -0
  268. package/src/tools/VideoPlayer/parts/playback-rate.tsx +31 -0
  269. package/src/tools/VideoPlayer/parts/poster.tsx +3 -0
  270. package/src/tools/VideoPlayer/parts/seek-bar.tsx +26 -0
  271. package/src/tools/VideoPlayer/parts/volume.tsx +32 -0
  272. package/src/tools/VideoPlayer/styles/video-player.css +141 -0
  273. package/src/tools/VideoPlayer/types.ts +82 -0
  274. package/src/tools/VideoPlayer/utils/parse-embed-url.ts +70 -0
  275. package/src/tools/VideoPlayer/utils/vimeo-id.ts +24 -0
  276. package/src/tools/VideoPlayer/utils/youtube-id.ts +64 -0
  277. package/src/tools/index.ts +37 -29
  278. package/src/tools/Chat/components/AudioToggle.tsx +0 -78
  279. package/src/tools/Chat/components/ChatRoot.tsx +0 -305
  280. package/src/tools/Chat/components/Composer.tsx +0 -216
  281. package/src/tools/Chat/hooks/useChatScroll.ts +0 -145
  282. package/src/tools/Chat/types.ts +0 -9
  283. package/src/tools/JsonTree/components/JsonToolbar.tsx +0 -95
  284. package/src/tools/JsonTree/hooks/useElementCorner.ts +0 -84
  285. package/src/tools/JsonTree/hooks/useNavbarHeight.ts +0 -83
  286. package/src/tools/OpenapiViewer/components/DocsLayout/schemaFields.ts +0 -121
  287. package/src/tools/Tour/README.md +0 -373
  288. package/src/tools/Tour/components/Tour.tsx +0 -12
  289. package/src/tools/Tour/components/TourContent.tsx +0 -171
  290. package/src/tools/Tour/components/TourNavigation.tsx +0 -77
  291. package/src/tools/Tour/components/TourProgress.tsx +0 -88
  292. package/src/tools/Tour/components/TourSpotlight.tsx +0 -199
  293. package/src/tools/Tour/components/index.ts +0 -5
  294. package/src/tools/Tour/context/TourContext.ts +0 -19
  295. package/src/tools/Tour/context/TourProvider.tsx +0 -292
  296. package/src/tools/Tour/context/index.ts +0 -2
  297. package/src/tools/Tour/hooks/index.ts +0 -3
  298. package/src/tools/Tour/hooks/useKeyboardNavigation.ts +0 -59
  299. package/src/tools/Tour/hooks/useStepTarget.ts +0 -121
  300. package/src/tools/Tour/hooks/useTour.ts +0 -42
  301. package/src/tools/Tour/index.ts +0 -38
  302. package/src/tools/Tour/types/index.ts +0 -224
  303. package/src/tools/Tour/utils/dom.ts +0 -98
  304. package/src/tools/Tour/utils/index.ts +0 -3
  305. package/src/tools/Tour/utils/logger.ts +0 -3
  306. package/src/tools/Tour/utils/scrollIntoView.ts +0 -24
  307. package/src/tools/VideoPlayer/components/VideoControls.tsx +0 -138
  308. package/src/tools/VideoPlayer/components/VideoErrorFallback.tsx +0 -172
  309. package/src/tools/VideoPlayer/components/VideoPlayer.tsx +0 -201
  310. package/src/tools/VideoPlayer/components/index.ts +0 -14
  311. package/src/tools/VideoPlayer/context/VideoPlayerContext.tsx +0 -52
  312. package/src/tools/VideoPlayer/context/index.ts +0 -8
  313. package/src/tools/VideoPlayer/hooks/index.ts +0 -12
  314. package/src/tools/VideoPlayer/hooks/useVideoPlayerSettings.ts +0 -71
  315. package/src/tools/VideoPlayer/hooks/useVideoPositionCache.ts +0 -117
  316. package/src/tools/VideoPlayer/providers/NativeProvider.tsx +0 -284
  317. package/src/tools/VideoPlayer/providers/StreamProvider.tsx +0 -505
  318. package/src/tools/VideoPlayer/providers/VidstackProvider.tsx +0 -397
  319. package/src/tools/VideoPlayer/providers/index.ts +0 -8
  320. package/src/tools/VideoPlayer/types/index.ts +0 -38
  321. package/src/tools/VideoPlayer/types/player.ts +0 -116
  322. package/src/tools/VideoPlayer/types/provider.ts +0 -93
  323. package/src/tools/VideoPlayer/types/sources.ts +0 -97
  324. package/src/tools/VideoPlayer/utils/debug.ts +0 -14
  325. package/src/tools/VideoPlayer/utils/fileSource.ts +0 -78
  326. package/src/tools/VideoPlayer/utils/index.ts +0 -12
  327. package/src/tools/VideoPlayer/utils/resolvers.ts +0 -75
  328. /package/src/tools/Chat/{config.ts → constants.ts} +0 -0
  329. /package/src/tools/Chat/launcher/{ChatHeaderAudioToggle.tsx → header/ChatHeaderAudioToggle.tsx} +0 -0
  330. /package/src/tools/Chat/{components → messages}/Attachments.tsx +0 -0
  331. /package/src/tools/Chat/{components → messages}/JumpToLatest.tsx +0 -0
  332. /package/src/tools/Chat/{components → messages}/MessageActions.tsx +0 -0
  333. /package/src/tools/Chat/{components → messages}/Sources.tsx +0 -0
  334. /package/src/tools/Chat/{components → messages}/StreamingIndicator.tsx +0 -0
  335. /package/src/tools/Chat/{components → messages}/ToolCalls.tsx +0 -0
  336. /package/src/tools/Chat/{components → shell}/ErrorBanner.tsx +0 -0
@@ -12,28 +12,38 @@
12
12
  * Rules of thumb:
13
13
  * - **Heavy** (ChatRoot, ChatLauncher, ChatFAB, ChatDock, MessageList,
14
14
  * MessageBubble, Composer, ToolCalls, Attachments*, ChatHeader*, …) —
15
- * loaded only via `Lazy*` wrappers below. Do NOT add synchronous
16
- * re-exports for these from this file.
15
+ * loaded only via `Lazy*` wrappers below for maximum laziness. They are
16
+ * ALSO re-exported synchronously (composable surface, see note below)
17
+ * so custom chat shells can import them. The sync re-export is a flat
18
+ * `export *` from the domain barrels — never a hand-listed copy.
17
19
  * - **Light** (types, config constants, pure core reducer/utils,
18
20
  * transports, hooks without UI, audio prefs, draft sanitizer) —
19
- * re-exported synchronously here. Types are erased at compile time;
20
- * helpers and hooks pull in no UI components.
21
+ * re-exported synchronously via `./public`. Types are erased at compile
22
+ * time; helpers and hooks pull in no UI components.
21
23
  *
22
- * Consumers that need synchronous access to the heavy components
23
- * (custom chat layouts, Storybook stories) can import from the root
24
- * barrel `@djangocfg/ui-tools` instead.
24
+ * The light surface lives in `./public` and is shared verbatim with the
25
+ * root barrel `index.ts` one list, edited once.
26
+ *
27
+ * Consumers that want maximum laziness should use `LazyChat` /
28
+ * `LazyChatLauncher` and skip the synchronous component re-exports.
25
29
  */
26
30
 
27
31
  import { createLazyComponent, LoadingFallback } from '../../components/lazy-wrapper';
28
- import type { ChatRootProps } from './components/ChatRoot';
32
+ import type { ChatRootProps } from './shell/ChatRoot';
29
33
  import type { ChatLauncherProps } from './launcher';
30
34
 
35
+ // ============================================================================
36
+ // Light surface — shared with the root barrel via ./public
37
+ // ============================================================================
38
+
39
+ export * from './public';
40
+
31
41
  // ============================================================================
32
42
  // Lazy UI components
33
43
  // ============================================================================
34
44
 
35
45
  export const LazyChat = createLazyComponent<ChatRootProps>(
36
- () => import('./components/ChatRoot').then((m) => ({ default: m.ChatRoot })),
46
+ () => import('./shell/ChatRoot').then((m) => ({ default: m.ChatRoot })),
37
47
  {
38
48
  displayName: 'LazyChat',
39
49
  fallback: <LoadingFallback minHeight={320} text="Loading chat…" />,
@@ -49,289 +59,33 @@ export const LazyChatLauncher = createLazyComponent<ChatLauncherProps>(
49
59
  },
50
60
  );
51
61
 
52
- // ============================================================================
53
- // Light surface re-exports — types + pure helpers + hooks without UI
54
- // ============================================================================
55
-
56
- // Types (erased at compile time, free to re-export)
57
- export type {
58
- ChatRole,
59
- ChatMessage,
60
- ChatPersona,
61
- ChatToolCall,
62
- ChatAttachment,
63
- ChatSource,
64
- ChatDisplayMode,
65
- ChatUserContext,
66
- ChatAssistantContext,
67
- ChatPrefs,
68
- ChatConfig,
69
- ChatLabels,
70
- ChatTransport,
71
- ChatStreamEvent,
72
- CreateSessionOptions,
73
- SessionInfo,
74
- HistoryPage,
75
- StreamOptions,
76
- SendOptions,
77
- } from './types';
78
- export { DEFAULT_LABELS } from './types';
79
-
80
- // Config — plain constants, no UI imports
81
- export {
82
- STORAGE_KEYS,
83
- CSS_VARS,
84
- DEFAULT_Z_INDEX,
85
- LIMITS,
86
- DEFAULT_SIDEBAR,
87
- HOTKEYS,
88
- CHAT_EVENT_NAME,
89
- type ChatEventDetail,
90
- } from './config';
91
-
92
- // Core — pure reducer / id / token buffer / persona / initials
93
- export {
94
- reducer,
95
- initialState,
96
- createId,
97
- createTokenBuffer,
98
- resolvePersona,
99
- deriveInitials,
100
- type ChatState,
101
- type ChatAction,
102
- type TokenBuffer,
103
- } from './core';
104
-
105
- // Transports — pure functions, no UI
106
- export {
107
- createHttpTransport,
108
- createMockTransport,
109
- parseSSE,
110
- TransportError,
111
- createPydanticAIChatTransport,
112
- createToolIdQueue,
113
- mapPydanticAIEvent,
114
- createPydanticAISSEMap,
115
- type HttpTransportConfig,
116
- type MockTransportOptions,
117
- type ParseSSEOptions,
118
- type PydanticAIChatTransportOpts,
119
- type PydanticAIEvent,
120
- type ToolIdQueue,
121
- } from './core/transport';
122
-
123
- // Hooks — no JSX, no UI
124
- export {
125
- useChat,
126
- useChatComposer,
127
- useChatScroll,
128
- useChatHistory,
129
- useChatLayout,
130
- useChatAudio,
131
- useAutoFocusOnStreamEnd,
132
- useRegisterComposer,
133
- useChatReset,
134
- useVisitorFingerprint,
135
- useChatDockPrefs,
136
- DEFAULT_DOCK_PREFS,
137
- useFocusOnEmptyClick,
138
- useChatUnread,
139
- useChatUnreadNotifier,
140
- useChatLightbox,
141
- type UseChatUnreadOptions,
142
- type UseChatUnreadReturn,
143
- type UseChatUnreadNotifierOptions,
144
- type UseChatConfig,
145
- type UseChatReturn,
146
- type UseChatComposerOptions,
147
- type UseChatComposerReturn,
148
- type UseChatScrollOptions,
149
- type UseChatScrollReturn,
150
- type UseChatHistoryOptions,
151
- type UseChatLayoutConfig,
152
- type UseChatLayoutReturn,
153
- type UseAutoFocusOnStreamEndOptions,
154
- type Focusable,
155
- type UseChatResetOptions,
156
- type UseChatResetReturn,
157
- type UseVisitorFingerprintOptions,
158
- type ChatDockPrefs,
159
- type UseChatDockPrefsOptions,
160
- type UseChatDockPrefsReturn,
161
- type UseFocusOnEmptyClickOptions,
162
- type UseChatLightboxReturn,
163
- type ChatLightboxState,
164
- } from './hooks';
165
-
166
- // Audio
167
- export {
168
- useChatAudioPrefs,
169
- DEFAULT_CHAT_SOUNDS,
170
- type ChatAudioEvent,
171
- type ChatAudioSounds,
172
- type ChatAudioConfig,
173
- type UseChatAudioReturn,
174
- } from './core/audio';
175
-
176
- // Notifier — title rotation + favicon badge + cross-tab decorator. Pure
177
- // browser-API code, no React, no UI components.
178
- export {
179
- createBrowserNotifier,
180
- createNoopNotifier,
181
- createTitleRotator,
182
- createFaviconBadge,
183
- createCrossTabNotifier,
184
- isPageHidden,
185
- onVisibilityChange,
186
- type ChatNotifier,
187
- type BrowserNotifierOptions,
188
- type TitleRotatorOptions,
189
- type TitleMode,
190
- type FaviconBadgeOptions,
191
- type CrossTabNotifierOptions,
192
- } from './notifier';
193
-
194
- // Tool-call payload dispatcher — pure
195
- export {
196
- dispatchToolPayload,
197
- isPlainObject,
198
- isLatLng,
199
- isGeoJSONFeatureCollection,
200
- isStringValue,
201
- type ToolPayloadMatcher,
202
- type ToolPayloadFallback,
203
- } from './core/payload-dispatch';
204
-
205
- // Logger — pure
206
- export {
207
- getChatLogger,
208
- type ChatLogger,
209
- type ChatLogScope,
210
- } from './core/logger';
211
-
212
- // Utils — pure
213
- export { sanitizeDraft, isSubmittableDraft } from './utils/sanitizeDraft';
214
- export { collectImageAttachments } from './utils/collectImageAttachments';
215
-
216
- // Style tokens — strings + hooks, no UI components
217
- export {
218
- BUBBLE_SURFACE,
219
- ANCHOR,
220
- TOGGLE,
221
- DESTRUCTIVE_SURFACE,
222
- TOOL_CALL,
223
- useChatBubbleStyles,
224
- useChatRoleStyles,
225
- useChatDestructiveStyles,
226
- type ChatBubbleSurface,
227
- type ChatBubbleStyles,
228
- type ChatRoleStyles,
229
- type ChatDestructiveStyles,
230
- } from './styles';
231
-
232
- // Provider / context — needed by callers wiring custom chat shells
233
- export {
234
- ChatProvider,
235
- useChatContext,
236
- useChatContextOptional,
237
- type ChatContextValue,
238
- type ChatProviderProps,
239
- } from './context';
240
-
241
62
  // ============================================================================
242
63
  // Composable surface — synchronously re-exported components and their prop
243
64
  // types. These are needed by consumers that build custom chat shells
244
- // (e.g. `@djangocfg/crm`'s AdminChat / PublicChat) rather than rendering
245
- // `LazyChat` directly.
65
+ // (e.g. `@djangocfg/crm`'s AdminChat / PublicChat, Storybook stories)
66
+ // rather than rendering `LazyChat` directly.
246
67
  //
247
68
  // They DO transitively pull in MarkdownMessage / Sources / StreamingIndicator
248
69
  // when actually rendered. Importing the types alone is free. Importing the
249
70
  // component costs the dependency graph — that's the price of a custom shell.
250
- //
251
- // Apps that want maximum laziness should use `LazyChat` / `LazyChatLauncher`
252
- // above and skip these.
253
71
  // ============================================================================
254
72
 
255
- export {
256
- ChatLauncher,
257
- ChatFAB,
258
- ChatDock,
259
- ChatHeader,
260
- ChatHeaderActionButton,
261
- ChatHeaderAudioToggle,
262
- ChatHeaderLanguageButton,
263
- ChatHeaderModeToggle,
264
- ChatHeaderResetButton,
265
- ChatGreeting,
266
- ChatUnreadPreview,
267
- } from './launcher';
73
+ export * from './messages';
74
+ export * from './composer';
75
+ export * from './shell';
76
+ export * from './launcher';
268
77
 
78
+ // Highlight — AI-driven `point` directives (lightweight, no heavy deps).
269
79
  export {
270
- ChatRoot,
271
- MessageList,
272
- MessageBubble,
273
- MessageActions,
274
- Composer,
275
- Sources,
276
- ToolCalls,
277
- Attachments,
278
- AttachmentsGrid,
279
- AttachmentsList,
280
- EmptyState,
281
- ErrorBanner,
282
- JumpToLatest,
283
- StreamingIndicator,
284
- AudioToggle,
285
- } from './components';
286
-
287
- // Heavy-component prop types
288
- export type {
289
- ChatLauncherProps,
290
- ChatLauncherHotkey,
291
- ChatLauncherGreeting,
292
- ChatHeaderSlots,
293
- ChatHeaderResetSlot,
294
- ChatHeaderLanguageSlot,
295
- ChatHeaderModeToggleSlot,
296
- ChatFABProps,
297
- ChatFABPosition,
298
- ChatFABVariant,
299
- ChatFABSize,
300
- ChatDockProps,
301
- ChatDockMode,
302
- ChatDockSide,
303
- ChatHeaderProps,
304
- ChatHeaderActionButtonProps,
305
- ChatHeaderModeToggleProps,
306
- ChatHeaderAudioToggleProps,
307
- ChatHeaderResetButtonProps,
308
- ChatHeaderLanguageButtonProps,
309
- ChatGreetingProps,
310
- ChatUnreadPreviewProps,
311
- ChatPresencePhase,
312
- } from './launcher';
313
-
314
- export { useChatPresence } from './launcher';
315
-
316
- export type {
317
- ChatRootProps,
318
- MessageListProps,
319
- MessageListHandle,
320
- MessageBubbleProps,
321
- MessageActionsProps,
322
- ComposerProps,
323
- SourcesProps,
324
- ToolCallsProps,
325
- ToolPayloadKind,
326
- AttachmentsProps,
327
- AttachmentsGridProps,
328
- AttachmentsListProps,
329
- AttachmentRenderer,
330
- AttachmentRendererArgs,
331
- AttachmentRendererMap,
332
- EmptyStateProps,
333
- ErrorBannerProps,
334
- JumpToLatestProps,
335
- StreamingIndicatorProps,
336
- AudioToggleProps,
337
- } from './components';
80
+ HighlightOverlay,
81
+ SpotlightCanvas,
82
+ useHighlightTargets,
83
+ resolveRefs,
84
+ type HighlightOverlayProps,
85
+ type SpotlightCanvasProps,
86
+ type RefResolver,
87
+ type PointDirective,
88
+ type HighlightTarget,
89
+ type SpotlightRect,
90
+ type CSTRefId,
91
+ } from './highlight';
@@ -26,7 +26,10 @@ import {
26
26
  type AttachmentRendererMap,
27
27
  } from './Attachments';
28
28
  import { MessageActions } from './MessageActions';
29
+ import { MessageBlocks } from './blocks';
30
+ import type { BlockRegistry } from './blocks';
29
31
  import type { ToolCallsProps } from './ToolCalls';
32
+ import type { ComposerAppearance } from '../composer/types';
30
33
 
31
34
  export interface MessageBubbleProps {
32
35
  message: ChatMessage;
@@ -42,6 +45,9 @@ export interface MessageBubbleProps {
42
45
  showTimestamp?: boolean;
43
46
  showActions?: boolean;
44
47
  isCompact?: boolean;
48
+ /** Spaciousness of the bubble — `full` scales padding, text, avatar up
49
+ * for full-page chat. `compact` (default) keeps the current geometry. */
50
+ appearance?: ComposerAppearance;
45
51
  className?: string;
46
52
  beforeContent?: ReactNode;
47
53
  afterContent?: ReactNode;
@@ -52,6 +58,11 @@ export interface MessageBubbleProps {
52
58
  attachmentsRenderer?: (atts: ChatAttachment[]) => ReactNode;
53
59
  /** Per-type attachment renderers forwarded to default `<Attachments>`. */
54
60
  attachmentRenderers?: AttachmentRendererMap;
61
+ /**
62
+ * Registry of `kind` → renderer for `message.blocks`. Prop beats
63
+ * context; both fall back to `BUILTIN_BLOCK_REGISTRY`.
64
+ */
65
+ blockRegistry?: BlockRegistry;
55
66
  /** Click handler for attachment tiles (e.g. open lightbox). */
56
67
  onAttachmentOpen?: (a: ChatAttachment) => void;
57
68
  onCopy?: () => void;
@@ -96,6 +107,28 @@ export interface MessageBubbleProps {
96
107
  renderAfterMessage?: (m: ChatMessage) => ReactNode;
97
108
  }
98
109
 
110
+ /** Extra spaciousness layered on top of the default bubble geometry when
111
+ * `appearance="full"`. Empty strings for `compact` keep every pixel of the
112
+ * current geometry untouched (backward-compat). */
113
+ const APPEARANCE_CLASSES: Record<ComposerAppearance, {
114
+ row: string;
115
+ avatar: string;
116
+ avatarFallback: string;
117
+ bubble: string;
118
+ meta: string;
119
+ }> = {
120
+ compact: { row: '', avatar: '', avatarFallback: '', bubble: '', meta: '' },
121
+ full: {
122
+ row: 'gap-4',
123
+ avatar: 'size-10',
124
+ avatarFallback: 'text-sm',
125
+ // Roomy ChatGPT-style bubble: larger text with generous line-height
126
+ // and padding so a full-page chat reads spacious, not just bigger.
127
+ bubble: 'rounded-3xl px-5 py-3.5 text-base leading-relaxed',
128
+ meta: 'text-xs',
129
+ },
130
+ };
131
+
99
132
  const MessageBubbleInner = ({
100
133
  message,
101
134
  isUser: isUserProp,
@@ -107,6 +140,7 @@ const MessageBubbleInner = ({
107
140
  showTimestamp = false,
108
141
  showActions = true,
109
142
  isCompact = false,
143
+ appearance = 'compact',
110
144
  className,
111
145
  beforeContent,
112
146
  afterContent,
@@ -115,6 +149,7 @@ const MessageBubbleInner = ({
115
149
  sourcesRenderer,
116
150
  attachmentsRenderer,
117
151
  attachmentRenderers,
152
+ blockRegistry,
118
153
  onAttachmentOpen,
119
154
  onCopy,
120
155
  onRegenerate,
@@ -133,6 +168,9 @@ const MessageBubbleInner = ({
133
168
  );
134
169
 
135
170
  const ctx = useChatContextOptional();
171
+ // Prop beats context; `<MessageBlocks>` falls back to the built-in
172
+ // registry when both are absent.
173
+ const resolvedBlockRegistry = blockRegistry ?? ctx?.blockRegistry;
136
174
  const persona = resolvePersona(
137
175
  message,
138
176
  user ?? ctx?.config.user,
@@ -140,6 +178,9 @@ const MessageBubbleInner = ({
140
178
  );
141
179
  const initials = deriveInitials(persona, message.role);
142
180
  const personaName = persona.name ?? (isUser ? 'You' : 'Assistant');
181
+ // `appearance` scales the whole bubble (padding, text, avatar) so a
182
+ // full-page chat reads like ChatGPT/Gemini. `compact` = no changes.
183
+ const ap = APPEARANCE_CLASSES[appearance];
143
184
 
144
185
  return (
145
186
  <div
@@ -149,19 +190,20 @@ const MessageBubbleInner = ({
149
190
  data-role={message.role}
150
191
  className={cn(
151
192
  'group/msg flex gap-2.5 px-2.5 py-2',
193
+ ap.row,
152
194
  isUser ? 'flex-row-reverse' : 'flex-row',
153
195
  className,
154
196
  )}
155
197
  >
156
198
  {showAvatar ? (
157
199
  <Avatar
158
- className="size-7 shrink-0"
200
+ className={cn('size-7 shrink-0', ap.avatar)}
159
201
  title={persona.description ?? personaName}
160
202
  >
161
203
  {avatarSrc || persona.avatarUrl ? (
162
204
  <AvatarImage src={avatarSrc ?? persona.avatarUrl} alt={personaName} />
163
205
  ) : null}
164
- <AvatarFallback className="text-[10px]">
206
+ <AvatarFallback className={cn('text-[10px]', ap.avatarFallback)}>
165
207
  {avatarFallback ?? initials}
166
208
  </AvatarFallback>
167
209
  </Avatar>
@@ -195,6 +237,7 @@ const MessageBubbleInner = ({
195
237
  <div
196
238
  className={cn(
197
239
  'inline-block max-w-full rounded-2xl px-3.5 py-2 text-sm',
240
+ ap.bubble,
198
241
  bubbleSurface,
199
242
  )}
200
243
  >
@@ -210,7 +253,7 @@ const MessageBubbleInner = ({
210
253
  <MarkdownMessage
211
254
  content={message.content || (isErr ? '*Failed to generate a response.*' : '')}
212
255
  isUser={isUser}
213
- isCompact={isCompact}
256
+ size={appearance === 'full' ? 'base' : isCompact ? 'xs' : 'sm'}
214
257
  plainText={isStreaming}
215
258
  />
216
259
  ) : (
@@ -218,6 +261,15 @@ const MessageBubbleInner = ({
218
261
  )}
219
262
  </div>
220
263
 
264
+ {message.blocks?.length ? (
265
+ <MessageBlocks
266
+ blocks={message.blocks}
267
+ registry={resolvedBlockRegistry}
268
+ appearance={appearance}
269
+ isUser={isUser}
270
+ />
271
+ ) : null}
272
+
221
273
  {message.toolCalls?.length
222
274
  ? toolCallsRenderer
223
275
  ? toolCallsRenderer(message.toolCalls)
@@ -246,7 +298,7 @@ const MessageBubbleInner = ({
246
298
  ) : null}
247
299
 
248
300
  {showTimestamp ? (
249
- <div className="mt-1 text-[10px] text-muted-foreground">
301
+ <div className={cn('mt-1 text-[10px] text-muted-foreground', ap.meta)}>
250
302
  {new Date(message.createdAt).toLocaleTimeString()}
251
303
  </div>
252
304
  ) : null}
@@ -269,7 +321,8 @@ export const MessageBubble = memo(MessageBubbleInner, (prev, next) => {
269
321
  a.toolActivity === b.toolActivity &&
270
322
  a.toolCalls === b.toolCalls &&
271
323
  a.sources === b.sources &&
272
- a.attachments === b.attachments
324
+ a.attachments === b.attachments &&
325
+ a.blocks === b.blocks
273
326
  );
274
327
  });
275
328
  MessageBubble.displayName = 'MessageBubble';
@@ -2,7 +2,6 @@
2
2
 
3
3
  import {
4
4
  type ReactNode,
5
- type RefObject,
6
5
  forwardRef,
7
6
  useCallback,
8
7
  useEffect,
@@ -20,6 +19,7 @@ import { useCopy } from '@djangocfg/ui-core/hooks';
20
19
  import type { ChatMessage } from '../types';
21
20
  import { useChatContextOptional } from '../context';
22
21
  import { MessageBubble } from './MessageBubble';
22
+ import type { ComposerAppearance } from '../composer/types';
23
23
 
24
24
  export interface MessageListProps {
25
25
  messages?: ChatMessage[];
@@ -34,18 +34,6 @@ export interface MessageListProps {
34
34
  * `startReached` until `data` length grows).
35
35
  */
36
36
  onStartReached?: () => void;
37
- /**
38
- * @deprecated Kept as a no-op for backwards compatibility — wire
39
- * `onStartReached` instead. Virtuoso owns the scroll viewport now,
40
- * external sentinels never see scroll events.
41
- */
42
- topSentinelRef?: RefObject<HTMLDivElement | null>;
43
- /**
44
- * @deprecated Kept as a no-op for backwards compatibility — Virtuoso
45
- * exposes `scrollToIndex` via the imperative handle instead. See
46
- * `useChatScroll` for the chat-friendly wrapper.
47
- */
48
- bottomRef?: RefObject<HTMLDivElement | null>;
49
37
  className?: string;
50
38
  itemClassName?: string;
51
39
  /**
@@ -55,15 +43,6 @@ export interface MessageListProps {
55
43
  * always. Plan64.
56
44
  */
57
45
  noVirtualize?: boolean;
58
- /**
59
- * @deprecated No-op as of 2.1.373. We intentionally let Virtuoso run
60
- * its first-item probe pass: cmdop bubbles vary from 40px (one-line
61
- * user message) to 800px (markdown with code blocks), so any single
62
- * estimate fed here forces a measure/reshape loop on every render.
63
- * The kept prop avoids a breaking-change bump for hosts that still
64
- * pass it explicitly.
65
- */
66
- defaultItemHeight?: number;
67
46
  /**
68
47
  * Fires when the viewport sticky state changes — `true` when the
69
48
  * user is pinned to the bottom (streaming token deltas keep them
@@ -86,6 +65,10 @@ export interface MessageListProps {
86
65
  * reply, even if they were scrolled up. Plan11.
87
66
  */
88
67
  scrollAnchorId?: string | number | null;
68
+ /** Spaciousness of the default `<MessageBubble>`s — `full` scales the
69
+ * whole bubble up for full-page chat. Default `compact` (no change).
70
+ * Ignored when `renderItem` is set (the host owns bubble rendering). */
71
+ appearance?: ComposerAppearance;
89
72
  }
90
73
 
91
74
  export interface MessageListHandle {
@@ -103,14 +86,13 @@ export const MessageList = forwardRef<MessageListHandle, MessageListProps>(funct
103
86
  className,
104
87
  itemClassName,
105
88
  noVirtualize = false,
106
- defaultItemHeight: _deprecatedDefaultItemHeight,
107
89
  onAtBottomChange,
108
90
  atBottomThreshold = 120,
109
91
  scrollAnchorId,
92
+ appearance = 'compact',
110
93
  },
111
94
  ref,
112
95
  ) {
113
- void _deprecatedDefaultItemHeight;
114
96
  const ctx = useChatContextOptional();
115
97
  const messages = messagesProp ?? ctx?.messages ?? [];
116
98
  const isLoadingMore = isLoadingMoreProp ?? ctx?.isLoadingMore ?? false;
@@ -167,13 +149,14 @@ export const MessageList = forwardRef<MessageListHandle, MessageListProps>(funct
167
149
  <div className={itemClassName}>
168
150
  <MessageBubble
169
151
  message={m}
152
+ appearance={appearance}
170
153
  onCopy={() => void copyToClipboard(m.content)}
171
154
  onRegenerate={ctx ? () => void ctx.regenerate(m.id) : undefined}
172
155
  onDelete={ctx ? () => ctx.deleteMessage(m.id) : undefined}
173
156
  />
174
157
  </div>
175
158
  ),
176
- [itemClassName, ctx, copyToClipboard],
159
+ [itemClassName, ctx, copyToClipboard, appearance],
177
160
  );
178
161
 
179
162
  const itemRenderer = renderItem ?? defaultRenderItem;