@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Chakra UI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @inkeep
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function c(t,e,n,r){const o=`${r}/conversations`,i={id:t||void 0,type:"openai",...e},s=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify(i)});if(!s.ok){const a=await s.text();throw new Error(`Failed to log conversation: ${a}`)}return s.json()}async function l(t,e,n){const r=`${n}/conversations/${t}`,o=await fetch(r,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}});if(!o.ok){const i=await o.text();throw new Error(`Failed to get conversation: ${i}`)}return o.json()}exports.getConversation=l;exports.logConversation=c;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ConversationBody, ConversationResponse } from '@inkeep/cxkit-types';
|
|
2
|
+
export declare function logConversation(id: string, body: ConversationBody, apiKey: string, apiUrl: string): Promise<ConversationResponse | undefined>;
|
|
3
|
+
export declare function getConversation(id: string, apiKey: string, apiUrl: string): Promise<ConversationResponse | undefined>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ConversationBody, ConversationResponse } from '@inkeep/cxkit-types';
|
|
2
|
+
export declare function logConversation(id: string, body: ConversationBody, apiKey: string, apiUrl: string): Promise<ConversationResponse | undefined>;
|
|
3
|
+
export declare function getConversation(id: string, apiKey: string, apiUrl: string): Promise<ConversationResponse | undefined>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
async function c(t, e, n, r) {
|
|
3
|
+
const o = `${r}/conversations`, i = {
|
|
4
|
+
id: t || void 0,
|
|
5
|
+
type: "openai",
|
|
6
|
+
...e
|
|
7
|
+
}, s = await fetch(o, {
|
|
8
|
+
method: "POST",
|
|
9
|
+
headers: {
|
|
10
|
+
"Content-Type": "application/json",
|
|
11
|
+
Authorization: `Bearer ${n}`
|
|
12
|
+
},
|
|
13
|
+
body: JSON.stringify(i)
|
|
14
|
+
});
|
|
15
|
+
if (!s.ok) {
|
|
16
|
+
const a = await s.text();
|
|
17
|
+
throw new Error(`Failed to log conversation: ${a}`);
|
|
18
|
+
}
|
|
19
|
+
return s.json();
|
|
20
|
+
}
|
|
21
|
+
async function p(t, e, n) {
|
|
22
|
+
const r = `${n}/conversations/${t}`, o = await fetch(r, {
|
|
23
|
+
headers: {
|
|
24
|
+
"Content-Type": "application/json",
|
|
25
|
+
Authorization: `Bearer ${e}`
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
if (!o.ok) {
|
|
29
|
+
const i = await o.text();
|
|
30
|
+
throw new Error(`Failed to get conversation: ${i}`);
|
|
31
|
+
}
|
|
32
|
+
return o.json();
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
p as getConversation,
|
|
36
|
+
c as logConversation
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function a(e,o,s){const i=`${s}/events`,r={...e,type:e.eventName};if("searchQuery"in e.properties)r.entityType="search",r.searchQuery=e.properties.searchQuery;else if("messageId"in e.properties)r.entityType="message",r.messageId=e.properties.messageId;else{if(r.entityType="conversation",!e.properties.conversationId)return;r.conversationId=e.properties.conversationId}const t=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify(r)});if(!t.ok){const n=await t.text();throw new Error(`Failed to log event: ${n}`)}}exports.logEvent=a;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
async function a(e, o, s) {
|
|
3
|
+
const i = `${s}/events`, r = {
|
|
4
|
+
...e,
|
|
5
|
+
type: e.eventName
|
|
6
|
+
};
|
|
7
|
+
if ("searchQuery" in e.properties)
|
|
8
|
+
r.entityType = "search", r.searchQuery = e.properties.searchQuery;
|
|
9
|
+
else if ("messageId" in e.properties)
|
|
10
|
+
r.entityType = "message", r.messageId = e.properties.messageId;
|
|
11
|
+
else {
|
|
12
|
+
if (r.entityType = "conversation", !e.properties.conversationId) return;
|
|
13
|
+
r.conversationId = e.properties.conversationId;
|
|
14
|
+
}
|
|
15
|
+
const t = await fetch(i, {
|
|
16
|
+
method: "POST",
|
|
17
|
+
headers: {
|
|
18
|
+
"Content-Type": "application/json",
|
|
19
|
+
Authorization: `Bearer ${o}`
|
|
20
|
+
},
|
|
21
|
+
body: JSON.stringify(r)
|
|
22
|
+
});
|
|
23
|
+
if (!t.ok) {
|
|
24
|
+
const n = await t.text();
|
|
25
|
+
throw new Error(`Failed to log event: ${n}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
a as logEvent
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function b(r){const{type:t,messageId:n,reasons:s=[],apiKey:a,apiUrl:i,userProperties:c}=r,d=`${i}/feedback`,o={type:t,messageId:n,createdAt:new Date().toISOString(),userProperties:c};t==="negative"&&(o.reasons=s);const e=await fetch(d,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(o)});if(!e.ok){const u=await e.text();throw new Error(`Failed to send feedback: ${u}`)}return e.json()}exports.submitFeedback=b;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FeedbackType, FeebackReason, UserProperties } from '@inkeep/cxkit-types';
|
|
2
|
+
interface SubmitFeedbackOptions {
|
|
3
|
+
type: FeedbackType;
|
|
4
|
+
messageId: string;
|
|
5
|
+
reasons?: FeebackReason[];
|
|
6
|
+
apiKey: string;
|
|
7
|
+
apiUrl: string;
|
|
8
|
+
userProperties: UserProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare function submitFeedback(options: SubmitFeedbackOptions): Promise<any>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FeedbackType, FeebackReason, UserProperties } from '@inkeep/cxkit-types';
|
|
2
|
+
interface SubmitFeedbackOptions {
|
|
3
|
+
type: FeedbackType;
|
|
4
|
+
messageId: string;
|
|
5
|
+
reasons?: FeebackReason[];
|
|
6
|
+
apiKey: string;
|
|
7
|
+
apiUrl: string;
|
|
8
|
+
userProperties: UserProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare function submitFeedback(options: SubmitFeedbackOptions): Promise<any>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
async function f(n) {
|
|
3
|
+
const { type: t, messageId: r, reasons: s = [], apiKey: a, apiUrl: i, userProperties: c } = n, d = `${i}/feedback`, o = {
|
|
4
|
+
type: t,
|
|
5
|
+
messageId: r,
|
|
6
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7
|
+
userProperties: c
|
|
8
|
+
};
|
|
9
|
+
t === "negative" && (o.reasons = s);
|
|
10
|
+
const e = await fetch(d, {
|
|
11
|
+
method: "POST",
|
|
12
|
+
headers: {
|
|
13
|
+
"Content-Type": "application/json",
|
|
14
|
+
Authorization: `Bearer ${a}`
|
|
15
|
+
},
|
|
16
|
+
body: JSON.stringify(o)
|
|
17
|
+
});
|
|
18
|
+
if (!e.ok) {
|
|
19
|
+
const p = await e.text();
|
|
20
|
+
throw new Error(`Failed to send feedback: ${p}`);
|
|
21
|
+
}
|
|
22
|
+
return e.json();
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
f as submitFeedback
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),C=require("react"),t=require("@radix-ui/react-id"),n=C.forwardRef((s,o)=>{const r=t.useId();return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:o,...s,children:[e.jsx("title",{children:"AI Avatar"}),e.jsx("path",{d:"M9.937 15.5002C9.84772 15.1542 9.66734 14.8384 9.41462 14.5856C9.1619 14.3329 8.84607 14.1525 8.5 14.0632L2.365 12.4812C2.26033 12.4515 2.16821 12.3885 2.10261 12.3017C2.03702 12.2149 2.00153 12.1091 2.00153 12.0002C2.00153 11.8914 2.03702 11.7856 2.10261 11.6988C2.16821 11.612 2.26033 11.549 2.365 11.5192L8.5 9.93625C8.84595 9.84706 9.16169 9.66682 9.4144 9.41429C9.66711 9.16175 9.84757 8.84614 9.937 8.50025L11.519 2.36525C11.5484 2.26017 11.6114 2.16759 11.6983 2.10164C11.7853 2.0357 11.8914 2 12.0005 2C12.1096 2 12.2157 2.0357 12.3027 2.10164C12.3896 2.16759 12.4526 2.26017 12.482 2.36525L14.063 8.50025C14.1523 8.84632 14.3327 9.16215 14.5854 9.41487C14.8381 9.66759 15.1539 9.84797 15.5 9.93725L21.635 11.5182C21.7405 11.5473 21.8335 11.6103 21.8998 11.6973C21.9661 11.7844 22.0021 11.8908 22.0021 12.0002C22.0021 12.1097 21.9661 12.2161 21.8998 12.3032C21.8335 12.3902 21.7405 12.4531 21.635 12.4822L15.5 14.0632C15.1539 14.1525 14.8381 14.3329 14.5854 14.5856C14.3327 14.8384 14.1523 15.1542 14.063 15.5002L12.481 21.6353C12.4516 21.7403 12.3886 21.8329 12.3017 21.8989C12.2147 21.9648 12.1086 22.0005 11.9995 22.0005C11.8904 22.0005 11.7843 21.9648 11.6973 21.8989C11.6104 21.8329 11.5474 21.7403 11.518 21.6353L9.937 15.5002Z",stroke:`url(#${r}-stroke1)`,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M18.9838 5.37522C18.9615 5.28871 18.9164 5.20975 18.8532 5.14657C18.79 5.08339 18.7111 5.0383 18.6246 5.01598L17.0909 4.62049C17.0647 4.61306 17.0417 4.5973 17.0253 4.5756C17.0089 4.5539 17 4.52744 17 4.50024C17 4.47304 17.0089 4.44659 17.0253 4.42488C17.0417 4.40318 17.0647 4.38742 17.0909 4.38L18.6246 3.98426C18.7111 3.96196 18.79 3.9169 18.8532 3.85377C18.9163 3.79064 18.9615 3.71174 18.9838 3.62527L19.3793 2.09155C19.3867 2.06528 19.4024 2.04214 19.4241 2.02565C19.4459 2.00917 19.4724 2.00024 19.4997 2.00024C19.527 2.00024 19.5535 2.00917 19.5752 2.02565C19.597 2.04214 19.6127 2.06528 19.6201 2.09155L20.0153 3.62527C20.0376 3.71178 20.0827 3.79074 20.1459 3.85391C20.2091 3.91709 20.288 3.96219 20.3745 3.98451L21.9082 4.37975C21.9346 4.38702 21.9579 4.40275 21.9744 4.42452C21.991 4.44628 22 4.47288 22 4.50024C22 4.5276 21.991 4.55421 21.9744 4.57597C21.9579 4.59774 21.9346 4.61347 21.9082 4.62074L20.3745 5.01598C20.288 5.0383 20.2091 5.08339 20.1459 5.14657C20.0827 5.20975 20.0376 5.28871 20.0153 5.37522L19.6198 6.90893C19.6124 6.9352 19.5967 6.95835 19.575 6.97483C19.5532 6.99132 19.5267 7.00024 19.4994 7.00024C19.4721 7.00024 19.4456 6.99132 19.4239 6.97483C19.4022 6.95835 19.3864 6.9352 19.3791 6.90893L18.9838 5.37522Z",stroke:`url(#${r}-stroke2)`,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M3.98382 20.3752C3.9615 20.2887 3.9164 20.2098 3.85322 20.1466C3.79005 20.0834 3.71109 20.0383 3.62458 20.016L2.09087 19.6205C2.0647 19.6131 2.04167 19.5973 2.02527 19.5756C2.00887 19.5539 2 19.5274 2 19.5002C2 19.473 2.00887 19.4466 2.02527 19.4249C2.04167 19.4032 2.0647 19.3874 2.09087 19.38L3.62458 18.9843C3.71106 18.962 3.78999 18.9169 3.85317 18.8538C3.91635 18.7906 3.96146 18.7117 3.98382 18.6253L4.37931 17.0916C4.38666 17.0653 4.4024 17.0421 4.42414 17.0257C4.44587 17.0092 4.4724 17.0002 4.49968 17.0002C4.52696 17.0002 4.55349 17.0092 4.57522 17.0257C4.59695 17.0421 4.6127 17.0653 4.62005 17.0916L5.01529 18.6253C5.03761 18.7118 5.0827 18.7907 5.14588 18.8539C5.20906 18.9171 5.28801 18.9622 5.37453 18.9845L6.90824 19.3797C6.93461 19.387 6.95787 19.4027 6.97445 19.4245C6.99102 19.4463 7 19.4729 7 19.5002C7 19.5276 6.99102 19.5542 6.97445 19.576C6.95787 19.5977 6.93461 19.6135 6.90824 19.6207L5.37453 20.016C5.28801 20.0383 5.20906 20.0834 5.14588 20.1466C5.0827 20.2098 5.03761 20.2887 5.01529 20.3752L4.6198 21.9089C4.61245 21.9352 4.5967 21.9583 4.57497 21.9748C4.55324 21.9913 4.52671 22.0002 4.49943 22.0002C4.47215 22.0002 4.44562 21.9913 4.42389 21.9748C4.40215 21.9583 4.38641 21.9352 4.37906 21.9089L3.98382 20.3752Z",stroke:`url(#${r}-stroke3)`,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:`${r}-stroke1`,x1:"0.149625",y1:"0.148102",x2:"23.8539",y2:"23.8524",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),e.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),e.jsxs("linearGradient",{id:`${r}-stroke2`,x1:"16.537",y1:"1.53728",x2:"22.463",y2:"7.46321",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),e.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),e.jsxs("linearGradient",{id:`${r}-stroke3`,x1:"1.53704",y1:"16.5373",x2:"7.46296",y2:"22.4632",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),e.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]})]})]})});exports.default=n;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as C, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { useId as n } from "@radix-ui/react-id";
|
|
5
|
+
const l = s((t, e) => {
|
|
6
|
+
const r = n();
|
|
7
|
+
return /* @__PURE__ */ C("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: e, ...t, children: [
|
|
8
|
+
/* @__PURE__ */ o("title", { children: "AI Avatar" }),
|
|
9
|
+
/* @__PURE__ */ o(
|
|
10
|
+
"path",
|
|
11
|
+
{
|
|
12
|
+
d: "M9.937 15.5002C9.84772 15.1542 9.66734 14.8384 9.41462 14.5856C9.1619 14.3329 8.84607 14.1525 8.5 14.0632L2.365 12.4812C2.26033 12.4515 2.16821 12.3885 2.10261 12.3017C2.03702 12.2149 2.00153 12.1091 2.00153 12.0002C2.00153 11.8914 2.03702 11.7856 2.10261 11.6988C2.16821 11.612 2.26033 11.549 2.365 11.5192L8.5 9.93625C8.84595 9.84706 9.16169 9.66682 9.4144 9.41429C9.66711 9.16175 9.84757 8.84614 9.937 8.50025L11.519 2.36525C11.5484 2.26017 11.6114 2.16759 11.6983 2.10164C11.7853 2.0357 11.8914 2 12.0005 2C12.1096 2 12.2157 2.0357 12.3027 2.10164C12.3896 2.16759 12.4526 2.26017 12.482 2.36525L14.063 8.50025C14.1523 8.84632 14.3327 9.16215 14.5854 9.41487C14.8381 9.66759 15.1539 9.84797 15.5 9.93725L21.635 11.5182C21.7405 11.5473 21.8335 11.6103 21.8998 11.6973C21.9661 11.7844 22.0021 11.8908 22.0021 12.0002C22.0021 12.1097 21.9661 12.2161 21.8998 12.3032C21.8335 12.3902 21.7405 12.4531 21.635 12.4822L15.5 14.0632C15.1539 14.1525 14.8381 14.3329 14.5854 14.5856C14.3327 14.8384 14.1523 15.1542 14.063 15.5002L12.481 21.6353C12.4516 21.7403 12.3886 21.8329 12.3017 21.8989C12.2147 21.9648 12.1086 22.0005 11.9995 22.0005C11.8904 22.0005 11.7843 21.9648 11.6973 21.8989C11.6104 21.8329 11.5474 21.7403 11.518 21.6353L9.937 15.5002Z",
|
|
13
|
+
stroke: `url(#${r}-stroke1)`,
|
|
14
|
+
strokeWidth: "2",
|
|
15
|
+
strokeLinecap: "round",
|
|
16
|
+
strokeLinejoin: "round"
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
/* @__PURE__ */ o(
|
|
20
|
+
"path",
|
|
21
|
+
{
|
|
22
|
+
d: "M18.9838 5.37522C18.9615 5.28871 18.9164 5.20975 18.8532 5.14657C18.79 5.08339 18.7111 5.0383 18.6246 5.01598L17.0909 4.62049C17.0647 4.61306 17.0417 4.5973 17.0253 4.5756C17.0089 4.5539 17 4.52744 17 4.50024C17 4.47304 17.0089 4.44659 17.0253 4.42488C17.0417 4.40318 17.0647 4.38742 17.0909 4.38L18.6246 3.98426C18.7111 3.96196 18.79 3.9169 18.8532 3.85377C18.9163 3.79064 18.9615 3.71174 18.9838 3.62527L19.3793 2.09155C19.3867 2.06528 19.4024 2.04214 19.4241 2.02565C19.4459 2.00917 19.4724 2.00024 19.4997 2.00024C19.527 2.00024 19.5535 2.00917 19.5752 2.02565C19.597 2.04214 19.6127 2.06528 19.6201 2.09155L20.0153 3.62527C20.0376 3.71178 20.0827 3.79074 20.1459 3.85391C20.2091 3.91709 20.288 3.96219 20.3745 3.98451L21.9082 4.37975C21.9346 4.38702 21.9579 4.40275 21.9744 4.42452C21.991 4.44628 22 4.47288 22 4.50024C22 4.5276 21.991 4.55421 21.9744 4.57597C21.9579 4.59774 21.9346 4.61347 21.9082 4.62074L20.3745 5.01598C20.288 5.0383 20.2091 5.08339 20.1459 5.14657C20.0827 5.20975 20.0376 5.28871 20.0153 5.37522L19.6198 6.90893C19.6124 6.9352 19.5967 6.95835 19.575 6.97483C19.5532 6.99132 19.5267 7.00024 19.4994 7.00024C19.4721 7.00024 19.4456 6.99132 19.4239 6.97483C19.4022 6.95835 19.3864 6.9352 19.3791 6.90893L18.9838 5.37522Z",
|
|
23
|
+
stroke: `url(#${r}-stroke2)`,
|
|
24
|
+
strokeLinecap: "round",
|
|
25
|
+
strokeLinejoin: "round"
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ o(
|
|
29
|
+
"path",
|
|
30
|
+
{
|
|
31
|
+
d: "M3.98382 20.3752C3.9615 20.2887 3.9164 20.2098 3.85322 20.1466C3.79005 20.0834 3.71109 20.0383 3.62458 20.016L2.09087 19.6205C2.0647 19.6131 2.04167 19.5973 2.02527 19.5756C2.00887 19.5539 2 19.5274 2 19.5002C2 19.473 2.00887 19.4466 2.02527 19.4249C2.04167 19.4032 2.0647 19.3874 2.09087 19.38L3.62458 18.9843C3.71106 18.962 3.78999 18.9169 3.85317 18.8538C3.91635 18.7906 3.96146 18.7117 3.98382 18.6253L4.37931 17.0916C4.38666 17.0653 4.4024 17.0421 4.42414 17.0257C4.44587 17.0092 4.4724 17.0002 4.49968 17.0002C4.52696 17.0002 4.55349 17.0092 4.57522 17.0257C4.59695 17.0421 4.6127 17.0653 4.62005 17.0916L5.01529 18.6253C5.03761 18.7118 5.0827 18.7907 5.14588 18.8539C5.20906 18.9171 5.28801 18.9622 5.37453 18.9845L6.90824 19.3797C6.93461 19.387 6.95787 19.4027 6.97445 19.4245C6.99102 19.4463 7 19.4729 7 19.5002C7 19.5276 6.99102 19.5542 6.97445 19.576C6.95787 19.5977 6.93461 19.6135 6.90824 19.6207L5.37453 20.016C5.28801 20.0383 5.20906 20.0834 5.14588 20.1466C5.0827 20.2098 5.03761 20.2887 5.01529 20.3752L4.6198 21.9089C4.61245 21.9352 4.5967 21.9583 4.57497 21.9748C4.55324 21.9913 4.52671 22.0002 4.49943 22.0002C4.47215 22.0002 4.44562 21.9913 4.42389 21.9748C4.40215 21.9583 4.38641 21.9352 4.37906 21.9089L3.98382 20.3752Z",
|
|
32
|
+
stroke: `url(#${r}-stroke3)`,
|
|
33
|
+
strokeLinecap: "round",
|
|
34
|
+
strokeLinejoin: "round"
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ C("defs", { children: [
|
|
38
|
+
/* @__PURE__ */ C(
|
|
39
|
+
"linearGradient",
|
|
40
|
+
{
|
|
41
|
+
id: `${r}-stroke1`,
|
|
42
|
+
x1: "0.149625",
|
|
43
|
+
y1: "0.148102",
|
|
44
|
+
x2: "23.8539",
|
|
45
|
+
y2: "23.8524",
|
|
46
|
+
gradientUnits: "userSpaceOnUse",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ o("stop", { offset: "0.287444", stopColor: "var(--start-color)" }),
|
|
49
|
+
/* @__PURE__ */ o("stop", { offset: "0.728693", stopColor: "var(--end-color)" })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ C(
|
|
54
|
+
"linearGradient",
|
|
55
|
+
{
|
|
56
|
+
id: `${r}-stroke2`,
|
|
57
|
+
x1: "16.537",
|
|
58
|
+
y1: "1.53728",
|
|
59
|
+
x2: "22.463",
|
|
60
|
+
y2: "7.46321",
|
|
61
|
+
gradientUnits: "userSpaceOnUse",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ o("stop", { offset: "0.287444", stopColor: "var(--start-color)" }),
|
|
64
|
+
/* @__PURE__ */ o("stop", { offset: "0.728693", stopColor: "var(--end-color)" })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ C(
|
|
69
|
+
"linearGradient",
|
|
70
|
+
{
|
|
71
|
+
id: `${r}-stroke3`,
|
|
72
|
+
x1: "1.53704",
|
|
73
|
+
y1: "16.5373",
|
|
74
|
+
x2: "7.46296",
|
|
75
|
+
y2: "22.4632",
|
|
76
|
+
gradientUnits: "userSpaceOnUse",
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ o("stop", { offset: "0.287444", stopColor: "var(--start-color)" }),
|
|
79
|
+
/* @__PURE__ */ o("stop", { offset: "0.728693", stopColor: "var(--end-color)" })
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] })
|
|
84
|
+
] });
|
|
85
|
+
});
|
|
86
|
+
export {
|
|
87
|
+
l as default
|
|
88
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("react"),q=s.forwardRef((t,r)=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"32px",viewBox:"0 96 960 960",width:"32px",ref:r,...t,children:[e.jsx("title",{children:"User Avatar"}),e.jsx("path",{d:"M222 801q63-40 124.5-60.5T480 720q72 0 134 20.5T739 801q44-54 62.5-109T820 576q0-145-97.5-242.5T480 236q-145 0-242.5 97.5T140 576q0 61 19 116t63 109Zm257.814-195Q422 606 382.5 566.314q-39.5-39.686-39.5-97.5t39.686-97.314q39.686-39.5 97.5-39.5t97.314 39.686q39.5 39.686 39.5 97.5T577.314 566.5q-39.686 39.5-97.5 39.5Zm-.219 370q-83.146 0-156.275-31.5t-127.225-86Q142 804 111 731.159 80 658.319 80 575.5q0-82.819 31.5-155.659Q143 347 197.5 293t127.341-85.5Q397.681 176 480.5 176q82.819 0 155.659 31.5Q709 239 763 293t85.5 127Q880 493 880 575.734q0 82.734-31.5 155.5T763 858.5q-54 54.5-127.129 86T479.595 976Z",fill:"currentColor"})]}));exports.default=q;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as o } from "react";
|
|
4
|
+
const l = o((r, q) => /* @__PURE__ */ e(
|
|
5
|
+
"svg",
|
|
6
|
+
{
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
height: "32px",
|
|
9
|
+
viewBox: "0 96 960 960",
|
|
10
|
+
width: "32px",
|
|
11
|
+
ref: q,
|
|
12
|
+
...r,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ t("title", { children: "User Avatar" }),
|
|
15
|
+
/* @__PURE__ */ t(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M222 801q63-40 124.5-60.5T480 720q72 0 134 20.5T739 801q44-54 62.5-109T820 576q0-145-97.5-242.5T480 236q-145 0-242.5 97.5T140 576q0 61 19 116t63 109Zm257.814-195Q422 606 382.5 566.314q-39.5-39.686-39.5-97.5t39.686-97.314q39.686-39.5 97.5-39.5t97.314 39.686q39.5 39.686 39.5 97.5T577.314 566.5q-39.686 39.5-97.5 39.5Zm-.219 370q-83.146 0-156.275-31.5t-127.225-86Q142 804 111 731.159 80 658.319 80 575.5q0-82.819 31.5-155.659Q143 347 197.5 293t127.341-85.5Q397.681 176 480.5 176q82.819 0 155.659 31.5Q709 239 763 293t85.5 127Q880 493 880 575.734q0 82.734-31.5 155.5T763 858.5q-54 54.5-127.129 86T479.595 976Z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
));
|
|
25
|
+
export {
|
|
26
|
+
l as default
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("prism-react-renderer"),f=require("@inkeep/cxkit-color-mode"),S=require("../../hooks/use-copy-to-clipboard.cjs"),v=require("../../providers/config-provider.cjs"),B=require("../../utils/misc.cjs"),I=require("../icons/custom-icon.cjs"),o=require("../markdown/components.cjs"),L=t.themes.oneLight,M=t.themes.vsDark,R=({className:l="",children:d,onCopy:a})=>{const c=l.replace(/^language-/,""),r=String(d).replace(/\n$/,""),[i,h]=S.useCopyToClipboard(),{baseSettings:s}=v.useInkeepConfig(),g=s.theme?.syntaxHighlighter,{lightTheme:p=L,darkTheme:u=M}=g??{},C=f.useColorModeValue(p,u),m=()=>{h(r),a?.(c,r)};return e.jsxs(o.CodeblockContainer,{children:[e.jsxs(o.CodeblockHeader,{children:[e.jsx(o.CodeblockHeaderLanguage,{children:c}),e.jsx(o.CodeblockCopyButton,{"aria-label":"Copy to clipboard",onClick:m,"data-copied":B.dataAttr(i),children:e.jsx(I.CustomIcon,{iconKey:i?"codeCopied":"codeCopy"})})]}),e.jsx(o.CodeblockHighlighterWrapper,{children:e.jsx(t.Highlight,{theme:C,code:r,language:c,prism:s.prism,children:({className:k,tokens:b,getLineProps:x,getTokenProps:j,style:y})=>e.jsx(o.CodeblockHighlighter,{className:k,children:e.jsx(o.CodeblockCode,{style:y,children:b.map((n,q)=>e.jsx("div",{...x({line:n}),children:n.map((T,H)=>e.jsx("span",{...j({token:T})},H))},q))})})})})]})};exports.CodeBlock=R;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface CodeProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
children: string;
|
|
4
|
+
/**
|
|
5
|
+
* Callback when the code is copied.
|
|
6
|
+
* Receives the current language and code that's copied.
|
|
7
|
+
*/
|
|
8
|
+
onCopy?: (language: string, code: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const CodeBlock: ({ className, children, onCopy }: CodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface CodeProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
children: string;
|
|
4
|
+
/**
|
|
5
|
+
* Callback when the code is copied.
|
|
6
|
+
* Receives the current language and code that's copied.
|
|
7
|
+
*/
|
|
8
|
+
onCopy?: (language: string, code: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const CodeBlock: ({ className, children, onCopy }: CodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { themes as l, Highlight as L } from "prism-react-renderer";
|
|
3
|
+
import { useColorModeValue as S } from "@inkeep/cxkit-color-mode";
|
|
4
|
+
import { useCopyToClipboard as j } from "../../hooks/use-copy-to-clipboard.js";
|
|
5
|
+
import { useInkeepConfig as v } from "../../providers/config-provider.js";
|
|
6
|
+
import { dataAttr as B } from "../../utils/misc.js";
|
|
7
|
+
import { CustomIcon as D } from "../icons/custom-icon.js";
|
|
8
|
+
import { CodeblockContainer as I, CodeblockHeader as N, CodeblockHeaderLanguage as A, CodeblockCopyButton as K, CodeblockHighlighterWrapper as M, CodeblockHighlighter as V, CodeblockCode as W } from "../markdown/components.js";
|
|
9
|
+
const $ = l.oneLight, q = l.vsDark, R = ({ className: a = "", children: d, onCopy: h }) => {
|
|
10
|
+
const o = a.replace(/^language-/, ""), r = String(d).replace(/\n$/, ""), [t, p] = j(), { baseSettings: i } = v(), m = i.theme?.syntaxHighlighter, { lightTheme: s = $, darkTheme: g = q } = m ?? {}, C = S(s, g);
|
|
11
|
+
return /* @__PURE__ */ n(I, { children: [
|
|
12
|
+
/* @__PURE__ */ n(N, { children: [
|
|
13
|
+
/* @__PURE__ */ e(A, { children: o }),
|
|
14
|
+
/* @__PURE__ */ e(
|
|
15
|
+
K,
|
|
16
|
+
{
|
|
17
|
+
"aria-label": "Copy to clipboard",
|
|
18
|
+
onClick: () => {
|
|
19
|
+
p(r), h?.(o, r);
|
|
20
|
+
},
|
|
21
|
+
"data-copied": B(t),
|
|
22
|
+
children: /* @__PURE__ */ e(D, { iconKey: t ? "codeCopied" : "codeCopy" })
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
|
|
27
|
+
L,
|
|
28
|
+
{
|
|
29
|
+
theme: C,
|
|
30
|
+
code: r,
|
|
31
|
+
language: o,
|
|
32
|
+
prism: i.prism,
|
|
33
|
+
children: ({ className: k, tokens: u, getLineProps: b, getTokenProps: f, style: y }) => /* @__PURE__ */ e(V, { className: k, children: /* @__PURE__ */ e(W, { style: y, children: u.map((c, H) => /* @__PURE__ */ e("div", { ...b({ line: c }), children: c.map((T, x) => /* @__PURE__ */ e("span", { ...f({ token: T }) }, x)) }, H)) }) })
|
|
34
|
+
}
|
|
35
|
+
) })
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
R as CodeBlock
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),o=require("react"),i=require("../utils/generate-uid.cjs"),k=require("../providers/config-provider.cjs"),h=require("dequal");function p(){const{baseSettings:n}=k.useInkeepConfig(),[s,d]=o.useState([]),r=c(n.theme.styles),{customStyles:y,linksCount:a}=o.useMemo(()=>{if(!r||!Array.isArray(r))return{customStyles:null,loaded:!0};const{links:l,styleSheets:m}=r.reduce((e,t)=>(t.type==="link"?e.links.push(t):t.type==="style"&&e.styleSheets.push(t),e),{links:[],styleSheets:[]}),S=m.map(e=>u.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??i.generatePrefixedUniqueId("link_"))),f=l.map(e=>{const t=e.key??i.generatePrefixedUniqueId("stylesheet_");return u.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{d(g=>[...new Set([...g,e.value])])}},t)});return{customStyles:u.jsxs(u.Fragment,{children:[f,S]}),linksCount:l.length}},[r]);return{customStyles:y,loaded:s.length>=(a??0)}}function c(n){const s=o.useRef(void 0);return h.dequal(s.current,n)||(s.current=n),s.current}exports.useCompareMemoize=c;exports.useCustomStyles=p;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l, jsxs as p, Fragment as k } from "react/jsx-runtime";
|
|
3
|
+
import { useState as h, useMemo as S, useRef as g } from "react";
|
|
4
|
+
import { generatePrefixedUniqueId as u } from "../utils/generate-uid.js";
|
|
5
|
+
import { useInkeepConfig as x } from "../providers/config-provider.js";
|
|
6
|
+
import { dequal as L } from "dequal";
|
|
7
|
+
function A() {
|
|
8
|
+
const { baseSettings: n } = x(), [s, i] = h([]), r = C(n.theme.styles), { customStyles: y, linksCount: c } = S(() => {
|
|
9
|
+
if (!r || !Array.isArray(r)) return { customStyles: null, loaded: !0 };
|
|
10
|
+
const { links: o, styleSheets: d } = r.reduce(
|
|
11
|
+
(e, t) => (t.type === "link" ? e.links.push(t) : t.type === "style" && e.styleSheets.push(t), e),
|
|
12
|
+
{ links: [], styleSheets: [] }
|
|
13
|
+
), m = d.map((e) => /* @__PURE__ */ l(
|
|
14
|
+
"style",
|
|
15
|
+
{
|
|
16
|
+
type: "text/css",
|
|
17
|
+
dangerouslySetInnerHTML: { __html: e.value }
|
|
18
|
+
},
|
|
19
|
+
e.key ?? u("link_")
|
|
20
|
+
)), a = o.map((e) => {
|
|
21
|
+
const t = e.key ?? u("stylesheet_");
|
|
22
|
+
return /* @__PURE__ */ l(
|
|
23
|
+
"link",
|
|
24
|
+
{
|
|
25
|
+
id: t,
|
|
26
|
+
rel: "stylesheet",
|
|
27
|
+
type: "text/css",
|
|
28
|
+
href: e.value,
|
|
29
|
+
onLoad: () => {
|
|
30
|
+
i((f) => [.../* @__PURE__ */ new Set([...f, e.value])]);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
t
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
customStyles: /* @__PURE__ */ p(k, { children: [
|
|
38
|
+
a,
|
|
39
|
+
m
|
|
40
|
+
] }),
|
|
41
|
+
linksCount: o.length
|
|
42
|
+
};
|
|
43
|
+
}, [r]);
|
|
44
|
+
return {
|
|
45
|
+
customStyles: y,
|
|
46
|
+
loaded: s.length >= (c ?? 0)
|
|
47
|
+
// >= in case a url is removed
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function C(n) {
|
|
51
|
+
const s = g(void 0);
|
|
52
|
+
return L(s.current, n) || (s.current = n), s.current;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
C as useCompareMemoize,
|
|
56
|
+
A as useCustomStyles
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),F=require("react"),w=require("@radix-ui/react-context"),m=require("@radix-ui/react-id"),M=require("@radix-ui/react-use-controllable-state"),k=require("@radix-ui/react-dismissable-layer"),H=require("@radix-ui/react-focus-scope"),b=require("@radix-ui/react-presence"),p=require("@radix-ui/react-primitive"),L=require("@radix-ui/react-focus-guards"),G=require("react-remove-scroll"),U=require("aria-hidden"),z=require("@radix-ui/react-slot"),C=require("../utils/compose-refs.cjs"),d=require("../utils/compose-event-handlers.cjs");function K(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=K(F),R="Dialog",[V,Y]=w.createContextScope(R),[Z,u]=V(R),O=e=>{const{__scopeDialog:o,children:t,open:s,defaultOpen:n,onOpenChange:c,modal:l=!0}=e,a=i.useRef(null),g=i.useRef(null),[f=!1,D]=M.useControllableState({prop:s,defaultProp:n,onChange:c});return r.jsx(Z,{scope:o,triggerRef:a,contentRef:g,contentId:m.useId(),titleId:m.useId(),descriptionId:m.useId(),open:f,onOpenChange:D,onOpenToggle:i.useCallback(()=>D(A=>!A),[D]),modal:l,children:t})};O.displayName=R;const E="DialogTrigger",j=i.forwardRef((e,o)=>{const{__scopeDialog:t,...s}=e,n=u(E,t),c=C.useComposedRefs(o,n.triggerRef);return r.jsx(p.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":_(n.open),...s,ref:c,onClick:d.composeEventHandlers(e.onClick,n.onOpenToggle)})});j.displayName=E;const h="DialogOverlay",I=i.forwardRef((e,o)=>r.jsx(b.Presence,{present:!0,children:r.jsx(B,{...e,ref:o})}));I.displayName=h;const B=i.forwardRef((e,o)=>{const{__scopeDialog:t,...s}=e,n=u(h,t);return r.jsx(G.RemoveScroll,{as:z.Slot,allowPinchZoom:!0,shards:[n.contentRef],enabled:n.open,children:r.jsx(p.Primitive.div,{"data-state":_(n.open),...s,ref:o,style:{pointerEvents:"auto",...s.style}})})}),v="DialogContent",x=i.forwardRef((e,o)=>r.jsx(b.Presence,{present:!0,children:r.jsx(J,{...e,ref:o})}));x.displayName=v;const J=i.forwardRef((e,o)=>{const t=u(v,e.__scopeDialog),s=i.useRef(null),n=C.useComposedRefs(o,t.contentRef,s);return i.useEffect(()=>{const c=s.current;if(c)return U.hideOthers(c)},[]),r.jsx(Q,{...e,ref:n,trapFocus:t.open,disableOutsidePointerEvents:!1,onCloseAutoFocus:d.composeEventHandlers(e.onCloseAutoFocus,c=>{c.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:d.composeEventHandlers(e.onPointerDownOutside,c=>{if(!t.open)return;const l=c.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&c.preventDefault()}),onFocusOutside:d.composeEventHandlers(e.onFocusOutside,c=>{c.preventDefault()})})}),Q=i.forwardRef((e,o)=>{const{__scopeDialog:t,trapFocus:s,onOpenAutoFocus:n,onCloseAutoFocus:c,...l}=e,a=u(v,t),g=i.useRef(null),f=C.useComposedRefs(o,g);return L.useFocusGuards(),r.jsx(r.Fragment,{children:r.jsx(H.FocusScope,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:n,onUnmountAutoFocus:c,children:r.jsx(k.DismissableLayer,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":_(a.open),...l,ref:f,onDismiss:()=>a.onOpenChange(!1)})})})}),T="DialogTitle",y=i.forwardRef((e,o)=>{const{__scopeDialog:t,...s}=e,n=u(T,t);return r.jsx(p.Primitive.h2,{id:n.titleId,...s,ref:o})});y.displayName=T;const N="DialogDescription",S=i.forwardRef((e,o)=>{const{__scopeDialog:t,...s}=e,n=u(N,t);return r.jsx(p.Primitive.p,{id:n.descriptionId,...s,ref:o})});S.displayName=N;const q="DialogClose",P=i.forwardRef((e,o)=>{const{__scopeDialog:t,...s}=e,n=u(q,t);return r.jsx(p.Primitive.button,{type:"button",...s,ref:o,onClick:d.composeEventHandlers(e.onClick,()=>n.onOpenChange(!1))})});P.displayName=q;function _(e){return e?"open":"closed"}const W=O,X=I,$=x,ee=y,oe=P;exports.Close=oe;exports.Content=$;exports.Dialog=O;exports.DialogClose=P;exports.DialogContent=x;exports.DialogDescription=S;exports.DialogTitle=y;exports.DialogTrigger=j;exports.Overlay=X;exports.Root=W;exports.Title=ee;exports.createDialogScope=Y;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
2
|
+
import { FocusScope } from '@radix-ui/react-focus-scope';
|
|
3
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
4
|
+
import { CreateScope } from '@radix-ui/react-context';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
declare const createDialogScope: CreateScope;
|
|
7
|
+
interface DialogProps {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
onOpenChange?(open: boolean): void;
|
|
12
|
+
modal?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Dialog: React.FC<DialogProps>;
|
|
15
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
16
|
+
interface DialogTriggerProps extends PrimitiveButtonProps {
|
|
17
|
+
}
|
|
18
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
interface DialogOverlayProps extends DialogOverlayImplProps {
|
|
20
|
+
}
|
|
21
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
22
|
+
interface DialogOverlayImplProps extends PrimitiveDivProps {
|
|
23
|
+
}
|
|
24
|
+
interface DialogContentProps extends DialogContentTypeProps {
|
|
25
|
+
}
|
|
26
|
+
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
interface DialogContentTypeProps extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {
|
|
28
|
+
}
|
|
29
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
30
|
+
type FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;
|
|
31
|
+
interface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {
|
|
32
|
+
/**
|
|
33
|
+
* When `true`, focus cannot escape the `Content` via keyboard,
|
|
34
|
+
* pointer, or a programmatic focus.
|
|
35
|
+
* @defaultValue false
|
|
36
|
+
*/
|
|
37
|
+
trapFocus?: FocusScopeProps['trapped'];
|
|
38
|
+
/**
|
|
39
|
+
* Event handler called when auto-focusing on open.
|
|
40
|
+
* Can be prevented.
|
|
41
|
+
*/
|
|
42
|
+
onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
|
|
43
|
+
/**
|
|
44
|
+
* Event handler called when auto-focusing on close.
|
|
45
|
+
* Can be prevented.
|
|
46
|
+
*/
|
|
47
|
+
onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
|
|
48
|
+
}
|
|
49
|
+
type PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;
|
|
50
|
+
interface DialogTitleProps extends PrimitiveHeading2Props {
|
|
51
|
+
}
|
|
52
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
53
|
+
type PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;
|
|
54
|
+
interface DialogDescriptionProps extends PrimitiveParagraphProps {
|
|
55
|
+
}
|
|
56
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
57
|
+
interface DialogCloseProps extends PrimitiveButtonProps {
|
|
58
|
+
}
|
|
59
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
60
|
+
declare const Root: React.FC<DialogProps>;
|
|
61
|
+
declare const Trigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
62
|
+
declare const Overlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
declare const Content: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
+
declare const Title: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
65
|
+
declare const Description: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
66
|
+
declare const Close: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
67
|
+
export { createDialogScope, Dialog, DialogTrigger, DialogContent, DialogTitle, DialogDescription, DialogClose, Root, Trigger, Overlay, Content, Title, Description, Close, };
|
|
68
|
+
export type { DialogProps, DialogTriggerProps, DialogOverlayProps, DialogContentProps, DialogTitleProps, DialogDescriptionProps, DialogCloseProps, };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
2
|
+
import { FocusScope } from '@radix-ui/react-focus-scope';
|
|
3
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
4
|
+
import { CreateScope } from '@radix-ui/react-context';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
declare const createDialogScope: CreateScope;
|
|
7
|
+
interface DialogProps {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
onOpenChange?(open: boolean): void;
|
|
12
|
+
modal?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Dialog: React.FC<DialogProps>;
|
|
15
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
16
|
+
interface DialogTriggerProps extends PrimitiveButtonProps {
|
|
17
|
+
}
|
|
18
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
interface DialogOverlayProps extends DialogOverlayImplProps {
|
|
20
|
+
}
|
|
21
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
22
|
+
interface DialogOverlayImplProps extends PrimitiveDivProps {
|
|
23
|
+
}
|
|
24
|
+
interface DialogContentProps extends DialogContentTypeProps {
|
|
25
|
+
}
|
|
26
|
+
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
interface DialogContentTypeProps extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {
|
|
28
|
+
}
|
|
29
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
30
|
+
type FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;
|
|
31
|
+
interface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {
|
|
32
|
+
/**
|
|
33
|
+
* When `true`, focus cannot escape the `Content` via keyboard,
|
|
34
|
+
* pointer, or a programmatic focus.
|
|
35
|
+
* @defaultValue false
|
|
36
|
+
*/
|
|
37
|
+
trapFocus?: FocusScopeProps['trapped'];
|
|
38
|
+
/**
|
|
39
|
+
* Event handler called when auto-focusing on open.
|
|
40
|
+
* Can be prevented.
|
|
41
|
+
*/
|
|
42
|
+
onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
|
|
43
|
+
/**
|
|
44
|
+
* Event handler called when auto-focusing on close.
|
|
45
|
+
* Can be prevented.
|
|
46
|
+
*/
|
|
47
|
+
onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
|
|
48
|
+
}
|
|
49
|
+
type PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;
|
|
50
|
+
interface DialogTitleProps extends PrimitiveHeading2Props {
|
|
51
|
+
}
|
|
52
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
53
|
+
type PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;
|
|
54
|
+
interface DialogDescriptionProps extends PrimitiveParagraphProps {
|
|
55
|
+
}
|
|
56
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
57
|
+
interface DialogCloseProps extends PrimitiveButtonProps {
|
|
58
|
+
}
|
|
59
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
60
|
+
declare const Root: React.FC<DialogProps>;
|
|
61
|
+
declare const Trigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
62
|
+
declare const Overlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
declare const Content: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
+
declare const Title: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
65
|
+
declare const Description: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
66
|
+
declare const Close: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
67
|
+
export { createDialogScope, Dialog, DialogTrigger, DialogContent, DialogTitle, DialogDescription, DialogClose, Root, Trigger, Overlay, Content, Title, Description, Close, };
|
|
68
|
+
export type { DialogProps, DialogTriggerProps, DialogOverlayProps, DialogContentProps, DialogTitleProps, DialogDescriptionProps, DialogCloseProps, };
|