@flamingo-stack/openframe-frontend-core 0.0.204 → 0.0.205
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/dist/{chunk-4CWSZPXH.cjs → chunk-24KCAECR.cjs} +9 -9
- package/dist/{chunk-4CWSZPXH.cjs.map → chunk-24KCAECR.cjs.map} +1 -1
- package/dist/chunk-27APPAJN.cjs +24 -0
- package/dist/chunk-27APPAJN.cjs.map +1 -0
- package/dist/{chunk-UC43NICZ.cjs → chunk-664KA5FI.cjs} +2 -35
- package/dist/chunk-664KA5FI.cjs.map +1 -0
- package/dist/chunk-6RZYJICV.cjs +24 -0
- package/dist/chunk-6RZYJICV.cjs.map +1 -0
- package/dist/chunk-7L4DWM7P.js +24 -0
- package/dist/chunk-7L4DWM7P.js.map +1 -0
- package/dist/chunk-BZFW3FOF.cjs +21 -0
- package/dist/chunk-BZFW3FOF.cjs.map +1 -0
- package/dist/{chunk-N57KWHDB.js → chunk-CIPO6DXK.js} +5 -5
- package/dist/chunk-EL5YVPD5.js +21 -0
- package/dist/chunk-EL5YVPD5.js.map +1 -0
- package/dist/{chunk-ARQ4XP64.cjs → chunk-FDCFI7YT.cjs} +40080 -31492
- package/dist/chunk-FDCFI7YT.cjs.map +1 -0
- package/dist/chunk-G7UE6RKV.cjs +121 -0
- package/dist/chunk-G7UE6RKV.cjs.map +1 -0
- package/dist/{chunk-25LVV26X.cjs → chunk-JUZGUQMX.cjs} +178 -50
- package/dist/chunk-JUZGUQMX.cjs.map +1 -0
- package/dist/{chunk-SZPJ5R5B.js → chunk-KSOOKNBG.js} +1 -34
- package/dist/chunk-KSOOKNBG.js.map +1 -0
- package/dist/{chunk-RMB5DVED.cjs → chunk-KUZGEA7U.cjs} +83 -66
- package/dist/chunk-KUZGEA7U.cjs.map +1 -0
- package/dist/chunk-LXC6P2EO.js +63 -0
- package/dist/chunk-LXC6P2EO.js.map +1 -0
- package/dist/chunk-MJNXIEV2.js +24 -0
- package/dist/chunk-MJNXIEV2.js.map +1 -0
- package/dist/{chunk-CPXLQ57U.js → chunk-MVGGXOFA.js} +37 -20
- package/dist/chunk-MVGGXOFA.js.map +1 -0
- package/dist/{chunk-LY34ORX6.js → chunk-O55ZUAX7.js} +39920 -31332
- package/dist/chunk-O55ZUAX7.js.map +1 -0
- package/dist/chunk-OHPI2HRK.js +47 -0
- package/dist/chunk-OHPI2HRK.js.map +1 -0
- package/dist/chunk-PLJLE4A4.js +121 -0
- package/dist/chunk-PLJLE4A4.js.map +1 -0
- package/dist/{chunk-XGL5FKIK.js → chunk-SCN5WFIZ.js} +148 -20
- package/dist/chunk-SCN5WFIZ.js.map +1 -0
- package/dist/chunk-WBR7H6E3.cjs +47 -0
- package/dist/chunk-WBR7H6E3.cjs.map +1 -0
- package/dist/chunk-XL4V2PYG.cjs +63 -0
- package/dist/chunk-XL4V2PYG.cjs.map +1 -0
- package/dist/components/announcement-bar.d.ts.map +1 -1
- package/dist/components/chat/chat-attachment-bar.d.ts +66 -0
- package/dist/components/chat/chat-attachment-bar.d.ts.map +1 -0
- package/dist/components/chat/chat-container.d.ts +21 -1
- package/dist/components/chat/chat-container.d.ts.map +1 -1
- package/dist/components/chat/chat-input.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/chat-panel-context.d.ts +9 -0
- package/dist/components/chat/chat-panel-context.d.ts.map +1 -0
- package/dist/components/chat/chat-ticket-list.d.ts +1 -1
- package/dist/components/chat/chat-ticket-list.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.d.ts +42 -0
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/admin-content-card.d.ts +34 -0
- package/dist/components/chat/entity-cards/admin-content-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/block-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/blog-card.d.ts +30 -0
- package/dist/components/chat/entity-cards/blog-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/blog-image-placeholder.d.ts +26 -0
- package/dist/components/chat/entity-cards/blog-image-placeholder.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/campaign-card-admin.d.ts +33 -0
- package/dist/components/chat/entity-cards/campaign-card-admin.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/case-study-card.d.ts +20 -0
- package/dist/components/chat/entity-cards/case-study-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/chat-ticket-item.d.ts.map +1 -0
- package/dist/components/chat/{chat-video-entity-card.d.ts → entity-cards/chat-video-entity-card.d.ts} +1 -1
- package/dist/components/chat/entity-cards/chat-video-entity-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/customer-interview-card.d.ts +19 -0
- package/dist/components/chat/entity-cards/customer-interview-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/data-room-doc-card.d.ts +47 -0
- package/dist/components/chat/entity-cards/data-room-doc-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/dispatch.d.ts +119 -0
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/entity-author-card.d.ts +87 -0
- package/dist/components/chat/entity-cards/entity-author-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/generic-entity-card.d.ts +42 -0
- package/dist/components/chat/entity-cards/generic-entity-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/github-activity-card.d.ts +37 -0
- package/dist/components/chat/entity-cards/github-activity-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/hubspot-ticket-card.d.ts +28 -0
- package/dist/components/chat/entity-cards/hubspot-ticket-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/index.d.ts +32 -0
- package/dist/components/chat/entity-cards/index.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/investor-update-card.d.ts +19 -0
- package/dist/components/chat/entity-cards/investor-update-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts +20 -0
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/product-release-card-defaults.d.ts +21 -0
- package/dist/components/chat/entity-cards/product-release-card-defaults.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/product-release-card.d.ts +12 -0
- package/dist/components/chat/entity-cards/product-release-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/program-card-defaults.d.ts +32 -0
- package/dist/components/chat/entity-cards/program-card-defaults.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/program-card.d.ts +37 -0
- package/dist/components/chat/entity-cards/program-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/roadmap-card.d.ts +28 -0
- package/dist/components/chat/entity-cards/roadmap-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/roadmap-vote-button.d.ts +12 -0
- package/dist/components/chat/entity-cards/roadmap-vote-button.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/slack-message-card.d.ts +28 -0
- package/dist/components/chat/entity-cards/slack-message-card.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/task-type-icon.d.ts +6 -0
- package/dist/components/chat/entity-cards/task-type-icon.d.ts.map +1 -0
- package/dist/components/chat/hooks/index.d.ts +10 -0
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-chat-attachment-image-gallery.d.ts +5 -0
- package/dist/components/chat/hooks/use-chat-attachment-image-gallery.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-chat-attachments.d.ts +33 -0
- package/dist/components/chat/hooks/use-chat-attachments.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-chat-card-item.d.ts +7 -0
- package/dist/components/chat/hooks/use-chat-card-item.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-chat-identity.d.ts +44 -0
- package/dist/components/chat/hooks/use-chat-identity.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-chat.d.ts +30 -0
- package/dist/components/chat/hooks/use-chat.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-close-on-navigation.d.ts +2 -0
- package/dist/components/chat/hooks/use-close-on-navigation.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-embedded-chat.d.ts +174 -0
- package/dist/components/chat/hooks/use-embedded-chat.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-proxied-image-url.d.ts +18 -0
- package/dist/components/chat/hooks/use-proxied-image-url.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-slash-commands.d.ts +32 -0
- package/dist/components/chat/hooks/use-slash-commands.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-sse.d.ts +57 -0
- package/dist/components/chat/hooks/use-sse.d.ts.map +1 -0
- package/dist/components/chat/index.cjs +393 -0
- package/dist/components/chat/index.cjs.map +1 -0
- package/dist/components/chat/index.d.ts +5 -3
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +393 -0
- package/dist/components/chat/index.js.map +1 -0
- package/dist/components/chat/nav-link-anchor-via-runtime.d.ts +33 -0
- package/dist/components/chat/nav-link-anchor-via-runtime.d.ts.map +1 -0
- package/dist/components/chat/source-action-button.d.ts +39 -0
- package/dist/components/chat/source-action-button.d.ts.map +1 -0
- package/dist/components/chat/types/chat.types.d.ts +36 -0
- package/dist/components/chat/types/chat.types.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +56 -11
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/entities/blog.d.ts +14 -0
- package/dist/components/chat/types/entities/blog.d.ts.map +1 -0
- package/dist/components/chat/types/entities/case-study.d.ts +10 -0
- package/dist/components/chat/types/entities/case-study.d.ts.map +1 -0
- package/dist/components/chat/types/entities/content-ref.d.ts +23 -0
- package/dist/components/chat/types/entities/content-ref.d.ts.map +1 -0
- package/dist/components/chat/types/entities/customer-interview.d.ts +10 -0
- package/dist/components/chat/types/entities/customer-interview.d.ts.map +1 -0
- package/dist/components/chat/types/entities/data-room-doc.d.ts +37 -0
- package/dist/components/chat/types/entities/data-room-doc.d.ts.map +1 -0
- package/dist/components/chat/types/entities/github-activity.d.ts +29 -0
- package/dist/components/chat/types/entities/github-activity.d.ts.map +1 -0
- package/dist/components/chat/types/entities/hubspot-ticket.d.ts +39 -0
- package/dist/components/chat/types/entities/hubspot-ticket.d.ts.map +1 -0
- package/dist/components/chat/types/entities/index.d.ts +28 -0
- package/dist/components/chat/types/entities/index.d.ts.map +1 -0
- package/dist/components/chat/types/entities/investor-update.d.ts +83 -0
- package/dist/components/chat/types/entities/investor-update.d.ts.map +1 -0
- package/dist/components/chat/types/entities/onboarding-guide.d.ts +79 -0
- package/dist/components/chat/types/entities/onboarding-guide.d.ts.map +1 -0
- package/dist/components/chat/types/entities/program-types.d.ts +303 -0
- package/dist/components/chat/types/entities/program-types.d.ts.map +1 -0
- package/dist/components/chat/types/entities/roadmap-item.d.ts +41 -0
- package/dist/components/chat/types/entities/roadmap-item.d.ts.map +1 -0
- package/dist/components/chat/types/entities/slack-message.d.ts +28 -0
- package/dist/components/chat/types/entities/slack-message.d.ts.map +1 -0
- package/dist/components/chat/types/index.d.ts +1 -0
- package/dist/components/chat/types/index.d.ts.map +1 -1
- package/dist/components/chat/utils/agent-status-message.d.ts +18 -0
- package/dist/components/chat/utils/agent-status-message.d.ts.map +1 -0
- package/dist/components/chat/utils/auto-continuation-directive.d.ts +38 -0
- package/dist/components/chat/utils/auto-continuation-directive.d.ts.map +1 -0
- package/dist/components/chat/utils/chat-attachment-markdown.d.ts +114 -0
- package/dist/components/chat/utils/chat-attachment-markdown.d.ts.map +1 -0
- package/dist/components/chat/utils/chat-authed-fetch.d.ts +13 -0
- package/dist/components/chat/utils/chat-authed-fetch.d.ts.map +1 -0
- package/dist/components/chat/utils/chat-nav-resolution.d.ts +72 -0
- package/dist/components/chat/utils/chat-nav-resolution.d.ts.map +1 -0
- package/dist/components/chat/utils/chat-proxy-auth-storage.d.ts +43 -0
- package/dist/components/chat/utils/chat-proxy-auth-storage.d.ts.map +1 -0
- package/dist/components/chat/utils/chip-action-class.d.ts +16 -0
- package/dist/components/chat/utils/chip-action-class.d.ts.map +1 -0
- package/dist/components/chat/utils/chip-styles.d.ts +32 -0
- package/dist/components/chat/utils/chip-styles.d.ts.map +1 -0
- package/dist/components/chat/utils/clickup-task-type-utils.d.ts +38 -0
- package/dist/components/chat/utils/clickup-task-type-utils.d.ts.map +1 -0
- package/dist/components/chat/utils/compact-card-classes.d.ts +50 -0
- package/dist/components/chat/utils/compact-card-classes.d.ts.map +1 -0
- package/dist/components/chat/utils/decide-new-tab.d.ts +39 -0
- package/dist/components/chat/utils/decide-new-tab.d.ts.map +1 -0
- package/dist/components/chat/utils/external-app-urls.d.ts +14 -0
- package/dist/components/chat/utils/external-app-urls.d.ts.map +1 -0
- package/dist/components/chat/utils/flatten-assistant-content.d.ts +25 -0
- package/dist/components/chat/utils/flatten-assistant-content.d.ts.map +1 -0
- package/dist/components/chat/utils/icon-registry.d.ts +67 -0
- package/dist/components/chat/utils/icon-registry.d.ts.map +1 -0
- package/dist/components/chat/utils/index.d.ts +21 -0
- package/dist/components/chat/utils/index.d.ts.map +1 -1
- package/dist/components/chat/utils/is-cross-origin-url.d.ts +22 -0
- package/dist/components/chat/utils/is-cross-origin-url.d.ts.map +1 -0
- package/dist/components/chat/utils/nav-anchor-props.d.ts +54 -0
- package/dist/components/chat/utils/nav-anchor-props.d.ts.map +1 -0
- package/dist/components/chat/utils/nav-click-handler.d.ts +51 -0
- package/dist/components/chat/utils/nav-click-handler.d.ts.map +1 -0
- package/dist/components/chat/utils/scroll-anchor.d.ts +30 -0
- package/dist/components/chat/utils/scroll-anchor.d.ts.map +1 -0
- package/dist/components/chat/utils/slash-dispatch-utils.d.ts +109 -0
- package/dist/components/chat/utils/slash-dispatch-utils.d.ts.map +1 -0
- package/dist/components/chat/utils/source-icons.d.ts +8 -0
- package/dist/components/chat/utils/source-icons.d.ts.map +1 -0
- package/dist/components/chat/utils/source-row-cta.d.ts +111 -0
- package/dist/components/chat/utils/source-row-cta.d.ts.map +1 -0
- package/dist/components/features/figma-prototype-viewer.d.ts.map +1 -1
- package/dist/components/features/index.cjs +12 -6
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +11 -5
- package/dist/components/features/video.d.ts.map +1 -1
- package/dist/components/icons/index.cjs +3 -3
- package/dist/components/icons/index.js +2 -2
- package/dist/components/index.cjs +274 -8
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +273 -7
- package/dist/components/interactive-wrapper.d.ts +3 -3
- package/dist/components/navigation/index.cjs +12 -6
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.js +11 -5
- package/dist/components/resizable.d.ts +1 -1
- package/dist/components/shared/product-release/product-release-card-skeleton.d.ts +1 -1
- package/dist/components/shared/product-release/product-release-card-skeleton.d.ts.map +1 -1
- package/dist/components/shared/product-release/product-release-card.d.ts +19 -12
- package/dist/components/shared/product-release/product-release-card.d.ts.map +1 -1
- package/dist/components/shared/product-release/release-detail-page.d.ts +2 -4
- package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts +13 -0
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/dashboard-info-card.d.ts.map +1 -1
- package/dist/components/ui/entity-image.d.ts.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +71 -70
- package/dist/components/ui/file-manager/index.cjs.map +1 -1
- package/dist/components/ui/file-manager/index.js +6 -5
- package/dist/components/ui/file-manager/index.js.map +1 -1
- package/dist/components/ui/hover-dropdown.d.ts +66 -0
- package/dist/components/ui/hover-dropdown.d.ts.map +1 -0
- package/dist/components/ui/index.cjs +276 -6
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +278 -8
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/contexts/chat-runtime-context.d.ts +109 -0
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -0
- package/dist/contexts/endpoints-runtime-context.d.ts +28 -0
- package/dist/contexts/endpoints-runtime-context.d.ts.map +1 -0
- package/dist/contexts/index.cjs +30 -0
- package/dist/contexts/index.cjs.map +1 -0
- package/dist/contexts/index.d.ts +26 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/contexts/index.js +30 -0
- package/dist/contexts/index.js.map +1 -0
- package/dist/contexts/use-outer-or-default.d.ts +29 -0
- package/dist/contexts/use-outer-or-default.d.ts.map +1 -0
- package/dist/embed-shims/index.cjs +51 -0
- package/dist/embed-shims/index.cjs.map +1 -0
- package/dist/embed-shims/index.d.ts +31 -0
- package/dist/embed-shims/index.d.ts.map +1 -0
- package/dist/embed-shims/index.js +51 -0
- package/dist/embed-shims/index.js.map +1 -0
- package/dist/embed-shims/next-dynamic.cjs +12 -0
- package/dist/embed-shims/next-dynamic.cjs.map +1 -0
- package/dist/embed-shims/next-dynamic.d.ts +47 -0
- package/dist/embed-shims/next-dynamic.d.ts.map +1 -0
- package/dist/embed-shims/next-dynamic.js +12 -0
- package/dist/embed-shims/next-dynamic.js.map +1 -0
- package/dist/embed-shims/next-image.cjs +12 -0
- package/dist/embed-shims/next-image.cjs.map +1 -0
- package/dist/embed-shims/next-image.d.ts +28 -0
- package/dist/embed-shims/next-image.d.ts.map +1 -0
- package/dist/embed-shims/next-image.js +12 -0
- package/dist/embed-shims/next-image.js.map +1 -0
- package/dist/embed-shims/next-link.cjs +14 -0
- package/dist/embed-shims/next-link.cjs.map +1 -0
- package/dist/embed-shims/next-link.d.ts +22 -0
- package/dist/embed-shims/next-link.d.ts.map +1 -0
- package/dist/embed-shims/next-link.js +14 -0
- package/dist/embed-shims/next-link.js.map +1 -0
- package/dist/embed-shims/next-navigation.cjs +30 -0
- package/dist/embed-shims/next-navigation.cjs.map +1 -0
- package/dist/embed-shims/next-navigation.d.ts +46 -0
- package/dist/embed-shims/next-navigation.d.ts.map +1 -0
- package/dist/embed-shims/next-navigation.js +30 -0
- package/dist/embed-shims/next-navigation.js.map +1 -0
- package/dist/hooks/index.cjs +10 -4
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +9 -3
- package/dist/hooks/use-access-code-integration.d.ts +48 -0
- package/dist/hooks/use-access-code-integration.d.ts.map +1 -0
- package/dist/hooks/use-contact-submission.d.ts.map +1 -1
- package/dist/hooks/use-og-placeholder.d.ts +31 -0
- package/dist/hooks/use-og-placeholder.d.ts.map +1 -0
- package/dist/hooks/use-toast.d.ts +1 -1
- package/dist/index.cjs +367 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +378 -18
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/access-code-client.d.ts +21 -37
- package/dist/utils/access-code-client.d.ts.map +1 -1
- package/dist/utils/cn.d.ts +0 -27
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/color-analysis.d.ts +33 -0
- package/dist/utils/color-analysis.d.ts.map +1 -0
- package/dist/utils/date-formatters.d.ts +16 -5
- package/dist/utils/date-formatters.d.ts.map +1 -1
- package/dist/utils/fetch-priority.d.ts +3 -0
- package/dist/utils/fetch-priority.d.ts.map +1 -0
- package/dist/utils/format.d.ts +192 -1
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/image-proxy.d.ts +67 -2
- package/dist/utils/image-proxy.d.ts.map +1 -1
- package/dist/utils/index.cjs +1274 -155
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +19 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1200 -157
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/local-storage-adapter.d.ts +46 -0
- package/dist/utils/local-storage-adapter.d.ts.map +1 -0
- package/dist/utils/source-icons.d.ts +78 -0
- package/dist/utils/source-icons.d.ts.map +1 -0
- package/package.json +29 -2
- package/src/components/announcement-bar.tsx +26 -4
- package/src/components/categories-cart.tsx +1 -1
- package/src/components/chat/chat-attachment-bar.tsx +323 -0
- package/src/components/chat/chat-container.tsx +39 -5
- package/src/components/chat/chat-input.tsx +7 -1
- package/src/components/chat/chat-message-enhanced.tsx +32 -22
- package/src/components/chat/chat-message-list.tsx +53 -4
- package/src/components/chat/chat-panel-context.tsx +37 -0
- package/src/components/chat/chat-ticket-list.tsx +1 -1
- package/src/components/chat/embeddable-chat.tsx +1106 -0
- package/src/components/chat/entity-cards/admin-content-card.tsx +155 -0
- package/src/components/chat/entity-cards/blog-card.tsx +259 -0
- package/src/components/chat/entity-cards/blog-image-placeholder.tsx +52 -0
- package/src/components/chat/entity-cards/campaign-card-admin.tsx +113 -0
- package/src/components/chat/entity-cards/case-study-card.tsx +192 -0
- package/src/components/chat/{chat-ticket-item.tsx → entity-cards/chat-ticket-item.tsx} +2 -2
- package/src/components/chat/{chat-video-entity-card.tsx → entity-cards/chat-video-entity-card.tsx} +2 -2
- package/src/components/chat/entity-cards/customer-interview-card.tsx +211 -0
- package/src/components/chat/entity-cards/data-room-doc-card.tsx +120 -0
- package/src/components/chat/entity-cards/dispatch.tsx +1093 -0
- package/src/components/chat/entity-cards/entity-author-card.tsx +193 -0
- package/src/components/chat/entity-cards/generic-entity-card.tsx +144 -0
- package/src/components/chat/entity-cards/github-activity-card.tsx +305 -0
- package/src/components/chat/entity-cards/hubspot-ticket-card.tsx +205 -0
- package/src/components/chat/entity-cards/index.ts +125 -0
- package/src/components/chat/entity-cards/investor-update-card.tsx +150 -0
- package/src/components/chat/entity-cards/onboarding-guide-card.tsx +326 -0
- package/src/components/chat/entity-cards/product-release-card-defaults.ts +57 -0
- package/src/components/chat/entity-cards/product-release-card.tsx +19 -0
- package/src/components/chat/entity-cards/program-card-defaults.ts +62 -0
- package/src/components/chat/entity-cards/program-card.tsx +451 -0
- package/src/components/chat/entity-cards/roadmap-card.tsx +356 -0
- package/src/components/chat/entity-cards/roadmap-vote-button.tsx +54 -0
- package/src/components/chat/entity-cards/slack-message-card.tsx +182 -0
- package/src/components/chat/entity-cards/task-type-icon.tsx +60 -0
- package/src/components/chat/hooks/index.ts +22 -0
- package/src/components/chat/hooks/use-chat-attachment-image-gallery.tsx +114 -0
- package/src/components/chat/hooks/use-chat-attachments.ts +429 -0
- package/src/components/chat/hooks/use-chat-card-item.ts +102 -0
- package/src/components/chat/hooks/use-chat-identity.ts +139 -0
- package/src/components/chat/hooks/use-chat.ts +501 -0
- package/src/components/chat/hooks/use-close-on-navigation.ts +87 -0
- package/src/components/chat/hooks/use-embedded-chat.ts +1023 -0
- package/src/components/chat/hooks/use-proxied-image-url.ts +31 -0
- package/src/components/chat/hooks/use-slash-commands.ts +106 -0
- package/src/components/chat/hooks/use-sse.ts +143 -0
- package/src/components/chat/index.ts +30 -4
- package/src/components/chat/nav-link-anchor-via-runtime.tsx +72 -0
- package/src/components/chat/source-action-button.tsx +120 -0
- package/src/components/chat/types/chat.types.ts +61 -0
- package/src/components/chat/types/component.types.ts +57 -11
- package/src/components/chat/types/entities/blog.ts +27 -0
- package/src/components/chat/types/entities/case-study.ts +14 -0
- package/src/components/chat/types/entities/content-ref.ts +23 -0
- package/src/components/chat/types/entities/customer-interview.ts +15 -0
- package/src/components/chat/types/entities/data-room-doc.ts +37 -0
- package/src/components/chat/types/entities/github-activity.ts +36 -0
- package/src/components/chat/types/entities/hubspot-ticket.ts +39 -0
- package/src/components/chat/types/entities/index.ts +28 -0
- package/src/components/chat/types/entities/investor-update.ts +100 -0
- package/src/components/chat/types/entities/onboarding-guide.ts +101 -0
- package/src/components/chat/types/entities/program-types.ts +433 -0
- package/src/components/chat/types/entities/roadmap-item.ts +42 -0
- package/src/components/chat/types/entities/slack-message.ts +28 -0
- package/src/components/chat/types/index.ts +1 -0
- package/src/components/chat/utils/agent-status-message.ts +52 -0
- package/src/components/chat/utils/auto-continuation-directive.ts +70 -0
- package/src/components/chat/utils/chat-attachment-markdown.ts +190 -0
- package/src/components/chat/utils/chat-authed-fetch.ts +73 -0
- package/src/components/chat/utils/chat-nav-resolution.ts +151 -0
- package/src/components/chat/utils/chat-proxy-auth-storage.ts +148 -0
- package/src/components/chat/utils/chip-action-class.ts +19 -0
- package/src/components/chat/utils/chip-styles.ts +51 -0
- package/src/components/chat/utils/clickup-task-type-utils.ts +59 -0
- package/src/components/chat/utils/compact-card-classes.ts +97 -0
- package/src/components/chat/utils/decide-new-tab.ts +57 -0
- package/src/components/chat/utils/external-app-urls.ts +19 -0
- package/src/components/chat/utils/flatten-assistant-content.ts +35 -0
- package/src/components/chat/utils/icon-registry.ts +297 -0
- package/src/components/chat/utils/index.ts +133 -0
- package/src/components/chat/utils/is-cross-origin-url.ts +28 -0
- package/src/components/chat/utils/nav-anchor-props.ts +78 -0
- package/src/components/chat/utils/nav-click-handler.ts +81 -0
- package/src/components/chat/utils/scroll-anchor.ts +35 -0
- package/src/components/chat/utils/slash-dispatch-utils.ts +183 -0
- package/src/components/chat/utils/source-icons.ts +14 -0
- package/src/components/chat/utils/source-row-cta.ts +215 -0
- package/src/components/empty-state.tsx +1 -1
- package/src/components/features/board/ticket-card.tsx +1 -1
- package/src/components/features/figma-prototype-viewer.tsx +2 -1
- package/src/components/features/media-gallery-manager.tsx +1 -1
- package/src/components/features/parallax-image-showcase.tsx +1 -1
- package/src/components/features/release-media-manager.tsx +1 -1
- package/src/components/features/seo-editor-preview.tsx +1 -1
- package/src/components/features/video.tsx +54 -3
- package/src/components/footer-waitlist-button.tsx +1 -1
- package/src/components/navigation/header.tsx +1 -1
- package/src/components/shared/onboarding/onboarding-step-card.tsx +1 -1
- package/src/components/shared/product-release/product-release-card-skeleton.tsx +8 -44
- package/src/components/shared/product-release/product-release-card.tsx +31 -116
- package/src/components/shared/product-release/release-detail-page.tsx +12 -16
- package/src/components/ui/actions-menu.tsx +1 -1
- package/src/components/ui/button/button.tsx +41 -11
- package/src/components/ui/button/split-button.tsx +1 -1
- package/src/components/ui/dashboard-info-card.tsx +2 -3
- package/src/components/ui/data-table/data-table-row.tsx +1 -1
- package/src/components/ui/entity-image.tsx +2 -8
- package/src/components/ui/hover-dropdown.tsx +258 -0
- package/src/components/ui/image-gallery-modal.tsx +1 -1
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/markdown-editor.tsx +1 -1
- package/src/components/ui/more-actions-menu.tsx +1 -1
- package/src/components/ui/organization-card.tsx +1 -1
- package/src/components/ui/simple-markdown-renderer.tsx +53 -5
- package/src/components/ui/square-avatar.tsx +3 -12
- package/src/components/ui/tab-navigation.tsx +1 -1
- package/src/components/ui/table/table-row.tsx +1 -1
- package/src/components/unified-filter-logic.tsx +1 -1
- package/src/components/unified-pagination.tsx +1 -1
- package/src/components/user-summary-stub.tsx +1 -1
- package/src/components/vendor-display-button.tsx +1 -1
- package/src/components/vendor-icon.tsx +1 -1
- package/src/contexts/chat-runtime-context.tsx +163 -0
- package/src/contexts/endpoints-runtime-context.tsx +68 -0
- package/src/contexts/index.ts +38 -0
- package/src/contexts/use-outer-or-default.ts +42 -0
- package/src/embed-shims/index.ts +42 -0
- package/src/embed-shims/next-dynamic.tsx +70 -0
- package/src/embed-shims/next-image.tsx +114 -0
- package/src/embed-shims/next-link.tsx +91 -0
- package/src/embed-shims/next-navigation.tsx +201 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/state/use-api-params.ts +1 -1
- package/src/hooks/state/use-query-params.ts +1 -1
- package/src/hooks/use-access-code-integration.ts +107 -0
- package/src/hooks/use-contact-submission.ts +7 -3
- package/src/hooks/use-og-placeholder.ts +45 -0
- package/src/stories/OnboardingStepCard.stories.tsx +140 -0
- package/src/styles/chat-animations.css +65 -0
- package/src/styles/index.css +1 -0
- package/src/utils/access-code-client.ts +32 -75
- package/src/utils/cn.ts +0 -65
- package/src/utils/color-analysis.ts +205 -0
- package/src/utils/date-formatters.ts +54 -11
- package/src/utils/fetch-priority.ts +41 -0
- package/src/utils/format.ts +525 -1
- package/src/utils/image-proxy.ts +127 -7
- package/src/utils/index.ts +145 -5
- package/src/utils/local-storage-adapter.ts +105 -0
- package/src/utils/source-icons.ts +219 -0
- package/dist/chunk-25LVV26X.cjs.map +0 -1
- package/dist/chunk-ARQ4XP64.cjs.map +0 -1
- package/dist/chunk-CPXLQ57U.js.map +0 -1
- package/dist/chunk-LY34ORX6.js.map +0 -1
- package/dist/chunk-RMB5DVED.cjs.map +0 -1
- package/dist/chunk-SZPJ5R5B.js.map +0 -1
- package/dist/chunk-UC43NICZ.cjs.map +0 -1
- package/dist/chunk-XGL5FKIK.js.map +0 -1
- package/dist/components/chat/block-card.d.ts.map +0 -1
- package/dist/components/chat/chat-ticket-item.d.ts.map +0 -1
- package/dist/components/chat/chat-video-entity-card.d.ts.map +0 -1
- package/dist/utils/dynamic-icons.d.ts +0 -26
- package/dist/utils/dynamic-icons.d.ts.map +0 -1
- package/dist/utils/format-relative-time.d.ts +0 -21
- package/dist/utils/format-relative-time.d.ts.map +0 -1
- package/src/utils/.dynamic-icons.md +0 -30
- package/src/utils/.format-relative-time.md +0 -36
- package/src/utils/dynamic-icons.tsx +0 -120
- package/src/utils/format-relative-time.ts +0 -52
- /package/dist/{chunk-N57KWHDB.js.map → chunk-CIPO6DXK.js.map} +0 -0
- /package/dist/components/chat/{block-card.d.ts → entity-cards/block-card.d.ts} +0 -0
- /package/dist/components/chat/{chat-ticket-item.d.ts → entity-cards/chat-ticket-item.d.ts} +0 -0
- /package/src/components/chat/{block-card.tsx → entity-cards/block-card.tsx} +0 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React, { useState, useRef, useCallback } from 'react'
|
|
4
|
+
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Types
|
|
7
|
+
// =============================================================================
|
|
8
|
+
|
|
9
|
+
export interface HoverDropdownItem {
|
|
10
|
+
label: string
|
|
11
|
+
icon?: React.ReactNode
|
|
12
|
+
href?: string
|
|
13
|
+
/**
|
|
14
|
+
* Target platform for the row's link — threaded through to the caller's
|
|
15
|
+
* `renderAnchor` slot, which decides how to route (same tab vs new tab,
|
|
16
|
+
* embed-aware open, etc.). Plain UI dropdown — no internal click rule.
|
|
17
|
+
*/
|
|
18
|
+
targetPlatform?: string | null
|
|
19
|
+
/**
|
|
20
|
+
* In-app doc-tree path for `markdown` / `data_room_doc` refs. Threaded
|
|
21
|
+
* through to the caller's `renderAnchor` so chat consumers can wire it
|
|
22
|
+
* into `handleChatNavClick` and trigger an in-page doc-tree swap
|
|
23
|
+
* (parity with source chips and inline cards).
|
|
24
|
+
*/
|
|
25
|
+
path?: string | null
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Pass `targetPlatform` to the consumer's `renderAnchor` and
|
|
28
|
+
* let it decide. Kept on the item shape for caller-side decisions but
|
|
29
|
+
* unused by this component.
|
|
30
|
+
*/
|
|
31
|
+
alwaysNewTab?: boolean
|
|
32
|
+
onClick?: () => void
|
|
33
|
+
/** Optional secondary action rendered as a small icon-button at the
|
|
34
|
+
* right edge of the row. Independent of the row's primary click target
|
|
35
|
+
* — clicking the secondary button does NOT navigate. */
|
|
36
|
+
secondaryAction?: {
|
|
37
|
+
icon: React.ReactNode
|
|
38
|
+
label: string
|
|
39
|
+
onClick: () => void
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface HoverDropdownRenderAnchorArgs {
|
|
44
|
+
href: string
|
|
45
|
+
targetPlatform?: string | null
|
|
46
|
+
/** In-app doc-tree path — chat consumers forward to `handleChatNavClick`
|
|
47
|
+
* for doc-tree swap parity with chips + inline cards. */
|
|
48
|
+
path?: string | null
|
|
49
|
+
alwaysNewTab?: boolean
|
|
50
|
+
className: string
|
|
51
|
+
children: React.ReactNode
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface HoverDropdownProps {
|
|
55
|
+
/** The trigger element — dropdown appears on hover */
|
|
56
|
+
children: React.ReactNode
|
|
57
|
+
/** Items to show in the dropdown */
|
|
58
|
+
items: HoverDropdownItem[]
|
|
59
|
+
/** Dropdown position relative to trigger (default: 'top') */
|
|
60
|
+
side?: 'top' | 'bottom'
|
|
61
|
+
/** Delay in ms before hiding on mouse leave (default: 200) */
|
|
62
|
+
hideDelay?: number
|
|
63
|
+
/** Additional className for the dropdown container */
|
|
64
|
+
className?: string
|
|
65
|
+
/**
|
|
66
|
+
* Optional anchor renderer for rows that have an `href`. Chat consumers
|
|
67
|
+
* supply a `<NavLinkAnchorViaRuntime>`-backed renderer so clicks route
|
|
68
|
+
* through the chat runtime; non-chat consumers can skip this and rely
|
|
69
|
+
* on the default plain `<a>`.
|
|
70
|
+
*/
|
|
71
|
+
renderAnchor?: (args: HoverDropdownRenderAnchorArgs) => React.ReactNode
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// =============================================================================
|
|
75
|
+
// Component
|
|
76
|
+
// =============================================================================
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Generic hover dropdown — shows a list of clickable items on hover.
|
|
80
|
+
*
|
|
81
|
+
* Uses fixed positioning with getBoundingClientRect for proper placement
|
|
82
|
+
* inside containers with overflow hidden (e.g., Sheet, modals).
|
|
83
|
+
*
|
|
84
|
+
* Usage:
|
|
85
|
+
* <HoverDropdown items={[{ label: 'Blog Post', href: '/blog/1' }]}>
|
|
86
|
+
* <span>Blog Posts (5)</span>
|
|
87
|
+
* </HoverDropdown>
|
|
88
|
+
*/
|
|
89
|
+
function DefaultAnchor({
|
|
90
|
+
href,
|
|
91
|
+
className,
|
|
92
|
+
children,
|
|
93
|
+
}: HoverDropdownRenderAnchorArgs) {
|
|
94
|
+
return (
|
|
95
|
+
<a href={href} className={className}>
|
|
96
|
+
{children}
|
|
97
|
+
</a>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function HoverDropdown({
|
|
102
|
+
children,
|
|
103
|
+
items,
|
|
104
|
+
side = 'top',
|
|
105
|
+
hideDelay = 200,
|
|
106
|
+
className,
|
|
107
|
+
renderAnchor,
|
|
108
|
+
}: HoverDropdownProps) {
|
|
109
|
+
const [open, setOpen] = useState(false)
|
|
110
|
+
const timeoutRef = useRef<ReturnType<typeof setTimeout>>(undefined)
|
|
111
|
+
const containerRef = useRef<HTMLDivElement>(null)
|
|
112
|
+
|
|
113
|
+
const show = useCallback(() => {
|
|
114
|
+
clearTimeout(timeoutRef.current)
|
|
115
|
+
setOpen(true)
|
|
116
|
+
}, [])
|
|
117
|
+
|
|
118
|
+
const hide = useCallback(() => {
|
|
119
|
+
timeoutRef.current = setTimeout(() => setOpen(false), hideDelay)
|
|
120
|
+
}, [hideDelay])
|
|
121
|
+
|
|
122
|
+
if (items.length === 0) return <>{children}</>
|
|
123
|
+
|
|
124
|
+
// Click handler — touch / mobile (no hover) + desktop users who
|
|
125
|
+
// expect clicking a chip to open a menu. Toggles the dropdown state
|
|
126
|
+
// so a second click closes it. `stopPropagation` prevents the click
|
|
127
|
+
// from bubbling to ancestor handlers (the chip's parent message
|
|
128
|
+
// bubble shouldn't react to chip clicks).
|
|
129
|
+
const toggle = useCallback((e: React.MouseEvent) => {
|
|
130
|
+
e.stopPropagation()
|
|
131
|
+
clearTimeout(timeoutRef.current)
|
|
132
|
+
setOpen((prev) => !prev)
|
|
133
|
+
}, [])
|
|
134
|
+
|
|
135
|
+
const renderAnchorFn = renderAnchor ?? DefaultAnchor
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<div
|
|
139
|
+
ref={containerRef}
|
|
140
|
+
className="relative inline-flex"
|
|
141
|
+
onMouseEnter={show}
|
|
142
|
+
onMouseLeave={hide}
|
|
143
|
+
onClick={toggle}
|
|
144
|
+
>
|
|
145
|
+
{children}
|
|
146
|
+
{open && (
|
|
147
|
+
<div
|
|
148
|
+
className={`fixed z-[9999] min-w-[220px] max-w-[340px] max-h-[420px] overflow-y-auto rounded-lg bg-ods-card border border-ods-border shadow-xl p-1 ${className || ''}`}
|
|
149
|
+
ref={(el) => {
|
|
150
|
+
if (!el || !containerRef.current) return
|
|
151
|
+
const rect = containerRef.current.getBoundingClientRect()
|
|
152
|
+
const elHeight = el.offsetHeight
|
|
153
|
+
const elWidth = el.offsetWidth
|
|
154
|
+
|
|
155
|
+
// Try to place to the right of the trigger first
|
|
156
|
+
const spaceRight = window.innerWidth - rect.right
|
|
157
|
+
const spaceLeft = rect.left
|
|
158
|
+
const fitsRight = spaceRight >= elWidth + 8
|
|
159
|
+
const fitsLeft = spaceLeft >= elWidth + 8
|
|
160
|
+
|
|
161
|
+
if (fitsRight || (!fitsLeft && spaceRight >= spaceLeft)) {
|
|
162
|
+
// Place to the right
|
|
163
|
+
el.style.left = `${rect.right + 4}px`
|
|
164
|
+
el.style.top = `${Math.min(Math.max(rect.top, 8), window.innerHeight - elHeight - 8)}px`
|
|
165
|
+
} else if (fitsLeft) {
|
|
166
|
+
// Place to the left
|
|
167
|
+
el.style.left = `${rect.left - elWidth - 4}px`
|
|
168
|
+
el.style.top = `${Math.min(Math.max(rect.top, 8), window.innerHeight - elHeight - 8)}px`
|
|
169
|
+
} else {
|
|
170
|
+
// Fallback: place above or below
|
|
171
|
+
const left = Math.min(Math.max(rect.left, 8), window.innerWidth - elWidth - 8)
|
|
172
|
+
el.style.left = `${left}px`
|
|
173
|
+
if (side === 'top' || window.innerHeight - rect.bottom < elHeight + 8) {
|
|
174
|
+
el.style.top = `${Math.max(rect.top - elHeight - 4, 8)}px`
|
|
175
|
+
} else {
|
|
176
|
+
el.style.top = `${rect.bottom + 4}px`
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}}
|
|
180
|
+
>
|
|
181
|
+
{items.map((item, i) => {
|
|
182
|
+
const content = (
|
|
183
|
+
<>
|
|
184
|
+
{item.icon && <span className="flex-shrink-0 [&_svg]:size-3.5">{item.icon}</span>}
|
|
185
|
+
<span className="truncate flex-1 min-w-0">{item.label}</span>
|
|
186
|
+
</>
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
// Each row is a flex container: primary action (link or button)
|
|
190
|
+
// occupies the left expanding region; the optional secondary
|
|
191
|
+
// action ("Ask") sits at the right as a sibling icon-button so
|
|
192
|
+
// its click is independent of the primary navigation.
|
|
193
|
+
const rowClass = 'group flex w-full items-center gap-1.5 pl-2 pr-1 py-1.5 rounded text-[11px] text-ods-text-secondary hover:bg-ods-accent/10 transition-colors text-left'
|
|
194
|
+
const primaryClass = 'flex flex-1 items-center gap-1.5 min-w-0 hover:text-ods-accent cursor-pointer no-underline'
|
|
195
|
+
|
|
196
|
+
const secondary = item.secondaryAction ? (
|
|
197
|
+
<button
|
|
198
|
+
onClick={(e) => {
|
|
199
|
+
e.preventDefault()
|
|
200
|
+
e.stopPropagation()
|
|
201
|
+
item.secondaryAction!.onClick()
|
|
202
|
+
}}
|
|
203
|
+
aria-label={item.secondaryAction.label}
|
|
204
|
+
title={item.secondaryAction.label}
|
|
205
|
+
className="flex-shrink-0 inline-flex items-center justify-center h-5 w-5 rounded text-ods-text-secondary opacity-60 hover:opacity-100 hover:text-ods-text-primary hover:bg-ods-accent/15 transition-opacity [&_svg]:size-3"
|
|
206
|
+
>
|
|
207
|
+
{item.secondaryAction.icon}
|
|
208
|
+
</button>
|
|
209
|
+
) : null
|
|
210
|
+
|
|
211
|
+
if (item.href) {
|
|
212
|
+
// Caller supplies the anchor renderer (defaults to plain <a>).
|
|
213
|
+
// Chat consumers wire `NavLinkAnchorViaRuntime` here so clicks
|
|
214
|
+
// route through the chat runtime.
|
|
215
|
+
return (
|
|
216
|
+
<div key={i} className={rowClass}>
|
|
217
|
+
{renderAnchorFn({
|
|
218
|
+
href: item.href,
|
|
219
|
+
targetPlatform: item.targetPlatform,
|
|
220
|
+
path: item.path,
|
|
221
|
+
alwaysNewTab: item.alwaysNewTab,
|
|
222
|
+
className: primaryClass,
|
|
223
|
+
children: content,
|
|
224
|
+
})}
|
|
225
|
+
{secondary}
|
|
226
|
+
</div>
|
|
227
|
+
)
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Item has no primary action — render the label as a
|
|
231
|
+
// non-interactive span. The secondary Ask button remains
|
|
232
|
+
// active, so the row is still useful for rows that have no
|
|
233
|
+
// public viewer URL but DO have a working Ask drill-in.
|
|
234
|
+
if (!item.onClick) {
|
|
235
|
+
return (
|
|
236
|
+
<div key={i} className={rowClass}>
|
|
237
|
+
<span className={`${primaryClass} cursor-default hover:!text-ods-text-secondary`}>
|
|
238
|
+
{content}
|
|
239
|
+
</span>
|
|
240
|
+
{secondary}
|
|
241
|
+
</div>
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return (
|
|
246
|
+
<div key={i} className={rowClass}>
|
|
247
|
+
<button onClick={item.onClick} className={primaryClass}>
|
|
248
|
+
{content}
|
|
249
|
+
</button>
|
|
250
|
+
{secondary}
|
|
251
|
+
</div>
|
|
252
|
+
)
|
|
253
|
+
})}
|
|
254
|
+
</div>
|
|
255
|
+
)}
|
|
256
|
+
</div>
|
|
257
|
+
)
|
|
258
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { Modal, Button } from './index';
|
|
5
5
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
6
|
-
import Image from 'next
|
|
6
|
+
import Image from '../../embed-shims/next-image';
|
|
7
7
|
|
|
8
8
|
interface ImageGalleryModalProps {
|
|
9
9
|
images: string[];
|
|
@@ -54,6 +54,7 @@ export * from './status-indicator'
|
|
|
54
54
|
export * from './toaster'
|
|
55
55
|
// TODO: Add other UI components as they are moved to ui-kit
|
|
56
56
|
export * from './skeleton'
|
|
57
|
+
export * from './hover-dropdown'
|
|
57
58
|
// Chat components
|
|
58
59
|
export * from '../chat'
|
|
59
60
|
export * from '../layout/list-page-layout'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import React, { useRef, useCallback, useState, useEffect } from "react"
|
|
4
|
-
import dynamic from "next
|
|
4
|
+
import dynamic from "../../embed-shims/next-dynamic"
|
|
5
5
|
import { Loader2, Upload } from "lucide-react"
|
|
6
6
|
import { cn } from "../../utils/cn"
|
|
7
7
|
|
|
@@ -8,7 +8,7 @@ import remarkBreaks from 'remark-breaks';
|
|
|
8
8
|
import rehypeHighlight from 'rehype-highlight';
|
|
9
9
|
import rehypeRaw from 'rehype-raw';
|
|
10
10
|
import { visit } from 'unist-util-visit';
|
|
11
|
-
import Image from 'next
|
|
11
|
+
import Image from '../../embed-shims/next-image';
|
|
12
12
|
import { AlertCircleIcon } from '../icons-v2-generated';
|
|
13
13
|
import { cn } from '../../utils/cn';
|
|
14
14
|
|
|
@@ -794,16 +794,64 @@ export const SimpleMarkdownRenderer: React.FC<SimpleMarkdownRendererProps> = ({
|
|
|
794
794
|
},
|
|
795
795
|
|
|
796
796
|
// --- images ---
|
|
797
|
+
// Inline content image renderer. Used by blog posts, docs, AND chat
|
|
798
|
+
// messages (where users may attach screenshots / photos via the +
|
|
799
|
+
// attachment button).
|
|
800
|
+
//
|
|
801
|
+
// Sizing rules (2025-2026 best practice — Claude.ai, ChatGPT,
|
|
802
|
+
// iMessage, Slack, Discord inline image patterns):
|
|
803
|
+
//
|
|
804
|
+
// - CAP max-width at 400px so inline images don't blow out the
|
|
805
|
+
// message column on wide panels. Click-to-expand opens a
|
|
806
|
+
// full-resolution modal for users who need detail.
|
|
807
|
+
// - CAP max-height at 400px so portrait-orientation images
|
|
808
|
+
// don't dominate vertical space (a 1000x3000 phone screenshot
|
|
809
|
+
// would otherwise push the next message off-screen).
|
|
810
|
+
// - Small images render at NATURAL pixel size — a 64x64
|
|
811
|
+
// thumbnail stays 64x64, not stretched to fill the column.
|
|
812
|
+
// - `object-contain` preserves aspect ratio when both dimensions
|
|
813
|
+
// are constrained (long landscape, tall portrait).
|
|
814
|
+
//
|
|
815
|
+
// Implementation: Next.js `<Image>` — the project's canonical
|
|
816
|
+
// image primitive. Gives us:
|
|
817
|
+
// - WebP/AVIF format conversion for modern browsers (smaller
|
|
818
|
+
// bytes for the same visual quality).
|
|
819
|
+
// - Responsive `srcset` via the `sizes` prop (browser picks the
|
|
820
|
+
// right variant for the viewport).
|
|
821
|
+
// - Automatic lazy-loading (`loading="lazy"` by default, mid-
|
|
822
|
+
// page images skipped until they near the viewport).
|
|
823
|
+
// - Automatic `decoding="async"` so image decode doesn't block
|
|
824
|
+
// paint.
|
|
825
|
+
//
|
|
826
|
+
// `width={400} height={400}` props are REQUIRED by Next.js
|
|
827
|
+
// `<Image>` (non-`fill` mode throws without them) but they're
|
|
828
|
+
// effectively a CEILING here, not the display size — the CSS
|
|
829
|
+
// overrides (`w-auto h-auto max-w-full max-h-[400px]`) drive
|
|
830
|
+
// the actual rendered size. The inline `style={{ width: 'auto',
|
|
831
|
+
// height: 'auto' }}` is belt-and-suspenders: Next.js Image sets
|
|
832
|
+
// matching HTML `width`/`height` attributes on the rendered
|
|
833
|
+
// `<img>` and inline style wins over both HTML attributes AND
|
|
834
|
+
// utility classes regardless of CSS-specificity surprises.
|
|
835
|
+
//
|
|
836
|
+
// Layout reservation trade-off: until image bytes arrive, the
|
|
837
|
+
// browser may reserve a placeholder box up to 400x400 (the props'
|
|
838
|
+
// intrinsic-ratio hint). Once loaded, the box collapses to the
|
|
839
|
+
// natural size if smaller. This is the standard Next.js Image
|
|
840
|
+
// behavior across the codebase — accepted for the optimizer +
|
|
841
|
+
// responsive-srcset benefits. Chat attachments hosted in side
|
|
842
|
+
// panels see this only on first render of a fresh attachment
|
|
843
|
+
// (cached re-renders pop in without a perceptible shift).
|
|
797
844
|
img: ({ src, alt }: any) => {
|
|
798
845
|
if (!src || typeof src !== 'string' || src.trim() === '') return null;
|
|
799
846
|
return (
|
|
800
847
|
<Image
|
|
801
848
|
src={src}
|
|
802
849
|
alt={alt ?? 'No image available'}
|
|
803
|
-
width={
|
|
804
|
-
height={
|
|
805
|
-
sizes="(max-width:
|
|
806
|
-
className="max-w-full h-auto rounded-lg"
|
|
850
|
+
width={400}
|
|
851
|
+
height={400}
|
|
852
|
+
sizes="(max-width: 400px) 100vw, 400px"
|
|
853
|
+
className="max-w-full max-h-[400px] w-auto h-auto rounded-lg object-contain"
|
|
854
|
+
style={{ width: 'auto', height: 'auto' }}
|
|
807
855
|
/>
|
|
808
856
|
);
|
|
809
857
|
},
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import Image from "next
|
|
4
|
+
import Image from "../../embed-shims/next-image";
|
|
5
5
|
import { cn } from "../../utils/cn";
|
|
6
|
-
|
|
7
|
-
// Extract initials from a name (first letter of first and last word)
|
|
8
|
-
const getInitials = (name?: string): string => {
|
|
9
|
-
if (!name) return '';
|
|
10
|
-
const words = name.trim().split(/\s+/);
|
|
11
|
-
if (words.length === 1) {
|
|
12
|
-
return words[0].charAt(0).toUpperCase();
|
|
13
|
-
}
|
|
14
|
-
return (words[0].charAt(0) + words[words.length - 1].charAt(0)).toUpperCase();
|
|
15
|
-
};
|
|
6
|
+
import { getFirstLastInitials } from "../../utils/format";
|
|
16
7
|
|
|
17
8
|
interface SquareAvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
9
|
src?: string;
|
|
@@ -58,7 +49,7 @@ const SquareAvatar = React.memo(React.forwardRef<HTMLDivElement, SquareAvatarPro
|
|
|
58
49
|
'flex items-center justify-center text-xs font-medium text-ods-text-secondary',
|
|
59
50
|
src && 'hidden'
|
|
60
51
|
)}>
|
|
61
|
-
{
|
|
52
|
+
{getFirstLastInitials(fallback || alt) || '?'}
|
|
62
53
|
</div>
|
|
63
54
|
{src && (
|
|
64
55
|
<Image
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import React, { useState, useEffect, useMemo, useRef, useCallback } from 'react'
|
|
4
|
-
import { useSearchParams, useRouter, usePathname } from 'next
|
|
4
|
+
import { useSearchParams, useRouter, usePathname } from '../../embed-shims/next-navigation'
|
|
5
5
|
import { cn } from '../../utils/cn'
|
|
6
6
|
|
|
7
7
|
export interface TabItem {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Button } from "./ui/button"
|
|
4
4
|
import { getVendorLogo, VendorWithMedia } from "../utils/vendor-media-stub"
|
|
5
|
-
import Image from "next
|
|
5
|
+
import Image from "../embed-shims/next-image"
|
|
6
6
|
import { getProxiedImageUrl } from "../utils/image-proxy-stub"
|
|
7
7
|
|
|
8
8
|
interface VendorDisplayButtonProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
|
-
import Image from 'next
|
|
4
|
+
import Image from '../embed-shims/next-image'
|
|
5
5
|
import { cn } from "../utils/cn"
|
|
6
6
|
import { getVendorLogo, VendorWithMedia } from '../utils/vendor-media-stub'
|
|
7
7
|
import { getProxiedImageUrl } from '../utils/image-proxy-stub'
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Chat runtime context — single seam for embedding the chat panel in a
|
|
5
|
+
* different host (e.g. user1.openframe.ai reverse-proxying API calls
|
|
6
|
+
* under /api/mingo-guide/* to hub.openframe.ai/api/*).
|
|
7
|
+
*
|
|
8
|
+
* Three concerns, one context:
|
|
9
|
+
* 1. API endpoints: chatStreamUrl / approvalToolUrl / commandsUrl /
|
|
10
|
+
* buildListUrl + attachment endpoints + chat-identity. The chat
|
|
11
|
+
* reads them from runtime; hub vs embedded app supply different
|
|
12
|
+
* strings via different providers.
|
|
13
|
+
* 2. Navigation mode + callbacks: 'host' or 'embed' mode. Host wires
|
|
14
|
+
* its own router/docNav via the optional `navigate` callback
|
|
15
|
+
* (plain function, NOT a hook); embed forces new-tab via
|
|
16
|
+
* `defaultContentOrigin` + lib's `resolveExternalNavigation`.
|
|
17
|
+
* 3. Identity context: only `source` (required for localStorage
|
|
18
|
+
* namespacing). The display identity (greeting first-name etc.)
|
|
19
|
+
* comes from the server via `useChatIdentity()` — never injected
|
|
20
|
+
* client-side, so it always matches the server-resolved auth.
|
|
21
|
+
*
|
|
22
|
+
* Sibling of EndpointsRuntimeContext (announcement bar, contact form,
|
|
23
|
+
* access codes). Each runtime stays an independent React context so
|
|
24
|
+
* embedders can opt into either feature without forcing the other.
|
|
25
|
+
*
|
|
26
|
+
* IMPORTANT for embedders: memoize the value passed to
|
|
27
|
+
* `<ChatRuntimeContext.Provider value={...}>` (e.g. via React.useMemo).
|
|
28
|
+
* Every change to its reference identity invalidates downstream
|
|
29
|
+
* `useMemo` consumers (the chat input's slash-commands binding,
|
|
30
|
+
* useNavLink's embed-resolution memo, useDocChat's streamFn factory).
|
|
31
|
+
* The hub's `<HubRuntimeProvider>` already memoizes correctly with
|
|
32
|
+
* stable deps. Embedded apps that build the value inline on each render
|
|
33
|
+
* will pay an avoidable re-render cost across the entire chat tree.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
import { createContext, useContext, type ReactNode } from 'react'
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Runtime config consumed by the chat panel.
|
|
40
|
+
*/
|
|
41
|
+
export interface ChatRuntime {
|
|
42
|
+
endpoints: {
|
|
43
|
+
/** POST streaming chat. Hub: '/api/docs/chat'. */
|
|
44
|
+
chatStreamUrl: string
|
|
45
|
+
/** POST agent approve/reject. Hub: '/api/chat/agent/confirm-tool'. */
|
|
46
|
+
approvalToolUrl: string
|
|
47
|
+
/** GET slash-command catalog. Hub: '/api/docs/commands'. */
|
|
48
|
+
commandsUrl: string
|
|
49
|
+
/** Build entity-card list URL for a content type + ids. Hub delegates
|
|
50
|
+
* to the rag-table-config registry; embedded app provides its own
|
|
51
|
+
* per-type URL builder against the reverse proxy. Returns null when
|
|
52
|
+
* the type has no list endpoint (caller skips rendering). */
|
|
53
|
+
buildListUrl: (type: string, ids: string[]) => string | null
|
|
54
|
+
/** Chat-attachment endpoints — added for the v2 attachment feature.
|
|
55
|
+
*
|
|
56
|
+
* Three concerns:
|
|
57
|
+
* - `attachmentUploadUrl` — POSTed by the chat-attachment hook
|
|
58
|
+
* to mint a Supabase signed-upload-URL + HMAC view token.
|
|
59
|
+
* - `attachmentViewUrlPrefix` — embedded in markdown URLs the
|
|
60
|
+
* chat hosts in user message bubbles (`![]()` / `[Attached]`).
|
|
61
|
+
* Stored in chat history; chosen at SEND time. In host mode the
|
|
62
|
+
* relative `/api/storage/view/chat-attachments/` is sufficient
|
|
63
|
+
* (same-origin); embedders supply an absolute hub URL so the
|
|
64
|
+
* browser can fetch cross-origin.
|
|
65
|
+
* - `chatIdentityUrl` — GET endpoint the `useChatIdentity` hook
|
|
66
|
+
* hits to learn the `{authTier, source, attachmentsEnabled}`
|
|
67
|
+
* capability bag for the current session. */
|
|
68
|
+
attachmentUploadUrl: string
|
|
69
|
+
attachmentViewUrlPrefix: string
|
|
70
|
+
chatIdentityUrl: string
|
|
71
|
+
/** Optional URL prefix for the image proxy (`<prefix>?url=<external>`).
|
|
72
|
+
* When unset, lib's `getProxiedImageUrl` returns the original URL
|
|
73
|
+
* unchanged. Hub default: '/api/image-proxy'. Embedders that don't
|
|
74
|
+
* host an image-proxy route leave this undefined → images load
|
|
75
|
+
* directly cross-origin (CORS-permitting). */
|
|
76
|
+
imageProxyUrlPrefix?: string
|
|
77
|
+
/** Optional list of hostnames that should bypass the image proxy
|
|
78
|
+
* (rendered direct). Hub uses ['openmsp.ai']; embedders typically
|
|
79
|
+
* leave it unset. Matches the `skipDomains` parameter of
|
|
80
|
+
* `getProxiedImageUrl`. */
|
|
81
|
+
imageProxySkipDomains?: string[]
|
|
82
|
+
}
|
|
83
|
+
navigation: {
|
|
84
|
+
/** ONE knob, two behaviors:
|
|
85
|
+
* - 'host' = use the host page's existing click-routing untouched.
|
|
86
|
+
* The chat panel calls `navigate?.()` for in-app routing.
|
|
87
|
+
* - 'embed' = guest inside another app: short-circuit at the top
|
|
88
|
+
* of click handlers to force new-tab + absolutize via
|
|
89
|
+
* resolveExternalNavigation. */
|
|
90
|
+
mode: 'host' | 'embed'
|
|
91
|
+
/** Embed-only fallback origin for relative URLs whose target platform
|
|
92
|
+
* can't be inferred. Used by resolveExternalNavigation when
|
|
93
|
+
* `targetPlatform` is null — without this, a relative `/foo` href would
|
|
94
|
+
* window.open against the embedder's origin, which is WRONG.
|
|
95
|
+
* Set to your content host (e.g. 'https://hub.openframe.ai').
|
|
96
|
+
* Required by the embedded app whenever mode='embed'. */
|
|
97
|
+
defaultContentOrigin?: string
|
|
98
|
+
/** Override for opening external URLs. MUST BE SYNCHRONOUS —
|
|
99
|
+
* Safari/Firefox block popups opened outside a direct user gesture.
|
|
100
|
+
* Default: window.open(href, '_blank', 'noopener,noreferrer'). */
|
|
101
|
+
openExternal?: (href: string) => void
|
|
102
|
+
/** Optional in-app navigation callback (host-mode only).
|
|
103
|
+
* Returns `true` if the host handled the click in-app
|
|
104
|
+
* (router.push + docNav.navigate); returns `false`, `undefined`,
|
|
105
|
+
* or `void` → lib falls back to window.location.assign(href).
|
|
106
|
+
* Hub wires this via HubRuntimeProvider's HubNavigationWiring;
|
|
107
|
+
* embedders not in Next.js leave it undefined. */
|
|
108
|
+
navigate?: (input: { href: string; path?: string | null; targetPlatform?: string | null }) => boolean | void
|
|
109
|
+
/** Optional new-tab decision callback. Returns true → lib opens in
|
|
110
|
+
* new tab; false → same tab via `navigate`. Hub wires the existing
|
|
111
|
+
* `decideNewTab` logic from use-nav-link.tsx (re-imports the pure
|
|
112
|
+
* helper from lib). Embedders may omit; lib defaults to:
|
|
113
|
+
* same-origin/same-platform → same tab, else new tab. */
|
|
114
|
+
decideNewTab?: (args: { href: string; targetPlatform?: string | null }) => boolean
|
|
115
|
+
}
|
|
116
|
+
/** Chat source identifier — REQUIRED. Used for localStorage
|
|
117
|
+
* namespacing (`mingo-chat-<source>-v1`). Hub sets via
|
|
118
|
+
* `currentPlatform()`; embedders set explicitly.
|
|
119
|
+
* `useEmbeddedChat()` throws if source is empty/missing. */
|
|
120
|
+
source: string
|
|
121
|
+
// NOTE: No `user` field. The chat's display identity (greeting
|
|
122
|
+
// first-name, etc.) comes from the SERVER-resolved auth via
|
|
123
|
+
// `useChatIdentity()` — the same identity the server uses to
|
|
124
|
+
// authorize requests. Letting embedders pass a client-side `user`
|
|
125
|
+
// would let it desync from the actual auth tier, causing greetings
|
|
126
|
+
// like "Hey Bob" while the server treats the session as
|
|
127
|
+
// alice@example.com. Single source of truth: the server.
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const ChatRuntimeContext = createContext<ChatRuntime | null>(null)
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Returns the active runtime, or null when no provider is mounted.
|
|
134
|
+
* NULL is a first-class value — it signals "no chat runtime configured."
|
|
135
|
+
* Optional consumers fall back to no-op behavior; strict consumers
|
|
136
|
+
* use `useRequiredChatRuntime` (below).
|
|
137
|
+
*/
|
|
138
|
+
export function useChatRuntime(): ChatRuntime | null {
|
|
139
|
+
return useContext(ChatRuntimeContext)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Strict variant used INSIDE the chat panel. Throws if no provider.
|
|
144
|
+
* The hub guarantees one exists by mounting `<HubRuntimeProvider>` at
|
|
145
|
+
* root; the embedded app mounts its own `<ChatRuntimeContext.Provider>`
|
|
146
|
+
* at the tree root. In Jest / Storybook tests that render chat
|
|
147
|
+
* internals directly, wrap with `<HubRuntimeProvider>` (hub defaults)
|
|
148
|
+
* or supply `<ChatRuntimeContext.Provider value={mockedRuntime}>`.
|
|
149
|
+
*/
|
|
150
|
+
export function useRequiredChatRuntime(): ChatRuntime {
|
|
151
|
+
const v = useContext(ChatRuntimeContext)
|
|
152
|
+
if (!v) {
|
|
153
|
+
throw new Error(
|
|
154
|
+
'[chat-runtime] hook called outside a <ChatRuntimeContext.Provider>. ' +
|
|
155
|
+
'The hub mounts <HubRuntimeProvider> at root — this only fires when ' +
|
|
156
|
+
'chat internals are rendered above the provider tree. ' +
|
|
157
|
+
'Fix: ensure the rendering subtree descends from the runtime provider. ' +
|
|
158
|
+
'In tests/Storybook: wrap with <HubRuntimeProvider> or supply ' +
|
|
159
|
+
'a <ChatRuntimeContext.Provider value={mockedRuntime}>.',
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
return v
|
|
163
|
+
}
|