@flamingo-stack/openframe-frontend-core 0.0.296-snapshot.20260621021605 → 0.0.296
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/README.md +0 -9
- package/dist/chunk-26PKDALD.js +2379 -0
- package/dist/chunk-26PKDALD.js.map +1 -0
- package/dist/chunk-3MCHAFHB.js +89 -0
- package/dist/chunk-3MCHAFHB.js.map +1 -0
- package/dist/{chunk-PI4WSYQV.js → chunk-3ZXUQQL4.js} +2 -2
- package/dist/{chunk-WMSTJAZT.cjs → chunk-5E2HOSSH.cjs} +51 -913
- package/dist/chunk-5E2HOSSH.cjs.map +1 -0
- package/dist/{chunk-IL47XWV5.js → chunk-5P3B2LZW.js} +14 -8
- package/dist/{chunk-IL47XWV5.js.map → chunk-5P3B2LZW.js.map} +1 -1
- package/dist/chunk-66AANIOC.cjs +619 -0
- package/dist/chunk-66AANIOC.cjs.map +1 -0
- package/dist/{chunk-AD6C23QY.js → chunk-6GCI7JOE.js} +7 -8
- package/dist/{chunk-AD6C23QY.js.map → chunk-6GCI7JOE.js.map} +1 -1
- package/dist/chunk-6JINAOI7.cjs +311 -0
- package/dist/chunk-6JINAOI7.cjs.map +1 -0
- package/dist/{chunk-2QG57XOJ.js → chunk-7RIYT7ZH.js} +205 -1067
- package/dist/chunk-7RIYT7ZH.js.map +1 -0
- package/dist/{chunk-L6PSSIUQ.cjs → chunk-AQOWFSMB.cjs} +1 -1
- package/dist/chunk-AQOWFSMB.cjs.map +1 -0
- package/dist/chunk-BOCFIKYS.cjs +3009 -0
- package/dist/chunk-BOCFIKYS.cjs.map +1 -0
- package/dist/{chunk-54KNMC2R.cjs → chunk-D3LEFMOA.cjs} +3 -3
- package/dist/{chunk-54KNMC2R.cjs.map → chunk-D3LEFMOA.cjs.map} +1 -1
- package/dist/chunk-D652TJBQ.js +3009 -0
- package/dist/chunk-D652TJBQ.js.map +1 -0
- package/dist/{chunk-PWQUAVA3.js → chunk-E4XABBSU.js} +98 -338
- package/dist/chunk-E4XABBSU.js.map +1 -0
- package/dist/{chunk-JALO4TAZ.js → chunk-EL6QLAWX.js} +55 -357
- package/dist/chunk-EL6QLAWX.js.map +1 -0
- package/dist/{chunk-6C526VNN.cjs → chunk-EYEW6PTA.cjs} +118 -358
- package/dist/chunk-EYEW6PTA.cjs.map +1 -0
- package/dist/chunk-FQJK446R.js +1606 -0
- package/dist/chunk-FQJK446R.js.map +1 -0
- package/dist/{chunk-4PSQS3SW.cjs → chunk-GLLDTKZK.cjs} +9 -7
- package/dist/chunk-GLLDTKZK.cjs.map +1 -0
- package/dist/{chunk-FQOTC3UU.cjs → chunk-IE6OU3WQ.cjs} +16 -318
- package/dist/chunk-IE6OU3WQ.cjs.map +1 -0
- package/dist/chunk-J54Z3OCR.cjs +1606 -0
- package/dist/chunk-J54Z3OCR.cjs.map +1 -0
- package/dist/{chunk-PC746XCO.js → chunk-K2PFPBMF.js} +5563 -15048
- package/dist/chunk-K2PFPBMF.js.map +1 -0
- package/dist/chunk-KXCRGTRN.cjs +2379 -0
- package/dist/chunk-KXCRGTRN.cjs.map +1 -0
- package/dist/{chunk-IZ7JSBFP.js → chunk-LCNMR277.js} +1 -1
- package/dist/chunk-LCNMR277.js.map +1 -0
- package/dist/chunk-LFGGF7OT.cjs +449 -0
- package/dist/chunk-LFGGF7OT.cjs.map +1 -0
- package/dist/chunk-M2OCXTNT.js +311 -0
- package/dist/chunk-M2OCXTNT.js.map +1 -0
- package/dist/{chunk-L7ULJKG7.js → chunk-MBFWU2EM.js} +10 -6
- package/dist/{chunk-L7ULJKG7.js.map → chunk-MBFWU2EM.js.map} +1 -1
- package/dist/chunk-ME4EVDFP.js +619 -0
- package/dist/chunk-ME4EVDFP.js.map +1 -0
- package/dist/chunk-OQ6X7ZOC.js +449 -0
- package/dist/chunk-OQ6X7ZOC.js.map +1 -0
- package/dist/{chunk-4TLE6VLU.js → chunk-OY7OF7E7.js} +24 -30
- package/dist/chunk-OY7OF7E7.js.map +1 -0
- package/dist/chunk-POKKCWKF.js +354 -0
- package/dist/chunk-POKKCWKF.js.map +1 -0
- package/dist/{chunk-GUTS7HGA.cjs → chunk-QHIXS3W2.cjs} +2514 -11999
- package/dist/chunk-QHIXS3W2.cjs.map +1 -0
- package/dist/chunk-TFSYSWPS.cjs +89 -0
- package/dist/chunk-TFSYSWPS.cjs.map +1 -0
- package/dist/{chunk-53FUMSZ5.cjs → chunk-W6M2FLLT.cjs} +46 -40
- package/dist/chunk-W6M2FLLT.cjs.map +1 -0
- package/dist/{chunk-3JIQVE7T.js → chunk-WHMATDVP.js} +15 -9
- package/dist/{chunk-3JIQVE7T.js.map → chunk-WHMATDVP.js.map} +1 -1
- package/dist/{chunk-YBYI62OE.cjs → chunk-X647HY3F.cjs} +37 -33
- package/dist/chunk-X647HY3F.cjs.map +1 -0
- package/dist/{chunk-UNVE2SDJ.cjs → chunk-X6BV7MB7.cjs} +31 -37
- package/dist/chunk-X6BV7MB7.cjs.map +1 -0
- package/dist/{chunk-7OVGB2DQ.cjs → chunk-XREEV72C.cjs} +25 -19
- package/dist/chunk-XREEV72C.cjs.map +1 -0
- package/dist/chunk-YETA25JW.cjs +354 -0
- package/dist/chunk-YETA25JW.cjs.map +1 -0
- package/dist/{chunk-FCDQNTDG.cjs → chunk-YIGPRLQY.cjs} +20 -21
- package/dist/chunk-YIGPRLQY.cjs.map +1 -0
- package/dist/{chunk-X4DOXQRT.js → chunk-ZP4AVIZP.js} +6 -4
- package/dist/{chunk-X4DOXQRT.js.map → chunk-ZP4AVIZP.js.map} +1 -1
- package/dist/components/chat/index.cjs +18 -8
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +85 -75
- package/dist/components/contact/index.cjs +15 -8
- package/dist/components/contact/index.cjs.map +1 -1
- package/dist/components/contact/index.js +14 -7
- package/dist/components/docs/doc-viewer.d.ts +2 -39
- package/dist/components/docs/doc-viewer.d.ts.map +1 -1
- package/dist/components/docs/index.cjs +9 -17
- package/dist/components/docs/index.cjs.map +1 -1
- package/dist/components/docs/index.d.ts +0 -4
- package/dist/components/docs/index.d.ts.map +1 -1
- package/dist/components/docs/index.js +8 -16
- package/dist/components/docs/use-document-tree.d.ts.map +1 -1
- package/dist/components/embeds/embed-iframe.d.ts.map +1 -1
- package/dist/components/embeds/index.cjs +15 -38
- package/dist/components/embeds/index.cjs.map +1 -1
- package/dist/components/embeds/index.d.ts +0 -8
- package/dist/components/embeds/index.d.ts.map +1 -1
- package/dist/components/embeds/index.js +17 -40
- package/dist/components/faq/index.cjs +16 -9
- package/dist/components/faq/index.cjs.map +1 -1
- package/dist/components/faq/index.js +15 -8
- package/dist/components/features/index.cjs +16 -8
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +32 -24
- package/dist/components/index.cjs +452 -257
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +976 -781
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/page-layout.d.ts +1 -10
- package/dist/components/layout/page-layout.d.ts.map +1 -1
- package/dist/components/layout/title-block.d.ts +1 -17
- package/dist/components/layout/title-block.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +15 -7
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.js +17 -9
- package/dist/components/onboarding-guides/index.cjs +36 -35
- package/dist/components/onboarding-guides/index.cjs.map +1 -1
- package/dist/components/onboarding-guides/index.js +14 -13
- package/dist/components/onboarding-guides/index.js.map +1 -1
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts +1 -1
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -1
- package/dist/components/related-content/index.cjs +16 -9
- package/dist/components/related-content/index.cjs.map +1 -1
- package/dist/components/related-content/index.js +15 -8
- package/dist/components/shared/dev-section/dev-section-page.d.ts +0 -9
- package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
- package/dist/components/shared/dev-section/dev-section-view.d.ts.map +1 -1
- package/dist/components/shared/dev-section/index.d.ts +1 -1
- package/dist/components/shared/dev-section/index.d.ts.map +1 -1
- package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -1
- package/dist/components/shared/legal-document/legal-document-page.d.ts.map +1 -1
- package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +112 -100
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +32 -20
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +52 -50
- package/dist/components/ui/file-manager/index.cjs.map +1 -1
- package/dist/components/ui/file-manager/index.js +6 -4
- package/dist/components/ui/file-manager/index.js.map +1 -1
- package/dist/components/ui/index.cjs +19 -13
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +0 -2
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +139 -133
- package/dist/components/ui/release-changelog-section.d.ts +2 -6
- package/dist/components/ui/release-changelog-section.d.ts.map +1 -1
- package/dist/components/ui/simple-markdown-renderer.d.ts +8 -2
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/contexts/chat-runtime-context.d.ts +0 -14
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +3 -3
- package/dist/contexts/index.js +5 -5
- package/dist/embed-shims/index.cjs +3 -3
- package/dist/embed-shims/index.cjs.map +1 -1
- package/dist/embed-shims/index.js +4 -4
- package/dist/hooks/index.cjs +9 -4
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +11 -6
- package/dist/index.cjs +20 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +364 -358
- package/dist/types/doc-source.d.ts +1 -31
- package/dist/types/doc-source.d.ts.map +1 -1
- package/dist/utils/index.cjs +0 -4
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -4
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -7
- package/src/components/chat/embeddable-chat.tsx +1 -1
- package/src/components/docs/doc-viewer.tsx +19 -111
- package/src/components/docs/index.ts +0 -17
- package/src/components/docs/use-document-tree.ts +0 -21
- package/src/components/embeds/embed-iframe.tsx +9 -7
- package/src/components/embeds/index.ts +0 -30
- package/src/components/embeds/og-link-preview.tsx +13 -13
- package/src/components/layout/page-layout.tsx +1 -14
- package/src/components/layout/title-block.tsx +62 -40
- package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +3 -3
- package/src/components/shared/dev-section/dev-section-page.tsx +1 -9
- package/src/components/shared/dev-section/dev-section-view.tsx +9 -14
- package/src/components/shared/dev-section/index.ts +1 -1
- package/src/components/shared/doc-search/use-doc-search.ts +3 -7
- package/src/components/shared/legal-document/legal-document-page.tsx +2 -2
- package/src/components/shared/product-release/release-detail-page.tsx +4 -6
- package/src/components/ui/index.ts +0 -2
- package/src/components/ui/release-changelog-section.tsx +2 -7
- package/src/components/ui/simple-markdown-renderer.tsx +11 -7
- package/src/contexts/chat-runtime-context.tsx +0 -14
- package/src/types/doc-source.ts +1 -33
- package/src/utils/index.ts +0 -1
- package/dist/chunk-2QG57XOJ.js.map +0 -1
- package/dist/chunk-4PSQS3SW.cjs.map +0 -1
- package/dist/chunk-4TLE6VLU.js.map +0 -1
- package/dist/chunk-53FUMSZ5.cjs.map +0 -1
- package/dist/chunk-6C526VNN.cjs.map +0 -1
- package/dist/chunk-7OVGB2DQ.cjs.map +0 -1
- package/dist/chunk-F5OB2YAL.cjs +0 -144
- package/dist/chunk-F5OB2YAL.cjs.map +0 -1
- package/dist/chunk-FBWXMMRB.cjs +0 -2
- package/dist/chunk-FBWXMMRB.cjs.map +0 -1
- package/dist/chunk-FCDQNTDG.cjs.map +0 -1
- package/dist/chunk-FQOTC3UU.cjs.map +0 -1
- package/dist/chunk-GUTS7HGA.cjs.map +0 -1
- package/dist/chunk-GZ4C3XW6.js +0 -2
- package/dist/chunk-GZ4C3XW6.js.map +0 -1
- package/dist/chunk-IZ7JSBFP.js.map +0 -1
- package/dist/chunk-JALO4TAZ.js.map +0 -1
- package/dist/chunk-L6PSSIUQ.cjs.map +0 -1
- package/dist/chunk-PC746XCO.js.map +0 -1
- package/dist/chunk-PWQUAVA3.js.map +0 -1
- package/dist/chunk-SA2WPJVO.js +0 -144
- package/dist/chunk-SA2WPJVO.js.map +0 -1
- package/dist/chunk-UNVE2SDJ.cjs.map +0 -1
- package/dist/chunk-WMSTJAZT.cjs.map +0 -1
- package/dist/chunk-YBYI62OE.cjs.map +0 -1
- package/dist/components/case-studies/index.cjs +0 -126
- package/dist/components/case-studies/index.cjs.map +0 -1
- package/dist/components/case-studies/index.d.ts +0 -2
- package/dist/components/case-studies/index.d.ts.map +0 -1
- package/dist/components/case-studies/index.js +0 -126
- package/dist/components/case-studies/index.js.map +0 -1
- package/dist/components/case-studies/share-experience-section.d.ts +0 -48
- package/dist/components/case-studies/share-experience-section.d.ts.map +0 -1
- package/dist/components/docs/docs-hub-page.d.ts +0 -46
- package/dist/components/docs/docs-hub-page.d.ts.map +0 -1
- package/dist/components/docs/skeletons.d.ts +0 -32
- package/dist/components/docs/skeletons.d.ts.map +0 -1
- package/dist/components/docs/use-docs-resolve-link.d.ts +0 -20
- package/dist/components/docs/use-docs-resolve-link.d.ts.map +0 -1
- package/dist/components/embeds/embed-container.d.ts +0 -37
- package/dist/components/embeds/embed-container.d.ts.map +0 -1
- package/dist/components/embeds/file-download-card.d.ts +0 -18
- package/dist/components/embeds/file-download-card.d.ts.map +0 -1
- package/dist/components/embeds/linkedin-embed-client.d.ts +0 -8
- package/dist/components/embeds/linkedin-embed-client.d.ts.map +0 -1
- package/dist/components/embeds/markdown-image.d.ts +0 -5
- package/dist/components/embeds/markdown-image.d.ts.map +0 -1
- package/dist/components/embeds/reddit-embed-client.d.ts +0 -7
- package/dist/components/embeds/reddit-embed-client.d.ts.map +0 -1
- package/dist/components/embeds/rich-markdown-runtime.d.ts +0 -46
- package/dist/components/embeds/rich-markdown-runtime.d.ts.map +0 -1
- package/dist/components/embeds/twitter-embed-client.d.ts +0 -8
- package/dist/components/embeds/twitter-embed-client.d.ts.map +0 -1
- package/dist/components/layout/page-header.d.ts +0 -78
- package/dist/components/layout/page-header.d.ts.map +0 -1
- package/dist/components/layout/page-with-header.d.ts +0 -67
- package/dist/components/layout/page-with-header.d.ts.map +0 -1
- package/dist/components/ui/rich-markdown-renderer.d.ts +0 -34
- package/dist/components/ui/rich-markdown-renderer.d.ts.map +0 -1
- package/dist/utils/page-header-constants.d.ts +0 -15
- package/dist/utils/page-header-constants.d.ts.map +0 -1
- package/dist/utils/social-embed-cache.d.ts +0 -29
- package/dist/utils/social-embed-cache.d.ts.map +0 -1
- package/src/components/case-studies/index.ts +0 -4
- package/src/components/case-studies/share-experience-section.tsx +0 -185
- package/src/components/docs/docs-hub-page.tsx +0 -149
- package/src/components/docs/skeletons.tsx +0 -138
- package/src/components/docs/use-docs-resolve-link.ts +0 -52
- package/src/components/embeds/embed-container.tsx +0 -80
- package/src/components/embeds/file-download-card.tsx +0 -54
- package/src/components/embeds/linkedin-embed-client.tsx +0 -100
- package/src/components/embeds/markdown-image.tsx +0 -88
- package/src/components/embeds/reddit-embed-client.tsx +0 -550
- package/src/components/embeds/rich-markdown-runtime.tsx +0 -79
- package/src/components/embeds/twitter-embed-client.tsx +0 -308
- package/src/components/layout/page-header.tsx +0 -182
- package/src/components/layout/page-with-header.tsx +0 -110
- package/src/components/ui/rich-markdown-renderer.tsx +0 -1203
- package/src/utils/page-header-constants.ts +0 -15
- package/src/utils/social-embed-cache.ts +0 -391
- /package/dist/{chunk-PI4WSYQV.js.map → chunk-3ZXUQQL4.js.map} +0 -0
|
@@ -25,15 +25,7 @@ import {
|
|
|
25
25
|
type OpenframeDevSectionKey,
|
|
26
26
|
} from '../../../utils/dev-sections/openframe-dev-sections';
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
* old import path. The canonical home is `src/utils/page-header-constants.ts`
|
|
30
|
-
* (NOT a `'use client'` module) so server modules can import it without
|
|
31
|
-
* Next.js turning it into a client reference proxy — that proxy is what
|
|
32
|
-
* blew up lucide's `mergeClasses().trim()` when used as
|
|
33
|
-
* `<Icon className={SECTION_HERO_ICON_CLASS} />` inside a hub
|
|
34
|
-
* server-component preset. */
|
|
35
|
-
import { SECTION_HERO_ICON_CLASS } from '../../../utils/page-header-constants';
|
|
36
|
-
export { SECTION_HERO_ICON_CLASS };
|
|
28
|
+
const SECTION_HERO_ICON_CLASS = 'h-10 w-10 text-ods-accent';
|
|
37
29
|
|
|
38
30
|
export interface DevSectionPageProps {
|
|
39
31
|
sectionKey: OpenframeDevSectionKey;
|
|
@@ -19,7 +19,6 @@ import { useState, useEffect } from 'react';
|
|
|
19
19
|
import { useRouter, useSearchParams, usePathname } from '../../../embed-shims';
|
|
20
20
|
import { SearchInput } from '../../ui';
|
|
21
21
|
import { StatusFilterComponent } from '../../features';
|
|
22
|
-
import { PageHeader } from '../../layout/page-header';
|
|
23
22
|
import {
|
|
24
23
|
OPENFRAME_DEV_SECTIONS,
|
|
25
24
|
type OpenframeDevSectionKey,
|
|
@@ -96,19 +95,15 @@ export function DevSectionView({ sectionKey, hero, preControls, children }: DevS
|
|
|
96
95
|
return (
|
|
97
96
|
<div className="w-full flex flex-col gap-10">
|
|
98
97
|
{hero ? (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
subtitle={hero.description}
|
|
109
|
-
noBottomMargin
|
|
110
|
-
noTopPadding
|
|
111
|
-
/>
|
|
98
|
+
<div className="space-y-4">
|
|
99
|
+
<h1 className="text-h1 tracking-[-1.12px] text-ods-text-primary flex items-center gap-3">
|
|
100
|
+
{hero.icon}
|
|
101
|
+
{hero.title ?? section.hero.title}
|
|
102
|
+
</h1>
|
|
103
|
+
<p className="font-['DM_Sans'] font-medium text-[18px] leading-[28px] text-ods-text-secondary max-w-3xl">
|
|
104
|
+
{hero.description}
|
|
105
|
+
</p>
|
|
106
|
+
</div>
|
|
112
107
|
) : (
|
|
113
108
|
<div className="flex items-center justify-between w-full">
|
|
114
109
|
<h2 className="font-['Azeret_Mono'] font-semibold text-[32px] md:text-[40px] lg:text-[48px] leading-[40px] md:leading-[48px] lg:leading-[56px] text-ods-text-primary tracking-[-0.64px] md:tracking-[-0.8px] lg:tracking-[-0.96px]">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DevSectionView, type DevSectionViewProps } from './dev-section-view';
|
|
2
|
-
export { DevSectionPage, type DevSectionPageProps
|
|
2
|
+
export { DevSectionPage, type DevSectionPageProps } from './dev-section-page';
|
|
3
3
|
export {
|
|
4
4
|
DevCardRowContent,
|
|
5
5
|
DevCardRowSkeleton,
|
|
@@ -80,7 +80,7 @@ export function useDocSearch(config: UseDocSearchConfig) {
|
|
|
80
80
|
onNavigate,
|
|
81
81
|
tableIds,
|
|
82
82
|
onInPageSwap,
|
|
83
|
-
searchEndpoint,
|
|
83
|
+
searchEndpoint = '/api/docs/search',
|
|
84
84
|
} = config
|
|
85
85
|
const tableIdsKey = tableIds && tableIds.length > 0 ? tableIds.join(',') : ''
|
|
86
86
|
|
|
@@ -88,11 +88,7 @@ export function useDocSearch(config: UseDocSearchConfig) {
|
|
|
88
88
|
// Optional chat-runtime read — when present and mode='embed' the
|
|
89
89
|
// search-result row click short-circuits to a new-tab open against
|
|
90
90
|
// the absolutized URL. Null/host preserves today's behavior.
|
|
91
|
-
// Also used as the proxy-prefix fallback for `searchEndpoint`, matching
|
|
92
|
-
// how tickets resolves `findTicketUrl`.
|
|
93
91
|
const runtime = useChatRuntime()
|
|
94
|
-
const resolvedSearchEndpoint =
|
|
95
|
-
searchEndpoint ?? runtime?.endpoints.docsSearchUrl ?? '/api/docs/search'
|
|
96
92
|
|
|
97
93
|
const [query, setQuery] = useState('')
|
|
98
94
|
const [results, setResults] = useState<SearchResult[]>([])
|
|
@@ -118,7 +114,7 @@ export function useDocSearch(config: UseDocSearchConfig) {
|
|
|
118
114
|
})
|
|
119
115
|
if (tableIdsKey) params.set('tableIds', tableIdsKey)
|
|
120
116
|
|
|
121
|
-
const response = await fetch(`${
|
|
117
|
+
const response = await fetch(`${searchEndpoint}?${params.toString()}`)
|
|
122
118
|
if (!response.ok) {
|
|
123
119
|
throw new Error(`Search request failed: ${response.status}`)
|
|
124
120
|
}
|
|
@@ -146,7 +142,7 @@ export function useDocSearch(config: UseDocSearchConfig) {
|
|
|
146
142
|
return () => {
|
|
147
143
|
cancelled = true
|
|
148
144
|
}
|
|
149
|
-
}, [debouncedQuery, source, tableIdsKey,
|
|
145
|
+
}, [debouncedQuery, source, tableIdsKey, searchEndpoint])
|
|
150
146
|
|
|
151
147
|
// Derived loading state — single source of truth for "should the
|
|
152
148
|
// dropdown show 'Loading...' instead of 'No results found'":
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import type { ComponentType } from 'react';
|
|
21
21
|
import { PageShell, PageLayout, PageHeading } from '../../ui';
|
|
22
|
-
import {
|
|
22
|
+
import { SimpleMarkdownRenderer } from '../../ui/simple-markdown-renderer';
|
|
23
23
|
import { useRouter } from '../../../embed-shims/next-navigation';
|
|
24
24
|
import { useLegalDocs, type LegalDocument } from './use-legal-docs';
|
|
25
25
|
import { formatLegalDate } from '../../../utils/format';
|
|
@@ -76,7 +76,7 @@ export function LegalDocumentPage({
|
|
|
76
76
|
initialData = null,
|
|
77
77
|
initialLastUpdatedLabel = null,
|
|
78
78
|
apiEndpoint,
|
|
79
|
-
MarkdownRenderer =
|
|
79
|
+
MarkdownRenderer = SimpleMarkdownRenderer,
|
|
80
80
|
backButton,
|
|
81
81
|
}: LegalDocumentPageProps) {
|
|
82
82
|
const router = useRouter();
|
|
@@ -10,7 +10,6 @@ import { Card, CardContent } from '../../ui/card';
|
|
|
10
10
|
import { PageShell } from '../../layout/article-detail-layout';
|
|
11
11
|
import { PageLayout } from '../../layout/page-layout';
|
|
12
12
|
import { ReleaseChangelogSection } from '../../ui/release-changelog-section';
|
|
13
|
-
import { RichMarkdownRenderer } from '../../ui/rich-markdown-renderer';
|
|
14
13
|
import { EntityTagBadges } from '../../features/entity-tag-badges';
|
|
15
14
|
import { EntityMetadataAuthorCell } from '../../chat/entity-cards/entity-author-card';
|
|
16
15
|
import type { EntityAuthor } from '../../../types/entity-author';
|
|
@@ -110,11 +109,10 @@ export interface ReleaseDetailPageProps {
|
|
|
110
109
|
authorHref?: string;
|
|
111
110
|
}
|
|
112
111
|
|
|
113
|
-
// Default
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const DefaultMarkdownRenderer = RichMarkdownRenderer;
|
|
112
|
+
// Default simple markdown renderer (just renders as text)
|
|
113
|
+
function DefaultMarkdownRenderer({ content }: MarkdownRendererProps) {
|
|
114
|
+
return <div className="whitespace-pre-wrap">{content}</div>;
|
|
115
|
+
}
|
|
118
116
|
|
|
119
117
|
export function ReleaseDetailPage({
|
|
120
118
|
authorHref,
|
|
@@ -61,7 +61,6 @@ export * from './hover-dropdown'
|
|
|
61
61
|
export * from '../chat'
|
|
62
62
|
export * from '../layout/list-page-layout'
|
|
63
63
|
export * from '../layout/page-container'
|
|
64
|
-
export * from '../layout/page-header'
|
|
65
64
|
export * from '../layout/page-heading'
|
|
66
65
|
export * from '../layout/page-layout'
|
|
67
66
|
export * from '../layout/article-detail-layout'
|
|
@@ -161,6 +160,5 @@ export * from './ticket-attachments-list'
|
|
|
161
160
|
export * from './ticket-note-card'
|
|
162
161
|
export * from './ticket-notes-section'
|
|
163
162
|
export * from './simple-markdown-renderer'
|
|
164
|
-
export { RichMarkdownRenderer, type RichMarkdownRendererProps } from './rich-markdown-renderer'
|
|
165
163
|
export * from './filter-pill-row'
|
|
166
164
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React, { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import { Badge } from './badge';
|
|
5
5
|
import { ChevronDown } from 'lucide-react';
|
|
6
|
-
import { RichMarkdownRenderer } from './rich-markdown-renderer';
|
|
7
6
|
import type { ChangelogEntry } from '../../types/product-release';
|
|
8
7
|
|
|
9
8
|
interface ReleaseChangelogSectionProps {
|
|
@@ -32,11 +31,7 @@ interface ReleaseChangelogSectionProps {
|
|
|
32
31
|
* visual taxonomy across catalog and detail. Inherits the title's color
|
|
33
32
|
* (secondary for normal sections, red for breaking). */
|
|
34
33
|
icon?: React.ReactNode;
|
|
35
|
-
|
|
36
|
-
* the lib's `RichMarkdownRenderer` so changelog rich-link previews
|
|
37
|
-
* (YouTube, OG cards, etc.) work out of the box. Hosts that already
|
|
38
|
-
* wrap with a Supabase-aware preset can keep passing their own. */
|
|
39
|
-
SimpleMarkdownRenderer?: React.ComponentType<{ content: string }>;
|
|
34
|
+
SimpleMarkdownRenderer: React.ComponentType<{ content: string }>;
|
|
40
35
|
}
|
|
41
36
|
|
|
42
37
|
// Collapsed height for the preview-first mode. ~120px shows the first
|
|
@@ -52,7 +47,7 @@ export function ReleaseChangelogSection({
|
|
|
52
47
|
defaultCollapsed = true,
|
|
53
48
|
previewFirst = false,
|
|
54
49
|
icon,
|
|
55
|
-
SimpleMarkdownRenderer
|
|
50
|
+
SimpleMarkdownRenderer
|
|
56
51
|
}: ReleaseChangelogSectionProps) {
|
|
57
52
|
const [collapsed, setCollapsed] = useState(collapsible ? defaultCollapsed : false);
|
|
58
53
|
const [previewExpanded, setPreviewExpanded] = useState(false);
|
|
@@ -11,9 +11,6 @@ import { visit } from 'unist-util-visit';
|
|
|
11
11
|
import Image from '../../embed-shims/next-image';
|
|
12
12
|
import { AlertCircleIcon } from '../icons-v2-generated';
|
|
13
13
|
import { cn } from '../../utils/cn';
|
|
14
|
-
import type { ResolveLinkResult } from '../../types/doc-source';
|
|
15
|
-
|
|
16
|
-
export type { ResolveLinkResult };
|
|
17
14
|
|
|
18
15
|
// ---------------------------------------------------------------------------
|
|
19
16
|
// rehype HAST sanitizer — runs AFTER rehype-raw to strip XSS vectors
|
|
@@ -526,10 +523,17 @@ function resolveTextSizeConfig(config?: TextSizeConfig): Record<TextSizeElement,
|
|
|
526
523
|
return { ...defaultSizes, ...config };
|
|
527
524
|
}
|
|
528
525
|
|
|
529
|
-
//
|
|
530
|
-
//
|
|
531
|
-
//
|
|
532
|
-
|
|
526
|
+
// ---------------------------------------------------------------------------
|
|
527
|
+
// Resolved link result used by onResolveLink callback
|
|
528
|
+
// ---------------------------------------------------------------------------
|
|
529
|
+
export interface ResolveLinkResult {
|
|
530
|
+
success: boolean;
|
|
531
|
+
resolvedPath?: string;
|
|
532
|
+
type?: string;
|
|
533
|
+
action?: string;
|
|
534
|
+
error?: string;
|
|
535
|
+
message?: string;
|
|
536
|
+
}
|
|
533
537
|
|
|
534
538
|
// ---------------------------------------------------------------------------
|
|
535
539
|
// Props
|
|
@@ -57,20 +57,6 @@ export interface ChatRuntime {
|
|
|
57
57
|
listEngagementsUrl?: string
|
|
58
58
|
/** GET slash-command catalog. Hub: '/api/docs/commands'. */
|
|
59
59
|
commandsUrl: string
|
|
60
|
-
/** GET RAG-search endpoint behind `<DocSearchBar>` (the in-source search
|
|
61
|
-
* bar mounted by `<DocViewer>` / `<DocsHubPage>` when `showAIChat` is on).
|
|
62
|
-
* Hub: '/api/docs/search'. OPTIONAL — falls back to the hub path so
|
|
63
|
-
* same-origin Next.js hosts don't need to set it. Cross-origin embedders
|
|
64
|
-
* set their proxied path so the search bar routes through the same
|
|
65
|
-
* reverse proxy as everything else. Same pattern as `findTicketUrl`. */
|
|
66
|
-
docsSearchUrl?: string
|
|
67
|
-
/** POST internal-link resolver. The in-source markdown renderer (lib or
|
|
68
|
-
* custom) calls `<DocViewer>`'s `handlers.onResolveLink(href, currentPath)`
|
|
69
|
-
* for relative hrefs like `./getting-started/intro.md` — that callback
|
|
70
|
-
* posts to this URL with `{ link, currentPath, source }` and expects a
|
|
71
|
-
* `ResolveLinkResult` back. Hub: '/api/docs/resolve-link'. OPTIONAL — same
|
|
72
|
-
* fall-back chain as `docsSearchUrl`: prop override → runtime → default. */
|
|
73
|
-
docsResolveLinkUrl?: string
|
|
74
60
|
/** GET per-platform empty-state config (admin-edited in
|
|
75
61
|
* `/admin/chat-config`): `{ greeting, enabledRagTableIds, suggestedQueries }`.
|
|
76
62
|
* Hub: '/api/docs/empty-state'. OPTIONAL — the in-app (host-mode) chat
|
package/src/types/doc-source.ts
CHANGED
|
@@ -25,13 +25,6 @@ export interface DocNode {
|
|
|
25
25
|
children?: DocNode[]
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* Named alias for `DocNode['documentType']` (non-nullable). Use this as the
|
|
30
|
-
* key type when building per-document-type renderer maps — keeps consumers
|
|
31
|
-
* from re-declaring the union or having to dig into `DocNode`.
|
|
32
|
-
*/
|
|
33
|
-
export type DocumentType = NonNullable<DocNode['documentType']>
|
|
34
|
-
|
|
35
28
|
/**
|
|
36
29
|
* Content payload returned by a doc-source DAL's `getContent` call. Carries
|
|
37
30
|
* everything any consumer's renderer might need; markdown-only fields and
|
|
@@ -78,21 +71,6 @@ export interface DocSourceDal<Client = unknown> {
|
|
|
78
71
|
*/
|
|
79
72
|
export type DocSourceId = 'openframe-docs' | 'data-room-docs'
|
|
80
73
|
|
|
81
|
-
/**
|
|
82
|
-
* Result returned by the resolve-link endpoint. Discriminator-style: `success`
|
|
83
|
-
* + `type` jointly decide what the renderer does (navigate, expand folder,
|
|
84
|
-
* show broken-link badge). Backed by hub `/api/docs/resolve-link` and any
|
|
85
|
-
* embedder-proxied equivalent.
|
|
86
|
-
*/
|
|
87
|
-
export interface ResolveLinkResult {
|
|
88
|
-
success: boolean
|
|
89
|
-
resolvedPath?: string
|
|
90
|
-
type?: string
|
|
91
|
-
action?: string
|
|
92
|
-
error?: string
|
|
93
|
-
message?: string
|
|
94
|
-
}
|
|
95
|
-
|
|
96
74
|
/**
|
|
97
75
|
* Handlers the viewer passes to a consumer's `renderContent` callback.
|
|
98
76
|
* The page shell wires `renderContent` directly — no `DocContentRenderer`
|
|
@@ -105,16 +83,6 @@ export interface DocRenderHandlers {
|
|
|
105
83
|
) => void
|
|
106
84
|
currentPath: string
|
|
107
85
|
/** Registry source id (e.g. `'openframe-docs'`, `'data-room-docs'`) — used by
|
|
108
|
-
* the consumer's `/api/
|
|
86
|
+
* the consumer's `/api/resolve-link` POST to disambiguate the doc source. */
|
|
109
87
|
sourceId: DocSourceId
|
|
110
|
-
/**
|
|
111
|
-
* Async link resolver — POSTs the raw markdown href + the current doc's path
|
|
112
|
-
* to the embedder's resolve-link endpoint and returns the resolved tree path.
|
|
113
|
-
* The lib auto-wires this when `DocViewer` knows the resolve-link endpoint
|
|
114
|
-
* (via `resolveLinkEndpoint` prop, `ChatRuntime.endpoints.docsResolveLinkUrl`,
|
|
115
|
-
* or the `/api/docs/resolve-link` default). Consumers thread it directly into
|
|
116
|
-
* their markdown renderer's `onResolveLink` prop — without it, relative
|
|
117
|
-
* hrefs like `./intro.md` end up fetched verbatim and 404.
|
|
118
|
-
*/
|
|
119
|
-
onResolveLink?: (href: string, currentPath: string) => Promise<ResolveLinkResult>
|
|
120
88
|
}
|
package/src/utils/index.ts
CHANGED