@neo4j-ndl/react 4.1.8 → 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/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/cjs/tooltip/use-tooltip.js +1 -0
- package/lib/cjs/tooltip/use-tooltip.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/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/esm/tooltip/use-tooltip.js +2 -1
- package/lib/esm/tooltip/use-tooltip.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/lib/types/timezone-picker/stories/timezone-picker-dst-aware.story.d.ts.map +1 -1
- package/lib/types/tooltip/use-tooltip.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,34 @@
|
|
|
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 CodePreviewLoading } from './code-preview-loading.story';
|
|
22
|
+
export { default as CodePreviewRead } from './code-preview-read.story';
|
|
23
|
+
export { default as CodePreviewWrite } from './code-preview-write.story';
|
|
24
|
+
export { default as CodePreviewLanguages } from './code-preview-languages.story';
|
|
25
|
+
import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
|
|
26
|
+
import CodePreviewLanguagesSourceRaw from './code-preview-languages.story?raw';
|
|
27
|
+
import CodePreviewLoadingSourceRaw from './code-preview-loading.story?raw';
|
|
28
|
+
import CodePreviewReadSourceRaw from './code-preview-read.story?raw';
|
|
29
|
+
import CodePreviewWriteSourceRaw from './code-preview-write.story?raw';
|
|
30
|
+
export const CodePreviewLoadingSource = removeLicenseHeader(CodePreviewLoadingSourceRaw);
|
|
31
|
+
export const CodePreviewReadSource = removeLicenseHeader(CodePreviewReadSourceRaw);
|
|
32
|
+
export const CodePreviewWriteSource = removeLicenseHeader(CodePreviewWriteSourceRaw);
|
|
33
|
+
export const CodePreviewLanguagesSource = removeLicenseHeader(CodePreviewLanguagesSourceRaw);
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/code-preview/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,6BAA6B,MAAM,oCAAoC,CAAC;AAC/E,OAAO,2BAA2B,MAAM,kCAAkC,CAAC;AAC3E,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AACrE,OAAO,yBAAyB,MAAM,gCAAgC,CAAC;AAEvE,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,2BAA2B,CAC5B,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,yBAAyB,CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAC3D,6BAA6B,CAC9B,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 CodePreviewLoading } from './code-preview-loading.story';\nexport { default as CodePreviewRead } from './code-preview-read.story';\nexport { default as CodePreviewWrite } from './code-preview-write.story';\nexport { default as CodePreviewLanguages } from './code-preview-languages.story';\n\nimport { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';\n\nimport CodePreviewLanguagesSourceRaw from './code-preview-languages.story?raw';\nimport CodePreviewLoadingSourceRaw from './code-preview-loading.story?raw';\nimport CodePreviewReadSourceRaw from './code-preview-read.story?raw';\nimport CodePreviewWriteSourceRaw from './code-preview-write.story?raw';\n\nexport const CodePreviewLoadingSource = removeLicenseHeader(\n CodePreviewLoadingSourceRaw,\n);\nexport const CodePreviewReadSource = removeLicenseHeader(\n CodePreviewReadSourceRaw,\n);\nexport const CodePreviewWriteSource = removeLicenseHeader(\n CodePreviewWriteSourceRaw,\n);\nexport const CodePreviewLanguagesSource = removeLicenseHeader(\n CodePreviewLanguagesSourceRaw,\n);\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import { CleanIconButton, LoadingSpinner, Tooltip } from '@neo4j-ndl/react';
|
|
34
|
+
import { XMarkIconOutline } from '@neo4j-ndl/react/icons';
|
|
35
|
+
import classNames from 'classnames';
|
|
36
|
+
/**
|
|
37
|
+
* The component is used to display a file in a chat, or in a prompt.
|
|
38
|
+
* It can be removable and it can be loading.
|
|
39
|
+
*
|
|
40
|
+
* @alpha - Changes to this component may be breaking.
|
|
41
|
+
*/
|
|
42
|
+
const FileTag = (_a) => {
|
|
43
|
+
var { onClick, isRemovable = false, fileName, fileType, icon, className, style, htmlAttributes, ref, isLoading = false } = _a, restProps = __rest(_a, ["onClick", "isRemovable", "fileName", "fileType", "icon", "className", "style", "htmlAttributes", "ref", "isLoading"]);
|
|
44
|
+
const Component = isRemovable !== true ? 'button' : 'div';
|
|
45
|
+
const classes = classNames('ndl-ai-file-tag', className);
|
|
46
|
+
const file = `${fileName}.${fileType}`;
|
|
47
|
+
return (_jsxs(Tooltip, { type: "simple", placement: "bottom", hoverDelay: { close: 0, open: 500 }, children: [_jsx(Tooltip.Trigger, { hasButtonWrapper: true, children: _jsxs(Component, Object.assign({ ref: ref, className: classes, style: style }, (isRemovable ? {} : { onClick }), restProps, htmlAttributes, { children: [_jsx("div", { className: "ndl-ai-file-tag-leading", children: isLoading ? _jsx(LoadingSpinner, { size: "medium" }) : icon }), _jsxs("div", { className: "ndl-ai-file-tag-content", children: [_jsx("span", { className: "ndl-ai-file-tag-content-title", children: fileName }), _jsx("span", { className: "ndl-ai-file-tag-content-type", children: fileType === null || fileType === void 0 ? void 0 : fileType.toUpperCase() })] }), isRemovable && (_jsx(CleanIconButton, { onClick: onClick, description: null, htmlAttributes: {
|
|
48
|
+
'aria-label': `Remove ${file}`,
|
|
49
|
+
}, size: "small", className: "ndl-ai-file-tag-remove", children: _jsx(XMarkIconOutline, {}) }))] })) }), _jsx(Tooltip.Content, { children: file })] }));
|
|
50
|
+
};
|
|
51
|
+
export { FileTag };
|
|
52
|
+
//# sourceMappingURL=FileTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileTag.js","sourceRoot":"","sources":["../../../../src/ai/file-tag/FileTag.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,UAAU,MAAM,YAAY,CAAC;AAiBpC;;;;;GAKG;AACH,MAAM,OAAO,GAAG,CAAC,EAY8B,EAAE,EAAE;QAZlC,EACf,OAAO,EACP,WAAW,GAAG,KAAK,EACnB,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,EACH,SAAS,GAAG,KAAK,OAE4B,EAD1C,SAAS,cAXG,sHAYhB,CADa;IAEZ,MAAM,SAAS,GAAG,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1D,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;IAEzD,MAAM,IAAI,GAAG,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC;IAEvC,OAAO,CACL,MAAC,OAAO,IACN,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,QAAQ,EAClB,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,aAEnC,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,MAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,IACR,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAEhC,SAAS,EACT,cAAc,eAElB,cAAK,SAAS,EAAC,yBAAyB,YACrC,SAAS,CAAC,CAAC,CAAC,KAAC,cAAc,IAAC,IAAI,EAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,GAChD,EACN,eAAK,SAAS,EAAC,yBAAyB,aACtC,eAAM,SAAS,EAAC,+BAA+B,YAAE,QAAQ,GAAQ,EACjE,eAAM,SAAS,EAAC,8BAA8B,YAC3C,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,GACnB,IACH,EACL,WAAW,IAAI,CACd,KAAC,eAAe,IACd,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,IAAI,EACjB,cAAc,EAAE;gCACd,YAAY,EAAE,UAAU,IAAI,EAAE;6BAC/B,EACD,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,wBAAwB,YAElC,KAAC,gBAAgB,KAAG,GACJ,CACnB,KACS,GACI,EAClB,KAAC,OAAO,CAAC,OAAO,cAAE,IAAI,GAAmB,IACjC,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,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 { CleanIconButton, LoadingSpinner, Tooltip } from '@neo4j-ndl/react';\nimport { type CommonProps } from '@neo4j-ndl/react/_common/types';\nimport { XMarkIconOutline } from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\n\ntype FileTagProps = {\n /** The icon that represents the file type */\n icon: React.ReactNode;\n /** The name of the file */\n fileName: string;\n /** The type of the file, e.g. 'pdf', 'docx', 'txt', etc. */\n fileType: string;\n /** Callback function triggered either when the file tag is clicked, or when the remove button is clicked (if isRemovable is true) */\n onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Whether the file tag is removable */\n isRemovable?: boolean;\n /** Whether the file tag is loading */\n isLoading?: boolean;\n};\n\n/**\n * The component is used to display a file in a chat, or in a prompt.\n * It can be removable and it can be loading.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst FileTag = ({\n onClick,\n isRemovable = false,\n fileName,\n fileType,\n icon,\n className,\n style,\n htmlAttributes,\n ref,\n isLoading = false,\n ...restProps\n}: CommonProps<React.ElementType, FileTagProps>) => {\n const Component = isRemovable !== true ? 'button' : 'div';\n const classes = classNames('ndl-ai-file-tag', className);\n\n const file = `${fileName}.${fileType}`;\n\n return (\n <Tooltip\n type=\"simple\"\n placement=\"bottom\"\n hoverDelay={{ close: 0, open: 500 }}\n >\n <Tooltip.Trigger hasButtonWrapper>\n <Component\n ref={ref}\n className={classes}\n style={style}\n {...(isRemovable ? {} : { onClick })}\n // what is read by screen readers here?\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-ai-file-tag-leading\">\n {isLoading ? <LoadingSpinner size=\"medium\" /> : icon}\n </div>\n <div className=\"ndl-ai-file-tag-content\">\n <span className=\"ndl-ai-file-tag-content-title\">{fileName}</span>\n <span className=\"ndl-ai-file-tag-content-type\">\n {fileType?.toUpperCase()}\n </span>\n </div>\n {isRemovable && (\n <CleanIconButton\n onClick={onClick}\n description={null}\n htmlAttributes={{\n 'aria-label': `Remove ${file}`,\n }}\n size=\"small\"\n className=\"ndl-ai-file-tag-remove\"\n >\n <XMarkIconOutline />\n </CleanIconButton>\n )}\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content>{file}</Tooltip.Content>\n </Tooltip>\n );\n};\n\nexport { FileTag };\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 * from './FileTag';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ai/file-tag/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,WAAW,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 * from './FileTag';\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { FileTag } from '@neo4j-ndl/react/ai';
|
|
24
|
+
import { DocumentIconOutline } from '@neo4j-ndl/react/icons';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
return (_jsx(FileTag, { icon: _jsx(DocumentIconOutline, {}), fileName: "Science Fiction Bestsellers", fileType: "pdf" }));
|
|
27
|
+
};
|
|
28
|
+
export default Component;
|
|
29
|
+
//# sourceMappingURL=file-tag-chat.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-tag-chat.story.js","sourceRoot":"","sources":["../../../../../src/ai/file-tag/stories/file-tag-chat.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,OAAO,IACN,IAAI,EAAE,KAAC,mBAAmB,KAAG,EAC7B,QAAQ,EAAC,6BAA6B,EACtC,QAAQ,EAAC,KAAK,GACd,CACH,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 */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FileTag } from '@neo4j-ndl/react/ai';\nimport { DocumentIconOutline } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <FileTag\n icon={<DocumentIconOutline />}\n fileName=\"Science Fiction Bestsellers\"\n fileType=\"pdf\"\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { FileTag } from '@neo4j-ndl/react/ai';
|
|
24
|
+
import { DocumentIconOutline } from '@neo4j-ndl/react/icons';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
return (_jsx(FileTag, { isLoading: true, icon: _jsx(DocumentIconOutline, {}), fileName: "Science Fiction Bestsellers", fileType: "pdf", onClick: () => {
|
|
27
|
+
alert('remove file');
|
|
28
|
+
} }));
|
|
29
|
+
};
|
|
30
|
+
export default Component;
|
|
31
|
+
//# sourceMappingURL=file-tag-loading.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-tag-loading.story.js","sourceRoot":"","sources":["../../../../../src/ai/file-tag/stories/file-tag-loading.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,OAAO,IACN,SAAS,EAAE,IAAI,EACf,IAAI,EAAE,KAAC,mBAAmB,KAAG,EAC7B,QAAQ,EAAC,6BAA6B,EACtC,QAAQ,EAAC,KAAK,EACd,OAAO,EAAE,GAAG,EAAE;YACZ,KAAK,CAAC,aAAa,CAAC,CAAC;QACvB,CAAC,GACD,CACH,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 */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FileTag } from '@neo4j-ndl/react/ai';\nimport { DocumentIconOutline } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <FileTag\n isLoading={true}\n icon={<DocumentIconOutline />}\n fileName=\"Science Fiction Bestsellers\"\n fileType=\"pdf\"\n onClick={() => {\n alert('remove file');\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { FileTag } from '@neo4j-ndl/react/ai';
|
|
24
|
+
import { DocumentIconOutline } from '@neo4j-ndl/react/icons';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
return (_jsx(FileTag, { icon: _jsx(DocumentIconOutline, {}), fileName: "Science Fiction Bestsellers", fileType: "pdf", isRemovable: true, onClick: () => {
|
|
27
|
+
alert('remove file');
|
|
28
|
+
} }));
|
|
29
|
+
};
|
|
30
|
+
export default Component;
|
|
31
|
+
//# sourceMappingURL=file-tag-prompt.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-tag-prompt.story.js","sourceRoot":"","sources":["../../../../../src/ai/file-tag/stories/file-tag-prompt.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,OAAO,IACN,IAAI,EAAE,KAAC,mBAAmB,KAAG,EAC7B,QAAQ,EAAC,6BAA6B,EACtC,QAAQ,EAAC,KAAK,EACd,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE;YACZ,KAAK,CAAC,aAAa,CAAC,CAAC;QACvB,CAAC,GACD,CACH,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 */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FileTag } from '@neo4j-ndl/react/ai';\nimport { DocumentIconOutline } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <FileTag\n icon={<DocumentIconOutline />}\n fileName=\"Science Fiction Bestsellers\"\n fileType=\"pdf\"\n isRemovable={true}\n onClick={() => {\n alert('remove file');\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
import { FileTag } from '../FileTag';
|
|
23
|
+
import { FileTagChat, FileTagChatSrc, FileTagLoading, FileTagLoadingSrc, FileTagPrompt, FileTagPromptSrc, } from '.';
|
|
24
|
+
const componentMeta = {
|
|
25
|
+
component: FileTag,
|
|
26
|
+
id: 'components-ai-file-tag',
|
|
27
|
+
parameters: {
|
|
28
|
+
controls: { disable: true },
|
|
29
|
+
},
|
|
30
|
+
tags: ['docsPage'],
|
|
31
|
+
title: 'Components/AI/FileTag',
|
|
32
|
+
};
|
|
33
|
+
export default componentMeta;
|
|
34
|
+
export const Default = {
|
|
35
|
+
args: {},
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
source: {
|
|
39
|
+
code: FileTagChatSrc,
|
|
40
|
+
language: 'tsx',
|
|
41
|
+
type: 'code',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
render: FileTagChat,
|
|
46
|
+
};
|
|
47
|
+
export const Loading = {
|
|
48
|
+
args: {},
|
|
49
|
+
parameters: {
|
|
50
|
+
docs: {
|
|
51
|
+
source: {
|
|
52
|
+
code: FileTagLoadingSrc,
|
|
53
|
+
language: 'tsx',
|
|
54
|
+
type: 'code',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
render: FileTagLoading,
|
|
59
|
+
};
|
|
60
|
+
export const Removable = {
|
|
61
|
+
args: {},
|
|
62
|
+
parameters: {
|
|
63
|
+
docs: {
|
|
64
|
+
source: {
|
|
65
|
+
code: FileTagPromptSrc,
|
|
66
|
+
language: 'tsx',
|
|
67
|
+
type: 'code',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
render: FileTagPrompt,
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=file-tag.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-tag.stories.js","sourceRoot":"","sources":["../../../../../src/ai/file-tag/stories/file-tag.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB,GACjB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAyB;IAC1C,SAAS,EAAE,OAAO;IAClB,EAAE,EAAE,wBAAwB;IAC5B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,uBAAuB;CAC/B,CAAC;AAEF,eAAe,aAAa,CAAC;AAI7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,cAAc;gBACpB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,WAAW;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,gBAAgB;gBACtB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,aAAa;CACtB,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 { FileTag } from '../FileTag';\nimport {\n FileTagChat,\n FileTagChatSrc,\n FileTagLoading,\n FileTagLoadingSrc,\n FileTagPrompt,\n FileTagPromptSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof FileTag> = {\n component: FileTag,\n id: 'components-ai-file-tag',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/AI/FileTag',\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: FileTagChatSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: FileTagChat,\n};\n\nexport const Loading: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: FileTagLoadingSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: FileTagLoading,\n};\n\nexport const Removable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: FileTagPromptSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: FileTagPrompt,\n};\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 FileTagLoading } from './file-tag-loading.story';
|
|
22
|
+
export { default as FileTagChat } from './file-tag-chat.story';
|
|
23
|
+
export { default as FileTagPrompt } from './file-tag-prompt.story';
|
|
24
|
+
import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
|
|
25
|
+
import FileTagChatSrcRaw from './file-tag-chat.story?raw';
|
|
26
|
+
import FileTagLoadingSrcRaw from './file-tag-loading.story?raw';
|
|
27
|
+
import FileTagPromptSrcRaw from './file-tag-prompt.story?raw';
|
|
28
|
+
export const FileTagLoadingSrc = removeLicenseHeader(FileTagLoadingSrcRaw);
|
|
29
|
+
export const FileTagChatSrc = removeLicenseHeader(FileTagChatSrcRaw);
|
|
30
|
+
export const FileTagPromptSrc = removeLicenseHeader(FileTagPromptSrcRaw);
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/file-tag/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,mBAAmB,MAAM,6BAA6B,CAAC;AAE9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,mBAAmB,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 FileTagLoading } from './file-tag-loading.story';\nexport { default as FileTagChat } from './file-tag-chat.story';\nexport { default as FileTagPrompt } from './file-tag-prompt.story';\n\nimport { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';\n\nimport FileTagChatSrcRaw from './file-tag-chat.story?raw';\nimport FileTagLoadingSrcRaw from './file-tag-loading.story?raw';\nimport FileTagPromptSrcRaw from './file-tag-prompt.story?raw';\n\nexport const FileTagLoadingSrc = removeLicenseHeader(FileTagLoadingSrcRaw);\nexport const FileTagChatSrc = removeLicenseHeader(FileTagChatSrcRaw);\nexport const FileTagPromptSrc = removeLicenseHeader(FileTagPromptSrcRaw);\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import { CleanIconButton, LoadingSpinner, Tooltip } from '@neo4j-ndl/react';
|
|
34
|
+
import { XMarkIconOutline } from '@neo4j-ndl/react/icons';
|
|
35
|
+
import classNames from 'classnames';
|
|
36
|
+
/**
|
|
37
|
+
* The component is used to display an image in a chat, or in a prompt.
|
|
38
|
+
* It can be removable and it can be loading.
|
|
39
|
+
*
|
|
40
|
+
* @alpha - Changes to this component may be breaking.
|
|
41
|
+
*/
|
|
42
|
+
const ImageTag = (_a) => {
|
|
43
|
+
var { src, fileName, fileType, alt, onClick, isRemovable = false, isLoading = false, ref, className, style, htmlAttributes } = _a, restProps = __rest(_a, ["src", "fileName", "fileType", "alt", "onClick", "isRemovable", "isLoading", "ref", "className", "style", "htmlAttributes"]);
|
|
44
|
+
const Component = isRemovable !== true ? 'button' : 'div';
|
|
45
|
+
const classes = classNames('ndl-ai-image-tag', className);
|
|
46
|
+
const image = `${fileName}.${fileType}`;
|
|
47
|
+
return (_jsxs(Tooltip, { type: "simple", placement: "bottom", hoverDelay: { close: 0, open: 500 }, children: [_jsx(Tooltip.Trigger, { hasButtonWrapper: true, children: _jsxs(Component, Object.assign({ ref: ref, className: classes, style: style }, (isRemovable ? {} : { onClick }), restProps, htmlAttributes, { children: [_jsx("img", { src: src, alt: alt }), isRemovable && (_jsxs(_Fragment, { children: [_jsx("div", { className: "ndl-ai-image-tag-remove-wrapper" }), _jsx(CleanIconButton, { onClick: onClick, description: null, htmlAttributes: {
|
|
48
|
+
'aria-label': `Remove ${image}`,
|
|
49
|
+
}, size: "small", className: "ndl-ai-image-tag-remove", children: _jsx(XMarkIconOutline, {}) })] })), isLoading && (_jsx("div", { className: "ndl-ai-image-tag-loading-overlay", children: _jsx(LoadingSpinner, { size: "medium" }) }))] })) }), _jsx(Tooltip.Content, { children: image })] }));
|
|
50
|
+
};
|
|
51
|
+
export { ImageTag };
|
|
52
|
+
//# sourceMappingURL=ImageTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageTag.js","sourceRoot":"","sources":["../../../../src/ai/image-tag/ImageTag.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,UAAU,MAAM,YAAY,CAAC;AAmBpC;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,CAAC,EAa8B,EAAE,EAAE;QAblC,EAChB,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,OAAO,EACP,WAAW,GAAG,KAAK,EACnB,SAAS,GAAG,KAAK,EACjB,GAAG,EACH,SAAS,EACT,KAAK,EACL,cAAc,OAEgC,EAD3C,SAAS,cAZI,4HAajB,CADa;IAEZ,MAAM,SAAS,GAAG,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1D,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAE1D,MAAM,KAAK,GAAG,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC;IAExC,OAAO,CACL,MAAC,OAAO,IACN,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,QAAQ,EAClB,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,aAEnC,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,MAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,IACR,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAEhC,SAAS,EACT,cAAc,eAElB,cAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAI,EAC1B,WAAW,IAAI,CACd,8BACE,cAAK,SAAS,EAAC,iCAAiC,GAAG,EACnD,KAAC,eAAe,IACd,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,IAAI,EACjB,cAAc,EAAE;wCACd,YAAY,EAAE,UAAU,KAAK,EAAE;qCAChC,EACD,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,yBAAyB,YAEnC,KAAC,gBAAgB,KAAG,GACJ,IACjB,CACJ,EACA,SAAS,IAAI,CACZ,cAAK,SAAS,EAAC,kCAAkC,YAC/C,KAAC,cAAc,IAAC,IAAI,EAAC,QAAQ,GAAG,GAC5B,CACP,KACS,GACI,EAClB,KAAC,OAAO,CAAC,OAAO,cAAE,KAAK,GAAmB,IAClC,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,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 { CleanIconButton, LoadingSpinner, Tooltip } from '@neo4j-ndl/react';\nimport { type CommonProps } from '@neo4j-ndl/react/_common/types';\nimport { XMarkIconOutline } from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\n\ntype ImageTagProps = {\n /** The source of the image */\n src: string;\n /** The alt text of the image */\n alt: string;\n /** The name of the image */\n fileName: string;\n /** The type of the image, e.g. 'jpg', 'png', 'gif', etc. */\n fileType: string;\n /** Callback function triggered either when the image tag is clicked, or when the remove button is clicked (if isRemovable is true) */\n onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Whether the image tag is removable */\n isRemovable?: boolean;\n /** Whether the image tag is loading */\n isLoading?: boolean;\n};\n\n/**\n * The component is used to display an image in a chat, or in a prompt.\n * It can be removable and it can be loading.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst ImageTag = ({\n src,\n fileName,\n fileType,\n alt,\n onClick,\n isRemovable = false,\n isLoading = false,\n ref,\n className,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<React.ElementType, ImageTagProps>) => {\n const Component = isRemovable !== true ? 'button' : 'div';\n const classes = classNames('ndl-ai-image-tag', className);\n\n const image = `${fileName}.${fileType}`;\n\n return (\n <Tooltip\n type=\"simple\"\n placement=\"bottom\"\n hoverDelay={{ close: 0, open: 500 }}\n >\n <Tooltip.Trigger hasButtonWrapper>\n <Component\n ref={ref}\n className={classes}\n style={style}\n {...(isRemovable ? {} : { onClick })}\n // what is read by screen readers here?\n {...restProps}\n {...htmlAttributes}\n >\n <img src={src} alt={alt} />\n {isRemovable && (\n <>\n <div className=\"ndl-ai-image-tag-remove-wrapper\" />\n <CleanIconButton\n onClick={onClick}\n description={null}\n htmlAttributes={{\n 'aria-label': `Remove ${image}`,\n }}\n size=\"small\"\n className=\"ndl-ai-image-tag-remove\"\n >\n <XMarkIconOutline />\n </CleanIconButton>\n </>\n )}\n {isLoading && (\n <div className=\"ndl-ai-image-tag-loading-overlay\">\n <LoadingSpinner size=\"medium\" />\n </div>\n )}\n </Component>\n </Tooltip.Trigger>\n <Tooltip.Content>{image}</Tooltip.Content>\n </Tooltip>\n );\n};\n\nexport { ImageTag };\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 * from './ImageTag';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ai/image-tag/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,YAAY,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 * from './ImageTag';\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { ImageTag } from '@neo4j-ndl/react/ai';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsx(ImageTag, { src: "https://plus.unsplash.com/premium_photo-1676496046182-356a6a0ed002?q=80&w=2952&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D", alt: "Landscape image", fileName: "Landscape image", fileType: "jpg" }));
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=image-tag-chat.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-tag-chat.story.js","sourceRoot":"","sources":["../../../../../src/ai/image-tag/stories/image-tag-chat.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,QAAQ,IACP,GAAG,EAAC,8KAA8K,EAClL,GAAG,EAAC,iBAAiB,EACrB,QAAQ,EAAC,iBAAiB,EAC1B,QAAQ,EAAC,KAAK,GACd,CACH,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 */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { ImageTag } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return (\n <ImageTag\n src=\"https://plus.unsplash.com/premium_photo-1676496046182-356a6a0ed002?q=80&w=2952&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"Landscape image\"\n fileName=\"Landscape image\"\n fileType=\"jpg\"\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { ImageTag } from '@neo4j-ndl/react/ai';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsx(ImageTag, { isLoading: true, src: "https://plus.unsplash.com/premium_photo-1676496046182-356a6a0ed002?q=80&w=2952&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D", alt: "Landscape image", fileName: "Landscape image", fileType: "jpg", onClick: () => {
|
|
26
|
+
alert('remove image');
|
|
27
|
+
} }));
|
|
28
|
+
};
|
|
29
|
+
export default Component;
|
|
30
|
+
//# sourceMappingURL=image-tag-loading.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-tag-loading.story.js","sourceRoot":"","sources":["../../../../../src/ai/image-tag/stories/image-tag-loading.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,QAAQ,IACP,SAAS,EAAE,IAAI,EACf,GAAG,EAAC,8KAA8K,EAClL,GAAG,EAAC,iBAAiB,EACrB,QAAQ,EAAC,iBAAiB,EAC1B,QAAQ,EAAC,KAAK,EACd,OAAO,EAAE,GAAG,EAAE;YACZ,KAAK,CAAC,cAAc,CAAC,CAAC;QACxB,CAAC,GACD,CACH,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 */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { ImageTag } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return (\n <ImageTag\n isLoading={true}\n src=\"https://plus.unsplash.com/premium_photo-1676496046182-356a6a0ed002?q=80&w=2952&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"Landscape image\"\n fileName=\"Landscape image\"\n fileType=\"jpg\"\n onClick={() => {\n alert('remove image');\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { ImageTag } from '@neo4j-ndl/react/ai';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsx(ImageTag, { src: "https://plus.unsplash.com/premium_photo-1676496046182-356a6a0ed002?q=80&w=2952&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D", alt: "Landscape image", fileName: "Landscape image", fileType: "jpg", isRemovable: true, onClick: () => {
|
|
26
|
+
alert('remove image');
|
|
27
|
+
} }));
|
|
28
|
+
};
|
|
29
|
+
export default Component;
|
|
30
|
+
//# sourceMappingURL=image-tag-prompt.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-tag-prompt.story.js","sourceRoot":"","sources":["../../../../../src/ai/image-tag/stories/image-tag-prompt.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,QAAQ,IACP,GAAG,EAAC,8KAA8K,EAClL,GAAG,EAAC,iBAAiB,EACrB,QAAQ,EAAC,iBAAiB,EAC1B,QAAQ,EAAC,KAAK,EACd,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE;YACZ,KAAK,CAAC,cAAc,CAAC,CAAC;QACxB,CAAC,GACD,CACH,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 */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { ImageTag } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return (\n <ImageTag\n src=\"https://plus.unsplash.com/premium_photo-1676496046182-356a6a0ed002?q=80&w=2952&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"Landscape image\"\n fileName=\"Landscape image\"\n fileType=\"jpg\"\n isRemovable={true}\n onClick={() => {\n alert('remove image');\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|