@neo4j-ndl/react 4.2.6 → 4.2.7
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/accordion/stories/index.js +1 -1
- package/lib/cjs/accordion/stories/index.js.map +1 -1
- package/lib/cjs/ai/code-preview/stories/index.js +1 -1
- package/lib/cjs/ai/code-preview/stories/index.js.map +1 -1
- package/lib/cjs/ai/file-tag/FileTag.js.map +1 -1
- package/lib/cjs/ai/file-tag/stories/index.js +1 -1
- package/lib/cjs/ai/file-tag/stories/index.js.map +1 -1
- package/lib/cjs/ai/image-tag/ImageTag.js.map +1 -1
- package/lib/cjs/ai/image-tag/stories/index.js +1 -1
- package/lib/cjs/ai/image-tag/stories/index.js.map +1 -1
- package/lib/cjs/ai/more-files/MoreFiles.js +18 -19
- package/lib/cjs/ai/more-files/MoreFiles.js.map +1 -1
- package/lib/cjs/ai/more-files/stories/index.js +1 -1
- package/lib/cjs/ai/more-files/stories/index.js.map +1 -1
- package/lib/cjs/ai/more-files/stories/more-files.story.js +5 -5
- package/lib/cjs/ai/more-files/stories/more-files.story.js.map +1 -1
- package/lib/cjs/ai/presence/Presence.js.map +1 -1
- package/lib/cjs/ai/presence/stories/index.js +1 -1
- package/lib/cjs/ai/presence/stories/index.js.map +1 -1
- package/lib/cjs/ai/prompt/Prompt.js.map +1 -1
- package/lib/cjs/ai/prompt/stories/index.js +1 -1
- package/lib/cjs/ai/prompt/stories/index.js.map +1 -1
- package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -1
- package/lib/cjs/ai/reasoning/stories/index.js +1 -1
- package/lib/cjs/ai/reasoning/stories/index.js.map +1 -1
- package/lib/cjs/ai/response/Response.js.map +1 -1
- package/lib/cjs/ai/response/stories/index.js +1 -1
- package/lib/cjs/ai/response/stories/index.js.map +1 -1
- package/lib/cjs/ai/suggestion/Suggestion.js +18 -19
- package/lib/cjs/ai/suggestion/Suggestion.js.map +1 -1
- package/lib/cjs/ai/suggestion/stories/index.js +1 -1
- package/lib/cjs/ai/suggestion/stories/index.js.map +1 -1
- package/lib/cjs/ai/thinking/Thinking.js +18 -19
- package/lib/cjs/ai/thinking/Thinking.js.map +1 -1
- package/lib/cjs/ai/thinking/stories/index.js +1 -1
- package/lib/cjs/ai/thinking/stories/index.js.map +1 -1
- package/lib/cjs/ai/tool-call/ToolCall.js.map +1 -1
- package/lib/cjs/ai/tool-call/stories/index.js +1 -1
- package/lib/cjs/ai/tool-call/stories/index.js.map +1 -1
- package/lib/cjs/ai/user-bubble/UserBubble.js.map +1 -1
- package/lib/cjs/ai/user-bubble/stories/index.js +1 -1
- package/lib/cjs/ai/user-bubble/stories/index.js.map +1 -1
- package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js +2 -2
- package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -1
- package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js +5 -5
- package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -1
- package/lib/cjs/avatar/stories/index.js +1 -1
- package/lib/cjs/avatar/stories/index.js.map +1 -1
- package/lib/cjs/banner/stories/index.js +1 -1
- package/lib/cjs/banner/stories/index.js.map +1 -1
- package/lib/cjs/box/stories/index.js +1 -1
- package/lib/cjs/box/stories/index.js.map +1 -1
- package/lib/cjs/button/stories/index.js +1 -1
- package/lib/cjs/button/stories/index.js.map +1 -1
- package/lib/cjs/clean-icon-button/stories/index.js +1 -1
- package/lib/cjs/clean-icon-button/stories/index.js.map +1 -1
- package/lib/cjs/clipboard-button/stories/index.js +1 -1
- package/lib/cjs/clipboard-button/stories/index.js.map +1 -1
- package/lib/cjs/code/stories/index.js +1 -1
- package/lib/cjs/code/stories/index.js.map +1 -1
- package/lib/cjs/code-block/stories/index.js +1 -1
- package/lib/cjs/code-block/stories/index.js.map +1 -1
- package/lib/cjs/color-picker/stories/index.js +1 -1
- package/lib/cjs/color-picker/stories/index.js.map +1 -1
- package/lib/cjs/conditional-wrap/stories/index.js +1 -1
- package/lib/cjs/conditional-wrap/stories/index.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-virtualization.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/index.js +1 -1
- package/lib/cjs/data-grid/stories/index.js.map +1 -1
- package/lib/cjs/date-picker/stories/index.js +1 -1
- package/lib/cjs/date-picker/stories/index.js.map +1 -1
- package/lib/cjs/dialog/stories/index.js +1 -1
- package/lib/cjs/dialog/stories/index.js.map +1 -1
- package/lib/cjs/divider/stories/index.js +1 -1
- package/lib/cjs/divider/stories/index.js.map +1 -1
- package/lib/cjs/drawer/stories/index.js +1 -1
- package/lib/cjs/drawer/stories/index.js.map +1 -1
- package/lib/cjs/dropdown-button/stories/index.js +1 -1
- package/lib/cjs/dropdown-button/stories/index.js.map +1 -1
- package/lib/cjs/dropzone/stories/index.js +1 -1
- package/lib/cjs/dropzone/stories/index.js.map +1 -1
- package/lib/cjs/flex/stories/index.js +1 -1
- package/lib/cjs/flex/stories/index.js.map +1 -1
- package/lib/cjs/graph-label/stories/index.js +1 -1
- package/lib/cjs/graph-label/stories/index.js.map +1 -1
- package/lib/cjs/icon-button/stories/index.js +1 -1
- package/lib/cjs/icon-button/stories/index.js.map +1 -1
- package/lib/cjs/icon-button-array/stories/index.js +1 -1
- package/lib/cjs/icon-button-array/stories/index.js.map +1 -1
- package/lib/cjs/icons/manual/Neo4JAiColor.js +15 -16
- package/lib/cjs/icons/manual/Neo4JAiColor.js.map +1 -1
- package/lib/cjs/inline-edit/stories/index.js +1 -1
- package/lib/cjs/inline-edit/stories/index.js.map +1 -1
- package/lib/cjs/kbd/stories/index.js +1 -1
- package/lib/cjs/kbd/stories/index.js.map +1 -1
- package/lib/cjs/loading-bar/stories/index.js +1 -1
- package/lib/cjs/loading-bar/stories/index.js.map +1 -1
- package/lib/cjs/loading-spinner/stories/index.js +1 -1
- package/lib/cjs/loading-spinner/stories/index.js.map +1 -1
- package/lib/cjs/logo/stories/index.js +1 -1
- package/lib/cjs/logo/stories/index.js.map +1 -1
- package/lib/cjs/menu/stories/index.js +1 -1
- package/lib/cjs/menu/stories/index.js.map +1 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js +2 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/cjs/progress-bar/stories/index.js +1 -1
- package/lib/cjs/progress-bar/stories/index.js.map +1 -1
- package/lib/cjs/segmented-control/stories/index.js +1 -1
- package/lib/cjs/segmented-control/stories/index.js.map +1 -1
- package/lib/cjs/select/stories/index.js +1 -1
- package/lib/cjs/select/stories/index.js.map +1 -1
- package/lib/cjs/slider/stories/index.js +1 -1
- package/lib/cjs/slider/stories/index.js.map +1 -1
- package/lib/cjs/spotlight/stories/index.js +1 -1
- package/lib/cjs/spotlight/stories/index.js.map +1 -1
- package/lib/cjs/status-indicator/stories/index.js +1 -1
- package/lib/cjs/status-indicator/stories/index.js.map +1 -1
- package/lib/cjs/status-label/stories/index.js +1 -1
- package/lib/cjs/status-label/stories/index.js.map +1 -1
- package/lib/cjs/switch/stories/index.js +1 -1
- package/lib/cjs/switch/stories/index.js.map +1 -1
- package/lib/cjs/tabs/stories/index.js +1 -1
- package/lib/cjs/tabs/stories/index.js.map +1 -1
- package/lib/cjs/tag/stories/index.js +1 -1
- package/lib/cjs/tag/stories/index.js.map +1 -1
- package/lib/cjs/text-area/stories/index.js +1 -1
- package/lib/cjs/text-area/stories/index.js.map +1 -1
- package/lib/cjs/text-input/stories/index.js +1 -1
- package/lib/cjs/text-input/stories/index.js.map +1 -1
- package/lib/cjs/text-link/stories/index.js +1 -1
- package/lib/cjs/text-link/stories/index.js.map +1 -1
- package/lib/cjs/time-picker/stories/index.js +1 -1
- package/lib/cjs/time-picker/stories/index.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/index.js +1 -1
- package/lib/cjs/timezone-picker/stories/index.js.map +1 -1
- package/lib/cjs/toast/stories/index.js +1 -1
- package/lib/cjs/toast/stories/index.js.map +1 -1
- package/lib/cjs/tooltip/stories/index.js +1 -1
- package/lib/cjs/tooltip/stories/index.js.map +1 -1
- package/lib/cjs/tree-view/stories/index.js +1 -1
- package/lib/cjs/tree-view/stories/index.js.map +1 -1
- package/lib/cjs/tree-view/stories/treeview-custom.story.js +5 -5
- package/lib/cjs/tree-view/stories/treeview-custom.story.js.map +1 -1
- package/lib/cjs/tree-view/stories/treeview-default.story.js +4 -4
- package/lib/cjs/tree-view/stories/treeview-default.story.js.map +1 -1
- package/lib/cjs/tree-view/stories/treeview-skeleton-loading.story.js +4 -4
- package/lib/cjs/tree-view/stories/treeview-skeleton-loading.story.js.map +1 -1
- package/lib/cjs/typography/stories/index.js +1 -1
- package/lib/cjs/typography/stories/index.js.map +1 -1
- package/lib/cjs/wizard/stories/index.js +1 -1
- package/lib/cjs/wizard/stories/index.js.map +1 -1
- package/lib/esm/accordion/stories/index.js +1 -1
- package/lib/esm/accordion/stories/index.js.map +1 -1
- package/lib/esm/ai/code-preview/stories/index.js +1 -1
- package/lib/esm/ai/code-preview/stories/index.js.map +1 -1
- package/lib/esm/ai/file-tag/FileTag.js.map +1 -1
- package/lib/esm/ai/file-tag/stories/index.js +1 -1
- package/lib/esm/ai/file-tag/stories/index.js.map +1 -1
- package/lib/esm/ai/image-tag/ImageTag.js.map +1 -1
- package/lib/esm/ai/image-tag/stories/index.js +1 -1
- package/lib/esm/ai/image-tag/stories/index.js.map +1 -1
- package/lib/esm/ai/more-files/MoreFiles.js +12 -13
- package/lib/esm/ai/more-files/MoreFiles.js.map +1 -1
- package/lib/esm/ai/more-files/stories/index.js +1 -1
- package/lib/esm/ai/more-files/stories/index.js.map +1 -1
- package/lib/esm/ai/more-files/stories/more-files.story.js +1 -1
- package/lib/esm/ai/more-files/stories/more-files.story.js.map +1 -1
- package/lib/esm/ai/presence/Presence.js.map +1 -1
- package/lib/esm/ai/presence/stories/index.js +1 -1
- package/lib/esm/ai/presence/stories/index.js.map +1 -1
- package/lib/esm/ai/prompt/Prompt.js.map +1 -1
- package/lib/esm/ai/prompt/stories/index.js +1 -1
- package/lib/esm/ai/prompt/stories/index.js.map +1 -1
- package/lib/esm/ai/reasoning/Reasoning.js.map +1 -1
- package/lib/esm/ai/reasoning/stories/index.js +1 -1
- package/lib/esm/ai/reasoning/stories/index.js.map +1 -1
- package/lib/esm/ai/response/Response.js.map +1 -1
- package/lib/esm/ai/response/stories/index.js +1 -1
- package/lib/esm/ai/response/stories/index.js.map +1 -1
- package/lib/esm/ai/suggestion/Suggestion.js +12 -13
- package/lib/esm/ai/suggestion/Suggestion.js.map +1 -1
- package/lib/esm/ai/suggestion/stories/index.js +1 -1
- package/lib/esm/ai/suggestion/stories/index.js.map +1 -1
- package/lib/esm/ai/thinking/Thinking.js +12 -13
- package/lib/esm/ai/thinking/Thinking.js.map +1 -1
- package/lib/esm/ai/thinking/stories/index.js +1 -1
- package/lib/esm/ai/thinking/stories/index.js.map +1 -1
- package/lib/esm/ai/tool-call/ToolCall.js.map +1 -1
- package/lib/esm/ai/tool-call/stories/index.js +1 -1
- package/lib/esm/ai/tool-call/stories/index.js.map +1 -1
- package/lib/esm/ai/user-bubble/UserBubble.js.map +1 -1
- package/lib/esm/ai/user-bubble/stories/index.js +1 -1
- package/lib/esm/ai/user-bubble/stories/index.js.map +1 -1
- package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js +1 -1
- package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -1
- package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js +1 -1
- package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -1
- package/lib/esm/avatar/stories/index.js +1 -1
- package/lib/esm/avatar/stories/index.js.map +1 -1
- package/lib/esm/banner/stories/index.js +1 -1
- package/lib/esm/banner/stories/index.js.map +1 -1
- package/lib/esm/box/stories/index.js +1 -1
- package/lib/esm/box/stories/index.js.map +1 -1
- package/lib/esm/button/stories/index.js +1 -1
- package/lib/esm/button/stories/index.js.map +1 -1
- package/lib/esm/clean-icon-button/stories/index.js +1 -1
- package/lib/esm/clean-icon-button/stories/index.js.map +1 -1
- package/lib/esm/clipboard-button/stories/index.js +1 -1
- package/lib/esm/clipboard-button/stories/index.js.map +1 -1
- package/lib/esm/code/stories/index.js +1 -1
- package/lib/esm/code/stories/index.js.map +1 -1
- package/lib/esm/code-block/stories/index.js +1 -1
- package/lib/esm/code-block/stories/index.js.map +1 -1
- package/lib/esm/color-picker/stories/index.js +1 -1
- package/lib/esm/color-picker/stories/index.js.map +1 -1
- package/lib/esm/conditional-wrap/stories/index.js +1 -1
- package/lib/esm/conditional-wrap/stories/index.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-virtualization.story.js.map +1 -1
- package/lib/esm/data-grid/stories/index.js +1 -1
- package/lib/esm/data-grid/stories/index.js.map +1 -1
- package/lib/esm/date-picker/stories/index.js +1 -1
- package/lib/esm/date-picker/stories/index.js.map +1 -1
- package/lib/esm/dialog/stories/index.js +1 -1
- package/lib/esm/dialog/stories/index.js.map +1 -1
- package/lib/esm/divider/stories/index.js +1 -1
- package/lib/esm/divider/stories/index.js.map +1 -1
- package/lib/esm/drawer/stories/index.js +1 -1
- package/lib/esm/drawer/stories/index.js.map +1 -1
- package/lib/esm/dropdown-button/stories/index.js +1 -1
- package/lib/esm/dropdown-button/stories/index.js.map +1 -1
- package/lib/esm/dropzone/stories/index.js +1 -1
- package/lib/esm/dropzone/stories/index.js.map +1 -1
- package/lib/esm/flex/stories/index.js +1 -1
- package/lib/esm/flex/stories/index.js.map +1 -1
- package/lib/esm/graph-label/stories/index.js +1 -1
- package/lib/esm/graph-label/stories/index.js.map +1 -1
- package/lib/esm/icon-button/stories/index.js +1 -1
- package/lib/esm/icon-button/stories/index.js.map +1 -1
- package/lib/esm/icon-button-array/stories/index.js +1 -1
- package/lib/esm/icon-button-array/stories/index.js.map +1 -1
- package/lib/esm/icons/manual/Neo4JAiColor.js +12 -13
- package/lib/esm/icons/manual/Neo4JAiColor.js.map +1 -1
- package/lib/esm/inline-edit/stories/index.js +1 -1
- package/lib/esm/inline-edit/stories/index.js.map +1 -1
- package/lib/esm/kbd/stories/index.js +1 -1
- package/lib/esm/kbd/stories/index.js.map +1 -1
- package/lib/esm/loading-bar/stories/index.js +1 -1
- package/lib/esm/loading-bar/stories/index.js.map +1 -1
- package/lib/esm/loading-spinner/stories/index.js +1 -1
- package/lib/esm/loading-spinner/stories/index.js.map +1 -1
- package/lib/esm/logo/stories/index.js +1 -1
- package/lib/esm/logo/stories/index.js.map +1 -1
- package/lib/esm/menu/stories/index.js +1 -1
- package/lib/esm/menu/stories/index.js.map +1 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js +2 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/esm/progress-bar/stories/index.js +1 -1
- package/lib/esm/progress-bar/stories/index.js.map +1 -1
- package/lib/esm/segmented-control/stories/index.js +1 -1
- package/lib/esm/segmented-control/stories/index.js.map +1 -1
- package/lib/esm/select/stories/index.js +1 -1
- package/lib/esm/select/stories/index.js.map +1 -1
- package/lib/esm/slider/stories/index.js +1 -1
- package/lib/esm/slider/stories/index.js.map +1 -1
- package/lib/esm/spotlight/stories/index.js +1 -1
- package/lib/esm/spotlight/stories/index.js.map +1 -1
- package/lib/esm/status-indicator/stories/index.js +1 -1
- package/lib/esm/status-indicator/stories/index.js.map +1 -1
- package/lib/esm/status-label/stories/index.js +1 -1
- package/lib/esm/status-label/stories/index.js.map +1 -1
- package/lib/esm/switch/stories/index.js +1 -1
- package/lib/esm/switch/stories/index.js.map +1 -1
- package/lib/esm/tabs/stories/index.js +1 -1
- package/lib/esm/tabs/stories/index.js.map +1 -1
- package/lib/esm/tag/stories/index.js +1 -1
- package/lib/esm/tag/stories/index.js.map +1 -1
- package/lib/esm/text-area/stories/index.js +1 -1
- package/lib/esm/text-area/stories/index.js.map +1 -1
- package/lib/esm/text-input/stories/index.js +1 -1
- package/lib/esm/text-input/stories/index.js.map +1 -1
- package/lib/esm/text-link/stories/index.js +1 -1
- package/lib/esm/text-link/stories/index.js.map +1 -1
- package/lib/esm/time-picker/stories/index.js +1 -1
- package/lib/esm/time-picker/stories/index.js.map +1 -1
- package/lib/esm/timezone-picker/stories/index.js +1 -1
- package/lib/esm/timezone-picker/stories/index.js.map +1 -1
- package/lib/esm/toast/stories/index.js +1 -1
- package/lib/esm/toast/stories/index.js.map +1 -1
- package/lib/esm/tooltip/stories/index.js +1 -1
- package/lib/esm/tooltip/stories/index.js.map +1 -1
- package/lib/esm/tree-view/stories/index.js +1 -1
- package/lib/esm/tree-view/stories/index.js.map +1 -1
- package/lib/esm/tree-view/stories/treeview-custom.story.js +1 -1
- package/lib/esm/tree-view/stories/treeview-custom.story.js.map +1 -1
- package/lib/esm/tree-view/stories/treeview-default.story.js +1 -1
- package/lib/esm/tree-view/stories/treeview-default.story.js.map +1 -1
- package/lib/esm/tree-view/stories/treeview-skeleton-loading.story.js +1 -1
- package/lib/esm/tree-view/stories/treeview-skeleton-loading.story.js.map +1 -1
- package/lib/esm/typography/stories/index.js +1 -1
- package/lib/esm/typography/stories/index.js.map +1 -1
- package/lib/esm/wizard/stories/index.js +1 -1
- package/lib/esm/wizard/stories/index.js.map +1 -1
- package/lib/types/accordion/stories/index.d.ts.map +1 -1
- package/lib/types/ai/code-preview/stories/index.d.ts.map +1 -1
- package/lib/types/ai/file-tag/FileTag.d.ts +1 -1
- package/lib/types/ai/file-tag/FileTag.d.ts.map +1 -1
- package/lib/types/ai/file-tag/stories/index.d.ts.map +1 -1
- package/lib/types/ai/image-tag/ImageTag.d.ts +1 -1
- package/lib/types/ai/image-tag/ImageTag.d.ts.map +1 -1
- package/lib/types/ai/image-tag/stories/index.d.ts.map +1 -1
- package/lib/types/ai/more-files/MoreFiles.d.ts +1 -1
- package/lib/types/ai/more-files/MoreFiles.d.ts.map +1 -1
- package/lib/types/ai/more-files/stories/index.d.ts.map +1 -1
- package/lib/types/ai/presence/Presence.d.ts +1 -1
- package/lib/types/ai/presence/Presence.d.ts.map +1 -1
- package/lib/types/ai/presence/stories/index.d.ts.map +1 -1
- package/lib/types/ai/prompt/Prompt.d.ts +1 -1
- package/lib/types/ai/prompt/Prompt.d.ts.map +1 -1
- package/lib/types/ai/prompt/stories/index.d.ts.map +1 -1
- package/lib/types/ai/reasoning/Reasoning.d.ts +1 -1
- package/lib/types/ai/reasoning/Reasoning.d.ts.map +1 -1
- package/lib/types/ai/reasoning/stories/index.d.ts.map +1 -1
- package/lib/types/ai/response/Response.d.ts +1 -1
- package/lib/types/ai/response/Response.d.ts.map +1 -1
- package/lib/types/ai/response/stories/index.d.ts.map +1 -1
- package/lib/types/ai/suggestion/Suggestion.d.ts +1 -1
- package/lib/types/ai/suggestion/Suggestion.d.ts.map +1 -1
- package/lib/types/ai/suggestion/stories/index.d.ts.map +1 -1
- package/lib/types/ai/thinking/Thinking.d.ts +1 -1
- package/lib/types/ai/thinking/Thinking.d.ts.map +1 -1
- package/lib/types/ai/tool-call/ToolCall.d.ts +1 -1
- package/lib/types/ai/tool-call/ToolCall.d.ts.map +1 -1
- package/lib/types/ai/tool-call/stories/index.d.ts.map +1 -1
- package/lib/types/ai/user-bubble/UserBubble.d.ts +1 -1
- package/lib/types/ai/user-bubble/UserBubble.d.ts.map +1 -1
- package/lib/types/ai/user-bubble/stories/index.d.ts.map +1 -1
- package/lib/types/avatar/stories/index.d.ts.map +1 -1
- package/lib/types/banner/stories/index.d.ts.map +1 -1
- package/lib/types/box/stories/index.d.ts.map +1 -1
- package/lib/types/button/stories/index.d.ts.map +1 -1
- package/lib/types/clean-icon-button/stories/index.d.ts.map +1 -1
- package/lib/types/clipboard-button/stories/index.d.ts.map +1 -1
- package/lib/types/code/stories/index.d.ts.map +1 -1
- package/lib/types/code-block/stories/index.d.ts.map +1 -1
- package/lib/types/color-picker/stories/index.d.ts.map +1 -1
- package/lib/types/conditional-wrap/stories/index.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-virtualization.story.d.ts.map +1 -1
- package/lib/types/data-grid/stories/index.d.ts.map +1 -1
- package/lib/types/date-picker/stories/index.d.ts.map +1 -1
- package/lib/types/dialog/stories/index.d.ts.map +1 -1
- package/lib/types/divider/stories/index.d.ts.map +1 -1
- package/lib/types/drawer/stories/index.d.ts.map +1 -1
- package/lib/types/dropdown-button/stories/index.d.ts.map +1 -1
- package/lib/types/dropzone/stories/index.d.ts.map +1 -1
- package/lib/types/flex/stories/index.d.ts.map +1 -1
- package/lib/types/graph-label/stories/index.d.ts.map +1 -1
- package/lib/types/icon-button/stories/index.d.ts.map +1 -1
- package/lib/types/icon-button-array/stories/index.d.ts.map +1 -1
- package/lib/types/icons/manual/Neo4JAiColor.d.ts +4 -3
- package/lib/types/icons/manual/Neo4JAiColor.d.ts.map +1 -1
- package/lib/types/inline-edit/stories/index.d.ts.map +1 -1
- package/lib/types/kbd/stories/index.d.ts.map +1 -1
- package/lib/types/loading-bar/stories/index.d.ts.map +1 -1
- package/lib/types/loading-spinner/stories/index.d.ts.map +1 -1
- package/lib/types/logo/stories/index.d.ts.map +1 -1
- package/lib/types/menu/stories/index.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
- package/lib/types/progress-bar/stories/index.d.ts.map +1 -1
- package/lib/types/segmented-control/stories/index.d.ts.map +1 -1
- package/lib/types/select/stories/index.d.ts.map +1 -1
- package/lib/types/slider/stories/index.d.ts.map +1 -1
- package/lib/types/spotlight/stories/index.d.ts.map +1 -1
- package/lib/types/status-indicator/stories/index.d.ts.map +1 -1
- package/lib/types/status-label/stories/index.d.ts.map +1 -1
- package/lib/types/switch/stories/index.d.ts.map +1 -1
- package/lib/types/tabs/stories/index.d.ts.map +1 -1
- package/lib/types/tag/stories/index.d.ts.map +1 -1
- package/lib/types/text-area/stories/index.d.ts.map +1 -1
- package/lib/types/text-input/stories/index.d.ts.map +1 -1
- package/lib/types/text-link/stories/index.d.ts.map +1 -1
- package/lib/types/time-picker/stories/index.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/index.d.ts.map +1 -1
- package/lib/types/toast/stories/index.d.ts.map +1 -1
- package/lib/types/tooltip/stories/index.d.ts.map +1 -1
- package/lib/types/tree-view/stories/index.d.ts.map +1 -1
- package/lib/types/typography/stories/index.d.ts.map +1 -1
- package/lib/types/wizard/stories/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ var accordion_right_content_story_1 = require("./accordion-right-content.story")
|
|
|
36
36
|
Object.defineProperty(exports, "AccordionRightContent", { enumerable: true, get: function () { return __importDefault(accordion_right_content_story_1).default; } });
|
|
37
37
|
var accordion_single_expanded_story_1 = require("./accordion-single-expanded.story");
|
|
38
38
|
Object.defineProperty(exports, "AccordionSingleExpanded", { enumerable: true, get: function () { return __importDefault(accordion_single_expanded_story_1).default; } });
|
|
39
|
-
const export_stories_utils_1 = require("
|
|
39
|
+
const export_stories_utils_1 = require("../../_common/export-stories-utils");
|
|
40
40
|
const accordion_clean_items_expanded_story_raw_1 = __importDefault(require("./accordion-clean-items-expanded.story?raw"));
|
|
41
41
|
const accordion_default_expanded_story_raw_1 = __importDefault(require("./accordion-default-expanded.story?raw"));
|
|
42
42
|
const accordion_full_story_raw_1 = __importDefault(require("./accordion-full.story?raw"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/accordion/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,+FAAwF;AAA/E,4JAAA,OAAO,OAAuB;AACvC,uFAAiF;AAAxE,qJAAA,OAAO,OAAoB;AACpC,+DAAkE;AAAzD,sIAAA,OAAO,OAAiB;AACjC,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAC7C,iFAAmF;AAA1E,uJAAA,OAAO,OAAyB;AACzC,qFAAuF;AAA9E,2JAAA,OAAO,OAA2B;AAE3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/accordion/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,+FAAwF;AAA/E,4JAAA,OAAO,OAAuB;AACvC,uFAAiF;AAAxE,qJAAA,OAAO,OAAoB;AACpC,+DAAkE;AAAzD,sIAAA,OAAO,OAAiB;AACjC,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAC7C,iFAAmF;AAA1E,uJAAA,OAAO,OAAyB;AACzC,qFAAuF;AAA9E,2JAAA,OAAO,OAA2B;AAE3C,6EAAyE;AACzE,0HAAmF;AACnF,kHAA4E;AAC5E,0FAA6D;AAC7D,oHAAsF;AACtF,4GAA8E;AAC9E,gHAAkF;AAErE,QAAA,sBAAsB,GAAG,IAAA,0CAAmB,EACvD,kDAAyB,CAC1B,CAAC;AACW,QAAA,mBAAmB,GAAG,IAAA,0CAAmB,EAAC,8CAAsB,CAAC,CAAC;AAClE,QAAA,gBAAgB,GAAG,IAAA,0CAAmB,EAAC,kCAAmB,CAAC,CAAC;AAE5D,QAAA,4BAA4B,GAAG,IAAA,0CAAmB,EAC7D,+CAA+B,CAChC,CAAC;AACW,QAAA,wBAAwB,GAAG,IAAA,0CAAmB,EACzD,2CAA2B,CAC5B,CAAC;AAEW,QAAA,0BAA0B,GAAG,IAAA,0CAAmB,EAC3D,6CAA6B,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 AccordionCleanItems } from './accordion-clean-items-expanded.story';\nexport { default as AccordionDefault } from './accordion-default-expanded.story';\nexport { default as AccordionFull } from './accordion-full.story';\nexport { default as AccordionMultipleExpanded } from './accordion-multiple-expanded.story';\nexport { default as AccordionRightContent } from './accordion-right-content.story';\nexport { default as AccordionSingleExpanded } from './accordion-single-expanded.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport AccordionCleanItemsSrcRaw from './accordion-clean-items-expanded.story?raw';\nimport AccordionDefaultSrcRaw from './accordion-default-expanded.story?raw';\nimport AccordionFullSrcRaw from './accordion-full.story?raw';\nimport AccordionMultipleExpandedSrcRaw from './accordion-multiple-expanded.story?raw';\nimport AccordionRightContentSrcRaw from './accordion-right-content.story?raw';\nimport AccordionSingleExpandedSrcRaw from './accordion-single-expanded.story?raw';\n\nexport const AccordionCleanItemsSrc = removeLicenseHeader(\n AccordionCleanItemsSrcRaw,\n);\nexport const AccordionDefaultSrc = removeLicenseHeader(AccordionDefaultSrcRaw);\nexport const AccordionFullSrc = removeLicenseHeader(AccordionFullSrcRaw);\n\nexport const AccordionMultipleExpandedSrc = removeLicenseHeader(\n AccordionMultipleExpandedSrcRaw,\n);\nexport const AccordionRightContentSrc = removeLicenseHeader(\n AccordionRightContentSrcRaw,\n);\n\nexport const AccordionSingleExpandedSrc = removeLicenseHeader(\n AccordionSingleExpandedSrcRaw,\n);\n"]}
|
|
@@ -32,7 +32,7 @@ var code_preview_write_story_1 = require("./code-preview-write.story");
|
|
|
32
32
|
Object.defineProperty(exports, "CodePreviewWrite", { enumerable: true, get: function () { return __importDefault(code_preview_write_story_1).default; } });
|
|
33
33
|
var code_preview_languages_story_1 = require("./code-preview-languages.story");
|
|
34
34
|
Object.defineProperty(exports, "CodePreviewLanguages", { enumerable: true, get: function () { return __importDefault(code_preview_languages_story_1).default; } });
|
|
35
|
-
const export_stories_utils_1 = require("
|
|
35
|
+
const export_stories_utils_1 = require("../../../_common/export-stories-utils");
|
|
36
36
|
const code_preview_languages_story_raw_1 = __importDefault(require("./code-preview-languages.story?raw"));
|
|
37
37
|
const code_preview_loading_story_raw_1 = __importDefault(require("./code-preview-loading.story?raw"));
|
|
38
38
|
const code_preview_read_story_raw_1 = __importDefault(require("./code-preview-read.story?raw"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/code-preview/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,2EAA6E;AAApE,iJAAA,OAAO,OAAsB;AACtC,qEAAuE;AAA9D,2IAAA,OAAO,OAAmB;AACnC,uEAAyE;AAAhE,6IAAA,OAAO,OAAoB;AACpC,+EAAiF;AAAxE,qJAAA,OAAO,OAAwB;AAExC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/code-preview/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,2EAA6E;AAApE,iJAAA,OAAO,OAAsB;AACtC,qEAAuE;AAA9D,2IAAA,OAAO,OAAmB;AACnC,uEAAyE;AAAhE,6IAAA,OAAO,OAAoB;AACpC,+EAAiF;AAAxE,qJAAA,OAAO,OAAwB;AAExC,gFAA4E;AAC5E,0GAA+E;AAC/E,sGAA2E;AAC3E,gGAAqE;AACrE,kGAAuE;AAE1D,QAAA,wBAAwB,GAAG,IAAA,0CAAmB,EACzD,wCAA2B,CAC5B,CAAC;AACW,QAAA,qBAAqB,GAAG,IAAA,0CAAmB,EACtD,qCAAwB,CACzB,CAAC;AACW,QAAA,sBAAsB,GAAG,IAAA,0CAAmB,EACvD,sCAAyB,CAC1B,CAAC;AACW,QAAA,0BAA0B,GAAG,IAAA,0CAAmB,EAC3D,0CAA6B,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 '../../../_common/export-stories-utils';\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileTag.js","sourceRoot":"","sources":["../../../../src/ai/file-tag/FileTag.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA4E;
|
|
1
|
+
{"version":3,"file":"FileTag.js","sourceRoot":"","sources":["../../../../src/ai/file-tag/FileTag.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA4E;AAC5E,kDAA0D;AAC1D,4DA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AW,IAAI,CACd,uBAAC,uBAAe,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,uBAAC,wBAAgB,KAAG,GACJ,CACnB,KACS,GACI,EAClB,uBAAC,eAAO,CAAC,OAAO,cAAE,IAAI,GAAmB,IACjC,CACX,CAAC;AACJ,CAAC,CAAC;AAEO,0BAAO","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 { XMarkIconOutline } from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\n\nimport { type CommonProps } from '../../_common/types';\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"]}
|
|
@@ -30,7 +30,7 @@ var file_tag_chat_story_1 = require("./file-tag-chat.story");
|
|
|
30
30
|
Object.defineProperty(exports, "FileTagChat", { enumerable: true, get: function () { return __importDefault(file_tag_chat_story_1).default; } });
|
|
31
31
|
var file_tag_prompt_story_1 = require("./file-tag-prompt.story");
|
|
32
32
|
Object.defineProperty(exports, "FileTagPrompt", { enumerable: true, get: function () { return __importDefault(file_tag_prompt_story_1).default; } });
|
|
33
|
-
const export_stories_utils_1 = require("
|
|
33
|
+
const export_stories_utils_1 = require("../../../_common/export-stories-utils");
|
|
34
34
|
const file_tag_chat_story_raw_1 = __importDefault(require("./file-tag-chat.story?raw"));
|
|
35
35
|
const file_tag_loading_story_raw_1 = __importDefault(require("./file-tag-loading.story?raw"));
|
|
36
36
|
const file_tag_prompt_story_raw_1 = __importDefault(require("./file-tag-prompt.story?raw"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/file-tag/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,mEAAqE;AAA5D,yIAAA,OAAO,OAAkB;AAClC,6DAA+D;AAAtD,mIAAA,OAAO,OAAe;AAC/B,iEAAmE;AAA1D,uIAAA,OAAO,OAAiB;AAEjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/file-tag/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,mEAAqE;AAA5D,yIAAA,OAAO,OAAkB;AAClC,6DAA+D;AAAtD,mIAAA,OAAO,OAAe;AAC/B,iEAAmE;AAA1D,uIAAA,OAAO,OAAiB;AAEjC,gFAA4E;AAC5E,wFAA0D;AAC1D,8FAAgE;AAChE,4FAA8D;AAEjD,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,oCAAoB,CAAC,CAAC;AAC9D,QAAA,cAAc,GAAG,IAAA,0CAAmB,EAAC,iCAAiB,CAAC,CAAC;AACxD,QAAA,gBAAgB,GAAG,IAAA,0CAAmB,EAAC,mCAAmB,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 '../../../_common/export-stories-utils';\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageTag.js","sourceRoot":"","sources":["../../../../src/ai/image-tag/ImageTag.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA4E;
|
|
1
|
+
{"version":3,"file":"ImageTag.js","sourceRoot":"","sources":["../../../../src/ai/image-tag/ImageTag.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA4E;AAC5E,kDAA0D;AAC1D,4DAAoC;AAqBpC;;;;;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,QAA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j.\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 { XMarkIconOutline } from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\n\nimport { type CommonProps } from '../../_common/types';\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"]}
|
|
@@ -30,7 +30,7 @@ var image_tag_chat_story_1 = require("./image-tag-chat.story");
|
|
|
30
30
|
Object.defineProperty(exports, "ImageTagChat", { enumerable: true, get: function () { return __importDefault(image_tag_chat_story_1).default; } });
|
|
31
31
|
var image_tag_prompt_story_1 = require("./image-tag-prompt.story");
|
|
32
32
|
Object.defineProperty(exports, "ImageTagPrompt", { enumerable: true, get: function () { return __importDefault(image_tag_prompt_story_1).default; } });
|
|
33
|
-
const export_stories_utils_1 = require("
|
|
33
|
+
const export_stories_utils_1 = require("../../../_common/export-stories-utils");
|
|
34
34
|
const image_tag_chat_story_raw_1 = __importDefault(require("./image-tag-chat.story?raw"));
|
|
35
35
|
const image_tag_loading_story_raw_1 = __importDefault(require("./image-tag-loading.story?raw"));
|
|
36
36
|
const image_tag_prompt_story_raw_1 = __importDefault(require("./image-tag-prompt.story?raw"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/image-tag/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,qEAAuE;AAA9D,2IAAA,OAAO,OAAmB;AACnC,+DAAiE;AAAxD,qIAAA,OAAO,OAAgB;AAChC,mEAAqE;AAA5D,yIAAA,OAAO,OAAkB;AAElC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/image-tag/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,qEAAuE;AAA9D,2IAAA,OAAO,OAAmB;AACnC,+DAAiE;AAAxD,qIAAA,OAAO,OAAgB;AAChC,mEAAqE;AAA5D,yIAAA,OAAO,OAAkB;AAElC,gFAA4E;AAC5E,0FAA4D;AAC5D,gGAAkE;AAClE,8FAAgE;AAEnD,QAAA,kBAAkB,GAAG,IAAA,0CAAmB,EAAC,qCAAqB,CAAC,CAAC;AAChE,QAAA,eAAe,GAAG,IAAA,0CAAmB,EAAC,kCAAkB,CAAC,CAAC;AAC1D,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,oCAAoB,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 ImageTagLoading } from './image-tag-loading.story';\nexport { default as ImageTagChat } from './image-tag-chat.story';\nexport { default as ImageTagPrompt } from './image-tag-prompt.story';\n\nimport { removeLicenseHeader } from '../../../_common/export-stories-utils';\nimport ImageTagChatSrcRaw from './image-tag-chat.story?raw';\nimport ImageTagLoadingSrcRaw from './image-tag-loading.story?raw';\nimport ImageTagPromptSrcRaw from './image-tag-prompt.story?raw';\n\nexport const ImageTagLoadingSrc = removeLicenseHeader(ImageTagLoadingSrcRaw);\nexport const ImageTagChatSrc = removeLicenseHeader(ImageTagChatSrcRaw);\nexport const ImageTagPromptSrc = removeLicenseHeader(ImageTagPromptSrcRaw);\n"]}
|
|
@@ -1,3 +1,21 @@
|
|
|
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.MoreFiles = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
1
19
|
/**
|
|
2
20
|
*
|
|
3
21
|
* Copyright (c) "Neo4j"
|
|
@@ -18,25 +36,6 @@
|
|
|
18
36
|
* You should have received a copy of the GNU General Public License
|
|
19
37
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
38
|
*/
|
|
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.MoreFiles = void 0;
|
|
39
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
39
|
const classnames_1 = __importDefault(require("classnames"));
|
|
41
40
|
/**
|
|
42
41
|
* The component is a button that is meant to open a menu of files when clicked.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoreFiles.js","sourceRoot":"","sources":["../../../../src/ai/more-files/MoreFiles.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MoreFiles.js","sourceRoot":"","sources":["../../../../src/ai/more-files/MoreFiles.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AAapC;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,EASY,EAAE,EAAE;QAThB,EAC1B,KAAK,EACL,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,EACH,QAAQ,OAE8B,EADnC,SAAS,cARc,+EAS3B,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,mBAAmB,EAAE,SAAS,EAAE;QACzD,YAAY,EAAE,QAAQ;KACvB,CAAC,CAAC;IAEH,OAAO,CACL,kDACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,gBACA,GAAG,KAAK,aAAa,mBAClB,QAAQ,IACnB,SAAS,EACT,cAAc,oBAEhB,KAAK,KACA,CACV,CAAC;AACJ,CAAC,CAAC;AAE6B,uCAAS","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 classNames from 'classnames';\n\nimport type { CommonProps } from '../../_common/types';\n\ntype MoreFilesProps = {\n /** The number of files to show */\n count: number;\n /** Callback function triggered when the more files button is clicked */\n onClick?: () => void;\n /** Whether the more files button is active. Should be true when it opens the menu of files.*/\n isActive?: boolean;\n};\n\n/**\n * The component is a button that is meant to open a menu of files when clicked.\n * It should be used in a chat when you have more files attached to the message than should be shown at once.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst MoreFilesComponent = ({\n count,\n onClick,\n className,\n style,\n htmlAttributes,\n ref,\n isActive,\n ...restProps\n}: CommonProps<'button', MoreFilesProps>) => {\n const classes = classNames('ndl-ai-more-files', className, {\n 'ndl-active': isActive,\n });\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={onClick}\n className={classes}\n style={style}\n aria-label={`${count} more files`}\n aria-expanded={isActive}\n {...restProps}\n {...htmlAttributes}\n >\n +{count}\n </button>\n );\n};\n\nexport { MoreFilesComponent as MoreFiles };\n"]}
|
|
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.MoreFilesDefaultSrc = exports.MoreFilesDefault = void 0;
|
|
27
27
|
var more_files_story_1 = require("./more-files.story");
|
|
28
28
|
Object.defineProperty(exports, "MoreFilesDefault", { enumerable: true, get: function () { return __importDefault(more_files_story_1).default; } });
|
|
29
|
-
const export_stories_utils_1 = require("
|
|
29
|
+
const export_stories_utils_1 = require("../../../_common/export-stories-utils");
|
|
30
30
|
const more_files_story_raw_1 = __importDefault(require("./more-files.story?raw"));
|
|
31
31
|
exports.MoreFilesDefaultSrc = (0, export_stories_utils_1.removeLicenseHeader)(more_files_story_raw_1.default);
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/more-files/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AAEpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/more-files/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AAEpC,gFAA4E;AAC5E,kFAA4D;AAE/C,QAAA,mBAAmB,GAAG,IAAA,0CAAmB,EAAC,8BAAsB,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 MoreFilesDefault } from './more-files.story';\n\nimport { removeLicenseHeader } from '../../../_common/export-stories-utils';\nimport MoreFilesDefaultSrcRaw from './more-files.story?raw';\n\nexport const MoreFilesDefaultSrc = removeLicenseHeader(MoreFilesDefaultSrcRaw);\n"]}
|
|
@@ -22,14 +22,14 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
22
22
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
23
|
*/
|
|
24
24
|
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
|
+
const react_1 = require("@neo4j-ndl/react");
|
|
25
26
|
const ai_1 = require("@neo4j-ndl/react/ai");
|
|
26
27
|
const icons_1 = require("@neo4j-ndl/react/icons");
|
|
27
|
-
const
|
|
28
|
-
const react_1 = require("react");
|
|
28
|
+
const react_2 = require("react");
|
|
29
29
|
const Component = () => {
|
|
30
|
-
const [isMenuOpen, setIsMenuOpen] = (0,
|
|
31
|
-
const anchorRef = (0,
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ai_1.MoreFiles, { count: 4, isActive: isMenuOpen, onClick: () => setIsMenuOpen(!isMenuOpen), ref: anchorRef }), (0, jsx_runtime_1.jsx)(
|
|
30
|
+
const [isMenuOpen, setIsMenuOpen] = (0, react_2.useState)(false);
|
|
31
|
+
const anchorRef = (0, react_2.useRef)(null);
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ai_1.MoreFiles, { count: 4, isActive: isMenuOpen, onClick: () => setIsMenuOpen(!isMenuOpen), ref: anchorRef }), (0, jsx_runtime_1.jsx)(react_1.Menu, { isOpen: isMenuOpen, anchorRef: anchorRef, onClose: () => setIsMenuOpen(false), children: (0, jsx_runtime_1.jsxs)(react_1.Menu.Items, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.DocumentIconOutline, {}), title: "Science fiction bestseller", description: "PDF", onClick: () => alert('Science fiction bestseller') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.TableCellsIconOutline, {}), title: "MoviesDecade", description: "CSV", onClick: () => alert('MoviesDecade') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PhotoIconOutline, {}), title: "Family photo", description: "JPG", onClick: () => alert('Family photos') })] }) })] }));
|
|
33
33
|
};
|
|
34
34
|
exports.default = Component;
|
|
35
35
|
//# sourceMappingURL=more-files.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"more-files.story.js","sourceRoot":"","sources":["../../../../../src/ai/more-files/stories/more-files.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAgD;AAChD,kDAIgC;AAChC,
|
|
1
|
+
{"version":3,"file":"more-files.story.js","sourceRoot":"","sources":["../../../../../src/ai/more-files/stories/more-files.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAwC;AACxC,4CAAgD;AAChD,kDAIgC;AAChC,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACpD,MAAM,SAAS,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IAEzD,OAAO,CACL,6DACE,uBAAC,cAAS,IACR,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,EACzC,GAAG,EAAE,SAAS,GACd,EACF,uBAAC,YAAI,IACH,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,YAEnC,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,IAAI,IACR,aAAa,EAAE,uBAAC,2BAAmB,KAAG,EACtC,KAAK,EAAC,4BAA4B,EAClC,WAAW,EAAC,KAAK,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,GAClD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,aAAa,EAAE,uBAAC,6BAAqB,KAAG,EACxC,KAAK,EAAC,cAAc,EACpB,WAAW,EAAC,KAAK,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,GACpC,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,aAAa,EAAE,uBAAC,wBAAgB,KAAG,EACnC,KAAK,EAAC,cAAc,EACpB,WAAW,EAAC,KAAK,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,GACrC,IACS,GACR,IACN,CACJ,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 { Menu } from '@neo4j-ndl/react';\nimport { MoreFiles } from '@neo4j-ndl/react/ai';\nimport {\n DocumentIconOutline,\n PhotoIconOutline,\n TableCellsIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n const anchorRef = useRef<HTMLButtonElement | null>(null);\n\n return (\n <>\n <MoreFiles\n count={4}\n isActive={isMenuOpen}\n onClick={() => setIsMenuOpen(!isMenuOpen)}\n ref={anchorRef}\n />\n <Menu\n isOpen={isMenuOpen}\n anchorRef={anchorRef}\n onClose={() => setIsMenuOpen(false)}\n >\n <Menu.Items>\n <Menu.Item\n leadingVisual={<DocumentIconOutline />}\n title=\"Science fiction bestseller\"\n description=\"PDF\"\n onClick={() => alert('Science fiction bestseller')}\n />\n <Menu.Item\n leadingVisual={<TableCellsIconOutline />}\n title=\"MoviesDecade\"\n description=\"CSV\"\n onClick={() => alert('MoviesDecade')}\n />\n <Menu.Item\n leadingVisual={<PhotoIconOutline />}\n title=\"Family photo\"\n description=\"JPG\"\n onClick={() => alert('Family photos')}\n />\n </Menu.Items>\n </Menu>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Presence.js","sourceRoot":"","sources":["../../../../src/ai/presence/Presence.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAAkD;
|
|
1
|
+
{"version":3,"file":"Presence.js","sourceRoot":"","sources":["../../../../src/ai/presence/Presence.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAAkD;AAClD,kDAGgC;AAChC,4DAAoC;AASpC,MAAM,QAAQ,GAAG,CAAC,EAOkB,EAAE,EAAE;QAPtB,EAChB,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,cAAc,EACd,GAAG,OAE+B,EAD/B,SAAS,cANI,6DAOjB,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,cAAc,EAAE,UAAU,KAAK,IAAI;KACpC,CAAC,CAAC;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,sBAAc,GAAE,CAAC;IAEnC,MAAM,SAAS,GACb,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,6BAAqB,CAAC,CAAC,CAAC,4BAAoB,CAAC;IAEnE,OAAO,CACL,uBAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,IAC1B,CAAC,UAAU,KAAK,IAAI,IAAI;QAC1B,YAAY,EAAE,UAAU;QACxB,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;KACf,CAAC,EACE,SAAS,EACb,CACH,CAAC;AACJ,CAAC,CAAC;AAIO,4BAAQ;AAFjB,QAAQ,CAAC,WAAW,GAAG,UAAU,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 { useNeedleTheme } from '@neo4j-ndl/react';\nimport {\n Neo4JAiColorDarkIcon,\n Neo4JAiColorLightIcon,\n} from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\n\nimport type { CommonProps } from '../../_common/types';\n\ntype PresenceProps = {\n /** Whether the AI is thinking. Animates the underlying SVG */\n isThinking?: boolean;\n};\n\nconst Presence = ({\n className,\n isThinking = false,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'svg', PresenceProps>) => {\n const classes = classNames('ndl-ai-presence', className, {\n 'ndl-thinking': isThinking === true,\n });\n const { theme } = useNeedleTheme();\n\n const Component =\n theme === 'light' ? Neo4JAiColorLightIcon : Neo4JAiColorDarkIcon;\n\n return (\n <Component\n ref={ref}\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...(isThinking === true && {\n 'aria-label': 'Thinking',\n 'aria-live': 'polite',\n role: 'status',\n })}\n {...restProps}\n />\n );\n};\n\nPresence.displayName = 'Presence';\n\nexport { Presence };\n"]}
|
|
@@ -28,7 +28,7 @@ var ai_presence_default_story_1 = require("./ai-presence-default.story");
|
|
|
28
28
|
Object.defineProperty(exports, "PresenceDefault", { enumerable: true, get: function () { return __importDefault(ai_presence_default_story_1).default; } });
|
|
29
29
|
var ai_presence_thinking_story_1 = require("./ai-presence-thinking.story");
|
|
30
30
|
Object.defineProperty(exports, "PresenceThinking", { enumerable: true, get: function () { return __importDefault(ai_presence_thinking_story_1).default; } });
|
|
31
|
-
const export_stories_utils_1 = require("
|
|
31
|
+
const export_stories_utils_1 = require("../../../_common/export-stories-utils");
|
|
32
32
|
const ai_presence_default_story_raw_1 = __importDefault(require("./ai-presence-default.story?raw"));
|
|
33
33
|
const ai_presence_thinking_story_raw_1 = __importDefault(require("./ai-presence-thinking.story?raw"));
|
|
34
34
|
exports.PresenceDefaultSrc = (0, export_stories_utils_1.removeLicenseHeader)(ai_presence_default_story_raw_1.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,yEAAyE;AAAhE,6IAAA,OAAO,OAAmB;AACnC,2EAA2E;AAAlE,+IAAA,OAAO,OAAoB;AAEpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,yEAAyE;AAAhE,6IAAA,OAAO,OAAmB;AACnC,2EAA2E;AAAlE,+IAAA,OAAO,OAAoB;AAEpC,gFAA4E;AAC5E,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 PresenceDefault } from './ai-presence-default.story';\nexport { default as PresenceThinking } from './ai-presence-thinking.story';\n\nimport { removeLicenseHeader } from '../../../_common/export-stories-utils';\nimport PresenceDefaultSrcRaw from './ai-presence-default.story?raw';\nimport PresenceThinkingSrcRaw from './ai-presence-thinking.story?raw';\n\nexport const PresenceDefaultSrc = removeLicenseHeader(PresenceDefaultSrcRaw);\nexport const PresenceThinkingSrc = removeLicenseHeader(PresenceThinkingSrcRaw);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Prompt.js","sourceRoot":"","sources":["../../../../src/ai/prompt/Prompt.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAK0B;AAK1B,kDAIgC;AAChC,4DAAoC;AACpC,iCAAiE;AA6BjE;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,EAgBS,EAA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,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAC3C,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,SAAS,YAEb,YAAY,GACE,EACjB,uBAAC,YAAI,IACH,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EACnC,SAAS,EAAE,SAAS,EACpB,SAAS,EAAC,wBAAwB,YAElC,uBAAC,YAAI,CAAC,KAAK,cACR,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,uBAAC,YAAI,CAAC,IAAI,IAER,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,EACtC,aAAa,EACX,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,MAAK,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAC,wBAAgB,KAAG,CAAC,CAAC,CAAC,IAAI,IAJxD,MAAM,CAAC,KAAK,CAMjB,CACH,CAAC,GACS,GACR,IACN,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;IAC5C,MAAM,EAAE,WAAW;CACpB,CAAC,CAAC;AAEM,wBAAM","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 {\n CleanIconButton,\n DropdownButton,\n Menu,\n Typography,\n} from '@neo4j-ndl/react';\nimport type {\n CommonProps,\n HtmlAttributes,\n} from '@neo4j-ndl/react/_common/types';\nimport {\n ArrowSmallUpIconOutline,\n CheckIconOutline,\n StopCircleIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\ntype PromptProps = {\n /** The prompt text */\n value?: React.ComponentPropsWithoutRef<'textarea'>['value'];\n /** Callback function called when the prompt text changes */\n onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /** Whether the submit button is disabled */\n isSubmitDisabled?: boolean;\n /** Maximum number of rows the textarea can expand to */\n maxRows?: number;\n /** Whether the submit button is \"running\". Shows a stop icon when true. */\n isRunningPrompt?: boolean;\n /** Callback function called when the submit button is clicked */\n onSubmitPrompt?: (\n e:\n | React.KeyboardEvent<HTMLTextAreaElement>\n | React.MouseEvent<HTMLButtonElement, MouseEvent>,\n ) => void;\n /** Content to display above the textarea */\n topContent?: React.ReactNode;\n /** Content to display below the textarea */\n bottomContent?: React.ReactNode;\n /** Disclaimer to display below the component */\n disclaimer?: React.ReactNode;\n /** Props for the textarea element */\n textareaProps?: HtmlAttributes<'textarea'>;\n};\n\n/**\n * The component is used to display the prompt input for an LLM.\n * It includes a textarea for the user to enter their prompt and a submit button.\n * It can also display content above and below the textarea, like uploaded files or a select for changing agents.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst PromptComponent = ({\n value,\n onChange,\n maxRows = 5,\n isRunningPrompt = false,\n onSubmitPrompt,\n isSubmitDisabled = false,\n topContent,\n bottomContent,\n disclaimer = 'All information should be verified.',\n className,\n style,\n htmlAttributes,\n ref,\n textareaProps,\n ...restProps\n}: CommonProps<'div', PromptProps>) => {\n const classes = classNames('ndl-ai-prompt', className);\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const textareaAboveRef = useRef<HTMLDivElement>(null);\n const [lineHeight, setLineHeight] = useState(0);\n\n /** File overflow stuff */\n useEffect(() => {\n let rafId: number | null = null;\n\n const checkOverflow = () => {\n if (textareaAboveRef.current !== null) {\n const element = textareaAboveRef.current;\n const maxHeight = parseFloat(\n getComputedStyle(element).maxHeight.replace('px', ''),\n );\n const scrollHeight = element.scrollHeight;\n\n if (scrollHeight > maxHeight) {\n element.classList.add('ndl-can-scroll');\n } else {\n element.classList.remove('ndl-can-scroll');\n }\n }\n };\n\n const debouncedCheck = () => {\n if (rafId !== null) {\n cancelAnimationFrame(rafId);\n }\n rafId = requestAnimationFrame(checkOverflow);\n };\n\n // Initial check\n checkOverflow();\n\n const resizeObserver = new ResizeObserver(debouncedCheck);\n const mutationObserver = new MutationObserver(debouncedCheck);\n\n if (textareaAboveRef.current !== null) {\n resizeObserver.observe(textareaAboveRef.current);\n mutationObserver.observe(textareaAboveRef.current, {\n childList: true,\n subtree: true,\n });\n }\n\n return () => {\n if (rafId !== null) {\n cancelAnimationFrame(rafId);\n }\n resizeObserver.disconnect();\n mutationObserver.disconnect();\n };\n }, []);\n\n /** Textarea stuff */\n useEffect(() => {\n if (textareaRef.current !== null) {\n const computed = window.getComputedStyle(textareaRef.current);\n setLineHeight(parseInt(computed.lineHeight));\n }\n }, []);\n\n const adjustTextareaHeight = useCallback(() => {\n const ta = textareaRef.current;\n\n if (ta !== null && lineHeight > 0) {\n // Reset height so scrollHeight measures correctly\n ta.style.height = 'auto';\n\n const maxHeight = lineHeight * maxRows;\n\n if (ta.scrollHeight <= maxHeight) {\n ta.style.overflowY = 'hidden';\n ta.style.height = `${ta.scrollHeight}px`;\n } else {\n ta.style.overflowY = 'auto';\n ta.style.height = `${maxHeight}px`;\n }\n }\n }, [lineHeight, maxRows]);\n\n // Adjust height when prompt value changes (including when cleared)\n useEffect(() => {\n adjustTextareaHeight();\n }, [value, adjustTextareaHeight]);\n\n const handleInput = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n adjustTextareaHeight();\n onChange?.(e);\n };\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-ai-prompt-wrapper\">\n <div className=\"ndl-ai-prompt-wrapper-inner\">\n {Boolean(topContent) && (\n <div\n className=\"ndl-ai-prompt-textarea-above\"\n ref={textareaAboveRef}\n >\n {topContent}\n </div>\n )}\n <textarea\n placeholder=\"Ask anything\"\n className=\"ndl-ai-prompt-textarea\"\n rows={1}\n onChange={handleInput}\n value={value}\n ref={textareaRef}\n onKeyDown={(e) => {\n if (\n e.key === 'Enter' &&\n !e.shiftKey &&\n isSubmitDisabled !== true\n ) {\n e.preventDefault();\n onSubmitPrompt?.(e);\n }\n }}\n {...textareaProps}\n />\n <div className=\"ndl-ai-prompt-textarea-below\">\n {Boolean(bottomContent) && (\n <div className=\"ndl-ai-prompt-textarea-below-leading\">\n {bottomContent}\n </div>\n )}\n <SumbitPromptButton\n isDisabled={isSubmitDisabled}\n isRunningPrompt={isRunningPrompt}\n onClick={onSubmitPrompt}\n />\n </div>\n </div>\n </div>\n {Boolean(disclaimer) && (\n <Typography variant=\"body-small\" className=\"ndl-ai-prompt-footer\">\n {disclaimer}\n </Typography>\n )}\n </div>\n );\n};\n\nconst SumbitPromptButton = ({\n onClick,\n isDisabled,\n isRunningPrompt,\n}: {\n isDisabled?: boolean;\n isRunningPrompt?: boolean;\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n}) => {\n const description = isRunningPrompt === true ? 'Cancel' : 'Send';\n\n return (\n <CleanIconButton\n className=\"ndl-ai-prompt-submit-button\"\n description={description}\n size=\"medium\"\n onClick={onClick}\n isDisabled={isDisabled}\n >\n <ArrowSmallUpIconOutline\n style={{\n opacity: isRunningPrompt === true ? 0 : 1,\n position: isRunningPrompt === true ? 'absolute' : 'relative',\n transform:\n isRunningPrompt === true ? 'translateY(-8px)' : 'translateY(0)',\n }}\n />\n <StopCircleIconOutline\n style={{\n opacity: isRunningPrompt === true ? 1 : 0,\n position: isRunningPrompt === true ? 'relative' : 'absolute',\n }}\n />\n </CleanIconButton>\n );\n};\n\ntype AgentSelectProps = {\n value: { label: React.ReactNode; value: string };\n options: Array<{ label: React.ReactNode; value: string }>;\n onChange: (option: { label: React.ReactNode; value: string }) => void;\n};\n\nconst AgentSelect = ({ value, options = [], onChange }: AgentSelectProps) => {\n const anchorRef = useRef<HTMLButtonElement>(null);\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n const displayLabel = value?.label ?? options[0]?.label ?? '';\n\n const handleItemClick = (option: {\n label: React.ReactNode;\n value: string;\n }) => {\n onChange?.(option);\n setIsMenuOpen(false);\n };\n\n return (\n <>\n <DropdownButton\n size=\"small\"\n className=\"ndl-ai-prompt-dropdown-button\"\n onClick={() => setIsMenuOpen((old) => !old)}\n isOpen={isMenuOpen}\n ref={anchorRef}\n >\n {displayLabel}\n </DropdownButton>\n <Menu\n isOpen={isMenuOpen}\n onClose={() => setIsMenuOpen(false)}\n anchorRef={anchorRef}\n placement=\"top-start-bottom-start\"\n >\n <Menu.Items>\n {options.map((option) => (\n <Menu.Item\n key={option.value}\n title={option.label}\n onClick={() => handleItemClick(option)}\n leadingVisual={\n value?.value === option.value ? <CheckIconOutline /> : null\n }\n />\n ))}\n </Menu.Items>\n </Menu>\n </>\n );\n};\n\nconst Prompt = Object.assign(PromptComponent, {\n Select: AgentSelect,\n});\n\nexport { Prompt };\n"]}
|
|
1
|
+
{"version":3,"file":"Prompt.js","sourceRoot":"","sources":["../../../../src/ai/prompt/Prompt.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAK0B;AAC1B,kDAIgC;AAChC,4DAAoC;AACpC,iCAAiE;AA+BjE;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,EAgBS,EAAE,EAAE;QAhBb,EACvB,KAAK,EACL,QAAQ,EACR,OAAO,GAAG,CAAC,EACX,eAAe,GAAG,KAAK,EACvB,cAAc,EACd,gBAAgB,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ACjB,uBAAC,YAAI,IACH,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EACnC,SAAS,EAAE,SAAS,EACpB,SAAS,EAAC,wBAAwB,YAElC,uBAAC,YAAI,CAAC,KAAK,cACR,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,uBAAC,YAAI,CAAC,IAAI,IAER,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,EACtC,aAAa,EACX,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,MAAK,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAC,wBAAgB,KAAG,CAAC,CAAC,CAAC,IAAI,IAJxD,MAAM,CAAC,KAAK,CAMjB,CACH,CAAC,GACS,GACR,IACN,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;IAC5C,MAAM,EAAE,WAAW;CACpB,CAAC,CAAC;AAEM,wBAAM","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 {\n CleanIconButton,\n DropdownButton,\n Menu,\n Typography,\n} from '@neo4j-ndl/react';\nimport {\n ArrowSmallUpIconOutline,\n CheckIconOutline,\n StopCircleIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { CommonProps, HtmlAttributes } from '../../_common/types';\n\ntype PromptProps = {\n /** The prompt text */\n value?: React.ComponentPropsWithoutRef<'textarea'>['value'];\n /** Callback function called when the prompt text changes */\n onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /** Whether the submit button is disabled */\n isSubmitDisabled?: boolean;\n /** Maximum number of rows the textarea can expand to */\n maxRows?: number;\n /** Whether the submit button is \"running\". Shows a stop icon when true. */\n isRunningPrompt?: boolean;\n /** Callback function called when the submit button is clicked */\n onSubmitPrompt?: (\n e:\n | React.KeyboardEvent<HTMLTextAreaElement>\n | React.MouseEvent<HTMLButtonElement, MouseEvent>,\n ) => void;\n /** Content to display above the textarea */\n topContent?: React.ReactNode;\n /** Content to display below the textarea */\n bottomContent?: React.ReactNode;\n /** Disclaimer to display below the component */\n disclaimer?: React.ReactNode;\n /** Props for the textarea element */\n textareaProps?: HtmlAttributes<'textarea'>;\n};\n\n/**\n * The component is used to display the prompt input for an LLM.\n * It includes a textarea for the user to enter their prompt and a submit button.\n * It can also display content above and below the textarea, like uploaded files or a select for changing agents.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst PromptComponent = ({\n value,\n onChange,\n maxRows = 5,\n isRunningPrompt = false,\n onSubmitPrompt,\n isSubmitDisabled = false,\n topContent,\n bottomContent,\n disclaimer = 'All information should be verified.',\n className,\n style,\n htmlAttributes,\n ref,\n textareaProps,\n ...restProps\n}: CommonProps<'div', PromptProps>) => {\n const classes = classNames('ndl-ai-prompt', className);\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const textareaAboveRef = useRef<HTMLDivElement>(null);\n const [lineHeight, setLineHeight] = useState(0);\n\n /** File overflow stuff */\n useEffect(() => {\n let rafId: number | null = null;\n\n const checkOverflow = () => {\n if (textareaAboveRef.current !== null) {\n const element = textareaAboveRef.current;\n const maxHeight = parseFloat(\n getComputedStyle(element).maxHeight.replace('px', ''),\n );\n const scrollHeight = element.scrollHeight;\n\n if (scrollHeight > maxHeight) {\n element.classList.add('ndl-can-scroll');\n } else {\n element.classList.remove('ndl-can-scroll');\n }\n }\n };\n\n const debouncedCheck = () => {\n if (rafId !== null) {\n cancelAnimationFrame(rafId);\n }\n rafId = requestAnimationFrame(checkOverflow);\n };\n\n // Initial check\n checkOverflow();\n\n const resizeObserver = new ResizeObserver(debouncedCheck);\n const mutationObserver = new MutationObserver(debouncedCheck);\n\n if (textareaAboveRef.current !== null) {\n resizeObserver.observe(textareaAboveRef.current);\n mutationObserver.observe(textareaAboveRef.current, {\n childList: true,\n subtree: true,\n });\n }\n\n return () => {\n if (rafId !== null) {\n cancelAnimationFrame(rafId);\n }\n resizeObserver.disconnect();\n mutationObserver.disconnect();\n };\n }, []);\n\n /** Textarea stuff */\n useEffect(() => {\n if (textareaRef.current !== null) {\n const computed = window.getComputedStyle(textareaRef.current);\n setLineHeight(parseInt(computed.lineHeight));\n }\n }, []);\n\n const adjustTextareaHeight = useCallback(() => {\n const ta = textareaRef.current;\n\n if (ta !== null && lineHeight > 0) {\n // Reset height so scrollHeight measures correctly\n ta.style.height = 'auto';\n\n const maxHeight = lineHeight * maxRows;\n\n if (ta.scrollHeight <= maxHeight) {\n ta.style.overflowY = 'hidden';\n ta.style.height = `${ta.scrollHeight}px`;\n } else {\n ta.style.overflowY = 'auto';\n ta.style.height = `${maxHeight}px`;\n }\n }\n }, [lineHeight, maxRows]);\n\n // Adjust height when prompt value changes (including when cleared)\n useEffect(() => {\n adjustTextareaHeight();\n }, [value, adjustTextareaHeight]);\n\n const handleInput = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n adjustTextareaHeight();\n onChange?.(e);\n };\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-ai-prompt-wrapper\">\n <div className=\"ndl-ai-prompt-wrapper-inner\">\n {Boolean(topContent) && (\n <div\n className=\"ndl-ai-prompt-textarea-above\"\n ref={textareaAboveRef}\n >\n {topContent}\n </div>\n )}\n <textarea\n placeholder=\"Ask anything\"\n className=\"ndl-ai-prompt-textarea\"\n rows={1}\n onChange={handleInput}\n value={value}\n ref={textareaRef}\n onKeyDown={(e) => {\n if (\n e.key === 'Enter' &&\n !e.shiftKey &&\n isSubmitDisabled !== true\n ) {\n e.preventDefault();\n onSubmitPrompt?.(e);\n }\n }}\n {...textareaProps}\n />\n <div className=\"ndl-ai-prompt-textarea-below\">\n {Boolean(bottomContent) && (\n <div className=\"ndl-ai-prompt-textarea-below-leading\">\n {bottomContent}\n </div>\n )}\n <SumbitPromptButton\n isDisabled={isSubmitDisabled}\n isRunningPrompt={isRunningPrompt}\n onClick={onSubmitPrompt}\n />\n </div>\n </div>\n </div>\n {Boolean(disclaimer) && (\n <Typography variant=\"body-small\" className=\"ndl-ai-prompt-footer\">\n {disclaimer}\n </Typography>\n )}\n </div>\n );\n};\n\nconst SumbitPromptButton = ({\n onClick,\n isDisabled,\n isRunningPrompt,\n}: {\n isDisabled?: boolean;\n isRunningPrompt?: boolean;\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n}) => {\n const description = isRunningPrompt === true ? 'Cancel' : 'Send';\n\n return (\n <CleanIconButton\n className=\"ndl-ai-prompt-submit-button\"\n description={description}\n size=\"medium\"\n onClick={onClick}\n isDisabled={isDisabled}\n >\n <ArrowSmallUpIconOutline\n style={{\n opacity: isRunningPrompt === true ? 0 : 1,\n position: isRunningPrompt === true ? 'absolute' : 'relative',\n transform:\n isRunningPrompt === true ? 'translateY(-8px)' : 'translateY(0)',\n }}\n />\n <StopCircleIconOutline\n style={{\n opacity: isRunningPrompt === true ? 1 : 0,\n position: isRunningPrompt === true ? 'relative' : 'absolute',\n }}\n />\n </CleanIconButton>\n );\n};\n\ntype AgentSelectProps = {\n value: { label: React.ReactNode; value: string };\n options: Array<{ label: React.ReactNode; value: string }>;\n onChange: (option: { label: React.ReactNode; value: string }) => void;\n};\n\nconst AgentSelect = ({ value, options = [], onChange }: AgentSelectProps) => {\n const anchorRef = useRef<HTMLButtonElement>(null);\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n const displayLabel = value?.label ?? options[0]?.label ?? '';\n\n const handleItemClick = (option: {\n label: React.ReactNode;\n value: string;\n }) => {\n onChange?.(option);\n setIsMenuOpen(false);\n };\n\n return (\n <>\n <DropdownButton\n size=\"small\"\n className=\"ndl-ai-prompt-dropdown-button\"\n onClick={() => setIsMenuOpen((old) => !old)}\n isOpen={isMenuOpen}\n ref={anchorRef}\n >\n {displayLabel}\n </DropdownButton>\n <Menu\n isOpen={isMenuOpen}\n onClose={() => setIsMenuOpen(false)}\n anchorRef={anchorRef}\n placement=\"top-start-bottom-start\"\n >\n <Menu.Items>\n {options.map((option) => (\n <Menu.Item\n key={option.value}\n title={option.label}\n onClick={() => handleItemClick(option)}\n leadingVisual={\n value?.value === option.value ? <CheckIconOutline /> : null\n }\n />\n ))}\n </Menu.Items>\n </Menu>\n </>\n );\n};\n\nconst Prompt = Object.assign(PromptComponent, {\n Select: AgentSelect,\n});\n\nexport { Prompt };\n"]}
|
|
@@ -28,7 +28,7 @@ var prompt_default_story_1 = require("./prompt-default.story");
|
|
|
28
28
|
Object.defineProperty(exports, "PromptDefault", { enumerable: true, get: function () { return __importDefault(prompt_default_story_1).default; } });
|
|
29
29
|
var prompt_advanced_story_1 = require("./prompt-advanced.story");
|
|
30
30
|
Object.defineProperty(exports, "PromptAdvanced", { enumerable: true, get: function () { return __importDefault(prompt_advanced_story_1).default; } });
|
|
31
|
-
const export_stories_utils_1 = require("
|
|
31
|
+
const export_stories_utils_1 = require("../../../_common/export-stories-utils");
|
|
32
32
|
const prompt_advanced_story_raw_1 = __importDefault(require("./prompt-advanced.story?raw"));
|
|
33
33
|
const prompt_default_story_raw_1 = __importDefault(require("./prompt-default.story?raw"));
|
|
34
34
|
exports.PromptDefaultSrc = (0, export_stories_utils_1.removeLicenseHeader)(prompt_default_story_raw_1.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/prompt/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,+DAAkE;AAAzD,sIAAA,OAAO,OAAiB;AACjC,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAElC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/prompt/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,+DAAkE;AAAzD,sIAAA,OAAO,OAAiB;AACjC,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAElC,gFAA4E;AAC5E,4FAA+D;AAC/D,0FAA6D;AAEhD,QAAA,gBAAgB,GAAG,IAAA,0CAAmB,EAAC,kCAAmB,CAAC,CAAC;AAC5D,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,mCAAoB,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 PromptDefault } from './prompt-default.story';\nexport { default as PromptAdvanced } from './prompt-advanced.story';\n\nimport { removeLicenseHeader } from '../../../_common/export-stories-utils';\nimport PromptAdvancedSrcRaw from './prompt-advanced.story?raw';\nimport PromptDefaultSrcRaw from './prompt-default.story?raw';\n\nexport const PromptDefaultSrc = removeLicenseHeader(PromptDefaultSrcRaw);\nexport const PromptAdvancedSrc = removeLicenseHeader(PromptAdvancedSrcRaw);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reasoning.js","sourceRoot":"","sources":["../../../../src/ai/reasoning/Reasoning.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA+D;
|
|
1
|
+
{"version":3,"file":"Reasoning.js","sourceRoot":"","sources":["../../../../src/ai/reasoning/Reasoning.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA+D;AAC/D,kDAAgE;AAChE,4DAAoC;AACpC,iCAAiC;AAGjC,0CAAuC;AACvC,yFAAiF;AAajF;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,EAUS,EAAE,EAAE;QAVb,EAC1B,UAAU,GAAG,IAAI,EACjB,UAAU,GAAG,IAAI,EACjB,aAAa,GAAG,UAAU,EAC1B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAEgC,EADhC,SAAS,cATc,wGAU3B,CADa;IAEZ,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAC1D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACpD,MAAM,kBAAkB,GAAG,UAAU,IAAI,UAAU,KAAK,KAAK,CAAC;IAE9D,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,IAAA,oDAAsB,EAAC,UAAU,CAAC,CAAC;IAE7E,OAAO,CACL,+CACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAElB,uBAAC,kBAAU,IAAC,OAA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AAC;IAEpD,OAAO,CACL,+CACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAElB,iCAAK,SAAS,EAAC,iCAAiC,aAC9C,gCAAK,SAAS,EAAC,kCAAkC,YAAE,aAAa,GAAO,EACvE,uBAAC,kBAAU,IAAC,OAAO,EAAC,kBAAkB,YAAE,OAAO,GAAc,EAC7D,uBAAC,uBAAe,IACd,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAC/C,IAAI,EAAC,OAAO,EACZ,OAAO,EAAC,SAAS,EACjB,SAAS,EAAE,IAAA,oBAAU,EAAC,gCAAgC,EAAE;4BACtD,cAAc,EAAE,UAAU;yBAC3B,CAAC,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,YAEzC,uBAAC,8BAAsB,KAAG,GACV,IACd,EACN,gCACE,SAAS,EAAE,IAAA,oBAAU,EAAC,kCAAkC,EAAE;oBACxD,cAAc,EAAE,UAAU;iBAC3B,CAAC,EACF,KAAK,EAAE,CAAC,UAAU,YAElB,gCAAK,SAAS,EAAC,wCAAwC,YACrD,iCAAK,SAAS,EAAC,0CAA0C,aACvD,gCAAK,SAAS,EAAC,iDAAiD,YAC9D,gCAAK,SAAS,EAAC,uCAAuC,GAAG,GACrD,EACN,gCAAK,SAAS,EAAC,2CAA2C,YACvD,QAAQ,GACL,IACF,GACF,GACF,KACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;IAClD,OAAO;CACR,CAAC,CAAC;AAEM,8BAAS","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, Typography } from '@neo4j-ndl/react';\nimport { ChevronDownIconOutline } from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\nimport { useState } from 'react';\n\nimport { type CommonProps } from '../../_common/types';\nimport { Presence } from '../presence';\nimport { formatThinkingDuration } from '../thinking/thinking-duration-formatter';\n\ntype ReasoningProps = {\n /** What should be displayed inside the reasoning component. */\n children?: React.ReactNode;\n /** Whether the AI is thinking */\n isThinking?: boolean;\n /** The duration of the thinking in milliseconds */\n thinkingMs?: number;\n /** The current action the AI is performing */\n currentAction?: string;\n};\n\n/**\n * The component is used to display the reasoning state of an LLM.\n * It has an accordion like behavior to show the reasoning steps.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst ReasoningComponent = ({\n isThinking = true,\n thinkingMs = 1000,\n currentAction = 'Thinking',\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', ReasoningProps>) => {\n const classes = classNames('ndl-ai-reasoning', className);\n const [isExpanded, setIsExpanded] = useState(false);\n const shouldShowChildren = isExpanded && isThinking === false;\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 <Typography variant=\"label\" className=\"ndl-ai-reasoning-header\">\n {isThinking === true ? (\n <>\n <Presence isThinking={isThinking} className=\"n-size-token-24\" />\n <span className=\"ndl-ai-reasoning-header-text\">\n {currentAction}...\n </span>\n </>\n ) : (\n <>\n <span>\n Thought for {thinkingDuration} {unit}\n </span>\n <CleanIconButton\n size=\"small\"\n variant=\"neutral\"\n onClick={() => setIsExpanded(!isExpanded)}\n description={isExpanded ? 'Collapse' : 'Expand'}\n className={classNames('ndl-ai-reasoning-expand-button', {\n 'ndl-expanded': isExpanded,\n })}\n >\n <ChevronDownIconOutline />\n </CleanIconButton>\n </>\n )}\n </Typography>\n <div\n className={classNames('ndl-ai-reasoning-content', {\n 'ndl-expanded': shouldShowChildren,\n })}\n inert={!shouldShowChildren}\n >\n <div className=\"ndl-ai-reasoning-content-inner\">\n <div className=\"ndl-ai-reasoning-content-inner-2\">{children}</div>\n </div>\n </div>\n </div>\n );\n};\n\ntype SectionProps = {\n /** The heading of the section */\n heading?: React.ReactNode;\n /** The children of the section */\n children?: React.ReactNode;\n /** The visual leading the section */\n leadingVisual?: React.ReactNode;\n};\n\nconst Section = ({\n heading,\n leadingVisual,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', SectionProps>) => {\n const classes = classNames('ndl-ai-reasoning-section', className);\n const [isExpanded, setIsExpanded] = useState(false);\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-ai-reasoning-section-header\">\n <div className=\"ndl-ai-reasoning-section-leading\">{leadingVisual}</div>\n <Typography variant=\"subheading-small\">{heading}</Typography>\n <CleanIconButton\n description={isExpanded ? 'Collapse' : 'Expand'}\n size=\"small\"\n variant=\"neutral\"\n className={classNames('ndl-ai-reasoning-expand-button', {\n 'ndl-expanded': isExpanded,\n })}\n onClick={() => setIsExpanded(!isExpanded)}\n >\n <ChevronDownIconOutline />\n </CleanIconButton>\n </div>\n <div\n className={classNames('ndl-ai-reasoning-section-content', {\n 'ndl-expanded': isExpanded,\n })}\n inert={!isExpanded}\n >\n <div className=\"ndl-ai-reasoning-section-content-inner\">\n <div className=\"ndl-ai-reasoning-section-content-inner-2\">\n <div className=\"ndl-ai-reasoning-section-content-line-container\">\n <div className=\"ndl-ai-reasoning-section-content-line\" />\n </div>\n <div className=\"ndl-ai-reasoning-section-content-children\">\n {children}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nconst Reasoning = Object.assign(ReasoningComponent, {\n Section,\n});\n\nexport { Reasoning };\n"]}
|
|
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.ReasoningFullSrc = exports.ReasoningFull = void 0;
|
|
27
27
|
var reasoning_full_story_1 = require("./reasoning-full.story");
|
|
28
28
|
Object.defineProperty(exports, "ReasoningFull", { enumerable: true, get: function () { return __importDefault(reasoning_full_story_1).default; } });
|
|
29
|
-
const export_stories_utils_1 = require("
|
|
29
|
+
const export_stories_utils_1 = require("../../../_common/export-stories-utils");
|
|
30
30
|
const reasoning_full_story_raw_1 = __importDefault(require("./reasoning-full.story?raw"));
|
|
31
31
|
exports.ReasoningFullSrc = (0, export_stories_utils_1.removeLicenseHeader)(reasoning_full_story_raw_1.default);
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/reasoning/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,+DAAkE;AAAzD,sIAAA,OAAO,OAAiB;AAEjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/reasoning/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,+DAAkE;AAAzD,sIAAA,OAAO,OAAiB;AAEjC,gFAA4E;AAC5E,0FAA6D;AAEhD,QAAA,gBAAgB,GAAG,IAAA,0CAAmB,EAAC,kCAAmB,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 ReasoningFull } from './reasoning-full.story';\n\nimport { removeLicenseHeader } from '../../../_common/export-stories-utils';\nimport ReasoningFullSrcRaw from './reasoning-full.story?raw';\n\nexport const ReasoningFullSrc = removeLicenseHeader(ReasoningFullSrcRaw);\n"]}
|