@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,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
|
+
const ai_1 = require("@neo4j-ndl/react/ai");
|
|
26
|
+
const Component = () => {
|
|
27
|
+
return (0, jsx_runtime_1.jsx)(ai_1.Suggestion, { isPrimary: true, children: "How do I get started with Aura?" });
|
|
28
|
+
};
|
|
29
|
+
exports.default = Component;
|
|
30
|
+
//# sourceMappingURL=suggestion-primary.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion-primary.story.js","sourceRoot":"","sources":["../../../../../src/ai/suggestion/stories/suggestion-primary.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAiD;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,uBAAC,eAAU,IAAC,SAAS,sDAA6C,CAAC;AAC5E,CAAC,CAAC;AAEF,kBAAe,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Suggestion } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return <Suggestion isPrimary>How do I get started with Aura?</Suggestion>;\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
|
+
const ai_1 = require("@neo4j-ndl/react/ai");
|
|
26
|
+
const Component = () => {
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-8", children: [(0, jsx_runtime_1.jsx)(ai_1.Suggestion, { size: "small", children: "This is a small suggestion" }), (0, jsx_runtime_1.jsx)(ai_1.Suggestion, { size: "large", children: "This is a large suggestion" })] }));
|
|
28
|
+
};
|
|
29
|
+
exports.default = Component;
|
|
30
|
+
//# sourceMappingURL=suggestion-sizes.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion-sizes.story.js","sourceRoot":"","sources":["../../../../../src/ai/suggestion/stories/suggestion-sizes.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAiD;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCAAK,SAAS,EAAC,iCAAiC,aAC9C,uBAAC,eAAU,IAAC,IAAI,EAAC,OAAO,2CAAwC,EAChE,uBAAC,eAAU,IAAC,IAAI,EAAC,OAAO,2CAAwC,IAC5D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Suggestion } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-row n-gap-token-8\">\n <Suggestion size=\"small\">This is a small suggestion</Suggestion>\n <Suggestion size=\"large\">This is a large suggestion</Suggestion>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.Primary = exports.Icon = exports.Sizes = exports.Default = void 0;
|
|
25
|
+
const Suggestion_1 = require("../Suggestion");
|
|
26
|
+
const _1 = require(".");
|
|
27
|
+
const componentMeta = {
|
|
28
|
+
component: Suggestion_1.Suggestion,
|
|
29
|
+
id: 'components-ai-suggestion',
|
|
30
|
+
parameters: {
|
|
31
|
+
controls: { disable: true },
|
|
32
|
+
},
|
|
33
|
+
tags: ['docsPage'],
|
|
34
|
+
title: 'Components/AI/Suggestion',
|
|
35
|
+
};
|
|
36
|
+
exports.default = componentMeta;
|
|
37
|
+
exports.Default = {
|
|
38
|
+
args: {},
|
|
39
|
+
parameters: {
|
|
40
|
+
docs: {
|
|
41
|
+
source: {
|
|
42
|
+
code: _1.SuggestionDefaultSrc,
|
|
43
|
+
language: 'tsx',
|
|
44
|
+
type: 'code',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
render: _1.SuggestionDefault,
|
|
49
|
+
};
|
|
50
|
+
exports.Sizes = {
|
|
51
|
+
args: {},
|
|
52
|
+
parameters: {
|
|
53
|
+
docs: {
|
|
54
|
+
source: {
|
|
55
|
+
code: _1.SuggestionSizesSrc,
|
|
56
|
+
language: 'tsx',
|
|
57
|
+
type: 'code',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
render: _1.SuggestionSizes,
|
|
62
|
+
};
|
|
63
|
+
exports.Icon = {
|
|
64
|
+
args: {},
|
|
65
|
+
parameters: {
|
|
66
|
+
docs: {
|
|
67
|
+
source: {
|
|
68
|
+
code: _1.SuggestionIconSrc,
|
|
69
|
+
language: 'tsx',
|
|
70
|
+
type: 'code',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
render: _1.SuggestionIcon,
|
|
75
|
+
};
|
|
76
|
+
exports.Primary = {
|
|
77
|
+
args: {},
|
|
78
|
+
parameters: {
|
|
79
|
+
docs: {
|
|
80
|
+
source: {
|
|
81
|
+
code: _1.SuggestionPrimarySrc,
|
|
82
|
+
language: 'tsx',
|
|
83
|
+
type: 'code',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
render: _1.SuggestionPrimary,
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=suggestion.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion.stories.js","sourceRoot":"","sources":["../../../../../src/ai/suggestion/stories/suggestion.stories.tsx"],"names":[],"mappings":";;;AAsBA,8CAA2C;AAC3C,wBASW;AAEX,MAAM,aAAa,GAA4B;IAC7C,SAAS,EAAE,uBAAU;IACrB,EAAE,EAAE,0BAA0B;IAC9B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,0BAA0B;CAClC,CAAC;AAEF,kBAAe,aAAa,CAAC;AAIhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,uBAAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,oBAAiB;CAC1B,CAAC;AAEW,QAAA,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAkB;gBACxB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,kBAAe;CACxB,CAAC;AAEW,QAAA,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAc;CACvB,CAAC;AAEW,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,uBAAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,oBAAiB;CAC1B,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 { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Suggestion } from '../Suggestion';\nimport {\n SuggestionDefault,\n SuggestionDefaultSrc,\n SuggestionIcon,\n SuggestionIconSrc,\n SuggestionPrimary,\n SuggestionPrimarySrc,\n SuggestionSizes,\n SuggestionSizesSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof Suggestion> = {\n component: Suggestion,\n id: 'components-ai-suggestion',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/AI/Suggestion',\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SuggestionDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SuggestionDefault,\n};\n\nexport const Sizes: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SuggestionSizesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SuggestionSizes,\n};\n\nexport const Icon: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SuggestionIconSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SuggestionIcon,\n};\n\nexport const Primary: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SuggestionPrimarySrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SuggestionPrimary,\n};\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
24
|
+
var t = {};
|
|
25
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
26
|
+
t[p] = s[p];
|
|
27
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
28
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
29
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
30
|
+
t[p[i]] = s[p[i]];
|
|
31
|
+
}
|
|
32
|
+
return t;
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.Thinking = void 0;
|
|
39
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
41
|
+
const presence_1 = require("../presence");
|
|
42
|
+
const thinking_duration_formatter_1 = require("./thinking-duration-formatter");
|
|
43
|
+
/**
|
|
44
|
+
* The component is used to display the thinking state of an LLM.
|
|
45
|
+
* If the `isThinking` prop is true, it will render a thinking presence icon and the text "Thinking".
|
|
46
|
+
* If the `isThinking` prop is false, it will render the duration of the thinking.
|
|
47
|
+
*
|
|
48
|
+
* @alpha - Changes to this component may be breaking.
|
|
49
|
+
*/
|
|
50
|
+
const Thinking = (_a) => {
|
|
51
|
+
var { className, isThinking = true, style, htmlAttributes, ref, thinkingMs = 1000 } = _a, restProps = __rest(_a, ["className", "isThinking", "style", "htmlAttributes", "ref", "thinkingMs"]);
|
|
52
|
+
const classes = (0, classnames_1.default)('n-flex n-flex-col n-items-start n-gap-token-12', className);
|
|
53
|
+
const { value: thinkingDuration, unit } = (0, thinking_duration_formatter_1.formatThinkingDuration)(thinkingMs);
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: isThinking === true ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(presence_1.Presence, { isThinking: isThinking, className: "n-size-token-32" }), (0, jsx_runtime_1.jsx)("span", { className: "n-subheading-small n-text-neutral-text-default", children: "Thinking" })] })) : ((0, jsx_runtime_1.jsxs)("span", { className: "n-subheading-small n-text-neutral-text-weak", children: ["Thought", ' ', (0, jsx_runtime_1.jsxs)("span", { className: "n-font-normal", children: ["for ", thinkingDuration, " ", unit] })] })) })));
|
|
55
|
+
};
|
|
56
|
+
exports.Thinking = Thinking;
|
|
57
|
+
//# sourceMappingURL=Thinking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thinking.js","sourceRoot":"","sources":["../../../../src/ai/thinking/Thinking.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,4DAAoC;AAEpC,0CAAuC;AACvC,+EAAuE;AAYvE;;;;;;GAMG;AACH,MAAM,QAAQ,GAAG,CAAC,EAQkB,EAAE,EAAE;QARtB,EAChB,SAAS,EACT,UAAU,GAAG,IAAI,EACjB,KAAK,EACL,cAAc,EACd,GAAG,EACH,UAAU,GAAG,IAAI,OAEiB,EAD/B,SAAS,cAPI,2EAQjB,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EACxB,gDAAgD,EAChD,SAAS,CACV,CAAC;IAEF,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,IAAA,oDAAsB,EAAC,UAAU,CAAC,CAAC;IAE7E,OAAO,CACL,8CACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,cAEjB,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,CACrB,6DACE,uBAAC,mBAAQ,IAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAC,iBAAiB,GAAG,EAChE,iCAAM,SAAS,EAAC,gDAAgD,yBAEzD,IACN,CACJ,CAAC,CAAC,CAAC,CACF,kCAAM,SAAS,EAAC,6CAA6C,wBACnD,GAAG,EACX,kCAAM,SAAS,EAAC,eAAe,qBACxB,gBAAgB,OAAG,IAAI,IACvB,IACF,CACR,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEO,4BAAQ","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 type { CommonProps } from '@neo4j-ndl/react/_common/types';\nimport classNames from 'classnames';\n\nimport { Presence } from '../presence';\nimport { formatThinkingDuration } from './thinking-duration-formatter';\n\ntype ThinkingProps = {\n /** Whether the AI is thinking.\n * If true, will render a thinking presence icon and the text \"Thinking\".\n * If false, will render the duration of the thinking.\n */\n isThinking?: boolean;\n /** The duration of the thinking in milliseconds */\n thinkingMs?: number;\n};\n\n/**\n * The component is used to display the thinking state of an LLM.\n * If the `isThinking` prop is true, it will render a thinking presence icon and the text \"Thinking\".\n * If the `isThinking` prop is false, it will render the duration of the thinking.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst Thinking = ({\n className,\n isThinking = true,\n style,\n htmlAttributes,\n ref,\n thinkingMs = 1000,\n ...restProps\n}: CommonProps<'div', ThinkingProps>) => {\n const classes = classNames(\n 'n-flex n-flex-col n-items-start n-gap-token-12',\n className,\n );\n\n const { value: thinkingDuration, unit } = formatThinkingDuration(thinkingMs);\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {isThinking === true ? (\n <>\n <Presence isThinking={isThinking} className=\"n-size-token-32\" />\n <span className=\"n-subheading-small n-text-neutral-text-default\">\n Thinking\n </span>\n </>\n ) : (\n <span className=\"n-subheading-small n-text-neutral-text-weak\">\n Thought{' '}\n <span className=\"n-font-normal\">\n for {thinkingDuration} {unit}\n </span>\n </span>\n )}\n </div>\n );\n};\n\nexport { Thinking };\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
26
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(o, k2, desc);
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
34
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
__exportStar(require("./Thinking"), exports);
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ai/thinking/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,6CAA2B","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 * from './Thinking';\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
|
+
const ai_1 = require("@neo4j-ndl/react/ai");
|
|
26
|
+
const Component = () => {
|
|
27
|
+
return (0, jsx_runtime_1.jsx)(ai_1.Thinking, { isThinking: true, thinkingMs: 1400 });
|
|
28
|
+
};
|
|
29
|
+
exports.default = Component;
|
|
30
|
+
//# sourceMappingURL=ai-thinking-default.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-thinking-default.story.js","sourceRoot":"","sources":["../../../../../src/ai/thinking/stories/ai-thinking-default.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA+C;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,uBAAC,aAAQ,IAAC,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,GAAI,CAAC;AAC1D,CAAC,CAAC;AAEF,kBAAe,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Thinking } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return <Thinking isThinking={true} thinkingMs={1400} />;\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
|
+
const ai_1 = require("@neo4j-ndl/react/ai");
|
|
26
|
+
const Component = () => {
|
|
27
|
+
return (0, jsx_runtime_1.jsx)(ai_1.Thinking, { isThinking: false, thinkingMs: 1400 });
|
|
28
|
+
};
|
|
29
|
+
exports.default = Component;
|
|
30
|
+
//# sourceMappingURL=ai-thinking-finished.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-thinking-finished.story.js","sourceRoot":"","sources":["../../../../../src/ai/thinking/stories/ai-thinking-finished.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA+C;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,uBAAC,aAAQ,IAAC,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,GAAI,CAAC;AAC3D,CAAC,CAAC;AAEF,kBAAe,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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Thinking } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return <Thinking isThinking={false} thinkingMs={1400} />;\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.Finished = exports.Default = void 0;
|
|
25
|
+
const Thinking_1 = require("../Thinking");
|
|
26
|
+
const _1 = require(".");
|
|
27
|
+
const componentMeta = {
|
|
28
|
+
component: Thinking_1.Thinking,
|
|
29
|
+
id: 'components-ai-thinking',
|
|
30
|
+
parameters: {
|
|
31
|
+
controls: { disable: true },
|
|
32
|
+
},
|
|
33
|
+
tags: ['docsPage'],
|
|
34
|
+
title: 'Components/AI/Thinking',
|
|
35
|
+
};
|
|
36
|
+
exports.default = componentMeta;
|
|
37
|
+
exports.Default = {
|
|
38
|
+
args: {},
|
|
39
|
+
parameters: {
|
|
40
|
+
docs: {
|
|
41
|
+
source: {
|
|
42
|
+
code: _1.ThinkingDefaultSrc,
|
|
43
|
+
language: 'tsx',
|
|
44
|
+
type: 'code',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
render: _1.ThinkingDefault,
|
|
49
|
+
};
|
|
50
|
+
exports.Finished = {
|
|
51
|
+
args: {},
|
|
52
|
+
parameters: {
|
|
53
|
+
docs: {
|
|
54
|
+
source: {
|
|
55
|
+
code: _1.ThinkingFinishedSrc,
|
|
56
|
+
language: 'tsx',
|
|
57
|
+
type: 'code',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
render: _1.ThinkingFinished,
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=ai-thinking.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-thinking.stories.js","sourceRoot":"","sources":["../../../../../src/ai/thinking/stories/ai-thinking.stories.tsx"],"names":[],"mappings":";;;AAsBA,0CAAuC;AACvC,wBAKW;AAEX,MAAM,aAAa,GAA0B;IAC3C,SAAS,EAAE,mBAAQ;IACnB,EAAE,EAAE,wBAAwB;IAC5B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,wBAAwB;CAChC,CAAC;AAEF,kBAAe,aAAa,CAAC;AAIhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAkB;gBACxB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,kBAAe;CACxB,CAAC;AAEW,QAAA,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAmB;gBACzB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,mBAAgB;CACzB,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 { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Thinking } from '../Thinking';\nimport {\n ThinkingDefault,\n ThinkingDefaultSrc,\n ThinkingFinished,\n ThinkingFinishedSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof Thinking> = {\n component: Thinking,\n id: 'components-ai-thinking',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/AI/Thinking',\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ThinkingDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ThinkingDefault,\n};\n\nexport const Finished: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ThinkingFinishedSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ThinkingFinished,\n};\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ThinkingFinishedSrc = exports.ThinkingDefaultSrc = exports.ThinkingFinished = exports.ThinkingDefault = void 0;
|
|
27
|
+
var ai_thinking_default_story_1 = require("./ai-thinking-default.story");
|
|
28
|
+
Object.defineProperty(exports, "ThinkingDefault", { enumerable: true, get: function () { return __importDefault(ai_thinking_default_story_1).default; } });
|
|
29
|
+
var ai_thinking_finished_story_1 = require("./ai-thinking-finished.story");
|
|
30
|
+
Object.defineProperty(exports, "ThinkingFinished", { enumerable: true, get: function () { return __importDefault(ai_thinking_finished_story_1).default; } });
|
|
31
|
+
const export_stories_utils_1 = require("@neo4j-ndl/react/_common/export-stories-utils");
|
|
32
|
+
const ai_thinking_default_story_raw_1 = __importDefault(require("./ai-thinking-default.story?raw"));
|
|
33
|
+
const ai_thinking_finished_story_raw_1 = __importDefault(require("./ai-thinking-finished.story?raw"));
|
|
34
|
+
exports.ThinkingDefaultSrc = (0, export_stories_utils_1.removeLicenseHeader)(ai_thinking_default_story_raw_1.default);
|
|
35
|
+
exports.ThinkingFinishedSrc = (0, export_stories_utils_1.removeLicenseHeader)(ai_thinking_finished_story_raw_1.default);
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/thinking/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,yEAAyE;AAAhE,6IAAA,OAAO,OAAmB;AACnC,2EAA2E;AAAlE,+IAAA,OAAO,OAAoB;AACpC,wFAAoF;AAEpF,oGAAoE;AACpE,sGAAsE;AAEzD,QAAA,kBAAkB,GAAG,IAAA,0CAAmB,EAAC,uCAAqB,CAAC,CAAC;AAChE,QAAA,mBAAmB,GAAG,IAAA,0CAAmB,EAAC,wCAAsB,CAAC,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 ThinkingDefault } from './ai-thinking-default.story';\nexport { default as ThinkingFinished } from './ai-thinking-finished.story';\nimport { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';\n\nimport ThinkingDefaultSrcRaw from './ai-thinking-default.story?raw';\nimport ThinkingFinishedSrcRaw from './ai-thinking-finished.story?raw';\n\nexport const ThinkingDefaultSrc = removeLicenseHeader(ThinkingDefaultSrcRaw);\nexport const ThinkingFinishedSrc = removeLicenseHeader(ThinkingFinishedSrcRaw);\n"]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.formatThinkingDuration = void 0;
|
|
24
|
+
/**
|
|
25
|
+
* Formats a duration in milliseconds to a human-readable representation with automatic unit selection.
|
|
26
|
+
*
|
|
27
|
+
* The function selects the most appropriate time unit (milliseconds, seconds, minutes, or hours)
|
|
28
|
+
* based on the input value and applies smart rounding:
|
|
29
|
+
* - Values under 10 in a given unit are rounded to 1 decimal place
|
|
30
|
+
* - Values 10 or greater are rounded to whole numbers
|
|
31
|
+
* - Unit names are automatically pluralized based on the value
|
|
32
|
+
*
|
|
33
|
+
* @param ms - The duration in milliseconds to format. Negative or NaN values return { unit: 'seconds', value: 0 }
|
|
34
|
+
* @returns An object containing:
|
|
35
|
+
* - `unit`: The time unit string (e.g., 'second', 'seconds', 'minute', 'minutes')
|
|
36
|
+
* - `value`: The numeric value in the selected unit
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* formatThinkingDuration(500) // { unit: 'milliseconds', value: 500 }
|
|
40
|
+
* formatThinkingDuration(1500) // { unit: 'seconds', value: 1.5 }
|
|
41
|
+
* formatThinkingDuration(65000) // { unit: 'minutes', value: 1.1 }
|
|
42
|
+
* formatThinkingDuration(3600000) // { unit: 'hour', value: 1 }
|
|
43
|
+
*/
|
|
44
|
+
const formatThinkingDuration = (ms) => {
|
|
45
|
+
if (Number.isNaN(ms) || ms < 0) {
|
|
46
|
+
return { unit: 'seconds', value: 0 };
|
|
47
|
+
}
|
|
48
|
+
if (ms < 1000) {
|
|
49
|
+
const value = Math.round(ms);
|
|
50
|
+
const unit = value === 1 ? 'millisecond' : 'milliseconds';
|
|
51
|
+
return { unit, value };
|
|
52
|
+
}
|
|
53
|
+
const seconds = ms / 1000;
|
|
54
|
+
if (seconds < 60) {
|
|
55
|
+
const value = seconds < 10 ? Math.round(seconds * 10) / 10 : Math.round(seconds);
|
|
56
|
+
const unit = value === 1 ? 'second' : 'seconds';
|
|
57
|
+
return { unit, value };
|
|
58
|
+
}
|
|
59
|
+
const minutes = seconds / 60;
|
|
60
|
+
if (minutes < 60) {
|
|
61
|
+
const value = minutes < 10 ? Math.round(minutes * 10) / 10 : Math.round(minutes);
|
|
62
|
+
const unit = value === 1 ? 'minute' : 'minutes';
|
|
63
|
+
return { unit, value };
|
|
64
|
+
}
|
|
65
|
+
const hours = minutes / 60;
|
|
66
|
+
const value = hours < 10 ? Math.round(hours * 10) / 10 : Math.round(hours);
|
|
67
|
+
const unit = value === 1 ? 'hour' : 'hours';
|
|
68
|
+
return { unit, value };
|
|
69
|
+
};
|
|
70
|
+
exports.formatThinkingDuration = formatThinkingDuration;
|
|
71
|
+
//# sourceMappingURL=thinking-duration-formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinking-duration-formatter.js","sourceRoot":"","sources":["../../../../src/ai/thinking/thinking-duration-formatter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,sBAAsB,GAAG,CACpC,EAAU,EACuB,EAAE;IACnC,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACvC,CAAC;IAED,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC7B,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC;QAC1D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC;IAE1B,IAAI,OAAO,GAAG,EAAE,EAAE,CAAC;QACjB,MAAM,KAAK,GACT,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QAChD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,GAAG,EAAE,CAAC;IAE7B,IAAI,OAAO,GAAG,EAAE,EAAE,CAAC;QACjB,MAAM,KAAK,GACT,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QAChD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,GAAG,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3E,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAE5C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACzB,CAAC,CAAC;AApCW,QAAA,sBAAsB,0BAoCjC","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\n/**\n * Formats a duration in milliseconds to a human-readable representation with automatic unit selection.\n *\n * The function selects the most appropriate time unit (milliseconds, seconds, minutes, or hours)\n * based on the input value and applies smart rounding:\n * - Values under 10 in a given unit are rounded to 1 decimal place\n * - Values 10 or greater are rounded to whole numbers\n * - Unit names are automatically pluralized based on the value\n *\n * @param ms - The duration in milliseconds to format. Negative or NaN values return { unit: 'seconds', value: 0 }\n * @returns An object containing:\n * - `unit`: The time unit string (e.g., 'second', 'seconds', 'minute', 'minutes')\n * - `value`: The numeric value in the selected unit\n *\n * @example\n * formatThinkingDuration(500) // { unit: 'milliseconds', value: 500 }\n * formatThinkingDuration(1500) // { unit: 'seconds', value: 1.5 }\n * formatThinkingDuration(65000) // { unit: 'minutes', value: 1.1 }\n * formatThinkingDuration(3600000) // { unit: 'hour', value: 1 }\n */\nexport const formatThinkingDuration = (\n ms: number,\n): { unit: string; value: number } => {\n if (Number.isNaN(ms) || ms < 0) {\n return { unit: 'seconds', value: 0 };\n }\n\n if (ms < 1000) {\n const value = Math.round(ms);\n const unit = value === 1 ? 'millisecond' : 'milliseconds';\n return { unit, value };\n }\n\n const seconds = ms / 1000;\n\n if (seconds < 60) {\n const value =\n seconds < 10 ? Math.round(seconds * 10) / 10 : Math.round(seconds);\n const unit = value === 1 ? 'second' : 'seconds';\n return { unit, value };\n }\n\n const minutes = seconds / 60;\n\n if (minutes < 60) {\n const value =\n minutes < 10 ? Math.round(minutes * 10) / 10 : Math.round(minutes);\n const unit = value === 1 ? 'minute' : 'minutes';\n return { unit, value };\n }\n\n const hours = minutes / 60;\n const value = hours < 10 ? Math.round(hours * 10) / 10 : Math.round(hours);\n const unit = value === 1 ? 'hour' : 'hours';\n\n return { unit, value };\n};\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ToolCall = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) "Neo4j"
|
|
22
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
23
|
+
*
|
|
24
|
+
* This file is part of Neo4j.
|
|
25
|
+
*
|
|
26
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
27
|
+
* it under the terms of the GNU General Public License as published by
|
|
28
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
29
|
+
* (at your option) any later version.
|
|
30
|
+
*
|
|
31
|
+
* This program is distributed in the hope that it will be useful,
|
|
32
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
33
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
34
|
+
* GNU General Public License for more details.
|
|
35
|
+
*
|
|
36
|
+
* You should have received a copy of the GNU General Public License
|
|
37
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
38
|
+
*/
|
|
39
|
+
const react_1 = require("@neo4j-ndl/react");
|
|
40
|
+
const icons_1 = require("@neo4j-ndl/react/icons");
|
|
41
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
42
|
+
/**
|
|
43
|
+
* The component is used to display that an LLM is using a tool.
|
|
44
|
+
* Per default, the component will display the text "Using".
|
|
45
|
+
* If the `isDone` prop is true, the component will display the check icon and the text "Ran".
|
|
46
|
+
*
|
|
47
|
+
* @alpha - Changes to this component may be breaking.
|
|
48
|
+
*/
|
|
49
|
+
const ToolCall = (_a) => {
|
|
50
|
+
var { children, isDone = false, ref, className, style, htmlAttributes } = _a, restProps = __rest(_a, ["children", "isDone", "ref", "className", "style", "htmlAttributes"]);
|
|
51
|
+
const classes = (0, classnames_1.default)('ndl-ai-tool n-inline-flex n-items-center n-gap-token-12 n-flex-row', className);
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Typography, Object.assign({ variant: "body-medium", ref: ref, className: classes, style: style, htmlAttributes: htmlAttributes }, restProps, { children: [(0, jsx_runtime_1.jsx)("span", { className: "n-text-neutral-text-weak n-capitalize n-inline-flex n-items-center n-gap-token-6 n-flex-row", children: isDone ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(icons_1.CheckIconOutline, { className: "n-size-token-16 n-text-neutral-text-weaker" }), "Ran"] })) : ('Using') }), (0, jsx_runtime_1.jsx)(react_1.Code, { isRunnable: false, children: children })] })));
|
|
53
|
+
};
|
|
54
|
+
exports.ToolCall = ToolCall;
|
|
55
|
+
//# sourceMappingURL=ToolCall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolCall.js","sourceRoot":"","sources":["../../../../src/ai/tool-call/ToolCall.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAAoD;AAEpD,kDAA0D;AAC1D,4DAAoC;AASpC;;;;;;GAMG;AACH,MAAM,QAAQ,GAAG,CAAC,EAQmB,EAAE,EAAE;QARvB,EAChB,QAAQ,EACR,MAAM,GAAG,KAAK,EACd,GAAG,EACH,SAAS,EACT,KAAK,EACL,cAAc,OAEqB,EADhC,SAAS,cAPI,qEAQjB,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EACxB,oEAAoE,EACpE,SAAS,CACV,CAAC;IAEF,OAAO,CACL,wBAAC,kBAAU,kBACT,OAAO,EAAC,aAAa,EACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,IAC1B,SAAS,eAEb,iCAAM,SAAS,EAAC,6FAA6F,YAC1G,MAAM,CAAC,CAAC,CAAC,CACR,6DACE,uBAAC,wBAAgB,IAAC,SAAS,EAAC,4CAA4C,GAAG,WAE1E,CACJ,CAAC,CAAC,CAAC,CACF,OAAO,CACR,GACI,EACP,uBAAC,YAAI,IAAC,UAAU,EAAE,KAAK,YAAG,QAAQ,GAAQ,KAC/B,CACd,CAAC;AACJ,CAAC,CAAC;AAEO,4BAAQ","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 { Code, Typography } from '@neo4j-ndl/react';\nimport { type CommonProps } from '@neo4j-ndl/react/_common/types';\nimport { CheckIconOutline } from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\n\ntype ToolCallProps = {\n /** The content of the suggestion */\n children?: React.ReactNode;\n /** Whether the AI is done with using the tool*/\n isDone?: boolean;\n};\n\n/**\n * The component is used to display that an LLM is using a tool.\n * Per default, the component will display the text \"Using\".\n * If the `isDone` prop is true, the component will display the check icon and the text \"Ran\".\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst ToolCall = ({\n children,\n isDone = false,\n ref,\n className,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'span', ToolCallProps>) => {\n const classes = classNames(\n 'ndl-ai-tool n-inline-flex n-items-center n-gap-token-12 n-flex-row',\n className,\n );\n\n return (\n <Typography\n variant=\"body-medium\"\n ref={ref}\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n <span className=\"n-text-neutral-text-weak n-capitalize n-inline-flex n-items-center n-gap-token-6 n-flex-row\">\n {isDone ? (\n <>\n <CheckIconOutline className=\"n-size-token-16 n-text-neutral-text-weaker\" />\n Ran\n </>\n ) : (\n 'Using'\n )}\n </span>\n <Code isRunnable={false}>{children}</Code>\n </Typography>\n );\n};\n\nexport { ToolCall };\n"]}
|