@inkeep/agents-ui 0.0.0-dev-20260313222128
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/LICENSE +64 -0
- package/README.md +1 -0
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/color-mode/index.cjs +1 -0
- package/dist/color-mode/index.d.ts +20 -0
- package/dist/color-mode/index.js +170 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +238 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.cjs +1 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.js +8 -0
- package/dist/primitives/atoms/avatars/ai.cjs +1 -0
- package/dist/primitives/atoms/avatars/ai.d.ts +3 -0
- package/dist/primitives/atoms/avatars/ai.js +99 -0
- package/dist/primitives/atoms/avatars/user.cjs +1 -0
- package/dist/primitives/atoms/avatars/user.d.ts +3 -0
- package/dist/primitives/atoms/avatars/user.js +27 -0
- package/dist/primitives/atoms/cmdk/command-score.cjs +1 -0
- package/dist/primitives/atoms/cmdk/command-score.d.ts +1 -0
- package/dist/primitives/atoms/cmdk/command-score.js +46 -0
- package/dist/primitives/atoms/cmdk/index.cjs +1 -0
- package/dist/primitives/atoms/cmdk/index.d.ts +460 -0
- package/dist/primitives/atoms/cmdk/index.js +521 -0
- package/dist/primitives/atoms/codeblock/index.cjs +1 -0
- package/dist/primitives/atoms/codeblock/index.d.ts +10 -0
- package/dist/primitives/atoms/codeblock/index.js +40 -0
- package/dist/primitives/atoms/combobox.cjs +1 -0
- package/dist/primitives/atoms/combobox.js +275 -0
- package/dist/primitives/atoms/custom-styles.cjs +1 -0
- package/dist/primitives/atoms/custom-styles.d.ts +5 -0
- package/dist/primitives/atoms/custom-styles.js +57 -0
- package/dist/primitives/atoms/dialog.cjs +1 -0
- package/dist/primitives/atoms/dialog.d.ts +94 -0
- package/dist/primitives/atoms/dialog.js +227 -0
- package/dist/primitives/atoms/error-boundary.cjs +1 -0
- package/dist/primitives/atoms/error-boundary.d.ts +6 -0
- package/dist/primitives/atoms/error-boundary.js +9 -0
- package/dist/primitives/atoms/icons/built-in-icon-renderer.cjs +1 -0
- package/dist/primitives/atoms/icons/built-in-icon-renderer.d.ts +6 -0
- package/dist/primitives/atoms/icons/built-in-icon-renderer.js +51 -0
- package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -0
- package/dist/primitives/atoms/icons/built-in-icons.d.ts +86 -0
- package/dist/primitives/atoms/icons/built-in-icons.js +89 -0
- package/dist/primitives/atoms/icons/checkbox-icon.cjs +1 -0
- package/dist/primitives/atoms/icons/checkbox-icon.d.ts +1 -0
- package/dist/primitives/atoms/icons/checkbox-icon.js +24 -0
- package/dist/primitives/atoms/icons/collections/bi.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/bi.d.ts +4 -0
- package/dist/primitives/atoms/icons/collections/bi.js +49 -0
- package/dist/primitives/atoms/icons/collections/fi.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/fi.d.ts +2 -0
- package/dist/primitives/atoms/icons/collections/fi.js +29 -0
- package/dist/primitives/atoms/icons/collections/gr.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/gr.d.ts +2 -0
- package/dist/primitives/atoms/icons/collections/gr.js +21 -0
- package/dist/primitives/atoms/icons/collections/io5.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/io5.d.ts +34 -0
- package/dist/primitives/atoms/icons/collections/io5.js +806 -0
- package/dist/primitives/atoms/icons/collections/pi.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/pi.d.ts +4 -0
- package/dist/primitives/atoms/icons/collections/pi.js +49 -0
- package/dist/primitives/atoms/icons/custom-icon.cjs +1 -0
- package/dist/primitives/atoms/icons/custom-icon.d.ts +6 -0
- package/dist/primitives/atoms/icons/custom-icon.js +19 -0
- package/dist/primitives/atoms/icons/generate-icon.cjs +1 -0
- package/dist/primitives/atoms/icons/generate-icon.d.ts +28 -0
- package/dist/primitives/atoms/icons/generate-icon.js +56 -0
- package/dist/primitives/atoms/icons/index.cjs +1 -0
- package/dist/primitives/atoms/icons/index.d.ts +2 -0
- package/dist/primitives/atoms/icons/index.js +6 -0
- package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -0
- package/dist/primitives/atoms/icons/inkeep-default-icons.d.ts +2 -0
- package/dist/primitives/atoms/icons/inkeep-default-icons.js +28 -0
- package/dist/primitives/atoms/link.cjs +1 -0
- package/dist/primitives/atoms/link.d.ts +14 -0
- package/dist/primitives/atoms/link.js +35 -0
- package/dist/primitives/atoms/markdown/components.cjs +1 -0
- package/dist/primitives/atoms/markdown/components.d.ts +31 -0
- package/dist/primitives/atoms/markdown/components.js +76 -0
- package/dist/primitives/atoms/markdown/index.cjs +1 -0
- package/dist/primitives/atoms/markdown/index.d.ts +17 -0
- package/dist/primitives/atoms/markdown/index.js +121 -0
- package/dist/primitives/atoms/markdown/rehype-inline-code-property.cjs +1 -0
- package/dist/primitives/atoms/markdown/rehype-inline-code-property.d.ts +1 -0
- package/dist/primitives/atoms/markdown/rehype-inline-code-property.js +12 -0
- package/dist/primitives/atoms/portal-with-theme.cjs +1 -0
- package/dist/primitives/atoms/portal-with-theme.d.ts +2 -0
- package/dist/primitives/atoms/portal-with-theme.js +12 -0
- package/dist/primitives/atoms/portal.cjs +1 -0
- package/dist/primitives/atoms/portal.d.ts +8 -0
- package/dist/primitives/atoms/portal.js +19 -0
- package/dist/primitives/atoms/select.cjs +1 -0
- package/dist/primitives/atoms/select.d.ts +136 -0
- package/dist/primitives/atoms/select.js +785 -0
- package/dist/primitives/atoms/shadow/context.cjs +1 -0
- package/dist/primitives/atoms/shadow/context.d.ts +14 -0
- package/dist/primitives/atoms/shadow/context.js +54 -0
- package/dist/primitives/atoms/shadow/create.cjs +1 -0
- package/dist/primitives/atoms/shadow/create.d.ts +8 -0
- package/dist/primitives/atoms/shadow/create.js +56 -0
- package/dist/primitives/atoms/shadow/index.d.ts +1 -0
- package/dist/primitives/atoms/shadow/root.cjs +1 -0
- package/dist/primitives/atoms/shadow/root.d.ts +5 -0
- package/dist/primitives/atoms/shadow/root.js +22 -0
- package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.cjs +1 -0
- package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.d.ts +2 -0
- package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.js +11 -0
- package/dist/primitives/atoms/shadow/utils.cjs +1 -0
- package/dist/primitives/atoms/shadow/utils.d.ts +9 -0
- package/dist/primitives/atoms/shadow/utils.js +16 -0
- package/dist/primitives/components/chat-bubble/index.cjs +1 -0
- package/dist/primitives/components/chat-bubble/index.d.ts +10 -0
- package/dist/primitives/components/chat-bubble/index.js +38 -0
- package/dist/primitives/components/chat-button.cjs +1 -0
- package/dist/primitives/components/chat-button.d.ts +20 -0
- package/dist/primitives/components/chat-button.js +51 -0
- package/dist/primitives/components/chat-history/index.cjs +1 -0
- package/dist/primitives/components/chat-history/index.d.ts +27 -0
- package/dist/primitives/components/chat-history/index.js +105 -0
- package/dist/primitives/components/data-summaries.cjs +1 -0
- package/dist/primitives/components/data-summaries.d.ts +14 -0
- package/dist/primitives/components/data-summaries.js +38 -0
- package/dist/primitives/components/embedded-chat/chat-provider.cjs +1 -0
- package/dist/primitives/components/embedded-chat/chat-provider.d.ts +19 -0
- package/dist/primitives/components/embedded-chat/chat-provider.js +20 -0
- package/dist/primitives/components/embedded-chat/use-captcha.cjs +1 -0
- package/dist/primitives/components/embedded-chat/use-captcha.d.ts +30 -0
- package/dist/primitives/components/embedded-chat/use-captcha.js +67 -0
- package/dist/primitives/components/embedded-chat/use-chat-action.cjs +1 -0
- package/dist/primitives/components/embedded-chat/use-chat-action.d.ts +9 -0
- package/dist/primitives/components/embedded-chat/use-chat-action.js +41 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +3 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +57 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +312 -0
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -0
- package/dist/primitives/components/embedded-chat/use-stream-processor.d.ts +30 -0
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +159 -0
- package/dist/primitives/components/embedded-chat.cjs +11 -0
- package/dist/primitives/components/embedded-chat.d.ts +461 -0
- package/dist/primitives/components/embedded-chat.js +2051 -0
- package/dist/primitives/components/embedded-search/search-provider.cjs +1 -0
- package/dist/primitives/components/embedded-search/search-provider.d.ts +21 -0
- package/dist/primitives/components/embedded-search/search-provider.js +26 -0
- package/dist/primitives/components/embedded-search/transform-results.cjs +1 -0
- package/dist/primitives/components/embedded-search/transform-results.d.ts +3 -0
- package/dist/primitives/components/embedded-search/transform-results.js +47 -0
- package/dist/primitives/components/embedded-search/url-query.cjs +1 -0
- package/dist/primitives/components/embedded-search/url-query.d.ts +4 -0
- package/dist/primitives/components/embedded-search/url-query.js +12 -0
- package/dist/primitives/components/embedded-search/use-inkeep-search.cjs +1 -0
- package/dist/primitives/components/embedded-search/use-inkeep-search.d.ts +19 -0
- package/dist/primitives/components/embedded-search/use-inkeep-search.js +35 -0
- package/dist/primitives/components/embedded-search/use-search-filter.cjs +1 -0
- package/dist/primitives/components/embedded-search/use-search-filter.d.ts +1 -0
- package/dist/primitives/components/embedded-search/use-search-filter.js +77 -0
- package/dist/primitives/components/embedded-search.cjs +1 -0
- package/dist/primitives/components/embedded-search.d.ts +249 -0
- package/dist/primitives/components/embedded-search.js +628 -0
- package/dist/primitives/components/factory.cjs +1 -0
- package/dist/primitives/components/factory.d.ts +19 -0
- package/dist/primitives/components/factory.js +39 -0
- package/dist/primitives/components/index.cjs +1 -0
- package/dist/primitives/components/index.d.ts +13 -0
- package/dist/primitives/components/index.js +33 -0
- package/dist/primitives/components/modal/modal-provider.cjs +1 -0
- package/dist/primitives/components/modal/modal-provider.d.ts +12 -0
- package/dist/primitives/components/modal/modal-provider.js +8 -0
- package/dist/primitives/components/modal/use-inkeep-modal.cjs +1 -0
- package/dist/primitives/components/modal/use-inkeep-modal.d.ts +7 -0
- package/dist/primitives/components/modal/use-inkeep-modal.js +9 -0
- package/dist/primitives/components/modal/widget-auto-focus.cjs +1 -0
- package/dist/primitives/components/modal/widget-auto-focus.d.ts +2 -0
- package/dist/primitives/components/modal/widget-auto-focus.js +25 -0
- package/dist/primitives/components/modal.cjs +1 -0
- package/dist/primitives/components/modal.d.ts +18 -0
- package/dist/primitives/components/modal.js +40 -0
- package/dist/primitives/components/presence.cjs +1 -0
- package/dist/primitives/components/presence.d.ts +8 -0
- package/dist/primitives/components/presence.js +26 -0
- package/dist/primitives/components/searchbar.cjs +1 -0
- package/dist/primitives/components/searchbar.d.ts +23 -0
- package/dist/primitives/components/searchbar.js +54 -0
- package/dist/primitives/components/sidebar-chat/index.cjs +1 -0
- package/dist/primitives/components/sidebar-chat/index.d.ts +9 -0
- package/dist/primitives/components/sidebar-chat/index.js +67 -0
- package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.cjs +1 -0
- package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.d.ts +5 -0
- package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.js +34 -0
- package/dist/primitives/components/tagline-logo-icon.cjs +1 -0
- package/dist/primitives/components/tagline-logo-icon.d.ts +1 -0
- package/dist/primitives/components/tagline-logo-icon.js +26 -0
- package/dist/primitives/components/use-component-trigger.cjs +1 -0
- package/dist/primitives/components/use-component-trigger.d.ts +5 -0
- package/dist/primitives/components/use-component-trigger.js +17 -0
- package/dist/primitives/constants/search.cjs +1 -0
- package/dist/primitives/constants/search.d.ts +1 -0
- package/dist/primitives/constants/search.js +5 -0
- package/dist/primitives/hooks/index.cjs +1 -0
- package/dist/primitives/hooks/index.d.ts +12 -0
- package/dist/primitives/hooks/index.js +26 -0
- package/dist/primitives/hooks/use-anonymous-session.cjs +1 -0
- package/dist/primitives/hooks/use-anonymous-session.d.ts +12 -0
- package/dist/primitives/hooks/use-anonymous-session.js +82 -0
- package/dist/primitives/hooks/use-boolean.cjs +1 -0
- package/dist/primitives/hooks/use-boolean.d.ts +10 -0
- package/dist/primitives/hooks/use-boolean.js +17 -0
- package/dist/primitives/hooks/use-component-classnames.cjs +1 -0
- package/dist/primitives/hooks/use-component-classnames.d.ts +6 -0
- package/dist/primitives/hooks/use-component-classnames.js +14 -0
- package/dist/primitives/hooks/use-container-size.cjs +1 -0
- package/dist/primitives/hooks/use-container-size.d.ts +5 -0
- package/dist/primitives/hooks/use-container-size.js +18 -0
- package/dist/primitives/hooks/use-conversation-loader.cjs +1 -0
- package/dist/primitives/hooks/use-conversation-loader.d.ts +13 -0
- package/dist/primitives/hooks/use-conversation-loader.js +36 -0
- package/dist/primitives/hooks/use-copy-to-clipboard.cjs +1 -0
- package/dist/primitives/hooks/use-copy-to-clipboard.d.ts +3 -0
- package/dist/primitives/hooks/use-copy-to-clipboard.js +24 -0
- package/dist/primitives/hooks/use-debounce.cjs +1 -0
- package/dist/primitives/hooks/use-debounce.d.ts +1 -0
- package/dist/primitives/hooks/use-debounce.js +16 -0
- package/dist/primitives/hooks/use-inkeep-api-client.cjs +1 -0
- package/dist/primitives/hooks/use-inkeep-api-client.d.ts +33 -0
- package/dist/primitives/hooks/use-inkeep-api-client.js +87 -0
- package/dist/primitives/hooks/use-inkeep-open-state.cjs +1 -0
- package/dist/primitives/hooks/use-inkeep-open-state.d.ts +18 -0
- package/dist/primitives/hooks/use-inkeep-open-state.js +47 -0
- package/dist/primitives/hooks/use-instant-update.cjs +1 -0
- package/dist/primitives/hooks/use-instant-update.d.ts +16 -0
- package/dist/primitives/hooks/use-instant-update.js +16 -0
- package/dist/primitives/hooks/use-is-mounted.cjs +1 -0
- package/dist/primitives/hooks/use-is-mounted.d.ts +1 -0
- package/dist/primitives/hooks/use-is-mounted.js +11 -0
- package/dist/primitives/hooks/use-local-storage.cjs +1 -0
- package/dist/primitives/hooks/use-local-storage.d.ts +8 -0
- package/dist/primitives/hooks/use-local-storage.js +26 -0
- package/dist/primitives/hooks/use-media-query.cjs +1 -0
- package/dist/primitives/hooks/use-media-query.d.ts +1 -0
- package/dist/primitives/hooks/use-media-query.js +14 -0
- package/dist/primitives/hooks/use-resize-observer.cjs +1 -0
- package/dist/primitives/hooks/use-resize-observer.d.ts +12 -0
- package/dist/primitives/hooks/use-resize-observer.js +32 -0
- package/dist/primitives/hooks/use-scrolling-fades.cjs +1 -0
- package/dist/primitives/hooks/use-scrolling-fades.d.ts +2 -0
- package/dist/primitives/hooks/use-scrolling-fades.js +18 -0
- package/dist/primitives/hooks/use-settle-action.cjs +1 -0
- package/dist/primitives/hooks/use-settle-action.d.ts +3 -0
- package/dist/primitives/hooks/use-settle-action.js +11 -0
- package/dist/primitives/hooks/use-simple-scroll.cjs +1 -0
- package/dist/primitives/hooks/use-simple-scroll.d.ts +16 -0
- package/dist/primitives/hooks/use-simple-scroll.js +51 -0
- package/dist/primitives/hooks/use-streaming-events.cjs +1 -0
- package/dist/primitives/hooks/use-streaming-events.d.ts +8 -0
- package/dist/primitives/hooks/use-streaming-events.js +33 -0
- package/dist/primitives/index.cjs +1 -0
- package/dist/primitives/index.d.ts +13 -0
- package/dist/primitives/index.js +174 -0
- package/dist/primitives/providers/attachment-item-provider.cjs +1 -0
- package/dist/primitives/providers/attachment-item-provider.d.ts +9 -0
- package/dist/primitives/providers/attachment-item-provider.js +13 -0
- package/dist/primitives/providers/attachments-bar-provider.cjs +1 -0
- package/dist/primitives/providers/attachments-bar-provider.d.ts +30 -0
- package/dist/primitives/providers/attachments-bar-provider.js +57 -0
- package/dist/primitives/providers/base-events-provider.cjs +1 -0
- package/dist/primitives/providers/base-events-provider.d.ts +8 -0
- package/dist/primitives/providers/base-events-provider.js +37 -0
- package/dist/primitives/providers/chat-bubble-provider.cjs +1 -0
- package/dist/primitives/providers/chat-bubble-provider.d.ts +22 -0
- package/dist/primitives/providers/chat-bubble-provider.js +19 -0
- package/dist/primitives/providers/chat-form-provider.cjs +1 -0
- package/dist/primitives/providers/chat-form-provider.d.ts +26 -0
- package/dist/primitives/providers/chat-form-provider.js +109 -0
- package/dist/primitives/providers/chat-history-provider.cjs +1 -0
- package/dist/primitives/providers/chat-history-provider.d.ts +32 -0
- package/dist/primitives/providers/chat-history-provider.js +105 -0
- package/dist/primitives/providers/config-provider.cjs +1 -0
- package/dist/primitives/providers/config-provider.d.ts +24 -0
- package/dist/primitives/providers/config-provider.js +40 -0
- package/dist/primitives/providers/feedback-item-provider.cjs +1 -0
- package/dist/primitives/providers/feedback-item-provider.d.ts +10 -0
- package/dist/primitives/providers/feedback-item-provider.js +16 -0
- package/dist/primitives/providers/feedback-provider.cjs +1 -0
- package/dist/primitives/providers/feedback-provider.d.ts +16 -0
- package/dist/primitives/providers/feedback-provider.js +83 -0
- package/dist/primitives/providers/form-field-provider.cjs +1 -0
- package/dist/primitives/providers/form-field-provider.d.ts +15 -0
- package/dist/primitives/providers/form-field-provider.js +17 -0
- package/dist/primitives/providers/help-menu-provider.cjs +1 -0
- package/dist/primitives/providers/help-menu-provider.d.ts +11 -0
- package/dist/primitives/providers/help-menu-provider.js +19 -0
- package/dist/primitives/providers/hover-popover-provider.cjs +1 -0
- package/dist/primitives/providers/hover-popover-provider.d.ts +10 -0
- package/dist/primitives/providers/hover-popover-provider.js +13 -0
- package/dist/primitives/providers/index.cjs +1 -0
- package/dist/primitives/providers/index.d.ts +19 -0
- package/dist/primitives/providers/index.js +65 -0
- package/dist/primitives/providers/markdown-provider.cjs +1 -0
- package/dist/primitives/providers/markdown-provider.d.ts +9 -0
- package/dist/primitives/providers/markdown-provider.js +8 -0
- package/dist/primitives/providers/message-attachments-provider.cjs +1 -0
- package/dist/primitives/providers/message-attachments-provider.d.ts +13 -0
- package/dist/primitives/providers/message-attachments-provider.js +27 -0
- package/dist/primitives/providers/message-provider.cjs +1 -0
- package/dist/primitives/providers/message-provider.d.ts +10 -0
- package/dist/primitives/providers/message-provider.js +14 -0
- package/dist/primitives/providers/root-provider.cjs +1 -0
- package/dist/primitives/providers/root-provider.d.ts +8 -0
- package/dist/primitives/providers/root-provider.js +21 -0
- package/dist/primitives/providers/search-events-provider.cjs +1 -0
- package/dist/primitives/providers/search-events-provider.d.ts +8 -0
- package/dist/primitives/providers/search-events-provider.js +17 -0
- package/dist/primitives/providers/sidebar-chat-provider.cjs +1 -0
- package/dist/primitives/providers/sidebar-chat-provider.d.ts +61 -0
- package/dist/primitives/providers/sidebar-chat-provider.js +37 -0
- package/dist/primitives/providers/source-item-provider.cjs +1 -0
- package/dist/primitives/providers/source-item-provider.d.ts +12 -0
- package/dist/primitives/providers/source-item-provider.js +13 -0
- package/dist/primitives/providers/theme-provider.cjs +3 -0
- package/dist/primitives/providers/theme-provider.d.ts +3 -0
- package/dist/primitives/providers/theme-provider.js +79 -0
- package/dist/primitives/providers/widget-provider.cjs +1 -0
- package/dist/primitives/providers/widget-provider.d.ts +10 -0
- package/dist/primitives/providers/widget-provider.js +8 -0
- package/dist/primitives/utils/component-ids.cjs +1 -0
- package/dist/primitives/utils/component-ids.d.ts +662 -0
- package/dist/primitives/utils/component-ids.js +361 -0
- package/dist/primitives/utils/compose-event-handlers.cjs +1 -0
- package/dist/primitives/utils/compose-event-handlers.d.ts +3 -0
- package/dist/primitives/utils/compose-event-handlers.js +10 -0
- package/dist/primitives/utils/compose-refs.cjs +1 -0
- package/dist/primitives/utils/compose-refs.d.ts +5 -0
- package/dist/primitives/utils/compose-refs.js +30 -0
- package/dist/primitives/utils/default-settings.cjs +1 -0
- package/dist/primitives/utils/default-settings.d.ts +169 -0
- package/dist/primitives/utils/default-settings.js +52 -0
- package/dist/primitives/utils/form.cjs +1 -0
- package/dist/primitives/utils/form.d.ts +3 -0
- package/dist/primitives/utils/form.js +19 -0
- package/dist/primitives/utils/generate-uid.cjs +1 -0
- package/dist/primitives/utils/generate-uid.d.ts +2 -0
- package/dist/primitives/utils/generate-uid.js +14 -0
- package/dist/primitives/utils/get-message-metadata.d.ts +8 -0
- package/dist/primitives/utils/get-source-icon.cjs +1 -0
- package/dist/primitives/utils/get-source-icon.d.ts +2 -0
- package/dist/primitives/utils/get-source-icon.js +11 -0
- package/dist/primitives/utils/highlight-emphasis.cjs +1 -0
- package/dist/primitives/utils/highlight-emphasis.d.ts +4 -0
- package/dist/primitives/utils/highlight-emphasis.js +15 -0
- package/dist/primitives/utils/merge-props.cjs +1 -0
- package/dist/primitives/utils/merge-props.d.ts +7 -0
- package/dist/primitives/utils/merge-props.js +41 -0
- package/dist/primitives/utils/misc.cjs +1 -0
- package/dist/primitives/utils/misc.d.ts +12 -0
- package/dist/primitives/utils/misc.js +31 -0
- package/dist/primitives/utils/split-props.cjs +1 -0
- package/dist/primitives/utils/split-props.d.ts +14 -0
- package/dist/primitives/utils/split-props.js +10 -0
- package/dist/react/chat-button-modal.cjs +1 -0
- package/dist/react/chat-button-modal.d.ts +22 -0
- package/dist/react/chat-button-modal.js +41 -0
- package/dist/react/chat-button.cjs +1 -0
- package/dist/react/chat-button.d.ts +28 -0
- package/dist/react/chat-button.js +73 -0
- package/dist/react/embedded-chat.cjs +1 -0
- package/dist/react/embedded-chat.d.ts +15 -0
- package/dist/react/embedded-chat.js +431 -0
- package/dist/react/embedded-search-and-chat.cjs +1 -0
- package/dist/react/embedded-search-and-chat.d.ts +40 -0
- package/dist/react/embedded-search-and-chat.impl.cjs +1 -0
- package/dist/react/embedded-search-and-chat.impl.d.ts +9 -0
- package/dist/react/embedded-search-and-chat.impl.js +43 -0
- package/dist/react/embedded-search-and-chat.js +66 -0
- package/dist/react/embedded-search.cjs +1 -0
- package/dist/react/embedded-search.d.ts +17 -0
- package/dist/react/embedded-search.js +181 -0
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +238 -0
- package/dist/react/modal.chat.cjs +1 -0
- package/dist/react/modal.chat.d.ts +9 -0
- package/dist/react/modal.chat.js +21 -0
- package/dist/react/modal.cjs +1 -0
- package/dist/react/modal.d.ts +23 -0
- package/dist/react/modal.js +27 -0
- package/dist/react/modal.search-and-chat.cjs +1 -0
- package/dist/react/modal.search-and-chat.d.ts +6 -0
- package/dist/react/modal.search-and-chat.js +27 -0
- package/dist/react/modal.search.cjs +1 -0
- package/dist/react/modal.search.d.ts +6 -0
- package/dist/react/modal.search.js +21 -0
- package/dist/react/searchbar.cjs +1 -0
- package/dist/react/searchbar.d.ts +13 -0
- package/dist/react/searchbar.js +68 -0
- package/dist/react/sidebar-chat.cjs +1 -0
- package/dist/react/sidebar-chat.d.ts +4 -0
- package/dist/react/sidebar-chat.js +53 -0
- package/dist/react/utils.cjs +1 -0
- package/dist/react/utils.d.ts +6 -0
- package/dist/react/utils.js +20 -0
- package/dist/react/widget-toggle.cjs +1 -0
- package/dist/react/widget-toggle.d.ts +14 -0
- package/dist/react/widget-toggle.js +65 -0
- package/dist/styled/components/chat-bubble.cjs +1 -0
- package/dist/styled/components/chat-bubble.d.ts +5 -0
- package/dist/styled/components/chat-bubble.js +70 -0
- package/dist/styled/components/chat-button.cjs +1 -0
- package/dist/styled/components/chat-button.d.ts +9 -0
- package/dist/styled/components/chat-button.js +60 -0
- package/dist/styled/components/chat-history.cjs +1 -0
- package/dist/styled/components/chat-history.d.ts +15 -0
- package/dist/styled/components/chat-history.js +197 -0
- package/dist/styled/components/data-summary-group.cjs +1 -0
- package/dist/styled/components/data-summary-group.d.ts +11 -0
- package/dist/styled/components/data-summary-group.js +96 -0
- package/dist/styled/components/embedded-chat/session-loading.cjs +1 -0
- package/dist/styled/components/embedded-chat/session-loading.d.ts +1 -0
- package/dist/styled/components/embedded-chat/session-loading.js +23 -0
- package/dist/styled/components/embedded-chat.cjs +1 -0
- package/dist/styled/components/embedded-chat.d.ts +211 -0
- package/dist/styled/components/embedded-chat.js +1997 -0
- package/dist/styled/components/embedded-search/results-loading.cjs +1 -0
- package/dist/styled/components/embedded-search/results-loading.d.ts +1 -0
- package/dist/styled/components/embedded-search/results-loading.js +39 -0
- package/dist/styled/components/embedded-search.cjs +1 -0
- package/dist/styled/components/embedded-search.d.ts +73 -0
- package/dist/styled/components/embedded-search.js +680 -0
- package/dist/styled/components/index.cjs +1 -0
- package/dist/styled/components/index.d.ts +13 -0
- package/dist/styled/components/index.js +28 -0
- package/dist/styled/components/loading-indicator.cjs +1 -0
- package/dist/styled/components/loading-indicator.d.ts +1 -0
- package/dist/styled/components/loading-indicator.js +36 -0
- package/dist/styled/components/message.cjs +1 -0
- package/dist/styled/components/message.d.ts +4 -0
- package/dist/styled/components/message.js +333 -0
- package/dist/styled/components/modal.cjs +1 -0
- package/dist/styled/components/modal.d.ts +6 -0
- package/dist/styled/components/modal.js +46 -0
- package/dist/styled/components/searchbar.cjs +1 -0
- package/dist/styled/components/searchbar.d.ts +11 -0
- package/dist/styled/components/searchbar.js +81 -0
- package/dist/styled/components/shadow.cjs +1 -0
- package/dist/styled/components/shadow.d.ts +3 -0
- package/dist/styled/components/shadow.js +8 -0
- package/dist/styled/components/sidebar-chat.cjs +1 -0
- package/dist/styled/components/sidebar-chat.d.ts +6 -0
- package/dist/styled/components/sidebar-chat.js +90 -0
- package/dist/styled/components/ui/markdown-styles.cjs +1 -0
- package/dist/styled/components/ui/markdown-styles.d.ts +23 -0
- package/dist/styled/components/ui/markdown-styles.js +39 -0
- package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.cjs +1 -0
- package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.d.ts +7 -0
- package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.js +33 -0
- package/dist/styled/components/ui/recipes/attachment.cjs +1 -0
- package/dist/styled/components/ui/recipes/attachment.d.ts +4 -0
- package/dist/styled/components/ui/recipes/attachment.js +28 -0
- package/dist/styled/components/ui/recipes/button.cjs +1 -0
- package/dist/styled/components/ui/recipes/button.d.ts +6 -0
- package/dist/styled/components/ui/recipes/button.js +87 -0
- package/dist/styled/components/ui/recipes/checkbox.cjs +1 -0
- package/dist/styled/components/ui/recipes/checkbox.d.ts +4 -0
- package/dist/styled/components/ui/recipes/checkbox.js +23 -0
- package/dist/styled/components/ui/recipes/citation.cjs +1 -0
- package/dist/styled/components/ui/recipes/citation.d.ts +4 -0
- package/dist/styled/components/ui/recipes/citation.js +75 -0
- package/dist/styled/components/ui/recipes/combobox.cjs +1 -0
- package/dist/styled/components/ui/recipes/combobox.d.ts +4 -0
- package/dist/styled/components/ui/recipes/combobox.js +57 -0
- package/dist/styled/components/ui/recipes/icon.cjs +1 -0
- package/dist/styled/components/ui/recipes/icon.d.ts +2 -0
- package/dist/styled/components/ui/recipes/icon.js +6 -0
- package/dist/styled/components/ui/recipes/index.cjs +1 -0
- package/dist/styled/components/ui/recipes/index.d.ts +16 -0
- package/dist/styled/components/ui/recipes/index.js +39 -0
- package/dist/styled/components/ui/recipes/input.cjs +1 -0
- package/dist/styled/components/ui/recipes/input.d.ts +5 -0
- package/dist/styled/components/ui/recipes/input.js +34 -0
- package/dist/styled/components/ui/recipes/link.cjs +1 -0
- package/dist/styled/components/ui/recipes/link.d.ts +2 -0
- package/dist/styled/components/ui/recipes/link.js +13 -0
- package/dist/styled/components/ui/recipes/markdown.cjs +1 -0
- package/dist/styled/components/ui/recipes/markdown.d.ts +16 -0
- package/dist/styled/components/ui/recipes/markdown.js +103 -0
- package/dist/styled/components/ui/recipes/modal.cjs +1 -0
- package/dist/styled/components/ui/recipes/modal.d.ts +4 -0
- package/dist/styled/components/ui/recipes/modal.js +59 -0
- package/dist/styled/components/ui/recipes/popover.cjs +1 -0
- package/dist/styled/components/ui/recipes/popover.d.ts +4 -0
- package/dist/styled/components/ui/recipes/popover.js +20 -0
- package/dist/styled/components/ui/recipes/scrollable.cjs +1 -0
- package/dist/styled/components/ui/recipes/scrollable.d.ts +4 -0
- package/dist/styled/components/ui/recipes/scrollable.js +15 -0
- package/dist/styled/components/ui/recipes/select.cjs +1 -0
- package/dist/styled/components/ui/recipes/select.d.ts +4 -0
- package/dist/styled/components/ui/recipes/select.js +38 -0
- package/dist/styled/components/ui/recipes/skeleton.cjs +1 -0
- package/dist/styled/components/ui/recipes/skeleton.d.ts +2 -0
- package/dist/styled/components/ui/recipes/skeleton.js +16 -0
- package/dist/styled/components/ui/recipes/widget-toggle.cjs +1 -0
- package/dist/styled/components/ui/recipes/widget-toggle.d.ts +4 -0
- package/dist/styled/components/ui/recipes/widget-toggle.js +35 -0
- package/dist/styled/index.cjs +1 -0
- package/dist/styled/index.d.ts +2 -0
- package/dist/styled/index.js +200 -0
- package/dist/styled/inkeep.css.cjs +4567 -0
- package/dist/styled/inkeep.css.js +4571 -0
- package/dist/styled/utils.cjs +1 -0
- package/dist/styled/utils.d.ts +4 -0
- package/dist/styled/utils.js +11 -0
- package/dist/theme/color-utils.cjs +1 -0
- package/dist/theme/color-utils.d.ts +1 -0
- package/dist/theme/color-utils.js +21 -0
- package/dist/theme/colors.cjs +1 -0
- package/dist/theme/colors.d.ts +104 -0
- package/dist/theme/colors.js +143 -0
- package/dist/theme/index.cjs +1 -0
- package/dist/theme/index.d.ts +125 -0
- package/dist/theme/index.js +58 -0
- package/dist/theme/utils/create-css-variables.cjs +1 -0
- package/dist/theme/utils/create-css-variables.d.ts +2 -0
- package/dist/theme/utils/create-css-variables.js +24 -0
- package/dist/theme/utils/generate-theme-variables.cjs +1 -0
- package/dist/theme/utils/generate-theme-variables.d.ts +3 -0
- package/dist/theme/utils/generate-theme-variables.js +34 -0
- package/dist/types/color-mode.d.ts +44 -0
- package/dist/types/config/ai.d.ts +269 -0
- package/dist/types/config/base.d.ts +358 -0
- package/dist/types/config/components.d.ts +16 -0
- package/dist/types/config/filters.d.ts +17 -0
- package/dist/types/config/index.d.ts +36 -0
- package/dist/types/config/open-settings.d.ts +70 -0
- package/dist/types/config/search.d.ts +95 -0
- package/dist/types/config/settings/actions.d.ts +112 -0
- package/dist/types/config/settings/form.d.ts +83 -0
- package/dist/types/config/settings/jsonschema.d.ts +105 -0
- package/dist/types/config/settings/workflow.d.ts +86 -0
- package/dist/types/events.d.ts +188 -0
- package/dist/types/icons/built-in.d.ts +1 -0
- package/dist/types/icons/custom.d.ts +33 -0
- package/dist/types/icons/index.d.ts +2 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/js/index.d.ts +55 -0
- package/dist/types/message.d.ts +43 -0
- package/dist/types/shadow.d.ts +15 -0
- package/dist/types/sources.d.ts +100 -0
- package/dist/types/theme.d.ts +25 -0
- package/dist/types/widget.d.ts +27 -0
- package/package.json +140 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as n, Fragment as B, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { InkeepEmbeddedSearchAndChatImpl as C } from "./embedded-search-and-chat.js";
|
|
4
|
+
import { useWidgetImpl as g } from "./embedded-search-and-chat.impl.js";
|
|
5
|
+
import { InkeepEmbeddedSearchImpl as y } from "./embedded-search.js";
|
|
6
|
+
import { SearchBarContainer as I, SearchBarButton as k, SearchBarContentWrapper as K, SearchBarIcon as b, SearchBarText as w, SearchBarKbdWrapper as O, SearchBarKbdModifier as A, SearchBarKbdShortcutKey as T } from "../styled/components/searchbar.js";
|
|
7
|
+
import { Shadow as W } from "../styled/components/shadow.js";
|
|
8
|
+
import { WebWidgetInteractionType as m } from "../primitives/providers/config-provider.js";
|
|
9
|
+
import { RootProvider as x } from "../primitives/providers/root-provider.js";
|
|
10
|
+
import { ErrorBoundary as E } from "../primitives/atoms/error-boundary.js";
|
|
11
|
+
import { InkeepModal as V } from "./modal.js";
|
|
12
|
+
import { composeEventHandlers as v } from "./utils.js";
|
|
13
|
+
import { useControllableState as P } from "@radix-ui/react-use-controllable-state";
|
|
14
|
+
function Q(o) {
|
|
15
|
+
const {
|
|
16
|
+
openSettings: r,
|
|
17
|
+
defaultView: a = "search",
|
|
18
|
+
canToggleView: t = !0,
|
|
19
|
+
...c
|
|
20
|
+
} = o, h = {
|
|
21
|
+
...c,
|
|
22
|
+
shouldShowAskAICard: t ? o.shouldShowAskAICard : !1
|
|
23
|
+
}, { config: p, ...d } = g({
|
|
24
|
+
...h,
|
|
25
|
+
defaultView: a
|
|
26
|
+
}), f = (l) => {
|
|
27
|
+
r?.isOpen === void 0 && (o.forceDefaultView && !l && d.setView(a), i(!!l));
|
|
28
|
+
}, [u = !1, i] = P({
|
|
29
|
+
prop: r?.isOpen,
|
|
30
|
+
defaultProp: r?.defaultOpen ?? !1,
|
|
31
|
+
onChange: v(r?.onOpenChange, f)
|
|
32
|
+
}), s = {
|
|
33
|
+
shortcutKey: "k",
|
|
34
|
+
...r,
|
|
35
|
+
isOpen: u,
|
|
36
|
+
onOpenChange: i
|
|
37
|
+
}, S = () => t ? /* @__PURE__ */ e(C, { ...d }) : /* @__PURE__ */ e(y, { ...h });
|
|
38
|
+
return /* @__PURE__ */ n(B, { children: [
|
|
39
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(W, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ e(x, { config: p, componentType: m.SearchBar, children: /* @__PURE__ */ e(j, { onOpenChange: i, openSettings: s }) }) }) }),
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
|
+
V,
|
|
42
|
+
{
|
|
43
|
+
...p,
|
|
44
|
+
openSettings: s,
|
|
45
|
+
componentType: m.SearchBar,
|
|
46
|
+
children: S()
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
function j({ onOpenChange: o, openSettings: r }) {
|
|
52
|
+
return /* @__PURE__ */ e(I, { children: /* @__PURE__ */ n(k, { onClick: (t) => {
|
|
53
|
+
t.button !== 2 && o?.((c) => !c);
|
|
54
|
+
}, children: [
|
|
55
|
+
/* @__PURE__ */ n(K, { children: [
|
|
56
|
+
/* @__PURE__ */ e(b, {}),
|
|
57
|
+
/* @__PURE__ */ e(w, {})
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ n(O, { children: [
|
|
60
|
+
/* @__PURE__ */ e(A, { shortcutKey: r?.shortcutKey }),
|
|
61
|
+
/* @__PURE__ */ e(T, { shortcutKey: r?.shortcutKey })
|
|
62
|
+
] })
|
|
63
|
+
] }) });
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
Q as InkeepSearchBar,
|
|
67
|
+
j as SearchBarImpl
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../styled/components/embedded-chat.cjs"),r=require("../styled/components/sidebar-chat.cjs"),a=require("../styled/components/shadow.cjs"),h=require("../primitives/providers/config-provider.cjs"),c=require("../primitives/providers/root-provider.cjs"),u=require("../primitives/atoms/error-boundary.cjs"),l=require("./embedded-chat.cjs");function b(){return e.jsxs(r.Header,{children:[e.jsx(s.ChatHistoryTrigger,{}),e.jsx(r.CloseButton,{})]})}function j(t){const{baseSettings:i,aiChatSettings:o,shouldAutoFocusInput:n,...d}=t;return e.jsx(u.ErrorBoundary,{children:e.jsx(a.Shadow,{wrapperStyles:{height:"inherit",width:"inherit",overflowX:"hidden"},children:e.jsx(c.RootProvider,{config:{baseSettings:i,aiChatSettings:o},componentType:h.WebWidgetInteractionType.SidebarChat,children:e.jsxs(r.Root,{...d,children:[e.jsx(r.Resizer,{}),e.jsx(l.InkeepEmbeddedChatImpl,{variant:"no-shadow",shouldAutoFocusInput:n,header:b})]})})})})}exports.InkeepSidebarChat=j;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EmbeddedChatProviderProps, SidebarChatProps } from '../styled';
|
|
2
|
+
import { ChatConfig } from './embedded-chat';
|
|
3
|
+
export type InkeepSidebarChatProps = Omit<EmbeddedChatProviderProps, 'isHidden'> & Partial<ChatConfig> & SidebarChatProps;
|
|
4
|
+
export declare function InkeepSidebarChat(props: InkeepSidebarChatProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import { ChatHistoryTrigger as n } from "../styled/components/embedded-chat.js";
|
|
4
|
+
import { Root as h, Resizer as s, Header as m, CloseButton as p } from "../styled/components/sidebar-chat.js";
|
|
5
|
+
import { Shadow as c } from "../styled/components/shadow.js";
|
|
6
|
+
import { WebWidgetInteractionType as C } from "../primitives/providers/config-provider.js";
|
|
7
|
+
import { RootProvider as f } from "../primitives/providers/root-provider.js";
|
|
8
|
+
import { ErrorBoundary as l } from "../primitives/atoms/error-boundary.js";
|
|
9
|
+
import { InkeepEmbeddedChatImpl as u } from "./embedded-chat.js";
|
|
10
|
+
function b() {
|
|
11
|
+
return /* @__PURE__ */ r(m, { children: [
|
|
12
|
+
/* @__PURE__ */ e(n, {}),
|
|
13
|
+
/* @__PURE__ */ e(p, {})
|
|
14
|
+
] });
|
|
15
|
+
}
|
|
16
|
+
function v(t) {
|
|
17
|
+
const { baseSettings: o, aiChatSettings: i, shouldAutoFocusInput: a, ...d } = t;
|
|
18
|
+
return /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(
|
|
19
|
+
c,
|
|
20
|
+
{
|
|
21
|
+
wrapperStyles: {
|
|
22
|
+
height: "inherit",
|
|
23
|
+
width: "inherit",
|
|
24
|
+
overflowX: "hidden"
|
|
25
|
+
// prevent the horizontal scrollbar from appearing while the sidebar is animating
|
|
26
|
+
},
|
|
27
|
+
children: /* @__PURE__ */ e(
|
|
28
|
+
f,
|
|
29
|
+
{
|
|
30
|
+
config: {
|
|
31
|
+
baseSettings: o,
|
|
32
|
+
aiChatSettings: i
|
|
33
|
+
},
|
|
34
|
+
componentType: C.SidebarChat,
|
|
35
|
+
children: /* @__PURE__ */ r(h, { ...d, children: [
|
|
36
|
+
/* @__PURE__ */ e(s, {}),
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
u,
|
|
39
|
+
{
|
|
40
|
+
variant: "no-shadow",
|
|
41
|
+
shouldAutoFocusInput: a,
|
|
42
|
+
header: b
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] })
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
) });
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
v as InkeepSidebarChat
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function u(...e){return n=>{for(const t of e)s(t,n)}}function c(e,n,{checkForDefaultPrevented:t=!0}={}){return function(o){if(e?.(o),t===!1||!o.defaultPrevented)return n?.(o)}}exports.composeEventHandlers=c;exports.composeRefs=u;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type PossibleRef<T> = React.Ref<T | null> | undefined;
|
|
2
|
+
export declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void;
|
|
3
|
+
export declare function composeEventHandlers<E>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
|
|
4
|
+
checkForDefaultPrevented?: boolean | undefined;
|
|
5
|
+
}): (event: E) => void;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function f(n, e) {
|
|
3
|
+
typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
4
|
+
}
|
|
5
|
+
function c(...n) {
|
|
6
|
+
return (e) => {
|
|
7
|
+
for (const t of n)
|
|
8
|
+
f(t, e);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function i(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
12
|
+
return function(o) {
|
|
13
|
+
if (n?.(o), t === !1 || !o.defaultPrevented)
|
|
14
|
+
return e?.(o);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
i as composeEventHandlers,
|
|
19
|
+
c as composeRefs
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("../styled/components/ui/recipes/widget-toggle.cjs"),a=require("../primitives/components/factory.cjs"),o=require("../primitives/utils/misc.cjs"),u=require("../primitives/atoms/icons/custom-icon.cjs"),w=a.ikp("div",{_id:"view_toggle"}),g=a.ikp("button",{_id:"view_toggle_button",className:c.widgetToggle({slot:"button"})}),n=a.ikp(u.CustomIcon,{_id:"view_toggle_icon"});function T(e){const{handleToggle:i}=s(e);return t.jsxs(w,{className:c.widgetToggle({slot:"root"}),children:[t.jsxs(g,{onClick:()=>i("search"),"data-active":o.dataAttr(e.view==="search"),children:[t.jsx(n,{"data-active":o.dataAttr(e.view==="search"),iconKey:"switchToSearch",className:c.widgetToggle({slot:"icon"})}),e.searchLabel||"Search"]}),t.jsxs(g,{onClick:()=>i("chat"),"data-active":o.dataAttr(e.view==="chat"),children:[t.jsx(n,{"data-active":o.dataAttr(e.view==="chat"),iconKey:"switchToChat",className:c.widgetToggle({slot:"icon"})}),e.askAILabel||"Ask AI"]})]})}function s(e){const{onToggleView:i,query:l}=e;return{handleToggle:(r,d)=>{i?.({view:r,query:l,autoSubmit:d})}}}exports.WidgetToggle=T;exports.useToggleView=s;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ModalViewTypes, WidgetView } from '../types/index.ts';
|
|
2
|
+
export declare function WidgetToggle(props: {
|
|
3
|
+
onToggleView: WidgetView['onToggleView'];
|
|
4
|
+
query?: string;
|
|
5
|
+
askAILabel?: string;
|
|
6
|
+
searchLabel?: string;
|
|
7
|
+
view: ModalViewTypes;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function useToggleView(props: {
|
|
10
|
+
onToggleView?: WidgetView['onToggleView'];
|
|
11
|
+
query?: string;
|
|
12
|
+
}): {
|
|
13
|
+
handleToggle: (view: ModalViewTypes, autoSubmit?: boolean) => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { widgetToggle as i } from "../styled/components/ui/recipes/widget-toggle.js";
|
|
4
|
+
import { ikp as a } from "../primitives/components/factory.js";
|
|
5
|
+
import { dataAttr as o } from "../primitives/utils/misc.js";
|
|
6
|
+
import { CustomIcon as d } from "../primitives/atoms/icons/custom-icon.js";
|
|
7
|
+
const m = a("div", {
|
|
8
|
+
_id: "view_toggle"
|
|
9
|
+
}), l = a("button", {
|
|
10
|
+
_id: "view_toggle_button",
|
|
11
|
+
className: i({ slot: "button" })
|
|
12
|
+
}), g = a(d, {
|
|
13
|
+
_id: "view_toggle_icon"
|
|
14
|
+
});
|
|
15
|
+
function k(e) {
|
|
16
|
+
const { handleToggle: t } = w(e);
|
|
17
|
+
return /* @__PURE__ */ c(m, { className: i({ slot: "root" }), children: [
|
|
18
|
+
/* @__PURE__ */ c(
|
|
19
|
+
l,
|
|
20
|
+
{
|
|
21
|
+
onClick: () => t("search"),
|
|
22
|
+
"data-active": o(e.view === "search"),
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ n(
|
|
25
|
+
g,
|
|
26
|
+
{
|
|
27
|
+
"data-active": o(e.view === "search"),
|
|
28
|
+
iconKey: "switchToSearch",
|
|
29
|
+
className: i({ slot: "icon" })
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
e.searchLabel || "Search"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ c(
|
|
37
|
+
l,
|
|
38
|
+
{
|
|
39
|
+
onClick: () => t("chat"),
|
|
40
|
+
"data-active": o(e.view === "chat"),
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ n(
|
|
43
|
+
g,
|
|
44
|
+
{
|
|
45
|
+
"data-active": o(e.view === "chat"),
|
|
46
|
+
iconKey: "switchToChat",
|
|
47
|
+
className: i({ slot: "icon" })
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
e.askAILabel || "Ask AI"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] });
|
|
55
|
+
}
|
|
56
|
+
function w(e) {
|
|
57
|
+
const { onToggleView: t, query: s } = e;
|
|
58
|
+
return { handleToggle: (r, h) => {
|
|
59
|
+
t?.({ view: r, query: s, autoSubmit: h });
|
|
60
|
+
} };
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
k as WidgetToggle,
|
|
64
|
+
w as useToggleView
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../primitives/components/chat-bubble/index.cjs"),o=require("../utils.cjs"),l=require("./ui/recipes/button.cjs"),s=require("./ui/recipes/scrollable.cjs"),n=({className:t,...e})=>a.jsx(r.ChatBubblePrimitiveRoot,{...e,className:o.cn("[--chat-bubble-bottom:84px] [--chat-bubble-margin:theme(spacing.5)]","bg-white dark:bg-gray-dark-950 fixed height-full z-50","w-screen h-full bottom-0 right-0 rounded-none shadow-none","xs:w-[440px] xs:h-full xs:bottom-[var(--chat-bubble-bottom)] xs:right-5 xs:rounded-xl xs:shadow-2xl xs:max-h-[min(650px,calc(100%-var(--chat-bubble-bottom)-var(--chat-bubble-margin)))]","xs:origin-bottom-right","data-[state=open]:animate-chat-bubble-in xs:data-[state=open]:animate-chat-bubble-in-desktop",t)}),b=({className:t,...e})=>a.jsx(r.Header,{className:o.cn(s.scrollable({section:"header"}),"w-full flex flex-row items-center px-3 py-3","bg-white dark:bg-gray-dark-950","after:absolute","after:left-0","after:top-full","after:h-3","after:w-full","after:text-white","after:dark:text-gray-dark-950","after:bg-[linear-gradient(currentColor,_transparent)]","after:z-start",t),...e}),i=({className:t,...e})=>a.jsx(r.CloseButton,{className:o.cn(l.button({variant:"ghost",size:"xs"}),"relative inset-[unset] w-6 ml-auto text-lg text-gray-500 dark:text-white-alpha-500 px-0",t),...e});exports.CloseButton=i;exports.Header=b;exports.Root=n;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ChatBubblePrimitive } from '../../primitives';
|
|
2
|
+
declare const ChatBubbleRoot: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatBubblePrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ChatBubbleHeader: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatBubblePrimitive.Header>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const ChatBubbleCloseButton: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatBubblePrimitive.CloseButton>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { ChatBubbleRoot as Root, ChatBubbleCloseButton as CloseButton, ChatBubbleHeader as Header };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { ChatBubblePrimitiveRoot as o, CloseButton as l, Header as b } from "../../primitives/components/chat-bubble/index.js";
|
|
4
|
+
import { cn as r } from "../utils.js";
|
|
5
|
+
import { button as s } from "./ui/recipes/button.js";
|
|
6
|
+
import { scrollable as i } from "./ui/recipes/scrollable.js";
|
|
7
|
+
const f = ({
|
|
8
|
+
className: t,
|
|
9
|
+
...e
|
|
10
|
+
}) => /* @__PURE__ */ a(
|
|
11
|
+
o,
|
|
12
|
+
{
|
|
13
|
+
...e,
|
|
14
|
+
className: r(
|
|
15
|
+
// CSS Variables
|
|
16
|
+
"[--chat-bubble-bottom:84px] [--chat-bubble-margin:theme(spacing.5)]",
|
|
17
|
+
// Base layout
|
|
18
|
+
"bg-white dark:bg-gray-dark-950 fixed height-full z-50",
|
|
19
|
+
// Mobile styles
|
|
20
|
+
"w-screen h-full bottom-0 right-0 rounded-none shadow-none",
|
|
21
|
+
// Desktop styles (xs:)
|
|
22
|
+
"xs:w-[440px] xs:h-full xs:bottom-[var(--chat-bubble-bottom)] xs:right-5 xs:rounded-xl xs:shadow-2xl xs:max-h-[min(650px,calc(100%-var(--chat-bubble-bottom)-var(--chat-bubble-margin)))]",
|
|
23
|
+
"xs:origin-bottom-right",
|
|
24
|
+
// Animations
|
|
25
|
+
"data-[state=open]:animate-chat-bubble-in xs:data-[state=open]:animate-chat-bubble-in-desktop",
|
|
26
|
+
t
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
), c = ({
|
|
30
|
+
className: t,
|
|
31
|
+
...e
|
|
32
|
+
}) => /* @__PURE__ */ a(
|
|
33
|
+
b,
|
|
34
|
+
{
|
|
35
|
+
className: r(
|
|
36
|
+
i({ section: "header" }),
|
|
37
|
+
"w-full flex flex-row items-center px-3 py-3",
|
|
38
|
+
"bg-white dark:bg-gray-dark-950",
|
|
39
|
+
"after:absolute",
|
|
40
|
+
"after:left-0",
|
|
41
|
+
"after:top-full",
|
|
42
|
+
"after:h-3",
|
|
43
|
+
"after:w-full",
|
|
44
|
+
"after:text-white",
|
|
45
|
+
"after:dark:text-gray-dark-950",
|
|
46
|
+
"after:bg-[linear-gradient(currentColor,_transparent)]",
|
|
47
|
+
"after:z-start",
|
|
48
|
+
t
|
|
49
|
+
),
|
|
50
|
+
...e
|
|
51
|
+
}
|
|
52
|
+
), d = ({
|
|
53
|
+
className: t,
|
|
54
|
+
...e
|
|
55
|
+
}) => /* @__PURE__ */ a(
|
|
56
|
+
l,
|
|
57
|
+
{
|
|
58
|
+
className: r(
|
|
59
|
+
s({ variant: "ghost", size: "xs" }),
|
|
60
|
+
"relative inset-[unset] w-6 ml-auto text-lg text-gray-500 dark:text-white-alpha-500 px-0",
|
|
61
|
+
t
|
|
62
|
+
),
|
|
63
|
+
...e
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
export {
|
|
67
|
+
d as CloseButton,
|
|
68
|
+
c as Header,
|
|
69
|
+
f as Root
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),n=require("../../primitives/components/chat-button.cjs"),o=require("../utils.cjs"),r=({className:t,...e})=>a.jsx(n.ChatButtonContainer,{className:o.cn("fixed right-6 bottom-6 z-50 mr-[var(--removed-body-scroll-bar-size)]",t),...e}),s=({className:t,...e})=>a.jsx(n.ChatButton,{className:o.cn("bg-inkeep-primary-text-bold dark:bg-gray-dark-600 rounded-full px-[18px] py-3 text-white font-medium flex items-center space-x-2 shadow-2xl hover:[&:not(:active)]:scale-110 dark:shadow-none transition-transform ease-in-out data-[open]:px-3 active:scale-90 active:transition-transform active:duration-100",t),...e}),c=({className:t,...e})=>a.jsx(n.ChatButtonText,{className:o.cn("flex items-center",t),...e}),i=({className:t,...e})=>a.jsx(n.ChatButtonCloseIcon,{className:o.cn("w-6 h-6",t),...e}),u=({className:t,...e})=>a.jsx(n.ChatButtonPrimitiveAvatarImage,{className:o.cn("data-[type=icon]:[--start-color:theme(colors.inkeep-expanded-primary.50)]","data-[type=icon]:[--end-color:theme(colors.inkeep-expanded-primary.300)]","h-6 w-6",t),...e}),l=({className:t,...e})=>a.jsx(n.ChatButtonAvatarContent,{className:o.cn("",t),...e});exports.ChatButton=s;exports.ChatButtonAvatarContent=l;exports.ChatButtonAvatarImage=u;exports.ChatButtonCloseIcon=i;exports.ChatButtonText=c;exports.Container=r;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChatButtonPrimitive } from '../../primitives';
|
|
2
|
+
import { ComponentPropsWithRef } from 'react';
|
|
3
|
+
declare const ChatButtonContainer: ({ className, ...props }: ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButtonContainer>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const ChatButton: ({ className, ...props }: ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButton>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const ChatButtonText: ({ className, ...props }: ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButtonText>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const ChatButtonCloseIcon: ({ className, ...props }: ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButtonCloseIcon>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const ChatButtonAvatarImage: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButtonAvatarImage>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const ChatButtonAvatarContent: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButtonAvatarContent>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { ChatButtonContainer as Container, ChatButton, ChatButtonText, ChatButtonAvatarImage, ChatButtonAvatarContent, ChatButtonCloseIcon, };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { ChatButtonContainer as n, ChatButton as r, ChatButtonText as i, ChatButtonPrimitiveAvatarImage as s, ChatButtonAvatarContent as m, ChatButtonCloseIcon as c } from "../../primitives/components/chat-button.js";
|
|
4
|
+
import { cn as o } from "../utils.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
className: t,
|
|
7
|
+
...a
|
|
8
|
+
}) => /* @__PURE__ */ e(
|
|
9
|
+
n,
|
|
10
|
+
{
|
|
11
|
+
className: o(
|
|
12
|
+
"fixed right-6 bottom-6 z-50 mr-[var(--removed-body-scroll-bar-size)]",
|
|
13
|
+
t
|
|
14
|
+
),
|
|
15
|
+
...a
|
|
16
|
+
}
|
|
17
|
+
), d = ({
|
|
18
|
+
className: t,
|
|
19
|
+
...a
|
|
20
|
+
}) => /* @__PURE__ */ e(
|
|
21
|
+
r,
|
|
22
|
+
{
|
|
23
|
+
className: o(
|
|
24
|
+
"bg-inkeep-primary-text-bold dark:bg-gray-dark-600 rounded-full px-[18px] py-3 text-white font-medium flex items-center space-x-2 shadow-2xl hover:[&:not(:active)]:scale-110 dark:shadow-none transition-transform ease-in-out data-[open]:px-3 active:scale-90 active:transition-transform active:duration-100",
|
|
25
|
+
t
|
|
26
|
+
),
|
|
27
|
+
...a
|
|
28
|
+
}
|
|
29
|
+
), p = ({
|
|
30
|
+
className: t,
|
|
31
|
+
...a
|
|
32
|
+
}) => /* @__PURE__ */ e(i, { className: o("flex items-center", t), ...a }), v = ({
|
|
33
|
+
className: t,
|
|
34
|
+
...a
|
|
35
|
+
}) => /* @__PURE__ */ e(c, { className: o("w-6 h-6", t), ...a }), B = ({
|
|
36
|
+
className: t,
|
|
37
|
+
...a
|
|
38
|
+
}) => /* @__PURE__ */ e(
|
|
39
|
+
s,
|
|
40
|
+
{
|
|
41
|
+
className: o(
|
|
42
|
+
"data-[type=icon]:[--start-color:theme(colors.inkeep-expanded-primary.50)]",
|
|
43
|
+
"data-[type=icon]:[--end-color:theme(colors.inkeep-expanded-primary.300)]",
|
|
44
|
+
"h-6 w-6",
|
|
45
|
+
t
|
|
46
|
+
),
|
|
47
|
+
...a
|
|
48
|
+
}
|
|
49
|
+
), x = ({
|
|
50
|
+
className: t,
|
|
51
|
+
...a
|
|
52
|
+
}) => /* @__PURE__ */ e(m, { className: o("", t), ...a });
|
|
53
|
+
export {
|
|
54
|
+
d as ChatButton,
|
|
55
|
+
x as ChatButtonAvatarContent,
|
|
56
|
+
B as ChatButtonAvatarImage,
|
|
57
|
+
v as ChatButtonCloseIcon,
|
|
58
|
+
p as ChatButtonText,
|
|
59
|
+
u as Container
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../primitives/components/chat-history/index.cjs"),o=require("../utils.cjs"),d=require("./ui/recipes/button.cjs");function h(t){const e=Date.now()-t.getTime(),i=Math.floor(e/(1e3*60)),s=Math.floor(e/(1e3*60*60)),n=Math.floor(e/(1e3*60*60*24));return i<1?"Just now":i<60?`${i}m ago`:s<24?`${s}h ago`:n<7?t.toLocaleDateString("en-US",{weekday:"short"}):t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}const c=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveRoot,{className:o.cn("flex flex-col flex-1 min-h-0 w-full rounded-[inherit] font-body","data-[hidden]:hidden","group-data-[chat-history-layout=sidepane]/chat-history:basis-64","group-data-[chat-history-layout=sidepane]/chat-history:w-64","group-data-[chat-history-layout=sidepane]/chat-history:max-w-64","group-data-[chat-history-layout=sidepane]/chat-history:shrink-0","group-data-[chat-history-layout=sidepane]/chat-history:grow-0","group-data-[chat-history-layout=sidepane]/chat-history:border-r","group-data-[chat-history-layout=sidepane]/chat-history:border-gray-200","dark:group-data-[chat-history-layout=sidepane]/chat-history:border-gray-dark-800",t),...e}),l=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveHeader,{className:o.cn("flex items-center justify-between shrink-0","px-3 py-3 relative","after:absolute after:left-0 after:top-full after:h-3 after:w-full after:text-white after:dark:text-gray-dark-950 after:bg-[linear-gradient(currentColor,_transparent)] after:z-start",t),...e}),y=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveBackButtonIcon,{className:o.cn("text-sm",t),...e}),m=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveBackButton,{className:o.cn(d.button({size:"xs",variant:"ghost"}),"gap-1.5 text-gray-600 hover:text-gray-800 dark:text-white dark:opacity-60 dark:hover:text-white dark:hover:opacity-95","group-data-[chat-history-layout=sidepane]/chat-history:!hidden",t),...e}),u=({className:t,children:e,...i})=>a.jsx(r.ChatHistoryPrimitiveTitle,{className:o.cn("pl-2 text-sm font-normal text-gray-600 dark:text-white-alpha-600","group-data-[chat-history-layout=stack]/chat-history:!hidden",t),...i,children:e??"Chats"}),f=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveList,{className:o.cn("flex-1 min-h-0 overflow-y-auto [scrollbar-width:thin] px-2 py-3 space-y-0.5",t),...e}),b=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveItem,{className:o.cn("flex flex-col gap-0.5 w-full text-left px-3 py-2 rounded-lg","hover:bg-gray-50 dark:hover:bg-gray-dark-900","focus-visible:outline-none focus-visible:bg-gray-50 dark:focus-visible:bg-gray-dark-900","data-[active]:bg-gray-100 dark:data-[active]:bg-gray-dark-800","transition-colors cursor-pointer",t),...e}),g=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveItemTitle,{className:o.cn("text-sm text-gray-800 dark:text-white-alpha-950 truncate w-full block",t),...e}),p=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveItemDate,{className:o.cn("text-xs text-gray-500 dark:text-white-alpha-500",t),...e}),x=({className:t,children:e,...i})=>a.jsx(r.ChatHistoryPrimitiveEmptyState,{className:o.cn("flex flex-col items-center justify-center flex-1 py-2 h-full","text-sm text-gray-500 dark:text-white-alpha-500",t),...i,children:e??"No conversations yet."}),C=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveLoadingState,{className:o.cn("flex flex-col px-3 py-2 gap-3",t),...e,children:[1,2,3].map(i=>a.jsx("div",{className:"h-14 w-full rounded-lg bg-gray-100 dark:bg-gray-dark-800 animate-pulse"},i))}),H=({className:t,...e})=>a.jsx(r.ChatHistoryPrimitiveFooter,{className:o.cn("shrink-0 px-5 py-4 relative","before:absolute before:block before:top-0 before:left-0 before:pointer-events-none before:w-full before:h-3 before:bg-[linear-gradient(transparent,_white)] dark:before:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))] before:-translate-y-full",t),...e}),k=({className:t,children:e,...i})=>a.jsx(r.ChatHistoryPrimitiveNewConversationButton,{className:o.cn(d.button({variant:"primaryFilled"}),"w-full shrink-0",t),...i,children:e??"New conversation"});exports.EmbeddedChatHistoryBackButton=m;exports.EmbeddedChatHistoryBackButtonIcon=y;exports.EmbeddedChatHistoryEmptyState=x;exports.EmbeddedChatHistoryFooter=H;exports.EmbeddedChatHistoryHeader=l;exports.EmbeddedChatHistoryItem=b;exports.EmbeddedChatHistoryItemDate=p;exports.EmbeddedChatHistoryItemTitle=g;exports.EmbeddedChatHistoryList=f;exports.EmbeddedChatHistoryLoadingState=C;exports.EmbeddedChatHistoryNewConversationButton=k;exports.EmbeddedChatHistoryRoot=c;exports.EmbeddedChatHistoryTitle=u;exports.formatSessionDate=h;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChatHistoryPrimitive } from '../../primitives';
|
|
2
|
+
export declare function formatSessionDate(date: Date): string;
|
|
3
|
+
export declare const EmbeddedChatHistoryRoot: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const EmbeddedChatHistoryHeader: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Header>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const EmbeddedChatHistoryBackButtonIcon: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.BackButtonIcon>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const EmbeddedChatHistoryBackButton: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.BackButton>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const EmbeddedChatHistoryTitle: ({ className, children, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Title>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const EmbeddedChatHistoryList: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.List>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const EmbeddedChatHistoryItem: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Item>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const EmbeddedChatHistoryItemTitle: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.ItemTitle>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const EmbeddedChatHistoryItemDate: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.ItemDate>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const EmbeddedChatHistoryEmptyState: ({ className, children, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.EmptyState>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const EmbeddedChatHistoryLoadingState: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.LoadingState>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const EmbeddedChatHistoryFooter: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.Footer>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const EmbeddedChatHistoryNewConversationButton: ({ className, children, ...props }: React.ComponentPropsWithRef<typeof ChatHistoryPrimitive.NewConversationButton>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { ChatHistoryPrimitiveRoot as n, ChatHistoryPrimitiveHeader as h, ChatHistoryPrimitiveBackButtonIcon as l, ChatHistoryPrimitiveBackButton as y, ChatHistoryPrimitiveTitle as c, ChatHistoryPrimitiveList as m, ChatHistoryPrimitiveItem as f, ChatHistoryPrimitiveItemTitle as u, ChatHistoryPrimitiveItemDate as p, ChatHistoryPrimitiveEmptyState as g, ChatHistoryPrimitiveLoadingState as b, ChatHistoryPrimitiveFooter as x, ChatHistoryPrimitiveNewConversationButton as k } from "../../primitives/components/chat-history/index.js";
|
|
4
|
+
import { cn as r } from "../utils.js";
|
|
5
|
+
import { button as s } from "./ui/recipes/button.js";
|
|
6
|
+
function N(t) {
|
|
7
|
+
const e = Date.now() - t.getTime(), o = Math.floor(e / (1e3 * 60)), i = Math.floor(e / (1e3 * 60 * 60)), d = Math.floor(e / (1e3 * 60 * 60 * 24));
|
|
8
|
+
return o < 1 ? "Just now" : o < 60 ? `${o}m ago` : i < 24 ? `${i}h ago` : d < 7 ? t.toLocaleDateString("en-US", { weekday: "short" }) : t.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
9
|
+
}
|
|
10
|
+
const E = ({
|
|
11
|
+
className: t,
|
|
12
|
+
...e
|
|
13
|
+
}) => /* @__PURE__ */ a(
|
|
14
|
+
n,
|
|
15
|
+
{
|
|
16
|
+
className: r(
|
|
17
|
+
"flex flex-col flex-1 min-h-0 w-full rounded-[inherit] font-body",
|
|
18
|
+
"data-[hidden]:hidden",
|
|
19
|
+
"group-data-[chat-history-layout=sidepane]/chat-history:basis-64",
|
|
20
|
+
"group-data-[chat-history-layout=sidepane]/chat-history:w-64",
|
|
21
|
+
"group-data-[chat-history-layout=sidepane]/chat-history:max-w-64",
|
|
22
|
+
"group-data-[chat-history-layout=sidepane]/chat-history:shrink-0",
|
|
23
|
+
"group-data-[chat-history-layout=sidepane]/chat-history:grow-0",
|
|
24
|
+
"group-data-[chat-history-layout=sidepane]/chat-history:border-r",
|
|
25
|
+
"group-data-[chat-history-layout=sidepane]/chat-history:border-gray-200",
|
|
26
|
+
"dark:group-data-[chat-history-layout=sidepane]/chat-history:border-gray-dark-800",
|
|
27
|
+
t
|
|
28
|
+
),
|
|
29
|
+
...e
|
|
30
|
+
}
|
|
31
|
+
), P = ({
|
|
32
|
+
className: t,
|
|
33
|
+
...e
|
|
34
|
+
}) => /* @__PURE__ */ a(
|
|
35
|
+
h,
|
|
36
|
+
{
|
|
37
|
+
className: r(
|
|
38
|
+
"flex items-center justify-between shrink-0",
|
|
39
|
+
"px-3 py-3 relative",
|
|
40
|
+
"after:absolute after:left-0 after:top-full after:h-3 after:w-full after:text-white after:dark:text-gray-dark-950 after:bg-[linear-gradient(currentColor,_transparent)] after:z-start",
|
|
41
|
+
t
|
|
42
|
+
),
|
|
43
|
+
...e
|
|
44
|
+
}
|
|
45
|
+
), B = ({
|
|
46
|
+
className: t,
|
|
47
|
+
...e
|
|
48
|
+
}) => /* @__PURE__ */ a(l, { className: r("text-sm", t), ...e }), S = ({
|
|
49
|
+
className: t,
|
|
50
|
+
...e
|
|
51
|
+
}) => /* @__PURE__ */ a(
|
|
52
|
+
y,
|
|
53
|
+
{
|
|
54
|
+
className: r(
|
|
55
|
+
s({ size: "xs", variant: "ghost" }),
|
|
56
|
+
"gap-1.5 text-gray-600 hover:text-gray-800 dark:text-white dark:opacity-60 dark:hover:text-white dark:hover:opacity-95",
|
|
57
|
+
"group-data-[chat-history-layout=sidepane]/chat-history:!hidden",
|
|
58
|
+
t
|
|
59
|
+
),
|
|
60
|
+
...e
|
|
61
|
+
}
|
|
62
|
+
), I = ({
|
|
63
|
+
className: t,
|
|
64
|
+
children: e,
|
|
65
|
+
...o
|
|
66
|
+
}) => /* @__PURE__ */ a(
|
|
67
|
+
c,
|
|
68
|
+
{
|
|
69
|
+
className: r(
|
|
70
|
+
"pl-2 text-sm font-normal text-gray-600 dark:text-white-alpha-600",
|
|
71
|
+
"group-data-[chat-history-layout=stack]/chat-history:!hidden",
|
|
72
|
+
t
|
|
73
|
+
),
|
|
74
|
+
...o,
|
|
75
|
+
children: e ?? "Chats"
|
|
76
|
+
}
|
|
77
|
+
), D = ({
|
|
78
|
+
className: t,
|
|
79
|
+
...e
|
|
80
|
+
}) => /* @__PURE__ */ a(
|
|
81
|
+
m,
|
|
82
|
+
{
|
|
83
|
+
className: r(
|
|
84
|
+
"flex-1 min-h-0 overflow-y-auto [scrollbar-width:thin] px-2 py-3 space-y-0.5",
|
|
85
|
+
t
|
|
86
|
+
),
|
|
87
|
+
...e
|
|
88
|
+
}
|
|
89
|
+
), L = ({
|
|
90
|
+
className: t,
|
|
91
|
+
...e
|
|
92
|
+
}) => /* @__PURE__ */ a(
|
|
93
|
+
f,
|
|
94
|
+
{
|
|
95
|
+
className: r(
|
|
96
|
+
"flex flex-col gap-0.5 w-full text-left px-3 py-2 rounded-lg",
|
|
97
|
+
"hover:bg-gray-50 dark:hover:bg-gray-dark-900",
|
|
98
|
+
"focus-visible:outline-none focus-visible:bg-gray-50 dark:focus-visible:bg-gray-dark-900",
|
|
99
|
+
"data-[active]:bg-gray-100 dark:data-[active]:bg-gray-dark-800",
|
|
100
|
+
"transition-colors cursor-pointer",
|
|
101
|
+
t
|
|
102
|
+
),
|
|
103
|
+
...e
|
|
104
|
+
}
|
|
105
|
+
), M = ({
|
|
106
|
+
className: t,
|
|
107
|
+
...e
|
|
108
|
+
}) => /* @__PURE__ */ a(
|
|
109
|
+
u,
|
|
110
|
+
{
|
|
111
|
+
className: r(
|
|
112
|
+
"text-sm text-gray-800 dark:text-white-alpha-950 truncate w-full block",
|
|
113
|
+
t
|
|
114
|
+
),
|
|
115
|
+
...e
|
|
116
|
+
}
|
|
117
|
+
), T = ({
|
|
118
|
+
className: t,
|
|
119
|
+
...e
|
|
120
|
+
}) => /* @__PURE__ */ a(
|
|
121
|
+
p,
|
|
122
|
+
{
|
|
123
|
+
className: r("text-xs text-gray-500 dark:text-white-alpha-500", t),
|
|
124
|
+
...e
|
|
125
|
+
}
|
|
126
|
+
), j = ({
|
|
127
|
+
className: t,
|
|
128
|
+
children: e,
|
|
129
|
+
...o
|
|
130
|
+
}) => /* @__PURE__ */ a(
|
|
131
|
+
g,
|
|
132
|
+
{
|
|
133
|
+
className: r(
|
|
134
|
+
"flex flex-col items-center justify-center flex-1 py-2 h-full",
|
|
135
|
+
"text-sm text-gray-500 dark:text-white-alpha-500",
|
|
136
|
+
t
|
|
137
|
+
),
|
|
138
|
+
...o,
|
|
139
|
+
children: e ?? "No conversations yet."
|
|
140
|
+
}
|
|
141
|
+
), F = ({
|
|
142
|
+
className: t,
|
|
143
|
+
...e
|
|
144
|
+
}) => /* @__PURE__ */ a(
|
|
145
|
+
b,
|
|
146
|
+
{
|
|
147
|
+
className: r("flex flex-col px-3 py-2 gap-3", t),
|
|
148
|
+
...e,
|
|
149
|
+
children: [1, 2, 3].map((o) => /* @__PURE__ */ a(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
className: "h-14 w-full rounded-lg bg-gray-100 dark:bg-gray-dark-800 animate-pulse"
|
|
153
|
+
},
|
|
154
|
+
o
|
|
155
|
+
))
|
|
156
|
+
}
|
|
157
|
+
), _ = ({
|
|
158
|
+
className: t,
|
|
159
|
+
...e
|
|
160
|
+
}) => /* @__PURE__ */ a(
|
|
161
|
+
x,
|
|
162
|
+
{
|
|
163
|
+
className: r(
|
|
164
|
+
"shrink-0 px-5 py-4 relative",
|
|
165
|
+
"before:absolute before:block before:top-0 before:left-0 before:pointer-events-none before:w-full before:h-3 before:bg-[linear-gradient(transparent,_white)] dark:before:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))] before:-translate-y-full",
|
|
166
|
+
t
|
|
167
|
+
),
|
|
168
|
+
...e
|
|
169
|
+
}
|
|
170
|
+
), z = ({
|
|
171
|
+
className: t,
|
|
172
|
+
children: e,
|
|
173
|
+
...o
|
|
174
|
+
}) => /* @__PURE__ */ a(
|
|
175
|
+
k,
|
|
176
|
+
{
|
|
177
|
+
className: r(s({ variant: "primaryFilled" }), "w-full shrink-0", t),
|
|
178
|
+
...o,
|
|
179
|
+
children: e ?? "New conversation"
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
export {
|
|
183
|
+
S as EmbeddedChatHistoryBackButton,
|
|
184
|
+
B as EmbeddedChatHistoryBackButtonIcon,
|
|
185
|
+
j as EmbeddedChatHistoryEmptyState,
|
|
186
|
+
_ as EmbeddedChatHistoryFooter,
|
|
187
|
+
P as EmbeddedChatHistoryHeader,
|
|
188
|
+
L as EmbeddedChatHistoryItem,
|
|
189
|
+
T as EmbeddedChatHistoryItemDate,
|
|
190
|
+
M as EmbeddedChatHistoryItemTitle,
|
|
191
|
+
D as EmbeddedChatHistoryList,
|
|
192
|
+
F as EmbeddedChatHistoryLoadingState,
|
|
193
|
+
z as EmbeddedChatHistoryNewConversationButton,
|
|
194
|
+
E as EmbeddedChatHistoryRoot,
|
|
195
|
+
I as EmbeddedChatHistoryTitle,
|
|
196
|
+
N as formatSessionDate
|
|
197
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),a=require("lucide-react"),r=require("../../primitives/components/data-summaries.cjs"),p=t=>{const{type:n,label:s}=t;return s||n.replace(/_/g," ").replace(/\b\w/g,i=>i.toUpperCase())},u={agent_generate:e.jsx(a.RefreshCw,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),agent_reasoning:e.jsx(a.Brain,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),tool_call:e.jsx(a.LoaderCircle,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500 animate-spin"}),tool_result:e.jsx(a.Hammer,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),transfer:e.jsx(a.ArrowRight,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),delegation_sent:e.jsx(a.Forward,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),delegation_returned:e.jsx(a.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),artifact_saved:e.jsx(a.Download,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),error:e.jsx(a.TriangleAlert,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),agent_initializing:e.jsx(a.CircleDot,{className:"w-3 h-3 animate-spin"}),completion:e.jsx(a.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),default:e.jsx(a.Dot,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"})},h={retrieve:e.jsx(a.Search,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),action:e.jsx(a.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),...u},d=o.memo(({summary:t,showConnector:n})=>{const s=o.useMemo(()=>t.details&&Object.keys(t.details).length>0?JSON.stringify(t.details,null,2):null,[t.details]),i=o.useMemo(()=>p(t),[t]),c=o.useMemo(()=>h[t.type]||h.default,[t.type]);return e.jsxs(r.DataSummaryItem,{className:"flex items-start gap-2 text-xs relative",children:[n&&e.jsx(r.DataSummaryConnector,{className:"absolute left-1.5 top-4 bottom-0 w-px bg-gray-200 dark:bg-white-alpha-200 -mb-3"}),e.jsx(r.DataSummaryIconContainer,{className:"flex items-center justify-center w-3 h-3 relative z-10 mt-0.5",children:c}),e.jsxs(r.DataSummaryContent,{className:"flex-1",children:[e.jsx(r.DataSummaryLabel,{className:"text-gray-700 dark:text-white-alpha-600",children:i}),s&&e.jsx(r.DataSummaryDetails,{className:"mt-2 text-xs whitespace-pre-wrap font-mono bg-gray-50 dark:bg-gray-dark-900 p-2 rounded-md px-3 py-2",children:s})]})]})}),g=o.memo(({summaries:t,isCompleted:n})=>{const s=t.length>1,[i,c]=o.useState(!n||!s);o.useEffect(()=>{let l;return n&&s?l=setTimeout(()=>{c(!1)},1e3):c(!0),()=>{l&&clearTimeout(l)}},[n,s]);const m=o.useCallback(()=>{s&&c(!i)},[s,i]);return s?e.jsxs(r.DataSummaryGroup,{className:"flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative",children:[e.jsx(r.DataSummaryToggle,{type:"button",onClick:m,"data-expanded":i,className:"inline-flex items-center group gap-2 text-xs text-gray-500 dark:text-white-alpha-600 hover:text-gray-700 dark:hover:text-white-alpha-700 transition-colors cursor-pointer",children:n?e.jsxs(e.Fragment,{children:[e.jsx(a.Check,{className:"check-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 absolute opacity-100 group-hover:opacity-0 group-data-[expanded=true]:opacity-0"}),e.jsx(a.ChevronRight,{className:"chevron-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform opacity-0 rotate-0 group-hover:opacity-100 group-data-[expanded=true]:opacity-100 group-data-[expanded=true]:rotate-90"}),e.jsx(r.DataSummaryToggleText,{className:"font-medium",children:"Completed"})]}):e.jsxs(e.Fragment,{children:[e.jsx(a.LoaderCircle,{className:"w-3 h-3 animate-spin"}),e.jsx(r.DataSummaryToggleText,{className:"font-medium",children:"Thinking..."})]})}),e.jsx(r.DataSummaryCollapsible,{"data-expanded":i,className:"overflow-hidden transition-all duration-300 ease-in-out data-[expanded=true]:opacity-100 data-[expanded=false]:max-h-0 data-[expanded=false]:opacity-0 max-w-full",children:e.jsx(r.DataSummaryList,{className:"pb-2 mt-1.5 space-y-3 relative",children:t.map((l,x)=>e.jsx(d,{summary:l,showConnector:t.length>1&&x<t.length-1},`op-${l.type}-${x}`))})})]}):e.jsx(r.DataSummaryGroup,{className:"flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative",children:e.jsx(r.DataSummaryList,{className:"pb-2 mt-1.5 space-y-3 relative",children:t.map((l,x)=>e.jsx(d,{summary:l,showConnector:!1},`op-${l.type}-${x}`))})})});exports.DataSummaryGroup=g;
|