@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
package/src/utils/index.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// Utils exports - client-side only
|
|
2
|
-
export { cn,
|
|
2
|
+
export { cn, getAllPlatformBaseDomains } from './cn'
|
|
3
|
+
// Number / currency / byte / date formatters live in `./format` (single
|
|
4
|
+
// source of truth). Re-exported here so existing callers that pull from
|
|
5
|
+
// the barrel keep working without changing imports.
|
|
6
|
+
export { formatDate, formatNumber, formatPrice, formatBytes } from './format'
|
|
3
7
|
// SVG path constants — re-exported here (server-safe) because icons-v2 has "use client"
|
|
4
8
|
export { PLAY_ICON_PATH } from '../components/icons-v2-generated/media-playback/play-icon'
|
|
5
9
|
export { getPlatformAccentColor, getCurrentPlatform, type ColorCategory } from './ods-color-utils'
|
|
@@ -16,9 +20,18 @@ export * from './validation-utils'
|
|
|
16
20
|
export * from './confidence-helpers'
|
|
17
21
|
// Release date formatting utilities
|
|
18
22
|
export * from './date-formatters'
|
|
19
|
-
|
|
20
|
-
//
|
|
21
|
-
|
|
23
|
+
// Dynamic icon registry — single source of truth lives at
|
|
24
|
+
// components/chat/utils/icon-registry. Re-exported here so existing
|
|
25
|
+
// `@flamingo-stack/openframe-frontend-core/utils` callers (hub admin
|
|
26
|
+
// social-account screens) keep working without changing their import path.
|
|
27
|
+
export {
|
|
28
|
+
getDynamicIcon,
|
|
29
|
+
type DynamicIconSize,
|
|
30
|
+
ICON_REGISTRY,
|
|
31
|
+
getIconComponent,
|
|
32
|
+
normalizeIconKey,
|
|
33
|
+
} from '../components/chat/utils/icon-registry'
|
|
34
|
+
export { getPlatformIconComponent as getPlatformLogo } from './platform-config'
|
|
22
35
|
// Tool type utilities
|
|
23
36
|
export * from './tool-utils'
|
|
24
37
|
// Shell type utilities
|
|
@@ -28,4 +41,131 @@ export * from './os-utils'
|
|
|
28
41
|
// Phone utilities
|
|
29
42
|
export * from './country-phone-utils'
|
|
30
43
|
// Generic domain detection
|
|
31
|
-
export * from './generic-domain-utils'
|
|
44
|
+
export * from './generic-domain-utils'
|
|
45
|
+
|
|
46
|
+
// Color analysis (canvas-based image color extraction)
|
|
47
|
+
export * from './color-analysis'
|
|
48
|
+
|
|
49
|
+
// Image-proxy URL builder (pure, runtime-configurable)
|
|
50
|
+
export {
|
|
51
|
+
type GetProxiedImageUrlOptions,
|
|
52
|
+
getProxiedImageUrl,
|
|
53
|
+
urlPathLooksLikeSvg,
|
|
54
|
+
shouldProxyImage,
|
|
55
|
+
generateImageSizes,
|
|
56
|
+
} from './image-proxy'
|
|
57
|
+
|
|
58
|
+
// Number / byte / duration / time / UTC date / initials / metric /
|
|
59
|
+
// trend / range / text helpers — single canonical home for every
|
|
60
|
+
// generic formatter consumed across the lib AND the hub. Hub keeps
|
|
61
|
+
// only vendor-specific helpers (formatClassification / formatPricingModel
|
|
62
|
+
// in `lib/utils/vendor-text.ts`).
|
|
63
|
+
export {
|
|
64
|
+
formatLargeNumber,
|
|
65
|
+
formatAbbreviatedNumber,
|
|
66
|
+
nameInitials,
|
|
67
|
+
getFirstLastInitials,
|
|
68
|
+
formatDurationMMSS,
|
|
69
|
+
formatDurationCompact,
|
|
70
|
+
formatTimeWithTimezone,
|
|
71
|
+
formatDurationFromRange,
|
|
72
|
+
type FormatDateUTCOptions,
|
|
73
|
+
formatDateUTC,
|
|
74
|
+
formatCurrency,
|
|
75
|
+
formatPercent,
|
|
76
|
+
formatWholeDollars,
|
|
77
|
+
formatLegalDate,
|
|
78
|
+
formatBytesShort,
|
|
79
|
+
formatDateTimeAt,
|
|
80
|
+
formatDurationFromMs,
|
|
81
|
+
type MetricFormat,
|
|
82
|
+
type TrendPolarity,
|
|
83
|
+
formatCompactMetric,
|
|
84
|
+
getTrendColors,
|
|
85
|
+
formatDateRange,
|
|
86
|
+
formatDuration,
|
|
87
|
+
formatUnderscoreText,
|
|
88
|
+
stripHtml,
|
|
89
|
+
formatBioText,
|
|
90
|
+
formatClassification,
|
|
91
|
+
formatPricingModel,
|
|
92
|
+
} from './format'
|
|
93
|
+
|
|
94
|
+
// Date / time helpers (relative, absolute, range checks, UTC timestamp)
|
|
95
|
+
export {
|
|
96
|
+
formatRelativeTime,
|
|
97
|
+
formatAbsoluteDate,
|
|
98
|
+
formatDateTime,
|
|
99
|
+
getDetailedTimeDifference,
|
|
100
|
+
isToday,
|
|
101
|
+
isWithinMinutes,
|
|
102
|
+
createUTCTimestamp,
|
|
103
|
+
} from './date-utils'
|
|
104
|
+
|
|
105
|
+
// Chat source-icons + labels (server-safe — lives here in src/utils/
|
|
106
|
+
// instead of src/components/chat/utils/ so server-side hub callers like
|
|
107
|
+
// doc-chat-utils can use them without tripping the 'use client' boundary)
|
|
108
|
+
export {
|
|
109
|
+
SOURCE_ICON_NAMES,
|
|
110
|
+
getSourceIconName,
|
|
111
|
+
SOURCE_LABELS_BY_TABLE,
|
|
112
|
+
getSourceLabel,
|
|
113
|
+
} from './source-icons'
|
|
114
|
+
|
|
115
|
+
// Pure text/wire helpers that originated under components/chat/utils/
|
|
116
|
+
// but are needed by SERVER-SIDE hub callers (doc-chat-utils,
|
|
117
|
+
// hubspot-files-utils, rag-mappers). Re-exporting through utils/ keeps
|
|
118
|
+
// them out of the 'use client' bundle. The chat-side re-export chain
|
|
119
|
+
// stays intact for client consumers via components/chat barrel.
|
|
120
|
+
export {
|
|
121
|
+
escapeMarkdownInline,
|
|
122
|
+
type ChatAttachment,
|
|
123
|
+
buildChatAttachmentViewUrl,
|
|
124
|
+
formatChatAttachmentMarkdownForBubble,
|
|
125
|
+
CHAT_ATTACHMENT_VIEW_URL_PREFIX,
|
|
126
|
+
CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM,
|
|
127
|
+
ANTHROPIC_SUPPORTED_IMAGE_MIME,
|
|
128
|
+
CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED,
|
|
129
|
+
CHAT_ATTACHMENT_MARKDOWN_PATTERN,
|
|
130
|
+
stripChatAttachmentMarkdown,
|
|
131
|
+
} from '../components/chat/utils/chat-attachment-markdown'
|
|
132
|
+
export {
|
|
133
|
+
AUTO_CONTINUATION_DIRECTIVE_PREFIX,
|
|
134
|
+
buildAutoContinuationDirective,
|
|
135
|
+
type BuildAutoContinuationOptions,
|
|
136
|
+
} from '../components/chat/utils/auto-continuation-directive'
|
|
137
|
+
export { flattenAssistantContent } from '../components/chat/utils/flatten-assistant-content'
|
|
138
|
+
export {
|
|
139
|
+
SCROLL_ANCHOR,
|
|
140
|
+
type ScrollAnchor,
|
|
141
|
+
SCROLL_ANCHOR_WIRE_KEY,
|
|
142
|
+
parseScrollAnchor,
|
|
143
|
+
} from '../components/chat/utils/scroll-anchor'
|
|
144
|
+
export {
|
|
145
|
+
type WireCommandOverride,
|
|
146
|
+
parseWireCommandOverride,
|
|
147
|
+
sanitizeTitleForChat,
|
|
148
|
+
formatSingularLookupInvocation,
|
|
149
|
+
type CommandOverride,
|
|
150
|
+
extractEntityIdFilter,
|
|
151
|
+
buildDiscussAddendum,
|
|
152
|
+
} from '../components/chat/utils/slash-dispatch-utils'
|
|
153
|
+
|
|
154
|
+
// ClickUp taxonomy constants + label resolver — server-safe so the
|
|
155
|
+
// delivery aggregator + sync engine can read CUSTOM_ITEM_ID.BUG/.REQUEST
|
|
156
|
+
// without going through the 'use client' chat barrel (which erases the
|
|
157
|
+
// values to undefined when imported from server code).
|
|
158
|
+
export { CUSTOM_ITEM_ID, getTaskTypeLabel } from '../components/chat/utils/clickup-task-type-utils'
|
|
159
|
+
|
|
160
|
+
// Status color scheme + clickup URL helpers (pure, server-safe)
|
|
161
|
+
export { type ColorScheme, getStatusColorScheme } from '../components/chat/utils/agent-status-message'
|
|
162
|
+
export { clickupTaskUrl } from '../components/chat/utils/external-app-urls'
|
|
163
|
+
|
|
164
|
+
// Cross-origin URL detection (pure — used by server-side rag-mappers
|
|
165
|
+
// + content-url-builder for cross-origin same-tab decisions)
|
|
166
|
+
export { isCrossOriginUrl } from '../components/chat/utils/is-cross-origin-url'
|
|
167
|
+
|
|
168
|
+
// React-version-aware `fetchpriority` prop builder — spread into `<img>`
|
|
169
|
+
// / `<iframe>` so the rendered DOM attribute is correct under React 18
|
|
170
|
+
// (lowercase) AND React 19 (camelCase) without console warnings.
|
|
171
|
+
export { fetchPriorityProp, type FetchPriorityValue } from './fetch-priority'
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thin JSON-typed Web-Storage adapter (localStorage or sessionStorage).
|
|
3
|
+
*
|
|
4
|
+
* Centralizes the SSR-guard + try/catch + silent quota-failure pattern
|
|
5
|
+
* that every per-feature storage util would otherwise re-implement.
|
|
6
|
+
*
|
|
7
|
+
* Optional `namespace` prefix supports platform / user partitioning —
|
|
8
|
+
* the resolver runs lazily at call time so the namespace can vary across
|
|
9
|
+
* the lifetime of the page (e.g. proxy-auth switches user, which switches
|
|
10
|
+
* the key suffix).
|
|
11
|
+
*
|
|
12
|
+
* Backend selection (`backend: 'local' | 'session'`):
|
|
13
|
+
* - `'local'` (default): persists across browser sessions. Use for
|
|
14
|
+
* UI state, chat history metadata, feature-flag opt-ins.
|
|
15
|
+
* - `'session'`: cleared when the tab closes. Use for ANY auth-adjacent
|
|
16
|
+
* value (bearer tokens, act-as identity, proxy credentials). Reduces
|
|
17
|
+
* the XSS-exfiltration attack window from "indefinite" to "until tab
|
|
18
|
+
* close" without losing per-session ergonomics.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
export type WebStorageBackend = 'local' | 'session'
|
|
22
|
+
|
|
23
|
+
export interface LocalStorageAdapter<T> {
|
|
24
|
+
load(): T | null
|
|
25
|
+
save(value: T): void
|
|
26
|
+
clear(): void
|
|
27
|
+
/** Resolved storage key for the current call. Useful for tests. */
|
|
28
|
+
resolveKey(): string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface LocalStorageAdapterOptions<T> {
|
|
32
|
+
/** Base storage key. Combined with `namespace()` when provided. */
|
|
33
|
+
key: string
|
|
34
|
+
/** Optional dynamic namespace prefix appended via `.` separator.
|
|
35
|
+
* Called on EVERY read/write so the key can vary across the page
|
|
36
|
+
* lifetime (e.g. when the platform or user identity changes). */
|
|
37
|
+
namespace?: () => string | null | undefined
|
|
38
|
+
/** Runtime shape check. Falsey return → `load()` yields null. */
|
|
39
|
+
validate?: (parsed: unknown) => parsed is T
|
|
40
|
+
/** Diagnostic prefix written to `console.warn` on parse / write
|
|
41
|
+
* failures. Defaults to `'[local-storage]'`. */
|
|
42
|
+
logTag?: string
|
|
43
|
+
/** Which Web-Storage backend to use. Defaults to `'local'`. Pass
|
|
44
|
+
* `'session'` for anything auth-adjacent so the value evaporates
|
|
45
|
+
* when the tab closes. */
|
|
46
|
+
backend?: WebStorageBackend
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function getStorage(backend: WebStorageBackend): Storage | null {
|
|
50
|
+
if (typeof window === 'undefined') return null
|
|
51
|
+
try {
|
|
52
|
+
return backend === 'session' ? window.sessionStorage : window.localStorage
|
|
53
|
+
} catch {
|
|
54
|
+
// Some sandboxed contexts (Safari private mode older versions,
|
|
55
|
+
// strict CSP) throw on storage access — treat as unavailable.
|
|
56
|
+
return null
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function createLocalStorageAdapter<T>(
|
|
61
|
+
options: LocalStorageAdapterOptions<T>,
|
|
62
|
+
): LocalStorageAdapter<T> {
|
|
63
|
+
const tag = options.logTag ?? '[local-storage]'
|
|
64
|
+
const backend: WebStorageBackend = options.backend ?? 'local'
|
|
65
|
+
const resolveKey = (): string => {
|
|
66
|
+
const ns = options.namespace?.()
|
|
67
|
+
return ns ? `${ns}.${options.key}` : options.key
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
resolveKey,
|
|
72
|
+
load() {
|
|
73
|
+
const storage = getStorage(backend)
|
|
74
|
+
if (!storage) return null
|
|
75
|
+
try {
|
|
76
|
+
const raw = storage.getItem(resolveKey())
|
|
77
|
+
if (!raw) return null
|
|
78
|
+
const parsed = JSON.parse(raw) as unknown
|
|
79
|
+
if (options.validate && !options.validate(parsed)) return null
|
|
80
|
+
return parsed as T
|
|
81
|
+
} catch (err) {
|
|
82
|
+
console.warn(`${tag} parse failed for key ${resolveKey()}:`, err)
|
|
83
|
+
return null
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
save(value: T) {
|
|
87
|
+
const storage = getStorage(backend)
|
|
88
|
+
if (!storage) return
|
|
89
|
+
try {
|
|
90
|
+
storage.setItem(resolveKey(), JSON.stringify(value))
|
|
91
|
+
} catch (err) {
|
|
92
|
+
console.warn(`${tag} write failed for key ${resolveKey()}:`, err)
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
clear() {
|
|
96
|
+
const storage = getStorage(backend)
|
|
97
|
+
if (!storage) return
|
|
98
|
+
try {
|
|
99
|
+
storage.removeItem(resolveKey())
|
|
100
|
+
} catch (err) {
|
|
101
|
+
console.warn(`${tag} clear failed for key ${resolveKey()}:`, err)
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-source icon-name + label lookup. Keyed by `RagTableConfig.id` (the same
|
|
3
|
+
* id used in `chat_source_rag_tables.rag_table_id` and on each
|
|
4
|
+
* `ChatRef.sourceRepo`).
|
|
5
|
+
*
|
|
6
|
+
* Server-safe — lives in `src/utils/` (no `'use client'` banner) so
|
|
7
|
+
* hub server-side rag-mappers + chat route handlers can call
|
|
8
|
+
* `getSourceLabel()` / `getSourceIconName()` directly. The client-side
|
|
9
|
+
* chat barrel re-exports from here for ergonomic client imports.
|
|
10
|
+
*
|
|
11
|
+
* Used by SOURCE-LEVEL chip surfaces:
|
|
12
|
+
* - The chip strip below an assistant message.
|
|
13
|
+
* - The tracking-row source glyph on inline entity cards.
|
|
14
|
+
*
|
|
15
|
+
* Why a small map here instead of a column on RAG_TABLE_CONFIGS:
|
|
16
|
+
* - The icon NAME is a small string; the resolver (icon-name → React
|
|
17
|
+
* component) lives in `src/components/chat/utils/icon-registry.ts`
|
|
18
|
+
* where it can stay client-only. Server-side consumers stay
|
|
19
|
+
* icon-component-free.
|
|
20
|
+
* - The mapping is intrinsic to the TABLE, not per-platform — same
|
|
21
|
+
* entry serves every (platform, source) binding.
|
|
22
|
+
*
|
|
23
|
+
* Per-table admin-UI bucket id (`SOURCE_CATEGORIES_BY_TABLE`) stays
|
|
24
|
+
* hub-side because it depends on the hub's `RagSourceCategoryId` enum.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/** Map RagTableConfig.id → icon_name (resolvable via `getIconComponent`). */
|
|
28
|
+
export const SOURCE_ICON_NAMES: Record<string, string> = {
|
|
29
|
+
// Doc tables
|
|
30
|
+
'openframe-docs': 'openframe',
|
|
31
|
+
'data-room-docs': 'shield',
|
|
32
|
+
|
|
33
|
+
// CMS / programs
|
|
34
|
+
'blog-posts': 'newspaper',
|
|
35
|
+
'product-releases': 'rocket',
|
|
36
|
+
'case-studies': 'briefcase',
|
|
37
|
+
'onboarding-guides': 'graduation-cap',
|
|
38
|
+
webinars: 'video',
|
|
39
|
+
events: 'calendar',
|
|
40
|
+
podcasts: 'headphones',
|
|
41
|
+
'customer-interviews': 'users',
|
|
42
|
+
|
|
43
|
+
// Financials
|
|
44
|
+
'investor-updates': 'mail',
|
|
45
|
+
'financial-kpis': 'activity',
|
|
46
|
+
'financial-cap-table': 'table',
|
|
47
|
+
'financial-pnl': 'trending-up',
|
|
48
|
+
'financial-balance-sheet': 'dollar-sign',
|
|
49
|
+
'financial-cash-flow': 'banknote',
|
|
50
|
+
|
|
51
|
+
// ClickUp
|
|
52
|
+
'clickup-roadmap': 'clickup',
|
|
53
|
+
'clickup-delivery': 'clickup',
|
|
54
|
+
'clickup-tasks-internal': 'clickup',
|
|
55
|
+
|
|
56
|
+
// GitHub
|
|
57
|
+
'github-commits': 'github',
|
|
58
|
+
'github-pull-requests': 'github',
|
|
59
|
+
'github-pr-reviews': 'github',
|
|
60
|
+
'github-commits-public': 'github',
|
|
61
|
+
'github-pull-requests-public': 'github',
|
|
62
|
+
'github-pr-reviews-public': 'github',
|
|
63
|
+
|
|
64
|
+
// HubSpot
|
|
65
|
+
'hubspot-tickets': 'hubspot',
|
|
66
|
+
'hubspot-tickets-anon': 'hubspot',
|
|
67
|
+
'hubspot-tickets-self': 'hubspot',
|
|
68
|
+
|
|
69
|
+
// Communications
|
|
70
|
+
'slack-messages': 'slack',
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Lookup an icon name by RagTableConfig.id. Returns undefined when
|
|
74
|
+
* unknown so callers can decide whether to fall back to documentType
|
|
75
|
+
* or to the generic FileText glyph in the icon registry. */
|
|
76
|
+
export function getSourceIconName(tableId: string | null | undefined): string | undefined {
|
|
77
|
+
if (!tableId) return undefined
|
|
78
|
+
return SOURCE_ICON_NAMES[tableId]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Per-table display LABEL — used by SERVER-SIDE chip-strip rendering
|
|
83
|
+
* (the row's "Customer Interviews (8 records)" chip below an assistant
|
|
84
|
+
* message).
|
|
85
|
+
*
|
|
86
|
+
* The chip GRID + autocomplete DROPDOWN read their command label
|
|
87
|
+
* from the DB (per-source `chat_admin_slash_commands.label`) — those
|
|
88
|
+
* surfaces can carry per-source labels (e.g. "OpenFrame Commits" vs
|
|
89
|
+
* "GitHub Commits" for the same table). This map is the TABLE-LEVEL
|
|
90
|
+
* label used by sub-message chips where a SINGLE label per table is
|
|
91
|
+
* sufficient regardless of which source's chat is rendering.
|
|
92
|
+
*/
|
|
93
|
+
export const SOURCE_LABELS_BY_TABLE: Record<string, string> = {
|
|
94
|
+
// Doc tables
|
|
95
|
+
'openframe-docs': 'OpenFrame Docs',
|
|
96
|
+
'data-room-docs': 'Data Room',
|
|
97
|
+
|
|
98
|
+
// CMS / programs
|
|
99
|
+
'blog-posts': 'Blog Posts',
|
|
100
|
+
'product-releases': 'Product Releases',
|
|
101
|
+
'case-studies': 'Case Studies',
|
|
102
|
+
'onboarding-guides': 'Onboarding Guides',
|
|
103
|
+
webinars: 'Webinars',
|
|
104
|
+
events: 'Events',
|
|
105
|
+
podcasts: 'Podcasts',
|
|
106
|
+
'customer-interviews': 'Customer Interviews',
|
|
107
|
+
|
|
108
|
+
// Financials
|
|
109
|
+
'investor-updates': 'Investor Updates',
|
|
110
|
+
'financial-kpis': 'Financial KPIs',
|
|
111
|
+
'financial-cap-table': 'Cap Table',
|
|
112
|
+
'financial-pnl': 'Profit & Loss',
|
|
113
|
+
'financial-balance-sheet': 'Balance Sheet',
|
|
114
|
+
'financial-cash-flow': 'Cash Flow',
|
|
115
|
+
|
|
116
|
+
// ClickUp
|
|
117
|
+
'clickup-roadmap': 'ClickUp Roadmap',
|
|
118
|
+
'clickup-delivery': 'ClickUp Delivery',
|
|
119
|
+
'clickup-tasks-internal': 'ClickUp Tasks',
|
|
120
|
+
|
|
121
|
+
// GitHub
|
|
122
|
+
'github-commits': 'GitHub Commits',
|
|
123
|
+
'github-pull-requests': 'GitHub Pull Requests',
|
|
124
|
+
'github-pr-reviews': 'GitHub PR Reviews',
|
|
125
|
+
'github-commits-public': 'OpenFrame Commits',
|
|
126
|
+
'github-pull-requests-public': 'OpenFrame Pull Requests',
|
|
127
|
+
'github-pr-reviews-public': 'OpenFrame PR Reviews',
|
|
128
|
+
|
|
129
|
+
// HubSpot
|
|
130
|
+
'hubspot-tickets': 'HubSpot Tickets',
|
|
131
|
+
'hubspot-tickets-anon': 'Known Issues',
|
|
132
|
+
'hubspot-tickets-self': 'My Tickets',
|
|
133
|
+
|
|
134
|
+
// Communications
|
|
135
|
+
'slack-messages': 'OpenMSP Community',
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** Lookup a human-readable label by RagTableConfig.id. Falls back
|
|
139
|
+
* to the raw id (chip text becomes the table slug — visible bug
|
|
140
|
+
* that prompts an entry to land in `SOURCE_LABELS_BY_TABLE`). */
|
|
141
|
+
export function getSourceLabel(tableId: string): string {
|
|
142
|
+
return SOURCE_LABELS_BY_TABLE[tableId] ?? tableId
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Default `documentType → RagTableConfig.id` reverse map.
|
|
147
|
+
*
|
|
148
|
+
* Mirrors the canonical lookup the hub registers via
|
|
149
|
+
* `lib/config/rag-table-config.ts:tableIdForDocumentType()` — same vocabulary
|
|
150
|
+
* the LLM emits inside `[card://<type>:<id>]` markers, same tableIds the
|
|
151
|
+
* retrieval layer routes by, and same set of keys covered by
|
|
152
|
+
* `SOURCE_ICON_NAMES` / `SOURCE_LABELS_BY_TABLE` above.
|
|
153
|
+
*
|
|
154
|
+
* Server-safe (no `'use client'` banner), keyed by string for forward
|
|
155
|
+
* compatibility — adding a new RAG table is a single-line edit here so
|
|
156
|
+
* lib-based embedders pick it up without re-publishing.
|
|
157
|
+
*
|
|
158
|
+
* Embedders that need a CUSTOM mapping (e.g. polymorphic types whose
|
|
159
|
+
* tableId depends on per-tenant config) still pass their own
|
|
160
|
+
* `tableIdForDocumentType` callback to `useEmbeddedChat`; this default
|
|
161
|
+
* only applies when no callback is supplied.
|
|
162
|
+
*
|
|
163
|
+
* Inverse mapping audited 2026-05-24 against the hub registry — every
|
|
164
|
+
* entry in `RAG_TABLE_CONFIGS` with a `documentType` is represented.
|
|
165
|
+
*/
|
|
166
|
+
export const DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID: Record<string, string> = {
|
|
167
|
+
// Doc tables
|
|
168
|
+
markdown: 'openframe-docs',
|
|
169
|
+
data_room_doc: 'data-room-docs',
|
|
170
|
+
|
|
171
|
+
// CMS / programs
|
|
172
|
+
blog_post: 'blog-posts',
|
|
173
|
+
product_release: 'product-releases',
|
|
174
|
+
case_study: 'case-studies',
|
|
175
|
+
onboarding_guide: 'onboarding-guides',
|
|
176
|
+
webinar: 'webinars',
|
|
177
|
+
event: 'events',
|
|
178
|
+
podcast: 'podcasts',
|
|
179
|
+
customer_interview: 'customer-interviews',
|
|
180
|
+
|
|
181
|
+
// Financials
|
|
182
|
+
investor_update: 'investor-updates',
|
|
183
|
+
financial_kpi: 'financial-kpis',
|
|
184
|
+
cap_table: 'financial-cap-table',
|
|
185
|
+
profit_loss: 'financial-pnl',
|
|
186
|
+
balance_sheet: 'financial-balance-sheet',
|
|
187
|
+
cash_flow: 'financial-cash-flow',
|
|
188
|
+
|
|
189
|
+
// ClickUp
|
|
190
|
+
roadmap_item: 'clickup-roadmap',
|
|
191
|
+
delivery_item: 'clickup-delivery',
|
|
192
|
+
internal_task: 'clickup-tasks-internal',
|
|
193
|
+
|
|
194
|
+
// GitHub
|
|
195
|
+
github_commit: 'github-commits',
|
|
196
|
+
github_pull_request: 'github-pull-requests',
|
|
197
|
+
github_pr_review: 'github-pr-reviews',
|
|
198
|
+
github_commit_public: 'github-commits-public',
|
|
199
|
+
github_pull_request_public: 'github-pull-requests-public',
|
|
200
|
+
github_pr_review_public: 'github-pr-reviews-public',
|
|
201
|
+
|
|
202
|
+
// HubSpot
|
|
203
|
+
hubspot_ticket: 'hubspot-tickets',
|
|
204
|
+
hubspot_ticket_anon: 'hubspot-tickets-anon',
|
|
205
|
+
hubspot_ticket_self: 'hubspot-tickets-self',
|
|
206
|
+
|
|
207
|
+
// Communications
|
|
208
|
+
slack_message: 'slack-messages',
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Default `tableIdForDocumentType` resolver used by `useEmbeddedChat` when
|
|
213
|
+
* the caller didn't pass an explicit callback. Returns `null` for
|
|
214
|
+
* unrecognized document types so downstream `discussRef` / `displayRef`
|
|
215
|
+
* still short-circuits gracefully on stale or custom types.
|
|
216
|
+
*/
|
|
217
|
+
export function defaultTableIdForDocumentType(documentType: string): string | null {
|
|
218
|
+
return DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID[documentType] ?? null
|
|
219
|
+
}
|