@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,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState as g, useRef as z, useEffect as x } from "react";
|
|
3
|
+
import { useIsMounted as l } from "./use-is-mounted.js";
|
|
4
|
+
const w = {
|
|
5
|
+
width: void 0,
|
|
6
|
+
height: void 0
|
|
7
|
+
};
|
|
8
|
+
function B(t) {
|
|
9
|
+
const { ref: e, box: i = "content-box" } = t, [{ width: v, height: a }, b] = g(w), s = l(), n = z({ ...w }), r = z(void 0);
|
|
10
|
+
return r.current = t.onResize, x(() => {
|
|
11
|
+
if (!e.current || typeof window > "u" || !("ResizeObserver" in window)) return;
|
|
12
|
+
const u = new ResizeObserver(([d]) => {
|
|
13
|
+
const h = i === "border-box" ? "borderBoxSize" : i === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", o = S(d, h, "inlineSize"), c = S(d, h, "blockSize");
|
|
14
|
+
if (n.current.width !== o || n.current.height !== c) {
|
|
15
|
+
const f = { width: o, height: c };
|
|
16
|
+
n.current.width = o, n.current.height = c, r.current ? r.current(f) : s() && b(f);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return u.observe(e.current, { box: i }), () => {
|
|
20
|
+
u.disconnect();
|
|
21
|
+
};
|
|
22
|
+
}, [i, e, s]), { width: v, height: a };
|
|
23
|
+
}
|
|
24
|
+
function S(t, e, i) {
|
|
25
|
+
return t[e] ? Array.isArray(t[e]) ? t[e][0][i] : (
|
|
26
|
+
// @ts-expect-error: TS doesn't know that box is a key of ResizeObserverEntry
|
|
27
|
+
t[e][i]
|
|
28
|
+
) : e === "contentBoxSize" ? t.contentRect[i === "inlineSize" ? "width" : "height"] : void 0;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
B as useResizeObserver
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react");function n(){const r=o.useRef(null),t=o.useCallback(()=>{const e=r.current;e&&(e.scrollTop===0?e.setAttribute("data-scroll-top",""):e.removeAttribute("data-scroll-top"),e.scrollTop+e.clientHeight>=e.scrollHeight-1?e.setAttribute("data-scroll-bottom",""):e.removeAttribute("data-scroll-bottom"))},[]);return o.useEffect(()=>{const e=r.current;if(e)return t(),e.addEventListener("scroll",t),window.addEventListener("resize",t),()=>{e.removeEventListener("scroll",t),window.removeEventListener("resize",t)}},[t]),r}exports.useScrollingFades=n;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef as o, useCallback as n, useEffect as s } from "react";
|
|
3
|
+
function i() {
|
|
4
|
+
const r = o(null), t = n(() => {
|
|
5
|
+
const e = r.current;
|
|
6
|
+
e && (e.scrollTop === 0 ? e.setAttribute("data-scroll-top", "") : e.removeAttribute("data-scroll-top"), e.scrollTop + e.clientHeight >= e.scrollHeight - 1 ? e.setAttribute("data-scroll-bottom", "") : e.removeAttribute("data-scroll-bottom"));
|
|
7
|
+
}, []);
|
|
8
|
+
return s(() => {
|
|
9
|
+
const e = r.current;
|
|
10
|
+
if (e)
|
|
11
|
+
return t(), e.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
12
|
+
e.removeEventListener("scroll", t), window.removeEventListener("resize", t);
|
|
13
|
+
};
|
|
14
|
+
}, [t]), r;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
i as useScrollingFades
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react");function l(){const[s,e]=t.useState(!1),u=t.useCallback(async()=>(e(!0),setTimeout(()=>{e(!1)},1e3),!0),[]);return[s,u]}exports.useSettleAction=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),R=10;function b(f={}){const{isStreaming:r=!1}=f,o=e.useRef(null),n=e.useRef(!0),l=e.useRef(!1),s=e.useRef(null),u=e.useCallback(()=>{const t=o.current;if(!t)return!0;const{scrollTop:c,scrollHeight:S,clientHeight:m}=t;return S-c-m<=R},[]),i=e.useCallback((t=!0)=>{const c=o.current;c&&(l.current||c.scrollTo({top:c.scrollHeight,behavior:t?"smooth":"auto"}))},[]),a=e.useCallback(()=>{o.current&&(l.current=!0,s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{l.current=!1,r&&u()&&(n.current=!0)},150),r&&!u()&&(n.current=!1))},[r,u]);return e.useEffect(()=>{if(!r){n.current=!0;return}const t=o.current;if(!t)return;const c=new MutationObserver(()=>{n.current&&!l.current&&r&&i(!1)});return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>c.disconnect()},[r,i]),e.useEffect(()=>{r&&(n.current=u())},[r,u]),e.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{containerRef:o,scrollToBottom:i,handleScroll:a,isAtBottom:u,shouldAutoScroll:()=>n.current}}exports.useSimpleScroll=b;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export interface UseSimpleScrollOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Whether streaming is currently active.
|
|
5
|
+
* When true, auto-scroll behavior is enabled.
|
|
6
|
+
*/
|
|
7
|
+
isStreaming?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function useSimpleScroll(options?: UseSimpleScrollOptions): {
|
|
10
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
11
|
+
scrollToBottom: (smooth?: boolean) => void;
|
|
12
|
+
handleScroll: () => void;
|
|
13
|
+
isAtBottom: () => boolean;
|
|
14
|
+
/** Whether auto-scroll is currently active (not hijacked by user) */
|
|
15
|
+
shouldAutoScroll: () => boolean;
|
|
16
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef as l, useCallback as f, useEffect as a } from "react";
|
|
3
|
+
const R = 10;
|
|
4
|
+
function d(m = {}) {
|
|
5
|
+
const { isStreaming: r = !1 } = m, o = l(null), n = l(!0), s = l(!1), u = l(null), c = f(() => {
|
|
6
|
+
const t = o.current;
|
|
7
|
+
if (!t) return !0;
|
|
8
|
+
const { scrollTop: e, scrollHeight: S, clientHeight: T } = t;
|
|
9
|
+
return S - e - T <= R;
|
|
10
|
+
}, []), i = f((t = !0) => {
|
|
11
|
+
const e = o.current;
|
|
12
|
+
e && (s.current || e.scrollTo({
|
|
13
|
+
top: e.scrollHeight,
|
|
14
|
+
behavior: t ? "smooth" : "auto"
|
|
15
|
+
}));
|
|
16
|
+
}, []), h = f(() => {
|
|
17
|
+
o.current && (s.current = !0, u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
18
|
+
s.current = !1, r && c() && (n.current = !0);
|
|
19
|
+
}, 150), r && !c() && (n.current = !1));
|
|
20
|
+
}, [r, c]);
|
|
21
|
+
return a(() => {
|
|
22
|
+
if (!r) {
|
|
23
|
+
n.current = !0;
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const t = o.current;
|
|
27
|
+
if (!t) return;
|
|
28
|
+
const e = new MutationObserver(() => {
|
|
29
|
+
n.current && !s.current && r && i(!1);
|
|
30
|
+
});
|
|
31
|
+
return e.observe(t, {
|
|
32
|
+
childList: !0,
|
|
33
|
+
subtree: !0,
|
|
34
|
+
characterData: !0
|
|
35
|
+
}), () => e.disconnect();
|
|
36
|
+
}, [r, i]), a(() => {
|
|
37
|
+
r && (n.current = c());
|
|
38
|
+
}, [r, c]), a(() => () => {
|
|
39
|
+
u.current && clearTimeout(u.current);
|
|
40
|
+
}, []), {
|
|
41
|
+
containerRef: o,
|
|
42
|
+
scrollToBottom: i,
|
|
43
|
+
handleScroll: h,
|
|
44
|
+
isAtBottom: c,
|
|
45
|
+
/** Whether auto-scroll is currently active (not hijacked by user) */
|
|
46
|
+
shouldAutoScroll: () => n.current
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
d as useSimpleScroll
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),u=require("../atoms/shadow/context.cjs");function i(){const e=u.useShadow()?.shadowHost,s=n.useRef(""),o=n.useCallback(t=>{s.current=t},[]),r=n.useCallback((t,a)=>{if(!e){console.warn("useStreamingEvents: No host element available for parent event emission");return}const c=new CustomEvent(`ikp-${t}`,{detail:{...a,conversationId:s.current,timestamp:Date.now()},bubbles:!0,composed:!0});e.dispatchEvent(c)},[e]);return{setConversationId:o,emitToParent:r}}exports.useStreamingEvents=i;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for emitting streaming events that escape the Shadow DOM
|
|
3
|
+
* Allows parent applications to listen to real-time streaming data
|
|
4
|
+
*/
|
|
5
|
+
export declare function useStreamingEvents(): {
|
|
6
|
+
setConversationId: (id: string) => void;
|
|
7
|
+
emitToParent: (eventName: string, data: Record<string, unknown>) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef as c, useCallback as o } from "react";
|
|
3
|
+
import { useShadow as u } from "../atoms/shadow/context.js";
|
|
4
|
+
function v() {
|
|
5
|
+
const e = u()?.shadowHost, n = c(""), s = o((t) => {
|
|
6
|
+
n.current = t;
|
|
7
|
+
}, []), r = o(
|
|
8
|
+
(t, a) => {
|
|
9
|
+
if (!e) {
|
|
10
|
+
console.warn("useStreamingEvents: No host element available for parent event emission");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const i = new CustomEvent(`ikp-${t}`, {
|
|
14
|
+
detail: {
|
|
15
|
+
...a,
|
|
16
|
+
conversationId: n.current,
|
|
17
|
+
timestamp: Date.now()
|
|
18
|
+
},
|
|
19
|
+
bubbles: !0,
|
|
20
|
+
composed: !0
|
|
21
|
+
});
|
|
22
|
+
e.dispatchEvent(i);
|
|
23
|
+
},
|
|
24
|
+
[e]
|
|
25
|
+
);
|
|
26
|
+
return {
|
|
27
|
+
setConversationId: s,
|
|
28
|
+
emitToParent: r
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
v as useStreamingEvents
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./providers/attachment-item-provider.cjs"),C=require("./providers/attachments-bar-provider.cjs"),h=require("./providers/base-events-provider.cjs"),n=require("./providers/chat-form-provider.cjs"),l=require("./providers/chat-history-provider.cjs"),i=require("./providers/config-provider.cjs"),p=require("./providers/feedback-item-provider.cjs"),v=require("./providers/feedback-provider.cjs"),P=require("./providers/form-field-provider.cjs"),d=require("./providers/help-menu-provider.cjs"),I=require("./providers/markdown-provider.cjs"),S=require("./providers/message-attachments-provider.cjs"),u=require("./providers/message-provider.cjs"),y=require("./providers/root-provider.cjs"),b=require("./providers/source-item-provider.cjs"),F=require("./providers/theme-provider.cjs"),q=require("./providers/widget-provider.cjs"),t=require("./providers/sidebar-chat-provider.cjs"),s=require("./providers/chat-bubble-provider.cjs"),g=require("./components/factory.cjs"),A=require("./components/embedded-chat.cjs"),f=require("./components/sidebar-chat/index.cjs"),M=require("./components/embedded-chat/chat-provider.cjs"),R=require("./components/embedded-search.cjs"),m=require("./components/embedded-search/search-provider.cjs"),w=require("./components/modal.cjs"),B=require("./components/modal/modal-provider.cjs"),H=require("./components/chat-button.cjs"),O=require("./components/searchbar.cjs"),E=require("./components/chat-bubble/index.cjs"),T=require("./components/data-summaries.cjs"),W=require("./components/chat-history/index.cjs"),x=require("./hooks/use-boolean.cjs"),D=require("./hooks/use-component-classnames.cjs"),z=require("./hooks/use-container-size.cjs"),L=require("./hooks/use-inkeep-open-state.cjs"),j=require("./hooks/use-copy-to-clipboard.cjs"),Q=require("./hooks/use-instant-update.cjs"),U=require("./hooks/use-is-mounted.cjs"),$=require("./hooks/use-media-query.cjs"),K=require("./hooks/use-resize-observer.cjs"),N=require("./hooks/use-scrolling-fades.cjs"),G=require("./hooks/use-settle-action.cjs"),J=require("./hooks/use-simple-scroll.cjs"),o=require("./utils/misc.cjs"),e=require("./utils/component-ids.cjs"),k=require("./utils/compose-refs.cjs"),V=require("./utils/merge-props.cjs"),X=require("./atoms/portal.cjs"),Y=require("./atoms/icons/custom-icon.cjs"),Z=require("./atoms/icons/built-in-icon-renderer.cjs"),_=require("./atoms/portal-with-theme.cjs"),r=require("./atoms/cmdk/index.cjs"),ee=require("./atoms/error-boundary.cjs"),a=require("./atoms/shadow/context.cjs");exports.AttachmentItemProvider=c.AttachmentItemProvider;exports.useAttachmentItem=c.useAttachmentItem;exports.AttachmentsBarProvider=C.AttachmentsBarProvider;exports.useAttachmentsBar=C.useAttachmentsBar;exports.BaseEventsProvider=h.BaseEventsProvider;exports.useBaseEvents=h.useBaseEvents;exports.ChatFormProvider=n.ChatFormProvider;exports.useChatForm=n.useChatForm;exports.useChatFormState=n.useChatFormState;exports.ChatHistoryProvider=l.ChatHistoryProvider;exports.useChatHistory=l.useChatHistory;exports.InkeepConfigProvider=i.InkeepConfigProvider;exports.WebWidgetInteractionType=i.WebWidgetInteractionType;exports.useInkeepConfig=i.useInkeepConfig;exports.FeedbackItemProvider=p.FeedbackItemProvider;exports.useFeedbackItem=p.useFeedbackItem;exports.FeedbackProvider=v.FeedbackProvider;exports.useMessageFeedback=v.useMessageFeedback;exports.FormFieldProvider=P.FormFieldProvider;exports.useFormField=P.useFormField;exports.HelpMenuProvider=d.HelpMenuProvider;exports.useHelpMenu=d.useHelpMenu;exports.useHelpMenuState=d.useHelpMenuState;exports.ChatMarkdownProvider=I.ChatMarkdownProvider;exports.useChatMarkdown=I.useChatMarkdown;exports.MessageAttachmentsProvider=S.MessageAttachmentsProvider;exports.useMessageAttachments=S.useMessageAttachments;exports.MessageProvider=u.MessageProvider;exports.useMessage=u.useMessage;exports.useOptionalMessage=u.useOptionalMessage;exports.RootProvider=y.RootProvider;exports.SourceItemProvider=b.SourceItemProvider;exports.useSourceItem=b.useSourceItem;exports.ThemeProvider=F.ThemeProvider;exports.WidgetProvider=q.WidgetProvider;exports.useWidget=q.useWidget;exports.SidebarChatProvider=t.SidebarChatProvider;exports.useInkeepSidebarChat=t.useInkeepSidebarChat;exports.useOptionalSidebarChat=t.useOptionalSidebarChat;exports.useSidebarChat=t.useSidebarChat;exports.ChatBubbleProvider=s.ChatBubbleProvider;exports.useChatBubble=s.useChatBubble;exports.useInkeepChatBubble=s.useInkeepChatBubble;exports.useOptionalChatBubble=s.useOptionalChatBubble;exports.ikp=g.ikp;exports.jsxFactory=g.jsxFactory;exports.EmbeddedChatPrimitive=A;exports.SidebarChatPrimitive=f;exports.ChatProvider=M.ChatProvider;exports.useChat=M.useChat;exports.EmbeddedSearchPrimitive=R;exports.SearchProvider=m.SearchProvider;exports.SearchProviderImpl=m.SearchProviderImpl;exports.useSearch=m.useSearch;exports.ModalPrimitive=w;exports.ModalProvider=B.ModalProvider;exports.useModal=B.useModal;exports.ChatButtonPrimitive=H;exports.SearchBarPrimitive=O;exports.ChatBubblePrimitive=E;exports.DataSummaryPrimitive=T;exports.ChatHistoryPrimitive=W;exports.useBoolean=x.useBoolean;exports.useComponentClassNames=D.useComponentClassNames;exports.useContainerSize=z.useContainerSize;exports.useInkeepOpenState=L.useInkeepOpenState;exports.useCopyToClipboard=j.useCopyToClipboard;exports.useInstantUpdate=Q.useInstantUpdate;exports.useIsMounted=U.useIsMounted;exports.useMediaQuery=$.useMediaQuery;exports.useResizeObserver=K.useResizeObserver;exports.useScrollingFades=N.useScrollingFades;exports.useSettleAction=G.useSettleAction;exports.useSimpleScroll=J.useSimpleScroll;exports.callAll=o.callAll;exports.dataAttr=o.dataAttr;exports.getInitials=o.getInitials;exports.getMessageContent=o.getMessageContent;exports.isString=o.isString;exports.maybeRender=o.maybeRender;exports.toKebabCase=o.toKebabCase;exports.ChatBubbleComponentIds=e.ChatBubbleComponentIds;exports.DataSummaryComponentIds=e.DataSummaryComponentIds;exports.SearchBarComponentIds=e.SearchBarComponentIds;exports.SidebarChatComponentIds=e.SidebarChatComponentIds;exports.aiChatComponentIds=e.aiChatComponentIds;exports.aiChatHistoryComponentIds=e.aiChatHistoryComponentIds;exports.aiSearchComponentIds=e.aiSearchComponentIds;exports.chatButtonComponentIds=e.chatButtonComponentIds;exports.componentIDs=e.componentIDs;exports.markDownComponentIds=e.markDownComponentIds;exports.miscellanousComponentIds=e.miscellanousComponentIds;exports.modalComponentIds=e.modalComponentIds;exports.composeRefs=k.composeRefs;exports.useComposedRefs=k.useComposedRefs;exports.mergeProps=V.mergeProps;exports.Portal=X.Portal;exports.CustomIcon=Y.CustomIcon;exports.BuiltInIconRenderer=Z.BuiltInIconRenderer;exports.PortalWithTheme=_.PortalWithTheme;exports.Command=r.Command;exports.CommandDialog=r.CommandDialog;exports.CommandEmpty=r.CommandEmpty;exports.CommandInput=r.CommandInput;exports.CommandItem=r.CommandItem;exports.CommandList=r.CommandList;exports.CommandLoading=r.CommandLoading;exports.CommandRoot=r.CommandRoot;exports.CommandSeparator=r.CommandSeparator;exports.defaultFilter=r.defaultFilter;exports.useCommandState=r.useCommandState;exports.useCommandStore=r.useCommandStore;exports.ErrorBoundary=ee.ErrorBoundary;exports.InkeepShadow=a.InkeepShadow;exports.InkeepShadowProvider=a.InkeepShadowProvider;exports.ShadowContext=a.ShadowContext;exports.useShadow=a.useShadow;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './providers';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export * from './hooks';
|
|
4
|
+
export * from './utils/misc';
|
|
5
|
+
export * from './utils/component-ids';
|
|
6
|
+
export * from './utils/compose-refs';
|
|
7
|
+
export * from './utils/merge-props';
|
|
8
|
+
export * from './atoms/shadow';
|
|
9
|
+
export * from './atoms/portal';
|
|
10
|
+
export * from './atoms/icons';
|
|
11
|
+
export * from './atoms/portal-with-theme';
|
|
12
|
+
export * from './atoms/cmdk';
|
|
13
|
+
export * from './atoms/error-boundary';
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { AttachmentItemProvider as u, useAttachmentItem as C } from "./providers/attachment-item-provider.js";
|
|
2
|
+
import { AttachmentsBarProvider as x, useAttachmentsBar as h } from "./providers/attachments-bar-provider.js";
|
|
3
|
+
import { BaseEventsProvider as v, useBaseEvents as P } from "./providers/base-events-provider.js";
|
|
4
|
+
import { ChatFormProvider as S, useChatForm as c, useChatFormState as b } from "./providers/chat-form-provider.js";
|
|
5
|
+
import { ChatHistoryProvider as B, useChatHistory as M } from "./providers/chat-history-provider.js";
|
|
6
|
+
import { InkeepConfigProvider as F, WebWidgetInteractionType as y, useInkeepConfig as A } from "./providers/config-provider.js";
|
|
7
|
+
import { FeedbackItemProvider as H, useFeedbackItem as R } from "./providers/feedback-item-provider.js";
|
|
8
|
+
import { FeedbackProvider as D, useMessageFeedback as O } from "./providers/feedback-provider.js";
|
|
9
|
+
import { FormFieldProvider as T, useFormField as z } from "./providers/form-field-provider.js";
|
|
10
|
+
import { HelpMenuProvider as $, useHelpMenu as j, useHelpMenuState as K } from "./providers/help-menu-provider.js";
|
|
11
|
+
import { ChatMarkdownProvider as Q, useChatMarkdown as U } from "./providers/markdown-provider.js";
|
|
12
|
+
import { MessageAttachmentsProvider as G, useMessageAttachments as J } from "./providers/message-attachments-provider.js";
|
|
13
|
+
import { MessageProvider as X, useMessage as Y, useOptionalMessage as Z } from "./providers/message-provider.js";
|
|
14
|
+
import { RootProvider as ee } from "./providers/root-provider.js";
|
|
15
|
+
import { SourceItemProvider as re, useSourceItem as te } from "./providers/source-item-provider.js";
|
|
16
|
+
import { ThemeProvider as me } from "./providers/theme-provider.js";
|
|
17
|
+
import { WidgetProvider as ie, useWidget as pe } from "./providers/widget-provider.js";
|
|
18
|
+
import { SidebarChatProvider as ne, useInkeepSidebarChat as ue, useOptionalSidebarChat as Ce, useSidebarChat as fe } from "./providers/sidebar-chat-provider.js";
|
|
19
|
+
import { ChatBubbleProvider as he, useChatBubble as le, useInkeepChatBubble as ve, useOptionalChatBubble as Pe } from "./providers/chat-bubble-provider.js";
|
|
20
|
+
import { ikp as Se, jsxFactory as ce } from "./components/factory.js";
|
|
21
|
+
import * as e from "./components/embedded-chat.js";
|
|
22
|
+
import * as o from "./components/sidebar-chat/index.js";
|
|
23
|
+
import { ChatProvider as ge, useChat as Be } from "./components/embedded-chat/chat-provider.js";
|
|
24
|
+
import * as r from "./components/embedded-search.js";
|
|
25
|
+
import { SearchProvider as ke, SearchProviderImpl as Fe, useSearch as ye } from "./components/embedded-search/search-provider.js";
|
|
26
|
+
import * as t from "./components/modal.js";
|
|
27
|
+
import { ModalProvider as we, useModal as He } from "./components/modal/modal-provider.js";
|
|
28
|
+
import * as a from "./components/chat-button.js";
|
|
29
|
+
import * as m from "./components/searchbar.js";
|
|
30
|
+
import * as s from "./components/chat-bubble/index.js";
|
|
31
|
+
import * as i from "./components/data-summaries.js";
|
|
32
|
+
import * as p from "./components/chat-history/index.js";
|
|
33
|
+
import { useBoolean as Ee } from "./hooks/use-boolean.js";
|
|
34
|
+
import { useComponentClassNames as Oe } from "./hooks/use-component-classnames.js";
|
|
35
|
+
import { useContainerSize as Te } from "./hooks/use-container-size.js";
|
|
36
|
+
import { useInkeepOpenState as Le } from "./hooks/use-inkeep-open-state.js";
|
|
37
|
+
import { useCopyToClipboard as je } from "./hooks/use-copy-to-clipboard.js";
|
|
38
|
+
import { useInstantUpdate as Ne } from "./hooks/use-instant-update.js";
|
|
39
|
+
import { useIsMounted as Ue } from "./hooks/use-is-mounted.js";
|
|
40
|
+
import { useMediaQuery as Ge } from "./hooks/use-media-query.js";
|
|
41
|
+
import { useResizeObserver as Ve } from "./hooks/use-resize-observer.js";
|
|
42
|
+
import { useScrollingFades as Ye } from "./hooks/use-scrolling-fades.js";
|
|
43
|
+
import { useSettleAction as _e } from "./hooks/use-settle-action.js";
|
|
44
|
+
import { useSimpleScroll as oo } from "./hooks/use-simple-scroll.js";
|
|
45
|
+
import { callAll as to, dataAttr as ao, getInitials as mo, getMessageContent as so, isString as io, maybeRender as po, toKebabCase as no } from "./utils/misc.js";
|
|
46
|
+
import { ChatBubbleComponentIds as Co, DataSummaryComponentIds as fo, SearchBarComponentIds as xo, SidebarChatComponentIds as ho, aiChatComponentIds as lo, aiChatHistoryComponentIds as vo, aiSearchComponentIds as Po, chatButtonComponentIds as Io, componentIDs as So, markDownComponentIds as co, miscellanousComponentIds as bo, modalComponentIds as go } from "./utils/component-ids.js";
|
|
47
|
+
import { composeRefs as Mo, useComposedRefs as ko } from "./utils/compose-refs.js";
|
|
48
|
+
import { mergeProps as yo } from "./utils/merge-props.js";
|
|
49
|
+
import { Portal as wo } from "./atoms/portal.js";
|
|
50
|
+
import { CustomIcon as Ro } from "./atoms/icons/custom-icon.js";
|
|
51
|
+
import { BuiltInIconRenderer as Do } from "./atoms/icons/built-in-icon-renderer.js";
|
|
52
|
+
import { PortalWithTheme as Wo } from "./atoms/portal-with-theme.js";
|
|
53
|
+
import { Command as zo, CommandDialog as Lo, CommandEmpty as $o, CommandInput as jo, CommandItem as Ko, CommandList as No, CommandLoading as Qo, CommandRoot as Uo, CommandSeparator as qo, defaultFilter as Go, useCommandState as Jo, useCommandStore as Vo } from "./atoms/cmdk/index.js";
|
|
54
|
+
import { ErrorBoundary as Yo } from "./atoms/error-boundary.js";
|
|
55
|
+
import { InkeepShadow as _o, InkeepShadowProvider as er, ShadowContext as or, useShadow as rr } from "./atoms/shadow/context.js";
|
|
56
|
+
export {
|
|
57
|
+
u as AttachmentItemProvider,
|
|
58
|
+
x as AttachmentsBarProvider,
|
|
59
|
+
v as BaseEventsProvider,
|
|
60
|
+
Do as BuiltInIconRenderer,
|
|
61
|
+
Co as ChatBubbleComponentIds,
|
|
62
|
+
s as ChatBubblePrimitive,
|
|
63
|
+
he as ChatBubbleProvider,
|
|
64
|
+
a as ChatButtonPrimitive,
|
|
65
|
+
S as ChatFormProvider,
|
|
66
|
+
p as ChatHistoryPrimitive,
|
|
67
|
+
B as ChatHistoryProvider,
|
|
68
|
+
Q as ChatMarkdownProvider,
|
|
69
|
+
ge as ChatProvider,
|
|
70
|
+
zo as Command,
|
|
71
|
+
Lo as CommandDialog,
|
|
72
|
+
$o as CommandEmpty,
|
|
73
|
+
jo as CommandInput,
|
|
74
|
+
Ko as CommandItem,
|
|
75
|
+
No as CommandList,
|
|
76
|
+
Qo as CommandLoading,
|
|
77
|
+
Uo as CommandRoot,
|
|
78
|
+
qo as CommandSeparator,
|
|
79
|
+
Ro as CustomIcon,
|
|
80
|
+
fo as DataSummaryComponentIds,
|
|
81
|
+
i as DataSummaryPrimitive,
|
|
82
|
+
e as EmbeddedChatPrimitive,
|
|
83
|
+
r as EmbeddedSearchPrimitive,
|
|
84
|
+
Yo as ErrorBoundary,
|
|
85
|
+
H as FeedbackItemProvider,
|
|
86
|
+
D as FeedbackProvider,
|
|
87
|
+
T as FormFieldProvider,
|
|
88
|
+
$ as HelpMenuProvider,
|
|
89
|
+
F as InkeepConfigProvider,
|
|
90
|
+
_o as InkeepShadow,
|
|
91
|
+
er as InkeepShadowProvider,
|
|
92
|
+
G as MessageAttachmentsProvider,
|
|
93
|
+
X as MessageProvider,
|
|
94
|
+
t as ModalPrimitive,
|
|
95
|
+
we as ModalProvider,
|
|
96
|
+
wo as Portal,
|
|
97
|
+
Wo as PortalWithTheme,
|
|
98
|
+
ee as RootProvider,
|
|
99
|
+
xo as SearchBarComponentIds,
|
|
100
|
+
m as SearchBarPrimitive,
|
|
101
|
+
ke as SearchProvider,
|
|
102
|
+
Fe as SearchProviderImpl,
|
|
103
|
+
or as ShadowContext,
|
|
104
|
+
ho as SidebarChatComponentIds,
|
|
105
|
+
o as SidebarChatPrimitive,
|
|
106
|
+
ne as SidebarChatProvider,
|
|
107
|
+
re as SourceItemProvider,
|
|
108
|
+
me as ThemeProvider,
|
|
109
|
+
y as WebWidgetInteractionType,
|
|
110
|
+
ie as WidgetProvider,
|
|
111
|
+
lo as aiChatComponentIds,
|
|
112
|
+
vo as aiChatHistoryComponentIds,
|
|
113
|
+
Po as aiSearchComponentIds,
|
|
114
|
+
to as callAll,
|
|
115
|
+
Io as chatButtonComponentIds,
|
|
116
|
+
So as componentIDs,
|
|
117
|
+
Mo as composeRefs,
|
|
118
|
+
ao as dataAttr,
|
|
119
|
+
Go as defaultFilter,
|
|
120
|
+
mo as getInitials,
|
|
121
|
+
so as getMessageContent,
|
|
122
|
+
Se as ikp,
|
|
123
|
+
io as isString,
|
|
124
|
+
ce as jsxFactory,
|
|
125
|
+
co as markDownComponentIds,
|
|
126
|
+
po as maybeRender,
|
|
127
|
+
yo as mergeProps,
|
|
128
|
+
bo as miscellanousComponentIds,
|
|
129
|
+
go as modalComponentIds,
|
|
130
|
+
no as toKebabCase,
|
|
131
|
+
C as useAttachmentItem,
|
|
132
|
+
h as useAttachmentsBar,
|
|
133
|
+
P as useBaseEvents,
|
|
134
|
+
Ee as useBoolean,
|
|
135
|
+
Be as useChat,
|
|
136
|
+
le as useChatBubble,
|
|
137
|
+
c as useChatForm,
|
|
138
|
+
b as useChatFormState,
|
|
139
|
+
M as useChatHistory,
|
|
140
|
+
U as useChatMarkdown,
|
|
141
|
+
Jo as useCommandState,
|
|
142
|
+
Vo as useCommandStore,
|
|
143
|
+
Oe as useComponentClassNames,
|
|
144
|
+
ko as useComposedRefs,
|
|
145
|
+
Te as useContainerSize,
|
|
146
|
+
je as useCopyToClipboard,
|
|
147
|
+
R as useFeedbackItem,
|
|
148
|
+
z as useFormField,
|
|
149
|
+
j as useHelpMenu,
|
|
150
|
+
K as useHelpMenuState,
|
|
151
|
+
ve as useInkeepChatBubble,
|
|
152
|
+
A as useInkeepConfig,
|
|
153
|
+
Le as useInkeepOpenState,
|
|
154
|
+
ue as useInkeepSidebarChat,
|
|
155
|
+
Ne as useInstantUpdate,
|
|
156
|
+
Ue as useIsMounted,
|
|
157
|
+
Ge as useMediaQuery,
|
|
158
|
+
Y as useMessage,
|
|
159
|
+
J as useMessageAttachments,
|
|
160
|
+
O as useMessageFeedback,
|
|
161
|
+
He as useModal,
|
|
162
|
+
Pe as useOptionalChatBubble,
|
|
163
|
+
Z as useOptionalMessage,
|
|
164
|
+
Ce as useOptionalSidebarChat,
|
|
165
|
+
Ve as useResizeObserver,
|
|
166
|
+
Ye as useScrollingFades,
|
|
167
|
+
ye as useSearch,
|
|
168
|
+
_e as useSettleAction,
|
|
169
|
+
rr as useShadow,
|
|
170
|
+
fe as useSidebarChat,
|
|
171
|
+
oo as useSimpleScroll,
|
|
172
|
+
te as useSourceItem,
|
|
173
|
+
pe as useWidget
|
|
174
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),e=require("react"),n=e.createContext(void 0),c=({children:t,attachment:r})=>o.jsx(n.Provider,{value:{attachment:r},children:t}),m=()=>{const t=e.useContext(n);if(!t)throw new Error("useAttachmentItem must be used within a AttachmentItemProvider");return t};exports.AttachmentItemProvider=c;exports.useAttachmentItem=m;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MessageAttachment } from '../../types/index.ts';
|
|
2
|
+
export type AttachmentItemContextValue = {
|
|
3
|
+
attachment: MessageAttachment;
|
|
4
|
+
};
|
|
5
|
+
export declare const AttachmentItemProvider: React.FC<{
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
attachment: MessageAttachment;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const useAttachmentItem: () => AttachmentItemContextValue;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as n, useContext as m } from "react";
|
|
4
|
+
const e = n(void 0), i = ({ children: t, attachment: r }) => /* @__PURE__ */ o(e.Provider, { value: { attachment: r }, children: t }), u = () => {
|
|
5
|
+
const t = m(e);
|
|
6
|
+
if (!t)
|
|
7
|
+
throw new Error("useAttachmentItem must be used within a AttachmentItemProvider");
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
i as AttachmentItemProvider,
|
|
12
|
+
u as useAttachmentItem
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),n=require("react"),b=require("../hooks/use-boolean.cjs"),d=n.createContext(void 0);function B(){const[t,s]=n.useState(null),{value:m,setTrue:v,setFalse:c}=b.useBoolean(!1),[a,u]=n.useState({title:"",content:""}),[f,l]=n.useState({title:void 0,content:void 0}),o={data:a,errors:f,labels:{title:t?.workflowModalProps?.titleInputLabel||"Title",content:t?.contentType.contentInputLabel||"Content"},validate(){const e={};return a.title.trim()||(e.title=`${o.labels.title} is required`),a.content.trim()||(e.content=`${o.labels.content} is required`),e},onChange(e){const{name:r,value:i}=e.target;u(h=>({...h,[r]:i}))},onSubmit(e){if(e.preventDefault(),!t?.contentType)return;const r=o.validate();if(Object.values(r).some(i=>!!i)){l(r);return}c(),u({title:"",content:""}),l({title:void 0,content:void 0})}};return{selectedInput:t,selectInput:s,isOpen:m,onOpen:v,onClose:c,form:o}}function A({children:t}){const s=B();return p.jsx(d.Provider,{value:s,children:t})}const w=()=>{const t=n.useContext(d);if(!t)throw new Error("useAttachmentsBar must be used within a AttachmentsBarProvider");return t};exports.AttachmentsBarProvider=A;exports.useAttachmentsBar=w;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { WorkflowModalSingleInput } from '../../types/index.ts';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
export type AttachmentsBarContextValue = ReturnType<typeof useChatAttachmentsBar>;
|
|
4
|
+
type FormErrors = Record<'title' | 'content', string | undefined>;
|
|
5
|
+
declare function useChatAttachmentsBar(): {
|
|
6
|
+
selectedInput: WorkflowModalSingleInput | null;
|
|
7
|
+
selectInput: Dispatch<SetStateAction<WorkflowModalSingleInput | null>>;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onOpen: () => void;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
form: {
|
|
12
|
+
data: {
|
|
13
|
+
title: string;
|
|
14
|
+
content: string;
|
|
15
|
+
};
|
|
16
|
+
errors: FormErrors;
|
|
17
|
+
labels: {
|
|
18
|
+
title: string;
|
|
19
|
+
content: string;
|
|
20
|
+
};
|
|
21
|
+
validate(): FormErrors;
|
|
22
|
+
onChange(event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>): void;
|
|
23
|
+
onSubmit(e: React.FormEvent<HTMLFormElement>): void;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare function AttachmentsBarProvider({ children }: {
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const useAttachmentsBar: () => AttachmentsBarContextValue;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as b, useContext as w, useState as i } from "react";
|
|
4
|
+
import { useBoolean as B } from "../hooks/use-boolean.js";
|
|
5
|
+
const m = b(void 0);
|
|
6
|
+
function C() {
|
|
7
|
+
const [t, r] = i(null), { value: d, setTrue: f, setFalse: c } = B(!1), [s, l] = i({ title: "", content: "" }), [v, u] = i({
|
|
8
|
+
title: void 0,
|
|
9
|
+
content: void 0
|
|
10
|
+
}), n = {
|
|
11
|
+
data: s,
|
|
12
|
+
errors: v,
|
|
13
|
+
labels: {
|
|
14
|
+
title: t?.workflowModalProps?.titleInputLabel || "Title",
|
|
15
|
+
content: t?.contentType.contentInputLabel || "Content"
|
|
16
|
+
},
|
|
17
|
+
validate() {
|
|
18
|
+
const e = {};
|
|
19
|
+
return s.title.trim() || (e.title = `${n.labels.title} is required`), s.content.trim() || (e.content = `${n.labels.content} is required`), e;
|
|
20
|
+
},
|
|
21
|
+
onChange(e) {
|
|
22
|
+
const { name: o, value: a } = e.target;
|
|
23
|
+
l((p) => ({ ...p, [o]: a }));
|
|
24
|
+
},
|
|
25
|
+
onSubmit(e) {
|
|
26
|
+
if (e.preventDefault(), !t?.contentType) return;
|
|
27
|
+
const o = n.validate();
|
|
28
|
+
if (Object.values(o).some((a) => !!a)) {
|
|
29
|
+
u(o);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
c(), l({ title: "", content: "" }), u({ title: void 0, content: void 0 });
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
selectedInput: t,
|
|
37
|
+
selectInput: r,
|
|
38
|
+
isOpen: d,
|
|
39
|
+
onOpen: f,
|
|
40
|
+
onClose: c,
|
|
41
|
+
form: n
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function I({ children: t }) {
|
|
45
|
+
const r = C();
|
|
46
|
+
return /* @__PURE__ */ h(m.Provider, { value: r, children: t });
|
|
47
|
+
}
|
|
48
|
+
const P = () => {
|
|
49
|
+
const t = w(m);
|
|
50
|
+
if (!t)
|
|
51
|
+
throw new Error("useAttachmentsBar must be used within a AttachmentsBarProvider");
|
|
52
|
+
return t;
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
I as AttachmentsBarProvider,
|
|
56
|
+
P as useAttachmentsBar
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),t=require("react"),l=require("./config-provider.cjs"),a=t.createContext(void 0),p=({children:e})=>{const{baseSettings:s,componentType:n}=l.useInkeepConfig(),{tags:o,analyticsProperties:r}=s,i=t.useMemo(()=>({widgetLibraryVersion:"0.15.16",componentType:n,tags:o}),[n,o]),u={logEvent:t.useCallback(async c=>{const v={...i,...c.properties,...r},d={eventName:c.eventName,properties:v};return s.onEvent?.(d)},[s,i,r])};return E.jsx(a.Provider,{value:u,children:e})},g=()=>{const e=t.useContext(a);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=p;exports.useBaseEvents=g;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InkeepEvent } from '../../types/index.ts';
|
|
2
|
+
export type BaseEventsContextValue = {
|
|
3
|
+
logEvent: (event: InkeepEvent) => Promise<void>;
|
|
4
|
+
};
|
|
5
|
+
export declare const BaseEventsProvider: React.FC<{
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const useBaseEvents: () => BaseEventsContextValue;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as u, useCallback as E, createContext as d, useContext as l } from "react";
|
|
4
|
+
import { useInkeepConfig as g } from "./config-provider.js";
|
|
5
|
+
const a = d(void 0), P = ({ children: e }) => {
|
|
6
|
+
const { baseSettings: t, componentType: o } = g(), { tags: s, analyticsProperties: n } = t, r = u(
|
|
7
|
+
() => ({
|
|
8
|
+
widgetLibraryVersion: "0.15.16",
|
|
9
|
+
componentType: o,
|
|
10
|
+
tags: s
|
|
11
|
+
}),
|
|
12
|
+
[o, s]
|
|
13
|
+
), c = { logEvent: E(
|
|
14
|
+
async (i) => {
|
|
15
|
+
const v = {
|
|
16
|
+
...r,
|
|
17
|
+
...i.properties,
|
|
18
|
+
...n
|
|
19
|
+
}, m = {
|
|
20
|
+
eventName: i.eventName,
|
|
21
|
+
properties: v
|
|
22
|
+
};
|
|
23
|
+
return t.onEvent?.(m);
|
|
24
|
+
},
|
|
25
|
+
[t, r, n]
|
|
26
|
+
) };
|
|
27
|
+
return /* @__PURE__ */ p(a.Provider, { value: c, children: e });
|
|
28
|
+
}, b = () => {
|
|
29
|
+
const e = l(a);
|
|
30
|
+
if (!e)
|
|
31
|
+
throw new Error("useBaseEvents must be used within a BaseEventsProvider");
|
|
32
|
+
return e;
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
P as BaseEventsProvider,
|
|
36
|
+
b as useBaseEvents
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("react"),o=require("../hooks/use-inkeep-open-state.cjs"),u=t.createContext(void 0),b=({children:e,value:n})=>r.jsx(u.Provider,{value:n,children:e}),s=()=>{const e=t.useContext(u);if(!e)throw new Error("useChatBubble must be used within a ChatBubbleProvider");return e},a=()=>t.useContext(u),c=e=>o.useInkeepOpenState(e,{eventNamePrefix:"chat_bubble"});exports.ChatBubbleProvider=b;exports.useChatBubble=s;exports.useInkeepChatBubble=c;exports.useOptionalChatBubble=a;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OpenSettingsChatButton } from '../../types/index.ts';
|
|
2
|
+
import { SetStateAction } from 'react';
|
|
3
|
+
export type ChatBubbleContextValue = ReturnType<typeof useInkeepChatBubble>;
|
|
4
|
+
export declare const ChatBubbleProvider: React.FC<{
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
value: ChatBubbleContextValue;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const useChatBubble: () => {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
setOpen: (value: SetStateAction<boolean>) => void;
|
|
11
|
+
shortcutKey: string | null | undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare const useOptionalChatBubble: () => {
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
setOpen: (value: SetStateAction<boolean>) => void;
|
|
16
|
+
shortcutKey: string | null | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
export declare const useInkeepChatBubble: (props: OpenSettingsChatButton) => {
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
setOpen: (value: SetStateAction<boolean>) => void;
|
|
21
|
+
shortcutKey: string | null | undefined;
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as u, useContext as o } from "react";
|
|
4
|
+
import { useInkeepOpenState as b } from "../hooks/use-inkeep-open-state.js";
|
|
5
|
+
const t = u(void 0), i = ({ children: e, value: r }) => /* @__PURE__ */ n(t.Provider, { value: r, children: e }), h = () => {
|
|
6
|
+
const e = o(t);
|
|
7
|
+
if (!e)
|
|
8
|
+
throw new Error("useChatBubble must be used within a ChatBubbleProvider");
|
|
9
|
+
return e;
|
|
10
|
+
}, l = () => o(t), C = (e) => b(e, {
|
|
11
|
+
eventNamePrefix: "chat_bubble"
|
|
12
|
+
// No default trigger selector - chat buttons typically don't use click triggers
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
i as ChatBubbleProvider,
|
|
16
|
+
h as useChatBubble,
|
|
17
|
+
C as useInkeepChatBubble,
|
|
18
|
+
l as useOptionalChatBubble
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react/jsx-runtime"),s=require("react"),H=require("react-hook-form"),M=require("../components/modal/modal-provider.cjs"),I=require("../utils/form.cjs"),T=require("./base-events-provider.cjs"),j="root.serverError",E=s.createContext(void 0);function _(){const[e,u]=s.useState(null),[c,d]=s.useState(null),[y,f]=s.useState(!1),p=M.useModal(),{logEvent:b}=T.useBaseEvents(),w=s.useCallback((o,t)=>{u(o),d(t||null)},[]),l=s.useCallback(()=>{u(null),d(null),f(!1),e?.buttons.close?.action==="close_modal"&&p?.setOpen(!1)},[e?.buttons.close?.action,p]),r=s.useCallback(o=>e?.fields.map(t=>{if("_type"in t&&t._type==="include_chat_session"){const{_type:R,...i}=t;return{...i,inputType:"checkbox",isHidden:!o,defaultValue:i.defaultValue??!1}}return t}).filter(t=>!("_type"in t))||[],[e?.fields]),h=s.useMemo(()=>r(),[r]),n=s.useMemo(()=>I.getFormDefaultValues(h),[h]),{control:k,handleSubmit:C,formState:{errors:S,isSubmitting:x},setError:g,reset:v}=H.useForm({defaultValues:n});s.useEffect(()=>{n&&v(n)},[v,n]);const F=s.useCallback(o=>async t=>{const i=r(o?.id).find(a=>a.name&&e?.fields.some(m=>"_type"in m&&m._type==="include_chat_session"&&m.name===a.name)),V=o?.id&&i&&t[i.name];try{await e?.buttons.submit.onSubmit({values:t,conversation:V?o:void 0}),c&&b({eventName:"user_escalation_indicated",properties:{escalationType:"support_form",getHelpOptionName:c.name,conversationId:o?.id}}),f(!0),e?.successView||l()}catch(a){g(j,{message:a instanceof Error?a.message:"Something went wrong."})}},[r,e?.fields,e?.buttons.submit,e?.successView,c,b,g,l]),O=s.useCallback((o,t)=>C(F(t))(o),[C,F]),P=S?.root?.serverError;return{form:e,openForm:w,closeForm:l,handleSubmit:O,isSuccess:y,isSubmitting:x,formError:P,getFields:r,errors:S,control:k,defaultValues:n}}const N=({children:e})=>{const u=_();return q.jsx(E.Provider,{value:u,children:e})},G=()=>{const e=s.useContext(E);if(!e)throw new Error("useChatForm must be used within a ChatFormProvider");return e};exports.ChatFormProvider=N;exports.useChatForm=G;exports.useChatFormState=_;
|