@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,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ClickUp custom_item_id → human-readable label resolver.
|
|
3
|
+
*
|
|
4
|
+
* Lib-side subset of the hub's `lib/utils/clickup-task-type-utils.ts`.
|
|
5
|
+
* The hub file also exports delivery / workspace slug helpers used by
|
|
6
|
+
* the sync engine; only the chat-surfaced label resolver migrates here
|
|
7
|
+
* because chat-inline cards and activity feeds need it.
|
|
8
|
+
*
|
|
9
|
+
* Reference: ClickUp's standard task types (custom_item_id values):
|
|
10
|
+
* null/1000=Task, 1001=Milestone, 1002=Recurring, 1003=Subtask,
|
|
11
|
+
* 1004=Form, 1006=Plan, 1007=Strategy, 1008=Bug, 1009=Request,
|
|
12
|
+
* 1010=Feature, 1011=Story, 1012=Epic, 1013=Component, 1014=Initiative.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export const CUSTOM_ITEM_ID = {
|
|
16
|
+
TASK: 1000,
|
|
17
|
+
MILESTONE: 1001,
|
|
18
|
+
RECURRING: 1002,
|
|
19
|
+
SUBTASK: 1003,
|
|
20
|
+
FORM: 1004,
|
|
21
|
+
PLAN: 1006,
|
|
22
|
+
STRATEGY: 1007,
|
|
23
|
+
BUG: 1008,
|
|
24
|
+
REQUEST: 1009,
|
|
25
|
+
FEATURE: 1010,
|
|
26
|
+
STORY: 1011,
|
|
27
|
+
EPIC: 1012,
|
|
28
|
+
COMPONENT: 1013,
|
|
29
|
+
INITIATIVE: 1014,
|
|
30
|
+
} as const
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Display name for a ClickUp task type — used in chat-inline cards and
|
|
34
|
+
* activity feeds where the type badge would otherwise show a numeric ID.
|
|
35
|
+
*
|
|
36
|
+
* Returning `null` for unknown IDs lets callers fall back to a generic
|
|
37
|
+
* "Task" affordance rather than printing `task-1100` or similar.
|
|
38
|
+
*/
|
|
39
|
+
export function getTaskTypeLabel(
|
|
40
|
+
customItemId: number | null | undefined,
|
|
41
|
+
): string | null {
|
|
42
|
+
switch (customItemId) {
|
|
43
|
+
case CUSTOM_ITEM_ID.TASK: return 'Task'
|
|
44
|
+
case CUSTOM_ITEM_ID.MILESTONE: return 'Milestone'
|
|
45
|
+
case CUSTOM_ITEM_ID.RECURRING: return 'Recurring'
|
|
46
|
+
case CUSTOM_ITEM_ID.SUBTASK: return 'Subtask'
|
|
47
|
+
case CUSTOM_ITEM_ID.FORM: return 'Form'
|
|
48
|
+
case CUSTOM_ITEM_ID.PLAN: return 'Plan'
|
|
49
|
+
case CUSTOM_ITEM_ID.STRATEGY: return 'Strategy'
|
|
50
|
+
case CUSTOM_ITEM_ID.BUG: return 'Bug'
|
|
51
|
+
case CUSTOM_ITEM_ID.REQUEST: return 'Request'
|
|
52
|
+
case CUSTOM_ITEM_ID.FEATURE: return 'Feature'
|
|
53
|
+
case CUSTOM_ITEM_ID.STORY: return 'Story'
|
|
54
|
+
case CUSTOM_ITEM_ID.EPIC: return 'Epic'
|
|
55
|
+
case CUSTOM_ITEM_ID.COMPONENT: return 'Component'
|
|
56
|
+
case CUSTOM_ITEM_ID.INITIATIVE: return 'Initiative'
|
|
57
|
+
default: return null
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact-card class constants — single source of truth for the chat-inline
|
|
3
|
+
* `size='sm'` card frame.
|
|
4
|
+
*
|
|
5
|
+
* Lifted from the hub's `components/shared/compact-card/compact-card-classes.ts`
|
|
6
|
+
* so the pure-presentation cards in `entity-cards/` can stop importing from
|
|
7
|
+
* the hub tree. Every compact card across the chat shell shares the SAME
|
|
8
|
+
* outer frame, skeleton frame, image slot, icon slot, text column, and
|
|
9
|
+
* per-line typography.
|
|
10
|
+
*
|
|
11
|
+
* Card-specific variation (Play overlay on podcasts, #N pill on investor
|
|
12
|
+
* updates, status badge on roadmap) lives INSIDE the card next to its
|
|
13
|
+
* other type-specific JSX; the frame stays uniform across types.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** Loaded compact card outer frame for INTERACTIVE state — anchor wrap
|
|
17
|
+
* with hover/transition affordance. Use ONLY when the card resolves
|
|
18
|
+
* to a real, safe href; the user expects a clickable feel. */
|
|
19
|
+
export const COMPACT_CARD_OUTER =
|
|
20
|
+
'my-1.5 flex items-start gap-3 w-full p-2 rounded-lg border border-ods-border bg-ods-card no-underline transition-colors hover:border-ods-text-secondary/40'
|
|
21
|
+
|
|
22
|
+
/** Loaded compact card outer frame for NON-INTERACTIVE state — span wrap
|
|
23
|
+
* used when `safeHref()` rejects the chat ref's url. */
|
|
24
|
+
export const COMPACT_CARD_OUTER_STATIC =
|
|
25
|
+
'my-1.5 flex items-start gap-3 w-full p-2 rounded-lg border border-ods-border bg-ods-card no-underline cursor-default'
|
|
26
|
+
|
|
27
|
+
/** Skeleton outer frame — same dimensions as loaded, plus `animate-pulse`. */
|
|
28
|
+
export const COMPACT_CARD_SKELETON_OUTER =
|
|
29
|
+
'my-1.5 flex w-full animate-pulse items-start gap-3 rounded-lg border border-ods-border bg-ods-card p-2'
|
|
30
|
+
|
|
31
|
+
/** 56×56 image slot — for cards with a cover image. */
|
|
32
|
+
export const COMPACT_CARD_IMAGE_SLOT =
|
|
33
|
+
'relative block shrink-0 self-start w-14 h-14 aspect-square overflow-hidden rounded-md bg-ods-bg'
|
|
34
|
+
|
|
35
|
+
/** 56×56 placeholder slot for skeletons. */
|
|
36
|
+
export const COMPACT_CARD_SKELETON_IMAGE_SLOT =
|
|
37
|
+
'block h-14 w-14 aspect-square shrink-0 self-start rounded-md bg-ods-bg'
|
|
38
|
+
|
|
39
|
+
/** 56×56 icon slot — for cards without a cover image. */
|
|
40
|
+
export const COMPACT_CARD_ICON_SLOT =
|
|
41
|
+
'flex h-14 w-14 aspect-square shrink-0 self-start items-center justify-center rounded-md bg-ods-bg text-ods-accent'
|
|
42
|
+
|
|
43
|
+
/** Text column wrapper — explicit 56px height with `flex flex-col`. */
|
|
44
|
+
export const COMPACT_CARD_TEXT_COL =
|
|
45
|
+
'flex min-w-0 flex-1 flex-col gap-0.5 min-h-14'
|
|
46
|
+
|
|
47
|
+
/** Title row container — fixed 20px (h-5) to match `text-sm leading-5`. */
|
|
48
|
+
export const COMPACT_CARD_TITLE_ROW = 'flex items-center min-w-0 h-5'
|
|
49
|
+
|
|
50
|
+
/** Subtitle / summary row container — fixed 16px (h-4). */
|
|
51
|
+
export const COMPACT_CARD_META_ROW_BOX = 'flex items-center min-w-0 h-4'
|
|
52
|
+
|
|
53
|
+
/** Title text — bold 14px on a 20px line. */
|
|
54
|
+
export const COMPACT_CARD_TITLE =
|
|
55
|
+
'truncate text-sm font-semibold leading-5 text-ods-text-primary'
|
|
56
|
+
|
|
57
|
+
/** Subtitle text — 11px on a 16px line. */
|
|
58
|
+
export const COMPACT_CARD_SUBTITLE =
|
|
59
|
+
'truncate text-[11px] leading-4 text-ods-text-secondary'
|
|
60
|
+
|
|
61
|
+
/** Summary text — same metrics as subtitle, dropped to 80% opacity. */
|
|
62
|
+
export const COMPACT_CARD_SUMMARY =
|
|
63
|
+
'truncate text-[11px] leading-4 text-ods-text-secondary/80'
|
|
64
|
+
|
|
65
|
+
/** Meta-row variant — multi-part 11px metadata. */
|
|
66
|
+
export const COMPACT_CARD_META_ROW =
|
|
67
|
+
'flex items-center gap-1.5 min-w-0 text-[11px] leading-4 text-ods-text-secondary'
|
|
68
|
+
|
|
69
|
+
/** Non-breaking space — used as a fallback child so the row's height stays 16px. */
|
|
70
|
+
export const COMPACT_CARD_ROW_FILLER = ' '
|
|
71
|
+
|
|
72
|
+
/** Schemes allowed in the outer `<a href>` of a compact card. */
|
|
73
|
+
const SAFE_URL_SCHEMES = ['http:', 'https:', 'mailto:']
|
|
74
|
+
|
|
75
|
+
/** Return the input url ONLY if it's safe to drop into an `<a href>`:
|
|
76
|
+
* the scheme must be http / https / mailto, or the URL must be a
|
|
77
|
+
* same-origin path (`/blog/foo`). Otherwise returns `null`. */
|
|
78
|
+
export function safeHref(url: string | null | undefined): string | null {
|
|
79
|
+
if (!url) return null
|
|
80
|
+
// Defense in depth: control chars + zero-width / line-separator chars.
|
|
81
|
+
if (/[\u0000-\u001f\u007f\u200b-\u200d\u2028\u2029\ufeff]/.test(url)) return null
|
|
82
|
+
const trimmed = url.trim()
|
|
83
|
+
if (!trimmed) return null
|
|
84
|
+
// Pure same-origin path.
|
|
85
|
+
if (trimmed.startsWith('/') && !trimmed.startsWith('//')) return trimmed
|
|
86
|
+
if (trimmed.startsWith('#')) return trimmed
|
|
87
|
+
// Reject bare scheme-only inputs.
|
|
88
|
+
if (/^[a-z][a-z0-9+.-]*:$/i.test(trimmed)) return null
|
|
89
|
+
try {
|
|
90
|
+
const parsed = new URL(trimmed, 'https://_safehref_base.invalid')
|
|
91
|
+
if (!SAFE_URL_SCHEMES.includes(parsed.protocol)) return null
|
|
92
|
+
if ((parsed.protocol === 'https:' || parsed.protocol === 'http:') && !parsed.hostname) return null
|
|
93
|
+
return trimmed
|
|
94
|
+
} catch {
|
|
95
|
+
return null
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure new-tab decision helper.
|
|
3
|
+
*
|
|
4
|
+
* Same logic as the hub's prior inline `decideNewTab`, but parameterized:
|
|
5
|
+
* - `currentSource` is passed by caller (was `currentPlatform()` reads
|
|
6
|
+
* inside the body). Hub callers pass `currentPlatform()`; lib chip
|
|
7
|
+
* code passes `runtime.source ?? ''`.
|
|
8
|
+
*
|
|
9
|
+
* BRANCH PRIORITY:
|
|
10
|
+
* 1. `runtimeMode === 'embed'` → always new-tab (embed-mode short-circuit)
|
|
11
|
+
* 2. `openIn === 'new-tab'` or `'same-tab'` — explicit caller override
|
|
12
|
+
* 3. `alwaysNewTab === true` (legacy synonym for `openIn: 'new-tab'`)
|
|
13
|
+
* 4. `targetPlatform` defined AND `currentSource` non-empty →
|
|
14
|
+
* platform comparison (cross-app → new tab, same-app → same tab)
|
|
15
|
+
* 5. Legacy fallback: `isCrossOriginUrl(href)` — origin compare. Works
|
|
16
|
+
* in prod (distinct hosts) but degrades to "always same-tab" in dev.
|
|
17
|
+
*
|
|
18
|
+
* No call site implements its own variant of the rule.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { isCrossOriginUrl } from './is-cross-origin-url'
|
|
22
|
+
|
|
23
|
+
export type NavSurface = 'useNavLink' | 'useUnifiedNav'
|
|
24
|
+
export type RuntimeMode = 'host' | 'embed'
|
|
25
|
+
|
|
26
|
+
export interface DecideNewTabInput {
|
|
27
|
+
href: string | null | undefined
|
|
28
|
+
targetPlatform?: string | null
|
|
29
|
+
openIn?: 'new-tab' | 'same-tab'
|
|
30
|
+
alwaysNewTab?: boolean
|
|
31
|
+
/** Caller tag — labels the decision in any external trace logging. */
|
|
32
|
+
surface?: NavSurface
|
|
33
|
+
/** Optional chat-runtime mode. When omitted OR set to `'host'`,
|
|
34
|
+
* behavior is byte-equivalent to the legacy logic. Only `'embed'`
|
|
35
|
+
* triggers the new priority-1 branch that forces new-tab. */
|
|
36
|
+
runtimeMode?: RuntimeMode
|
|
37
|
+
/** Current chat source / platform identifier — caller-threaded.
|
|
38
|
+
* Empty string disables the platform-comparison branch (falls
|
|
39
|
+
* through to the origin-compare fallback). */
|
|
40
|
+
currentSource: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function decideNewTab(input: DecideNewTabInput): boolean {
|
|
44
|
+
const { href, targetPlatform, openIn, alwaysNewTab, runtimeMode, currentSource } = input
|
|
45
|
+
|
|
46
|
+
// Priority #1: embed-mode trumps every other branch.
|
|
47
|
+
if (runtimeMode === 'embed') return true
|
|
48
|
+
if (openIn === 'new-tab') return true
|
|
49
|
+
if (alwaysNewTab === true) return true
|
|
50
|
+
if (openIn === 'same-tab') return false
|
|
51
|
+
// `currentSource` falsy guard: if empty, fall through to origin check.
|
|
52
|
+
if (targetPlatform !== undefined && targetPlatform !== null && currentSource) {
|
|
53
|
+
return targetPlatform !== currentSource
|
|
54
|
+
}
|
|
55
|
+
if (!href) return false
|
|
56
|
+
return isCrossOriginUrl(href)
|
|
57
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified URL builders for the third-party app deep-links used by chat
|
|
3
|
+
* surfaces (chip clicks, inline-card tracking rows).
|
|
4
|
+
*
|
|
5
|
+
* Lib-side subset of the hub's `lib/utils/external-app-urls.ts`. Today
|
|
6
|
+
* it carries the ClickUp deep-link helper only — HubSpot and admin
|
|
7
|
+
* routes stay hub-side because they're consumed exclusively by
|
|
8
|
+
* hub-internal mappers.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const CLICKUP_APP_BASE = 'https://app.clickup.com'
|
|
12
|
+
|
|
13
|
+
/** ClickUp task detail page in the ClickUp UI. Returns `null` when the
|
|
14
|
+
* external id is missing so consumers don't end up with a
|
|
15
|
+
* `.../t/undefined` link. */
|
|
16
|
+
export function clickupTaskUrl(externalId: string | null | undefined): string | null {
|
|
17
|
+
if (!externalId) return null
|
|
18
|
+
return `${CLICKUP_APP_BASE}/t/${externalId}`
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `flattenAssistantContent` — coerce a chat message's `content` field
|
|
3
|
+
* (string OR `MessageSegment[]`) into a plain string for wire transport.
|
|
4
|
+
*
|
|
5
|
+
* Background: useChat populates assistant messages with a structured
|
|
6
|
+
* segment array as the streamed SSE arrives (text segments, approval
|
|
7
|
+
* cards, tool_execution blocks, thinking blocks). The local React
|
|
8
|
+
* state holds `content: MessageSegment[]` for those turns. When the
|
|
9
|
+
* client serializes the conversation back to the server for the NEXT
|
|
10
|
+
* turn, a naive `typeof content === 'string' ? content : ''` strip-
|
|
11
|
+
* to-empty silently drops every post-approve receipt, every Sonnet-
|
|
12
|
+
* streamed answer, and every diagnostic Q — Anthropic receives
|
|
13
|
+
* `assistant: ""` for those turns and has no context to follow.
|
|
14
|
+
*
|
|
15
|
+
* The function:
|
|
16
|
+
* 1. Returns plain strings as-is.
|
|
17
|
+
* 2. For arrays, joins every `text`-typed segment's `text` field
|
|
18
|
+
* with `\n\n` separators. Non-text segments (approval_request,
|
|
19
|
+
* tool_execution, thinking) have no LLM-visible textual content
|
|
20
|
+
* and are intentionally skipped — they shouldn't bloat the
|
|
21
|
+
* request body.
|
|
22
|
+
* 3. Returns `''` for anything else (null, undefined, unknown shape).
|
|
23
|
+
*/
|
|
24
|
+
export function flattenAssistantContent(raw: unknown): string {
|
|
25
|
+
if (typeof raw === 'string') return raw
|
|
26
|
+
if (!Array.isArray(raw)) return ''
|
|
27
|
+
const parts: string[] = []
|
|
28
|
+
for (const seg of raw) {
|
|
29
|
+
if (seg && typeof seg === 'object' && (seg as { type?: string }).type === 'text') {
|
|
30
|
+
const t = (seg as { text?: unknown }).text
|
|
31
|
+
if (typeof t === 'string' && t.length > 0) parts.push(t)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return parts.join('\n\n')
|
|
35
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon registry — string `icon_name` → React component.
|
|
3
|
+
*
|
|
4
|
+
* SINGLE SOURCE OF TRUTH (no, really this time) for every icon-name →
|
|
5
|
+
* React-component lookup across the lib + the hub. Two DB columns feed
|
|
6
|
+
* in with DIFFERENT conventions:
|
|
7
|
+
*
|
|
8
|
+
* - `chat_admin_slash_commands.icon_name` — kebab-case (`'rocket'`,
|
|
9
|
+
* `'hubspot'`, `'github'`, `'dollar-sign'`).
|
|
10
|
+
* - `social_platforms.icon_name` — PascalCase component names
|
|
11
|
+
* (`'LinkedInIcon'`, `'XLogo'`, `'YouTubeIcon'`, `'Github'`).
|
|
12
|
+
*
|
|
13
|
+
* The registry stores entries under kebab-case keys (URL/DB-friendly,
|
|
14
|
+
* shell-safe, matches `lucide-react`'s own file-naming convention).
|
|
15
|
+
* The PascalCase variants come in via `normalizeIconKey()`, which maps
|
|
16
|
+
* known PascalCase aliases → kebab-case before the lookup runs.
|
|
17
|
+
*
|
|
18
|
+
* Adding a new icon: import the component below, add a `'name': Component`
|
|
19
|
+
* entry in `ICON_REGISTRY`, and (if the same icon also flows in from a DB
|
|
20
|
+
* column that uses PascalCase) add a `PascalName → 'name'` row to
|
|
21
|
+
* `PASCAL_TO_KEBAB_ALIASES`.
|
|
22
|
+
*
|
|
23
|
+
* Fallback: an unknown / null icon_name resolves to `FileText` so a chip
|
|
24
|
+
* never renders without an icon.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { createElement, type ComponentType, type ReactNode } from 'react'
|
|
28
|
+
import {
|
|
29
|
+
Activity,
|
|
30
|
+
Banknote,
|
|
31
|
+
Bell,
|
|
32
|
+
BookOpen,
|
|
33
|
+
Box,
|
|
34
|
+
Briefcase,
|
|
35
|
+
Calendar,
|
|
36
|
+
CheckSquare,
|
|
37
|
+
DollarSign,
|
|
38
|
+
Facebook,
|
|
39
|
+
FileText,
|
|
40
|
+
Github,
|
|
41
|
+
Globe,
|
|
42
|
+
GraduationCap,
|
|
43
|
+
Headphones,
|
|
44
|
+
Info,
|
|
45
|
+
Instagram,
|
|
46
|
+
Mail,
|
|
47
|
+
Megaphone,
|
|
48
|
+
MessageCircle,
|
|
49
|
+
MessageSquare,
|
|
50
|
+
Newspaper,
|
|
51
|
+
Package,
|
|
52
|
+
PenSquare,
|
|
53
|
+
Rocket,
|
|
54
|
+
Search,
|
|
55
|
+
Send,
|
|
56
|
+
Shield,
|
|
57
|
+
Star,
|
|
58
|
+
TableProperties,
|
|
59
|
+
TrendingUp,
|
|
60
|
+
Twitter,
|
|
61
|
+
Users,
|
|
62
|
+
Video,
|
|
63
|
+
Youtube,
|
|
64
|
+
} from 'lucide-react'
|
|
65
|
+
// Brand icons — lib-local exports.
|
|
66
|
+
import {
|
|
67
|
+
SlackIcon,
|
|
68
|
+
GitHubIcon,
|
|
69
|
+
ClickUpIcon,
|
|
70
|
+
HubspotIcon,
|
|
71
|
+
LinkedInIcon,
|
|
72
|
+
FacebookIcon,
|
|
73
|
+
InstagramIcon,
|
|
74
|
+
YouTubeIcon,
|
|
75
|
+
XLogo,
|
|
76
|
+
OpenFrameLogo as RawOpenFrameLogo,
|
|
77
|
+
} from '../../icons'
|
|
78
|
+
|
|
79
|
+
// Wrapper so the OpenFrame logo's outer frame inherits the parent's text
|
|
80
|
+
// color instead of its hardcoded default — that default is invisible on
|
|
81
|
+
// dark chat surfaces. The white squares stay white (visible on dark).
|
|
82
|
+
// With this, the parent's `text-ods-text-primary` propagates via
|
|
83
|
+
// `currentColor` and the frame renders in the same primary text color
|
|
84
|
+
// as the lucide icons next to it. Uses `createElement` (not JSX) so this
|
|
85
|
+
// stays a `.ts` file. Accepts `color` for shape-compat with the registry's
|
|
86
|
+
// IconComponent type, but ignores it — the logo's outer frame is wired
|
|
87
|
+
// to `currentColor` via the upperPathColor pass-through.
|
|
88
|
+
const OpenFrameLogoIcon: ComponentType<{ className?: string; color?: string }> = ({ className }) =>
|
|
89
|
+
createElement(RawOpenFrameLogo, { className, upperPathColor: 'currentColor' })
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Loose icon-component shape: every entry accepts `className`; `color` is
|
|
93
|
+
* optional (lucide + most brand icons accept it; OpenFrameLogo doesn't,
|
|
94
|
+
* but `color` is optional so passing `undefined` is a no-op). Loose enough
|
|
95
|
+
* to accept both lucide's `LucideIcon` and our brand SVG components.
|
|
96
|
+
*/
|
|
97
|
+
type IconComponent = ComponentType<{ className?: string; color?: string }>
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The kebab-case registry. ALL lookups go through here; PascalCase
|
|
101
|
+
* aliases route through `normalizeIconKey()` first.
|
|
102
|
+
*/
|
|
103
|
+
export const ICON_REGISTRY: Record<string, IconComponent> = {
|
|
104
|
+
// lucide-react (kebab-case)
|
|
105
|
+
activity: Activity,
|
|
106
|
+
banknote: Banknote,
|
|
107
|
+
bell: Bell,
|
|
108
|
+
'book-open': BookOpen,
|
|
109
|
+
box: Box,
|
|
110
|
+
briefcase: Briefcase,
|
|
111
|
+
calendar: Calendar,
|
|
112
|
+
'check-square': CheckSquare,
|
|
113
|
+
'dollar-sign': DollarSign,
|
|
114
|
+
// For brand-vs-lucide variants the kebab key is the BRAND (most-common
|
|
115
|
+
// social-platform intent); `'<name>-lucide'` carries the lucide outline.
|
|
116
|
+
facebook: FacebookIcon,
|
|
117
|
+
'facebook-lucide': Facebook,
|
|
118
|
+
'file-text': FileText,
|
|
119
|
+
// `'github-lucide'` is the lucide outline glyph (used by
|
|
120
|
+
// `social_platforms.icon_name='Github'`); `'github'` is the brand icon
|
|
121
|
+
// (used by `chat_admin_slash_commands.icon_name='github'`). The PascalCase
|
|
122
|
+
// alias `'Github' → 'github-lucide'` routes the lucide glyph for
|
|
123
|
+
// social-platform DB rows; `'GitHubIcon' → 'github'` keeps brand routing
|
|
124
|
+
// consistent for callers that store the PascalCase component name.
|
|
125
|
+
github: GitHubIcon,
|
|
126
|
+
'github-lucide': Github,
|
|
127
|
+
globe: Globe,
|
|
128
|
+
'graduation-cap': GraduationCap,
|
|
129
|
+
headphones: Headphones,
|
|
130
|
+
info: Info,
|
|
131
|
+
instagram: InstagramIcon,
|
|
132
|
+
'instagram-lucide': Instagram,
|
|
133
|
+
mail: Mail,
|
|
134
|
+
megaphone: Megaphone,
|
|
135
|
+
'message-circle': MessageCircle,
|
|
136
|
+
'message-square': MessageSquare,
|
|
137
|
+
newspaper: Newspaper,
|
|
138
|
+
package: Package,
|
|
139
|
+
'pen-square': PenSquare,
|
|
140
|
+
rocket: Rocket,
|
|
141
|
+
search: Search,
|
|
142
|
+
send: Send,
|
|
143
|
+
shield: Shield,
|
|
144
|
+
star: Star,
|
|
145
|
+
table: TableProperties,
|
|
146
|
+
'trending-up': TrendingUp,
|
|
147
|
+
twitter: Twitter,
|
|
148
|
+
users: Users,
|
|
149
|
+
video: Video,
|
|
150
|
+
youtube: YouTubeIcon,
|
|
151
|
+
'youtube-lucide': Youtube,
|
|
152
|
+
// brand-only icons (no lucide variant in current use)
|
|
153
|
+
slack: SlackIcon,
|
|
154
|
+
clickup: ClickUpIcon,
|
|
155
|
+
hubspot: HubspotIcon,
|
|
156
|
+
linkedin: LinkedInIcon,
|
|
157
|
+
x: XLogo,
|
|
158
|
+
openframe: OpenFrameLogoIcon,
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* PascalCase → kebab-case alias table for DB columns that store icon
|
|
163
|
+
* names as component identifiers (currently `social_platforms.icon_name`).
|
|
164
|
+
* Keep these in sync with the actual rows in those tables.
|
|
165
|
+
*/
|
|
166
|
+
const PASCAL_TO_KEBAB_ALIASES: Record<string, string> = {
|
|
167
|
+
// Lucide PascalCase names → kebab equivalents
|
|
168
|
+
Activity: 'activity',
|
|
169
|
+
Banknote: 'banknote',
|
|
170
|
+
Bell: 'bell',
|
|
171
|
+
BookOpen: 'book-open',
|
|
172
|
+
Box: 'box',
|
|
173
|
+
Briefcase: 'briefcase',
|
|
174
|
+
Calendar: 'calendar',
|
|
175
|
+
CheckSquare: 'check-square',
|
|
176
|
+
DollarSign: 'dollar-sign',
|
|
177
|
+
// Lucide PascalCase → the `-lucide` kebab variant (kebab default is the
|
|
178
|
+
// brand icon for the social-platform names below).
|
|
179
|
+
Facebook: 'facebook-lucide',
|
|
180
|
+
FileText: 'file-text',
|
|
181
|
+
Github: 'github-lucide',
|
|
182
|
+
Globe: 'globe',
|
|
183
|
+
GraduationCap: 'graduation-cap',
|
|
184
|
+
Headphones: 'headphones',
|
|
185
|
+
Info: 'info',
|
|
186
|
+
Instagram: 'instagram-lucide',
|
|
187
|
+
Mail: 'mail',
|
|
188
|
+
Megaphone: 'megaphone',
|
|
189
|
+
MessageCircle: 'message-circle',
|
|
190
|
+
MessageSquare: 'message-square',
|
|
191
|
+
Newspaper: 'newspaper',
|
|
192
|
+
Package: 'package',
|
|
193
|
+
PenSquare: 'pen-square',
|
|
194
|
+
Rocket: 'rocket',
|
|
195
|
+
Search: 'search',
|
|
196
|
+
Send: 'send',
|
|
197
|
+
Shield: 'shield',
|
|
198
|
+
Star: 'star',
|
|
199
|
+
TableProperties: 'table',
|
|
200
|
+
TrendingUp: 'trending-up',
|
|
201
|
+
Twitter: 'twitter',
|
|
202
|
+
Users: 'users',
|
|
203
|
+
Video: 'video',
|
|
204
|
+
Youtube: 'youtube-lucide',
|
|
205
|
+
// Brand-icon PascalCase exports → kebab (kebab default is the brand)
|
|
206
|
+
SlackIcon: 'slack',
|
|
207
|
+
GitHubIcon: 'github',
|
|
208
|
+
ClickUpIcon: 'clickup',
|
|
209
|
+
HubspotIcon: 'hubspot',
|
|
210
|
+
LinkedInIcon: 'linkedin',
|
|
211
|
+
FacebookIcon: 'facebook',
|
|
212
|
+
InstagramIcon: 'instagram',
|
|
213
|
+
YouTubeIcon: 'youtube',
|
|
214
|
+
XLogo: 'x',
|
|
215
|
+
OpenFrameLogo: 'openframe',
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Normalize an icon key to the registry's canonical kebab-case form.
|
|
220
|
+
* Accepts PascalCase variants (from `social_platforms.icon_name`-style
|
|
221
|
+
* columns) and passes kebab-case keys through unchanged.
|
|
222
|
+
*/
|
|
223
|
+
export function normalizeIconKey(key: string): string {
|
|
224
|
+
return PASCAL_TO_KEBAB_ALIASES[key] ?? key
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Resolve an `icon_name` to its React component. Accepts both PascalCase
|
|
229
|
+
* and kebab-case keys (normalizes PascalCase first). Unknown / null /
|
|
230
|
+
* undefined names fall back to `FileText` — chips always render with
|
|
231
|
+
* SOMETHING rather than a missing glyph. The fallback is intentional:
|
|
232
|
+
* a typo in a new admin-authored row shouldn't crash render.
|
|
233
|
+
*/
|
|
234
|
+
export function getIconComponent(
|
|
235
|
+
iconName: string | null | undefined,
|
|
236
|
+
): ComponentType<{ className?: string; color?: string }> {
|
|
237
|
+
if (!iconName) return FileText
|
|
238
|
+
return ICON_REGISTRY[normalizeIconKey(iconName)] ?? FileText
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// ---------------------------------------------------------------------------
|
|
242
|
+
// Sized-icon rendering helper (migrated from `src/utils/dynamic-icons.tsx`)
|
|
243
|
+
// ---------------------------------------------------------------------------
|
|
244
|
+
|
|
245
|
+
export type DynamicIconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
246
|
+
|
|
247
|
+
const SIZE_CLASSES: Record<DynamicIconSize, string> = {
|
|
248
|
+
xs: 'w-3 h-3', // 12px
|
|
249
|
+
sm: 'w-4 h-4', // 16px
|
|
250
|
+
md: 'w-6 h-6', // 24px
|
|
251
|
+
lg: 'w-8 h-8', // 32px
|
|
252
|
+
xl: 'w-12 h-12', // 48px
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Optional per-icon color overrides. Keys are kebab-case (canonical
|
|
257
|
+
* registry form) — pass any incoming key through `normalizeIconKey()`
|
|
258
|
+
* before lookup.
|
|
259
|
+
*/
|
|
260
|
+
const ICON_COLORS: Record<string, { color?: string; fill?: string }> = {
|
|
261
|
+
linkedin: { color: '#0A66C2' },
|
|
262
|
+
facebook: { color: '#1877F2' },
|
|
263
|
+
youtube: { color: '#FF0000' },
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Render an icon by name with a size preset + optional className.
|
|
268
|
+
* Replaces the old `src/utils/dynamic-icons.tsx#getDynamicIcon`. Accepts
|
|
269
|
+
* both PascalCase and kebab-case keys (via `normalizeIconKey()`).
|
|
270
|
+
*/
|
|
271
|
+
export function getDynamicIcon(
|
|
272
|
+
iconName: string | undefined | null,
|
|
273
|
+
size: DynamicIconSize = 'md',
|
|
274
|
+
className?: string,
|
|
275
|
+
): ReactNode {
|
|
276
|
+
if (!iconName) {
|
|
277
|
+
console.warn('[getDynamicIcon] No iconName provided, using Globe fallback')
|
|
278
|
+
return createElement(Globe, { className: SIZE_CLASSES[size] })
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const sizeClass = SIZE_CLASSES[size]
|
|
282
|
+
const finalClassName = className ? `${sizeClass} ${className}` : sizeClass
|
|
283
|
+
|
|
284
|
+
const canonicalKey = normalizeIconKey(iconName)
|
|
285
|
+
const IconComponent = ICON_REGISTRY[canonicalKey]
|
|
286
|
+
|
|
287
|
+
if (IconComponent) {
|
|
288
|
+
const colorConfig = ICON_COLORS[canonicalKey] || {}
|
|
289
|
+
return createElement(IconComponent, { className: finalClassName, ...colorConfig })
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
console.error(
|
|
293
|
+
`[getDynamicIcon] Icon NOT found in registry: "${iconName}" (normalized to "${canonicalKey}"). Available icons:`,
|
|
294
|
+
Object.keys(ICON_REGISTRY),
|
|
295
|
+
)
|
|
296
|
+
return createElement(Globe, { className: finalClassName })
|
|
297
|
+
}
|