@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,155 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React, { useState, useEffect } from 'react'
|
|
4
|
+
import Image from '../../../embed-shims/next-image'
|
|
5
|
+
import { cn } from '../../../utils/cn'
|
|
6
|
+
import { useImageEdgeColor } from '../../../hooks/ui/use-image-edge-color'
|
|
7
|
+
import { PlatformBadge } from '../../features/platform-badge'
|
|
8
|
+
|
|
9
|
+
interface PlatformInfo {
|
|
10
|
+
platform_id?: string
|
|
11
|
+
id?: string
|
|
12
|
+
name: string
|
|
13
|
+
display_name?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface AdminContentCardProps {
|
|
17
|
+
/** Cover image URL */
|
|
18
|
+
imageUrl?: string | null
|
|
19
|
+
/** Pre-computed placeholder URL used when `imageUrl` is missing or
|
|
20
|
+
* fails to load. Hub callers pass `useOgPlaceholder(title)`; embedders
|
|
21
|
+
* supply their own URL or leave null for a plain background fallback. */
|
|
22
|
+
placeholderUrl?: string | null
|
|
23
|
+
/** Alt text / fallback title */
|
|
24
|
+
title: string
|
|
25
|
+
/** Summary or description text */
|
|
26
|
+
summary?: string | null
|
|
27
|
+
/** Subtitle line (e.g. customer name) */
|
|
28
|
+
subtitle?: string | null
|
|
29
|
+
/** Platform badges */
|
|
30
|
+
platforms?: PlatformInfo[]
|
|
31
|
+
/** Status/info badges rendered after platform badges */
|
|
32
|
+
badges?: React.ReactNode
|
|
33
|
+
/** Meta info row (date, views, etc.) */
|
|
34
|
+
meta?: React.ReactNode
|
|
35
|
+
/** Action buttons row */
|
|
36
|
+
actions?: React.ReactNode
|
|
37
|
+
/** Additional class names */
|
|
38
|
+
className?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function AdminContentCard({
|
|
42
|
+
imageUrl,
|
|
43
|
+
placeholderUrl,
|
|
44
|
+
title,
|
|
45
|
+
summary,
|
|
46
|
+
subtitle,
|
|
47
|
+
platforms,
|
|
48
|
+
badges,
|
|
49
|
+
meta,
|
|
50
|
+
actions,
|
|
51
|
+
className,
|
|
52
|
+
}: AdminContentCardProps) {
|
|
53
|
+
const [imageError, setImageError] = useState(false)
|
|
54
|
+
const [imageLoaded, setImageLoaded] = useState(false)
|
|
55
|
+
const displayUrl = (imageUrl && !imageError) ? imageUrl : placeholderUrl
|
|
56
|
+
const imageBgColor = useImageEdgeColor(displayUrl || null, 'transparent')
|
|
57
|
+
|
|
58
|
+
// Reset loading state when the displayed image URL changes
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
setImageLoaded(false)
|
|
61
|
+
}, [displayUrl])
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<article className={cn(
|
|
65
|
+
'group h-full overflow-hidden rounded-2xl',
|
|
66
|
+
'border border-ods-border bg-ods-card',
|
|
67
|
+
'flex flex-col',
|
|
68
|
+
'transition-all duration-300 ease-out',
|
|
69
|
+
'hover:-translate-y-1 hover:shadow-lg hover:shadow-ods-accent/[0.08]',
|
|
70
|
+
'hover:border-ods-accent',
|
|
71
|
+
className,
|
|
72
|
+
)}>
|
|
73
|
+
{/* Cover Image — 3:2 aspect ratio, centered with edge-color fill */}
|
|
74
|
+
<div
|
|
75
|
+
className="relative aspect-[3/2] w-full overflow-hidden shrink-0"
|
|
76
|
+
style={{ backgroundColor: imageBgColor }}
|
|
77
|
+
>
|
|
78
|
+
{displayUrl ? (
|
|
79
|
+
<>
|
|
80
|
+
{!imageLoaded && (
|
|
81
|
+
<div className="absolute inset-0 animate-pulse bg-ods-border/20" />
|
|
82
|
+
)}
|
|
83
|
+
<Image
|
|
84
|
+
src={displayUrl}
|
|
85
|
+
alt={title}
|
|
86
|
+
fill
|
|
87
|
+
sizes="(min-width: 1280px) 33vw, (min-width: 768px) 50vw, 100vw"
|
|
88
|
+
className={cn(
|
|
89
|
+
'object-contain object-center',
|
|
90
|
+
'transition-transform duration-500 ease-out',
|
|
91
|
+
'group-hover:scale-[1.03]',
|
|
92
|
+
imageLoaded ? 'opacity-100' : 'opacity-0',
|
|
93
|
+
)}
|
|
94
|
+
unoptimized
|
|
95
|
+
onLoad={() => setImageLoaded(true)}
|
|
96
|
+
onError={() => setImageError(true)}
|
|
97
|
+
/>
|
|
98
|
+
</>
|
|
99
|
+
) : (
|
|
100
|
+
<div className="absolute inset-0 bg-ods-background" />
|
|
101
|
+
)}
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
{/* Content */}
|
|
105
|
+
<div className="flex flex-1 flex-col gap-3 p-5">
|
|
106
|
+
{/* Title */}
|
|
107
|
+
<h3 className="font-['DM_Sans'] font-bold text-ods-text-primary text-[18px] leading-snug line-clamp-2 break-words">
|
|
108
|
+
{title}
|
|
109
|
+
</h3>
|
|
110
|
+
|
|
111
|
+
{/* Subtitle (optional) */}
|
|
112
|
+
{subtitle && (
|
|
113
|
+
<p className="font-['DM_Sans'] text-[14px] text-ods-text-secondary truncate">
|
|
114
|
+
{subtitle}
|
|
115
|
+
</p>
|
|
116
|
+
)}
|
|
117
|
+
|
|
118
|
+
{/* Summary */}
|
|
119
|
+
{summary && (
|
|
120
|
+
<p className="font-['DM_Sans'] text-[14px] leading-relaxed text-ods-text-secondary line-clamp-2">
|
|
121
|
+
{summary}
|
|
122
|
+
</p>
|
|
123
|
+
)}
|
|
124
|
+
|
|
125
|
+
{/* Badges row */}
|
|
126
|
+
{(Number(platforms?.length) > 0 || badges) && (
|
|
127
|
+
<div className="flex items-center gap-2 flex-wrap">
|
|
128
|
+
{platforms?.map((p) => (
|
|
129
|
+
<PlatformBadge
|
|
130
|
+
key={p.platform_id || p.id}
|
|
131
|
+
platform={{ id: p.id || p.platform_id || '', name: p.name, display_name: p.display_name || p.name }}
|
|
132
|
+
size="xs"
|
|
133
|
+
/>
|
|
134
|
+
))}
|
|
135
|
+
{badges}
|
|
136
|
+
</div>
|
|
137
|
+
)}
|
|
138
|
+
|
|
139
|
+
{/* Meta row */}
|
|
140
|
+
{meta && (
|
|
141
|
+
<div className="flex items-center gap-3 text-[12px] font-['DM_Sans'] text-ods-text-secondary">
|
|
142
|
+
{meta}
|
|
143
|
+
</div>
|
|
144
|
+
)}
|
|
145
|
+
|
|
146
|
+
{/* Actions — pushed to bottom */}
|
|
147
|
+
{actions && (
|
|
148
|
+
<div className="flex items-center justify-between mt-auto pt-3 border-t border-ods-border">
|
|
149
|
+
{actions}
|
|
150
|
+
</div>
|
|
151
|
+
)}
|
|
152
|
+
</div>
|
|
153
|
+
</article>
|
|
154
|
+
)
|
|
155
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* BlogCard (pure presentation).
|
|
5
|
+
*
|
|
6
|
+
* Two densities:
|
|
7
|
+
* - `default`: full vertical card with cover, title, summary, author/date
|
|
8
|
+
* footer.
|
|
9
|
+
* - `sm`: compact horizontal card (~80px tall) for chat-inline rendering.
|
|
10
|
+
*
|
|
11
|
+
* The card writes NO click logic — callers wrap with their own anchor
|
|
12
|
+
* (e.g. hub's `<NavLinkAnchor>` or lib's `<NavLinkAnchorViaRuntime>`)
|
|
13
|
+
* and pass the resolved detail URL via `href`.
|
|
14
|
+
*
|
|
15
|
+
* Image-fallback chain:
|
|
16
|
+
* `post.featured_image` → `placeholderUrl` (caller passes
|
|
17
|
+
* `useOgPlaceholder(...)` from the hub OR any pre-resolved URL) →
|
|
18
|
+
* `bg-ods-bg` (via the slot's background).
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import React, { useState } from 'react'
|
|
22
|
+
import Image from '../../../embed-shims/next-image'
|
|
23
|
+
import { StatusBadge } from '../../ui/status-badge'
|
|
24
|
+
import { cn } from '../../../utils/cn'
|
|
25
|
+
import type { BlogPostSummary } from '../../../types/blog'
|
|
26
|
+
import {
|
|
27
|
+
COMPACT_CARD_IMAGE_SLOT,
|
|
28
|
+
COMPACT_CARD_META_ROW_BOX,
|
|
29
|
+
COMPACT_CARD_OUTER,
|
|
30
|
+
COMPACT_CARD_ROW_FILLER,
|
|
31
|
+
COMPACT_CARD_SKELETON_IMAGE_SLOT,
|
|
32
|
+
COMPACT_CARD_SKELETON_OUTER,
|
|
33
|
+
COMPACT_CARD_SUBTITLE,
|
|
34
|
+
COMPACT_CARD_SUMMARY,
|
|
35
|
+
COMPACT_CARD_TEXT_COL,
|
|
36
|
+
COMPACT_CARD_TITLE,
|
|
37
|
+
COMPACT_CARD_TITLE_ROW,
|
|
38
|
+
} from '../utils/compact-card-classes'
|
|
39
|
+
|
|
40
|
+
export interface BlogCardProps {
|
|
41
|
+
post: BlogPostSummary
|
|
42
|
+
/** Detail URL resolved by the caller (e.g. `buildContentURL`). */
|
|
43
|
+
href: string
|
|
44
|
+
/** When `_blank`, opens in a new tab. Set by chat dispatch via
|
|
45
|
+
* `computeIsNewTab`. Defaults to same-tab. */
|
|
46
|
+
target?: '_blank'
|
|
47
|
+
rel?: 'noopener noreferrer'
|
|
48
|
+
/** Platform that owns `href`. Used by parent wrappers; the card
|
|
49
|
+
* itself doesn't read it but exposes the prop for the standard
|
|
50
|
+
* pure-presentation contract. */
|
|
51
|
+
targetPlatform?: string | null
|
|
52
|
+
/** Placeholder URL when `post.featured_image` is missing. Caller
|
|
53
|
+
* resolves via `useOgPlaceholder` (hub) or a static asset. */
|
|
54
|
+
placeholderUrl?: string | null
|
|
55
|
+
size?: 'default' | 'sm'
|
|
56
|
+
className?: string
|
|
57
|
+
/** Surfaces a "Video" badge in compact mode. */
|
|
58
|
+
hasEmbeddedVideo?: boolean
|
|
59
|
+
/** Optional render-prop for the title-area anchor in `default` mode.
|
|
60
|
+
* When omitted the title renders as plain text (caller wraps the
|
|
61
|
+
* whole card if it wants a link). */
|
|
62
|
+
priority?: boolean
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function BlogCardSkeleton({ size = 'default' }: { size?: 'default' | 'sm' }) {
|
|
66
|
+
if (size === 'sm') {
|
|
67
|
+
return (
|
|
68
|
+
<span className={COMPACT_CARD_SKELETON_OUTER}>
|
|
69
|
+
<span className={COMPACT_CARD_SKELETON_IMAGE_SLOT} />
|
|
70
|
+
<span className={COMPACT_CARD_TEXT_COL}>
|
|
71
|
+
<span className={COMPACT_CARD_TITLE_ROW}>
|
|
72
|
+
<span className="h-3.5 w-3/5 rounded bg-ods-bg" />
|
|
73
|
+
</span>
|
|
74
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
75
|
+
<span className="h-3 w-2/5 rounded bg-ods-bg/70" />
|
|
76
|
+
</span>
|
|
77
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
78
|
+
<span className="h-3 w-11/12 rounded bg-ods-bg/40" />
|
|
79
|
+
</span>
|
|
80
|
+
</span>
|
|
81
|
+
</span>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
return (
|
|
85
|
+
<article className="group bg-ods-card border border-ods-border rounded-lg overflow-hidden h-full flex flex-col animate-pulse">
|
|
86
|
+
<div className="aspect-[16/9] bg-ods-bg" />
|
|
87
|
+
<div className="p-4 flex flex-col flex-grow space-y-3">
|
|
88
|
+
<div className="h-5 w-3/4 bg-ods-bg rounded" />
|
|
89
|
+
<div className="h-5 w-1/2 bg-ods-bg rounded" />
|
|
90
|
+
<div className="h-3 w-full bg-ods-bg/60 rounded" />
|
|
91
|
+
<div className="h-3 w-4/5 bg-ods-bg/60 rounded" />
|
|
92
|
+
<div className="mt-auto flex items-center gap-2">
|
|
93
|
+
<div className="h-8 w-8 rounded-full bg-ods-bg" />
|
|
94
|
+
<div className="h-3 w-24 bg-ods-bg/60 rounded" />
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</article>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function BlogCard({
|
|
102
|
+
post,
|
|
103
|
+
href,
|
|
104
|
+
|
|
105
|
+
target,
|
|
106
|
+
|
|
107
|
+
rel,
|
|
108
|
+
placeholderUrl,
|
|
109
|
+
size = 'default',
|
|
110
|
+
className,
|
|
111
|
+
hasEmbeddedVideo = false,
|
|
112
|
+
priority = false,
|
|
113
|
+
}: BlogCardProps) {
|
|
114
|
+
const [imageError, setImageError] = useState(false)
|
|
115
|
+
const displayImage = (post.featured_image && !imageError) ? post.featured_image : placeholderUrl
|
|
116
|
+
|
|
117
|
+
if (size === 'sm') {
|
|
118
|
+
const dateStr = post.published_at
|
|
119
|
+
? new Date(post.published_at).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' })
|
|
120
|
+
: ''
|
|
121
|
+
const firstCategory = post.categories?.find((c) => c && c.name)?.name
|
|
122
|
+
return (
|
|
123
|
+
<a
|
|
124
|
+
href={href}
|
|
125
|
+
target={target}
|
|
126
|
+
rel={rel}
|
|
127
|
+
className={cn(COMPACT_CARD_OUTER, className)}
|
|
128
|
+
aria-label={`Read article: ${post.title}`}
|
|
129
|
+
>
|
|
130
|
+
<span className={COMPACT_CARD_IMAGE_SLOT}>
|
|
131
|
+
{displayImage ? (
|
|
132
|
+
<Image
|
|
133
|
+
src={displayImage}
|
|
134
|
+
alt={post.title}
|
|
135
|
+
fill
|
|
136
|
+
sizes="56px"
|
|
137
|
+
className="object-contain"
|
|
138
|
+
unoptimized
|
|
139
|
+
onError={() => setImageError(true)}
|
|
140
|
+
/>
|
|
141
|
+
) : null}
|
|
142
|
+
</span>
|
|
143
|
+
<span className={COMPACT_CARD_TEXT_COL}>
|
|
144
|
+
<span className={cn(COMPACT_CARD_TITLE_ROW, 'gap-1.5')}>
|
|
145
|
+
<span className={cn(COMPACT_CARD_TITLE, "font-['DM_Sans']")}>
|
|
146
|
+
{post.title}
|
|
147
|
+
</span>
|
|
148
|
+
{hasEmbeddedVideo ? (
|
|
149
|
+
<StatusBadge text="Video" variant="button" colorScheme="cyan" className="shrink-0" />
|
|
150
|
+
) : null}
|
|
151
|
+
</span>
|
|
152
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
153
|
+
<span className={COMPACT_CARD_SUBTITLE}>
|
|
154
|
+
{dateStr}{dateStr && firstCategory ? ' · ' : ''}{firstCategory ?? 'Blog Post'}
|
|
155
|
+
</span>
|
|
156
|
+
</span>
|
|
157
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
158
|
+
<span className={COMPACT_CARD_SUMMARY}>
|
|
159
|
+
{post.summary || COMPACT_CARD_ROW_FILLER}
|
|
160
|
+
</span>
|
|
161
|
+
</span>
|
|
162
|
+
</span>
|
|
163
|
+
</a>
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Default: full vertical card.
|
|
168
|
+
const dateStr = post.published_at
|
|
169
|
+
? new Date(post.published_at).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' })
|
|
170
|
+
: ''
|
|
171
|
+
return (
|
|
172
|
+
<article
|
|
173
|
+
className={cn(
|
|
174
|
+
'group bg-ods-card border border-ods-border rounded-lg overflow-hidden',
|
|
175
|
+
'transition-all duration-300 ease-out',
|
|
176
|
+
'transform hover:translate-y-[-2px]',
|
|
177
|
+
'hover:border-ods-accent hover:shadow-lg hover:shadow-ods-accent/[0.08]',
|
|
178
|
+
'h-full flex flex-col',
|
|
179
|
+
className,
|
|
180
|
+
)}
|
|
181
|
+
role="article"
|
|
182
|
+
>
|
|
183
|
+
<a
|
|
184
|
+
href={href}
|
|
185
|
+
target={target}
|
|
186
|
+
rel={rel}
|
|
187
|
+
className="flex flex-col h-full focus:outline-none"
|
|
188
|
+
aria-label={`Read article: ${post.title}`}
|
|
189
|
+
>
|
|
190
|
+
<div className="relative w-full aspect-[16/9] overflow-hidden bg-ods-bg">
|
|
191
|
+
{displayImage ? (
|
|
192
|
+
<Image
|
|
193
|
+
src={displayImage}
|
|
194
|
+
alt={post.title}
|
|
195
|
+
fill
|
|
196
|
+
priority={priority}
|
|
197
|
+
quality={priority ? 85 : 75}
|
|
198
|
+
className={cn(
|
|
199
|
+
'object-cover object-center',
|
|
200
|
+
'transition-all duration-400 ease-out',
|
|
201
|
+
'hover:scale-[1.02]',
|
|
202
|
+
)}
|
|
203
|
+
sizes="(max-width: 768px) 100vw, (max-width: 1519px) 50vw, 33vw"
|
|
204
|
+
unoptimized
|
|
205
|
+
onError={() => setImageError(true)}
|
|
206
|
+
/>
|
|
207
|
+
) : null}
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<div className="p-4 flex flex-col flex-grow">
|
|
211
|
+
<div className="mb-3 flex items-center min-h-[50.4px] md:min-h-[56px] lg:min-h-[61.6px]">
|
|
212
|
+
<h3
|
|
213
|
+
className={cn(
|
|
214
|
+
"font-['DM_Sans'] font-bold text-ods-text-primary",
|
|
215
|
+
'text-lg md:text-xl lg:text-[22px]',
|
|
216
|
+
'leading-[1.4] tracking-[-0.02em]',
|
|
217
|
+
'line-clamp-2',
|
|
218
|
+
'transition-colors duration-300 ease-out',
|
|
219
|
+
'group-hover:text-ods-accent',
|
|
220
|
+
)}
|
|
221
|
+
>
|
|
222
|
+
{post.title}
|
|
223
|
+
</h3>
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
<div className="mb-3 flex items-center min-h-[42px] md:min-h-[45px] lg:min-h-[48px]">
|
|
227
|
+
<p
|
|
228
|
+
className={cn(
|
|
229
|
+
"font-['DM_Sans'] font-medium text-ods-text-primary",
|
|
230
|
+
'text-sm md:text-[15px] lg:text-base',
|
|
231
|
+
'leading-[1.5] line-clamp-2',
|
|
232
|
+
)}
|
|
233
|
+
>
|
|
234
|
+
{post.summary || ''}
|
|
235
|
+
</p>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
{/* Footer: author + date (simplified — no hub BlogMeta dep). */}
|
|
239
|
+
<div className="mt-auto flex items-center gap-2 text-sm text-ods-text-secondary">
|
|
240
|
+
{post.author_avatar ? (
|
|
241
|
+
<Image
|
|
242
|
+
src={post.author_avatar}
|
|
243
|
+
alt={post.author_name || ''}
|
|
244
|
+
width={32}
|
|
245
|
+
height={32}
|
|
246
|
+
className="rounded-full"
|
|
247
|
+
unoptimized
|
|
248
|
+
/>
|
|
249
|
+
) : null}
|
|
250
|
+
<span className="truncate">
|
|
251
|
+
{post.author_name || 'Anonymous'}
|
|
252
|
+
{dateStr ? <> · {dateStr}</> : null}
|
|
253
|
+
</span>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</a>
|
|
257
|
+
</article>
|
|
258
|
+
)
|
|
259
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
interface BlogImagePlaceholderProps {
|
|
6
|
+
/** Cover-image URL. The hub passes a `useOgPlaceholder(title, category)`
|
|
7
|
+
* result; embedders pass their own pre-resolved URL. When null, the
|
|
8
|
+
* component renders nothing. */
|
|
9
|
+
imageUrl: string | null
|
|
10
|
+
/** Used for the `alt` attribute. */
|
|
11
|
+
title: string
|
|
12
|
+
className?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Pure presentation wrapper for a cover-image / OG-placeholder fallback.
|
|
17
|
+
*
|
|
18
|
+
* Outer must be inline-content-model so this placeholder is HTML-valid
|
|
19
|
+
* when rendered inside a markdown `<p>` (e.g. via the chat shell's
|
|
20
|
+
* compact `BlogCard` fallback). `<span className="block">` keeps the
|
|
21
|
+
* same visual behavior as the prior `<div>` while satisfying the
|
|
22
|
+
* phrasing-content constraint of its parent.
|
|
23
|
+
*
|
|
24
|
+
* If the `imageUrl` itself 404s (cold cache, transient failure), the
|
|
25
|
+
* `onError` handler hides the broken-image icon so the parent's
|
|
26
|
+
* `bg-ods-bg` shows through cleanly. Same recovery pattern every
|
|
27
|
+
* cover-image render path uses.
|
|
28
|
+
*/
|
|
29
|
+
export function BlogImagePlaceholder({
|
|
30
|
+
imageUrl,
|
|
31
|
+
title,
|
|
32
|
+
className = '',
|
|
33
|
+
}: BlogImagePlaceholderProps) {
|
|
34
|
+
if (!imageUrl) return null
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<span className={`relative block w-full h-full overflow-hidden bg-ods-bg ${className}`}>
|
|
38
|
+
{/* eslint-disable-next-line @next/next/no-img-element -- this is a
|
|
39
|
+
dynamically-generated placeholder image with a query string;
|
|
40
|
+
next/image's loader configuration adds nothing here. */}
|
|
41
|
+
<img
|
|
42
|
+
src={imageUrl}
|
|
43
|
+
alt={`Cover image for ${title}`}
|
|
44
|
+
className="block w-full h-full object-contain"
|
|
45
|
+
loading="lazy"
|
|
46
|
+
onError={(e) => {
|
|
47
|
+
(e.currentTarget as HTMLImageElement).style.display = 'none'
|
|
48
|
+
}}
|
|
49
|
+
/>
|
|
50
|
+
</span>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Campaign Card Admin (chat compact variant).
|
|
5
|
+
*
|
|
6
|
+
* PURE PRESENTATION. Receives a pre-composed `<a>` prop bundle and
|
|
7
|
+
* renders a 3-row compact card. The hub still owns the full-size admin
|
|
8
|
+
* card (with delete + manage buttons) — only the compact chat variant
|
|
9
|
+
* lives here in lib.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import React from 'react'
|
|
13
|
+
import { Megaphone } from 'lucide-react'
|
|
14
|
+
import { formatDateShort } from '../../../utils/date-formatters'
|
|
15
|
+
import {
|
|
16
|
+
COMPACT_CARD_ICON_SLOT,
|
|
17
|
+
COMPACT_CARD_META_ROW_BOX,
|
|
18
|
+
COMPACT_CARD_OUTER,
|
|
19
|
+
COMPACT_CARD_OUTER_STATIC,
|
|
20
|
+
COMPACT_CARD_ROW_FILLER,
|
|
21
|
+
COMPACT_CARD_SKELETON_IMAGE_SLOT,
|
|
22
|
+
COMPACT_CARD_SKELETON_OUTER,
|
|
23
|
+
COMPACT_CARD_SUBTITLE,
|
|
24
|
+
COMPACT_CARD_SUMMARY,
|
|
25
|
+
COMPACT_CARD_TEXT_COL,
|
|
26
|
+
COMPACT_CARD_TITLE,
|
|
27
|
+
COMPACT_CARD_TITLE_ROW,
|
|
28
|
+
} from '../utils/compact-card-classes'
|
|
29
|
+
|
|
30
|
+
/** Minimal campaign shape needed by the chat-inline compact card. */
|
|
31
|
+
export interface CampaignCardItem {
|
|
32
|
+
id: string
|
|
33
|
+
name: string
|
|
34
|
+
description?: string | null
|
|
35
|
+
start_date?: string | null
|
|
36
|
+
goals?: Array<unknown> | null
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface CampaignCardAdminAnchorProps {
|
|
40
|
+
href: string
|
|
41
|
+
target?: '_blank'
|
|
42
|
+
rel?: 'noopener noreferrer'
|
|
43
|
+
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface CampaignCardAdminProps {
|
|
47
|
+
campaign: CampaignCardItem
|
|
48
|
+
className?: string
|
|
49
|
+
anchorProps?: CampaignCardAdminAnchorProps
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
export function CampaignCardAdmin({ campaign, className, anchorProps }: CampaignCardAdminProps) {
|
|
54
|
+
const goalsCount = campaign.goals?.length || 0
|
|
55
|
+
|
|
56
|
+
const innerChildren = (
|
|
57
|
+
<>
|
|
58
|
+
<span className={COMPACT_CARD_ICON_SLOT}>
|
|
59
|
+
<Megaphone className="h-5 w-5" />
|
|
60
|
+
</span>
|
|
61
|
+
<span className={COMPACT_CARD_TEXT_COL}>
|
|
62
|
+
<span className={COMPACT_CARD_TITLE_ROW}>
|
|
63
|
+
<span className={COMPACT_CARD_TITLE}>{campaign.name}</span>
|
|
64
|
+
</span>
|
|
65
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
66
|
+
<span className={COMPACT_CARD_SUBTITLE}>
|
|
67
|
+
{[
|
|
68
|
+
campaign.start_date ? formatDateShort(campaign.start_date) : null,
|
|
69
|
+
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? 's' : ''}` : null,
|
|
70
|
+
'Marketing campaign',
|
|
71
|
+
].filter(Boolean).join(' · ')}
|
|
72
|
+
</span>
|
|
73
|
+
</span>
|
|
74
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
75
|
+
<span className={COMPACT_CARD_SUMMARY}>
|
|
76
|
+
{campaign.description || COMPACT_CARD_ROW_FILLER}
|
|
77
|
+
</span>
|
|
78
|
+
</span>
|
|
79
|
+
</span>
|
|
80
|
+
</>
|
|
81
|
+
)
|
|
82
|
+
if (anchorProps) {
|
|
83
|
+
return (
|
|
84
|
+
<a {...anchorProps} className={`${COMPACT_CARD_OUTER} ${className ?? ''}`}>
|
|
85
|
+
{innerChildren}
|
|
86
|
+
</a>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
return (
|
|
90
|
+
<span className={`${COMPACT_CARD_OUTER_STATIC} ${className ?? ''}`} aria-label="No link available">
|
|
91
|
+
{innerChildren}
|
|
92
|
+
</span>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function CampaignCardAdminSkeleton({ className }: { className?: string }) {
|
|
97
|
+
return (
|
|
98
|
+
<span className={`${COMPACT_CARD_SKELETON_OUTER} ${className ?? ''}`}>
|
|
99
|
+
<span className={COMPACT_CARD_SKELETON_IMAGE_SLOT} />
|
|
100
|
+
<span className={COMPACT_CARD_TEXT_COL}>
|
|
101
|
+
<span className={COMPACT_CARD_TITLE_ROW}>
|
|
102
|
+
<span className="h-3.5 w-3/5 rounded bg-ods-bg" />
|
|
103
|
+
</span>
|
|
104
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
105
|
+
<span className="h-3 w-1/2 rounded bg-ods-bg/70" />
|
|
106
|
+
</span>
|
|
107
|
+
<span className={COMPACT_CARD_META_ROW_BOX}>
|
|
108
|
+
<span className="h-3 w-11/12 rounded bg-ods-bg/40" />
|
|
109
|
+
</span>
|
|
110
|
+
</span>
|
|
111
|
+
</span>
|
|
112
|
+
)
|
|
113
|
+
}
|