@inkeep/cxkit-primitives 0.0.0-dev-20250221234142
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 +21 -0
- package/README.md +1 -0
- package/dist/atoms/api/analytics/conversation.cjs +1 -0
- package/dist/atoms/api/analytics/conversation.d.cts +3 -0
- package/dist/atoms/api/analytics/conversation.d.ts +3 -0
- package/dist/atoms/api/analytics/conversation.js +37 -0
- package/dist/atoms/api/analytics/events.cjs +1 -0
- package/dist/atoms/api/analytics/events.d.cts +2 -0
- package/dist/atoms/api/analytics/events.d.ts +2 -0
- package/dist/atoms/api/analytics/events.js +30 -0
- package/dist/atoms/api/analytics/feedback.cjs +1 -0
- package/dist/atoms/api/analytics/feedback.d.cts +11 -0
- package/dist/atoms/api/analytics/feedback.d.ts +11 -0
- package/dist/atoms/api/analytics/feedback.js +26 -0
- package/dist/atoms/avatars/ai.cjs +1 -0
- package/dist/atoms/avatars/ai.d.cts +3 -0
- package/dist/atoms/avatars/ai.d.ts +3 -0
- package/dist/atoms/avatars/ai.js +88 -0
- package/dist/atoms/avatars/user.cjs +1 -0
- package/dist/atoms/avatars/user.d.cts +3 -0
- package/dist/atoms/avatars/user.d.ts +3 -0
- package/dist/atoms/avatars/user.js +27 -0
- package/dist/atoms/codeblock/index.cjs +1 -0
- package/dist/atoms/codeblock/index.d.cts +10 -0
- package/dist/atoms/codeblock/index.d.ts +10 -0
- package/dist/atoms/codeblock/index.js +40 -0
- package/dist/atoms/custom-styles.cjs +1 -0
- package/dist/atoms/custom-styles.d.cts +5 -0
- package/dist/atoms/custom-styles.d.ts +5 -0
- package/dist/atoms/custom-styles.js +57 -0
- package/dist/atoms/dialog.cjs +1 -0
- package/dist/atoms/dialog.d.cts +68 -0
- package/dist/atoms/dialog.d.ts +68 -0
- package/dist/atoms/dialog.js +185 -0
- package/dist/atoms/icons/built-in-icon-renderer.cjs +1 -0
- package/dist/atoms/icons/built-in-icon-renderer.d.cts +6 -0
- package/dist/atoms/icons/built-in-icon-renderer.d.ts +6 -0
- package/dist/atoms/icons/built-in-icon-renderer.js +49 -0
- package/dist/atoms/icons/built-in-icons.cjs +1 -0
- package/dist/atoms/icons/built-in-icons.d.cts +72 -0
- package/dist/atoms/icons/built-in-icons.d.ts +72 -0
- package/dist/atoms/icons/built-in-icons.js +79 -0
- package/dist/atoms/icons/checkbox-icon.cjs +1 -0
- package/dist/atoms/icons/checkbox-icon.d.cts +1 -0
- package/dist/atoms/icons/checkbox-icon.d.ts +1 -0
- package/dist/atoms/icons/checkbox-icon.js +24 -0
- package/dist/atoms/icons/custom-icon.cjs +1 -0
- package/dist/atoms/icons/custom-icon.d.cts +6 -0
- package/dist/atoms/icons/custom-icon.d.ts +6 -0
- package/dist/atoms/icons/custom-icon.js +19 -0
- package/dist/atoms/icons/index.cjs +1 -0
- package/dist/atoms/icons/index.d.cts +2 -0
- package/dist/atoms/icons/index.d.ts +2 -0
- package/dist/atoms/icons/index.js +6 -0
- package/dist/atoms/icons/inkeep-default-icons.cjs +1 -0
- package/dist/atoms/icons/inkeep-default-icons.d.cts +2 -0
- package/dist/atoms/icons/inkeep-default-icons.d.ts +2 -0
- package/dist/atoms/icons/inkeep-default-icons.js +23 -0
- package/dist/atoms/link.cjs +1 -0
- package/dist/atoms/link.d.cts +14 -0
- package/dist/atoms/link.d.ts +14 -0
- package/dist/atoms/link.js +35 -0
- package/dist/atoms/markdown/components.cjs +1 -0
- package/dist/atoms/markdown/components.d.cts +27 -0
- package/dist/atoms/markdown/components.d.ts +27 -0
- package/dist/atoms/markdown/components.js +64 -0
- package/dist/atoms/markdown/index.cjs +1 -0
- package/dist/atoms/markdown/index.d.cts +15 -0
- package/dist/atoms/markdown/index.d.ts +15 -0
- package/dist/atoms/markdown/index.js +79 -0
- package/dist/atoms/markdown/rehype-inline-code-property.cjs +1 -0
- package/dist/atoms/markdown/rehype-inline-code-property.d.cts +1 -0
- package/dist/atoms/markdown/rehype-inline-code-property.d.ts +1 -0
- package/dist/atoms/markdown/rehype-inline-code-property.js +12 -0
- package/dist/atoms/portal-with-theme.cjs +1 -0
- package/dist/atoms/portal-with-theme.d.cts +2 -0
- package/dist/atoms/portal-with-theme.d.ts +2 -0
- package/dist/atoms/portal-with-theme.js +12 -0
- package/dist/atoms/portal.cjs +1 -0
- package/dist/atoms/portal.d.cts +8 -0
- package/dist/atoms/portal.d.ts +8 -0
- package/dist/atoms/portal.js +19 -0
- package/dist/atoms/shadow/context.cjs +2 -0
- package/dist/atoms/shadow/context.d.cts +14 -0
- package/dist/atoms/shadow/context.d.ts +14 -0
- package/dist/atoms/shadow/context.js +55 -0
- package/dist/atoms/shadow/create.cjs +1 -0
- package/dist/atoms/shadow/create.d.cts +8 -0
- package/dist/atoms/shadow/create.d.ts +8 -0
- package/dist/atoms/shadow/create.js +56 -0
- package/dist/atoms/shadow/index.d.cts +1 -0
- package/dist/atoms/shadow/index.d.ts +1 -0
- package/dist/atoms/shadow/root.cjs +1 -0
- package/dist/atoms/shadow/root.d.cts +5 -0
- package/dist/atoms/shadow/root.d.ts +5 -0
- package/dist/atoms/shadow/root.js +22 -0
- package/dist/atoms/shadow/use-ensured-forwarded-ref.cjs +1 -0
- package/dist/atoms/shadow/use-ensured-forwarded-ref.d.cts +2 -0
- package/dist/atoms/shadow/use-ensured-forwarded-ref.d.ts +2 -0
- package/dist/atoms/shadow/use-ensured-forwarded-ref.js +11 -0
- package/dist/atoms/shadow/utils.cjs +1 -0
- package/dist/atoms/shadow/utils.d.cts +9 -0
- package/dist/atoms/shadow/utils.d.ts +9 -0
- package/dist/atoms/shadow/utils.js +16 -0
- package/dist/components/chat-button.cjs +1 -0
- package/dist/components/chat-button.d.cts +11 -0
- package/dist/components/chat-button.d.ts +11 -0
- package/dist/components/chat-button.js +42 -0
- package/dist/components/embedded-chat/chat-provider.cjs +1 -0
- package/dist/components/embedded-chat/chat-provider.d.cts +19 -0
- package/dist/components/embedded-chat/chat-provider.d.ts +19 -0
- package/dist/components/embedded-chat/chat-provider.js +22 -0
- package/dist/components/embedded-chat/use-captcha.cjs +1 -0
- package/dist/components/embedded-chat/use-captcha.d.cts +13 -0
- package/dist/components/embedded-chat/use-captcha.d.ts +13 -0
- package/dist/components/embedded-chat/use-captcha.js +56 -0
- package/dist/components/embedded-chat/use-chat-action.cjs +1 -0
- package/dist/components/embedded-chat/use-chat-action.d.cts +9 -0
- package/dist/components/embedded-chat/use-chat-action.d.ts +9 -0
- package/dist/components/embedded-chat/use-chat-action.js +26 -0
- package/dist/components/embedded-chat/use-inkeep-chat.cjs +4 -0
- package/dist/components/embedded-chat/use-inkeep-chat.d.cts +25 -0
- package/dist/components/embedded-chat/use-inkeep-chat.d.ts +25 -0
- package/dist/components/embedded-chat/use-inkeep-chat.js +227 -0
- package/dist/components/embedded-chat.cjs +17 -0
- package/dist/components/embedded-chat.d.cts +415 -0
- package/dist/components/embedded-chat.d.ts +415 -0
- package/dist/components/embedded-chat.js +1840 -0
- package/dist/components/embedded-search/search-provider.cjs +1 -0
- package/dist/components/embedded-search/search-provider.d.cts +21 -0
- package/dist/components/embedded-search/search-provider.d.ts +21 -0
- package/dist/components/embedded-search/search-provider.js +19 -0
- package/dist/components/embedded-search/search-query.graphql.cjs +82 -0
- package/dist/components/embedded-search/search-query.graphql.js +86 -0
- package/dist/components/embedded-search/transform-results.cjs +1 -0
- package/dist/components/embedded-search/transform-results.d.cts +3 -0
- package/dist/components/embedded-search/transform-results.d.ts +3 -0
- package/dist/components/embedded-search/transform-results.js +113 -0
- package/dist/components/embedded-search/use-inkeep-search.cjs +1 -0
- package/dist/components/embedded-search/use-inkeep-search.d.cts +21 -0
- package/dist/components/embedded-search/use-inkeep-search.d.ts +21 -0
- package/dist/components/embedded-search/use-inkeep-search.js +137 -0
- package/dist/components/embedded-search.cjs +1 -0
- package/dist/components/embedded-search.d.cts +229 -0
- package/dist/components/embedded-search.d.ts +229 -0
- package/dist/components/embedded-search.js +390 -0
- package/dist/components/factory.cjs +1 -0
- package/dist/components/factory.d.cts +19 -0
- package/dist/components/factory.d.ts +19 -0
- package/dist/components/factory.js +39 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.cts +11 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.js +31 -0
- package/dist/components/intelligent-form/actions/context-model-response.cjs +9 -0
- package/dist/components/intelligent-form/actions/context-model-response.d.cts +10 -0
- package/dist/components/intelligent-form/actions/context-model-response.d.ts +10 -0
- package/dist/components/intelligent-form/actions/context-model-response.js +36 -0
- package/dist/components/intelligent-form/actions/escalation-schema.cjs +1 -0
- package/dist/components/intelligent-form/actions/escalation-schema.d.cts +2 -0
- package/dist/components/intelligent-form/actions/escalation-schema.d.ts +2 -0
- package/dist/components/intelligent-form/actions/escalation-schema.js +48 -0
- package/dist/components/intelligent-form/actions/qa-model-messages.cjs +27 -0
- package/dist/components/intelligent-form/actions/qa-model-messages.d.cts +2 -0
- package/dist/components/intelligent-form/actions/qa-model-messages.d.ts +2 -0
- package/dist/components/intelligent-form/actions/qa-model-messages.js +45 -0
- package/dist/components/intelligent-form/actions/qa-model-response.cjs +1 -0
- package/dist/components/intelligent-form/actions/qa-model-response.d.cts +14 -0
- package/dist/components/intelligent-form/actions/qa-model-response.d.ts +14 -0
- package/dist/components/intelligent-form/actions/qa-model-response.js +46 -0
- package/dist/components/intelligent-form/intelligent-form-provider.cjs +1 -0
- package/dist/components/intelligent-form/intelligent-form-provider.d.cts +29 -0
- package/dist/components/intelligent-form/intelligent-form-provider.d.ts +29 -0
- package/dist/components/intelligent-form/intelligent-form-provider.js +23 -0
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.cjs +1 -0
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.cts +30 -0
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.ts +30 -0
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.js +157 -0
- package/dist/components/intelligent-form.cjs +1 -0
- package/dist/components/intelligent-form.d.cts +135 -0
- package/dist/components/intelligent-form.d.ts +135 -0
- package/dist/components/intelligent-form.js +568 -0
- package/dist/components/modal/modal-provider.cjs +1 -0
- package/dist/components/modal/modal-provider.d.cts +13 -0
- package/dist/components/modal/modal-provider.d.ts +13 -0
- package/dist/components/modal/modal-provider.js +8 -0
- package/dist/components/modal/use-inkeep-modal.cjs +1 -0
- package/dist/components/modal/use-inkeep-modal.d.cts +8 -0
- package/dist/components/modal/use-inkeep-modal.d.ts +8 -0
- package/dist/components/modal/use-inkeep-modal.js +30 -0
- package/dist/components/modal.cjs +1 -0
- package/dist/components/modal.d.cts +18 -0
- package/dist/components/modal.d.ts +18 -0
- package/dist/components/modal.js +40 -0
- package/dist/components/searchbar.cjs +1 -0
- package/dist/components/searchbar.d.cts +23 -0
- package/dist/components/searchbar.d.ts +23 -0
- package/dist/components/searchbar.js +54 -0
- package/dist/components/tagline-logo-icon.cjs +1 -0
- package/dist/components/tagline-logo-icon.d.cts +1 -0
- package/dist/components/tagline-logo-icon.d.ts +1 -0
- package/dist/components/tagline-logo-icon.js +34 -0
- package/dist/hooks/index.cjs +1 -0
- package/dist/hooks/index.d.cts +12 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.js +27 -0
- package/dist/hooks/use-boolean.cjs +1 -0
- package/dist/hooks/use-boolean.d.cts +10 -0
- package/dist/hooks/use-boolean.d.ts +10 -0
- package/dist/hooks/use-boolean.js +17 -0
- package/dist/hooks/use-browser-storage.cjs +1 -0
- package/dist/hooks/use-browser-storage.d.cts +17 -0
- package/dist/hooks/use-browser-storage.d.ts +17 -0
- package/dist/hooks/use-browser-storage.js +88 -0
- package/dist/hooks/use-component-classnames.cjs +1 -0
- package/dist/hooks/use-component-classnames.d.cts +6 -0
- package/dist/hooks/use-component-classnames.d.ts +6 -0
- package/dist/hooks/use-component-classnames.js +14 -0
- package/dist/hooks/use-container-size.cjs +1 -0
- package/dist/hooks/use-container-size.d.cts +5 -0
- package/dist/hooks/use-container-size.d.ts +5 -0
- package/dist/hooks/use-container-size.js +18 -0
- package/dist/hooks/use-copy-to-clipboard.cjs +1 -0
- package/dist/hooks/use-copy-to-clipboard.d.cts +3 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +3 -0
- package/dist/hooks/use-copy-to-clipboard.js +19 -0
- package/dist/hooks/use-instant-update.cjs +1 -0
- package/dist/hooks/use-instant-update.d.cts +17 -0
- package/dist/hooks/use-instant-update.d.ts +17 -0
- package/dist/hooks/use-instant-update.js +16 -0
- package/dist/hooks/use-is-mounted.cjs +1 -0
- package/dist/hooks/use-is-mounted.d.cts +1 -0
- package/dist/hooks/use-is-mounted.d.ts +1 -0
- package/dist/hooks/use-is-mounted.js +11 -0
- package/dist/hooks/use-media-query.cjs +1 -0
- package/dist/hooks/use-media-query.d.cts +1 -0
- package/dist/hooks/use-media-query.d.ts +1 -0
- package/dist/hooks/use-media-query.js +14 -0
- package/dist/hooks/use-resize-observer.cjs +1 -0
- package/dist/hooks/use-resize-observer.d.cts +12 -0
- package/dist/hooks/use-resize-observer.d.ts +12 -0
- package/dist/hooks/use-resize-observer.js +32 -0
- package/dist/hooks/use-scroll-to-bottom.cjs +1 -0
- package/dist/hooks/use-scroll-to-bottom.d.cts +13 -0
- package/dist/hooks/use-scroll-to-bottom.d.ts +13 -0
- package/dist/hooks/use-scroll-to-bottom.js +52 -0
- package/dist/hooks/use-scrolling-fades.cjs +1 -0
- package/dist/hooks/use-scrolling-fades.d.cts +2 -0
- package/dist/hooks/use-scrolling-fades.d.ts +2 -0
- package/dist/hooks/use-scrolling-fades.js +18 -0
- package/dist/hooks/use-settle-action.cjs +1 -0
- package/dist/hooks/use-settle-action.d.cts +3 -0
- package/dist/hooks/use-settle-action.d.ts +3 -0
- package/dist/hooks/use-settle-action.js +11 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +152 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fa6/index.cjs +1 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fa6/index.js +92 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fi/index.cjs +1 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/fi/index.js +8 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/hi2/index.cjs +1 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/hi2/index.js +8 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.cjs +1 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.js +128 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconBase.cjs +1 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconBase.js +109 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconContext.cjs +1 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lib/iconContext.js +13 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.cjs +1 -0
- package/dist/node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/lu/index.js +68 -0
- package/dist/providers/attachment-item-provider.cjs +1 -0
- package/dist/providers/attachment-item-provider.d.cts +9 -0
- package/dist/providers/attachment-item-provider.d.ts +9 -0
- package/dist/providers/attachment-item-provider.js +13 -0
- package/dist/providers/attachments-bar-provider.cjs +1 -0
- package/dist/providers/attachments-bar-provider.d.cts +30 -0
- package/dist/providers/attachments-bar-provider.d.ts +30 -0
- package/dist/providers/attachments-bar-provider.js +64 -0
- package/dist/providers/base-events-provider.cjs +1 -0
- package/dist/providers/base-events-provider.d.cts +8 -0
- package/dist/providers/base-events-provider.d.ts +8 -0
- package/dist/providers/base-events-provider.js +39 -0
- package/dist/providers/chat-events-provider.cjs +1 -0
- package/dist/providers/chat-events-provider.d.cts +12 -0
- package/dist/providers/chat-events-provider.d.ts +12 -0
- package/dist/providers/chat-events-provider.js +66 -0
- package/dist/providers/chat-form-provider.cjs +1 -0
- package/dist/providers/chat-form-provider.d.cts +23 -0
- package/dist/providers/chat-form-provider.d.ts +23 -0
- package/dist/providers/chat-form-provider.js +66 -0
- package/dist/providers/config-provider.cjs +1 -0
- package/dist/providers/config-provider.d.cts +24 -0
- package/dist/providers/config-provider.d.ts +24 -0
- package/dist/providers/config-provider.js +37 -0
- package/dist/providers/conversation-provider.cjs +1 -0
- package/dist/providers/conversation-provider.d.cts +12 -0
- package/dist/providers/conversation-provider.d.ts +12 -0
- package/dist/providers/conversation-provider.js +49 -0
- package/dist/providers/feedback-item-provider.cjs +1 -0
- package/dist/providers/feedback-item-provider.d.cts +10 -0
- package/dist/providers/feedback-item-provider.d.ts +10 -0
- package/dist/providers/feedback-item-provider.js +16 -0
- package/dist/providers/feedback-provider.cjs +1 -0
- package/dist/providers/feedback-provider.d.cts +19 -0
- package/dist/providers/feedback-provider.d.ts +19 -0
- package/dist/providers/feedback-provider.js +82 -0
- package/dist/providers/form-field-provider.cjs +1 -0
- package/dist/providers/form-field-provider.d.cts +15 -0
- package/dist/providers/form-field-provider.d.ts +15 -0
- package/dist/providers/form-field-provider.js +17 -0
- package/dist/providers/help-menu-provider.cjs +1 -0
- package/dist/providers/help-menu-provider.d.cts +11 -0
- package/dist/providers/help-menu-provider.d.ts +11 -0
- package/dist/providers/help-menu-provider.js +19 -0
- package/dist/providers/index.cjs +1 -0
- package/dist/providers/index.d.cts +19 -0
- package/dist/providers/index.d.ts +19 -0
- package/dist/providers/index.js +63 -0
- package/dist/providers/intelligent-form-field-provider.cjs +1 -0
- package/dist/providers/intelligent-form-field-provider.d.cts +15 -0
- package/dist/providers/intelligent-form-field-provider.d.ts +15 -0
- package/dist/providers/intelligent-form-field-provider.js +19 -0
- package/dist/providers/markdown-provider.cjs +1 -0
- package/dist/providers/markdown-provider.d.cts +9 -0
- package/dist/providers/markdown-provider.d.ts +9 -0
- package/dist/providers/markdown-provider.js +8 -0
- package/dist/providers/message-attachments-provider.cjs +1 -0
- package/dist/providers/message-attachments-provider.d.cts +13 -0
- package/dist/providers/message-attachments-provider.d.ts +13 -0
- package/dist/providers/message-attachments-provider.js +27 -0
- package/dist/providers/message-provider.cjs +1 -0
- package/dist/providers/message-provider.d.cts +10 -0
- package/dist/providers/message-provider.d.ts +10 -0
- package/dist/providers/message-provider.js +14 -0
- package/dist/providers/root-provider.cjs +1 -0
- package/dist/providers/root-provider.d.cts +8 -0
- package/dist/providers/root-provider.d.ts +8 -0
- package/dist/providers/root-provider.js +21 -0
- package/dist/providers/search-events-provider.cjs +1 -0
- package/dist/providers/search-events-provider.d.cts +11 -0
- package/dist/providers/search-events-provider.d.ts +11 -0
- package/dist/providers/search-events-provider.js +18 -0
- package/dist/providers/source-item-provider.cjs +1 -0
- package/dist/providers/source-item-provider.d.cts +12 -0
- package/dist/providers/source-item-provider.d.ts +12 -0
- package/dist/providers/source-item-provider.js +13 -0
- package/dist/providers/theme-provider.cjs +1 -0
- package/dist/providers/theme-provider.d.cts +3 -0
- package/dist/providers/theme-provider.d.ts +3 -0
- package/dist/providers/theme-provider.js +65 -0
- package/dist/providers/user-provider.cjs +1 -0
- package/dist/providers/user-provider.d.cts +13 -0
- package/dist/providers/user-provider.d.ts +13 -0
- package/dist/providers/user-provider.js +34 -0
- package/dist/providers/widget-provider.cjs +1 -0
- package/dist/providers/widget-provider.d.cts +9 -0
- package/dist/providers/widget-provider.d.ts +9 -0
- package/dist/providers/widget-provider.js +8 -0
- package/dist/utils/component-ids.cjs +1 -0
- package/dist/utils/component-ids.d.cts +632 -0
- package/dist/utils/component-ids.d.ts +632 -0
- package/dist/utils/component-ids.js +340 -0
- package/dist/utils/compose-event-handlers.cjs +1 -0
- package/dist/utils/compose-event-handlers.d.cts +3 -0
- package/dist/utils/compose-event-handlers.d.ts +3 -0
- package/dist/utils/compose-event-handlers.js +10 -0
- package/dist/utils/compose-refs.cjs +1 -0
- package/dist/utils/compose-refs.d.cts +5 -0
- package/dist/utils/compose-refs.d.ts +5 -0
- package/dist/utils/compose-refs.js +30 -0
- package/dist/utils/default-settings.cjs +1 -0
- package/dist/utils/default-settings.d.cts +244 -0
- package/dist/utils/default-settings.d.ts +244 -0
- package/dist/utils/default-settings.js +75 -0
- package/dist/utils/form.cjs +1 -0
- package/dist/utils/form.d.cts +3 -0
- package/dist/utils/form.d.ts +3 -0
- package/dist/utils/form.js +17 -0
- package/dist/utils/generate-uid.cjs +1 -0
- package/dist/utils/generate-uid.d.cts +2 -0
- package/dist/utils/generate-uid.d.ts +2 -0
- package/dist/utils/generate-uid.js +14 -0
- package/dist/utils/get-message-metadata.cjs +10 -0
- package/dist/utils/get-message-metadata.d.cts +8 -0
- package/dist/utils/get-message-metadata.d.ts +8 -0
- package/dist/utils/get-message-metadata.js +142 -0
- package/dist/utils/graphql-client.cjs +1 -0
- package/dist/utils/graphql-client.d.cts +8 -0
- package/dist/utils/graphql-client.d.ts +8 -0
- package/dist/utils/graphql-client.js +23 -0
- package/dist/utils/highlight-emphasis.cjs +1 -0
- package/dist/utils/highlight-emphasis.d.cts +4 -0
- package/dist/utils/highlight-emphasis.d.ts +4 -0
- package/dist/utils/highlight-emphasis.js +15 -0
- package/dist/utils/merge-props.cjs +1 -0
- package/dist/utils/merge-props.d.cts +7 -0
- package/dist/utils/merge-props.d.ts +7 -0
- package/dist/utils/merge-props.js +41 -0
- package/dist/utils/misc.cjs +1 -0
- package/dist/utils/misc.d.cts +13 -0
- package/dist/utils/misc.d.ts +13 -0
- package/dist/utils/misc.js +36 -0
- package/dist/utils/reset-query-params.cjs +1 -0
- package/dist/utils/reset-query-params.d.cts +1 -0
- package/dist/utils/reset-query-params.d.ts +1 -0
- package/dist/utils/reset-query-params.js +13 -0
- package/dist/utils/tools/links-schema.cjs +1 -0
- package/dist/utils/tools/links-schema.d.cts +64 -0
- package/dist/utils/tools/links-schema.d.ts +64 -0
- package/dist/utils/tools/links-schema.js +85 -0
- package/dist/utils/transform-source/breadcrumbs.cjs +1 -0
- package/dist/utils/transform-source/breadcrumbs.d.cts +2 -0
- package/dist/utils/transform-source/breadcrumbs.d.ts +2 -0
- package/dist/utils/transform-source/breadcrumbs.js +16 -0
- package/dist/utils/transform-source/common-words/long.cjs +1 -0
- package/dist/utils/transform-source/common-words/long.d.cts +1 -0
- package/dist/utils/transform-source/common-words/long.d.ts +1 -0
- package/dist/utils/transform-source/common-words/long.js +69 -0
- package/dist/utils/transform-source/common-words/lowercase.cjs +1 -0
- package/dist/utils/transform-source/common-words/lowercase.d.cts +1 -0
- package/dist/utils/transform-source/common-words/lowercase.d.ts +1 -0
- package/dist/utils/transform-source/common-words/lowercase.js +48 -0
- package/dist/utils/transform-source/common-words/short.cjs +1 -0
- package/dist/utils/transform-source/common-words/short.d.cts +1 -0
- package/dist/utils/transform-source/common-words/short.d.ts +1 -0
- package/dist/utils/transform-source/common-words/short.js +141 -0
- package/dist/utils/transform-source/description.cjs +1 -0
- package/dist/utils/transform-source/description.d.cts +2 -0
- package/dist/utils/transform-source/description.d.ts +2 -0
- package/dist/utils/transform-source/description.js +10 -0
- package/dist/utils/transform-source/icon.cjs +1 -0
- package/dist/utils/transform-source/icon.d.cts +2 -0
- package/dist/utils/transform-source/icon.d.ts +2 -0
- package/dist/utils/transform-source/icon.js +9 -0
- package/dist/utils/transform-source/index.cjs +1 -0
- package/dist/utils/transform-source/index.d.cts +2 -0
- package/dist/utils/transform-source/index.d.ts +2 -0
- package/dist/utils/transform-source/index.js +21 -0
- package/dist/utils/transform-source/tabs.cjs +1 -0
- package/dist/utils/transform-source/tabs.d.cts +2 -0
- package/dist/utils/transform-source/tabs.d.ts +2 -0
- package/dist/utils/transform-source/tabs.js +13 -0
- package/dist/utils/transform-source/title.cjs +1 -0
- package/dist/utils/transform-source/title.d.cts +2 -0
- package/dist/utils/transform-source/title.d.ts +2 -0
- package/dist/utils/transform-source/title.js +12 -0
- package/dist/utils/transform-source/utils/description-without-title.cjs +1 -0
- package/dist/utils/transform-source/utils/description-without-title.d.cts +11 -0
- package/dist/utils/transform-source/utils/description-without-title.d.ts +11 -0
- package/dist/utils/transform-source/utils/description-without-title.js +12 -0
- package/dist/utils/transform-source/utils/index.cjs +1 -0
- package/dist/utils/transform-source/utils/index.d.cts +6 -0
- package/dist/utils/transform-source/utils/index.d.ts +6 -0
- package/dist/utils/transform-source/utils/index.js +16 -0
- package/dist/utils/transform-source/utils/misc.cjs +1 -0
- package/dist/utils/transform-source/utils/misc.d.cts +2 -0
- package/dist/utils/transform-source/utils/misc.d.ts +2 -0
- package/dist/utils/transform-source/utils/misc.js +15 -0
- package/dist/utils/transform-source/utils/standardize-common-words.cjs +1 -0
- package/dist/utils/transform-source/utils/standardize-common-words.d.cts +1 -0
- package/dist/utils/transform-source/utils/standardize-common-words.d.ts +1 -0
- package/dist/utils/transform-source/utils/standardize-common-words.js +26 -0
- package/dist/utils/transform-source/utils/standardize-organization-display-name.cjs +1 -0
- package/dist/utils/transform-source/utils/standardize-organization-display-name.d.cts +8 -0
- package/dist/utils/transform-source/utils/standardize-organization-display-name.d.ts +8 -0
- package/dist/utils/transform-source/utils/standardize-organization-display-name.js +10 -0
- package/dist/utils/transform-source/utils/standardize-suffixes.cjs +1 -0
- package/dist/utils/transform-source/utils/standardize-suffixes.d.cts +5 -0
- package/dist/utils/transform-source/utils/standardize-suffixes.d.ts +5 -0
- package/dist/utils/transform-source/utils/standardize-suffixes.js +16 -0
- package/dist/utils/transform-source/utils/strip-branding-keywords.cjs +1 -0
- package/dist/utils/transform-source/utils/strip-branding-keywords.d.cts +17 -0
- package/dist/utils/transform-source/utils/strip-branding-keywords.d.ts +17 -0
- package/dist/utils/transform-source/utils/strip-branding-keywords.js +14 -0
- package/package.json +111 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { InkeepBaseSettings, TransformSource } from '@inkeep/cxkit-types';
|
|
2
|
+
export declare const defaultInkeepAIChatSettings: {
|
|
3
|
+
model: "inkeep-qa-expert";
|
|
4
|
+
placeholder: string;
|
|
5
|
+
botName: undefined;
|
|
6
|
+
shouldOpenLinksInNewTab: true;
|
|
7
|
+
disclaimerSettings: {
|
|
8
|
+
enabled: false;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
isChatSharingEnabled: false;
|
|
12
|
+
isViewOnly: false;
|
|
13
|
+
quickQuestionsLabel: string;
|
|
14
|
+
quickQuestions: never[];
|
|
15
|
+
shouldHighlightFirstQuickQuestion: true;
|
|
16
|
+
shouldShowCopyChatButton: false;
|
|
17
|
+
getHelpCallToActions: never[];
|
|
18
|
+
workflowsHeader: string;
|
|
19
|
+
workflows: never[];
|
|
20
|
+
actionButtonLabels: {
|
|
21
|
+
clearButtonLabel: string;
|
|
22
|
+
shareButtonLabel: string;
|
|
23
|
+
getHelpButtonLabel: string;
|
|
24
|
+
stopButtonLabel: string;
|
|
25
|
+
copyChatButtonLabel: string;
|
|
26
|
+
};
|
|
27
|
+
prompts: never[];
|
|
28
|
+
tools: {
|
|
29
|
+
type: "function";
|
|
30
|
+
function: {
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
parameters: {
|
|
34
|
+
type: string;
|
|
35
|
+
properties: {
|
|
36
|
+
links: {
|
|
37
|
+
anyOf: ({
|
|
38
|
+
type: string;
|
|
39
|
+
items: {
|
|
40
|
+
type: string;
|
|
41
|
+
properties: {
|
|
42
|
+
label: {
|
|
43
|
+
type: string[];
|
|
44
|
+
};
|
|
45
|
+
url: {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
title: {
|
|
49
|
+
type: string[];
|
|
50
|
+
};
|
|
51
|
+
description: {
|
|
52
|
+
type: string[];
|
|
53
|
+
};
|
|
54
|
+
type: {
|
|
55
|
+
anyOf: ({
|
|
56
|
+
anyOf: ({
|
|
57
|
+
type: string;
|
|
58
|
+
enum: string[];
|
|
59
|
+
} | {
|
|
60
|
+
type: string;
|
|
61
|
+
enum?: undefined;
|
|
62
|
+
})[];
|
|
63
|
+
type?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
type: string;
|
|
66
|
+
anyOf?: undefined;
|
|
67
|
+
})[];
|
|
68
|
+
};
|
|
69
|
+
breadcrumbs: {
|
|
70
|
+
anyOf: ({
|
|
71
|
+
type: string;
|
|
72
|
+
items: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
} | {
|
|
76
|
+
type: string;
|
|
77
|
+
items?: undefined;
|
|
78
|
+
})[];
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
required: string[];
|
|
82
|
+
additionalProperties: boolean;
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
85
|
+
type: string;
|
|
86
|
+
items?: undefined;
|
|
87
|
+
})[];
|
|
88
|
+
};
|
|
89
|
+
text: {
|
|
90
|
+
type: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
required: string[];
|
|
94
|
+
additionalProperties: boolean;
|
|
95
|
+
$schema: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
100
|
+
export declare const defaultInkeepBaseSettings: {
|
|
101
|
+
env: InkeepBaseSettings["env"];
|
|
102
|
+
apiKey: string;
|
|
103
|
+
baseUrl: string;
|
|
104
|
+
analyticsBaseUrl: string;
|
|
105
|
+
bypassChallenge: false;
|
|
106
|
+
analytics: {
|
|
107
|
+
optOutAnalyticalCookies: false;
|
|
108
|
+
optOutAllAnalytics: false;
|
|
109
|
+
optOutFunctionalCookies: false;
|
|
110
|
+
};
|
|
111
|
+
tags: never[];
|
|
112
|
+
userProperties: {};
|
|
113
|
+
primaryBrandColor: string;
|
|
114
|
+
theme: {
|
|
115
|
+
colors: {
|
|
116
|
+
whiteAlpha: {
|
|
117
|
+
50: string;
|
|
118
|
+
100: string;
|
|
119
|
+
200: string;
|
|
120
|
+
300: string;
|
|
121
|
+
400: string;
|
|
122
|
+
500: string;
|
|
123
|
+
600: string;
|
|
124
|
+
700: string;
|
|
125
|
+
800: string;
|
|
126
|
+
900: string;
|
|
127
|
+
950: string;
|
|
128
|
+
1000: string;
|
|
129
|
+
};
|
|
130
|
+
blackAlpha: {
|
|
131
|
+
50: string;
|
|
132
|
+
100: string;
|
|
133
|
+
200: string;
|
|
134
|
+
300: string;
|
|
135
|
+
400: string;
|
|
136
|
+
500: string;
|
|
137
|
+
600: string;
|
|
138
|
+
700: string;
|
|
139
|
+
800: string;
|
|
140
|
+
900: string;
|
|
141
|
+
950: string;
|
|
142
|
+
1000: string;
|
|
143
|
+
};
|
|
144
|
+
gray: {
|
|
145
|
+
50: string;
|
|
146
|
+
100: string;
|
|
147
|
+
200: string;
|
|
148
|
+
300: string;
|
|
149
|
+
400: string;
|
|
150
|
+
500: string;
|
|
151
|
+
600: string;
|
|
152
|
+
700: string;
|
|
153
|
+
800: string;
|
|
154
|
+
900: string;
|
|
155
|
+
950: string;
|
|
156
|
+
1000: string;
|
|
157
|
+
};
|
|
158
|
+
grayDark: {
|
|
159
|
+
1000: string;
|
|
160
|
+
950: string;
|
|
161
|
+
900: string;
|
|
162
|
+
800: string;
|
|
163
|
+
700: string;
|
|
164
|
+
600: string;
|
|
165
|
+
500: string;
|
|
166
|
+
400: string;
|
|
167
|
+
300: string;
|
|
168
|
+
200: string;
|
|
169
|
+
100: string;
|
|
170
|
+
50: string;
|
|
171
|
+
};
|
|
172
|
+
inkeepPrimary: {
|
|
173
|
+
textColorOnPrimary: string;
|
|
174
|
+
};
|
|
175
|
+
inkeepExpandedPrimary: {
|
|
176
|
+
"50": string;
|
|
177
|
+
"100": string;
|
|
178
|
+
"200": string;
|
|
179
|
+
"300": string;
|
|
180
|
+
"400": string;
|
|
181
|
+
"500": string;
|
|
182
|
+
"600": string;
|
|
183
|
+
"700": string;
|
|
184
|
+
"800": string;
|
|
185
|
+
"900": string;
|
|
186
|
+
"950": string;
|
|
187
|
+
"1000": string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
fontFamily: {
|
|
191
|
+
heading: string;
|
|
192
|
+
body: string;
|
|
193
|
+
mono: string;
|
|
194
|
+
};
|
|
195
|
+
fontSize: {
|
|
196
|
+
'3xs': string;
|
|
197
|
+
'2xs': string;
|
|
198
|
+
xs: string;
|
|
199
|
+
'1sm': string;
|
|
200
|
+
sm: string;
|
|
201
|
+
'2sm': string;
|
|
202
|
+
md: string;
|
|
203
|
+
lg: string;
|
|
204
|
+
xl: string;
|
|
205
|
+
'2xl': string;
|
|
206
|
+
'3xl': string;
|
|
207
|
+
'4xl': string;
|
|
208
|
+
'5xl': string;
|
|
209
|
+
'6xl': string;
|
|
210
|
+
'7xl': string;
|
|
211
|
+
'8xl': string;
|
|
212
|
+
'9xl': string;
|
|
213
|
+
};
|
|
214
|
+
zIndex: {
|
|
215
|
+
hide: number;
|
|
216
|
+
auto: string;
|
|
217
|
+
base: number;
|
|
218
|
+
start: number;
|
|
219
|
+
docked: number;
|
|
220
|
+
dropdown: number;
|
|
221
|
+
sticky: number;
|
|
222
|
+
banner: number;
|
|
223
|
+
overlay: number;
|
|
224
|
+
modal: number;
|
|
225
|
+
popover: number;
|
|
226
|
+
skipLink: number;
|
|
227
|
+
toast: number;
|
|
228
|
+
tooltip: number;
|
|
229
|
+
};
|
|
230
|
+
varsClassName: string;
|
|
231
|
+
};
|
|
232
|
+
transformSource: TransformSource;
|
|
233
|
+
};
|
|
234
|
+
export declare const defaultInkeepSearchSettings: {
|
|
235
|
+
shouldOpenLinksInNewTab: false;
|
|
236
|
+
maximumHitsLimit: number;
|
|
237
|
+
defaultQuery: string;
|
|
238
|
+
debounceTime: number;
|
|
239
|
+
tabs: string[];
|
|
240
|
+
searchQueryParamKey: string;
|
|
241
|
+
};
|
|
242
|
+
export type DefaultInkeepAIChatSettings = typeof defaultInkeepAIChatSettings;
|
|
243
|
+
export type DefaultInkeepBaseSettings = typeof defaultInkeepBaseSettings;
|
|
244
|
+
export type DefaultInkeepSearchSettings = typeof defaultInkeepSearchSettings;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { theme as e, DEFAULT_PRIMARY_BRAND_COLOR as t } from "@inkeep/cxkit-theme";
|
|
3
|
+
import { defaultTransformSource as a } from "./transform-source/index.js";
|
|
4
|
+
import { linksSchema as s } from "./tools/links-schema.js";
|
|
5
|
+
const n = {
|
|
6
|
+
model: "inkeep-qa-expert",
|
|
7
|
+
placeholder: "How do I get started?",
|
|
8
|
+
botName: void 0,
|
|
9
|
+
shouldOpenLinksInNewTab: !0,
|
|
10
|
+
disclaimerSettings: {
|
|
11
|
+
enabled: !1,
|
|
12
|
+
label: "Usage policy"
|
|
13
|
+
},
|
|
14
|
+
isChatSharingEnabled: !1,
|
|
15
|
+
isViewOnly: !1,
|
|
16
|
+
quickQuestionsLabel: "Example questions",
|
|
17
|
+
quickQuestions: [],
|
|
18
|
+
shouldHighlightFirstQuickQuestion: !0,
|
|
19
|
+
shouldShowCopyChatButton: !1,
|
|
20
|
+
getHelpCallToActions: [],
|
|
21
|
+
workflowsHeader: "Workflows",
|
|
22
|
+
workflows: [],
|
|
23
|
+
actionButtonLabels: {
|
|
24
|
+
clearButtonLabel: "Clear",
|
|
25
|
+
shareButtonLabel: "Share",
|
|
26
|
+
getHelpButtonLabel: "Get help",
|
|
27
|
+
stopButtonLabel: "Stop",
|
|
28
|
+
copyChatButtonLabel: "Copy"
|
|
29
|
+
},
|
|
30
|
+
prompts: [],
|
|
31
|
+
tools: [
|
|
32
|
+
{
|
|
33
|
+
type: "function",
|
|
34
|
+
function: {
|
|
35
|
+
name: "provideLinks",
|
|
36
|
+
description: "Provides links",
|
|
37
|
+
parameters: s
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}, r = {
|
|
42
|
+
env: "PRODUCTION",
|
|
43
|
+
apiKey: "",
|
|
44
|
+
baseUrl: "https://api.inkeep.com",
|
|
45
|
+
analyticsBaseUrl: "https://api.analytics.inkeep.com",
|
|
46
|
+
bypassChallenge: !1,
|
|
47
|
+
analytics: {
|
|
48
|
+
optOutAnalyticalCookies: !1,
|
|
49
|
+
// disable use of cookies for analytics. Default is false.
|
|
50
|
+
optOutAllAnalytics: !1,
|
|
51
|
+
// disable all event logging, even analytics that don't use cookies (e.g. anonymous events)
|
|
52
|
+
optOutFunctionalCookies: !1
|
|
53
|
+
// disable all cookies that are used for functionality, like caching chat sessions cross-tabs. Default is false.
|
|
54
|
+
},
|
|
55
|
+
tags: [],
|
|
56
|
+
userProperties: {},
|
|
57
|
+
primaryBrandColor: t,
|
|
58
|
+
theme: {
|
|
59
|
+
varsClassName: "inkeep-widget-vars",
|
|
60
|
+
...e
|
|
61
|
+
},
|
|
62
|
+
transformSource: a
|
|
63
|
+
}, p = {
|
|
64
|
+
shouldOpenLinksInNewTab: !1,
|
|
65
|
+
maximumHitsLimit: 40,
|
|
66
|
+
defaultQuery: "",
|
|
67
|
+
debounceTime: 0,
|
|
68
|
+
tabs: ["All", "Publications", "PDFs", "GitHub", "Forums", "Discord", "Slack", "StackOverflow"],
|
|
69
|
+
searchQueryParamKey: "q"
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
n as defaultInkeepAIChatSettings,
|
|
73
|
+
r as defaultInkeepBaseSettings,
|
|
74
|
+
p as defaultInkeepSearchSettings
|
|
75
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={TEXT:"",EMAIL:"",CHECKBOX:!1,TEXTAREA:"",FILE:void 0,SELECT:""};function n(t){return t?t?.reduce((u,e)=>("defaultValue"in e&&e.defaultValue?u[e.name]=e.defaultValue:e.inputType&&(u[e.name]=a[e.inputType]),u),{}):{}}exports.defaultInputValues=a;exports.getFormDefaultValues=n;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const n = {
|
|
3
|
+
TEXT: "",
|
|
4
|
+
EMAIL: "",
|
|
5
|
+
CHECKBOX: !1,
|
|
6
|
+
TEXTAREA: "",
|
|
7
|
+
FILE: void 0,
|
|
8
|
+
// file inputs are always uncontrolled since their value can only be set by the user so it's ok to use undefined here
|
|
9
|
+
SELECT: ""
|
|
10
|
+
};
|
|
11
|
+
function a(t) {
|
|
12
|
+
return t ? t?.reduce((u, e) => ("defaultValue" in e && e.defaultValue ? u[e.name] = e.defaultValue : e.inputType && (u[e.name] = n[e.inputType]), u), {}) : {};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
n as defaultInputValues,
|
|
16
|
+
a as getFormDefaultValues
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(e=21){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,n=>n.toString(36)).join("").slice(0,e)}const r=new Map;function u(e="id"){const n=(r.get(e)||0)+1;return r.set(e,n),`${e}${n}`}exports.generatePrefixedUniqueId=u;exports.generateUid=o;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function o(n = 21) {
|
|
3
|
+
const e = new Uint8Array(n);
|
|
4
|
+
return crypto.getRandomValues(e), Array.from(e, (t) => t.toString(36)).join("").slice(0, n);
|
|
5
|
+
}
|
|
6
|
+
const r = /* @__PURE__ */ new Map();
|
|
7
|
+
function u(n = "id") {
|
|
8
|
+
const t = (r.get(n) || 0) + 1;
|
|
9
|
+
return r.set(n, t), `${n}${t}`;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
u as generatePrefixedUniqueId,
|
|
13
|
+
o as generateUid
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function b(t,e,n){if(!t)return;const o=n?v(t):"",i=T(e),s={workflow:z(t),attachments:e};return{context:l([o,i]),attributes:s}}function v(t){const{displayName:e,goals:n,informationToCollect:o,guidance:i,botPersona:s,context:u}=t,a=r({title:"Guidance",content:[g(i)],note:s,depth:2}),p=m(o?.filter(c=>c.required).map(c=>c.description)),f=m(o?.filter(c=>!c.required).map(c=>c.description)),h=r({title:"Required",content:[p],note:"IMPORTANT: This information is REQUIRED for this workflow. If not provided in the conversation, prompt the user to provide it and don't otherwise answer their question.",depth:3}),w=r({title:"Optional",content:[f],depth:3}),C=r({title:"Information to collect",content:[h,w],note:"This is information that should be collected from the user.",depth:2}),I=m(u),y=r({title:"Context",content:[I],depth:2}),$=r({title:"Workflow Name",content:[e],depth:2}),k=r({title:"Goals",content:[g(n)],depth:2});return r({title:"Workflow",content:["I am a user being guided through a “workflow” defined by the organization that provides this chat experience.","**IMPORTANT: Follow the instructions outlined in this workflow. Follow the instructions in the workflow configuration below. Do not answer questions unrelated to the workflow.**",$,k,y,C,a],depth:1})}function g(t){if(d(t))return t.filter(e=>e!=null).map((e,n)=>`${n+1}. ${e}`).join(`
|
|
2
|
+
`)}function m(t){if(d(t))return t.filter(e=>e!=null).map(e=>`- ${e}`).join(`
|
|
3
|
+
`)}function r({title:t,content:e,note:n,depth:o=2}){const i=l(e);if(!i&&!n)return;const u=`${"#".repeat(o)} ${t}
|
|
4
|
+
`,a=l([n,i]);return a?`${u}${a}
|
|
5
|
+
`:void 0}function A(t){if(!t||!d(t))return;const e=t.map((n,o)=>S({attachment:n,index:o}));return l(e)}function T(t){const e=A(t);return r({title:"User-provided Attachments",content:["The user has provided the following attachments to their message:",e],depth:1})}function M(t){if(t?.type==="CODE")return t.language||""}function x(t,e){return e?`\`\`\`${e}
|
|
6
|
+
${t}
|
|
7
|
+
\`\`\``:t}function S({attachment:t,index:e}){const{title:n,content:o,contentType:i,context:s}=t,{contentInputLabel:u,type:a}=i,p=M(i),f=x(o,p),h=d(s)?[`
|
|
8
|
+
Additional Context:`,l(s)]:[];return[`#### ATTACHMENT #${e+1}`,`Title: ${n}`,`Label: ${u}`,`Type: ${a}`,"Content:",f,...h].join(`
|
|
9
|
+
`)}function z(t){if(!t.supportedInputs)return t;const e={...t};return e.supportedInputs=t.supportedInputs.map(n=>{const o={...n};return o.type==="MODAL"&&(o.workflowModalProps=void 0),o}),e}function l(t){if(d(t))return t.filter(e=>e!=null).join(`
|
|
10
|
+
`)}function d(t){return Array.isArray(t)&&t.length>0}exports.getMessageMetadata=b;exports.serializeAttachments=T;exports.serializeWorkflow=v;exports.stringifyAttachments=A;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MessageAttachment, MessageAttributes, Workflow } from '@inkeep/cxkit-types';
|
|
2
|
+
export declare function getMessageMetadata(workflow: Workflow | null, attachments: MessageAttachment[], isNewChat: boolean): {
|
|
3
|
+
context: string | undefined;
|
|
4
|
+
attributes: MessageAttributes;
|
|
5
|
+
} | undefined;
|
|
6
|
+
export declare function serializeWorkflow(workflow: Workflow): string | undefined;
|
|
7
|
+
export declare function stringifyAttachments(attachments: MessageAttachment[] | undefined): string | undefined;
|
|
8
|
+
export declare function serializeAttachments(_attachments: MessageAttachment[]): string | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MessageAttachment, MessageAttributes, Workflow } from '@inkeep/cxkit-types';
|
|
2
|
+
export declare function getMessageMetadata(workflow: Workflow | null, attachments: MessageAttachment[], isNewChat: boolean): {
|
|
3
|
+
context: string | undefined;
|
|
4
|
+
attributes: MessageAttributes;
|
|
5
|
+
} | undefined;
|
|
6
|
+
export declare function serializeWorkflow(workflow: Workflow): string | undefined;
|
|
7
|
+
export declare function stringifyAttachments(attachments: MessageAttachment[] | undefined): string | undefined;
|
|
8
|
+
export declare function serializeAttachments(_attachments: MessageAttachment[]): string | undefined;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function D(t, e, n) {
|
|
3
|
+
if (!t) return;
|
|
4
|
+
const o = n ? $(t) : "", i = x(e), s = {
|
|
5
|
+
workflow: S(t),
|
|
6
|
+
attachments: e
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
context: l([o, i]),
|
|
10
|
+
attributes: s
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function $(t) {
|
|
14
|
+
const { displayName: e, goals: n, informationToCollect: o, guidance: i, botPersona: s, context: u } = t, a = r({
|
|
15
|
+
title: "Guidance",
|
|
16
|
+
content: [g(i)],
|
|
17
|
+
note: s,
|
|
18
|
+
depth: 2
|
|
19
|
+
}), p = m(
|
|
20
|
+
o?.filter((c) => c.required).map((c) => c.description)
|
|
21
|
+
), f = m(
|
|
22
|
+
o?.filter((c) => !c.required).map((c) => c.description)
|
|
23
|
+
), h = r({
|
|
24
|
+
title: "Required",
|
|
25
|
+
content: [p],
|
|
26
|
+
note: "IMPORTANT: This information is REQUIRED for this workflow. If not provided in the conversation, prompt the user to provide it and don't otherwise answer their question.",
|
|
27
|
+
depth: 3
|
|
28
|
+
}), w = r({
|
|
29
|
+
title: "Optional",
|
|
30
|
+
content: [f],
|
|
31
|
+
depth: 3
|
|
32
|
+
}), v = r({
|
|
33
|
+
title: "Information to collect",
|
|
34
|
+
content: [h, w],
|
|
35
|
+
note: "This is information that should be collected from the user.",
|
|
36
|
+
depth: 2
|
|
37
|
+
}), T = m(u), A = r({
|
|
38
|
+
title: "Context",
|
|
39
|
+
content: [T],
|
|
40
|
+
depth: 2
|
|
41
|
+
}), C = r({
|
|
42
|
+
title: "Workflow Name",
|
|
43
|
+
content: [e],
|
|
44
|
+
depth: 2
|
|
45
|
+
}), I = r({
|
|
46
|
+
title: "Goals",
|
|
47
|
+
content: [g(n)],
|
|
48
|
+
depth: 2
|
|
49
|
+
});
|
|
50
|
+
return r({
|
|
51
|
+
title: "Workflow",
|
|
52
|
+
content: [
|
|
53
|
+
"I am a user being guided through a “workflow” defined by the organization that provides this chat experience.",
|
|
54
|
+
"**IMPORTANT: Follow the instructions outlined in this workflow. Follow the instructions in the workflow configuration below. Do not answer questions unrelated to the workflow.**",
|
|
55
|
+
C,
|
|
56
|
+
I,
|
|
57
|
+
A,
|
|
58
|
+
v,
|
|
59
|
+
a
|
|
60
|
+
],
|
|
61
|
+
depth: 1
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function g(t) {
|
|
65
|
+
if (d(t))
|
|
66
|
+
return t.filter((e) => e != null).map((e, n) => `${n + 1}. ${e}`).join(`
|
|
67
|
+
`);
|
|
68
|
+
}
|
|
69
|
+
function m(t) {
|
|
70
|
+
if (d(t))
|
|
71
|
+
return t.filter((e) => e != null).map((e) => `- ${e}`).join(`
|
|
72
|
+
`);
|
|
73
|
+
}
|
|
74
|
+
function r({ title: t, content: e, note: n, depth: o = 2 }) {
|
|
75
|
+
const i = l(e);
|
|
76
|
+
if (!i && !n) return;
|
|
77
|
+
const u = `${"#".repeat(o)} ${t}
|
|
78
|
+
`, a = l([n, i]);
|
|
79
|
+
return a ? `${u}${a}
|
|
80
|
+
` : void 0;
|
|
81
|
+
}
|
|
82
|
+
function k(t) {
|
|
83
|
+
if (!t || !d(t)) return;
|
|
84
|
+
const e = t.map(
|
|
85
|
+
(n, o) => M({ attachment: n, index: o })
|
|
86
|
+
);
|
|
87
|
+
return l(e);
|
|
88
|
+
}
|
|
89
|
+
function x(t) {
|
|
90
|
+
const e = k(t);
|
|
91
|
+
return r({
|
|
92
|
+
title: "User-provided Attachments",
|
|
93
|
+
content: ["The user has provided the following attachments to their message:", e],
|
|
94
|
+
depth: 1
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function y(t) {
|
|
98
|
+
if (t?.type === "CODE")
|
|
99
|
+
return t.language || "";
|
|
100
|
+
}
|
|
101
|
+
function b(t, e) {
|
|
102
|
+
return e ? `\`\`\`${e}
|
|
103
|
+
${t}
|
|
104
|
+
\`\`\`` : t;
|
|
105
|
+
}
|
|
106
|
+
function M({ attachment: t, index: e }) {
|
|
107
|
+
const { title: n, content: o, contentType: i, context: s } = t, { contentInputLabel: u, type: a } = i, p = y(i), f = b(o, p), h = d(s) ? [`
|
|
108
|
+
Additional Context:`, l(s)] : [];
|
|
109
|
+
return [
|
|
110
|
+
`#### ATTACHMENT #${e + 1}`,
|
|
111
|
+
`Title: ${n}`,
|
|
112
|
+
`Label: ${u}`,
|
|
113
|
+
`Type: ${a}`,
|
|
114
|
+
"Content:",
|
|
115
|
+
f,
|
|
116
|
+
...h
|
|
117
|
+
].join(`
|
|
118
|
+
`);
|
|
119
|
+
}
|
|
120
|
+
function S(t) {
|
|
121
|
+
if (!t.supportedInputs)
|
|
122
|
+
return t;
|
|
123
|
+
const e = { ...t };
|
|
124
|
+
return e.supportedInputs = t.supportedInputs.map((n) => {
|
|
125
|
+
const o = { ...n };
|
|
126
|
+
return o.type === "MODAL" && (o.workflowModalProps = void 0), o;
|
|
127
|
+
}), e;
|
|
128
|
+
}
|
|
129
|
+
function l(t) {
|
|
130
|
+
if (d(t))
|
|
131
|
+
return t.filter((e) => e != null).join(`
|
|
132
|
+
`);
|
|
133
|
+
}
|
|
134
|
+
function d(t) {
|
|
135
|
+
return Array.isArray(t) && t.length > 0;
|
|
136
|
+
}
|
|
137
|
+
export {
|
|
138
|
+
D as getMessageMetadata,
|
|
139
|
+
x as serializeAttachments,
|
|
140
|
+
$ as serializeWorkflow,
|
|
141
|
+
k as stringifyAttachments
|
|
142
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function a(r,s,o,n){const e=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...n},body:JSON.stringify({query:s,variables:o})});if(!e.ok)throw new Error(`Network response was not OK (status: ${e.status})`);const t=await e.json();if(t.errors?.length)throw new Error(t.errors[0].message);return t.data}exports.graphqlRequest=a;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SearchHit } from '@inkeep/cxkit-types';
|
|
2
|
+
interface GraphQLResponseData {
|
|
3
|
+
search: {
|
|
4
|
+
searchHits: SearchHit[];
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare function graphqlRequest(endpoint: string, query: string, variables: Record<string, unknown>, headers: Record<string, string>): Promise<GraphQLResponseData>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SearchHit } from '@inkeep/cxkit-types';
|
|
2
|
+
interface GraphQLResponseData {
|
|
3
|
+
search: {
|
|
4
|
+
searchHits: SearchHit[];
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare function graphqlRequest(endpoint: string, query: string, variables: Record<string, unknown>, headers: Record<string, string>): Promise<GraphQLResponseData>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
async function a(r, s, o, n) {
|
|
3
|
+
const t = await fetch(r, {
|
|
4
|
+
method: "POST",
|
|
5
|
+
headers: {
|
|
6
|
+
"Content-Type": "application/json",
|
|
7
|
+
...n
|
|
8
|
+
},
|
|
9
|
+
body: JSON.stringify({
|
|
10
|
+
query: s,
|
|
11
|
+
variables: o
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
if (!t.ok)
|
|
15
|
+
throw new Error(`Network response was not OK (status: ${t.status})`);
|
|
16
|
+
const e = await t.json();
|
|
17
|
+
if (e.errors?.length)
|
|
18
|
+
throw new Error(e.errors[0].message);
|
|
19
|
+
return e.data;
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
a as graphqlRequest
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=i=>{const s=/<em>(.*?)<\/em>/gs;let e;const h=[];let t=0;for(;(e=s.exec(i))!==null;){const[l,n]=e;e.index>t&&h.push(i.slice(t,e.index)),h.push({content:n,highlighted:!0}),t=e.index+l.length}return t<i.length&&h.push(i.slice(t)),h};exports.highlightEmphasis=c;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const c = (n) => {
|
|
3
|
+
const t = /<em>(.*?)<\/em>/gs;
|
|
4
|
+
let e;
|
|
5
|
+
const s = [];
|
|
6
|
+
let h = 0;
|
|
7
|
+
for (; (e = t.exec(n)) !== null; ) {
|
|
8
|
+
const [i, l] = e;
|
|
9
|
+
e.index > h && s.push(n.slice(h, e.index)), s.push({ content: l, highlighted: !0 }), h = e.index + i.length;
|
|
10
|
+
}
|
|
11
|
+
return h < n.length && s.push(n.slice(h)), s;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
c as highlightEmphasis
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./misc.cjs"),r=(...n)=>n.map(e=>e?.trim?.()).filter(Boolean).join(" "),c=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,o=n=>{const e={};let i;for(;i=c.exec(n);)e[i[1]]=i[2];return e},l=(n,e)=>{if(s.isString(n)){if(s.isString(e))return`${n};${e}`;n=o(n)}else s.isString(e)&&(e=o(e));return Object.assign({},n??{},e??{})};function f(...n){let e={};for(let i of n){for(let t in e){if(t.startsWith("on")&&typeof e[t]=="function"&&typeof i[t]=="function"){e[t]=s.callAll(i[t],e[t]);continue}if(t==="className"||t==="class"){e[t]=r(e[t],i[t]);continue}if(t==="style"){e[t]=l(e[t],i[t]);continue}e[t]=i[t]!==void 0?i[t]:e[t]}for(let t in i)e[t]===void 0&&(e[t]=i[t])}return e}exports.mergeProps=f;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
type TupleTypes<T extends any[]> = T[number];
|
|
5
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
6
|
+
export declare function mergeProps<T extends Props>(...args: T[]): UnionToIntersection<TupleTypes<T[]>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
type TupleTypes<T extends any[]> = T[number];
|
|
5
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
6
|
+
export declare function mergeProps<T extends Props>(...args: T[]): UnionToIntersection<TupleTypes<T[]>>;
|
|
7
|
+
export {};
|