@inkeep/agents-ui 0.0.0-rc-20260310051343
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 +64 -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 +51 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +275 -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 +9 -0
- package/dist/primitives/hooks/use-anonymous-session.js +45 -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 +12 -0
- package/dist/primitives/hooks/use-conversation-loader.js +41 -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-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 +30 -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 +37 -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 +428 -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 +26 -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 +4565 -0
- package/dist/styled/inkeep.css.js +4569 -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,428 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as t, Fragment as F } from "react/jsx-runtime";
|
|
3
|
+
import B, { Fragment as x } from "react";
|
|
4
|
+
import { Provider as _, Wrapper as V, Root as Q, Header as O, HeaderToolbar as N, HeaderToolbarWrapper as R, ChatHistoryTrigger as $, Content as j, ContentScrollArea as G, ContentScrollAreaViewport as K, MessagesSessionLoading as z, ContentScrollAreaScrollbar as J, ContentScrollAreaThumb as U, ContentScrollAreaCorner as X, Footer as Y, FeedbackModal as Z, FeedbackModalOverlay as q, FeedbackModalContent as ee, FeedbackModalHeader as te, FeedbackModalClose as ae, FeedbackModalBody as de, FeedbackForm as re, FeedbackItem as h, FeedbackItemCheckbox as l, FeedbackItemCheckboxIndicator as b, FeedbackItemLabel as C, FeedbackItemDescription as p, FeedbackSubmitButton as oe, FormWrapper as ne, FormClose as se, Form as me, FormHeader as ie, FormHeading as ce, FormDescription as he, FormContent as le, FormField as be, FormFieldLabel as Ce, FormFieldText as Fe, FormFieldEmail as Ee, FormFieldFile as pe, FormFieldTextArea as ue, FormFieldCheckbox as ge, FormFieldCheckboxIndicator as Ae, FormFieldSelect as Me, FormFieldSelectTrigger as Ie, FormFieldSelectValue as Be, FormFieldSelectIcon as Se, FormFieldSelectContent as Te, FormFieldSelectViewport as xe, FormFieldSelectItem as He, FormFieldSelectItemText as ye, FormFieldSelectItemIndicator as ke, FormFieldCombobox as fe, FormFieldComboboxControl as we, FormFieldComboboxSelectedTags as ve, FormFieldComboboxInput as Le, FormFieldComboboxTrigger as De, FormFieldComboboxPositioner as Pe, FormFieldComboboxContent as We, FormFieldComboboxList as _e, FormFieldComboboxListItems as Ve, FormFieldComboboxListEmpty as Qe, FormFieldComboboxItem as Oe, FormFieldComboboxItemText as Ne, FormFieldComboboxItemIndicator as Re, FormFieldDescription as $e, FormFieldError as je, FormError as Ge, FormFooter as Ke, FormCancel as ze, FormSubmit as Je, FormSuccess as Ue, FormSuccessHeading as Xe, FormSuccessMessage as Ye, FormSuccessButton as Ze, Messages as qe, MessageWrapper as S, MessageContentWrapper as H, MessageContent as y, DynamicComponent as et, MessageLoading as tt, InputFieldset as at, InputGroup as dt, Input as rt, SendButton as ot, SendButtonIcon as nt, AttachmentsBar as st, AttachmentsBarList as mt, AttachmentsBarAttachment as it, AttachmentsBarAttachmentIcon as ct, AttachmentsBarAttachmentTitle as ht, AttachmentsBarAttachmentDelete as lt, AttachmentsBarActions as bt, AttachmentsBarInfoTip as Ct, AttachmentsBarInfoTipIcon as Ft, AttachmentsBarInfoTipText as Et, AttachmentsBarInputs as pt, AttachmentsBarInput as ut, AttachmentsBarModal as gt, AttachmentsBarModalOverlay as At, AttachmentsBarModalContent as Mt, AttachmentsBarModalHeader as It, AttachmentsBarModalHeading as Bt, AttachmentsBarModalDescription as St, AttachmentsBarModalHelp as Tt, AttachmentsBarModalClose as xt, AttachmentsBarModalBody as Ht, AttachmentsBarForm as yt, AttachmentsBarFormTitle as kt, AttachmentsBarFormTitleLabel as ft, AttachmentsBarFormTitleInput as wt, AttachmentsBarFormTitleError as vt, AttachmentsBarFormContent as Lt, AttachmentsBarFormContentLabel as Dt, AttachmentsBarFormContentInput as Pt, AttachmentsBarFormContentError as Wt, AttachmentsBarFormSubmitButton as _t, ActionBar as Vt, TaglineContainer as Qt, TaglineText as Ot, TaglineLogo as Nt, TaglineBrandName as Rt, Actions as $t, HelpActions as jt, HelpAction as Gt, HelpActionsTrigger as Kt, HelpActionsMenu as zt, HelpActionsMenuArrow as Jt, HelpActionsMenuItem as Ut, HelpActionsMenuItemIcon as Xt, ChatAction as u, ChatActionLabel as Yt, ChatActionFeedback as Zt, IntroMessageWrapper as qt, MessageHeader as k, MessageAvatar as f, MessageAvatarContent as w, MessageAvatarImage as v, MessageName as L, Disclaimer as ea, DisclaimerLabel as ta, DisclaimerTrigger as aa, DisclaimerContent as da, DisclaimerText as ra, DisclaimerArrow as oa, ExampleQuestions as na, ExampleQuestionsLabel as sa, ExampleQuestionsList as ma, ExampleQuestion as ia, ExampleQuestionButton as ca, Markdown as ha, MessageSources as la, MessageSourcesHeader as ba, MessageSourcesList as Ca, MessageSourceItem as Fa, MessageSourceItemBreadcrumbs as Ea, MessageSourceItemBreadcrumbIcon as pa, MessageSourceItemIcon as ua, MessageSourceItemTitle as ga, MessageSourceItemTag as Aa, MessageSourceItemDescription as Ma, MessageSourceItemDescriptionPart as Ia, MessageSourceItemIndicator as Ba, MessageAttachments as Sa, MessageAttachmentsList as Ta, MessageAttachmentsItem as xa, MessageAttachmentsItemIcon as Ha, MessageAttachmentsItemTitle as ya, MessageAttachmentsPreview as ka, MessageAttachmentsPreviewOverlay as fa, MessageAttachmentsPreviewContent as wa, MessageAttachmentsPreviewHeader as va, MessageAttachmentsPreviewClose as La, MessageAttachmentsPreviewBody as Da, MessageToolbar as Pa, MessageCustomActions as Wa, MessageCustomAction as _a, MessageAction as g } from "../styled/components/embedded-chat.js";
|
|
5
|
+
import { EmbeddedChatHistoryRoot as Va, EmbeddedChatHistoryHeader as Qa, EmbeddedChatHistoryBackButton as Oa, EmbeddedChatHistoryBackButtonIcon as Na, EmbeddedChatHistoryTitle as Ra, EmbeddedChatHistoryList as $a, EmbeddedChatHistoryItem as ja, EmbeddedChatHistoryItemTitle as Ga, EmbeddedChatHistoryItemDate as Ka, formatSessionDate as za, EmbeddedChatHistoryEmptyState as Ja, EmbeddedChatHistoryLoadingState as Ua, EmbeddedChatHistoryFooter as Xa, EmbeddedChatHistoryNewConversationButton as Ya } from "../styled/components/chat-history.js";
|
|
6
|
+
import { Close as A } from "../styled/components/modal.js";
|
|
7
|
+
import { Shadow as Za } from "../styled/components/shadow.js";
|
|
8
|
+
import { EmbeddedChatMessagePart as D } from "../styled/components/message.js";
|
|
9
|
+
import { useChatHistory as qa } from "../primitives/providers/chat-history-provider.js";
|
|
10
|
+
import { WebWidgetInteractionType as ed, useInkeepConfig as P } from "../primitives/providers/config-provider.js";
|
|
11
|
+
import { RootProvider as td } from "../primitives/providers/root-provider.js";
|
|
12
|
+
import { useWidget as ad } from "../primitives/providers/widget-provider.js";
|
|
13
|
+
import { useChat as W } from "../primitives/components/embedded-chat/chat-provider.js";
|
|
14
|
+
import { useModal as dd } from "../primitives/components/modal/modal-provider.js";
|
|
15
|
+
import { dataAttr as E } from "../primitives/utils/misc.js";
|
|
16
|
+
import { PortalWithTheme as M } from "../primitives/atoms/portal-with-theme.js";
|
|
17
|
+
import { ErrorBoundary as rd } from "../primitives/atoms/error-boundary.js";
|
|
18
|
+
import { ModalContent as od } from "./modal.js";
|
|
19
|
+
import { WidgetToggle as nd } from "./widget-toggle.js";
|
|
20
|
+
function Nd(d) {
|
|
21
|
+
const { baseSettings: a, aiChatSettings: r } = d;
|
|
22
|
+
return /* @__PURE__ */ e(rd, { children: /* @__PURE__ */ e(
|
|
23
|
+
Za,
|
|
24
|
+
{
|
|
25
|
+
wrapperStyles: {
|
|
26
|
+
height: "inherit",
|
|
27
|
+
width: "inherit"
|
|
28
|
+
},
|
|
29
|
+
children: /* @__PURE__ */ e(
|
|
30
|
+
td,
|
|
31
|
+
{
|
|
32
|
+
config: {
|
|
33
|
+
baseSettings: a,
|
|
34
|
+
aiChatSettings: r
|
|
35
|
+
},
|
|
36
|
+
componentType: ed.EmbeddedChat,
|
|
37
|
+
children: /* @__PURE__ */ e(md, { ...d })
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
) });
|
|
42
|
+
}
|
|
43
|
+
function sd(d) {
|
|
44
|
+
const { children: a, onToggleView: r, isHidden: o, shouldAutoFocusInput: n = !r } = d;
|
|
45
|
+
return /* @__PURE__ */ e(_, { isHidden: o, shouldAutoFocusInput: n, children: a });
|
|
46
|
+
}
|
|
47
|
+
function md(d) {
|
|
48
|
+
return /* @__PURE__ */ e(sd, { ...d, children: /* @__PURE__ */ e(id, { ...d }) });
|
|
49
|
+
}
|
|
50
|
+
function id(d) {
|
|
51
|
+
const { onToggleView: a, variant: r, header: o = cd } = d, n = dd(), m = ad();
|
|
52
|
+
return /* @__PURE__ */ e(n && !m ? od : x, { children: /* @__PURE__ */ t(
|
|
53
|
+
V,
|
|
54
|
+
{
|
|
55
|
+
variant: r ?? (a ? "no-shadow" : "container-with-shadow"),
|
|
56
|
+
"data-composite": E(!!d.onToggleView || n?.isOpen),
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ e(Ad, {}),
|
|
59
|
+
/* @__PURE__ */ t(Q, { children: [
|
|
60
|
+
o && /* @__PURE__ */ e(o, { ...d }),
|
|
61
|
+
/* @__PURE__ */ e(hd, {}),
|
|
62
|
+
/* @__PURE__ */ e(pd, {})
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ e(Md, {}),
|
|
65
|
+
/* @__PURE__ */ e(Id, {})
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
) });
|
|
69
|
+
}
|
|
70
|
+
const cd = (d) => {
|
|
71
|
+
const { onToggleView: a, askAILabel: r, searchLabel: o } = d, { aiChatSettings: n } = P(), m = n.isChatHistoryButtonVisible, s = !!a || m;
|
|
72
|
+
return /* @__PURE__ */ e(O, { "data-show-toolbar": E(s), children: s ? /* @__PURE__ */ t(N, { "data-show-widget-toggle": E(!!a), children: [
|
|
73
|
+
/* @__PURE__ */ e(R, { children: m && /* @__PURE__ */ e($, {}) }),
|
|
74
|
+
a && /* @__PURE__ */ e(
|
|
75
|
+
nd,
|
|
76
|
+
{
|
|
77
|
+
onToggleView: a,
|
|
78
|
+
askAILabel: r,
|
|
79
|
+
searchLabel: o,
|
|
80
|
+
view: "chat"
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ e(A, {})
|
|
84
|
+
] }) : /* @__PURE__ */ e(A, {}) });
|
|
85
|
+
};
|
|
86
|
+
function hd() {
|
|
87
|
+
const { isSessionLoading: d } = W();
|
|
88
|
+
return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ t(G, { children: [
|
|
89
|
+
/* @__PURE__ */ e(K, { children: d ? /* @__PURE__ */ e(z, {}) : /* @__PURE__ */ e(ld, {}) }),
|
|
90
|
+
/* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(U, {}) }),
|
|
91
|
+
/* @__PURE__ */ e(X, {})
|
|
92
|
+
] }) });
|
|
93
|
+
}
|
|
94
|
+
function ld() {
|
|
95
|
+
const {
|
|
96
|
+
aiChatSettings: { components: d }
|
|
97
|
+
} = P();
|
|
98
|
+
return /* @__PURE__ */ e(qe, { children: ({ messages: a, isLoading: r }) => {
|
|
99
|
+
const o = a.at(-1), n = (s, I) => {
|
|
100
|
+
const i = d?.[s];
|
|
101
|
+
if (!i)
|
|
102
|
+
return console.warn(`Component "${s}" not found in components config`), null;
|
|
103
|
+
try {
|
|
104
|
+
if (typeof i == "function" && i.length <= 1)
|
|
105
|
+
return B.createElement(i, I);
|
|
106
|
+
const c = i(I, document.createElement("div"), null);
|
|
107
|
+
return B.isValidElement(c) || typeof c == "string" ? c : null;
|
|
108
|
+
} catch (c) {
|
|
109
|
+
return console.error(`🔍 [renderComponent] Error rendering component "${s}":`, c), null;
|
|
110
|
+
}
|
|
111
|
+
}, m = (s) => /* @__PURE__ */ e(ha, { text: s });
|
|
112
|
+
return /* @__PURE__ */ t(F, { children: [
|
|
113
|
+
/* @__PURE__ */ e(bd, {}),
|
|
114
|
+
a.map((s) => /* @__PURE__ */ t(S, { message: s, children: [
|
|
115
|
+
/* @__PURE__ */ e(T, {}),
|
|
116
|
+
/* @__PURE__ */ t(H, { children: [
|
|
117
|
+
/* @__PURE__ */ e(y, { children: d?.IkpMessage ? /* @__PURE__ */ e(
|
|
118
|
+
et,
|
|
119
|
+
{
|
|
120
|
+
name: "IkpMessage",
|
|
121
|
+
props: { message: s, renderComponent: n, renderMarkdown: m },
|
|
122
|
+
componentDef: d.IkpMessage
|
|
123
|
+
}
|
|
124
|
+
) : /* @__PURE__ */ t(F, { children: [
|
|
125
|
+
/* @__PURE__ */ e(D, { isLast: o?.id === s.id }),
|
|
126
|
+
/* @__PURE__ */ e(Ed, {})
|
|
127
|
+
] }) }),
|
|
128
|
+
/* @__PURE__ */ e(Cd, {}),
|
|
129
|
+
/* @__PURE__ */ e(Fd, {})
|
|
130
|
+
] })
|
|
131
|
+
] }, s.id)),
|
|
132
|
+
r && o?.parts.length && /* @__PURE__ */ t(
|
|
133
|
+
S,
|
|
134
|
+
{
|
|
135
|
+
message: {
|
|
136
|
+
id: "___loader___",
|
|
137
|
+
role: "assistant",
|
|
138
|
+
parts: [{ type: "text", text: "Thinking..." }]
|
|
139
|
+
},
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ e(T, {}),
|
|
142
|
+
/* @__PURE__ */ e(tt, {})
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
] });
|
|
147
|
+
} });
|
|
148
|
+
}
|
|
149
|
+
function bd() {
|
|
150
|
+
return /* @__PURE__ */ t(qt, { children: [
|
|
151
|
+
/* @__PURE__ */ t(k, { children: [
|
|
152
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(v, {}) }) }),
|
|
153
|
+
/* @__PURE__ */ e(L, {})
|
|
154
|
+
] }),
|
|
155
|
+
/* @__PURE__ */ t(H, { children: [
|
|
156
|
+
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(D, { isLast: !1 }) }),
|
|
157
|
+
/* @__PURE__ */ t(ea, { children: [
|
|
158
|
+
/* @__PURE__ */ e(ta, {}),
|
|
159
|
+
/* @__PURE__ */ e(aa, {}),
|
|
160
|
+
/* @__PURE__ */ t(da, { children: [
|
|
161
|
+
/* @__PURE__ */ e(ra, {}),
|
|
162
|
+
/* @__PURE__ */ e(oa, {})
|
|
163
|
+
] })
|
|
164
|
+
] }),
|
|
165
|
+
/* @__PURE__ */ t(na, { children: [
|
|
166
|
+
/* @__PURE__ */ e(sa, {}),
|
|
167
|
+
/* @__PURE__ */ e(ma, { children: (d) => d.map((a) => /* @__PURE__ */ e(
|
|
168
|
+
ia,
|
|
169
|
+
{
|
|
170
|
+
children: /* @__PURE__ */ e(ca, { question: a })
|
|
171
|
+
},
|
|
172
|
+
typeof a == "object" ? a.label : a
|
|
173
|
+
)) })
|
|
174
|
+
] })
|
|
175
|
+
] })
|
|
176
|
+
] });
|
|
177
|
+
}
|
|
178
|
+
function T() {
|
|
179
|
+
return /* @__PURE__ */ t(k, { children: [
|
|
180
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(v, {}) }) }),
|
|
181
|
+
/* @__PURE__ */ e(L, {})
|
|
182
|
+
] });
|
|
183
|
+
}
|
|
184
|
+
function Cd() {
|
|
185
|
+
return /* @__PURE__ */ t(Sa, { children: [
|
|
186
|
+
/* @__PURE__ */ e(Ta, { children: (d) => d.map((a) => /* @__PURE__ */ t(xa, { attachment: a, children: [
|
|
187
|
+
/* @__PURE__ */ e(Ha, {}),
|
|
188
|
+
/* @__PURE__ */ e(ya, {})
|
|
189
|
+
] }, a.id)) }),
|
|
190
|
+
/* @__PURE__ */ e(ka, { children: /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(fa, { children: /* @__PURE__ */ t(wa, { children: [
|
|
191
|
+
/* @__PURE__ */ e(va, {}),
|
|
192
|
+
/* @__PURE__ */ e(La, {}),
|
|
193
|
+
/* @__PURE__ */ e(Da, {})
|
|
194
|
+
] }) }) }) })
|
|
195
|
+
] });
|
|
196
|
+
}
|
|
197
|
+
function Fd() {
|
|
198
|
+
return /* @__PURE__ */ t(Pa, { children: [
|
|
199
|
+
/* @__PURE__ */ e(Wa, { children: (d) => d.map((a, r) => /* @__PURE__ */ e(_a, { action: a }, `action-${r}`)) }),
|
|
200
|
+
/* @__PURE__ */ e(g, { action: "copy" }),
|
|
201
|
+
/* @__PURE__ */ e(g, { action: "upvote" }),
|
|
202
|
+
/* @__PURE__ */ e(g, { action: "downvote" })
|
|
203
|
+
] });
|
|
204
|
+
}
|
|
205
|
+
function Ed() {
|
|
206
|
+
return /* @__PURE__ */ t(la, { children: [
|
|
207
|
+
/* @__PURE__ */ e(ba, {}),
|
|
208
|
+
/* @__PURE__ */ e(Ca, { children: (d) => d.map((a, r) => /* @__PURE__ */ t(Fa, { href: a.url, source: a, children: [
|
|
209
|
+
/* @__PURE__ */ e(Ea, { children: a.breadcrumbs?.map((o) => /* @__PURE__ */ t(x, { children: [
|
|
210
|
+
o,
|
|
211
|
+
/* @__PURE__ */ e(pa, {})
|
|
212
|
+
] }, o)) }),
|
|
213
|
+
/* @__PURE__ */ e(ua, {}),
|
|
214
|
+
/* @__PURE__ */ e(ga, {}),
|
|
215
|
+
/* @__PURE__ */ e(Aa, {}),
|
|
216
|
+
/* @__PURE__ */ e(Ma, { children: (o) => o.map((n, m) => /* @__PURE__ */ e(
|
|
217
|
+
Ia,
|
|
218
|
+
{
|
|
219
|
+
part: n
|
|
220
|
+
},
|
|
221
|
+
`part-${m}`
|
|
222
|
+
)) }),
|
|
223
|
+
/* @__PURE__ */ e(Ba, {})
|
|
224
|
+
] }, r)) })
|
|
225
|
+
] });
|
|
226
|
+
}
|
|
227
|
+
function pd() {
|
|
228
|
+
return /* @__PURE__ */ t(Y, { children: [
|
|
229
|
+
/* @__PURE__ */ e(ud, {}),
|
|
230
|
+
/* @__PURE__ */ e(gd, {})
|
|
231
|
+
] });
|
|
232
|
+
}
|
|
233
|
+
function ud() {
|
|
234
|
+
return /* @__PURE__ */ t(at, { children: [
|
|
235
|
+
/* @__PURE__ */ t(dt, { children: [
|
|
236
|
+
/* @__PURE__ */ e(rt, {}),
|
|
237
|
+
/* @__PURE__ */ e(ot, { children: /* @__PURE__ */ e(nt, {}) })
|
|
238
|
+
] }),
|
|
239
|
+
/* @__PURE__ */ t(st, { children: [
|
|
240
|
+
/* @__PURE__ */ e(mt, { children: (d) => d.map((a) => /* @__PURE__ */ t(it, { attachment: a, children: [
|
|
241
|
+
/* @__PURE__ */ e(ct, {}),
|
|
242
|
+
/* @__PURE__ */ e(ht, {}),
|
|
243
|
+
/* @__PURE__ */ e(lt, {})
|
|
244
|
+
] }, a.id)) }),
|
|
245
|
+
/* @__PURE__ */ t(bt, { children: [
|
|
246
|
+
/* @__PURE__ */ t(Ct, { children: [
|
|
247
|
+
/* @__PURE__ */ e(Ft, {}),
|
|
248
|
+
/* @__PURE__ */ e(Et, {})
|
|
249
|
+
] }),
|
|
250
|
+
/* @__PURE__ */ e(pt, { children: (d) => d.map((a) => /* @__PURE__ */ e(ut, { input: a, children: a.displayName }, a.id)) })
|
|
251
|
+
] }),
|
|
252
|
+
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ e(At, { children: /* @__PURE__ */ t(Mt, { children: [
|
|
253
|
+
/* @__PURE__ */ t(It, { children: [
|
|
254
|
+
/* @__PURE__ */ e(Bt, {}),
|
|
255
|
+
/* @__PURE__ */ e(St, {}),
|
|
256
|
+
/* @__PURE__ */ e(Tt, {})
|
|
257
|
+
] }),
|
|
258
|
+
/* @__PURE__ */ e(xt, {}),
|
|
259
|
+
/* @__PURE__ */ e(Ht, { children: /* @__PURE__ */ t(yt, { children: [
|
|
260
|
+
/* @__PURE__ */ t(kt, { children: [
|
|
261
|
+
/* @__PURE__ */ e(ft, {}),
|
|
262
|
+
/* @__PURE__ */ e(wt, {}),
|
|
263
|
+
/* @__PURE__ */ e(vt, {})
|
|
264
|
+
] }),
|
|
265
|
+
/* @__PURE__ */ t(Lt, { children: [
|
|
266
|
+
/* @__PURE__ */ e(Dt, {}),
|
|
267
|
+
/* @__PURE__ */ e(Pt, {}),
|
|
268
|
+
/* @__PURE__ */ e(Wt, {})
|
|
269
|
+
] }),
|
|
270
|
+
/* @__PURE__ */ e(_t, {})
|
|
271
|
+
] }) })
|
|
272
|
+
] }) }) }) })
|
|
273
|
+
] })
|
|
274
|
+
] });
|
|
275
|
+
}
|
|
276
|
+
function gd() {
|
|
277
|
+
return /* @__PURE__ */ t(Vt, { children: [
|
|
278
|
+
/* @__PURE__ */ t(Qt, { children: [
|
|
279
|
+
/* @__PURE__ */ e(Ot, {}),
|
|
280
|
+
/* @__PURE__ */ e(Nt, {}),
|
|
281
|
+
/* @__PURE__ */ e(Rt, {})
|
|
282
|
+
] }),
|
|
283
|
+
/* @__PURE__ */ t($t, { children: [
|
|
284
|
+
/* @__PURE__ */ e(jt, { children: ({ pinned: d, unpinned: a }) => /* @__PURE__ */ t(F, { children: [
|
|
285
|
+
d.map((r) => /* @__PURE__ */ e(Gt, { action: r }, r.name)),
|
|
286
|
+
a.length > 0 && /* @__PURE__ */ e(Kt, {}),
|
|
287
|
+
/* @__PURE__ */ t(zt, { children: [
|
|
288
|
+
/* @__PURE__ */ e(Jt, {}),
|
|
289
|
+
a.map((r) => /* @__PURE__ */ t(Ut, { action: r, children: [
|
|
290
|
+
/* @__PURE__ */ e(Xt, { action: r }),
|
|
291
|
+
r.name
|
|
292
|
+
] }, r.name))
|
|
293
|
+
] })
|
|
294
|
+
] }) }),
|
|
295
|
+
/* @__PURE__ */ t(u, { action: "copy", children: [
|
|
296
|
+
/* @__PURE__ */ e(Yt, { action: "copy" }),
|
|
297
|
+
/* @__PURE__ */ e(Zt, { action: "copy" })
|
|
298
|
+
] }),
|
|
299
|
+
/* @__PURE__ */ e(u, { action: "clear" }),
|
|
300
|
+
/* @__PURE__ */ e(u, { action: "stop" })
|
|
301
|
+
] })
|
|
302
|
+
] });
|
|
303
|
+
}
|
|
304
|
+
function Ad() {
|
|
305
|
+
const { sessions: d } = qa(), { conversationId: a } = W();
|
|
306
|
+
return /* @__PURE__ */ t(Va, { children: [
|
|
307
|
+
/* @__PURE__ */ t(Qa, { children: [
|
|
308
|
+
/* @__PURE__ */ t(Oa, { children: [
|
|
309
|
+
/* @__PURE__ */ e(Na, { iconKey: "backToChat" }),
|
|
310
|
+
"Back to chat"
|
|
311
|
+
] }),
|
|
312
|
+
/* @__PURE__ */ e(Ra, {}),
|
|
313
|
+
/* @__PURE__ */ e(A, {})
|
|
314
|
+
] }),
|
|
315
|
+
/* @__PURE__ */ t($a, { children: [
|
|
316
|
+
d.map((r) => /* @__PURE__ */ t(
|
|
317
|
+
ja,
|
|
318
|
+
{
|
|
319
|
+
sessionId: r.id,
|
|
320
|
+
"data-active": E(r.id === a),
|
|
321
|
+
children: [
|
|
322
|
+
/* @__PURE__ */ e(Ga, { children: r.title }),
|
|
323
|
+
/* @__PURE__ */ e(Ka, { children: za(r.updatedAt) })
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
r.id
|
|
327
|
+
)),
|
|
328
|
+
/* @__PURE__ */ e(Ja, {}),
|
|
329
|
+
/* @__PURE__ */ e(Ua, {})
|
|
330
|
+
] }),
|
|
331
|
+
/* @__PURE__ */ e(Xa, { children: /* @__PURE__ */ e(Ya, {}) })
|
|
332
|
+
] });
|
|
333
|
+
}
|
|
334
|
+
function Md() {
|
|
335
|
+
return /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ t(ee, { children: [
|
|
336
|
+
/* @__PURE__ */ e(te, {}),
|
|
337
|
+
/* @__PURE__ */ e(ae, {}),
|
|
338
|
+
/* @__PURE__ */ e(de, { children: /* @__PURE__ */ t(re, { children: [
|
|
339
|
+
/* @__PURE__ */ t(h, { name: "unrelated_response", children: [
|
|
340
|
+
/* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(b, {}) }),
|
|
341
|
+
/* @__PURE__ */ e(C, {}),
|
|
342
|
+
/* @__PURE__ */ e(p, {})
|
|
343
|
+
] }),
|
|
344
|
+
/* @__PURE__ */ t(h, { name: "inaccurate_statement", children: [
|
|
345
|
+
/* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(b, {}) }),
|
|
346
|
+
/* @__PURE__ */ e(C, {}),
|
|
347
|
+
/* @__PURE__ */ e(p, {})
|
|
348
|
+
] }),
|
|
349
|
+
/* @__PURE__ */ t(h, { name: "inaccurate_code_snippet", children: [
|
|
350
|
+
/* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(b, {}) }),
|
|
351
|
+
/* @__PURE__ */ e(C, {}),
|
|
352
|
+
/* @__PURE__ */ e(p, {})
|
|
353
|
+
] }),
|
|
354
|
+
/* @__PURE__ */ t(h, { name: "irrelevant_citations", children: [
|
|
355
|
+
/* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(b, {}) }),
|
|
356
|
+
/* @__PURE__ */ e(C, {})
|
|
357
|
+
] }),
|
|
358
|
+
/* @__PURE__ */ e(oe, {})
|
|
359
|
+
] }) })
|
|
360
|
+
] }) }) }) });
|
|
361
|
+
}
|
|
362
|
+
function Id() {
|
|
363
|
+
return /* @__PURE__ */ t(ne, { children: [
|
|
364
|
+
/* @__PURE__ */ e(se, {}),
|
|
365
|
+
/* @__PURE__ */ t(me, { children: [
|
|
366
|
+
/* @__PURE__ */ t(ie, { children: [
|
|
367
|
+
/* @__PURE__ */ e(ce, {}),
|
|
368
|
+
/* @__PURE__ */ e(he, {})
|
|
369
|
+
] }),
|
|
370
|
+
/* @__PURE__ */ e(le, { children: (d) => /* @__PURE__ */ t(F, { children: [
|
|
371
|
+
d.map((a, r) => /* @__PURE__ */ t(be, { field: a, autoFocus: r === 0, children: [
|
|
372
|
+
/* @__PURE__ */ e(Ce, {}),
|
|
373
|
+
a.inputType === "text" && /* @__PURE__ */ e(Fe, {}),
|
|
374
|
+
a.inputType === "email" && /* @__PURE__ */ e(Ee, {}),
|
|
375
|
+
a.inputType === "file" && /* @__PURE__ */ e(pe, {}),
|
|
376
|
+
a.inputType === "textarea" && /* @__PURE__ */ e(ue, {}),
|
|
377
|
+
a.inputType === "checkbox" && /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Ae, {}) }),
|
|
378
|
+
a.inputType === "select" && /* @__PURE__ */ t(Me, { children: [
|
|
379
|
+
/* @__PURE__ */ t(Ie, { children: [
|
|
380
|
+
/* @__PURE__ */ e(Be, {}),
|
|
381
|
+
/* @__PURE__ */ e(Se, {})
|
|
382
|
+
] }),
|
|
383
|
+
/* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(xe, { children: a.items.map((o) => /* @__PURE__ */ t(He, { value: o.value, children: [
|
|
384
|
+
/* @__PURE__ */ e(ye, { children: o.label }),
|
|
385
|
+
/* @__PURE__ */ e(ke, {})
|
|
386
|
+
] }, o.value)) }) })
|
|
387
|
+
] }),
|
|
388
|
+
a.inputType === "combobox" && /* @__PURE__ */ t(fe, { children: [
|
|
389
|
+
/* @__PURE__ */ t(we, { children: [
|
|
390
|
+
"multiple" in a && a.multiple && /* @__PURE__ */ e(ve, {}),
|
|
391
|
+
/* @__PURE__ */ e(Le, {}),
|
|
392
|
+
/* @__PURE__ */ e(De, {})
|
|
393
|
+
] }),
|
|
394
|
+
/* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ e(Ve, { children: (o) => o.length === 0 ? /* @__PURE__ */ e(Qe, {}) : o.map((n) => /* @__PURE__ */ t(
|
|
395
|
+
Oe,
|
|
396
|
+
{
|
|
397
|
+
item: n,
|
|
398
|
+
children: [
|
|
399
|
+
/* @__PURE__ */ e(Ne, { children: n.label }),
|
|
400
|
+
/* @__PURE__ */ e(Re, {})
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
n.value
|
|
404
|
+
)) }) }) }) })
|
|
405
|
+
] }),
|
|
406
|
+
/* @__PURE__ */ e($e, {}),
|
|
407
|
+
/* @__PURE__ */ e(je, {})
|
|
408
|
+
] }, a.name)),
|
|
409
|
+
/* @__PURE__ */ e(Ge, {})
|
|
410
|
+
] }) }),
|
|
411
|
+
/* @__PURE__ */ t(Ke, { children: [
|
|
412
|
+
/* @__PURE__ */ e(ze, {}),
|
|
413
|
+
/* @__PURE__ */ e(Je, {})
|
|
414
|
+
] })
|
|
415
|
+
] }),
|
|
416
|
+
/* @__PURE__ */ t(Ue, { children: [
|
|
417
|
+
/* @__PURE__ */ e(Xe, {}),
|
|
418
|
+
/* @__PURE__ */ e(Ye, {}),
|
|
419
|
+
/* @__PURE__ */ e(Ze, {})
|
|
420
|
+
] })
|
|
421
|
+
] });
|
|
422
|
+
}
|
|
423
|
+
export {
|
|
424
|
+
Nd as InkeepEmbeddedChat,
|
|
425
|
+
md as InkeepEmbeddedChatImpl,
|
|
426
|
+
id as InkeepEmbeddedChatImplContent,
|
|
427
|
+
sd as InkeepEmbeddedChatProvider
|
|
428
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./embedded-chat.cjs"),C=require("../styled/components/shadow.cjs"),S=require("../primitives/providers/config-provider.cjs"),g=require("../primitives/providers/root-provider.cjs"),j=require("../primitives/providers/widget-provider.cjs"),q=require("../primitives/components/modal/modal-provider.cjs"),P=require("../primitives/atoms/error-boundary.cjs"),c=require("./embedded-search.cjs"),k=require("./embedded-search-and-chat.impl.cjs"),x=require("react"),A=require("./modal.cjs");function v(d){const{config:r,...n}=k.useWidgetImpl(d);return e.jsx(P.ErrorBoundary,{children:e.jsx(C.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(g.RootProvider,{config:r,componentType:S.WebWidgetInteractionType.EmbeddedSearchAndChat,children:e.jsx(a,{...n})})})})}function a(d){const{view:r,setView:n,shouldShowAskAICard:h,onToggleView:l,shouldAutoFocusInput:u,searchLabel:m,askAILabel:p,askAICardLabel:b}=d,I=q.useModal()?A.ModalContent:x.Fragment,t={onToggleView:l,shouldShowAskAICard:h,shouldAutoFocusInput:u,searchLabel:m,askAILabel:p,askAICardLabel:b},o={isHidden:r==="chat",...t},i={isHidden:r==="search",...t};return e.jsx(j.WidgetProvider,{widget:{setView:n,view:r},children:e.jsx(c.InkeepEmbeddedSearchProvider,{...o,children:e.jsx(s.InkeepEmbeddedChatProvider,{...i,children:e.jsxs(I,{children:[e.jsx(c.InkeepEmbeddedSearchImplContent,{...o}),e.jsx(s.InkeepEmbeddedChatImplContent,{...i})]})})})})}exports.InkeepEmbeddedSearchAndChat=v;exports.InkeepEmbeddedSearchAndChatImpl=a;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useWidgetImpl } from './embedded-search-and-chat.impl';
|
|
2
|
+
import { ModalViewTypes, InkeepConfig, WidgetView } from '../types/index.ts';
|
|
3
|
+
import { RefObject } from 'react';
|
|
4
|
+
export interface InkeepEmbeddedSearchAndChatFunctions {
|
|
5
|
+
setView: (view: ModalViewTypes) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface InkeepEmbeddedSearchAndChatProps extends Partial<Omit<InkeepConfig, 'componentType'>>, WidgetView {
|
|
8
|
+
/**
|
|
9
|
+
* The default view to show when the widget is loaded.
|
|
10
|
+
* @default 'search'
|
|
11
|
+
*/
|
|
12
|
+
defaultView?: ModalViewTypes;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to always open the widget in the default view. (Modal only)
|
|
15
|
+
*
|
|
16
|
+
* By default, subsequent opens will remember the last view.
|
|
17
|
+
* This prop will force the widget to always open in the default view.
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
forceDefaultView?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show the Ask AI card.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
shouldShowAskAICard?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to auto focus the input.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
shouldAutoFocusInput?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* A ref to the component functions.
|
|
34
|
+
*/
|
|
35
|
+
ref?: RefObject<InkeepEmbeddedSearchAndChatFunctions>;
|
|
36
|
+
}
|
|
37
|
+
export declare function InkeepEmbeddedSearchAndChat(props: InkeepEmbeddedSearchAndChatProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
type InkeepEmbeddedSearchAndChatImplProps = Omit<ReturnType<typeof useWidgetImpl>, 'config'>;
|
|
39
|
+
export declare function InkeepEmbeddedSearchAndChatImpl(props: InkeepEmbeddedSearchAndChatImplProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),a=require("./utils.cjs");function p(f){const{defaultView:u="search",aiChatSettings:i,baseSettings:g,searchSettings:o,shouldAutoFocusInput:l=!0,onToggleView:h,ref:R,...S}=f,s=t.useRef(null),m=a.composeRefs(s,i?.chatFunctionsRef),r=t.useRef(null),d=a.composeRefs(r,o?.searchFunctionsRef),w={...i,chatFunctionsRef:m},I={...o,searchFunctionsRef:d},[n,c]=t.useState(u),b=e=>{e.autoSubmit&&e.query&&s.current?.submitMessage(e.query),h?.(e),c(e.view)};return t.useImperativeHandle(R,()=>({setView:c})),t.useEffect(()=>{n==="chat"?s.current?.focusInput():r.current?.focusInput()},[n]),{config:{baseSettings:g,aiChatSettings:w,searchSettings:I},defaultView:u,view:n,setView:c,onToggleView:b,shouldAutoFocusInput:l,...S}}exports.useWidgetImpl=p;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InkeepEmbeddedSearchAndChatProps } from './embedded-search-and-chat';
|
|
2
|
+
import { ModalViewTypes, InkeepConfig } from '../types/index.ts';
|
|
3
|
+
interface UseWidgetImpReturn extends InkeepEmbeddedSearchAndChatProps {
|
|
4
|
+
config: InkeepConfig;
|
|
5
|
+
view: ModalViewTypes;
|
|
6
|
+
setView: (view: ModalViewTypes) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useWidgetImpl<T extends InkeepEmbeddedSearchAndChatProps>(props: T): UseWidgetImpReturn;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef as r, useState as V, useImperativeHandle as d, useEffect as b } from "react";
|
|
3
|
+
import { composeRefs as a } from "./utils.js";
|
|
4
|
+
function _(f) {
|
|
5
|
+
const {
|
|
6
|
+
defaultView: c = "search",
|
|
7
|
+
aiChatSettings: i,
|
|
8
|
+
baseSettings: g,
|
|
9
|
+
searchSettings: o,
|
|
10
|
+
shouldAutoFocusInput: h = !0,
|
|
11
|
+
onToggleView: l,
|
|
12
|
+
ref: m,
|
|
13
|
+
...S
|
|
14
|
+
} = f, t = r(null), R = a(t, i?.chatFunctionsRef), u = r(null), w = a(u, o?.searchFunctionsRef), p = {
|
|
15
|
+
...i,
|
|
16
|
+
chatFunctionsRef: R
|
|
17
|
+
}, F = {
|
|
18
|
+
...o,
|
|
19
|
+
searchFunctionsRef: w
|
|
20
|
+
}, [n, s] = V(c), I = (e) => {
|
|
21
|
+
e.autoSubmit && e.query && t.current?.submitMessage(e.query), l?.(e), s(e.view);
|
|
22
|
+
};
|
|
23
|
+
return d(m, () => ({
|
|
24
|
+
setView: s
|
|
25
|
+
})), b(() => {
|
|
26
|
+
n === "chat" ? t.current?.focusInput() : u.current?.focusInput();
|
|
27
|
+
}, [n]), {
|
|
28
|
+
config: {
|
|
29
|
+
baseSettings: g,
|
|
30
|
+
aiChatSettings: p,
|
|
31
|
+
searchSettings: F
|
|
32
|
+
},
|
|
33
|
+
defaultView: c,
|
|
34
|
+
view: n,
|
|
35
|
+
setView: s,
|
|
36
|
+
onToggleView: I,
|
|
37
|
+
shouldAutoFocusInput: h,
|
|
38
|
+
...S
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
_ as useWidgetImpl
|
|
43
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
3
|
+
import { InkeepEmbeddedChatProvider as I, InkeepEmbeddedChatImplContent as u } from "./embedded-chat.js";
|
|
4
|
+
import { Shadow as b } from "../styled/components/shadow.js";
|
|
5
|
+
import { WebWidgetInteractionType as C } from "../primitives/providers/config-provider.js";
|
|
6
|
+
import { RootProvider as g } from "../primitives/providers/root-provider.js";
|
|
7
|
+
import { WidgetProvider as k } from "../primitives/providers/widget-provider.js";
|
|
8
|
+
import { useModal as w } from "../primitives/components/modal/modal-provider.js";
|
|
9
|
+
import { ErrorBoundary as A } from "../primitives/atoms/error-boundary.js";
|
|
10
|
+
import { InkeepEmbeddedSearchProvider as E, InkeepEmbeddedSearchImplContent as S } from "./embedded-search.js";
|
|
11
|
+
import { useWidgetImpl as P } from "./embedded-search-and-chat.impl.js";
|
|
12
|
+
import { Fragment as v } from "react";
|
|
13
|
+
import { ModalContent as W } from "./modal.js";
|
|
14
|
+
function G(o) {
|
|
15
|
+
const { config: r, ...t } = P(o);
|
|
16
|
+
return /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
17
|
+
b,
|
|
18
|
+
{
|
|
19
|
+
wrapperStyles: {
|
|
20
|
+
height: "inherit",
|
|
21
|
+
width: "inherit"
|
|
22
|
+
},
|
|
23
|
+
children: /* @__PURE__ */ e(
|
|
24
|
+
g,
|
|
25
|
+
{
|
|
26
|
+
config: r,
|
|
27
|
+
componentType: C.EmbeddedSearchAndChat,
|
|
28
|
+
children: /* @__PURE__ */ e(y, { ...t })
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
33
|
+
}
|
|
34
|
+
function y(o) {
|
|
35
|
+
const {
|
|
36
|
+
view: r,
|
|
37
|
+
setView: t,
|
|
38
|
+
shouldShowAskAICard: m,
|
|
39
|
+
onToggleView: p,
|
|
40
|
+
shouldAutoFocusInput: a,
|
|
41
|
+
searchLabel: h,
|
|
42
|
+
askAILabel: c,
|
|
43
|
+
askAICardLabel: s
|
|
44
|
+
} = o, l = w() ? W : v, d = {
|
|
45
|
+
onToggleView: p,
|
|
46
|
+
shouldShowAskAICard: m,
|
|
47
|
+
shouldAutoFocusInput: a,
|
|
48
|
+
searchLabel: h,
|
|
49
|
+
askAILabel: c,
|
|
50
|
+
askAICardLabel: s
|
|
51
|
+
}, n = {
|
|
52
|
+
isHidden: r === "chat",
|
|
53
|
+
...d
|
|
54
|
+
}, i = {
|
|
55
|
+
isHidden: r === "search",
|
|
56
|
+
...d
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ e(k, { widget: { setView: t, view: r }, children: /* @__PURE__ */ e(E, { ...n, children: /* @__PURE__ */ e(I, { ...i, children: /* @__PURE__ */ f(l, { children: [
|
|
59
|
+
/* @__PURE__ */ e(S, { ...n }),
|
|
60
|
+
/* @__PURE__ */ e(u, { ...i })
|
|
61
|
+
] }) }) }) });
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
G as InkeepEmbeddedSearchAndChat,
|
|
65
|
+
y as InkeepEmbeddedSearchAndChatImpl
|
|
66
|
+
};
|
|
@@ -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-search.cjs"),R=require("../styled/components/modal.cjs"),A=require("../styled/components/shadow.cjs"),u=require("../primitives/providers/config-provider.cjs"),T=require("../primitives/providers/root-provider.cjs"),w=require("../primitives/providers/widget-provider.cjs"),S=require("../primitives/components/embedded-search/search-provider.cjs"),p=require("../primitives/components/modal/modal-provider.cjs"),d=require("../primitives/utils/misc.cjs"),x=require("../primitives/atoms/cmdk/index.cjs"),v=require("../primitives/atoms/error-boundary.cjs"),a=require("react"),j=require("./widget-toggle.cjs"),k=require("./modal.cjs");function b(r){const{baseSettings:t,searchSettings:n}=r;return e.jsx(v.ErrorBoundary,{children:e.jsx(A.Shadow,{children:e.jsx(T.RootProvider,{config:{baseSettings:t,searchSettings:n},componentType:u.WebWidgetInteractionType.EmbeddedSearch,children:e.jsx(h,{...r})})})})}function I(r){const{children:t,onToggleView:n,isHidden:i,shouldAutoFocusInput:l=!n}=r;return e.jsx(s.Provider,{isHidden:i,shouldAutoFocusInput:l,children:t})}function h(r){return e.jsx(I,{...r,children:e.jsx(m,{...r})})}function m(r){const{searchSettings:{view:t}}=u.useInkeepConfig(),{onToggleView:n,shouldShowAskAICard:i=!!n&&t!=="dual-pane"}=r,l=p.useModal(),o=w.useWidget(),c=l&&!o?k.ModalContent:a.Fragment;return e.jsx(c,{children:e.jsx(s.Wrapper,{"data-show-ask-ai-card":d.dataAttr(i),"data-composite":d.dataAttr(!!n||l?.isOpen),children:e.jsxs(s.Root,{children:[e.jsx(P,{...r}),e.jsxs(s.Content,{children:[e.jsx(C,{askAICardLabel:r.askAICardLabel,askAILabel:r.askAILabel,onToggleView:r.onToggleView,shouldShowAskAICard:i}),e.jsx(L,{})]}),e.jsx(y,{})]})})})}function P(r){const{onToggleView:t,askAILabel:n,searchLabel:i}=r,l=x.useCommandState(c=>c.search),{loading:o}=S.useSearch();return e.jsxs(s.InputGroup,{children:[!o&&e.jsx(s.InputIcon,{}),e.jsx(s.Loading,{}),e.jsx(s.Input,{}),t&&e.jsx(j.WidgetToggle,{onToggleView:t,query:l,askAILabel:n,searchLabel:i,view:"search"}),e.jsx(R.Close,{})]})}function C(r){const{askAILabel:t,onToggleView:n,shouldShowAskAICard:i,askAICardLabel:l}=r,o=x.useCommandState(g=>g.search),{handleToggle:c}=j.useToggleView({onToggleView:n,query:o});return i?e.jsxs(s.AskAITrigger,{onSelect:()=>c("chat",!0),children:[e.jsx(s.AskAITriggerIcon,{}),e.jsxs(s.AskAITriggerLabel,{children:[l||t||"Ask AI",o&&e.jsx(s.AskAITriggerQuery,{children:`${o}`})]}),e.jsx(s.AskAITriggerIndicatorText,{children:"Start conversation"}),e.jsx(s.AskAITriggerIndicator,{})]}):null}function L(){return e.jsxs(s.Results,{children:[e.jsx(s.ResultsLoading,{}),e.jsx(s.ResultsTabList,{children:r=>r.map(t=>e.jsx(s.ResultsTab,{tab:t},t))}),e.jsx(s.ResultsEmpty,{}),e.jsxs(s.ResultsContent,{children:[e.jsx(q,{}),e.jsx(f,{})]})]})}function q(){return e.jsxs(s.ResultsScrollArea,{children:[e.jsx(s.ResultsScrollAreaViewport,{children:e.jsx(s.ResultsList,{children:r=>r.map(t=>e.jsxs(s.ResultsItem,{item:t,children:[e.jsx(s.ResultsItemBreadcrumbs,{children:n=>n.map((i,l)=>e.jsxs(a.Fragment,{children:[i,e.jsx(s.ResultsItemBreadcrumbIcon,{})]},`${i}-${l}`))}),e.jsx(s.ResultsItemIcon,{}),e.jsx(s.ResultsItemTitle,{}),e.jsx(s.ResultsItemTag,{}),e.jsx(s.ResultsItemDescription,{children:n=>n.map((i,l)=>e.jsx(s.ResultsItemDescriptionPart,{part:i},`part-${l}`))}),e.jsx(s.ResultsItemIndicator,{})]},t.id))})}),e.jsx(s.ResultsScrollAreaScrollbar,{children:e.jsx(s.ResultsScrollAreaThumb,{})}),e.jsx(s.ResultsScrollAreaCorner,{})]})}function f(){return e.jsxs(s.ResultsScrollArea,{children:[e.jsx(s.ResultsScrollAreaViewport,{children:e.jsxs(s.ResultsItemPreview,{children:[e.jsxs(s.ResultsItemPreviewHeader,{children:[e.jsxs(s.ResultsItemPreviewHeading,{children:[e.jsx(s.ResultsItemPreviewTitle,{}),e.jsx(s.ResultsItemPreviewTitleLinkIcon,{})]}),e.jsx(s.ResultsItemPreviewBreadcrumbs,{children:r=>r.map((t,n)=>e.jsxs(a.Fragment,{children:[t,e.jsx(s.ResultsItemPreviewBreadcrumbIcon,{})]},`${t}-${n}`))})]}),e.jsx(s.ResultsItemPreviewBody,{}),e.jsxs(s.ResultsItemPreviewOutline,{children:[e.jsx(s.ResultsItemPreviewOutlineTitle,{}),e.jsx(s.ResultsItemPreviewOutlineList,{children:r=>r.map((t,n)=>e.jsxs(s.ResultsItemPreviewOutlineItem,{href:t.url??void 0,"data-is-match":d.dataAttr(t.isMatch),children:[e.jsx(s.ResultsItemPreviewOutlineItemIcon,{}),e.jsx(s.ResultsItemPreviewOutlineItemText,{children:t.content}),t.url&&e.jsx(s.ResultsItemPreviewOutlineItemLinkIcon,{})]},`${t.anchor}-${n}`))})]})]})}),e.jsx(s.ResultsScrollAreaScrollbar,{children:e.jsx(s.ResultsScrollAreaThumb,{})}),e.jsx(s.ResultsScrollAreaCorner,{})]})}function y(){return e.jsx(s.Footer,{children:e.jsxs(s.TaglineContainer,{children:[e.jsx(s.TaglineText,{}),e.jsx(s.TaglineLogo,{}),e.jsx(s.TaglineBrandName,{})]})})}exports.InkeepEmbeddedSearch=b;exports.InkeepEmbeddedSearchImpl=h;exports.InkeepEmbeddedSearchImplContent=m;exports.InkeepEmbeddedSearchProvider=I;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WidgetView, InkeepConfig } from '../types/index.ts';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { EmbeddedSearchProviderProps } from '../styled';
|
|
4
|
+
type SearchConfig = Pick<InkeepConfig, 'baseSettings' | 'searchSettings'>;
|
|
5
|
+
type InkeepEmbeddedSearchImplProps = EmbeddedSearchProviderProps & WidgetView & {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to show the Ask AI card.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
shouldShowAskAICard?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type InkeepEmbeddedSearchProps = InkeepEmbeddedSearchImplProps & Partial<SearchConfig>;
|
|
13
|
+
export declare function InkeepEmbeddedSearch(props: InkeepEmbeddedSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function InkeepEmbeddedSearchProvider(props: PropsWithChildren<InkeepEmbeddedSearchImplProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function InkeepEmbeddedSearchImpl(props: InkeepEmbeddedSearchImplProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function InkeepEmbeddedSearchImplContent(props: InkeepEmbeddedSearchImplProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|