@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,70 @@
|
|
|
1
|
+
export interface BaseOpenSettings {
|
|
2
|
+
/**
|
|
3
|
+
* Controls whether the component is open.
|
|
4
|
+
*/
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Handler called when the component opens or closes.
|
|
8
|
+
*/
|
|
9
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the component is open by default.
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
defaultOpen?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The shortcut key.
|
|
17
|
+
*
|
|
18
|
+
* The key to trigger the component when pressed with Cmd (Mac) / Ctrl (Windows).
|
|
19
|
+
*
|
|
20
|
+
* Set to `null` to disable the shortcut.
|
|
21
|
+
*
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
24
|
+
shortcutKey?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* The trigger selector.
|
|
27
|
+
*
|
|
28
|
+
* The selector to trigger the component when clicked.
|
|
29
|
+
*
|
|
30
|
+
* @default undefined
|
|
31
|
+
*/
|
|
32
|
+
triggerSelector?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface OpenSettingsModal extends BaseOpenSettings {
|
|
35
|
+
/**
|
|
36
|
+
* The trigger selector.
|
|
37
|
+
*
|
|
38
|
+
* The selector to trigger the modal when clicked.
|
|
39
|
+
*
|
|
40
|
+
* @default '[data-inkeep-modal-trigger]'
|
|
41
|
+
*/
|
|
42
|
+
triggerSelector?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface OpenSettingsChatButton extends BaseOpenSettings {
|
|
45
|
+
}
|
|
46
|
+
export interface OpenSettingsSearchBar extends BaseOpenSettings {
|
|
47
|
+
/**
|
|
48
|
+
* The shortcut key.
|
|
49
|
+
*
|
|
50
|
+
* The key to trigger the searchbar when pressed with Cmd (Mac) / Ctrl (Windows).
|
|
51
|
+
*
|
|
52
|
+
* Set to `null` to disable the shortcut.
|
|
53
|
+
*
|
|
54
|
+
* @default 'k'
|
|
55
|
+
*/
|
|
56
|
+
shortcutKey?: string | null;
|
|
57
|
+
}
|
|
58
|
+
export interface OpenSettingsSidebar extends BaseOpenSettings {
|
|
59
|
+
/**
|
|
60
|
+
* The trigger selector for the sidebar chat.
|
|
61
|
+
* @default '[data-inkeep-sidebar-chat-trigger]'
|
|
62
|
+
*/
|
|
63
|
+
triggerSelector?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Threshold factor for auto-closing when resizing.
|
|
66
|
+
* When dragging below (minWidth * autoCloseThreshold), the sidebar will auto-close.
|
|
67
|
+
* @default 0.7 (70% of minimum width)
|
|
68
|
+
*/
|
|
69
|
+
autoCloseThreshold?: number;
|
|
70
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { SourceItem } from '../sources';
|
|
2
|
+
export interface InkeepSearchSettings {
|
|
3
|
+
/**
|
|
4
|
+
* The placeholder text to use.
|
|
5
|
+
* @default
|
|
6
|
+
* 'Search anything...' (desktop)
|
|
7
|
+
* 'Search' (mobile)
|
|
8
|
+
*/
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The default query to use.
|
|
12
|
+
* @default ''
|
|
13
|
+
*/
|
|
14
|
+
defaultQuery?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Callback for when the search query changes.
|
|
17
|
+
*/
|
|
18
|
+
onQueryChange?: (query: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Search callback function that handles all search functionality.
|
|
21
|
+
* This callback handles the complete search implementation.
|
|
22
|
+
* If not provided, the widget will warn and show no results.
|
|
23
|
+
*
|
|
24
|
+
|
|
25
|
+
* @param query - The search query string
|
|
26
|
+
* @param abortSignal - Signal to abort the search request
|
|
27
|
+
*
|
|
28
|
+
* @returns Promise that resolves with search results
|
|
29
|
+
*/
|
|
30
|
+
onSearch?: (query: string, abortSignal: AbortSignal) => Promise<SourceItem[]>;
|
|
31
|
+
/**
|
|
32
|
+
* The time in milliseconds to wait triggering the search.
|
|
33
|
+
* @default 0
|
|
34
|
+
*/
|
|
35
|
+
debounceTimeMs?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Ref to the AIChat component's callable functions
|
|
38
|
+
*/
|
|
39
|
+
searchFunctionsRef?: React.Ref<SearchFunctions>;
|
|
40
|
+
/**
|
|
41
|
+
* Controls whether links should open in a new tab.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
shouldOpenLinksInNewTab?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Tabs to display in the search results, and in the **desired order**. Each tab can be either a string or a tuple of [string, options].
|
|
47
|
+
*
|
|
48
|
+
* Default tabs if none provided: All, Publications, PDFs, GitHub, Forums, Discord, Slack, StackOverflow
|
|
49
|
+
*
|
|
50
|
+
* Behavior:
|
|
51
|
+
* - Omit 'All' from tabs array to hide the All tab
|
|
52
|
+
* - Empty tabs array will show all results without tab UI
|
|
53
|
+
* - Tabs only appear when they have results, unless isAlwaysVisible is set
|
|
54
|
+
* ```ts
|
|
55
|
+
* // Basic tabs
|
|
56
|
+
* tabs: ['Publications', 'GitHub']
|
|
57
|
+
*
|
|
58
|
+
* // With isAlwaysVisible option
|
|
59
|
+
* tabs: [
|
|
60
|
+
* 'Publications',
|
|
61
|
+
* ['GitHub', { isAlwaysVisible: true }] // Shows even with no results
|
|
62
|
+
* ]
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
tabs?: (string | SearchTab)[];
|
|
66
|
+
/**
|
|
67
|
+
* The key to use for the search query parameter.
|
|
68
|
+
*
|
|
69
|
+
* When a user selects a search result, the query is added to the URL as a query parameter.
|
|
70
|
+
* This is the key of that query parameter.
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
searchQueryParamKey?: string;
|
|
74
|
+
/**
|
|
75
|
+
* The view to use for the search.
|
|
76
|
+
* @default 'single-pane'
|
|
77
|
+
*/
|
|
78
|
+
view?: 'single-pane' | 'dual-pane';
|
|
79
|
+
}
|
|
80
|
+
export interface SearchTab {
|
|
81
|
+
[0]: string;
|
|
82
|
+
[1]: {
|
|
83
|
+
isAlwaysVisible?: boolean;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export interface SearchFunctions {
|
|
87
|
+
/**
|
|
88
|
+
* Update the query.
|
|
89
|
+
*/
|
|
90
|
+
updateQuery: (query: string) => void;
|
|
91
|
+
/**
|
|
92
|
+
* Focus the input.
|
|
93
|
+
*/
|
|
94
|
+
focusInput: () => void;
|
|
95
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { InkeepCustomIcon } from '../../icons';
|
|
2
|
+
import { Message } from '../../message';
|
|
3
|
+
import { AIChatFormSettings } from './form';
|
|
4
|
+
export interface OpenFormAction {
|
|
5
|
+
type: 'open_form';
|
|
6
|
+
formSettings: AIChatFormSettings;
|
|
7
|
+
}
|
|
8
|
+
export interface OpenUrlAction {
|
|
9
|
+
type: 'open_link';
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
export interface InvokeCallbackArgs {
|
|
13
|
+
conversation: {
|
|
14
|
+
id: string;
|
|
15
|
+
messages: Message[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface InvokeMessageCallbackActionArgs extends InvokeCallbackArgs {
|
|
19
|
+
messageId?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface InvokeCallbackAction {
|
|
22
|
+
type: 'invoke_callback';
|
|
23
|
+
callback: (args: InvokeCallbackArgs) => void;
|
|
24
|
+
shouldCloseModal?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface InvokeMessageCallbackAction {
|
|
27
|
+
type: 'invoke_message_callback';
|
|
28
|
+
callback: (args: InvokeMessageCallbackActionArgs) => void;
|
|
29
|
+
shouldCloseModal?: boolean;
|
|
30
|
+
}
|
|
31
|
+
type Expand<T> = T extends infer O ? {
|
|
32
|
+
[K in keyof O]: O[K];
|
|
33
|
+
} : never;
|
|
34
|
+
type ExpandUnion<T> = T extends any ? Expand<T> : never;
|
|
35
|
+
type ChatAction = ExpandUnion<InvokeCallbackAction | OpenFormAction | OpenUrlAction>;
|
|
36
|
+
type MessageChatAction = ExpandUnion<InvokeMessageCallbackAction | OpenFormAction | OpenUrlAction>;
|
|
37
|
+
export type ChatActionType = ChatAction['type'];
|
|
38
|
+
export interface GetHelpOption {
|
|
39
|
+
icon?: InkeepCustomIcon;
|
|
40
|
+
name: string;
|
|
41
|
+
isPinnedToToolbar?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Action to be performed when the option is clicked.
|
|
44
|
+
*
|
|
45
|
+
* ```ts
|
|
46
|
+
* action: {
|
|
47
|
+
* type: 'open_form',
|
|
48
|
+
* formSettings: {
|
|
49
|
+
* title: 'Open Form',
|
|
50
|
+
* description: 'Open a form',
|
|
51
|
+
* },
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
* ```ts
|
|
55
|
+
* action: {
|
|
56
|
+
* type: 'open_link',
|
|
57
|
+
* url: 'https://example.com',
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
* ```ts
|
|
61
|
+
* action: {
|
|
62
|
+
* type: 'invoke_callback',
|
|
63
|
+
* callback: (args: InvokeCallbackArgs) => {
|
|
64
|
+
* console.log(args)
|
|
65
|
+
* },
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
action: ChatAction;
|
|
70
|
+
}
|
|
71
|
+
export interface CustomMessageAction {
|
|
72
|
+
label?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Icon to be displayed next to the label.
|
|
75
|
+
*
|
|
76
|
+
* ```ts
|
|
77
|
+
* icon: { builtIn: 'FaEnvelope' },
|
|
78
|
+
* icon: { custom: 'https://example.com/icon.svg' },
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
icon?: InkeepCustomIcon;
|
|
82
|
+
/**
|
|
83
|
+
* Action to be performed when the option is clicked.
|
|
84
|
+
*
|
|
85
|
+
* ```ts
|
|
86
|
+
* action: {
|
|
87
|
+
* type: 'open_form',
|
|
88
|
+
* formSettings: {
|
|
89
|
+
* title: 'Open Form',
|
|
90
|
+
* description: 'Open a form',
|
|
91
|
+
* },
|
|
92
|
+
* },
|
|
93
|
+
* ```
|
|
94
|
+
* ```ts
|
|
95
|
+
* action: {
|
|
96
|
+
* type: 'invoke_message_callback',
|
|
97
|
+
* callback: (args: InvokeMessageCallbackActionArgs) => {
|
|
98
|
+
* console.log(args)
|
|
99
|
+
* },
|
|
100
|
+
* }
|
|
101
|
+
* ```
|
|
102
|
+
* ```ts
|
|
103
|
+
* action: {
|
|
104
|
+
* type: 'open_link',
|
|
105
|
+
* url: 'https://example.com',
|
|
106
|
+
* }
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
action: MessageChatAction;
|
|
110
|
+
}
|
|
111
|
+
export type IkpChatAction = GetHelpOption | CustomMessageAction;
|
|
112
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { InkeepCustomIcon } from '../../icons';
|
|
2
|
+
import { Message } from '../../message';
|
|
3
|
+
export type FieldValues = Record<string, any>;
|
|
4
|
+
export interface AIChatFormSettings {
|
|
5
|
+
heading?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
buttons: AIChatFormButtons;
|
|
8
|
+
fields: FormField[];
|
|
9
|
+
successView?: AIChatFormSuccessView;
|
|
10
|
+
}
|
|
11
|
+
export interface SubmitCallbackArgs {
|
|
12
|
+
values: FieldValues;
|
|
13
|
+
conversation?: {
|
|
14
|
+
id: string;
|
|
15
|
+
messages: Message[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export type SubmitCallback = (values: SubmitCallbackArgs) => Promise<void> | void;
|
|
19
|
+
export type CloseFormAction = 'return_to_chat' | 'close_modal';
|
|
20
|
+
export interface AIChatFormButtons {
|
|
21
|
+
submit: {
|
|
22
|
+
label?: string;
|
|
23
|
+
onSubmit: SubmitCallback;
|
|
24
|
+
};
|
|
25
|
+
close?: {
|
|
26
|
+
action: CloseFormAction;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface AIChatFormDoneButton {
|
|
30
|
+
label: string;
|
|
31
|
+
icon?: InkeepCustomIcon;
|
|
32
|
+
action: CloseFormAction;
|
|
33
|
+
}
|
|
34
|
+
interface AIChatFormSuccessView {
|
|
35
|
+
heading: string;
|
|
36
|
+
message: string;
|
|
37
|
+
doneButton: AIChatFormDoneButton;
|
|
38
|
+
}
|
|
39
|
+
export type FormField = CheckboxField | ComboboxField | FileField | SelectField | TextField | IncludeChatSessionField;
|
|
40
|
+
export type FormInputType = NonNullable<FormField['inputType']>;
|
|
41
|
+
export interface BaseFormField {
|
|
42
|
+
name: string;
|
|
43
|
+
label: string;
|
|
44
|
+
isRequired?: boolean;
|
|
45
|
+
isHidden?: boolean;
|
|
46
|
+
description?: string;
|
|
47
|
+
}
|
|
48
|
+
interface CheckboxField extends BaseFormField {
|
|
49
|
+
inputType: 'checkbox';
|
|
50
|
+
defaultValue?: boolean;
|
|
51
|
+
}
|
|
52
|
+
interface FileField extends BaseFormField {
|
|
53
|
+
inputType: 'file';
|
|
54
|
+
}
|
|
55
|
+
export interface SelectItem {
|
|
56
|
+
label: string;
|
|
57
|
+
value: string;
|
|
58
|
+
}
|
|
59
|
+
interface SelectField extends BaseFormField {
|
|
60
|
+
inputType: 'select';
|
|
61
|
+
items: SelectItem[];
|
|
62
|
+
defaultValue?: string;
|
|
63
|
+
placeholder?: string;
|
|
64
|
+
}
|
|
65
|
+
interface ComboboxField extends BaseFormField {
|
|
66
|
+
inputType: 'combobox';
|
|
67
|
+
items: SelectItem[];
|
|
68
|
+
/** Value is always an array; single selection = array with one value. */
|
|
69
|
+
defaultValue?: string[];
|
|
70
|
+
placeholder?: string;
|
|
71
|
+
multiple?: boolean;
|
|
72
|
+
}
|
|
73
|
+
interface TextField extends BaseFormField {
|
|
74
|
+
inputType: 'email' | 'text' | 'textarea';
|
|
75
|
+
defaultValue?: string;
|
|
76
|
+
placeholder?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface IncludeChatSessionField extends BaseFormField {
|
|
79
|
+
_type: 'include_chat_session';
|
|
80
|
+
inputType?: 'checkbox';
|
|
81
|
+
defaultValue?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Primitive type
|
|
3
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
|
4
|
+
*/
|
|
5
|
+
export type JSONSchemaTypeName = ({} & string) | 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';
|
|
6
|
+
/**
|
|
7
|
+
* Primitive type
|
|
8
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
|
9
|
+
*/
|
|
10
|
+
export type JSONSchemaType = string | number | boolean | JSONSchemaObject | JSONSchemaArray | null;
|
|
11
|
+
export interface JSONSchemaObject {
|
|
12
|
+
[key: string]: JSONSchemaType;
|
|
13
|
+
}
|
|
14
|
+
export interface JSONSchemaArray extends Array<JSONSchemaType> {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Meta schema
|
|
18
|
+
*
|
|
19
|
+
* Recommended values:
|
|
20
|
+
* - 'http://json-schema.org/schema#'
|
|
21
|
+
* - 'http://json-schema.org/hyper-schema#'
|
|
22
|
+
* - 'http://json-schema.org/draft-07/schema#'
|
|
23
|
+
* - 'http://json-schema.org/draft-07/hyper-schema#'
|
|
24
|
+
*
|
|
25
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
|
26
|
+
*/
|
|
27
|
+
export type JSONSchemaVersion = string;
|
|
28
|
+
/**
|
|
29
|
+
* JSON Schema v7
|
|
30
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
|
31
|
+
*/
|
|
32
|
+
export type JSONSchemaDefinition = JSONSchema | boolean;
|
|
33
|
+
export interface JSONSchema {
|
|
34
|
+
$id?: string | undefined;
|
|
35
|
+
$comment?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
|
|
38
|
+
*/
|
|
39
|
+
type?: JSONSchemaTypeName | JSONSchemaTypeName[] | undefined;
|
|
40
|
+
enum?: JSONSchemaType[] | undefined;
|
|
41
|
+
const?: JSONSchemaType | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
|
|
44
|
+
*/
|
|
45
|
+
multipleOf?: number | undefined;
|
|
46
|
+
maximum?: number | undefined;
|
|
47
|
+
exclusiveMaximum?: number | undefined;
|
|
48
|
+
minimum?: number | undefined;
|
|
49
|
+
exclusiveMinimum?: number | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
|
|
52
|
+
*/
|
|
53
|
+
maxLength?: number | undefined;
|
|
54
|
+
minLength?: number | undefined;
|
|
55
|
+
pattern?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
|
|
58
|
+
*/
|
|
59
|
+
items?: JSONSchemaDefinition | JSONSchemaDefinition[] | undefined;
|
|
60
|
+
additionalItems?: JSONSchemaDefinition | undefined;
|
|
61
|
+
maxItems?: number | undefined;
|
|
62
|
+
minItems?: number | undefined;
|
|
63
|
+
uniqueItems?: boolean | undefined;
|
|
64
|
+
contains?: JSONSchemaDefinition | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
|
|
67
|
+
*/
|
|
68
|
+
maxProperties?: number | undefined;
|
|
69
|
+
minProperties?: number | undefined;
|
|
70
|
+
required?: string[] | undefined;
|
|
71
|
+
properties?: {
|
|
72
|
+
[key: string]: JSONSchemaDefinition;
|
|
73
|
+
} | undefined;
|
|
74
|
+
patternProperties?: {
|
|
75
|
+
[key: string]: JSONSchemaDefinition;
|
|
76
|
+
} | undefined;
|
|
77
|
+
additionalProperties?: JSONSchemaDefinition | undefined;
|
|
78
|
+
propertyNames?: JSONSchemaDefinition | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
|
|
81
|
+
*/
|
|
82
|
+
if?: JSONSchemaDefinition | undefined;
|
|
83
|
+
then?: JSONSchemaDefinition | undefined;
|
|
84
|
+
else?: JSONSchemaDefinition | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
|
|
87
|
+
*/
|
|
88
|
+
allOf?: JSONSchemaDefinition[] | undefined;
|
|
89
|
+
anyOf?: JSONSchemaDefinition[] | undefined;
|
|
90
|
+
oneOf?: JSONSchemaDefinition[] | undefined;
|
|
91
|
+
not?: JSONSchemaDefinition | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
|
|
94
|
+
*/
|
|
95
|
+
format?: string | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
|
|
98
|
+
*/
|
|
99
|
+
title?: string | undefined;
|
|
100
|
+
description?: string | undefined;
|
|
101
|
+
default?: JSONSchemaType | undefined;
|
|
102
|
+
readOnly?: boolean | undefined;
|
|
103
|
+
writeOnly?: boolean | undefined;
|
|
104
|
+
examples?: JSONSchemaType | undefined;
|
|
105
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { InkeepCustomIcon } from '../../icons';
|
|
2
|
+
/**
|
|
3
|
+
* Workflow defines the interaction steps for the AI bot.
|
|
4
|
+
*/
|
|
5
|
+
export interface Workflow {
|
|
6
|
+
id: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
goals: string[];
|
|
9
|
+
informationToCollect: WorkflowInformationToCollect[];
|
|
10
|
+
botPersona?: string;
|
|
11
|
+
context?: string[];
|
|
12
|
+
guidance?: string[];
|
|
13
|
+
initialReplyMessage: string;
|
|
14
|
+
supportedInputs?: WorkflowInputTypes[];
|
|
15
|
+
}
|
|
16
|
+
export interface WorkflowInformationToCollect {
|
|
17
|
+
description: string;
|
|
18
|
+
required: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* WorkflowInputTypes represents possible ways of collecting attachments in a Workflow.
|
|
22
|
+
*/
|
|
23
|
+
export type WorkflowInputTypes = WorkflowFunctionalMultiInput | WorkflowModalSingleInput;
|
|
24
|
+
/**
|
|
25
|
+
* WorkflowFunctionalMultiInput represents a function to be called when the attachment is invoked.
|
|
26
|
+
*/
|
|
27
|
+
export interface WorkflowFunctionalMultiInput extends WorkflowBaseInputTypes {
|
|
28
|
+
type: 'FUNCTIONAL_MULTI_ATTACHMENT';
|
|
29
|
+
onInvoke: (workflow: Workflow, selectedInputType: WorkflowInputTypes, callback: (messageAttachments: MessageAttachment[]) => void, currentMessageAttachments: MessageAttachment[]) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* BaseType is a base interface for data types.
|
|
33
|
+
*/
|
|
34
|
+
interface WorkflowBaseContentType {
|
|
35
|
+
type: string;
|
|
36
|
+
contentInputLabel: string;
|
|
37
|
+
attachmentIcon?: InkeepCustomIcon;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* MessageAttachmentContentType represents possible type of information that can be attached to a Workflow.
|
|
41
|
+
*/
|
|
42
|
+
export type MessageAttachmentContentType = WorkflowCodeContentType | WorkflowTextContentType;
|
|
43
|
+
/**
|
|
44
|
+
* WorkflowModalSingleInput represents a modal input type.
|
|
45
|
+
*/
|
|
46
|
+
export interface WorkflowModalSingleInput extends WorkflowBaseInputTypes {
|
|
47
|
+
type: 'MODAL';
|
|
48
|
+
contentType: MessageAttachmentContentType;
|
|
49
|
+
workflowModalProps?: WorkflowModalProps;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* WorkflowInputType defines the type of attachments in a Workflow.
|
|
53
|
+
*/
|
|
54
|
+
export interface WorkflowBaseInputTypes {
|
|
55
|
+
id: string;
|
|
56
|
+
type: string;
|
|
57
|
+
displayName: string;
|
|
58
|
+
}
|
|
59
|
+
export interface WorkflowModalProps {
|
|
60
|
+
titleInputLabel?: string;
|
|
61
|
+
modalHelpText?: string;
|
|
62
|
+
modalHelpElement?: React.ReactElement;
|
|
63
|
+
}
|
|
64
|
+
export interface WorkflowCodeContentType extends WorkflowBaseContentType {
|
|
65
|
+
type: 'CODE';
|
|
66
|
+
language: string;
|
|
67
|
+
}
|
|
68
|
+
export interface WorkflowTextContentType extends WorkflowBaseContentType {
|
|
69
|
+
type: 'text';
|
|
70
|
+
}
|
|
71
|
+
export interface MessageAttachment {
|
|
72
|
+
contentType: MessageAttachmentContentType;
|
|
73
|
+
title: string;
|
|
74
|
+
content: string;
|
|
75
|
+
id: string;
|
|
76
|
+
context?: string[];
|
|
77
|
+
}
|
|
78
|
+
export interface MessageAttributes {
|
|
79
|
+
attachments?: MessageAttachment[];
|
|
80
|
+
workflow?: Workflow;
|
|
81
|
+
}
|
|
82
|
+
export interface MessageMetadata {
|
|
83
|
+
attributes?: MessageAttributes;
|
|
84
|
+
context?: string;
|
|
85
|
+
}
|
|
86
|
+
export {};
|