@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 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./utils/description-without-title.cjs"),c=(t,i)=>{if(i==="chatSourceItem")return t.description??void 0;const e=t.breadcrumbs??[],r=e.length>0?e[e.length-1]:void 0,n=t.title||r?.props?.str;return o.descriptionWithoutTitle(t.description,n)};exports.getDescription=c;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { descriptionWithoutTitle as o } from "./utils/description-without-title.js";
|
|
3
|
+
const s = (t, r) => {
|
|
4
|
+
if (r === "chatSourceItem") return t.description ?? void 0;
|
|
5
|
+
const i = t.breadcrumbs ?? [], e = i.length > 0 ? i[i.length - 1] : void 0, n = t.title || e?.props?.str;
|
|
6
|
+
return o(t.description, n);
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
s as getDescription
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./utils/misc.cjs"),n=e=>{let t="LuBookOpen";return e.type==="documentation"&&e.contentType==="book"?t="IoBookOutline":e.type==="documentation"&&e.contentType==="pdf"?t="FaFilePdf":e.type==="github_issue"||i.isGitHubUrl(e.url)?t="FaGithub":e.type==="discourse"?t="FaDiscourse":e.type==="discord"?t="FaDiscord":e.type==="slack_message"?t="FaSlack":e.type==="stackoverflow"&&(t="FaStackOverflow"),{builtIn:t}};exports.getIcon=n;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { isGitHubUrl as i } from "./utils/misc.js";
|
|
3
|
+
const l = (e) => {
|
|
4
|
+
let t = "LuBookOpen";
|
|
5
|
+
return e.type === "documentation" && e.contentType === "book" ? t = "IoBookOutline" : e.type === "documentation" && e.contentType === "pdf" ? t = "FaFilePdf" : e.type === "github_issue" || i(e.url) ? t = "FaGithub" : e.type === "discourse" ? t = "FaDiscourse" : e.type === "discord" ? t = "FaDiscord" : e.type === "slack_message" ? t = "FaSlack" : e.type === "stackoverflow" && (t = "FaStackOverflow"), { builtIn: t };
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
l as getIcon
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./breadcrumbs.cjs"),n=require("./description.cjs"),a=require("./icon.cjs"),d=require("./tabs.cjs"),o=require("./title.cjs"),l=(e,r,t)=>({id:e.id,title:o.getTitle(e,t),description:n.getDescription(e,r),breadcrumbs:i.getBreadcrumbs(e,t),icon:a.getIcon(e),tabs:d.getTabs(e,t),url:e.url,tag:e.tag,type:e.type,shouldOpenInNewTab:void 0,appendToUrl:void 0});exports.defaultTransformSource=l;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getBreadcrumbs as e } from "./breadcrumbs.js";
|
|
2
|
+
import { getDescription as m } from "./description.js";
|
|
3
|
+
import { getIcon as o } from "./icon.js";
|
|
4
|
+
import { getTabs as n } from "./tabs.js";
|
|
5
|
+
import { getTitle as p } from "./title.js";
|
|
6
|
+
const T = (t, i, r) => ({
|
|
7
|
+
id: t.id,
|
|
8
|
+
title: p(t, r),
|
|
9
|
+
description: m(t, i),
|
|
10
|
+
breadcrumbs: e(t, r),
|
|
11
|
+
icon: o(t),
|
|
12
|
+
tabs: n(t, r),
|
|
13
|
+
url: t.url,
|
|
14
|
+
tag: t.tag,
|
|
15
|
+
type: t.type,
|
|
16
|
+
shouldOpenInNewTab: void 0,
|
|
17
|
+
appendToUrl: void 0
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
T as defaultTransformSource
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./utils/misc.cjs"),b=(t,a)=>{const s=[];t.type==="documentation"&&t.contentType==="book"?s.push("Publications"):t.type==="documentation"&&t.contentType==="pdf"&&s.push("PDFs"),(t.type==="github_issue"||p.isGitHubUrl(t.url))&&s.push("GitHub"),t.type==="discourse"&&s.push("Forums"),t.type==="discord"&&s.push("Discord"),t.type==="slack_message"&&s.push("Slack"),t.type==="stackoverflow"&&s.push("StackOverflow");const i=[],n=a?.tabs?.map(e=>typeof e=="string"?e:e[0]);for(const e of s)n?.includes(e)&&(e===t.breadcrumbs?.[0]?i.push([e,{breadcrumbs:t.breadcrumbs?.slice(1)}]):i.push(e));return i};exports.getTabs=b;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { isGitHubUrl as n } from "./utils/misc.js";
|
|
3
|
+
const o = (t, p) => {
|
|
4
|
+
const s = [];
|
|
5
|
+
t.type === "documentation" && t.contentType === "book" ? s.push("Publications") : t.type === "documentation" && t.contentType === "pdf" && s.push("PDFs"), (t.type === "github_issue" || n(t.url)) && s.push("GitHub"), t.type === "discourse" && s.push("Forums"), t.type === "discord" && s.push("Discord"), t.type === "slack_message" && s.push("Slack"), t.type === "stackoverflow" && s.push("StackOverflow");
|
|
6
|
+
const e = [], a = p?.tabs?.map((i) => typeof i == "string" ? i : i[0]);
|
|
7
|
+
for (const i of s)
|
|
8
|
+
a?.includes(i) && (i === t.breadcrumbs?.[0] ? e.push([i, { breadcrumbs: t.breadcrumbs?.slice(1) }]) : e.push(i));
|
|
9
|
+
return e;
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
o as getTabs
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./utils/strip-branding-keywords.cjs"),s=require("./utils/standardize-suffixes.cjs"),a=(i,r)=>{let e=i.title;if(!e)return"";const t=r?.organizationDisplayName;return e=s.standardizeSuffixes(e),t&&(e=n.stripBrandingKeywords(e,t)),e};exports.getTitle=a;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { stripBrandingKeywords as n } from "./utils/strip-branding-keywords.js";
|
|
3
|
+
import { standardizeSuffixes as o } from "./utils/standardize-suffixes.js";
|
|
4
|
+
const f = (r, e) => {
|
|
5
|
+
let t = r.title;
|
|
6
|
+
if (!t) return "";
|
|
7
|
+
const i = e?.organizationDisplayName;
|
|
8
|
+
return t = o(t), i && (t = n(t, i)), t;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
f as getTitle
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function u(t,i){if(!t)return;if(!i)return t;const e=i.trim(),r=[e,`<em>${e}</em>`].find(n=>t.startsWith(n));return r?t.slice(r.length).trim():t}exports.descriptionWithoutTitle=u;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Some sources include the title in the description.
|
|
3
|
+
*
|
|
4
|
+
* This function removes the title from the description.
|
|
5
|
+
* It handles both plain and em-wrapped titles.
|
|
6
|
+
*
|
|
7
|
+
* @param description - The description to remove the title from.
|
|
8
|
+
* @param title - The title to remove from the description.
|
|
9
|
+
* @returns The description without the title.
|
|
10
|
+
*/
|
|
11
|
+
export declare function descriptionWithoutTitle(description: string | undefined, title: string | undefined): string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Some sources include the title in the description.
|
|
3
|
+
*
|
|
4
|
+
* This function removes the title from the description.
|
|
5
|
+
* It handles both plain and em-wrapped titles.
|
|
6
|
+
*
|
|
7
|
+
* @param description - The description to remove the title from.
|
|
8
|
+
* @param title - The title to remove from the description.
|
|
9
|
+
* @returns The description without the title.
|
|
10
|
+
*/
|
|
11
|
+
export declare function descriptionWithoutTitle(description: string | undefined, title: string | undefined): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./misc.cjs"),e=require("./standardize-organization-display-name.cjs"),s=require("./strip-branding-keywords.cjs"),t=require("./description-without-title.cjs"),r=require("./standardize-suffixes.cjs"),a=require("./standardize-common-words.cjs");exports.isGitHubUrl=i.isGitHubUrl;exports.isTitleCase=i.isTitleCase;exports.standardizeOrganizationDisplayName=e.standardizeOrganizationDisplayName;exports.stripBrandingKeywords=s.stripBrandingKeywords;exports.descriptionWithoutTitle=t.descriptionWithoutTitle;exports.standardizeSuffixes=r.standardizeSuffixes;exports.suffixMap=r.suffixMap;exports.transformCommonWords=a.transformCommonWords;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isGitHubUrl as i, isTitleCase as t } from "./misc.js";
|
|
2
|
+
import { standardizeOrganizationDisplayName as s } from "./standardize-organization-display-name.js";
|
|
3
|
+
import { stripBrandingKeywords as f } from "./strip-branding-keywords.js";
|
|
4
|
+
import { descriptionWithoutTitle as p } from "./description-without-title.js";
|
|
5
|
+
import { standardizeSuffixes as d, suffixMap as x } from "./standardize-suffixes.js";
|
|
6
|
+
import { transformCommonWords as u } from "./standardize-common-words.js";
|
|
7
|
+
export {
|
|
8
|
+
p as descriptionWithoutTitle,
|
|
9
|
+
i as isGitHubUrl,
|
|
10
|
+
t as isTitleCase,
|
|
11
|
+
s as standardizeOrganizationDisplayName,
|
|
12
|
+
d as standardizeSuffixes,
|
|
13
|
+
f as stripBrandingKeywords,
|
|
14
|
+
x as suffixMap,
|
|
15
|
+
u as transformCommonWords
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(t){return t.toLowerCase().replace(/(^\w+:|^)\/\//,"").replace(/^www\./,"").replace(/\/$/,"").startsWith("github.com")}function s(t){const r=t.split(" ");for(const e of r)if(e[0]!==e[0].toUpperCase()||e.slice(1)!==e.slice(1).toLowerCase())return!1;return!0}exports.isGitHubUrl=i;exports.isTitleCase=s;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function o(r) {
|
|
3
|
+
return r.toLowerCase().replace(/(^\w+:|^)\/\//, "").replace(/^www\./, "").replace(/\/$/, "").startsWith("github.com");
|
|
4
|
+
}
|
|
5
|
+
function s(r) {
|
|
6
|
+
const t = r.split(" ");
|
|
7
|
+
for (const e of t)
|
|
8
|
+
if (e[0] !== e[0].toUpperCase() || e.slice(1) !== e.slice(1).toLowerCase())
|
|
9
|
+
return !1;
|
|
10
|
+
return !0;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
o as isGitHubUrl,
|
|
14
|
+
s as isTitleCase
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../common-words/short.cjs"),a=require("../common-words/lowercase.cjs"),i=require("../common-words/long.cjs");function c(n){return`\\b${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`}function s(n,e,t,r=!1){return r&&new RegExp(`^${t}\\b`,"i").test(n)?n:n.replace(new RegExp(t,"gi"),e)}function l(n){let e=n;return e=a.lowercase.reduce((t,r)=>{const o=c(r);return s(t,r,o,!0)},e),e=i.long.reduce((t,r)=>{const o=c(r);return s(t,r,o)},e),e=u.short.reduce((t,r)=>{const o=c(r);return s(t,r,o)},e),e}exports.transformCommonWords=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function transformCommonWords(text: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function transformCommonWords(text: string): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { short as i } from "../common-words/short.js";
|
|
3
|
+
import { lowercase as s } from "../common-words/lowercase.js";
|
|
4
|
+
import { long as a } from "../common-words/long.js";
|
|
5
|
+
function o(n) {
|
|
6
|
+
return `\\b${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`;
|
|
7
|
+
}
|
|
8
|
+
function u(n, r, t, e = !1) {
|
|
9
|
+
return e && new RegExp(`^${t}\\b`, "i").test(n) ? n : n.replace(new RegExp(t, "gi"), r);
|
|
10
|
+
}
|
|
11
|
+
function g(n) {
|
|
12
|
+
let r = n;
|
|
13
|
+
return r = s.reduce((t, e) => {
|
|
14
|
+
const c = o(e);
|
|
15
|
+
return u(t, e, c, !0);
|
|
16
|
+
}, r), r = a.reduce((t, e) => {
|
|
17
|
+
const c = o(e);
|
|
18
|
+
return u(t, e, c);
|
|
19
|
+
}, r), r = i.reduce((t, e) => {
|
|
20
|
+
const c = o(e);
|
|
21
|
+
return u(t, e, c);
|
|
22
|
+
}, r), r;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
g as transformCommonWords
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./misc.cjs");function t(e,i){if(!s.isTitleCase(i))return e;const r=`\\b${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`;return new RegExp(`^${r}\\b`,"i").test(e)?e:e.replace(new RegExp(r,"gi"),i)}exports.standardizeOrganizationDisplayName=t;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
/**
|
|
3
|
+
* Standardize the organization display name in the text
|
|
4
|
+
*
|
|
5
|
+
* If someone writes your organization name with different casing (e.g., “InKeep,” “INKEEP”),
|
|
6
|
+
* the rule will enforce a consistent, normalized spelling (e.g., “Inkeep”)
|
|
7
|
+
*/
|
|
8
|
+
export declare function standardizeOrganizationDisplayName(text: string, organization: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
/**
|
|
3
|
+
* Standardize the organization display name in the text
|
|
4
|
+
*
|
|
5
|
+
* If someone writes your organization name with different casing (e.g., “InKeep,” “INKEEP”),
|
|
6
|
+
* the rule will enforce a consistent, normalized spelling (e.g., “Inkeep”)
|
|
7
|
+
*/
|
|
8
|
+
export declare function standardizeOrganizationDisplayName(text: string, organization: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { isTitleCase as s } from "./misc.js";
|
|
3
|
+
function p(e, r) {
|
|
4
|
+
if (!s(r)) return e;
|
|
5
|
+
const i = `\\b${r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`;
|
|
6
|
+
return new RegExp(`^${i}\\b`, "i").test(e) ? e : e.replace(new RegExp(i, "gi"), r);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
p as standardizeOrganizationDisplayName
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={js:".js",db:"DB",sql:"SQL"};function a(t){return Object.entries(e).reduce((s,[n,r])=>{const i=new RegExp(`([a-zA-Z0-9])${n}(?!\\w)`,"g");return s.replace(i,(f,u)=>u+r)},t)}exports.standardizeSuffixes=a;exports.suffixMap=e;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const u = {
|
|
3
|
+
js: ".js",
|
|
4
|
+
db: "DB",
|
|
5
|
+
sql: "SQL"
|
|
6
|
+
};
|
|
7
|
+
function i(e) {
|
|
8
|
+
return Object.entries(u).reduce((t, [n, r]) => {
|
|
9
|
+
const s = new RegExp(`([a-zA-Z0-9])${n}(?!\\w)`, "g");
|
|
10
|
+
return t.replace(s, (a, c) => c + r);
|
|
11
|
+
}, e);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
i as standardizeSuffixes,
|
|
15
|
+
u as suffixMap
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(s,t){const e=["API","Docs","Documentation","Blogs",t],n=["\\|","-",":"],o=new RegExp(`^\\s*(${e.join("|")})(\\.\\w+)?\\s*(${n.join("|")})\\s*`,"gi"),r=new RegExp(`\\s*(${n.join("|")})\\s*(${e.join("|")})\\s*$`,"gi");return s.replace(o,"").replace(r,"").trim()}exports.stripBrandingKeywords=i;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip common branding keywords and organization name from the text
|
|
3
|
+
*
|
|
4
|
+
* This function removes branding elements from text in the following formats:
|
|
5
|
+
* - Organization name or keywords at start/end with pipe, hyphen or colon separator
|
|
6
|
+
* - Organization name with optional domain suffix (.com, .ai, etc)
|
|
7
|
+
* - Common documentation keywords like "API", "Docs", etc.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* Given the organizationDisplayName 'inkeep', it would match and replace:
|
|
11
|
+
* 'Inkeep | Some Title' -> 'Some Title'
|
|
12
|
+
* 'Some Title - INKEEP' -> 'Some Title'
|
|
13
|
+
* 'inkeep.ai: Title' -> 'Title'
|
|
14
|
+
* 'Title | Inkeep.com' -> 'Title'
|
|
15
|
+
* 'API Documentation | Title' -> 'Title'
|
|
16
|
+
*/
|
|
17
|
+
export declare function stripBrandingKeywords(text: string, organization: string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip common branding keywords and organization name from the text
|
|
3
|
+
*
|
|
4
|
+
* This function removes branding elements from text in the following formats:
|
|
5
|
+
* - Organization name or keywords at start/end with pipe, hyphen or colon separator
|
|
6
|
+
* - Organization name with optional domain suffix (.com, .ai, etc)
|
|
7
|
+
* - Common documentation keywords like "API", "Docs", etc.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* Given the organizationDisplayName 'inkeep', it would match and replace:
|
|
11
|
+
* 'Inkeep | Some Title' -> 'Some Title'
|
|
12
|
+
* 'Some Title - INKEEP' -> 'Some Title'
|
|
13
|
+
* 'inkeep.ai: Title' -> 'Title'
|
|
14
|
+
* 'Title | Inkeep.com' -> 'Title'
|
|
15
|
+
* 'API Documentation | Title' -> 'Title'
|
|
16
|
+
*/
|
|
17
|
+
export declare function stripBrandingKeywords(text: string, organization: string): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function r(s, o) {
|
|
3
|
+
const e = ["API", "Docs", "Documentation", "Blogs", o], n = ["\\|", "-", ":"], t = new RegExp(
|
|
4
|
+
`^\\s*(${e.join("|")})(\\.\\w+)?\\s*(${n.join("|")})\\s*`,
|
|
5
|
+
"gi"
|
|
6
|
+
), i = new RegExp(
|
|
7
|
+
`\\s*(${n.join("|")})\\s*(${e.join("|")})\\s*$`,
|
|
8
|
+
"gi"
|
|
9
|
+
);
|
|
10
|
+
return s.replace(t, "").replace(i, "").trim();
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
r as stripBrandingKeywords
|
|
14
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@inkeep/cxkit-primitives",
|
|
3
|
+
"version": "0.0.0-dev-20250221234142",
|
|
4
|
+
"description": "",
|
|
5
|
+
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
|
+
"homepage": "",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/inkeep/widget",
|
|
10
|
+
"directory": "packages/primitives"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "dist/index.cjs",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"clean-package": "../../clean-package.config.json",
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@radix-ui/react-avatar": "1.1.2",
|
|
24
|
+
"@radix-ui/react-checkbox": "1.1.3",
|
|
25
|
+
"@radix-ui/react-context": "^1.1.1",
|
|
26
|
+
"@radix-ui/react-dialog": "1.1.4",
|
|
27
|
+
"@radix-ui/react-dismissable-layer": "^1.1.5",
|
|
28
|
+
"@radix-ui/react-focus-guards": "^1.1.1",
|
|
29
|
+
"@radix-ui/react-focus-scope": "^1.1.2",
|
|
30
|
+
"@radix-ui/react-id": "^1.1.0",
|
|
31
|
+
"@radix-ui/react-popover": "1.1.4",
|
|
32
|
+
"@radix-ui/react-presence": "^1.1.2",
|
|
33
|
+
"@radix-ui/react-primitive": "^2.0.2",
|
|
34
|
+
"@radix-ui/react-scroll-area": "1.2.2",
|
|
35
|
+
"@radix-ui/react-select": "2.1.4",
|
|
36
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
37
|
+
"@radix-ui/react-tabs": "1.1.2",
|
|
38
|
+
"@radix-ui/react-tooltip": "1.1.6",
|
|
39
|
+
"@radix-ui/react-use-controllable-state": "^1.1.0",
|
|
40
|
+
"altcha-lib": "^1.2.0",
|
|
41
|
+
"aria-hidden": "^1.2.4",
|
|
42
|
+
"cmdk": "1.0.4",
|
|
43
|
+
"dequal": "^2.0.3",
|
|
44
|
+
"humps": "2.0.1",
|
|
45
|
+
"merge-anything": "6.0.2",
|
|
46
|
+
"openai": "4.78.1",
|
|
47
|
+
"prism-react-renderer": "2.4.1",
|
|
48
|
+
"react-hook-form": "7.54.2",
|
|
49
|
+
"react-icons": "5.4.0",
|
|
50
|
+
"react-markdown": "9.0.3",
|
|
51
|
+
"react-remove-scroll": "^2.6.3",
|
|
52
|
+
"react-svg": "16.3.0",
|
|
53
|
+
"react-textarea-autosize": "8.5.7",
|
|
54
|
+
"rehype-raw": "7.0.0",
|
|
55
|
+
"unist-util-visit": "^5.0.0",
|
|
56
|
+
"@inkeep/cxkit-color-mode": "0.0.0-dev-20250221234142",
|
|
57
|
+
"@inkeep/cxkit-theme": "0.0.0-dev-20250221234142",
|
|
58
|
+
"@inkeep/cxkit-types": "0.0.0-dev-20250221234142"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@biomejs/biome": "1.9.4",
|
|
62
|
+
"@testing-library/dom": "10.4.0",
|
|
63
|
+
"@testing-library/jest-dom": "6.6.3",
|
|
64
|
+
"@testing-library/react": "16.1.0",
|
|
65
|
+
"@testing-library/user-event": "14.5.2",
|
|
66
|
+
"@types/humps": "2.0.6",
|
|
67
|
+
"@types/jsdom": "21.1.7",
|
|
68
|
+
"@types/react": "19.0.7",
|
|
69
|
+
"@types/react-dom": "19.0.3",
|
|
70
|
+
"@vitejs/plugin-react": "4.3.4",
|
|
71
|
+
"clean-package": "2.2.0",
|
|
72
|
+
"globby": "14.0.2",
|
|
73
|
+
"jsdom": "25.0.1",
|
|
74
|
+
"react": "19.0.0",
|
|
75
|
+
"react-dom": "19.0.0",
|
|
76
|
+
"resize-observer-polyfill": "1.5.1",
|
|
77
|
+
"typescript": "5.7.3",
|
|
78
|
+
"vite": "5.4.11",
|
|
79
|
+
"vite-plugin-dts": "4.4.0",
|
|
80
|
+
"vitest": "2.1.8",
|
|
81
|
+
"vitest-axe": "1.0.0-pre.3"
|
|
82
|
+
},
|
|
83
|
+
"peerDependencies": {
|
|
84
|
+
"react": ">=17.0.0",
|
|
85
|
+
"react-dom": ">=17.0.0"
|
|
86
|
+
},
|
|
87
|
+
"module": "dist/index.js",
|
|
88
|
+
"types": "dist/index.d.ts",
|
|
89
|
+
"exports": {
|
|
90
|
+
".": {
|
|
91
|
+
"source": "./src/index.ts",
|
|
92
|
+
"import": {
|
|
93
|
+
"types": "./dist/index.d.ts",
|
|
94
|
+
"default": "./dist/index.js"
|
|
95
|
+
},
|
|
96
|
+
"require": {
|
|
97
|
+
"types": "./dist/index.d.cts",
|
|
98
|
+
"default": "./dist/index.cjs"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"./package.json": "./package.json"
|
|
102
|
+
},
|
|
103
|
+
"scripts": {
|
|
104
|
+
"build": "vite build",
|
|
105
|
+
"dev": "vite build --watch",
|
|
106
|
+
"lint": "biome lint ./src",
|
|
107
|
+
"test": "vitest",
|
|
108
|
+
"test:ci": "vitest --run",
|
|
109
|
+
"typecheck": "tsc"
|
|
110
|
+
}
|
|
111
|
+
}
|