@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,451 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ProgramCard (pure presentation). Generic card for podcasts / webinars /
|
|
5
|
+
* events. Two densities — `default` (vertical detail) and `sm` (compact
|
|
6
|
+
* horizontal for chat-inline).
|
|
7
|
+
*
|
|
8
|
+
* The card writes NO click logic — callers wrap with their own anchor
|
|
9
|
+
* and pass the resolved detail URL via `href`.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import React, { useState } from 'react'
|
|
13
|
+
import Image from '../../../embed-shims/next-image'
|
|
14
|
+
import { format } from 'date-fns'
|
|
15
|
+
import { ExternalLink, Clock, Play, Video } from 'lucide-react'
|
|
16
|
+
import { Button } from '../../ui/button/button'
|
|
17
|
+
import { SquareAvatar } from '../../ui/square-avatar'
|
|
18
|
+
import { ImageGalleryModal } from '../../ui/image-gallery-modal'
|
|
19
|
+
import { cn } from '../../../utils/cn'
|
|
20
|
+
import {
|
|
21
|
+
formatDurationCompact,
|
|
22
|
+
formatTimeWithTimezone,
|
|
23
|
+
formatDurationFromRange,
|
|
24
|
+
} from '../../../utils/format'
|
|
25
|
+
import {
|
|
26
|
+
COMPACT_CARD_IMAGE_SLOT,
|
|
27
|
+
COMPACT_CARD_META_ROW_BOX,
|
|
28
|
+
COMPACT_CARD_OUTER,
|
|
29
|
+
COMPACT_CARD_ROW_FILLER,
|
|
30
|
+
COMPACT_CARD_SKELETON_IMAGE_SLOT,
|
|
31
|
+
COMPACT_CARD_SKELETON_OUTER,
|
|
32
|
+
COMPACT_CARD_SUMMARY,
|
|
33
|
+
COMPACT_CARD_TEXT_COL,
|
|
34
|
+
COMPACT_CARD_TITLE,
|
|
35
|
+
COMPACT_CARD_TITLE_ROW,
|
|
36
|
+
} from '../utils/compact-card-classes'
|
|
37
|
+
import type {
|
|
38
|
+
BaseProgramItem,
|
|
39
|
+
ProgramConfig,
|
|
40
|
+
ProgramMedia,
|
|
41
|
+
ProgramHost,
|
|
42
|
+
} from '../types/entities/program-types'
|
|
43
|
+
|
|
44
|
+
type CardSize = 'default' | 'sm'
|
|
45
|
+
|
|
46
|
+
export function ProgramCardSkeleton({ size = 'default' }: { size?: CardSize }) {
|
|
47
|
+
if (size === 'sm') {
|
|
48
|
+
return (
|
|
49
|
+
<span className={COMPACT_CARD_SKELETON_OUTER}>
|
|
50
|
+
<span className={COMPACT_CARD_SKELETON_IMAGE_SLOT} />
|
|
51
|
+
<span className={COMPACT_CARD_TEXT_COL}>
|
|
52
|
+
<span className={COMPACT_CARD_TITLE_ROW}>
|
|
53
|
+
<span className="h-3.5 w-3/5 rounded bg-ods-bg" />
|
|
54
|
+
</span>
|
|
55
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
56
|
+
<span className="h-3 w-2/5 rounded bg-ods-bg/70" />
|
|
57
|
+
</span>
|
|
58
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
59
|
+
<span className="h-3 w-11/12 rounded bg-ods-bg/40" />
|
|
60
|
+
</span>
|
|
61
|
+
</span>
|
|
62
|
+
<span className="flex shrink-0 items-center self-start h-5">
|
|
63
|
+
<span className="h-3.5 w-3.5 rounded bg-ods-bg" />
|
|
64
|
+
</span>
|
|
65
|
+
</span>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
return (
|
|
69
|
+
<div
|
|
70
|
+
className="border border-ods-border rounded-lg overflow-hidden flex flex-col animate-pulse"
|
|
71
|
+
style={{ backgroundColor: 'var(--ods-system-greys-black)' }}
|
|
72
|
+
>
|
|
73
|
+
<div className="p-6 flex-1">
|
|
74
|
+
<div className="flex flex-col md:flex-row gap-4 md:gap-6">
|
|
75
|
+
<div className="w-full md:w-[180px] h-[180px] bg-ods-bg rounded-lg flex-shrink-0" />
|
|
76
|
+
<div className="flex-1 min-w-0 flex flex-col gap-3">
|
|
77
|
+
<div className="h-7 w-3/4 bg-ods-bg rounded" />
|
|
78
|
+
<div className="h-7 w-1/2 bg-ods-bg rounded" />
|
|
79
|
+
<div className="h-4 w-1/3 bg-ods-bg/60 rounded" />
|
|
80
|
+
<div className="space-y-2">
|
|
81
|
+
<div className="h-3 w-full bg-ods-bg/60 rounded" />
|
|
82
|
+
<div className="h-3 w-5/6 bg-ods-bg/60 rounded" />
|
|
83
|
+
<div className="h-3 w-4/5 bg-ods-bg/60 rounded" />
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<div className="p-6 pt-0 mt-auto">
|
|
89
|
+
<div className="pt-4 border-t border-ods-border">
|
|
90
|
+
<div className="h-9 w-40 bg-ods-bg rounded" />
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface ProgramCardProps<T extends BaseProgramItem> {
|
|
98
|
+
config: ProgramConfig<T>
|
|
99
|
+
item: T
|
|
100
|
+
media?: ProgramMedia[]
|
|
101
|
+
renderMeta?: (item: T) => React.ReactNode
|
|
102
|
+
size?: CardSize
|
|
103
|
+
/** Detail URL resolved by the caller. */
|
|
104
|
+
href: string
|
|
105
|
+
/** When `_blank`, opens in a new tab. Set by chat dispatch via
|
|
106
|
+
* `computeIsNewTab` so the inner `<a>` matches the runtime
|
|
107
|
+
* nav decision (cross-platform / embed → new tab). Defaults to
|
|
108
|
+
* same-tab for non-chat callsites. */
|
|
109
|
+
target?: '_blank'
|
|
110
|
+
rel?: 'noopener noreferrer'
|
|
111
|
+
targetPlatform?: string | null
|
|
112
|
+
/** OG placeholder URL used by the compact branch when no cover. */
|
|
113
|
+
placeholderUrl?: string | null
|
|
114
|
+
wholeCardClickable?: boolean
|
|
115
|
+
className?: string
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function getHosts(hosts: ProgramHost[] | null | undefined): Array<{ name: string; avatar: string | null }> {
|
|
119
|
+
if (!hosts) return []
|
|
120
|
+
try {
|
|
121
|
+
if (Array.isArray(hosts)) {
|
|
122
|
+
return hosts.map((host) => ({
|
|
123
|
+
name: host.name || 'Unknown',
|
|
124
|
+
avatar: host.avatar_url || null,
|
|
125
|
+
}))
|
|
126
|
+
}
|
|
127
|
+
if (typeof hosts === 'string') {
|
|
128
|
+
const parsed = JSON.parse(hosts)
|
|
129
|
+
if (Array.isArray(parsed)) {
|
|
130
|
+
return parsed.map((host: any) => ({
|
|
131
|
+
name: host.name || host.display_name || 'Unknown',
|
|
132
|
+
avatar: host.avatar_url || null,
|
|
133
|
+
}))
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
} catch (error) {
|
|
137
|
+
console.warn('Failed to parse hosts data:', error)
|
|
138
|
+
}
|
|
139
|
+
return []
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function MediaGallery({ images, title }: { images: ProgramMedia[]; title: string }) {
|
|
143
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState<number | null>(null)
|
|
144
|
+
const [isModalOpen, setIsModalOpen] = useState(false)
|
|
145
|
+
const openImageModal = (index: number, event?: React.MouseEvent) => {
|
|
146
|
+
if (event) event.stopPropagation()
|
|
147
|
+
setSelectedImageIndex(index)
|
|
148
|
+
setIsModalOpen(true)
|
|
149
|
+
}
|
|
150
|
+
const closeImageModal = () => {
|
|
151
|
+
setIsModalOpen(false)
|
|
152
|
+
setSelectedImageIndex(null)
|
|
153
|
+
}
|
|
154
|
+
return (
|
|
155
|
+
<>
|
|
156
|
+
<div className="p-6 pt-4">
|
|
157
|
+
<div className="overflow-x-auto mb-4">
|
|
158
|
+
<div className="flex gap-3 pb-2" style={{ width: 'max-content' }}>
|
|
159
|
+
{images.map((mediaItem, index) => (
|
|
160
|
+
<div
|
|
161
|
+
key={mediaItem.id}
|
|
162
|
+
className="flex-shrink-0 w-24 h-24 relative rounded-md overflow-hidden cursor-pointer group/thumb"
|
|
163
|
+
onClick={(e) => openImageModal(index, e)}
|
|
164
|
+
>
|
|
165
|
+
<Image
|
|
166
|
+
src={mediaItem.media_url}
|
|
167
|
+
alt={`${title} photo ${index + 1}`}
|
|
168
|
+
fill
|
|
169
|
+
className="object-cover group-hover/thumb:scale-105 transition-transform duration-200"
|
|
170
|
+
sizes="96px"
|
|
171
|
+
loading="lazy"
|
|
172
|
+
unoptimized
|
|
173
|
+
/>
|
|
174
|
+
<div className="absolute inset-0 bg-black/20 opacity-0 group-hover/thumb:opacity-100 transition-opacity duration-200 flex items-center justify-center">
|
|
175
|
+
<div className="w-6 h-6 rounded-full bg-white/90 flex items-center justify-center">
|
|
176
|
+
<span className="text-black text-sm">+</span>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
))}
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
<ImageGalleryModal
|
|
185
|
+
images={images.map((img) => img.media_url)}
|
|
186
|
+
isOpen={isModalOpen}
|
|
187
|
+
onClose={closeImageModal}
|
|
188
|
+
initialIndex={selectedImageIndex || 0}
|
|
189
|
+
/>
|
|
190
|
+
</>
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function ProgramCard<T extends BaseProgramItem>({
|
|
195
|
+
config,
|
|
196
|
+
item,
|
|
197
|
+
media = [],
|
|
198
|
+
renderMeta,
|
|
199
|
+
size = 'default',
|
|
200
|
+
href,
|
|
201
|
+
target,
|
|
202
|
+
rel,
|
|
203
|
+
placeholderUrl,
|
|
204
|
+
wholeCardClickable = false,
|
|
205
|
+
className,
|
|
206
|
+
}: ProgramCardProps<T>) {
|
|
207
|
+
const coverImage = item.cover_url
|
|
208
|
+
const images = media.filter((m) => m.media_type === 'image')
|
|
209
|
+
const hosts = getHosts(item.hosts)
|
|
210
|
+
const accentColor = 'var(--color-accent-primary)'
|
|
211
|
+
const isScheduled = 'status' in item && (item as any).status === 'scheduled'
|
|
212
|
+
|
|
213
|
+
if (size === 'sm') {
|
|
214
|
+
const itemDate = (() => {
|
|
215
|
+
try { return format(new Date(item.date), 'MMM d, yyyy') } catch { return '' }
|
|
216
|
+
})()
|
|
217
|
+
const compactCover = coverImage || placeholderUrl || null
|
|
218
|
+
let typeMeta: string | null = null
|
|
219
|
+
if (config.type === 'podcast' && 'duration_seconds' in item && !isScheduled) {
|
|
220
|
+
const dur = (item as any).duration_seconds
|
|
221
|
+
if (typeof dur === 'number' && dur > 0) typeMeta = formatDurationCompact(dur)
|
|
222
|
+
} else if (config.type === 'event' && 'location_name' in item) {
|
|
223
|
+
const loc = (item as any).location_name
|
|
224
|
+
if (typeof loc === 'string' && loc.trim().length > 0) typeMeta = loc
|
|
225
|
+
} else if (config.type === 'webinar' && 'start_at' in item) {
|
|
226
|
+
const w = item as any
|
|
227
|
+
const time = formatTimeWithTimezone(w.start_at, null)
|
|
228
|
+
const dur = formatDurationFromRange(w.start_at, w.end_at)
|
|
229
|
+
typeMeta = dur ? `${time} · ${dur}` : time
|
|
230
|
+
}
|
|
231
|
+
const subtitleParts = [itemDate, typeMeta, config.labels?.singular].filter(
|
|
232
|
+
(s): s is string => typeof s === 'string' && s.length > 0,
|
|
233
|
+
)
|
|
234
|
+
return (
|
|
235
|
+
<a href={href} target={target} rel={rel} className={cn(COMPACT_CARD_OUTER, className)}>
|
|
236
|
+
<span className={COMPACT_CARD_IMAGE_SLOT}>
|
|
237
|
+
{compactCover ? (
|
|
238
|
+
<Image
|
|
239
|
+
src={compactCover}
|
|
240
|
+
alt={item.title}
|
|
241
|
+
fill
|
|
242
|
+
sizes="56px"
|
|
243
|
+
className="object-contain"
|
|
244
|
+
unoptimized
|
|
245
|
+
/>
|
|
246
|
+
) : (
|
|
247
|
+
<span className="flex h-full w-full items-center justify-center text-ods-accent">
|
|
248
|
+
{config.type === 'podcast' ? <Play className="w-4 h-4" /> : config.type === 'webinar' ? <Video className="w-4 h-4" /> : <Clock className="w-4 h-4" />}
|
|
249
|
+
</span>
|
|
250
|
+
)}
|
|
251
|
+
{config.type === 'podcast' && !isScheduled && compactCover && (
|
|
252
|
+
<span className="absolute inset-0 flex items-center justify-center bg-black/30">
|
|
253
|
+
<Play className="w-4 h-4 text-white" fill="white" />
|
|
254
|
+
</span>
|
|
255
|
+
)}
|
|
256
|
+
</span>
|
|
257
|
+
<span className={COMPACT_CARD_TEXT_COL}>
|
|
258
|
+
<span className={COMPACT_CARD_TITLE_ROW}>
|
|
259
|
+
<span className={cn(COMPACT_CARD_TITLE, "font-['Azeret_Mono']")}>
|
|
260
|
+
{item.title}
|
|
261
|
+
</span>
|
|
262
|
+
</span>
|
|
263
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
264
|
+
<span className="truncate text-[11px] leading-4 text-[var(--color-accent-primary)]">
|
|
265
|
+
{subtitleParts.join(' · ')}
|
|
266
|
+
</span>
|
|
267
|
+
</span>
|
|
268
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
269
|
+
<span className={COMPACT_CARD_SUMMARY}>
|
|
270
|
+
{item.description || COMPACT_CARD_ROW_FILLER}
|
|
271
|
+
</span>
|
|
272
|
+
</span>
|
|
273
|
+
</span>
|
|
274
|
+
<span className="flex shrink-0 items-center self-start h-5 text-ods-text-secondary">
|
|
275
|
+
<ExternalLink className="w-3.5 h-3.5" />
|
|
276
|
+
</span>
|
|
277
|
+
</a>
|
|
278
|
+
)
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const itemDate = new Date(item.date)
|
|
282
|
+
const dateFormat = format(itemDate, 'EEEE d MMMM')
|
|
283
|
+
|
|
284
|
+
const defaultRenderMeta = () => {
|
|
285
|
+
if (config.type === 'podcast' && 'duration_seconds' in item && !isScheduled) {
|
|
286
|
+
return (
|
|
287
|
+
<>
|
|
288
|
+
<Clock className="w-4 h-4 text-ods-text-secondary" />
|
|
289
|
+
<span className="font-['DM_Sans'] text-ods-text-secondary">
|
|
290
|
+
{formatDurationCompact((item as any).duration_seconds)}
|
|
291
|
+
</span>
|
|
292
|
+
</>
|
|
293
|
+
)
|
|
294
|
+
}
|
|
295
|
+
if (config.type === 'event' && 'location_name' in item) {
|
|
296
|
+
return (
|
|
297
|
+
<span className="font-['DM_Sans'] text-ods-text-secondary">
|
|
298
|
+
{(item as any).location_name || 'Location TBD'}
|
|
299
|
+
</span>
|
|
300
|
+
)
|
|
301
|
+
}
|
|
302
|
+
if (config.type === 'webinar' && 'start_at' in item) {
|
|
303
|
+
const webinarItem = item as any
|
|
304
|
+
const duration = formatDurationFromRange(webinarItem.start_at, webinarItem.end_at)
|
|
305
|
+
return (
|
|
306
|
+
<>
|
|
307
|
+
<Video className="w-4 h-4 text-ods-text-secondary" />
|
|
308
|
+
<span className="font-['DM_Sans'] text-ods-text-secondary">
|
|
309
|
+
{formatTimeWithTimezone(webinarItem.start_at, null)}
|
|
310
|
+
{duration && ` · ${duration}`}
|
|
311
|
+
</span>
|
|
312
|
+
{webinarItem.timezone && (
|
|
313
|
+
<span className="font-['DM_Sans'] text-xs text-ods-text-secondary">
|
|
314
|
+
({webinarItem.timezone})
|
|
315
|
+
</span>
|
|
316
|
+
)}
|
|
317
|
+
</>
|
|
318
|
+
)
|
|
319
|
+
}
|
|
320
|
+
return null
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const cardHeader = (
|
|
324
|
+
<div className="p-6 border-ods-border flex-1">
|
|
325
|
+
<div className="flex flex-col md:flex-row gap-4 md:gap-6">
|
|
326
|
+
{coverImage && (
|
|
327
|
+
<div className="w-full md:w-[180px] flex-shrink-0 flex items-center">
|
|
328
|
+
<div className="relative rounded-lg overflow-hidden">
|
|
329
|
+
<Image
|
|
330
|
+
src={coverImage}
|
|
331
|
+
alt={item.title}
|
|
332
|
+
width={180}
|
|
333
|
+
height={180}
|
|
334
|
+
className="w-full h-auto rounded-lg object-contain"
|
|
335
|
+
unoptimized
|
|
336
|
+
/>
|
|
337
|
+
{config.type === 'podcast' && !isScheduled && (
|
|
338
|
+
<div className="absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg">
|
|
339
|
+
<Play className="w-10 h-10 text-white" fill="white" />
|
|
340
|
+
</div>
|
|
341
|
+
)}
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
)}
|
|
345
|
+
|
|
346
|
+
<div className="flex-1 min-w-0 flex flex-col">
|
|
347
|
+
<h3 className="font-['Azeret_Mono'] font-semibold text-xl md:text-2xl text-ods-text-primary leading-tight mb-3 min-h-[3rem] md:min-h-[3.5rem] line-clamp-2 flex items-center">
|
|
348
|
+
{item.title}
|
|
349
|
+
</h3>
|
|
350
|
+
|
|
351
|
+
<div className="flex flex-col md:flex-row md:items-center gap-2 md:gap-4 mb-4">
|
|
352
|
+
<span className="font-['DM_Sans'] font-medium" style={{ color: accentColor }}>
|
|
353
|
+
{dateFormat}
|
|
354
|
+
</span>
|
|
355
|
+
{renderMeta ? (
|
|
356
|
+
<>
|
|
357
|
+
<span className="hidden md:inline text-ods-text-secondary">•</span>
|
|
358
|
+
{renderMeta(item)}
|
|
359
|
+
</>
|
|
360
|
+
) : (
|
|
361
|
+
defaultRenderMeta() && (
|
|
362
|
+
<>
|
|
363
|
+
<span className="hidden md:inline text-ods-text-secondary">•</span>
|
|
364
|
+
<div className="flex items-center gap-2">{defaultRenderMeta()}</div>
|
|
365
|
+
</>
|
|
366
|
+
)
|
|
367
|
+
)}
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
<div className="flex-1">
|
|
371
|
+
<p className="font-['DM_Sans'] text-sm md:text-base text-ods-text-secondary leading-relaxed line-clamp-3 min-h-[4.5rem]">
|
|
372
|
+
{item.description}
|
|
373
|
+
</p>
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
{hosts.length > 0 && (
|
|
378
|
+
<div className="md:text-right">
|
|
379
|
+
<div className="flex flex-wrap md:justify-end gap-2">
|
|
380
|
+
{hosts.map((host, index) => (
|
|
381
|
+
<SquareAvatar
|
|
382
|
+
variant="round"
|
|
383
|
+
key={`${item.id}-host-${index}`}
|
|
384
|
+
src={host.avatar || undefined}
|
|
385
|
+
alt={host.name}
|
|
386
|
+
fallback={host.name.charAt(0).toUpperCase()}
|
|
387
|
+
size="sm"
|
|
388
|
+
/>
|
|
389
|
+
))}
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
)}
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
const cardFrameClass = cn(
|
|
398
|
+
'border border-ods-border rounded-lg overflow-hidden group transition-all duration-200 flex flex-col',
|
|
399
|
+
className,
|
|
400
|
+
)
|
|
401
|
+
const cardFrameStyle = { backgroundColor: 'var(--ods-system-greys-black)' } as const
|
|
402
|
+
|
|
403
|
+
if (wholeCardClickable) {
|
|
404
|
+
return (
|
|
405
|
+
<a
|
|
406
|
+
href={href}
|
|
407
|
+
target={target}
|
|
408
|
+
rel={rel}
|
|
409
|
+
className={cn(cardFrameClass, 'hover:border-ods-accent/50 no-underline')}
|
|
410
|
+
style={cardFrameStyle}
|
|
411
|
+
aria-label={`Open ${item.title}`}
|
|
412
|
+
>
|
|
413
|
+
{cardHeader}
|
|
414
|
+
{images.length > 0 && <MediaGallery images={images} title={item.title} />}
|
|
415
|
+
<div className="p-6 pt-0 mt-auto">
|
|
416
|
+
<div className="pt-4 border-t border-ods-border">
|
|
417
|
+
<span
|
|
418
|
+
className="inline-flex items-center gap-2 px-4 py-2 rounded-md border border-ods-accent text-ods-accent text-sm font-medium font-['DM_Sans']"
|
|
419
|
+
aria-hidden="true"
|
|
420
|
+
>
|
|
421
|
+
View {config.labels.singular} Details
|
|
422
|
+
<ExternalLink className="w-5 h-5" />
|
|
423
|
+
</span>
|
|
424
|
+
</div>
|
|
425
|
+
</div>
|
|
426
|
+
</a>
|
|
427
|
+
)
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
return (
|
|
431
|
+
<div className={cardFrameClass} style={cardFrameStyle}>
|
|
432
|
+
<a href={href} target={target} rel={rel} className="block" aria-label={`Open ${item.title}`}>
|
|
433
|
+
{cardHeader}
|
|
434
|
+
</a>
|
|
435
|
+
{images.length > 0 && <MediaGallery images={images} title={item.title} />}
|
|
436
|
+
<div className="p-6 pt-0 mt-auto">
|
|
437
|
+
<div className="pt-4 border-t border-ods-border">
|
|
438
|
+
<Button
|
|
439
|
+
variant="outline"
|
|
440
|
+
size="small-legacy"
|
|
441
|
+
href={href}
|
|
442
|
+
openInNewTab={target === '_blank'}
|
|
443
|
+
rightIcon={<ExternalLink className="w-5 h-5" />}
|
|
444
|
+
>
|
|
445
|
+
View {config.labels.singular} Details
|
|
446
|
+
</Button>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
)
|
|
451
|
+
}
|