@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.
- package/lib/cjs/ai/code-preview/CodePreview.js +91 -0
- package/lib/cjs/ai/code-preview/CodePreview.js.map +1 -0
- package/lib/cjs/ai/code-preview/index.js +26 -0
- package/lib/cjs/ai/code-preview/index.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-languages.story.js +37 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-languages.story.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-loading.story.js +31 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-loading.story.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-read.story.js +36 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-read.story.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-write.story.js +36 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-write.story.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview.stories.js +88 -0
- package/lib/cjs/ai/code-preview/stories/code-preview.stories.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/index.js +44 -0
- package/lib/cjs/ai/code-preview/stories/index.js.map +1 -0
- package/lib/cjs/ai/file-tag/FileTag.js +58 -0
- package/lib/cjs/ai/file-tag/FileTag.js.map +1 -0
- package/lib/cjs/ai/file-tag/index.js +38 -0
- package/lib/cjs/ai/file-tag/index.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-chat.story.js +31 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-chat.story.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-loading.story.js +33 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-loading.story.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-prompt.story.js +33 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-prompt.story.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/file-tag.stories.js +76 -0
- package/lib/cjs/ai/file-tag/stories/file-tag.stories.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/index.js +40 -0
- package/lib/cjs/ai/file-tag/stories/index.js.map +1 -0
- package/lib/cjs/ai/image-tag/ImageTag.js +58 -0
- package/lib/cjs/ai/image-tag/ImageTag.js.map +1 -0
- package/lib/cjs/ai/image-tag/index.js +38 -0
- package/lib/cjs/ai/image-tag/index.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-chat.story.js +30 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-chat.story.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-loading.story.js +32 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-loading.story.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-prompt.story.js +32 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-prompt.story.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/image-tag.stories.js +76 -0
- package/lib/cjs/ai/image-tag/stories/image-tag.stories.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/index.js +40 -0
- package/lib/cjs/ai/image-tag/stories/index.js.map +1 -0
- package/lib/cjs/ai/index.js +23 -1
- package/lib/cjs/ai/index.js.map +1 -1
- package/lib/cjs/ai/more-files/MoreFiles.js +55 -0
- package/lib/cjs/ai/more-files/MoreFiles.js.map +1 -0
- package/lib/cjs/ai/more-files/index.js +38 -0
- package/lib/cjs/ai/more-files/index.js.map +1 -0
- package/lib/cjs/ai/more-files/stories/index.js +32 -0
- package/lib/cjs/ai/more-files/stories/index.js.map +1 -0
- package/lib/cjs/ai/more-files/stories/more-files.stories.js +50 -0
- package/lib/cjs/ai/more-files/stories/more-files.stories.js.map +1 -0
- package/lib/cjs/ai/more-files/stories/more-files.story.js +35 -0
- package/lib/cjs/ai/more-files/stories/more-files.story.js.map +1 -0
- package/lib/cjs/ai/presence/Presence.js +5 -1
- package/lib/cjs/ai/presence/Presence.js.map +1 -1
- package/lib/cjs/ai/prompt/Prompt.js +163 -0
- package/lib/cjs/ai/prompt/Prompt.js.map +1 -0
- package/lib/cjs/ai/prompt/index.js +38 -0
- package/lib/cjs/ai/prompt/index.js.map +1 -0
- package/lib/cjs/ai/prompt/stories/index.js +36 -0
- package/lib/cjs/ai/prompt/stories/index.js.map +1 -0
- package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js +56 -0
- package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js.map +1 -0
- package/lib/cjs/ai/prompt/stories/prompt-default.story.js +40 -0
- package/lib/cjs/ai/prompt/stories/prompt-default.story.js.map +1 -0
- package/lib/cjs/ai/prompt/stories/prompt.stories.js +63 -0
- package/lib/cjs/ai/prompt/stories/prompt.stories.js.map +1 -0
- package/lib/cjs/ai/reasoning/Reasoning.js +77 -0
- package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -0
- package/lib/cjs/ai/reasoning/index.js +38 -0
- package/lib/cjs/ai/reasoning/index.js.map +1 -0
- package/lib/cjs/ai/reasoning/stories/index.js +32 -0
- package/lib/cjs/ai/reasoning/stories/index.js.map +1 -0
- package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js +34 -0
- package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js.map +1 -0
- package/lib/cjs/ai/reasoning/stories/reasoning.stories.js +50 -0
- package/lib/cjs/ai/reasoning/stories/reasoning.stories.js.map +1 -0
- package/lib/cjs/ai/response/Response.js +185 -0
- package/lib/cjs/ai/response/Response.js.map +1 -0
- package/lib/cjs/ai/response/index.js +26 -0
- package/lib/cjs/ai/response/index.js.map +1 -0
- package/lib/cjs/ai/response/stories/index.js +56 -0
- package/lib/cjs/ai/response/stories/index.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-all-components.story.js +229 -0
- package/lib/cjs/ai/response/stories/response-all-components.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-code-examples.story.js +248 -0
- package/lib/cjs/ai/response/stories/response-code-examples.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-default.story.js +50 -0
- package/lib/cjs/ai/response/stories/response-default.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-full-example.story.js +162 -0
- package/lib/cjs/ai/response/stories/response-full-example.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-headings.story.js +120 -0
- package/lib/cjs/ai/response/stories/response-headings.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-lists.story.js +170 -0
- package/lib/cjs/ai/response/stories/response-lists.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-streaming.story.js +65 -0
- package/lib/cjs/ai/response/stories/response-streaming.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response.stories.js +132 -0
- package/lib/cjs/ai/response/stories/response.stories.js.map +1 -0
- package/lib/cjs/ai/suggestion/Suggestion.js +58 -0
- package/lib/cjs/ai/suggestion/Suggestion.js.map +1 -0
- package/lib/cjs/ai/suggestion/index.js +38 -0
- package/lib/cjs/ai/suggestion/index.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/index.js +44 -0
- package/lib/cjs/ai/suggestion/stories/index.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-default.story.js +30 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-default.story.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-icon.story.js +31 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-icon.story.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-primary.story.js +30 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-primary.story.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js +30 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion.stories.js +89 -0
- package/lib/cjs/ai/suggestion/stories/suggestion.stories.js.map +1 -0
- package/lib/cjs/ai/thinking/Thinking.js +57 -0
- package/lib/cjs/ai/thinking/Thinking.js.map +1 -0
- package/lib/cjs/ai/thinking/index.js +38 -0
- package/lib/cjs/ai/thinking/index.js.map +1 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking-default.story.js +30 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking-default.story.js.map +1 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking-finished.story.js +30 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking-finished.story.js.map +1 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking.stories.js +63 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking.stories.js.map +1 -0
- package/lib/cjs/ai/thinking/stories/index.js +36 -0
- package/lib/cjs/ai/thinking/stories/index.js.map +1 -0
- package/lib/cjs/ai/thinking/thinking-duration-formatter.js +71 -0
- package/lib/cjs/ai/thinking/thinking-duration-formatter.js.map +1 -0
- package/lib/cjs/ai/tool-call/ToolCall.js +55 -0
- package/lib/cjs/ai/tool-call/ToolCall.js.map +1 -0
- package/lib/cjs/ai/tool-call/index.js +38 -0
- package/lib/cjs/ai/tool-call/index.js.map +1 -0
- package/lib/cjs/ai/tool-call/stories/index.js +36 -0
- package/lib/cjs/ai/tool-call/stories/index.js.map +1 -0
- package/lib/cjs/ai/tool-call/stories/tool-call-default.story.js +30 -0
- package/lib/cjs/ai/tool-call/stories/tool-call-default.story.js.map +1 -0
- package/lib/cjs/ai/tool-call/stories/tool-call-done.story.js +30 -0
- package/lib/cjs/ai/tool-call/stories/tool-call-done.story.js.map +1 -0
- package/lib/cjs/ai/tool-call/stories/tool-call.stories.js +63 -0
- package/lib/cjs/ai/tool-call/stories/tool-call.stories.js.map +1 -0
- package/lib/cjs/ai/user-bubble/UserBubble.js +53 -0
- package/lib/cjs/ai/user-bubble/UserBubble.js.map +1 -0
- package/lib/cjs/ai/user-bubble/index.js +38 -0
- package/lib/cjs/ai/user-bubble/index.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/index.js +44 -0
- package/lib/cjs/ai/user-bubble/stories/index.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js +35 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js +39 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-long.story.js +33 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-long.story.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble.stories.js +89 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble.stories.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js +34 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js.map +1 -0
- package/lib/cjs/code/Code.js.map +1 -1
- package/lib/cjs/text-area/TextArea.js.map +1 -1
- package/lib/esm/ai/code-preview/CodePreview.js +84 -0
- package/lib/esm/ai/code-preview/CodePreview.js.map +1 -0
- package/lib/esm/ai/code-preview/index.js +22 -0
- package/lib/esm/ai/code-preview/index.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview-languages.story.js +33 -0
- package/lib/esm/ai/code-preview/stories/code-preview-languages.story.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview-loading.story.js +27 -0
- package/lib/esm/ai/code-preview/stories/code-preview-loading.story.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview-read.story.js +32 -0
- package/lib/esm/ai/code-preview/stories/code-preview-read.story.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview-write.story.js +32 -0
- package/lib/esm/ai/code-preview/stories/code-preview-write.story.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview.stories.js +85 -0
- package/lib/esm/ai/code-preview/stories/code-preview.stories.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/index.js +34 -0
- package/lib/esm/ai/code-preview/stories/index.js.map +1 -0
- package/lib/esm/ai/file-tag/FileTag.js +52 -0
- package/lib/esm/ai/file-tag/FileTag.js.map +1 -0
- package/lib/esm/ai/file-tag/index.js +22 -0
- package/lib/esm/ai/file-tag/index.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/file-tag-chat.story.js +29 -0
- package/lib/esm/ai/file-tag/stories/file-tag-chat.story.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/file-tag-loading.story.js +31 -0
- package/lib/esm/ai/file-tag/stories/file-tag-loading.story.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/file-tag-prompt.story.js +31 -0
- package/lib/esm/ai/file-tag/stories/file-tag-prompt.story.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/file-tag.stories.js +73 -0
- package/lib/esm/ai/file-tag/stories/file-tag.stories.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/index.js +31 -0
- package/lib/esm/ai/file-tag/stories/index.js.map +1 -0
- package/lib/esm/ai/image-tag/ImageTag.js +52 -0
- package/lib/esm/ai/image-tag/ImageTag.js.map +1 -0
- package/lib/esm/ai/image-tag/index.js +22 -0
- package/lib/esm/ai/image-tag/index.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/image-tag-chat.story.js +28 -0
- package/lib/esm/ai/image-tag/stories/image-tag-chat.story.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/image-tag-loading.story.js +30 -0
- package/lib/esm/ai/image-tag/stories/image-tag-loading.story.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/image-tag-prompt.story.js +30 -0
- package/lib/esm/ai/image-tag/stories/image-tag-prompt.story.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/image-tag.stories.js +73 -0
- package/lib/esm/ai/image-tag/stories/image-tag.stories.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/index.js +31 -0
- package/lib/esm/ai/image-tag/stories/index.js.map +1 -0
- package/lib/esm/ai/index.js +11 -0
- package/lib/esm/ai/index.js.map +1 -1
- package/lib/esm/ai/more-files/MoreFiles.js +49 -0
- package/lib/esm/ai/more-files/MoreFiles.js.map +1 -0
- package/lib/esm/ai/more-files/index.js +22 -0
- package/lib/esm/ai/more-files/index.js.map +1 -0
- package/lib/esm/ai/more-files/stories/index.js +25 -0
- package/lib/esm/ai/more-files/stories/index.js.map +1 -0
- package/lib/esm/ai/more-files/stories/more-files.stories.js +47 -0
- package/lib/esm/ai/more-files/stories/more-files.stories.js.map +1 -0
- package/lib/esm/ai/more-files/stories/more-files.story.js +33 -0
- package/lib/esm/ai/more-files/stories/more-files.story.js.map +1 -0
- package/lib/esm/ai/presence/Presence.js +5 -1
- package/lib/esm/ai/presence/Presence.js.map +1 -1
- package/lib/esm/ai/prompt/Prompt.js +157 -0
- package/lib/esm/ai/prompt/Prompt.js.map +1 -0
- package/lib/esm/ai/prompt/index.js +22 -0
- package/lib/esm/ai/prompt/index.js.map +1 -0
- package/lib/esm/ai/prompt/stories/index.js +28 -0
- package/lib/esm/ai/prompt/stories/index.js.map +1 -0
- package/lib/esm/ai/prompt/stories/prompt-advanced.story.js +54 -0
- package/lib/esm/ai/prompt/stories/prompt-advanced.story.js.map +1 -0
- package/lib/esm/ai/prompt/stories/prompt-default.story.js +38 -0
- package/lib/esm/ai/prompt/stories/prompt-default.story.js.map +1 -0
- package/lib/esm/ai/prompt/stories/prompt.stories.js +60 -0
- package/lib/esm/ai/prompt/stories/prompt.stories.js.map +1 -0
- package/lib/esm/ai/reasoning/Reasoning.js +71 -0
- package/lib/esm/ai/reasoning/Reasoning.js.map +1 -0
- package/lib/esm/ai/reasoning/index.js +22 -0
- package/lib/esm/ai/reasoning/index.js.map +1 -0
- package/lib/esm/ai/reasoning/stories/index.js +25 -0
- package/lib/esm/ai/reasoning/stories/index.js.map +1 -0
- package/lib/esm/ai/reasoning/stories/reasoning-full.story.js +32 -0
- package/lib/esm/ai/reasoning/stories/reasoning-full.story.js.map +1 -0
- package/lib/esm/ai/reasoning/stories/reasoning.stories.js +47 -0
- package/lib/esm/ai/reasoning/stories/reasoning.stories.js.map +1 -0
- package/lib/esm/ai/response/Response.js +179 -0
- package/lib/esm/ai/response/Response.js.map +1 -0
- package/lib/esm/ai/response/index.js +22 -0
- package/lib/esm/ai/response/index.js.map +1 -0
- package/lib/esm/ai/response/stories/index.js +43 -0
- package/lib/esm/ai/response/stories/index.js.map +1 -0
- package/lib/esm/ai/response/stories/response-all-components.story.js +225 -0
- package/lib/esm/ai/response/stories/response-all-components.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-code-examples.story.js +244 -0
- package/lib/esm/ai/response/stories/response-code-examples.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-default.story.js +46 -0
- package/lib/esm/ai/response/stories/response-default.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-full-example.story.js +158 -0
- package/lib/esm/ai/response/stories/response-full-example.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-headings.story.js +116 -0
- package/lib/esm/ai/response/stories/response-headings.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-lists.story.js +166 -0
- package/lib/esm/ai/response/stories/response-lists.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-streaming.story.js +61 -0
- package/lib/esm/ai/response/stories/response-streaming.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response.stories.js +129 -0
- package/lib/esm/ai/response/stories/response.stories.js.map +1 -0
- package/lib/esm/ai/suggestion/Suggestion.js +52 -0
- package/lib/esm/ai/suggestion/Suggestion.js.map +1 -0
- package/lib/esm/ai/suggestion/index.js +22 -0
- package/lib/esm/ai/suggestion/index.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/index.js +34 -0
- package/lib/esm/ai/suggestion/stories/index.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion-default.story.js +28 -0
- package/lib/esm/ai/suggestion/stories/suggestion-default.story.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion-icon.story.js +29 -0
- package/lib/esm/ai/suggestion/stories/suggestion-icon.story.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion-primary.story.js +28 -0
- package/lib/esm/ai/suggestion/stories/suggestion-primary.story.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js +28 -0
- package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion.stories.js +86 -0
- package/lib/esm/ai/suggestion/stories/suggestion.stories.js.map +1 -0
- package/lib/esm/ai/thinking/Thinking.js +51 -0
- package/lib/esm/ai/thinking/Thinking.js.map +1 -0
- package/lib/esm/ai/thinking/index.js +22 -0
- package/lib/esm/ai/thinking/index.js.map +1 -0
- package/lib/esm/ai/thinking/stories/ai-thinking-default.story.js +28 -0
- package/lib/esm/ai/thinking/stories/ai-thinking-default.story.js.map +1 -0
- package/lib/esm/ai/thinking/stories/ai-thinking-finished.story.js +28 -0
- package/lib/esm/ai/thinking/stories/ai-thinking-finished.story.js.map +1 -0
- package/lib/esm/ai/thinking/stories/ai-thinking.stories.js +60 -0
- package/lib/esm/ai/thinking/stories/ai-thinking.stories.js.map +1 -0
- package/lib/esm/ai/thinking/stories/index.js +28 -0
- package/lib/esm/ai/thinking/stories/index.js.map +1 -0
- package/lib/esm/ai/thinking/thinking-duration-formatter.js +67 -0
- package/lib/esm/ai/thinking/thinking-duration-formatter.js.map +1 -0
- package/lib/esm/ai/tool-call/ToolCall.js +49 -0
- package/lib/esm/ai/tool-call/ToolCall.js.map +1 -0
- package/lib/esm/ai/tool-call/index.js +22 -0
- package/lib/esm/ai/tool-call/index.js.map +1 -0
- package/lib/esm/ai/tool-call/stories/index.js +28 -0
- package/lib/esm/ai/tool-call/stories/index.js.map +1 -0
- package/lib/esm/ai/tool-call/stories/tool-call-default.story.js +28 -0
- package/lib/esm/ai/tool-call/stories/tool-call-default.story.js.map +1 -0
- package/lib/esm/ai/tool-call/stories/tool-call-done.story.js +28 -0
- package/lib/esm/ai/tool-call/stories/tool-call-done.story.js.map +1 -0
- package/lib/esm/ai/tool-call/stories/tool-call.stories.js +60 -0
- package/lib/esm/ai/tool-call/stories/tool-call.stories.js.map +1 -0
- package/lib/esm/ai/user-bubble/UserBubble.js +47 -0
- package/lib/esm/ai/user-bubble/UserBubble.js.map +1 -0
- package/lib/esm/ai/user-bubble/index.js +22 -0
- package/lib/esm/ai/user-bubble/index.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/index.js +34 -0
- package/lib/esm/ai/user-bubble/stories/index.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js +33 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js +37 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-long.story.js +31 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-long.story.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble.stories.js +86 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble.stories.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble.story.js +32 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble.story.js.map +1 -0
- package/lib/esm/code/Code.js.map +1 -1
- package/lib/esm/text-area/TextArea.js.map +1 -1
- package/lib/types/ai/code-preview/CodePreview.d.ts +44 -0
- package/lib/types/ai/code-preview/CodePreview.d.ts.map +1 -0
- package/lib/types/ai/code-preview/index.d.ts +22 -0
- package/lib/types/ai/code-preview/index.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview-languages.story.d.ts +23 -0
- package/lib/types/ai/code-preview/stories/code-preview-languages.story.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview-loading.story.d.ts +23 -0
- package/lib/types/ai/code-preview/stories/code-preview-loading.story.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview-read.story.d.ts +23 -0
- package/lib/types/ai/code-preview/stories/code-preview-read.story.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview-write.story.d.ts +23 -0
- package/lib/types/ai/code-preview/stories/code-preview-write.story.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview.stories.d.ts +30 -0
- package/lib/types/ai/code-preview/stories/code-preview.stories.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/index.d.ts +29 -0
- package/lib/types/ai/code-preview/stories/index.d.ts.map +1 -0
- package/lib/types/ai/file-tag/FileTag.d.ts +44 -0
- package/lib/types/ai/file-tag/FileTag.d.ts.map +1 -0
- package/lib/types/ai/file-tag/index.d.ts +22 -0
- package/lib/types/ai/file-tag/index.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/file-tag-chat.story.d.ts +24 -0
- package/lib/types/ai/file-tag/stories/file-tag-chat.story.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/file-tag-loading.story.d.ts +24 -0
- package/lib/types/ai/file-tag/stories/file-tag-loading.story.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/file-tag-prompt.story.d.ts +24 -0
- package/lib/types/ai/file-tag/stories/file-tag-prompt.story.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/file-tag.stories.d.ts +29 -0
- package/lib/types/ai/file-tag/stories/file-tag.stories.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/index.d.ts +27 -0
- package/lib/types/ai/file-tag/stories/index.d.ts.map +1 -0
- package/lib/types/ai/image-tag/ImageTag.d.ts +46 -0
- package/lib/types/ai/image-tag/ImageTag.d.ts.map +1 -0
- package/lib/types/ai/image-tag/index.d.ts +22 -0
- package/lib/types/ai/image-tag/index.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/image-tag-chat.story.d.ts +24 -0
- package/lib/types/ai/image-tag/stories/image-tag-chat.story.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/image-tag-loading.story.d.ts +24 -0
- package/lib/types/ai/image-tag/stories/image-tag-loading.story.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/image-tag-prompt.story.d.ts +24 -0
- package/lib/types/ai/image-tag/stories/image-tag-prompt.story.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/image-tag.stories.d.ts +29 -0
- package/lib/types/ai/image-tag/stories/image-tag.stories.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/index.d.ts +27 -0
- package/lib/types/ai/image-tag/stories/index.d.ts.map +1 -0
- package/lib/types/ai/index.d.ts +11 -0
- package/lib/types/ai/index.d.ts.map +1 -1
- package/lib/types/ai/more-files/MoreFiles.d.ts +38 -0
- package/lib/types/ai/more-files/MoreFiles.d.ts.map +1 -0
- package/lib/types/ai/more-files/index.d.ts +22 -0
- package/lib/types/ai/more-files/index.d.ts.map +1 -0
- package/lib/types/ai/more-files/stories/index.d.ts +23 -0
- package/lib/types/ai/more-files/stories/index.d.ts.map +1 -0
- package/lib/types/ai/more-files/stories/more-files.stories.d.ts +27 -0
- package/lib/types/ai/more-files/stories/more-files.stories.d.ts.map +1 -0
- package/lib/types/ai/more-files/stories/more-files.story.d.ts +24 -0
- package/lib/types/ai/more-files/stories/more-files.story.d.ts.map +1 -0
- package/lib/types/ai/presence/Presence.d.ts.map +1 -1
- package/lib/types/ai/prompt/Prompt.d.ts +62 -0
- package/lib/types/ai/prompt/Prompt.d.ts.map +1 -0
- package/lib/types/ai/prompt/index.d.ts +22 -0
- package/lib/types/ai/prompt/index.d.ts.map +1 -0
- package/lib/types/ai/prompt/stories/index.d.ts +25 -0
- package/lib/types/ai/prompt/stories/index.d.ts.map +1 -0
- package/lib/types/ai/prompt/stories/prompt-advanced.story.d.ts +24 -0
- package/lib/types/ai/prompt/stories/prompt-advanced.story.d.ts.map +1 -0
- package/lib/types/ai/prompt/stories/prompt-default.story.d.ts +24 -0
- package/lib/types/ai/prompt/stories/prompt-default.story.d.ts.map +1 -0
- package/lib/types/ai/prompt/stories/prompt.stories.d.ts +28 -0
- package/lib/types/ai/prompt/stories/prompt.stories.d.ts.map +1 -0
- package/lib/types/ai/reasoning/Reasoning.d.ts +44 -0
- package/lib/types/ai/reasoning/Reasoning.d.ts.map +1 -0
- package/lib/types/ai/reasoning/index.d.ts +22 -0
- package/lib/types/ai/reasoning/index.d.ts.map +1 -0
- package/lib/types/ai/reasoning/stories/index.d.ts +23 -0
- package/lib/types/ai/reasoning/stories/index.d.ts.map +1 -0
- package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts +24 -0
- package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts.map +1 -0
- package/lib/types/ai/reasoning/stories/reasoning.stories.d.ts +27 -0
- package/lib/types/ai/reasoning/stories/reasoning.stories.d.ts.map +1 -0
- package/lib/types/ai/response/Response.d.ts +37 -0
- package/lib/types/ai/response/Response.d.ts.map +1 -0
- package/lib/types/ai/response/index.d.ts +22 -0
- package/lib/types/ai/response/index.d.ts.map +1 -0
- package/lib/types/ai/response/stories/index.d.ts +35 -0
- package/lib/types/ai/response/stories/index.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-all-components.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-all-components.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-code-examples.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-code-examples.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-default.story.d.ts +23 -0
- package/lib/types/ai/response/stories/response-default.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-full-example.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-full-example.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-headings.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-headings.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-lists.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-lists.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-streaming.story.d.ts +23 -0
- package/lib/types/ai/response/stories/response-streaming.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response.stories.d.ts +33 -0
- package/lib/types/ai/response/stories/response.stories.d.ts.map +1 -0
- package/lib/types/ai/suggestion/Suggestion.d.ts +42 -0
- package/lib/types/ai/suggestion/Suggestion.d.ts.map +1 -0
- package/lib/types/ai/suggestion/index.d.ts +22 -0
- package/lib/types/ai/suggestion/index.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/index.d.ts +29 -0
- package/lib/types/ai/suggestion/stories/index.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion-default.story.d.ts +24 -0
- package/lib/types/ai/suggestion/stories/suggestion-default.story.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion-icon.story.d.ts +24 -0
- package/lib/types/ai/suggestion/stories/suggestion-icon.story.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion-primary.story.d.ts +24 -0
- package/lib/types/ai/suggestion/stories/suggestion-primary.story.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion-sizes.story.d.ts +24 -0
- package/lib/types/ai/suggestion/stories/suggestion-sizes.story.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion.stories.d.ts +30 -0
- package/lib/types/ai/suggestion/stories/suggestion.stories.d.ts.map +1 -0
- package/lib/types/ai/thinking/Thinking.d.ts +40 -0
- package/lib/types/ai/thinking/Thinking.d.ts.map +1 -0
- package/lib/types/ai/thinking/index.d.ts +22 -0
- package/lib/types/ai/thinking/index.d.ts.map +1 -0
- package/lib/types/ai/thinking/stories/ai-thinking-default.story.d.ts +24 -0
- package/lib/types/ai/thinking/stories/ai-thinking-default.story.d.ts.map +1 -0
- package/lib/types/ai/thinking/stories/ai-thinking-finished.story.d.ts +24 -0
- package/lib/types/ai/thinking/stories/ai-thinking-finished.story.d.ts.map +1 -0
- package/lib/types/ai/thinking/stories/ai-thinking.stories.d.ts +28 -0
- package/lib/types/ai/thinking/stories/ai-thinking.stories.d.ts.map +1 -0
- package/lib/types/ai/thinking/stories/index.d.ts +25 -0
- package/lib/types/ai/thinking/stories/index.d.ts.map +1 -0
- package/lib/types/ai/thinking/thinking-duration-formatter.d.ts +45 -0
- package/lib/types/ai/thinking/thinking-duration-formatter.d.ts.map +1 -0
- package/lib/types/ai/tool-call/ToolCall.d.ts +37 -0
- package/lib/types/ai/tool-call/ToolCall.d.ts.map +1 -0
- package/lib/types/ai/tool-call/index.d.ts +22 -0
- package/lib/types/ai/tool-call/index.d.ts.map +1 -0
- package/lib/types/ai/tool-call/stories/index.d.ts +25 -0
- package/lib/types/ai/tool-call/stories/index.d.ts.map +1 -0
- package/lib/types/ai/tool-call/stories/tool-call-default.story.d.ts +24 -0
- package/lib/types/ai/tool-call/stories/tool-call-default.story.d.ts.map +1 -0
- package/lib/types/ai/tool-call/stories/tool-call-done.story.d.ts +24 -0
- package/lib/types/ai/tool-call/stories/tool-call-done.story.d.ts.map +1 -0
- package/lib/types/ai/tool-call/stories/tool-call.stories.d.ts +28 -0
- package/lib/types/ai/tool-call/stories/tool-call.stories.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/UserBubble.d.ts +39 -0
- package/lib/types/ai/user-bubble/UserBubble.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/index.d.ts +22 -0
- package/lib/types/ai/user-bubble/index.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/index.d.ts +29 -0
- package/lib/types/ai/user-bubble/stories/index.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-action.story.d.ts +24 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-action.story.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts +24 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-long.story.d.ts +24 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-long.story.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble.stories.d.ts +30 -0
- package/lib/types/ai/user-bubble/stories/user-bubble.stories.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble.story.d.ts +24 -0
- package/lib/types/ai/user-bubble/stories/user-bubble.story.d.ts.map +1 -0
- package/lib/types/code/Code.d.ts +4 -1
- package/lib/types/code/Code.d.ts.map +1 -1
- package/lib/types/text-area/TextArea.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as ResponseDefault } from './response-default.story';
|
|
22
|
+
export { default as ResponseStreaming } from './response-streaming.story';
|
|
23
|
+
export { default as ResponseAllComponents } from './response-all-components.story';
|
|
24
|
+
export { default as ResponseCodeExamples } from './response-code-examples.story';
|
|
25
|
+
export { default as ResponseHeadings } from './response-headings.story';
|
|
26
|
+
export { default as ResponseLists } from './response-lists.story';
|
|
27
|
+
export { default as ResponseFullExample } from './response-full-example.story';
|
|
28
|
+
import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
|
|
29
|
+
import ResponseAllComponentsSourceRaw from './response-all-components.story?raw';
|
|
30
|
+
import ResponseCodeExamplesSourceRaw from './response-code-examples.story?raw';
|
|
31
|
+
import ResponseDefaultSourceRaw from './response-default.story?raw';
|
|
32
|
+
import ResponseFullExampleSourceRaw from './response-full-example.story?raw';
|
|
33
|
+
import ResponseHeadingsSourceRaw from './response-headings.story?raw';
|
|
34
|
+
import ResponseListsSourceRaw from './response-lists.story?raw';
|
|
35
|
+
import ResponseStreamingSourceRaw from './response-streaming.story?raw';
|
|
36
|
+
export const ResponseDefaultSource = removeLicenseHeader(ResponseDefaultSourceRaw);
|
|
37
|
+
export const ResponseStreamingSource = removeLicenseHeader(ResponseStreamingSourceRaw);
|
|
38
|
+
export const ResponseAllComponentsSource = removeLicenseHeader(ResponseAllComponentsSourceRaw);
|
|
39
|
+
export const ResponseCodeExamplesSource = removeLicenseHeader(ResponseCodeExamplesSourceRaw);
|
|
40
|
+
export const ResponseHeadingsSource = removeLicenseHeader(ResponseHeadingsSourceRaw);
|
|
41
|
+
export const ResponseListsSource = removeLicenseHeader(ResponseListsSourceRaw);
|
|
42
|
+
export const ResponseFullExampleSource = removeLicenseHeader(ResponseFullExampleSourceRaw);
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/response/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,8BAA8B,MAAM,qCAAqC,CAAC;AACjF,OAAO,6BAA6B,MAAM,oCAAoC,CAAC;AAC/E,OAAO,wBAAwB,MAAM,8BAA8B,CAAC;AACpE,OAAO,4BAA4B,MAAM,mCAAmC,CAAC;AAC7E,OAAO,yBAAyB,MAAM,+BAA+B,CAAC;AACtE,OAAO,sBAAsB,MAAM,4BAA4B,CAAC;AAChE,OAAO,0BAA0B,MAAM,gCAAgC,CAAC;AAExE,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,CAAC;AACF,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CACxD,0BAA0B,CAC3B,CAAC;AACF,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAC5D,8BAA8B,CAC/B,CAAC;AACF,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAC3D,6BAA6B,CAC9B,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,yBAAyB,CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAC1D,4BAA4B,CAC7B,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\nexport { default as ResponseDefault } from './response-default.story';\nexport { default as ResponseStreaming } from './response-streaming.story';\nexport { default as ResponseAllComponents } from './response-all-components.story';\nexport { default as ResponseCodeExamples } from './response-code-examples.story';\nexport { default as ResponseHeadings } from './response-headings.story';\nexport { default as ResponseLists } from './response-lists.story';\nexport { default as ResponseFullExample } from './response-full-example.story';\n\nimport { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';\n\nimport ResponseAllComponentsSourceRaw from './response-all-components.story?raw';\nimport ResponseCodeExamplesSourceRaw from './response-code-examples.story?raw';\nimport ResponseDefaultSourceRaw from './response-default.story?raw';\nimport ResponseFullExampleSourceRaw from './response-full-example.story?raw';\nimport ResponseHeadingsSourceRaw from './response-headings.story?raw';\nimport ResponseListsSourceRaw from './response-lists.story?raw';\nimport ResponseStreamingSourceRaw from './response-streaming.story?raw';\n\nexport const ResponseDefaultSource = removeLicenseHeader(\n ResponseDefaultSourceRaw,\n);\nexport const ResponseStreamingSource = removeLicenseHeader(\n ResponseStreamingSourceRaw,\n);\nexport const ResponseAllComponentsSource = removeLicenseHeader(\n ResponseAllComponentsSourceRaw,\n);\nexport const ResponseCodeExamplesSource = removeLicenseHeader(\n ResponseCodeExamplesSourceRaw,\n);\nexport const ResponseHeadingsSource = removeLicenseHeader(\n ResponseHeadingsSourceRaw,\n);\nexport const ResponseListsSource = removeLicenseHeader(ResponseListsSourceRaw);\nexport const ResponseFullExampleSource = removeLicenseHeader(\n ResponseFullExampleSourceRaw,\n);\n"]}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { Response } from '@neo4j-ndl/react/ai';
|
|
23
|
+
const comprehensiveMarkdown = `
|
|
24
|
+
# All Markdown Components Demo
|
|
25
|
+
|
|
26
|
+
This story demonstrates all the markdown components that the Response component can render.
|
|
27
|
+
|
|
28
|
+
## Headings
|
|
29
|
+
|
|
30
|
+
# Heading 1
|
|
31
|
+
## Heading 2
|
|
32
|
+
### Heading 3
|
|
33
|
+
#### Heading 4
|
|
34
|
+
##### Heading 5
|
|
35
|
+
###### Heading 6
|
|
36
|
+
|
|
37
|
+
## Text Formatting
|
|
38
|
+
|
|
39
|
+
This is **bold text** and this is *italic text*.
|
|
40
|
+
|
|
41
|
+
You can also use __bold__ and _italic_ with underscores.
|
|
42
|
+
|
|
43
|
+
Combine them: **bold and *italic* together**.
|
|
44
|
+
|
|
45
|
+
## Lists
|
|
46
|
+
|
|
47
|
+
### Unordered Lists
|
|
48
|
+
|
|
49
|
+
- Item 1
|
|
50
|
+
- Item 2
|
|
51
|
+
- Item 3
|
|
52
|
+
- Nested item 1
|
|
53
|
+
- Nested item 2
|
|
54
|
+
- Deeply nested item
|
|
55
|
+
|
|
56
|
+
### Ordered Lists
|
|
57
|
+
|
|
58
|
+
1. First item
|
|
59
|
+
2. Second item
|
|
60
|
+
3. Third item
|
|
61
|
+
1. Nested numbered item
|
|
62
|
+
2. Another nested item
|
|
63
|
+
|
|
64
|
+
## Code
|
|
65
|
+
|
|
66
|
+
### Inline Code
|
|
67
|
+
|
|
68
|
+
Use \`const x = 5\` for inline code.
|
|
69
|
+
|
|
70
|
+
### Code Blocks
|
|
71
|
+
|
|
72
|
+
#### JavaScript
|
|
73
|
+
|
|
74
|
+
\`\`\`javascript
|
|
75
|
+
const greeting = "Hello World";
|
|
76
|
+
console.log(greeting);
|
|
77
|
+
|
|
78
|
+
function sayHello(name) {
|
|
79
|
+
return \`Hello, \${name}!\`;
|
|
80
|
+
}
|
|
81
|
+
\`\`\`
|
|
82
|
+
|
|
83
|
+
#### Python
|
|
84
|
+
|
|
85
|
+
\`\`\`python
|
|
86
|
+
def greet(name):
|
|
87
|
+
return f"Hello, {name}!"
|
|
88
|
+
|
|
89
|
+
print(greet("World"))
|
|
90
|
+
\`\`\`
|
|
91
|
+
|
|
92
|
+
#### Cypher
|
|
93
|
+
|
|
94
|
+
\`\`\`cypher
|
|
95
|
+
MATCH (n:Person)-[:KNOWS]->(m:Person)
|
|
96
|
+
WHERE n.name = "Alice"
|
|
97
|
+
RETURN m.name
|
|
98
|
+
\`\`\`
|
|
99
|
+
|
|
100
|
+
#### TypeScript
|
|
101
|
+
|
|
102
|
+
\`\`\`typescript
|
|
103
|
+
interface User {
|
|
104
|
+
name: string;
|
|
105
|
+
age: number;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const user: User = {
|
|
109
|
+
name: "John",
|
|
110
|
+
age: 30
|
|
111
|
+
};
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
#### Without Language Specification
|
|
115
|
+
|
|
116
|
+
\`\`\`
|
|
117
|
+
Plain code block
|
|
118
|
+
without syntax highlighting
|
|
119
|
+
\`\`\`
|
|
120
|
+
|
|
121
|
+
## Links
|
|
122
|
+
|
|
123
|
+
Visit [Neo4j](https://neo4j.com) for more information.
|
|
124
|
+
|
|
125
|
+
Multiple links: [Documentation](https://neo4j.com/docs) and [Community](https://community.neo4j.com)
|
|
126
|
+
|
|
127
|
+
## Blockquotes
|
|
128
|
+
|
|
129
|
+
> This is a blockquote.
|
|
130
|
+
> It can span multiple lines.
|
|
131
|
+
|
|
132
|
+
> ### Blockquote with heading
|
|
133
|
+
>
|
|
134
|
+
> You can also include other markdown inside blockquotes.
|
|
135
|
+
>
|
|
136
|
+
> - Like lists
|
|
137
|
+
> - And other elements
|
|
138
|
+
|
|
139
|
+
### Nested Blockquotes
|
|
140
|
+
|
|
141
|
+
> Outer quote
|
|
142
|
+
>> Nested quote
|
|
143
|
+
>>> Deeply nested quote
|
|
144
|
+
|
|
145
|
+
## Horizontal Rules
|
|
146
|
+
|
|
147
|
+
Content above the rule
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
Content below the rule
|
|
152
|
+
|
|
153
|
+
## Images
|
|
154
|
+
|
|
155
|
+

|
|
156
|
+
|
|
157
|
+
## Paragraphs
|
|
158
|
+
|
|
159
|
+
This is a paragraph with multiple sentences. It demonstrates how regular text is rendered. You can write long-form content that spans multiple lines.
|
|
160
|
+
|
|
161
|
+
Another paragraph here. Paragraphs are separated by blank lines in markdown.
|
|
162
|
+
|
|
163
|
+
## Mixed Content Example
|
|
164
|
+
|
|
165
|
+
Here's a practical example combining multiple elements:
|
|
166
|
+
|
|
167
|
+
### Database Query Tutorial
|
|
168
|
+
|
|
169
|
+
To query your Neo4j database, follow these steps:
|
|
170
|
+
|
|
171
|
+
1. **Connect to your database**
|
|
172
|
+
|
|
173
|
+
Use the following code:
|
|
174
|
+
|
|
175
|
+
\`\`\`javascript
|
|
176
|
+
const driver = neo4j.driver(
|
|
177
|
+
'bolt://localhost:7687',
|
|
178
|
+
neo4j.auth.basic('neo4j', 'password')
|
|
179
|
+
);
|
|
180
|
+
\`\`\`
|
|
181
|
+
|
|
182
|
+
2. **Write your Cypher query**
|
|
183
|
+
|
|
184
|
+
\`\`\`cypher
|
|
185
|
+
MATCH (n:Movie)
|
|
186
|
+
WHERE n.released > 2000
|
|
187
|
+
RETURN n.title, n.released
|
|
188
|
+
ORDER BY n.released DESC
|
|
189
|
+
LIMIT 10
|
|
190
|
+
\`\`\`
|
|
191
|
+
|
|
192
|
+
3. **Execute and process results**
|
|
193
|
+
|
|
194
|
+
> **Note**: Always close your session after use!
|
|
195
|
+
|
|
196
|
+
For more information, visit the [Neo4j Documentation](https://neo4j.com/docs).
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Special Characters and Escaping
|
|
201
|
+
|
|
202
|
+
You can escape special characters: \\* \\_ \\[ \\]
|
|
203
|
+
|
|
204
|
+
## Preformatted Text
|
|
205
|
+
|
|
206
|
+
Use code blocks for preformatted text with preserved spacing:
|
|
207
|
+
|
|
208
|
+
\`\`\`
|
|
209
|
+
This text
|
|
210
|
+
has preserved
|
|
211
|
+
indentation
|
|
212
|
+
\`\`\`
|
|
213
|
+
|
|
214
|
+
| Item | In Stock | Price |
|
|
215
|
+
| :---------------- | :------: | ----: |
|
|
216
|
+
| Python Hat | True | 222222223.99 |
|
|
217
|
+
| SQL Hat | True | 23.99 |
|
|
218
|
+
| Codecademy Tee | False | 19.99 |
|
|
219
|
+
| Codecademy Hoodie | False | 42.99 |
|
|
220
|
+
`;
|
|
221
|
+
export const Component = () => {
|
|
222
|
+
return (_jsx("div", { className: "max-w-4xl", children: _jsx(Response, { children: comprehensiveMarkdown }) }));
|
|
223
|
+
};
|
|
224
|
+
export default Component;
|
|
225
|
+
//# sourceMappingURL=response-all-components.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-all-components.story.js","sourceRoot":"","sources":["../../../../../src/ai/response/stories/response-all-components.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqM7B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,CACL,cAAK,SAAS,EAAC,WAAW,YACxB,KAAC,QAAQ,cAAE,qBAAqB,GAAY,GACxC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 comprehensiveMarkdown = `\n# All Markdown Components Demo\n\nThis story demonstrates all the markdown components that the Response component can render.\n\n## Headings\n\n# Heading 1\n## Heading 2\n### Heading 3\n#### Heading 4\n##### Heading 5\n###### Heading 6\n\n## Text Formatting\n\nThis is **bold text** and this is *italic text*.\n\nYou can also use __bold__ and _italic_ with underscores.\n\nCombine them: **bold and *italic* together**.\n\n## Lists\n\n### Unordered Lists\n\n- Item 1\n- Item 2\n- Item 3\n - Nested item 1\n - Nested item 2\n - Deeply nested item\n\n### Ordered Lists\n\n1. First item\n2. Second item\n3. Third item\n 1. Nested numbered item\n 2. Another nested item\n\n## Code\n\n### Inline Code\n\nUse \\`const x = 5\\` for inline code.\n\n### Code Blocks\n\n#### JavaScript\n\n\\`\\`\\`javascript\nconst greeting = \"Hello World\";\nconsole.log(greeting);\n\nfunction sayHello(name) {\n return \\`Hello, \\${name}!\\`;\n}\n\\`\\`\\`\n\n#### Python\n\n\\`\\`\\`python\ndef greet(name):\n return f\"Hello, {name}!\"\n\nprint(greet(\"World\"))\n\\`\\`\\`\n\n#### Cypher\n\n\\`\\`\\`cypher\nMATCH (n:Person)-[:KNOWS]->(m:Person)\nWHERE n.name = \"Alice\"\nRETURN m.name\n\\`\\`\\`\n\n#### TypeScript\n\n\\`\\`\\`typescript\ninterface User {\n name: string;\n age: number;\n}\n\nconst user: User = {\n name: \"John\",\n age: 30\n};\n\\`\\`\\`\n\n#### Without Language Specification\n\n\\`\\`\\`\nPlain code block\nwithout syntax highlighting\n\\`\\`\\`\n\n## Links\n\nVisit [Neo4j](https://neo4j.com) for more information.\n\nMultiple links: [Documentation](https://neo4j.com/docs) and [Community](https://community.neo4j.com)\n\n## Blockquotes\n\n> This is a blockquote.\n> It can span multiple lines.\n\n> ### Blockquote with heading\n> \n> You can also include other markdown inside blockquotes.\n> \n> - Like lists\n> - And other elements\n\n### Nested Blockquotes\n\n> Outer quote\n>> Nested quote\n>>> Deeply nested quote\n\n## Horizontal Rules\n\nContent above the rule\n\n---\n\nContent below the rule\n\n## Images\n\n\n\n## Paragraphs\n\nThis is a paragraph with multiple sentences. It demonstrates how regular text is rendered. You can write long-form content that spans multiple lines.\n\nAnother paragraph here. Paragraphs are separated by blank lines in markdown.\n\n## Mixed Content Example\n\nHere's a practical example combining multiple elements:\n\n### Database Query Tutorial\n\nTo query your Neo4j database, follow these steps:\n\n1. **Connect to your database**\n \n Use the following code:\n \n \\`\\`\\`javascript\n const driver = neo4j.driver(\n 'bolt://localhost:7687',\n neo4j.auth.basic('neo4j', 'password')\n );\n \\`\\`\\`\n\n2. **Write your Cypher query**\n \n \\`\\`\\`cypher\n MATCH (n:Movie)\n WHERE n.released > 2000\n RETURN n.title, n.released\n ORDER BY n.released DESC\n LIMIT 10\n \\`\\`\\`\n\n3. **Execute and process results**\n \n > **Note**: Always close your session after use!\n\nFor more information, visit the [Neo4j Documentation](https://neo4j.com/docs).\n\n---\n\n## Special Characters and Escaping\n\nYou can escape special characters: \\\\* \\\\_ \\\\[ \\\\]\n\n## Preformatted Text\n\nUse code blocks for preformatted text with preserved spacing:\n\n\\`\\`\\`\n This text\n has preserved\n indentation\n\\`\\`\\`\n\n| Item | In Stock | Price |\n| :---------------- | :------: | ----: |\n| Python Hat | True | 222222223.99 |\n| SQL Hat | True | 23.99 |\n| Codecademy Tee | False | 19.99 |\n| Codecademy Hoodie | False | 42.99 |\n`;\n\nexport const Component = () => {\n return (\n <div className=\"max-w-4xl\">\n <Response>{comprehensiveMarkdown}</Response>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { Response } from '@neo4j-ndl/react/ai';
|
|
23
|
+
const codeExamplesMarkdown = `
|
|
24
|
+
# Code Examples
|
|
25
|
+
|
|
26
|
+
This story focuses on different code rendering capabilities.
|
|
27
|
+
|
|
28
|
+
## Multiple Programming Languages
|
|
29
|
+
|
|
30
|
+
### JavaScript
|
|
31
|
+
|
|
32
|
+
\`\`\`javascript
|
|
33
|
+
// Array methods
|
|
34
|
+
const numbers = [1, 2, 3, 4, 5];
|
|
35
|
+
const doubled = numbers.map(n => n * 2);
|
|
36
|
+
const sum = numbers.reduce((acc, n) => acc + n, 0);
|
|
37
|
+
|
|
38
|
+
console.log('Doubled:', doubled);
|
|
39
|
+
console.log('Sum:', sum);
|
|
40
|
+
\`\`\`
|
|
41
|
+
|
|
42
|
+
### TypeScript
|
|
43
|
+
|
|
44
|
+
\`\`\`typescript
|
|
45
|
+
// Generics
|
|
46
|
+
function identity<T>(arg: T): T {
|
|
47
|
+
return arg;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const result = identity<string>("Hello");
|
|
51
|
+
const num = identity(42);
|
|
52
|
+
\`\`\`
|
|
53
|
+
|
|
54
|
+
### Python
|
|
55
|
+
|
|
56
|
+
\`\`\`python
|
|
57
|
+
# List comprehension
|
|
58
|
+
squares = [x**2 for x in range(10)]
|
|
59
|
+
evens = [x for x in range(20) if x % 2 == 0]
|
|
60
|
+
|
|
61
|
+
# Dictionary comprehension
|
|
62
|
+
square_dict = {x: x**2 for x in range(5)}
|
|
63
|
+
|
|
64
|
+
print(f"Squares: {squares}")
|
|
65
|
+
print(f"Evens: {evens}")
|
|
66
|
+
\`\`\`
|
|
67
|
+
|
|
68
|
+
### Cypher
|
|
69
|
+
|
|
70
|
+
\`\`\`cypher
|
|
71
|
+
// Create nodes and relationships
|
|
72
|
+
CREATE (alice:Person {name: 'Alice', age: 30})
|
|
73
|
+
CREATE (bob:Person {name: 'Bob', age: 25})
|
|
74
|
+
CREATE (alice)-[:KNOWS {since: 2020}]->(bob)
|
|
75
|
+
RETURN alice, bob
|
|
76
|
+
\`\`\`
|
|
77
|
+
|
|
78
|
+
### SQL
|
|
79
|
+
|
|
80
|
+
\`\`\`sql
|
|
81
|
+
-- Complex query
|
|
82
|
+
SELECT
|
|
83
|
+
u.name,
|
|
84
|
+
COUNT(o.id) as order_count,
|
|
85
|
+
SUM(o.total) as total_spent
|
|
86
|
+
FROM users u
|
|
87
|
+
LEFT JOIN orders o ON u.id = o.user_id
|
|
88
|
+
WHERE u.active = true
|
|
89
|
+
GROUP BY u.id, u.name
|
|
90
|
+
HAVING COUNT(o.id) > 5
|
|
91
|
+
ORDER BY total_spent DESC
|
|
92
|
+
LIMIT 10;
|
|
93
|
+
\`\`\`
|
|
94
|
+
|
|
95
|
+
### Rust
|
|
96
|
+
|
|
97
|
+
\`\`\`rust
|
|
98
|
+
// Pattern matching
|
|
99
|
+
fn describe_number(n: i32) -> String {
|
|
100
|
+
match n {
|
|
101
|
+
0 => "zero".to_string(),
|
|
102
|
+
1..=10 => "small".to_string(),
|
|
103
|
+
11..=100 => "medium".to_string(),
|
|
104
|
+
_ => "large".to_string(),
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
\`\`\`
|
|
108
|
+
|
|
109
|
+
### Go
|
|
110
|
+
|
|
111
|
+
\`\`\`go
|
|
112
|
+
// Goroutines and channels
|
|
113
|
+
func worker(id int, jobs <-chan int, results chan<- int) {
|
|
114
|
+
for j := range jobs {
|
|
115
|
+
fmt.Printf("worker %d processing job %d\\n", id, j)
|
|
116
|
+
results <- j * 2
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
\`\`\`
|
|
120
|
+
|
|
121
|
+
### JSON
|
|
122
|
+
|
|
123
|
+
\`\`\`json
|
|
124
|
+
{
|
|
125
|
+
"name": "Response Component",
|
|
126
|
+
"version": "1.0.0",
|
|
127
|
+
"features": [
|
|
128
|
+
"markdown rendering",
|
|
129
|
+
"syntax highlighting",
|
|
130
|
+
"streaming support"
|
|
131
|
+
],
|
|
132
|
+
"config": {
|
|
133
|
+
"theme": "dark",
|
|
134
|
+
"lineNumbers": true
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
\`\`\`
|
|
138
|
+
|
|
139
|
+
### YAML
|
|
140
|
+
|
|
141
|
+
\`\`\`yaml
|
|
142
|
+
# Configuration file
|
|
143
|
+
app:
|
|
144
|
+
name: MyApp
|
|
145
|
+
version: 1.0.0
|
|
146
|
+
port: 3000
|
|
147
|
+
|
|
148
|
+
database:
|
|
149
|
+
host: localhost
|
|
150
|
+
port: 5432
|
|
151
|
+
credentials:
|
|
152
|
+
username: admin
|
|
153
|
+
password: secret
|
|
154
|
+
|
|
155
|
+
features:
|
|
156
|
+
- authentication
|
|
157
|
+
- logging
|
|
158
|
+
- caching
|
|
159
|
+
\`\`\`
|
|
160
|
+
|
|
161
|
+
### Shell/Bash
|
|
162
|
+
|
|
163
|
+
\`\`\`bash
|
|
164
|
+
#!/bin/bash
|
|
165
|
+
|
|
166
|
+
# Deploy script
|
|
167
|
+
echo "Starting deployment..."
|
|
168
|
+
|
|
169
|
+
npm install
|
|
170
|
+
npm run build
|
|
171
|
+
npm test
|
|
172
|
+
|
|
173
|
+
if [ $? -eq 0 ]; then
|
|
174
|
+
echo "Deployment successful!"
|
|
175
|
+
else
|
|
176
|
+
echo "Deployment failed!"
|
|
177
|
+
exit 1
|
|
178
|
+
fi
|
|
179
|
+
\`\`\`
|
|
180
|
+
|
|
181
|
+
## Inline Code
|
|
182
|
+
|
|
183
|
+
You can use inline code like \`const x = 5\`, \`npm install\`, or \`SELECT * FROM users\` within sentences.
|
|
184
|
+
|
|
185
|
+
Mixed with text: The \`Array.map()\` method creates a new array and the \`filter()\` method filters elements.
|
|
186
|
+
|
|
187
|
+
## Code Without Language
|
|
188
|
+
|
|
189
|
+
\`\`\`
|
|
190
|
+
Plain text code block
|
|
191
|
+
No syntax highlighting
|
|
192
|
+
Just monospace font
|
|
193
|
+
\`\`\`
|
|
194
|
+
|
|
195
|
+
## Long Code Blocks
|
|
196
|
+
|
|
197
|
+
\`\`\`javascript
|
|
198
|
+
// Complex React component
|
|
199
|
+
import React, { useState, useEffect, useCallback } from 'react';
|
|
200
|
+
|
|
201
|
+
const UserDashboard = ({ userId }) => {
|
|
202
|
+
const [user, setUser] = useState(null);
|
|
203
|
+
const [loading, setLoading] = useState(true);
|
|
204
|
+
const [error, setError] = useState(null);
|
|
205
|
+
|
|
206
|
+
const fetchUser = useCallback(async () => {
|
|
207
|
+
try {
|
|
208
|
+
setLoading(true);
|
|
209
|
+
const response = await fetch(\`/api/users/\${userId}\`);
|
|
210
|
+
if (!response.ok) throw new Error('Failed to fetch user');
|
|
211
|
+
const data = await response.json();
|
|
212
|
+
setUser(data);
|
|
213
|
+
} catch (err) {
|
|
214
|
+
setError(err.message);
|
|
215
|
+
} finally {
|
|
216
|
+
setLoading(false);
|
|
217
|
+
}
|
|
218
|
+
}, [userId]);
|
|
219
|
+
|
|
220
|
+
useEffect(() => {
|
|
221
|
+
fetchUser();
|
|
222
|
+
}, [fetchUser]);
|
|
223
|
+
|
|
224
|
+
if (loading) return <div>Loading...</div>;
|
|
225
|
+
if (error) return <div>Error: {error}</div>;
|
|
226
|
+
if (!user) return <div>No user found</div>;
|
|
227
|
+
|
|
228
|
+
return (
|
|
229
|
+
<div className="dashboard">
|
|
230
|
+
<h1>{user.name}</h1>
|
|
231
|
+
<p>Email: {user.email}</p>
|
|
232
|
+
<button onClick={fetchUser}>Refresh</button>
|
|
233
|
+
</div>
|
|
234
|
+
);
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export default UserDashboard;
|
|
238
|
+
\`\`\`
|
|
239
|
+
`;
|
|
240
|
+
export const Component = () => {
|
|
241
|
+
return (_jsx("div", { className: "max-w-4xl", children: _jsx(Response, { children: codeExamplesMarkdown }) }));
|
|
242
|
+
};
|
|
243
|
+
export default Component;
|
|
244
|
+
//# 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,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwN5B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,CACL,cAAK,SAAS,EAAC,WAAW,YACxB,KAAC,QAAQ,cAAE,oBAAoB,GAAY,GACvC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { Response } from '@neo4j-ndl/react/ai';
|
|
23
|
+
const markdownContent = `
|
|
24
|
+
# Hello World
|
|
25
|
+
|
|
26
|
+
This is a **bold** text and this is an *italic* text.
|
|
27
|
+
|
|
28
|
+
Here is a list:
|
|
29
|
+
- Item 1
|
|
30
|
+
- Item 2
|
|
31
|
+
- Item 3
|
|
32
|
+
|
|
33
|
+
And a code block:
|
|
34
|
+
|
|
35
|
+
\`\`\`typescript
|
|
36
|
+
const greeting = "Hello World";
|
|
37
|
+
console.log(greeting);
|
|
38
|
+
\`\`\`
|
|
39
|
+
|
|
40
|
+
[Link to Neo4j](https://neo4j.com)
|
|
41
|
+
`;
|
|
42
|
+
export const Component = () => {
|
|
43
|
+
return _jsx(Response, { children: markdownContent });
|
|
44
|
+
};
|
|
45
|
+
export default Component;
|
|
46
|
+
//# 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,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;CAkBvB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,KAAC,QAAQ,cAAE,eAAe,GAAY,CAAC;AAChD,CAAC,CAAC;AAEF,eAAe,SAAS,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"]}
|