@neo4j-ndl/react 4.1.9 → 4.2.0

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 (487) hide show
  1. package/lib/cjs/ai/code-preview/CodePreview.js +91 -0
  2. package/lib/cjs/ai/code-preview/CodePreview.js.map +1 -0
  3. package/lib/cjs/ai/code-preview/index.js +26 -0
  4. package/lib/cjs/ai/code-preview/index.js.map +1 -0
  5. package/lib/cjs/ai/code-preview/stories/code-preview-languages.story.js +37 -0
  6. package/lib/cjs/ai/code-preview/stories/code-preview-languages.story.js.map +1 -0
  7. package/lib/cjs/ai/code-preview/stories/code-preview-loading.story.js +31 -0
  8. package/lib/cjs/ai/code-preview/stories/code-preview-loading.story.js.map +1 -0
  9. package/lib/cjs/ai/code-preview/stories/code-preview-read.story.js +36 -0
  10. package/lib/cjs/ai/code-preview/stories/code-preview-read.story.js.map +1 -0
  11. package/lib/cjs/ai/code-preview/stories/code-preview-write.story.js +36 -0
  12. package/lib/cjs/ai/code-preview/stories/code-preview-write.story.js.map +1 -0
  13. package/lib/cjs/ai/code-preview/stories/code-preview.stories.js +88 -0
  14. package/lib/cjs/ai/code-preview/stories/code-preview.stories.js.map +1 -0
  15. package/lib/cjs/ai/code-preview/stories/index.js +44 -0
  16. package/lib/cjs/ai/code-preview/stories/index.js.map +1 -0
  17. package/lib/cjs/ai/file-tag/FileTag.js +58 -0
  18. package/lib/cjs/ai/file-tag/FileTag.js.map +1 -0
  19. package/lib/cjs/ai/file-tag/index.js +38 -0
  20. package/lib/cjs/ai/file-tag/index.js.map +1 -0
  21. package/lib/cjs/ai/file-tag/stories/file-tag-chat.story.js +31 -0
  22. package/lib/cjs/ai/file-tag/stories/file-tag-chat.story.js.map +1 -0
  23. package/lib/cjs/ai/file-tag/stories/file-tag-loading.story.js +33 -0
  24. package/lib/cjs/ai/file-tag/stories/file-tag-loading.story.js.map +1 -0
  25. package/lib/cjs/ai/file-tag/stories/file-tag-prompt.story.js +33 -0
  26. package/lib/cjs/ai/file-tag/stories/file-tag-prompt.story.js.map +1 -0
  27. package/lib/cjs/ai/file-tag/stories/file-tag.stories.js +76 -0
  28. package/lib/cjs/ai/file-tag/stories/file-tag.stories.js.map +1 -0
  29. package/lib/cjs/ai/file-tag/stories/index.js +40 -0
  30. package/lib/cjs/ai/file-tag/stories/index.js.map +1 -0
  31. package/lib/cjs/ai/image-tag/ImageTag.js +58 -0
  32. package/lib/cjs/ai/image-tag/ImageTag.js.map +1 -0
  33. package/lib/cjs/ai/image-tag/index.js +38 -0
  34. package/lib/cjs/ai/image-tag/index.js.map +1 -0
  35. package/lib/cjs/ai/image-tag/stories/image-tag-chat.story.js +30 -0
  36. package/lib/cjs/ai/image-tag/stories/image-tag-chat.story.js.map +1 -0
  37. package/lib/cjs/ai/image-tag/stories/image-tag-loading.story.js +32 -0
  38. package/lib/cjs/ai/image-tag/stories/image-tag-loading.story.js.map +1 -0
  39. package/lib/cjs/ai/image-tag/stories/image-tag-prompt.story.js +32 -0
  40. package/lib/cjs/ai/image-tag/stories/image-tag-prompt.story.js.map +1 -0
  41. package/lib/cjs/ai/image-tag/stories/image-tag.stories.js +76 -0
  42. package/lib/cjs/ai/image-tag/stories/image-tag.stories.js.map +1 -0
  43. package/lib/cjs/ai/image-tag/stories/index.js +40 -0
  44. package/lib/cjs/ai/image-tag/stories/index.js.map +1 -0
  45. package/lib/cjs/ai/index.js +23 -1
  46. package/lib/cjs/ai/index.js.map +1 -1
  47. package/lib/cjs/ai/more-files/MoreFiles.js +55 -0
  48. package/lib/cjs/ai/more-files/MoreFiles.js.map +1 -0
  49. package/lib/cjs/ai/more-files/index.js +38 -0
  50. package/lib/cjs/ai/more-files/index.js.map +1 -0
  51. package/lib/cjs/ai/more-files/stories/index.js +32 -0
  52. package/lib/cjs/ai/more-files/stories/index.js.map +1 -0
  53. package/lib/cjs/ai/more-files/stories/more-files.stories.js +50 -0
  54. package/lib/cjs/ai/more-files/stories/more-files.stories.js.map +1 -0
  55. package/lib/cjs/ai/more-files/stories/more-files.story.js +35 -0
  56. package/lib/cjs/ai/more-files/stories/more-files.story.js.map +1 -0
  57. package/lib/cjs/ai/presence/Presence.js +5 -1
  58. package/lib/cjs/ai/presence/Presence.js.map +1 -1
  59. package/lib/cjs/ai/prompt/Prompt.js +163 -0
  60. package/lib/cjs/ai/prompt/Prompt.js.map +1 -0
  61. package/lib/cjs/ai/prompt/index.js +38 -0
  62. package/lib/cjs/ai/prompt/index.js.map +1 -0
  63. package/lib/cjs/ai/prompt/stories/index.js +36 -0
  64. package/lib/cjs/ai/prompt/stories/index.js.map +1 -0
  65. package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js +56 -0
  66. package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js.map +1 -0
  67. package/lib/cjs/ai/prompt/stories/prompt-default.story.js +40 -0
  68. package/lib/cjs/ai/prompt/stories/prompt-default.story.js.map +1 -0
  69. package/lib/cjs/ai/prompt/stories/prompt.stories.js +63 -0
  70. package/lib/cjs/ai/prompt/stories/prompt.stories.js.map +1 -0
  71. package/lib/cjs/ai/reasoning/Reasoning.js +77 -0
  72. package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -0
  73. package/lib/cjs/ai/reasoning/index.js +38 -0
  74. package/lib/cjs/ai/reasoning/index.js.map +1 -0
  75. package/lib/cjs/ai/reasoning/stories/index.js +32 -0
  76. package/lib/cjs/ai/reasoning/stories/index.js.map +1 -0
  77. package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js +34 -0
  78. package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js.map +1 -0
  79. package/lib/cjs/ai/reasoning/stories/reasoning.stories.js +50 -0
  80. package/lib/cjs/ai/reasoning/stories/reasoning.stories.js.map +1 -0
  81. package/lib/cjs/ai/response/Response.js +185 -0
  82. package/lib/cjs/ai/response/Response.js.map +1 -0
  83. package/lib/cjs/ai/response/index.js +26 -0
  84. package/lib/cjs/ai/response/index.js.map +1 -0
  85. package/lib/cjs/ai/response/stories/index.js +56 -0
  86. package/lib/cjs/ai/response/stories/index.js.map +1 -0
  87. package/lib/cjs/ai/response/stories/response-all-components.story.js +229 -0
  88. package/lib/cjs/ai/response/stories/response-all-components.story.js.map +1 -0
  89. package/lib/cjs/ai/response/stories/response-code-examples.story.js +248 -0
  90. package/lib/cjs/ai/response/stories/response-code-examples.story.js.map +1 -0
  91. package/lib/cjs/ai/response/stories/response-default.story.js +50 -0
  92. package/lib/cjs/ai/response/stories/response-default.story.js.map +1 -0
  93. package/lib/cjs/ai/response/stories/response-full-example.story.js +162 -0
  94. package/lib/cjs/ai/response/stories/response-full-example.story.js.map +1 -0
  95. package/lib/cjs/ai/response/stories/response-headings.story.js +120 -0
  96. package/lib/cjs/ai/response/stories/response-headings.story.js.map +1 -0
  97. package/lib/cjs/ai/response/stories/response-lists.story.js +170 -0
  98. package/lib/cjs/ai/response/stories/response-lists.story.js.map +1 -0
  99. package/lib/cjs/ai/response/stories/response-streaming.story.js +65 -0
  100. package/lib/cjs/ai/response/stories/response-streaming.story.js.map +1 -0
  101. package/lib/cjs/ai/response/stories/response.stories.js +132 -0
  102. package/lib/cjs/ai/response/stories/response.stories.js.map +1 -0
  103. package/lib/cjs/ai/suggestion/Suggestion.js +58 -0
  104. package/lib/cjs/ai/suggestion/Suggestion.js.map +1 -0
  105. package/lib/cjs/ai/suggestion/index.js +38 -0
  106. package/lib/cjs/ai/suggestion/index.js.map +1 -0
  107. package/lib/cjs/ai/suggestion/stories/index.js +44 -0
  108. package/lib/cjs/ai/suggestion/stories/index.js.map +1 -0
  109. package/lib/cjs/ai/suggestion/stories/suggestion-default.story.js +30 -0
  110. package/lib/cjs/ai/suggestion/stories/suggestion-default.story.js.map +1 -0
  111. package/lib/cjs/ai/suggestion/stories/suggestion-icon.story.js +31 -0
  112. package/lib/cjs/ai/suggestion/stories/suggestion-icon.story.js.map +1 -0
  113. package/lib/cjs/ai/suggestion/stories/suggestion-primary.story.js +30 -0
  114. package/lib/cjs/ai/suggestion/stories/suggestion-primary.story.js.map +1 -0
  115. package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js +30 -0
  116. package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -0
  117. package/lib/cjs/ai/suggestion/stories/suggestion.stories.js +89 -0
  118. package/lib/cjs/ai/suggestion/stories/suggestion.stories.js.map +1 -0
  119. package/lib/cjs/ai/thinking/Thinking.js +57 -0
  120. package/lib/cjs/ai/thinking/Thinking.js.map +1 -0
  121. package/lib/cjs/ai/thinking/index.js +38 -0
  122. package/lib/cjs/ai/thinking/index.js.map +1 -0
  123. package/lib/cjs/ai/thinking/stories/ai-thinking-default.story.js +30 -0
  124. package/lib/cjs/ai/thinking/stories/ai-thinking-default.story.js.map +1 -0
  125. package/lib/cjs/ai/thinking/stories/ai-thinking-finished.story.js +30 -0
  126. package/lib/cjs/ai/thinking/stories/ai-thinking-finished.story.js.map +1 -0
  127. package/lib/cjs/ai/thinking/stories/ai-thinking.stories.js +63 -0
  128. package/lib/cjs/ai/thinking/stories/ai-thinking.stories.js.map +1 -0
  129. package/lib/cjs/ai/thinking/stories/index.js +36 -0
  130. package/lib/cjs/ai/thinking/stories/index.js.map +1 -0
  131. package/lib/cjs/ai/thinking/thinking-duration-formatter.js +71 -0
  132. package/lib/cjs/ai/thinking/thinking-duration-formatter.js.map +1 -0
  133. package/lib/cjs/ai/tool-call/ToolCall.js +55 -0
  134. package/lib/cjs/ai/tool-call/ToolCall.js.map +1 -0
  135. package/lib/cjs/ai/tool-call/index.js +38 -0
  136. package/lib/cjs/ai/tool-call/index.js.map +1 -0
  137. package/lib/cjs/ai/tool-call/stories/index.js +36 -0
  138. package/lib/cjs/ai/tool-call/stories/index.js.map +1 -0
  139. package/lib/cjs/ai/tool-call/stories/tool-call-default.story.js +30 -0
  140. package/lib/cjs/ai/tool-call/stories/tool-call-default.story.js.map +1 -0
  141. package/lib/cjs/ai/tool-call/stories/tool-call-done.story.js +30 -0
  142. package/lib/cjs/ai/tool-call/stories/tool-call-done.story.js.map +1 -0
  143. package/lib/cjs/ai/tool-call/stories/tool-call.stories.js +63 -0
  144. package/lib/cjs/ai/tool-call/stories/tool-call.stories.js.map +1 -0
  145. package/lib/cjs/ai/user-bubble/UserBubble.js +53 -0
  146. package/lib/cjs/ai/user-bubble/UserBubble.js.map +1 -0
  147. package/lib/cjs/ai/user-bubble/index.js +38 -0
  148. package/lib/cjs/ai/user-bubble/index.js.map +1 -0
  149. package/lib/cjs/ai/user-bubble/stories/index.js +44 -0
  150. package/lib/cjs/ai/user-bubble/stories/index.js.map +1 -0
  151. package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js +35 -0
  152. package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -0
  153. package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js +39 -0
  154. package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -0
  155. package/lib/cjs/ai/user-bubble/stories/user-bubble-long.story.js +33 -0
  156. package/lib/cjs/ai/user-bubble/stories/user-bubble-long.story.js.map +1 -0
  157. package/lib/cjs/ai/user-bubble/stories/user-bubble.stories.js +89 -0
  158. package/lib/cjs/ai/user-bubble/stories/user-bubble.stories.js.map +1 -0
  159. package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js +34 -0
  160. package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js.map +1 -0
  161. package/lib/cjs/code/Code.js.map +1 -1
  162. package/lib/cjs/text-area/TextArea.js.map +1 -1
  163. package/lib/esm/ai/code-preview/CodePreview.js +84 -0
  164. package/lib/esm/ai/code-preview/CodePreview.js.map +1 -0
  165. package/lib/esm/ai/code-preview/index.js +22 -0
  166. package/lib/esm/ai/code-preview/index.js.map +1 -0
  167. package/lib/esm/ai/code-preview/stories/code-preview-languages.story.js +33 -0
  168. package/lib/esm/ai/code-preview/stories/code-preview-languages.story.js.map +1 -0
  169. package/lib/esm/ai/code-preview/stories/code-preview-loading.story.js +27 -0
  170. package/lib/esm/ai/code-preview/stories/code-preview-loading.story.js.map +1 -0
  171. package/lib/esm/ai/code-preview/stories/code-preview-read.story.js +32 -0
  172. package/lib/esm/ai/code-preview/stories/code-preview-read.story.js.map +1 -0
  173. package/lib/esm/ai/code-preview/stories/code-preview-write.story.js +32 -0
  174. package/lib/esm/ai/code-preview/stories/code-preview-write.story.js.map +1 -0
  175. package/lib/esm/ai/code-preview/stories/code-preview.stories.js +85 -0
  176. package/lib/esm/ai/code-preview/stories/code-preview.stories.js.map +1 -0
  177. package/lib/esm/ai/code-preview/stories/index.js +34 -0
  178. package/lib/esm/ai/code-preview/stories/index.js.map +1 -0
  179. package/lib/esm/ai/file-tag/FileTag.js +52 -0
  180. package/lib/esm/ai/file-tag/FileTag.js.map +1 -0
  181. package/lib/esm/ai/file-tag/index.js +22 -0
  182. package/lib/esm/ai/file-tag/index.js.map +1 -0
  183. package/lib/esm/ai/file-tag/stories/file-tag-chat.story.js +29 -0
  184. package/lib/esm/ai/file-tag/stories/file-tag-chat.story.js.map +1 -0
  185. package/lib/esm/ai/file-tag/stories/file-tag-loading.story.js +31 -0
  186. package/lib/esm/ai/file-tag/stories/file-tag-loading.story.js.map +1 -0
  187. package/lib/esm/ai/file-tag/stories/file-tag-prompt.story.js +31 -0
  188. package/lib/esm/ai/file-tag/stories/file-tag-prompt.story.js.map +1 -0
  189. package/lib/esm/ai/file-tag/stories/file-tag.stories.js +73 -0
  190. package/lib/esm/ai/file-tag/stories/file-tag.stories.js.map +1 -0
  191. package/lib/esm/ai/file-tag/stories/index.js +31 -0
  192. package/lib/esm/ai/file-tag/stories/index.js.map +1 -0
  193. package/lib/esm/ai/image-tag/ImageTag.js +52 -0
  194. package/lib/esm/ai/image-tag/ImageTag.js.map +1 -0
  195. package/lib/esm/ai/image-tag/index.js +22 -0
  196. package/lib/esm/ai/image-tag/index.js.map +1 -0
  197. package/lib/esm/ai/image-tag/stories/image-tag-chat.story.js +28 -0
  198. package/lib/esm/ai/image-tag/stories/image-tag-chat.story.js.map +1 -0
  199. package/lib/esm/ai/image-tag/stories/image-tag-loading.story.js +30 -0
  200. package/lib/esm/ai/image-tag/stories/image-tag-loading.story.js.map +1 -0
  201. package/lib/esm/ai/image-tag/stories/image-tag-prompt.story.js +30 -0
  202. package/lib/esm/ai/image-tag/stories/image-tag-prompt.story.js.map +1 -0
  203. package/lib/esm/ai/image-tag/stories/image-tag.stories.js +73 -0
  204. package/lib/esm/ai/image-tag/stories/image-tag.stories.js.map +1 -0
  205. package/lib/esm/ai/image-tag/stories/index.js +31 -0
  206. package/lib/esm/ai/image-tag/stories/index.js.map +1 -0
  207. package/lib/esm/ai/index.js +11 -0
  208. package/lib/esm/ai/index.js.map +1 -1
  209. package/lib/esm/ai/more-files/MoreFiles.js +49 -0
  210. package/lib/esm/ai/more-files/MoreFiles.js.map +1 -0
  211. package/lib/esm/ai/more-files/index.js +22 -0
  212. package/lib/esm/ai/more-files/index.js.map +1 -0
  213. package/lib/esm/ai/more-files/stories/index.js +25 -0
  214. package/lib/esm/ai/more-files/stories/index.js.map +1 -0
  215. package/lib/esm/ai/more-files/stories/more-files.stories.js +47 -0
  216. package/lib/esm/ai/more-files/stories/more-files.stories.js.map +1 -0
  217. package/lib/esm/ai/more-files/stories/more-files.story.js +33 -0
  218. package/lib/esm/ai/more-files/stories/more-files.story.js.map +1 -0
  219. package/lib/esm/ai/presence/Presence.js +5 -1
  220. package/lib/esm/ai/presence/Presence.js.map +1 -1
  221. package/lib/esm/ai/prompt/Prompt.js +157 -0
  222. package/lib/esm/ai/prompt/Prompt.js.map +1 -0
  223. package/lib/esm/ai/prompt/index.js +22 -0
  224. package/lib/esm/ai/prompt/index.js.map +1 -0
  225. package/lib/esm/ai/prompt/stories/index.js +28 -0
  226. package/lib/esm/ai/prompt/stories/index.js.map +1 -0
  227. package/lib/esm/ai/prompt/stories/prompt-advanced.story.js +54 -0
  228. package/lib/esm/ai/prompt/stories/prompt-advanced.story.js.map +1 -0
  229. package/lib/esm/ai/prompt/stories/prompt-default.story.js +38 -0
  230. package/lib/esm/ai/prompt/stories/prompt-default.story.js.map +1 -0
  231. package/lib/esm/ai/prompt/stories/prompt.stories.js +60 -0
  232. package/lib/esm/ai/prompt/stories/prompt.stories.js.map +1 -0
  233. package/lib/esm/ai/reasoning/Reasoning.js +71 -0
  234. package/lib/esm/ai/reasoning/Reasoning.js.map +1 -0
  235. package/lib/esm/ai/reasoning/index.js +22 -0
  236. package/lib/esm/ai/reasoning/index.js.map +1 -0
  237. package/lib/esm/ai/reasoning/stories/index.js +25 -0
  238. package/lib/esm/ai/reasoning/stories/index.js.map +1 -0
  239. package/lib/esm/ai/reasoning/stories/reasoning-full.story.js +32 -0
  240. package/lib/esm/ai/reasoning/stories/reasoning-full.story.js.map +1 -0
  241. package/lib/esm/ai/reasoning/stories/reasoning.stories.js +47 -0
  242. package/lib/esm/ai/reasoning/stories/reasoning.stories.js.map +1 -0
  243. package/lib/esm/ai/response/Response.js +179 -0
  244. package/lib/esm/ai/response/Response.js.map +1 -0
  245. package/lib/esm/ai/response/index.js +22 -0
  246. package/lib/esm/ai/response/index.js.map +1 -0
  247. package/lib/esm/ai/response/stories/index.js +43 -0
  248. package/lib/esm/ai/response/stories/index.js.map +1 -0
  249. package/lib/esm/ai/response/stories/response-all-components.story.js +225 -0
  250. package/lib/esm/ai/response/stories/response-all-components.story.js.map +1 -0
  251. package/lib/esm/ai/response/stories/response-code-examples.story.js +244 -0
  252. package/lib/esm/ai/response/stories/response-code-examples.story.js.map +1 -0
  253. package/lib/esm/ai/response/stories/response-default.story.js +46 -0
  254. package/lib/esm/ai/response/stories/response-default.story.js.map +1 -0
  255. package/lib/esm/ai/response/stories/response-full-example.story.js +158 -0
  256. package/lib/esm/ai/response/stories/response-full-example.story.js.map +1 -0
  257. package/lib/esm/ai/response/stories/response-headings.story.js +116 -0
  258. package/lib/esm/ai/response/stories/response-headings.story.js.map +1 -0
  259. package/lib/esm/ai/response/stories/response-lists.story.js +166 -0
  260. package/lib/esm/ai/response/stories/response-lists.story.js.map +1 -0
  261. package/lib/esm/ai/response/stories/response-streaming.story.js +61 -0
  262. package/lib/esm/ai/response/stories/response-streaming.story.js.map +1 -0
  263. package/lib/esm/ai/response/stories/response.stories.js +129 -0
  264. package/lib/esm/ai/response/stories/response.stories.js.map +1 -0
  265. package/lib/esm/ai/suggestion/Suggestion.js +52 -0
  266. package/lib/esm/ai/suggestion/Suggestion.js.map +1 -0
  267. package/lib/esm/ai/suggestion/index.js +22 -0
  268. package/lib/esm/ai/suggestion/index.js.map +1 -0
  269. package/lib/esm/ai/suggestion/stories/index.js +34 -0
  270. package/lib/esm/ai/suggestion/stories/index.js.map +1 -0
  271. package/lib/esm/ai/suggestion/stories/suggestion-default.story.js +28 -0
  272. package/lib/esm/ai/suggestion/stories/suggestion-default.story.js.map +1 -0
  273. package/lib/esm/ai/suggestion/stories/suggestion-icon.story.js +29 -0
  274. package/lib/esm/ai/suggestion/stories/suggestion-icon.story.js.map +1 -0
  275. package/lib/esm/ai/suggestion/stories/suggestion-primary.story.js +28 -0
  276. package/lib/esm/ai/suggestion/stories/suggestion-primary.story.js.map +1 -0
  277. package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js +28 -0
  278. package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -0
  279. package/lib/esm/ai/suggestion/stories/suggestion.stories.js +86 -0
  280. package/lib/esm/ai/suggestion/stories/suggestion.stories.js.map +1 -0
  281. package/lib/esm/ai/thinking/Thinking.js +51 -0
  282. package/lib/esm/ai/thinking/Thinking.js.map +1 -0
  283. package/lib/esm/ai/thinking/index.js +22 -0
  284. package/lib/esm/ai/thinking/index.js.map +1 -0
  285. package/lib/esm/ai/thinking/stories/ai-thinking-default.story.js +28 -0
  286. package/lib/esm/ai/thinking/stories/ai-thinking-default.story.js.map +1 -0
  287. package/lib/esm/ai/thinking/stories/ai-thinking-finished.story.js +28 -0
  288. package/lib/esm/ai/thinking/stories/ai-thinking-finished.story.js.map +1 -0
  289. package/lib/esm/ai/thinking/stories/ai-thinking.stories.js +60 -0
  290. package/lib/esm/ai/thinking/stories/ai-thinking.stories.js.map +1 -0
  291. package/lib/esm/ai/thinking/stories/index.js +28 -0
  292. package/lib/esm/ai/thinking/stories/index.js.map +1 -0
  293. package/lib/esm/ai/thinking/thinking-duration-formatter.js +67 -0
  294. package/lib/esm/ai/thinking/thinking-duration-formatter.js.map +1 -0
  295. package/lib/esm/ai/tool-call/ToolCall.js +49 -0
  296. package/lib/esm/ai/tool-call/ToolCall.js.map +1 -0
  297. package/lib/esm/ai/tool-call/index.js +22 -0
  298. package/lib/esm/ai/tool-call/index.js.map +1 -0
  299. package/lib/esm/ai/tool-call/stories/index.js +28 -0
  300. package/lib/esm/ai/tool-call/stories/index.js.map +1 -0
  301. package/lib/esm/ai/tool-call/stories/tool-call-default.story.js +28 -0
  302. package/lib/esm/ai/tool-call/stories/tool-call-default.story.js.map +1 -0
  303. package/lib/esm/ai/tool-call/stories/tool-call-done.story.js +28 -0
  304. package/lib/esm/ai/tool-call/stories/tool-call-done.story.js.map +1 -0
  305. package/lib/esm/ai/tool-call/stories/tool-call.stories.js +60 -0
  306. package/lib/esm/ai/tool-call/stories/tool-call.stories.js.map +1 -0
  307. package/lib/esm/ai/user-bubble/UserBubble.js +47 -0
  308. package/lib/esm/ai/user-bubble/UserBubble.js.map +1 -0
  309. package/lib/esm/ai/user-bubble/index.js +22 -0
  310. package/lib/esm/ai/user-bubble/index.js.map +1 -0
  311. package/lib/esm/ai/user-bubble/stories/index.js +34 -0
  312. package/lib/esm/ai/user-bubble/stories/index.js.map +1 -0
  313. package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js +33 -0
  314. package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -0
  315. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js +37 -0
  316. package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -0
  317. package/lib/esm/ai/user-bubble/stories/user-bubble-long.story.js +31 -0
  318. package/lib/esm/ai/user-bubble/stories/user-bubble-long.story.js.map +1 -0
  319. package/lib/esm/ai/user-bubble/stories/user-bubble.stories.js +86 -0
  320. package/lib/esm/ai/user-bubble/stories/user-bubble.stories.js.map +1 -0
  321. package/lib/esm/ai/user-bubble/stories/user-bubble.story.js +32 -0
  322. package/lib/esm/ai/user-bubble/stories/user-bubble.story.js.map +1 -0
  323. package/lib/esm/code/Code.js.map +1 -1
  324. package/lib/esm/text-area/TextArea.js.map +1 -1
  325. package/lib/types/ai/code-preview/CodePreview.d.ts +44 -0
  326. package/lib/types/ai/code-preview/CodePreview.d.ts.map +1 -0
  327. package/lib/types/ai/code-preview/index.d.ts +22 -0
  328. package/lib/types/ai/code-preview/index.d.ts.map +1 -0
  329. package/lib/types/ai/code-preview/stories/code-preview-languages.story.d.ts +23 -0
  330. package/lib/types/ai/code-preview/stories/code-preview-languages.story.d.ts.map +1 -0
  331. package/lib/types/ai/code-preview/stories/code-preview-loading.story.d.ts +23 -0
  332. package/lib/types/ai/code-preview/stories/code-preview-loading.story.d.ts.map +1 -0
  333. package/lib/types/ai/code-preview/stories/code-preview-read.story.d.ts +23 -0
  334. package/lib/types/ai/code-preview/stories/code-preview-read.story.d.ts.map +1 -0
  335. package/lib/types/ai/code-preview/stories/code-preview-write.story.d.ts +23 -0
  336. package/lib/types/ai/code-preview/stories/code-preview-write.story.d.ts.map +1 -0
  337. package/lib/types/ai/code-preview/stories/code-preview.stories.d.ts +30 -0
  338. package/lib/types/ai/code-preview/stories/code-preview.stories.d.ts.map +1 -0
  339. package/lib/types/ai/code-preview/stories/index.d.ts +29 -0
  340. package/lib/types/ai/code-preview/stories/index.d.ts.map +1 -0
  341. package/lib/types/ai/file-tag/FileTag.d.ts +44 -0
  342. package/lib/types/ai/file-tag/FileTag.d.ts.map +1 -0
  343. package/lib/types/ai/file-tag/index.d.ts +22 -0
  344. package/lib/types/ai/file-tag/index.d.ts.map +1 -0
  345. package/lib/types/ai/file-tag/stories/file-tag-chat.story.d.ts +24 -0
  346. package/lib/types/ai/file-tag/stories/file-tag-chat.story.d.ts.map +1 -0
  347. package/lib/types/ai/file-tag/stories/file-tag-loading.story.d.ts +24 -0
  348. package/lib/types/ai/file-tag/stories/file-tag-loading.story.d.ts.map +1 -0
  349. package/lib/types/ai/file-tag/stories/file-tag-prompt.story.d.ts +24 -0
  350. package/lib/types/ai/file-tag/stories/file-tag-prompt.story.d.ts.map +1 -0
  351. package/lib/types/ai/file-tag/stories/file-tag.stories.d.ts +29 -0
  352. package/lib/types/ai/file-tag/stories/file-tag.stories.d.ts.map +1 -0
  353. package/lib/types/ai/file-tag/stories/index.d.ts +27 -0
  354. package/lib/types/ai/file-tag/stories/index.d.ts.map +1 -0
  355. package/lib/types/ai/image-tag/ImageTag.d.ts +46 -0
  356. package/lib/types/ai/image-tag/ImageTag.d.ts.map +1 -0
  357. package/lib/types/ai/image-tag/index.d.ts +22 -0
  358. package/lib/types/ai/image-tag/index.d.ts.map +1 -0
  359. package/lib/types/ai/image-tag/stories/image-tag-chat.story.d.ts +24 -0
  360. package/lib/types/ai/image-tag/stories/image-tag-chat.story.d.ts.map +1 -0
  361. package/lib/types/ai/image-tag/stories/image-tag-loading.story.d.ts +24 -0
  362. package/lib/types/ai/image-tag/stories/image-tag-loading.story.d.ts.map +1 -0
  363. package/lib/types/ai/image-tag/stories/image-tag-prompt.story.d.ts +24 -0
  364. package/lib/types/ai/image-tag/stories/image-tag-prompt.story.d.ts.map +1 -0
  365. package/lib/types/ai/image-tag/stories/image-tag.stories.d.ts +29 -0
  366. package/lib/types/ai/image-tag/stories/image-tag.stories.d.ts.map +1 -0
  367. package/lib/types/ai/image-tag/stories/index.d.ts +27 -0
  368. package/lib/types/ai/image-tag/stories/index.d.ts.map +1 -0
  369. package/lib/types/ai/index.d.ts +11 -0
  370. package/lib/types/ai/index.d.ts.map +1 -1
  371. package/lib/types/ai/more-files/MoreFiles.d.ts +38 -0
  372. package/lib/types/ai/more-files/MoreFiles.d.ts.map +1 -0
  373. package/lib/types/ai/more-files/index.d.ts +22 -0
  374. package/lib/types/ai/more-files/index.d.ts.map +1 -0
  375. package/lib/types/ai/more-files/stories/index.d.ts +23 -0
  376. package/lib/types/ai/more-files/stories/index.d.ts.map +1 -0
  377. package/lib/types/ai/more-files/stories/more-files.stories.d.ts +27 -0
  378. package/lib/types/ai/more-files/stories/more-files.stories.d.ts.map +1 -0
  379. package/lib/types/ai/more-files/stories/more-files.story.d.ts +24 -0
  380. package/lib/types/ai/more-files/stories/more-files.story.d.ts.map +1 -0
  381. package/lib/types/ai/presence/Presence.d.ts.map +1 -1
  382. package/lib/types/ai/prompt/Prompt.d.ts +62 -0
  383. package/lib/types/ai/prompt/Prompt.d.ts.map +1 -0
  384. package/lib/types/ai/prompt/index.d.ts +22 -0
  385. package/lib/types/ai/prompt/index.d.ts.map +1 -0
  386. package/lib/types/ai/prompt/stories/index.d.ts +25 -0
  387. package/lib/types/ai/prompt/stories/index.d.ts.map +1 -0
  388. package/lib/types/ai/prompt/stories/prompt-advanced.story.d.ts +24 -0
  389. package/lib/types/ai/prompt/stories/prompt-advanced.story.d.ts.map +1 -0
  390. package/lib/types/ai/prompt/stories/prompt-default.story.d.ts +24 -0
  391. package/lib/types/ai/prompt/stories/prompt-default.story.d.ts.map +1 -0
  392. package/lib/types/ai/prompt/stories/prompt.stories.d.ts +28 -0
  393. package/lib/types/ai/prompt/stories/prompt.stories.d.ts.map +1 -0
  394. package/lib/types/ai/reasoning/Reasoning.d.ts +44 -0
  395. package/lib/types/ai/reasoning/Reasoning.d.ts.map +1 -0
  396. package/lib/types/ai/reasoning/index.d.ts +22 -0
  397. package/lib/types/ai/reasoning/index.d.ts.map +1 -0
  398. package/lib/types/ai/reasoning/stories/index.d.ts +23 -0
  399. package/lib/types/ai/reasoning/stories/index.d.ts.map +1 -0
  400. package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts +24 -0
  401. package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts.map +1 -0
  402. package/lib/types/ai/reasoning/stories/reasoning.stories.d.ts +27 -0
  403. package/lib/types/ai/reasoning/stories/reasoning.stories.d.ts.map +1 -0
  404. package/lib/types/ai/response/Response.d.ts +37 -0
  405. package/lib/types/ai/response/Response.d.ts.map +1 -0
  406. package/lib/types/ai/response/index.d.ts +22 -0
  407. package/lib/types/ai/response/index.d.ts.map +1 -0
  408. package/lib/types/ai/response/stories/index.d.ts +35 -0
  409. package/lib/types/ai/response/stories/index.d.ts.map +1 -0
  410. package/lib/types/ai/response/stories/response-all-components.story.d.ts +24 -0
  411. package/lib/types/ai/response/stories/response-all-components.story.d.ts.map +1 -0
  412. package/lib/types/ai/response/stories/response-code-examples.story.d.ts +24 -0
  413. package/lib/types/ai/response/stories/response-code-examples.story.d.ts.map +1 -0
  414. package/lib/types/ai/response/stories/response-default.story.d.ts +23 -0
  415. package/lib/types/ai/response/stories/response-default.story.d.ts.map +1 -0
  416. package/lib/types/ai/response/stories/response-full-example.story.d.ts +24 -0
  417. package/lib/types/ai/response/stories/response-full-example.story.d.ts.map +1 -0
  418. package/lib/types/ai/response/stories/response-headings.story.d.ts +24 -0
  419. package/lib/types/ai/response/stories/response-headings.story.d.ts.map +1 -0
  420. package/lib/types/ai/response/stories/response-lists.story.d.ts +24 -0
  421. package/lib/types/ai/response/stories/response-lists.story.d.ts.map +1 -0
  422. package/lib/types/ai/response/stories/response-streaming.story.d.ts +23 -0
  423. package/lib/types/ai/response/stories/response-streaming.story.d.ts.map +1 -0
  424. package/lib/types/ai/response/stories/response.stories.d.ts +33 -0
  425. package/lib/types/ai/response/stories/response.stories.d.ts.map +1 -0
  426. package/lib/types/ai/suggestion/Suggestion.d.ts +42 -0
  427. package/lib/types/ai/suggestion/Suggestion.d.ts.map +1 -0
  428. package/lib/types/ai/suggestion/index.d.ts +22 -0
  429. package/lib/types/ai/suggestion/index.d.ts.map +1 -0
  430. package/lib/types/ai/suggestion/stories/index.d.ts +29 -0
  431. package/lib/types/ai/suggestion/stories/index.d.ts.map +1 -0
  432. package/lib/types/ai/suggestion/stories/suggestion-default.story.d.ts +24 -0
  433. package/lib/types/ai/suggestion/stories/suggestion-default.story.d.ts.map +1 -0
  434. package/lib/types/ai/suggestion/stories/suggestion-icon.story.d.ts +24 -0
  435. package/lib/types/ai/suggestion/stories/suggestion-icon.story.d.ts.map +1 -0
  436. package/lib/types/ai/suggestion/stories/suggestion-primary.story.d.ts +24 -0
  437. package/lib/types/ai/suggestion/stories/suggestion-primary.story.d.ts.map +1 -0
  438. package/lib/types/ai/suggestion/stories/suggestion-sizes.story.d.ts +24 -0
  439. package/lib/types/ai/suggestion/stories/suggestion-sizes.story.d.ts.map +1 -0
  440. package/lib/types/ai/suggestion/stories/suggestion.stories.d.ts +30 -0
  441. package/lib/types/ai/suggestion/stories/suggestion.stories.d.ts.map +1 -0
  442. package/lib/types/ai/thinking/Thinking.d.ts +40 -0
  443. package/lib/types/ai/thinking/Thinking.d.ts.map +1 -0
  444. package/lib/types/ai/thinking/index.d.ts +22 -0
  445. package/lib/types/ai/thinking/index.d.ts.map +1 -0
  446. package/lib/types/ai/thinking/stories/ai-thinking-default.story.d.ts +24 -0
  447. package/lib/types/ai/thinking/stories/ai-thinking-default.story.d.ts.map +1 -0
  448. package/lib/types/ai/thinking/stories/ai-thinking-finished.story.d.ts +24 -0
  449. package/lib/types/ai/thinking/stories/ai-thinking-finished.story.d.ts.map +1 -0
  450. package/lib/types/ai/thinking/stories/ai-thinking.stories.d.ts +28 -0
  451. package/lib/types/ai/thinking/stories/ai-thinking.stories.d.ts.map +1 -0
  452. package/lib/types/ai/thinking/stories/index.d.ts +25 -0
  453. package/lib/types/ai/thinking/stories/index.d.ts.map +1 -0
  454. package/lib/types/ai/thinking/thinking-duration-formatter.d.ts +45 -0
  455. package/lib/types/ai/thinking/thinking-duration-formatter.d.ts.map +1 -0
  456. package/lib/types/ai/tool-call/ToolCall.d.ts +37 -0
  457. package/lib/types/ai/tool-call/ToolCall.d.ts.map +1 -0
  458. package/lib/types/ai/tool-call/index.d.ts +22 -0
  459. package/lib/types/ai/tool-call/index.d.ts.map +1 -0
  460. package/lib/types/ai/tool-call/stories/index.d.ts +25 -0
  461. package/lib/types/ai/tool-call/stories/index.d.ts.map +1 -0
  462. package/lib/types/ai/tool-call/stories/tool-call-default.story.d.ts +24 -0
  463. package/lib/types/ai/tool-call/stories/tool-call-default.story.d.ts.map +1 -0
  464. package/lib/types/ai/tool-call/stories/tool-call-done.story.d.ts +24 -0
  465. package/lib/types/ai/tool-call/stories/tool-call-done.story.d.ts.map +1 -0
  466. package/lib/types/ai/tool-call/stories/tool-call.stories.d.ts +28 -0
  467. package/lib/types/ai/tool-call/stories/tool-call.stories.d.ts.map +1 -0
  468. package/lib/types/ai/user-bubble/UserBubble.d.ts +39 -0
  469. package/lib/types/ai/user-bubble/UserBubble.d.ts.map +1 -0
  470. package/lib/types/ai/user-bubble/index.d.ts +22 -0
  471. package/lib/types/ai/user-bubble/index.d.ts.map +1 -0
  472. package/lib/types/ai/user-bubble/stories/index.d.ts +29 -0
  473. package/lib/types/ai/user-bubble/stories/index.d.ts.map +1 -0
  474. package/lib/types/ai/user-bubble/stories/user-bubble-action.story.d.ts +24 -0
  475. package/lib/types/ai/user-bubble/stories/user-bubble-action.story.d.ts.map +1 -0
  476. package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts +24 -0
  477. package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts.map +1 -0
  478. package/lib/types/ai/user-bubble/stories/user-bubble-long.story.d.ts +24 -0
  479. package/lib/types/ai/user-bubble/stories/user-bubble-long.story.d.ts.map +1 -0
  480. package/lib/types/ai/user-bubble/stories/user-bubble.stories.d.ts +30 -0
  481. package/lib/types/ai/user-bubble/stories/user-bubble.stories.d.ts.map +1 -0
  482. package/lib/types/ai/user-bubble/stories/user-bubble.story.d.ts +24 -0
  483. package/lib/types/ai/user-bubble/stories/user-bubble.story.d.ts.map +1 -0
  484. package/lib/types/code/Code.d.ts +4 -1
  485. package/lib/types/code/Code.d.ts.map +1 -1
  486. package/lib/types/text-area/TextArea.d.ts.map +1 -1
  487. package/package.json +3 -2
@@ -0,0 +1,248 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Component = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const ai_1 = require("@neo4j-ndl/react/ai");
26
+ const codeExamplesMarkdown = `
27
+ # Code Examples
28
+
29
+ This story focuses on different code rendering capabilities.
30
+
31
+ ## Multiple Programming Languages
32
+
33
+ ### JavaScript
34
+
35
+ \`\`\`javascript
36
+ // Array methods
37
+ const numbers = [1, 2, 3, 4, 5];
38
+ const doubled = numbers.map(n => n * 2);
39
+ const sum = numbers.reduce((acc, n) => acc + n, 0);
40
+
41
+ console.log('Doubled:', doubled);
42
+ console.log('Sum:', sum);
43
+ \`\`\`
44
+
45
+ ### TypeScript
46
+
47
+ \`\`\`typescript
48
+ // Generics
49
+ function identity<T>(arg: T): T {
50
+ return arg;
51
+ }
52
+
53
+ const result = identity<string>("Hello");
54
+ const num = identity(42);
55
+ \`\`\`
56
+
57
+ ### Python
58
+
59
+ \`\`\`python
60
+ # List comprehension
61
+ squares = [x**2 for x in range(10)]
62
+ evens = [x for x in range(20) if x % 2 == 0]
63
+
64
+ # Dictionary comprehension
65
+ square_dict = {x: x**2 for x in range(5)}
66
+
67
+ print(f"Squares: {squares}")
68
+ print(f"Evens: {evens}")
69
+ \`\`\`
70
+
71
+ ### Cypher
72
+
73
+ \`\`\`cypher
74
+ // Create nodes and relationships
75
+ CREATE (alice:Person {name: 'Alice', age: 30})
76
+ CREATE (bob:Person {name: 'Bob', age: 25})
77
+ CREATE (alice)-[:KNOWS {since: 2020}]->(bob)
78
+ RETURN alice, bob
79
+ \`\`\`
80
+
81
+ ### SQL
82
+
83
+ \`\`\`sql
84
+ -- Complex query
85
+ SELECT
86
+ u.name,
87
+ COUNT(o.id) as order_count,
88
+ SUM(o.total) as total_spent
89
+ FROM users u
90
+ LEFT JOIN orders o ON u.id = o.user_id
91
+ WHERE u.active = true
92
+ GROUP BY u.id, u.name
93
+ HAVING COUNT(o.id) > 5
94
+ ORDER BY total_spent DESC
95
+ LIMIT 10;
96
+ \`\`\`
97
+
98
+ ### Rust
99
+
100
+ \`\`\`rust
101
+ // Pattern matching
102
+ fn describe_number(n: i32) -> String {
103
+ match n {
104
+ 0 => "zero".to_string(),
105
+ 1..=10 => "small".to_string(),
106
+ 11..=100 => "medium".to_string(),
107
+ _ => "large".to_string(),
108
+ }
109
+ }
110
+ \`\`\`
111
+
112
+ ### Go
113
+
114
+ \`\`\`go
115
+ // Goroutines and channels
116
+ func worker(id int, jobs <-chan int, results chan<- int) {
117
+ for j := range jobs {
118
+ fmt.Printf("worker %d processing job %d\\n", id, j)
119
+ results <- j * 2
120
+ }
121
+ }
122
+ \`\`\`
123
+
124
+ ### JSON
125
+
126
+ \`\`\`json
127
+ {
128
+ "name": "Response Component",
129
+ "version": "1.0.0",
130
+ "features": [
131
+ "markdown rendering",
132
+ "syntax highlighting",
133
+ "streaming support"
134
+ ],
135
+ "config": {
136
+ "theme": "dark",
137
+ "lineNumbers": true
138
+ }
139
+ }
140
+ \`\`\`
141
+
142
+ ### YAML
143
+
144
+ \`\`\`yaml
145
+ # Configuration file
146
+ app:
147
+ name: MyApp
148
+ version: 1.0.0
149
+ port: 3000
150
+
151
+ database:
152
+ host: localhost
153
+ port: 5432
154
+ credentials:
155
+ username: admin
156
+ password: secret
157
+
158
+ features:
159
+ - authentication
160
+ - logging
161
+ - caching
162
+ \`\`\`
163
+
164
+ ### Shell/Bash
165
+
166
+ \`\`\`bash
167
+ #!/bin/bash
168
+
169
+ # Deploy script
170
+ echo "Starting deployment..."
171
+
172
+ npm install
173
+ npm run build
174
+ npm test
175
+
176
+ if [ $? -eq 0 ]; then
177
+ echo "Deployment successful!"
178
+ else
179
+ echo "Deployment failed!"
180
+ exit 1
181
+ fi
182
+ \`\`\`
183
+
184
+ ## Inline Code
185
+
186
+ You can use inline code like \`const x = 5\`, \`npm install\`, or \`SELECT * FROM users\` within sentences.
187
+
188
+ Mixed with text: The \`Array.map()\` method creates a new array and the \`filter()\` method filters elements.
189
+
190
+ ## Code Without Language
191
+
192
+ \`\`\`
193
+ Plain text code block
194
+ No syntax highlighting
195
+ Just monospace font
196
+ \`\`\`
197
+
198
+ ## Long Code Blocks
199
+
200
+ \`\`\`javascript
201
+ // Complex React component
202
+ import React, { useState, useEffect, useCallback } from 'react';
203
+
204
+ const UserDashboard = ({ userId }) => {
205
+ const [user, setUser] = useState(null);
206
+ const [loading, setLoading] = useState(true);
207
+ const [error, setError] = useState(null);
208
+
209
+ const fetchUser = useCallback(async () => {
210
+ try {
211
+ setLoading(true);
212
+ const response = await fetch(\`/api/users/\${userId}\`);
213
+ if (!response.ok) throw new Error('Failed to fetch user');
214
+ const data = await response.json();
215
+ setUser(data);
216
+ } catch (err) {
217
+ setError(err.message);
218
+ } finally {
219
+ setLoading(false);
220
+ }
221
+ }, [userId]);
222
+
223
+ useEffect(() => {
224
+ fetchUser();
225
+ }, [fetchUser]);
226
+
227
+ if (loading) return <div>Loading...</div>;
228
+ if (error) return <div>Error: {error}</div>;
229
+ if (!user) return <div>No user found</div>;
230
+
231
+ return (
232
+ <div className="dashboard">
233
+ <h1>{user.name}</h1>
234
+ <p>Email: {user.email}</p>
235
+ <button onClick={fetchUser}>Refresh</button>
236
+ </div>
237
+ );
238
+ };
239
+
240
+ export default UserDashboard;
241
+ \`\`\`
242
+ `;
243
+ const Component = () => {
244
+ return ((0, jsx_runtime_1.jsx)("div", { className: "max-w-4xl", children: (0, jsx_runtime_1.jsx)(ai_1.Response, { children: codeExamplesMarkdown }) }));
245
+ };
246
+ exports.Component = Component;
247
+ exports.default = exports.Component;
248
+ //# sourceMappingURL=response-code-examples.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-code-examples.story.js","sourceRoot":"","sources":["../../../../../src/ai/response/stories/response-code-examples.story.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAA+C;AAE/C,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwN5B,CAAC;AAEK,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,CACL,gCAAK,SAAS,EAAC,WAAW,YACxB,uBAAC,aAAQ,cAAE,oBAAoB,GAAY,GACvC,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,SAAS,aAMpB;AAEF,kBAAe,iBAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Response } from '@neo4j-ndl/react/ai';\n\nconst codeExamplesMarkdown = `\n# Code Examples\n\nThis story focuses on different code rendering capabilities.\n\n## Multiple Programming Languages\n\n### JavaScript\n\n\\`\\`\\`javascript\n// Array methods\nconst numbers = [1, 2, 3, 4, 5];\nconst doubled = numbers.map(n => n * 2);\nconst sum = numbers.reduce((acc, n) => acc + n, 0);\n\nconsole.log('Doubled:', doubled);\nconsole.log('Sum:', sum);\n\\`\\`\\`\n\n### TypeScript\n\n\\`\\`\\`typescript\n// Generics\nfunction identity<T>(arg: T): T {\n return arg;\n}\n\nconst result = identity<string>(\"Hello\");\nconst num = identity(42);\n\\`\\`\\`\n\n### Python\n\n\\`\\`\\`python\n# List comprehension\nsquares = [x**2 for x in range(10)]\nevens = [x for x in range(20) if x % 2 == 0]\n\n# Dictionary comprehension\nsquare_dict = {x: x**2 for x in range(5)}\n\nprint(f\"Squares: {squares}\")\nprint(f\"Evens: {evens}\")\n\\`\\`\\`\n\n### Cypher\n\n\\`\\`\\`cypher\n// Create nodes and relationships\nCREATE (alice:Person {name: 'Alice', age: 30})\nCREATE (bob:Person {name: 'Bob', age: 25})\nCREATE (alice)-[:KNOWS {since: 2020}]->(bob)\nRETURN alice, bob\n\\`\\`\\`\n\n### SQL\n\n\\`\\`\\`sql\n-- Complex query\nSELECT \n u.name,\n COUNT(o.id) as order_count,\n SUM(o.total) as total_spent\nFROM users u\nLEFT JOIN orders o ON u.id = o.user_id\nWHERE u.active = true\nGROUP BY u.id, u.name\nHAVING COUNT(o.id) > 5\nORDER BY total_spent DESC\nLIMIT 10;\n\\`\\`\\`\n\n### Rust\n\n\\`\\`\\`rust\n// Pattern matching\nfn describe_number(n: i32) -> String {\n match n {\n 0 => \"zero\".to_string(),\n 1..=10 => \"small\".to_string(),\n 11..=100 => \"medium\".to_string(),\n _ => \"large\".to_string(),\n }\n}\n\\`\\`\\`\n\n### Go\n\n\\`\\`\\`go\n// Goroutines and channels\nfunc worker(id int, jobs <-chan int, results chan<- int) {\n for j := range jobs {\n fmt.Printf(\"worker %d processing job %d\\\\n\", id, j)\n results <- j * 2\n }\n}\n\\`\\`\\`\n\n### JSON\n\n\\`\\`\\`json\n{\n \"name\": \"Response Component\",\n \"version\": \"1.0.0\",\n \"features\": [\n \"markdown rendering\",\n \"syntax highlighting\",\n \"streaming support\"\n ],\n \"config\": {\n \"theme\": \"dark\",\n \"lineNumbers\": true\n }\n}\n\\`\\`\\`\n\n### YAML\n\n\\`\\`\\`yaml\n# Configuration file\napp:\n name: MyApp\n version: 1.0.0\n port: 3000\n\ndatabase:\n host: localhost\n port: 5432\n credentials:\n username: admin\n password: secret\n\nfeatures:\n - authentication\n - logging\n - caching\n\\`\\`\\`\n\n### Shell/Bash\n\n\\`\\`\\`bash\n#!/bin/bash\n\n# Deploy script\necho \"Starting deployment...\"\n\nnpm install\nnpm run build\nnpm test\n\nif [ $? -eq 0 ]; then\n echo \"Deployment successful!\"\nelse\n echo \"Deployment failed!\"\n exit 1\nfi\n\\`\\`\\`\n\n## Inline Code\n\nYou can use inline code like \\`const x = 5\\`, \\`npm install\\`, or \\`SELECT * FROM users\\` within sentences.\n\nMixed with text: The \\`Array.map()\\` method creates a new array and the \\`filter()\\` method filters elements.\n\n## Code Without Language\n\n\\`\\`\\`\nPlain text code block\nNo syntax highlighting\nJust monospace font\n\\`\\`\\`\n\n## Long Code Blocks\n\n\\`\\`\\`javascript\n// Complex React component\nimport React, { useState, useEffect, useCallback } from 'react';\n\nconst UserDashboard = ({ userId }) => {\n const [user, setUser] = useState(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(null);\n\n const fetchUser = useCallback(async () => {\n try {\n setLoading(true);\n const response = await fetch(\\`/api/users/\\${userId}\\`);\n if (!response.ok) throw new Error('Failed to fetch user');\n const data = await response.json();\n setUser(data);\n } catch (err) {\n setError(err.message);\n } finally {\n setLoading(false);\n }\n }, [userId]);\n\n useEffect(() => {\n fetchUser();\n }, [fetchUser]);\n\n if (loading) return <div>Loading...</div>;\n if (error) return <div>Error: {error}</div>;\n if (!user) return <div>No user found</div>;\n\n return (\n <div className=\"dashboard\">\n <h1>{user.name}</h1>\n <p>Email: {user.email}</p>\n <button onClick={fetchUser}>Refresh</button>\n </div>\n );\n};\n\nexport default UserDashboard;\n\\`\\`\\`\n`;\n\nexport const Component = () => {\n return (\n <div className=\"max-w-4xl\">\n <Response>{codeExamplesMarkdown}</Response>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Component = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const ai_1 = require("@neo4j-ndl/react/ai");
26
+ const markdownContent = `
27
+ # Hello World
28
+
29
+ This is a **bold** text and this is an *italic* text.
30
+
31
+ Here is a list:
32
+ - Item 1
33
+ - Item 2
34
+ - Item 3
35
+
36
+ And a code block:
37
+
38
+ \`\`\`typescript
39
+ const greeting = "Hello World";
40
+ console.log(greeting);
41
+ \`\`\`
42
+
43
+ [Link to Neo4j](https://neo4j.com)
44
+ `;
45
+ const Component = () => {
46
+ return (0, jsx_runtime_1.jsx)(ai_1.Response, { children: markdownContent });
47
+ };
48
+ exports.Component = Component;
49
+ exports.default = exports.Component;
50
+ //# sourceMappingURL=response-default.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-default.story.js","sourceRoot":"","sources":["../../../../../src/ai/response/stories/response-default.story.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA+C;AAE/C,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;CAkBvB,CAAC;AAEK,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,uBAAC,aAAQ,cAAE,eAAe,GAAY,CAAC;AAChD,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEF,kBAAe,iBAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Response } from '@neo4j-ndl/react/ai';\n\nconst markdownContent = `\n# Hello World\n\nThis is a **bold** text and this is an *italic* text.\n\nHere is a list:\n- Item 1\n- Item 2\n- Item 3\n\nAnd a code block:\n\n\\`\\`\\`typescript\nconst greeting = \"Hello World\";\nconsole.log(greeting);\n\\`\\`\\`\n\n[Link to Neo4j](https://neo4j.com)\n`;\n\nexport const Component = () => {\n return <Response>{markdownContent}</Response>;\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Component = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const ai_1 = require("@neo4j-ndl/react/ai");
27
+ const icons_1 = require("@neo4j-ndl/react/icons");
28
+ const react_2 = require("react");
29
+ const FAKE_RESPONSES = [
30
+ `Here is a simple response with some **bold text** and *italics*.`,
31
+ `Here is a list of items:
32
+ - Item 1
33
+ - Item 2
34
+ - Item 3`,
35
+ `Here is a code block example:
36
+
37
+ \`\`\`typescript
38
+ const greeting = "Hello World";
39
+ console.log(greeting);
40
+ \`\`\`
41
+ `,
42
+ `# Heading 1
43
+ ## Heading 2
44
+ ### Heading 3
45
+
46
+ Some text under headings.`,
47
+ `You can also use tables:
48
+
49
+ | Header 1 | Header 2 |
50
+ |Data 1|Data 2|
51
+ |Data 3|Data 4|
52
+ `,
53
+ ];
54
+ const Component = () => {
55
+ const [messages, setMessages] = (0, react_2.useState)([]);
56
+ const [prompt, setPrompt] = (0, react_2.useState)('');
57
+ const [isThinking, setIsThinking] = (0, react_2.useState)(false);
58
+ const [isStreaming, setIsStreaming] = (0, react_2.useState)(false);
59
+ const [responseIndex, setResponseIndex] = (0, react_2.useState)(0);
60
+ const messagesEndRef = (0, react_2.useRef)(null);
61
+ const timeoutRef = (0, react_2.useRef)(null);
62
+ const intervalRef = (0, react_2.useRef)(null);
63
+ const scrollToBottom = () => {
64
+ var _a;
65
+ (_a = messagesEndRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: 'smooth' });
66
+ };
67
+ (0, react_2.useEffect)(() => {
68
+ scrollToBottom();
69
+ }, [messages, isThinking]);
70
+ const handleSend = (overridePrompt) => {
71
+ // Handle Stop
72
+ if (isThinking || isStreaming) {
73
+ if (timeoutRef.current) {
74
+ clearTimeout(timeoutRef.current);
75
+ }
76
+ if (intervalRef.current) {
77
+ clearInterval(intervalRef.current);
78
+ }
79
+ setIsThinking(false);
80
+ setIsStreaming(false);
81
+ // Mark the last message as done if stopped
82
+ setMessages((prev) => {
83
+ const newMessages = [...prev];
84
+ const lastMessage = newMessages[newMessages.length - 1];
85
+ if ((lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.role) === 'assistant') {
86
+ lastMessage.done = true;
87
+ }
88
+ return newMessages;
89
+ });
90
+ return;
91
+ }
92
+ const textToSend = overridePrompt || prompt;
93
+ if (!textToSend.trim()) {
94
+ return;
95
+ }
96
+ setMessages((prev) => [...prev, { content: textToSend, role: 'user' }]);
97
+ setPrompt('');
98
+ setIsThinking(true);
99
+ const startTime = Date.now();
100
+ // Simulate network delay (thinking time)
101
+ timeoutRef.current = setTimeout(() => {
102
+ const endTime = Date.now();
103
+ const thinkingTime = endTime - startTime;
104
+ setIsThinking(false);
105
+ setIsStreaming(true);
106
+ const responseText = FAKE_RESPONSES[responseIndex];
107
+ setResponseIndex((prev) => (prev + 1) % FAKE_RESPONSES.length);
108
+ let currentText = '';
109
+ setMessages((prev) => [
110
+ ...prev,
111
+ { content: '', done: false, role: 'assistant', thinkingTime },
112
+ ]);
113
+ // Simulate streaming
114
+ intervalRef.current = setInterval(() => {
115
+ if (currentText.length < responseText.length) {
116
+ // Add a few characters at a time to simulate chunks
117
+ // Ensure we don't split newlines incorrectly if that's an issue,
118
+ // but simple slicing should be fine as long as the source has \n.
119
+ const chunk = responseText.slice(currentText.length, currentText.length + 2);
120
+ currentText += chunk;
121
+ setMessages((prev) => {
122
+ const newMessages = [...prev];
123
+ const lastMessage = newMessages[newMessages.length - 1];
124
+ if (lastMessage.role === 'assistant') {
125
+ lastMessage.content = currentText;
126
+ }
127
+ return newMessages;
128
+ });
129
+ }
130
+ else {
131
+ if (intervalRef.current) {
132
+ clearInterval(intervalRef.current);
133
+ }
134
+ setIsStreaming(false);
135
+ setMessages((prev) => {
136
+ const newMessages = [...prev];
137
+ const lastMessage = newMessages[newMessages.length - 1];
138
+ if (lastMessage.role === 'assistant') {
139
+ lastMessage.done = true;
140
+ }
141
+ return newMessages;
142
+ });
143
+ }
144
+ }, 50);
145
+ }, 2000);
146
+ };
147
+ return ((0, jsx_runtime_1.jsx)("section", { className: "n-h-screen", children: (0, jsx_runtime_1.jsxs)("div", { className: "n-w-[440px] n-h-full n-flex n-flex-col n-bg-neutral-bg-weak", children: [(0, jsx_runtime_1.jsx)("div", { className: "n-flex n-flex-row n-border-b n-border-neutral-border-weak n-p-3", children: (0, jsx_runtime_1.jsxs)("div", { className: "n-ml-auto", children: [(0, jsx_runtime_1.jsx)(react_1.CleanIconButton, { description: "settings", tooltipProps: {}, children: (0, jsx_runtime_1.jsx)(icons_1.Cog6ToothIconOutline, {}) }), (0, jsx_runtime_1.jsx)(react_1.CleanIconButton, { description: "close", children: (0, jsx_runtime_1.jsx)(icons_1.XMarkIconOutline, {}) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "n-p-4 n-flex n-flex-col n-grow n-overflow-y-auto", children: messages.length === 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "n-flex n-flex-col ", children: (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-12", children: [(0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "display", children: "Hi [User], how can I help you today?" }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-4", children: [(0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", children: "Suggestions" }), (0, jsx_runtime_1.jsx)(ai_1.Suggestion, { isPrimary: true, onClick: () => {
148
+ handleSend('I want to import data');
149
+ }, children: "I want to import data" }), (0, jsx_runtime_1.jsx)(ai_1.Suggestion, { onClick: () => {
150
+ handleSend('Create an AI agent');
151
+ }, children: "Create an AI agent" }), (0, jsx_runtime_1.jsx)(ai_1.Suggestion, { onClick: () => {
152
+ handleSend('Invite project members');
153
+ }, children: "Invite project members" }), (0, jsx_runtime_1.jsx)(ai_1.Suggestion, { onClick: () => {
154
+ handleSend('Generate a report');
155
+ }, children: "Generate a report" })] }), (0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["You can also drag and drop files here, or", ' ', (0, jsx_runtime_1.jsx)(react_1.TextLink, { as: "button", type: "internal-underline", children: "browse" }), ". Supports CVG, MOV, PDF"] })] }) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-4 n-pb-4", children: [messages.map((msg, idx) => ((0, jsx_runtime_1.jsx)("div", { className: `n-flex ${msg.role === 'user' ? 'n-justify-end' : 'n-justify-start'}`, children: msg.role === 'user' ? ((0, jsx_runtime_1.jsx)("div", { className: "n-max-w-[85%]", children: (0, jsx_runtime_1.jsx)(ai_1.UserBubble, { avatarProps: {
156
+ name: 'NM',
157
+ type: 'letters',
158
+ }, children: msg.content }) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "n-w-full n-flex n-flex-col n-gap-2", children: [msg.thinkingTime !== undefined && ((0, jsx_runtime_1.jsx)(ai_1.Thinking, { isThinking: false, thinkingMs: msg.thinkingTime })), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-2", children: [(0, jsx_runtime_1.jsx)(ai_1.Response, { children: msg.content }), msg.done === true && ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-1.5", children: [(0, jsx_runtime_1.jsx)(react_1.CleanIconButton, { size: "small", description: "Dislike", children: (0, jsx_runtime_1.jsx)(icons_1.HandThumbDownIconOutline, {}) }), (0, jsx_runtime_1.jsx)(react_1.CleanIconButton, { size: "small", description: "Re-run", children: (0, jsx_runtime_1.jsx)(icons_1.ArrowPathIconOutline, {}) }), (0, jsx_runtime_1.jsx)(react_1.CleanIconButton, { size: "small", description: "Copy", children: (0, jsx_runtime_1.jsx)(icons_1.Square2StackIconOutline, {}) })] }))] })] })) }, idx))), isThinking && (0, jsx_runtime_1.jsx)(ai_1.Thinking, { isThinking: true }), (0, jsx_runtime_1.jsx)("div", { ref: messagesEndRef })] })) }), (0, jsx_runtime_1.jsx)("div", { className: "n-p-4 n-mt-auto", children: (0, jsx_runtime_1.jsx)(ai_1.Prompt, { value: prompt, onChange: (e) => setPrompt(e.target.value), onSubmitPrompt: () => handleSend(), isRunningPrompt: isThinking || isStreaming, isSubmitDisabled: prompt.length === 0 && !(isThinking || isStreaming), bottomContent: (0, jsx_runtime_1.jsx)(react_1.CleanIconButton, { description: "Add files", size: "small", children: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}) }) }) })] }) }));
159
+ };
160
+ exports.Component = Component;
161
+ exports.default = exports.Component;
162
+ //# sourceMappingURL=response-full-example.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-full-example.story.js","sourceRoot":"","sources":["../../../../../src/ai/response/stories/response-full-example.story.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAAyE;AACzE,4CAM6B;AAC7B,kDAOgC;AAChC,iCAAoD;AAEpD,MAAM,cAAc,GAAG;IACrB,kEAAkE;IAClE;;;SAGO;IACP;;;;;;CAMD;IACC;;;;0BAIwB;IACxB;;;;;CAKD;CACA,CAAC;AAEK,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,MAAM,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AAO,EAAC,WAAW,EAAC,QAAQ,YAChD,uBAAC,4BAAoB,KAAG,GACR,EAClB,uBAAC,uBAAe,IAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,MAAM,YAC9C,uBAAC,+BAAuB,KAAG,GACX,IACd,CACP,IACG,IACF,CACP,IA1CI,GAAG,CA2CJ,CACP,CAAC,EACD,UAAU,IAAI,uBAAC,aAAQ,IAAC,UAAU,EAAE,IAAI,GAAI,EAC7C,gCAAK,GAAG,EAAE,cAAc,GAAI,IACxB,CACP,GACG,EACN,gCAAK,SAAS,EAAC,iBAAiB,YAC9B,uBAAC,WAAM,IACL,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC1C,cAAc,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,EAClC,eAAe,EAAE,UAAU,IAAI,WAAW,EAC1C,gBAAgB,EACd,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,IAAI,WAAW,CAAC,EAErD,aAAa,EACX,uBAAC,uBAAe,IAAC,WAAW,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,YACnD,uBAAC,uBAAe,KAAG,GACH,GAEpB,GACE,IACF,GACE,CACX,CAAC;AACJ,CAAC,CAAC;AAxPW,QAAA,SAAS,aAwPpB;AAEF,kBAAe,iBAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { CleanIconButton, TextLink, Typography } from '@neo4j-ndl/react';\nimport {\n Prompt,\n Response,\n Suggestion,\n Thinking,\n UserBubble,\n} from '@neo4j-ndl/react/ai';\nimport {\n ArrowPathIconOutline,\n Cog6ToothIconOutline,\n HandThumbDownIconOutline,\n PlusIconOutline,\n Square2StackIconOutline,\n XMarkIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport { useEffect, useRef, useState } from 'react';\n\nconst FAKE_RESPONSES = [\n `Here is a simple response with some **bold text** and *italics*.`,\n `Here is a list of items:\n- Item 1\n- Item 2\n- Item 3`,\n `Here is a code block example:\n\n\\`\\`\\`typescript\nconst greeting = \"Hello World\";\nconsole.log(greeting);\n\\`\\`\\`\n`,\n `# Heading 1\n## Heading 2\n### Heading 3\n\nSome text under headings.`,\n `You can also use tables:\n\n| Header 1 | Header 2 |\n|Data 1|Data 2|\n|Data 3|Data 4|\n`,\n];\n\nexport const Component = () => {\n const [messages, setMessages] = useState<\n {\n role: 'user' | 'assistant';\n content: string;\n thinkingTime?: number;\n done?: boolean;\n }[]\n >([]);\n const [prompt, setPrompt] = useState('');\n const [isThinking, setIsThinking] = useState(false);\n const [isStreaming, setIsStreaming] = useState(false);\n const [responseIndex, setResponseIndex] = useState(0);\n const messagesEndRef = useRef<HTMLDivElement>(null);\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const intervalRef = useRef<NodeJS.Timeout | null>(null);\n\n const scrollToBottom = () => {\n messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });\n };\n\n useEffect(() => {\n scrollToBottom();\n }, [messages, isThinking]);\n\n const handleSend = (overridePrompt?: string) => {\n // Handle Stop\n if (isThinking || isStreaming) {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n }\n setIsThinking(false);\n setIsStreaming(false);\n\n // Mark the last message as done if stopped\n setMessages((prev) => {\n const newMessages = [...prev];\n const lastMessage = newMessages[newMessages.length - 1];\n if (lastMessage?.role === 'assistant') {\n lastMessage.done = true;\n }\n return newMessages;\n });\n return;\n }\n\n const textToSend = overridePrompt || prompt;\n\n if (!textToSend.trim()) {\n return;\n }\n\n setMessages((prev) => [...prev, { content: textToSend, role: 'user' }]);\n setPrompt('');\n setIsThinking(true);\n const startTime = Date.now();\n\n // Simulate network delay (thinking time)\n timeoutRef.current = setTimeout(() => {\n const endTime = Date.now();\n const thinkingTime = endTime - startTime;\n setIsThinking(false);\n setIsStreaming(true);\n\n const responseText = FAKE_RESPONSES[responseIndex];\n setResponseIndex((prev) => (prev + 1) % FAKE_RESPONSES.length);\n\n let currentText = '';\n setMessages((prev) => [\n ...prev,\n { content: '', done: false, role: 'assistant', thinkingTime },\n ]);\n\n // Simulate streaming\n intervalRef.current = setInterval(() => {\n if (currentText.length < responseText.length) {\n // Add a few characters at a time to simulate chunks\n // Ensure we don't split newlines incorrectly if that's an issue,\n // but simple slicing should be fine as long as the source has \\n.\n const chunk = responseText.slice(\n currentText.length,\n currentText.length + 2,\n );\n currentText += chunk;\n\n setMessages((prev) => {\n const newMessages = [...prev];\n const lastMessage = newMessages[newMessages.length - 1];\n if (lastMessage.role === 'assistant') {\n lastMessage.content = currentText;\n }\n return newMessages;\n });\n } else {\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n }\n setIsStreaming(false);\n setMessages((prev) => {\n const newMessages = [...prev];\n const lastMessage = newMessages[newMessages.length - 1];\n if (lastMessage.role === 'assistant') {\n lastMessage.done = true;\n }\n return newMessages;\n });\n }\n }, 50);\n }, 2000);\n };\n\n return (\n <section className=\"n-h-screen\">\n <div className=\"n-w-[440px] n-h-full n-flex n-flex-col n-bg-neutral-bg-weak\">\n <div className=\"n-flex n-flex-row n-border-b n-border-neutral-border-weak n-p-3\">\n <div className=\"n-ml-auto\">\n <CleanIconButton description=\"settings\" tooltipProps={{}}>\n <Cog6ToothIconOutline />\n </CleanIconButton>\n <CleanIconButton description=\"close\">\n <XMarkIconOutline />\n </CleanIconButton>\n </div>\n </div>\n <div className=\"n-p-4 n-flex n-flex-col n-grow n-overflow-y-auto\">\n {messages.length === 0 ? (\n <div className=\"n-flex n-flex-col \">\n <div className=\"n-flex n-flex-col n-gap-12\">\n <Typography variant=\"display\">\n Hi [User], how can I help you today?\n </Typography>\n <div className=\"n-flex n-flex-col n-gap-4\">\n <Typography variant=\"body-medium\">Suggestions</Typography>\n <Suggestion\n isPrimary\n onClick={() => {\n handleSend('I want to import data');\n }}\n >\n I want to import data\n </Suggestion>\n <Suggestion\n onClick={() => {\n handleSend('Create an AI agent');\n }}\n >\n Create an AI agent\n </Suggestion>\n <Suggestion\n onClick={() => {\n handleSend('Invite project members');\n }}\n >\n Invite project members\n </Suggestion>\n <Suggestion\n onClick={() => {\n handleSend('Generate a report');\n }}\n >\n Generate a report\n </Suggestion>\n </div>\n <Typography variant=\"body-medium\">\n You can also drag and drop files here, or{' '}\n <TextLink as=\"button\" type=\"internal-underline\">\n browse\n </TextLink>\n . Supports CVG, MOV, PDF\n </Typography>\n </div>\n </div>\n ) : (\n <div className=\"n-flex n-flex-col n-gap-4 n-pb-4\">\n {messages.map((msg, idx) => (\n <div\n key={idx}\n className={`n-flex ${\n msg.role === 'user' ? 'n-justify-end' : 'n-justify-start'\n }`}\n >\n {msg.role === 'user' ? (\n <div className=\"n-max-w-[85%]\">\n <UserBubble\n avatarProps={{\n name: 'NM',\n type: 'letters',\n }}\n >\n {msg.content}\n </UserBubble>\n </div>\n ) : (\n <div className=\"n-w-full n-flex n-flex-col n-gap-2\">\n {msg.thinkingTime !== undefined && (\n <Thinking\n isThinking={false}\n thinkingMs={msg.thinkingTime}\n />\n )}\n <div className=\"n-flex n-flex-col n-gap-2\">\n <Response>{msg.content}</Response>\n\n {msg.done === true && (\n <div className=\"n-flex n-flex-row n-gap-1.5\">\n <CleanIconButton size=\"small\" description=\"Dislike\">\n <HandThumbDownIconOutline />\n </CleanIconButton>\n <CleanIconButton size=\"small\" description=\"Re-run\">\n <ArrowPathIconOutline />\n </CleanIconButton>\n <CleanIconButton size=\"small\" description=\"Copy\">\n <Square2StackIconOutline />\n </CleanIconButton>\n </div>\n )}\n </div>\n </div>\n )}\n </div>\n ))}\n {isThinking && <Thinking isThinking={true} />}\n <div ref={messagesEndRef} />\n </div>\n )}\n </div>\n <div className=\"n-p-4 n-mt-auto\">\n <Prompt\n value={prompt}\n onChange={(e) => setPrompt(e.target.value)}\n onSubmitPrompt={() => handleSend()}\n isRunningPrompt={isThinking || isStreaming}\n isSubmitDisabled={\n prompt.length === 0 && !(isThinking || isStreaming)\n }\n bottomContent={\n <CleanIconButton description=\"Add files\" size=\"small\">\n <PlusIconOutline />\n </CleanIconButton>\n }\n />\n </div>\n </div>\n </section>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Component = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const ai_1 = require("@neo4j-ndl/react/ai");
26
+ const headingsMarkdown = `
27
+ # Heading Level 1
28
+ This is content under heading 1.
29
+
30
+ ## Heading Level 2
31
+ This is content under heading 2.
32
+
33
+ ### Heading Level 3
34
+ This is content under heading 3.
35
+
36
+ #### Heading Level 4
37
+ This is content under heading 4.
38
+
39
+ ##### Heading Level 5
40
+ This is content under heading 5.
41
+
42
+ ###### Heading Level 6
43
+ This is content under heading 6.
44
+
45
+ ---
46
+
47
+ ## Document Structure Example
48
+
49
+ # Main Document Title
50
+
51
+ Brief introduction to the document.
52
+
53
+ ## Introduction
54
+
55
+ This section provides an overview of what we'll cover.
56
+
57
+ ### Background
58
+
59
+ Some background information about the topic.
60
+
61
+ #### Historical Context
62
+
63
+ Details about the history.
64
+
65
+ ##### Key Events
66
+
67
+ - Event 1
68
+ - Event 2
69
+ - Event 3
70
+
71
+ ###### Notes
72
+
73
+ Additional notes and references.
74
+
75
+ ## Content Section
76
+
77
+ Main content goes here.
78
+
79
+ ### Subsection A
80
+
81
+ Details for subsection A.
82
+
83
+ ### Subsection B
84
+
85
+ Details for subsection B.
86
+
87
+ ## Conclusion
88
+
89
+ Final thoughts and summary.
90
+
91
+ ---
92
+
93
+ ## Headings with Other Elements
94
+
95
+ ### Code Example
96
+
97
+ \`\`\`javascript
98
+ console.log("Hello from heading section");
99
+ \`\`\`
100
+
101
+ ### List Example
102
+
103
+ - Item 1
104
+ - Item 2
105
+ - Item 3
106
+
107
+ ### Quote Example
108
+
109
+ > "This is a quote under a heading."
110
+
111
+ ### Mixed Content
112
+
113
+ Regular paragraph with **bold** and *italic* text.
114
+ `;
115
+ const Component = () => {
116
+ return ((0, jsx_runtime_1.jsx)("div", { className: "max-w-4xl", children: (0, jsx_runtime_1.jsx)(ai_1.Response, { children: headingsMarkdown }) }));
117
+ };
118
+ exports.Component = Component;
119
+ exports.default = exports.Component;
120
+ //# sourceMappingURL=response-headings.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-headings.story.js","sourceRoot":"","sources":["../../../../../src/ai/response/stories/response-headings.story.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAA+C;AAE/C,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFxB,CAAC;AAEK,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,CACL,gCAAK,SAAS,EAAC,WAAW,YACxB,uBAAC,aAAQ,cAAE,gBAAgB,GAAY,GACnC,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,SAAS,aAMpB;AAEF,kBAAe,iBAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Response } from '@neo4j-ndl/react/ai';\n\nconst headingsMarkdown = `\n# Heading Level 1\nThis is content under heading 1.\n\n## Heading Level 2\nThis is content under heading 2.\n\n### Heading Level 3\nThis is content under heading 3.\n\n#### Heading Level 4\nThis is content under heading 4.\n\n##### Heading Level 5\nThis is content under heading 5.\n\n###### Heading Level 6\nThis is content under heading 6.\n\n---\n\n## Document Structure Example\n\n# Main Document Title\n\nBrief introduction to the document.\n\n## Introduction\n\nThis section provides an overview of what we'll cover.\n\n### Background\n\nSome background information about the topic.\n\n#### Historical Context\n\nDetails about the history.\n\n##### Key Events\n\n- Event 1\n- Event 2\n- Event 3\n\n###### Notes\n\nAdditional notes and references.\n\n## Content Section\n\nMain content goes here.\n\n### Subsection A\n\nDetails for subsection A.\n\n### Subsection B\n\nDetails for subsection B.\n\n## Conclusion\n\nFinal thoughts and summary.\n\n---\n\n## Headings with Other Elements\n\n### Code Example\n\n\\`\\`\\`javascript\nconsole.log(\"Hello from heading section\");\n\\`\\`\\`\n\n### List Example\n\n- Item 1\n- Item 2\n- Item 3\n\n### Quote Example\n\n> \"This is a quote under a heading.\"\n\n### Mixed Content\n\nRegular paragraph with **bold** and *italic* text.\n`;\n\nexport const Component = () => {\n return (\n <div className=\"max-w-4xl\">\n <Response>{headingsMarkdown}</Response>\n </div>\n );\n};\n\nexport default Component;\n"]}