@flamingo-stack/openframe-frontend-core 0.0.303 → 0.0.304

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.
Files changed (116) hide show
  1. package/dist/{chunk-R2NVJUOB.js → chunk-2X4HTRQ4.js} +10 -22
  2. package/dist/chunk-2X4HTRQ4.js.map +1 -0
  3. package/dist/{chunk-UMYWG5C3.js → chunk-45DC5AJC.js} +2 -2
  4. package/dist/{chunk-KZGSVTRP.cjs → chunk-7KTSRZI4.cjs} +475 -543
  5. package/dist/chunk-7KTSRZI4.cjs.map +1 -0
  6. package/dist/{chunk-6D53QFBF.cjs → chunk-A25ZI7HO.cjs} +12 -12
  7. package/dist/{chunk-6D53QFBF.cjs.map → chunk-A25ZI7HO.cjs.map} +1 -1
  8. package/dist/{chunk-4JK3ZFMD.cjs → chunk-BMNGBMSN.cjs} +26 -26
  9. package/dist/{chunk-4JK3ZFMD.cjs.map → chunk-BMNGBMSN.cjs.map} +1 -1
  10. package/dist/{chunk-VAH46QQO.js → chunk-DOYOOBP4.js} +2 -2
  11. package/dist/{chunk-YKP7UXWT.cjs → chunk-FVLEE7YZ.cjs} +23 -35
  12. package/dist/chunk-FVLEE7YZ.cjs.map +1 -0
  13. package/dist/{chunk-FG4XA6NA.js → chunk-INZOAK77.js} +2 -2
  14. package/dist/{chunk-OZSU6S6U.js → chunk-JO6EUJGU.js} +21 -27
  15. package/dist/chunk-JO6EUJGU.js.map +1 -0
  16. package/dist/{chunk-UNWVMS3E.cjs → chunk-MZRNARMO.cjs} +37 -37
  17. package/dist/{chunk-UNWVMS3E.cjs.map → chunk-MZRNARMO.cjs.map} +1 -1
  18. package/dist/{chunk-SYTHAQRP.cjs → chunk-O4TIFKDG.cjs} +7 -7
  19. package/dist/{chunk-SYTHAQRP.cjs.map → chunk-O4TIFKDG.cjs.map} +1 -1
  20. package/dist/{chunk-3GYV6RP7.cjs → chunk-RNF2E736.cjs} +11 -10
  21. package/dist/chunk-RNF2E736.cjs.map +1 -0
  22. package/dist/{chunk-LTDGGKOW.cjs → chunk-UAJAJFI6.cjs} +44 -50
  23. package/dist/chunk-UAJAJFI6.cjs.map +1 -0
  24. package/dist/{chunk-JEHWEKWA.js → chunk-X5N6ANEO.js} +4 -3
  25. package/dist/{chunk-JEHWEKWA.js.map → chunk-X5N6ANEO.js.map} +1 -1
  26. package/dist/{chunk-SLRDPGGS.js → chunk-Y2D2RJQX.js} +2694 -2762
  27. package/dist/chunk-Y2D2RJQX.js.map +1 -0
  28. package/dist/{chunk-OFLTDHC2.js → chunk-YV73VRRY.js} +2 -2
  29. package/dist/{chunk-ZCXABON3.cjs → chunk-Z7322A4A.cjs} +5 -5
  30. package/dist/{chunk-ZCXABON3.cjs.map → chunk-Z7322A4A.cjs.map} +1 -1
  31. package/dist/{chunk-ZRSS67EY.js → chunk-ZXIM2DJM.js} +2 -2
  32. package/dist/components/case-studies/index.cjs +8 -8
  33. package/dist/components/case-studies/index.js +2 -2
  34. package/dist/components/chat/hooks/use-chat-identity.d.ts +7 -1
  35. package/dist/components/chat/hooks/use-chat-identity.d.ts.map +1 -1
  36. package/dist/components/chat/hooks/use-empty-state-config.d.ts.map +1 -1
  37. package/dist/components/chat/hooks/use-slash-commands.d.ts.map +1 -1
  38. package/dist/components/chat/index.cjs +2 -2
  39. package/dist/components/chat/index.js +1 -1
  40. package/dist/components/contact/index.cjs +3 -3
  41. package/dist/components/contact/index.js +2 -2
  42. package/dist/components/docs/doc-viewer.d.ts +3 -4
  43. package/dist/components/docs/doc-viewer.d.ts.map +1 -1
  44. package/dist/components/docs/index.cjs +5 -5
  45. package/dist/components/docs/index.js +4 -4
  46. package/dist/components/docs/use-docs-resolve-link.d.ts.map +1 -1
  47. package/dist/components/docs/use-document-tree.d.ts.map +1 -1
  48. package/dist/components/embeds/index.cjs +3 -3
  49. package/dist/components/embeds/index.js +2 -2
  50. package/dist/components/faq/index.cjs +3 -3
  51. package/dist/components/faq/index.js +2 -2
  52. package/dist/components/features/index.cjs +2 -2
  53. package/dist/components/features/index.js +1 -1
  54. package/dist/components/index.cjs +172 -178
  55. package/dist/components/index.cjs.map +1 -1
  56. package/dist/components/index.js +8 -14
  57. package/dist/components/index.js.map +1 -1
  58. package/dist/components/layout/page-layout.d.ts +1 -10
  59. package/dist/components/layout/page-layout.d.ts.map +1 -1
  60. package/dist/components/layout/title-block.d.ts +1 -17
  61. package/dist/components/layout/title-block.d.ts.map +1 -1
  62. package/dist/components/navigation/index.cjs +2 -2
  63. package/dist/components/navigation/index.js +1 -1
  64. package/dist/components/onboarding-guides/index.cjs +23 -23
  65. package/dist/components/onboarding-guides/index.js +3 -3
  66. package/dist/components/related-content/index.cjs +3 -3
  67. package/dist/components/related-content/index.js +2 -2
  68. package/dist/components/shared/dev-section/dev-section-page.d.ts +0 -9
  69. package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
  70. package/dist/components/shared/dev-section/dev-section-view.d.ts.map +1 -1
  71. package/dist/components/shared/dev-section/index.d.ts +1 -1
  72. package/dist/components/shared/dev-section/index.d.ts.map +1 -1
  73. package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -1
  74. package/dist/components/tickets/index.cjs +60 -60
  75. package/dist/components/tickets/index.js +3 -3
  76. package/dist/components/ui/index.cjs +2 -6
  77. package/dist/components/ui/index.cjs.map +1 -1
  78. package/dist/components/ui/index.d.ts +0 -1
  79. package/dist/components/ui/index.d.ts.map +1 -1
  80. package/dist/components/ui/index.js +1 -5
  81. package/dist/index.cjs +2 -6
  82. package/dist/index.cjs.map +1 -1
  83. package/dist/index.js +1 -5
  84. package/package.json +1 -1
  85. package/src/components/chat/embeddable-chat.tsx +25 -3
  86. package/src/components/chat/hooks/use-chat-identity.ts +13 -2
  87. package/src/components/chat/hooks/use-empty-state-config.ts +30 -16
  88. package/src/components/chat/hooks/use-slash-commands.ts +24 -8
  89. package/src/components/docs/doc-viewer.tsx +25 -22
  90. package/src/components/docs/use-docs-resolve-link.ts +2 -1
  91. package/src/components/docs/use-document-tree.ts +3 -2
  92. package/src/components/layout/page-layout.tsx +28 -14
  93. package/src/components/layout/title-block.tsx +86 -40
  94. package/src/components/shared/dev-section/dev-section-page.tsx +1 -9
  95. package/src/components/shared/dev-section/dev-section-view.tsx +9 -14
  96. package/src/components/shared/dev-section/index.ts +1 -1
  97. package/src/components/shared/doc-search/use-doc-search.ts +2 -1
  98. package/src/components/ui/index.ts +0 -1
  99. package/dist/chunk-3GYV6RP7.cjs.map +0 -1
  100. package/dist/chunk-KZGSVTRP.cjs.map +0 -1
  101. package/dist/chunk-LTDGGKOW.cjs.map +0 -1
  102. package/dist/chunk-OZSU6S6U.js.map +0 -1
  103. package/dist/chunk-R2NVJUOB.js.map +0 -1
  104. package/dist/chunk-SLRDPGGS.js.map +0 -1
  105. package/dist/chunk-YKP7UXWT.cjs.map +0 -1
  106. package/dist/components/layout/page-header.d.ts +0 -78
  107. package/dist/components/layout/page-header.d.ts.map +0 -1
  108. package/dist/components/layout/page-with-header.d.ts +0 -67
  109. package/dist/components/layout/page-with-header.d.ts.map +0 -1
  110. package/src/components/layout/page-header.tsx +0 -182
  111. package/src/components/layout/page-with-header.tsx +0 -110
  112. /package/dist/{chunk-UMYWG5C3.js.map → chunk-45DC5AJC.js.map} +0 -0
  113. /package/dist/{chunk-VAH46QQO.js.map → chunk-DOYOOBP4.js.map} +0 -0
  114. /package/dist/{chunk-FG4XA6NA.js.map → chunk-INZOAK77.js.map} +0 -0
  115. /package/dist/{chunk-OFLTDHC2.js.map → chunk-YV73VRRY.js.map} +0 -0
  116. /package/dist/{chunk-ZRSS67EY.js.map → chunk-ZXIM2DJM.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-YKP7UXWT.cjs","../src/components/unified-pagination.tsx","../src/components/empty-state.tsx","../src/components/shared/dev-section/dev-section-view.tsx","../src/components/shared/dev-section/dev-section-page.tsx","../src/components/shared/dev-section/dev-card-row.tsx","../src/components/shared/delivery/delivery-row.tsx"],"names":["jsx","jsxs"],"mappings":"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","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-YKP7UXWT.cjs","sourcesContent":[null,"\"use client\"\n\nimport { useRouter, useSearchParams, usePathname } from \"../embed-shims/next-navigation\"\nimport { Pagination } from \"./pagination\"\n\ninterface UnifiedPaginationProps {\n currentPage: number\n totalPages: number\n onPageChange?: (page: number) => void\n className?: string\n}\n\nexport function UnifiedPagination({ \n currentPage, \n totalPages, \n onPageChange,\n className = \"mt-8 flex justify-center w-full\"\n}: UnifiedPaginationProps) {\n const router = useRouter()\n const searchParams = useSearchParams()\n const pathname = usePathname()\n\n const handlePageChange = (page: number) => {\n // Preserve current scroll position\n const currentScrollY = window.scrollY\n \n // Call the callback to update local state (prevents reload)\n if (onPageChange) {\n onPageChange(page)\n }\n \n // Update URL for bookmarking without navigation\n const params = new URLSearchParams(searchParams.toString())\n params.set(\"page\", page.toString())\n \n // Update URL without navigation (for bookmarking support)\n const newUrl = `${pathname}?${params.toString()}`\n window.history.replaceState(null, '', newUrl)\n \n // Restore scroll position after a brief delay to allow content to render\n setTimeout(() => {\n window.scrollTo({\n top: currentScrollY,\n behavior: 'instant' // Instant to prevent any scroll animation\n })\n }, 0)\n }\n\n // Don't render pagination if there's only one page\n if (totalPages <= 1) return null\n\n return (\n <div className={className}>\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={handlePageChange}\n />\n </div>\n )\n} ","\"use client\";\n\nimport { Search, FileText, Package } from \"lucide-react\"\nimport { Button } from \"./ui/button\"\nimport { useRouter } from \"../embed-shims/next-navigation\"\n\nexport interface EmptyStateProps {\n type: 'vendors' | 'posts' | 'search' | 'generic'\n title?: string\n description?: string\n showBackButton?: boolean\n onGoBack?: () => void\n backButtonText?: string\n // New CTA properties\n showCTA?: boolean\n ctaText?: string\n onCtaClick?: () => void\n ctaVariant?: 'primary' | 'secondary'\n}\n\nexport function EmptyState({\n type,\n title,\n description,\n showBackButton = false,\n onGoBack,\n backButtonText = \"Go Back\",\n showCTA = true,\n ctaText,\n onCtaClick,\n ctaVariant = 'primary'\n}: EmptyStateProps) {\n const router = useRouter()\n\n // Default content based on type\n const getDefaultContent = () => {\n switch (type) {\n case 'vendors':\n return {\n icon: <Package className=\"w-full h-full\" />,\n title: \"No vendors found\",\n description: \"We couldn't find any vendors matching your criteria. Try adjusting your filters or search terms.\"\n }\n case 'posts':\n return {\n icon: <FileText className=\"w-full h-full\" />,\n title: \"No articles found\",\n description: \"We couldn't find any articles matching your criteria. Try different categories, tags, or search terms.\"\n }\n case 'search':\n return {\n icon: <Search className=\"w-full h-full\" />,\n title: \"No results found\",\n description: \"Your search didn't return any results. Try different keywords or browse our categories.\"\n }\n default:\n return {\n icon: <Search className=\"w-full h-full\" />,\n title: \"Nothing found\",\n description: \"We couldn't find what you're looking for. Try adjusting your search or filters.\"\n }\n }\n }\n\n // Smart CTA logic based on context\n const getSmartCTA = () => {\n // If custom CTA is provided, use it\n if (ctaText && onCtaClick) {\n return {\n text: ctaText,\n action: onCtaClick\n }\n }\n\n // Check if we're on the client side\n const isClient = typeof window !== 'undefined'\n const currentPath = isClient ? window.location.pathname : ''\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: \"Reset Filters\",\n action: () => {\n if (isClient) {\n // Try to reset search by clearing URL params and refreshing\n const url = new URL(window.location.href)\n url.search = ''\n router.push(url.pathname)\n }\n }\n }\n case 'posts':\n // If we're on blog/community pages, reset blog filters\n if (currentPath.includes('/blog')) {\n return {\n text: \"Reset Filters\",\n action: () => {\n if (isClient) {\n // Reset blog search and filters by clearing URL params\n const url = new URL(window.location.href)\n url.search = ''\n router.push(url.pathname)\n }\n }\n }\n } else if (currentPath.includes('/profile')) {\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n }\n return {\n text: \"View All Posts\",\n action: () => router.push('/blog')\n }\n case 'vendors':\n // If we're in profile or other pages, direct to main content\n if (currentPath.includes('/profile')) {\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n } else if (currentPath.includes('/vendors') || currentPath.includes('/margin-increase/compare')) {\n return {\n text: \"Reset Filters\",\n action: () => {\n if (isClient) {\n // Reset vendor search and filters by clearing URL params\n const url = new URL(window.location.href)\n url.search = ''\n router.push(url.pathname)\n }\n }\n }\n }\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n default:\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n }\n }\n\n const defaultContent = getDefaultContent()\n const displayTitle = title || defaultContent.title\n const displayDescription = description || defaultContent.description\n const smartCTA = getSmartCTA()\n\n return (\n <div className=\"flex flex-col items-center justify-center py-6 md:py-16 px-6 text-center\">\n {/* Icon */}\n <div className=\"mb-3 md:mb-6 flex items-center justify-center\">\n <div className=\"rounded-full bg-ods-card p-3 md:p-6 border border-ods-border\">\n <div className=\"w-8 h-8 md:w-16 md:h-16 text-ods-text-secondary flex items-center justify-center\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 md:mb-3 text-lg md:text-xl font-semibold font-['DM_Sans'] text-ods-text-primary tracking-[-0.02em]\">\n {displayTitle}\n </h2>\n\n {/* Description */}\n <p className=\"mb-4 md:mb-8 max-w-md text-sm font-medium font-['DM_Sans'] text-ods-text-secondary leading-[1.43em]\">\n {displayDescription}\n </p>\n\n {/* Smart CTA Button */}\n {showCTA && smartCTA && (\n <div className=\"w-full max-w-xs mb-3\">\n <Button\n onClick={smartCTA.action}\n className={ctaVariant === 'primary'\n ? \"w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-['DM_Sans'] font-medium\"\n : \"w-full bg-transparent border border-ods-border text-ods-text-primary hover:border-ods-accent hover:text-ods-accent transition-all duration-150 font-['DM_Sans'] font-medium\"\n }\n >\n {smartCTA.text}\n </Button>\n </div>\n )}\n\n {/* Optional Back Button */}\n {showBackButton && onGoBack && (\n <div className=\"w-full max-w-xs\">\n <Button\n onClick={onGoBack}\n variant=\"outline\"\n className=\"w-full transition-all duration-150 font-['DM_Sans'] font-medium\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n )\n} ","'use client';\n\n/**\n * DevSectionView — the canonical chrome for ANY dev-center section\n * (Roadmap / Delivery / Releases). One component, used in BOTH:\n *\n * - tabbed `/roadmap-and-releases` (compact title mode, no `hero`)\n * - full-page `/roadmap`, `/bug-fixes-and-enhancements`, `/releases`\n * (hero mode with icon + description + back link)\n *\n * Owns: title rendering, the inline search input, the filter pill row,\n * and the URL-param wiring that connects both. The list `children`\n * receive a clean URL contract — they read `?<paramKey>=...` via\n * `useSearchParams()` and refetch on change. No duplicated controls.\n */\n\nimport type { ReactNode } from 'react';\nimport { useState, useEffect } from 'react';\nimport { useRouter, useSearchParams, usePathname } from '../../../embed-shims';\nimport { SearchInput } from '../../ui';\nimport { StatusFilterComponent } from '../../features';\nimport { PageHeader } from '../../layout/page-header';\nimport {\n OPENFRAME_DEV_SECTIONS,\n type OpenframeDevSectionKey,\n} from '../../../utils/dev-sections/openframe-dev-sections';\n\nexport interface DevSectionViewProps {\n /** Which section to render — drives title, search, and filter\n * config via the `OPENFRAME_DEV_SECTIONS` registry. */\n sectionKey: OpenframeDevSectionKey;\n /** When set, renders the rich page-level hero (icon + h1 + description).\n * Omit for the compact tab-context heading. */\n hero?: {\n /** Pre-rendered icon JSX. Server components render the icon themselves\n * and pass the element here — function references can't cross the\n * server→client boundary, but React elements can. */\n icon: ReactNode;\n /** Hero title. Falls back to `OPENFRAME_DEV_SECTIONS[sectionKey].hero.title`\n * when omitted, so embedders can override the (OpenFrame-specific) default\n * copy without forking the registry. */\n title?: string;\n description: string;\n };\n /** Optional slot rendered BETWEEN the hero and the search/filter\n * controls. Use this for an entry-action surface that should sit\n * above the list (e.g. the Help Center's \"Open a new ticket\" form).\n * The slot is wrapped in the same `gap-10` flex column so spacing\n * matches the surrounding chrome — callers should NOT add their\n * own top/bottom margin. Renders `null` (no DOM) when omitted. */\n preControls?: ReactNode;\n /** The page-specific list body. Reads URL params written by this\n * component (search input + filter pills). */\n children: ReactNode;\n}\n\nexport function DevSectionView({ sectionKey, hero, preControls, children }: DevSectionViewProps) {\n const section = OPENFRAME_DEV_SECTIONS[sectionKey];\n const router = useRouter();\n const pathname = usePathname();\n const searchParams = useSearchParams();\n\n const search = section.search;\n const filter = section.filter;\n\n const currentSearch = search ? searchParams.get(search.paramKey) || '' : '';\n const currentFilterValue = filter\n ? searchParams.get(filter.paramKey) || filter.defaultValue\n : '';\n\n // Controlled search-input state — input commits to the URL only on\n // Enter (not on every keystroke), preserving the legacy behavior.\n // Lazy init from URL avoids a brief flash of stale value on first\n // paint after URL-driven re-render (e.g. tab switch).\n const [searchValue, setSearchValue] = useState(() => currentSearch);\n useEffect(() => {\n setSearchValue(currentSearch);\n }, [currentSearch]);\n\n const handleSearchSubmit = (value: string) => {\n if (!search) return;\n const params = new URLSearchParams(searchParams.toString());\n if (value.trim()) params.set(search.paramKey, value.trim());\n else params.delete(search.paramKey);\n router.replace(`${pathname}?${params.toString()}`, { scroll: false });\n };\n\n const handleFilterChange = (value: string) => {\n if (!filter) return;\n const params = new URLSearchParams(searchParams.toString());\n if (value === filter.defaultValue) params.delete(filter.paramKey);\n else params.set(filter.paramKey, value);\n router.replace(`${pathname}?${params.toString()}`, { scroll: false });\n };\n\n return (\n <div className=\"w-full flex flex-col gap-10\">\n {hero ? (\n // Render through the shared `<PageHeader>` primitive so the dev-\n // section hero (Releases, Roadmap, Onboarding catalog) and the\n // docs-hub hero (Knowledge Hub, Data Room) are LITERALLY the same\n // component rendering the same DOM/CSS. `noBottomMargin` because\n // the parent `gap-10` already supplies the spacing to the next\n // sibling (preControls / search / filter).\n <PageHeader\n title={hero.title ?? section.hero.title}\n titleIcon={hero.icon}\n subtitle={hero.description}\n noBottomMargin\n noTopPadding\n />\n ) : (\n <div className=\"flex items-center justify-between w-full\">\n <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]\">\n {section.hero.title}\n <span className=\"text-ods-accent\">:</span>\n </h2>\n </div>\n )}\n\n {preControls}\n\n {(search || filter) && (\n <div className=\"space-y-4\">\n {search && (\n <SearchInput\n showDropdown={false}\n placeholder={search.placeholder}\n value={searchValue}\n onChange={setSearchValue}\n onSubmit={handleSearchSubmit}\n />\n )}\n {filter && (\n <StatusFilterComponent\n selectedStatus={currentFilterValue}\n onStatusChange={handleFilterChange}\n statusOptions={[...filter.options]}\n />\n )}\n </div>\n )}\n\n {children}\n </div>\n );\n}\n","'use client';\n\n/**\n * DevSectionPage — full-page wrapper for a dev-center section\n * (`/roadmap`, `/bug-fixes-and-enhancements`, `/releases`).\n *\n * Mounts the lib's canonical `PageLayout` directly (no in-app wrapper)\n * so the back-button affordance stays in lockstep with whatever the\n * design system ships — any future lib change to BackButton / TitleBlock\n * propagates automatically.\n *\n * Composition: `PageShell` → `PageLayout` (back-to-home wired) →\n * `DevSectionView` (icon hero + search + filter pills) → list body.\n *\n * Adding a new section is one entry in `OPENFRAME_DEV_SECTIONS` plus a\n * single-line page file mounting this factory with the new key.\n */\n\nimport type { ReactNode } from 'react';\nimport { useRouter } from '../../../embed-shims/next-navigation';\nimport { PageShell, PageLayout } from '../../ui';\nimport { DevSectionView } from './dev-section-view';\nimport {\n OPENFRAME_DEV_SECTIONS,\n type OpenframeDevSectionKey,\n} from '../../../utils/dev-sections/openframe-dev-sections';\n\n/** Re-export the constant so existing dev-section call sites keep their\n * old import path. The canonical home is `src/utils/page-header-constants.ts`\n * (NOT a `'use client'` module) so server modules can import it without\n * Next.js turning it into a client reference proxy — that proxy is what\n * blew up lucide's `mergeClasses().trim()` when used as\n * `<Icon className={SECTION_HERO_ICON_CLASS} />` inside a hub\n * server-component preset. */\nimport { SECTION_HERO_ICON_CLASS } from '../../../utils/page-header-constants';\nexport { SECTION_HERO_ICON_CLASS };\n\nexport interface DevSectionPageProps {\n sectionKey: OpenframeDevSectionKey;\n /** The page-specific list body (e.g. `<RoadmapList />`). */\n children: ReactNode;\n /** Optional slot rendered BETWEEN the hero and search/filter — see\n * `DevSectionView.preControls`. Used by surfaces that want an entry\n * action (e.g. Help Center's \"Open a new ticket\" form) above the\n * controls instead of below them. */\n preControls?: ReactNode;\n /** Back-button config — same shape as `LegalDocumentPage` /\n * `ReleaseDetailPage`. Pass `false` to hide entirely. Default\n * `{ label: 'Back to home', href: '/' }` — embedders whose \"home\" isn't `/`\n * should override `href`, or pass `false` if the embed has no home page. */\n backButton?: { label?: string; href?: string } | false;\n /** Override the hero title. Defaults to the (OpenFrame-specific) copy in\n * `OPENFRAME_DEV_SECTIONS[sectionKey].hero.title`. Set this to brand the\n * section for a non-OpenFrame embed. */\n title?: string;\n /** Override the hero subtitle/description. Defaults to\n * `OPENFRAME_DEV_SECTIONS[sectionKey].hero.description`. */\n subtitle?: string;\n}\n\nexport function DevSectionPage({\n sectionKey,\n children,\n preControls,\n backButton,\n title,\n subtitle,\n}: DevSectionPageProps) {\n const router = useRouter();\n const section = OPENFRAME_DEV_SECTIONS[sectionKey];\n const Icon = section.icon;\n\n // Back-button config — mirrors LegalDocumentPage / ReleaseDetailPage.\n // Default: { label: 'Back to home', href: '/' }. Pass `false` to hide.\n // After `backButton &&` narrowing, inner type is `{ label?, href? } |\n // undefined`; don't re-compare to `false` (TS2367).\n const backCfg =\n backButton === false\n ? undefined\n : {\n label: (backButton ? backButton.label : undefined) ?? 'Back to home',\n onClick: () => router.push((backButton ? backButton.href : undefined) ?? '/'),\n };\n\n return (\n <PageShell>\n <PageLayout backButton={backCfg}>\n <DevSectionView\n sectionKey={sectionKey}\n hero={{\n icon: <Icon className={SECTION_HERO_ICON_CLASS} />,\n title,\n description: subtitle ?? section.hero.description,\n }}\n preControls={preControls}\n >\n {children}\n </DevSectionView>\n </PageLayout>\n </PageShell>\n );\n}\n","'use client';\n\n/**\n * Shared row chrome for any `DevSectionPage` list (delivery, tickets,\n * future sections). One source of truth for the layout that every\n * dev-section card row uses:\n * left column → title (h3) / subtitle (h5 uppercase) / description\n * (h4 line-clamp-3), each in a fixed min-height block\n * so rows align across the grid\n * right column → caller-supplied stacked badges\n *\n * Surface stays small on purpose — `rightBadges` is a `ReactNode` so\n * the caller decides how many badges (delivery: 2, tickets: 1-2,\n * future: anything). No behavior baked in: the caller wraps the row\n * in a `<div>` (static, like delivery) or `<button>` (clickable, like\n * tickets) and renders the row content via this component.\n *\n * Pair with `DevCardRowSkeletonList` for the loading state — the\n * skeleton mirrors the same min-heights so the in-flight UI doesn't\n * shift the layout when real data lands.\n *\n * NOTE: the ticket conversation row is NOT here — it renders the shared\n * `<ChatMessageRow>` (`components/chat/chat-message-row.tsx`), the SAME\n * component the OpenMSP Slack-community feed uses, so the two surfaces stay\n * pixel-identical by construction.\n */\n\nimport type { ReactNode } from 'react';\n\nexport interface DevCardRowContentProps {\n title: string;\n /** Single-line uppercase metadata (e.g. \"UPDATED today, #4271, Code review\"). */\n subtitle: string;\n /** 3-line description block. Empty string renders the fallback. */\n description: string;\n /** Fallback copy when `description` is empty. Defaults to a generic\n * string; ticket / delivery surfaces override. */\n emptyDescription?: string;\n /** Right column — caller renders its own stacked badges. */\n rightBadges: ReactNode;\n}\n\nexport function DevCardRowContent({\n title,\n subtitle,\n description,\n emptyDescription = 'No description provided',\n rightBadges,\n}: DevCardRowContentProps) {\n return (\n <div className=\"flex flex-col md:flex-row items-start justify-between gap-[12px] md:gap-[16px] w-full\">\n <div className=\"flex-1 min-w-0 w-full md:w-auto flex flex-col gap-[12px] md:gap-[16px]\">\n <div className=\"min-h-[24px] flex items-center\">\n <h3 className=\"text-h3 text-ods-text-primary tracking-[-0.36px] flex-1 line-clamp-2 md:truncate break-words\">\n {title}\n </h3>\n </div>\n <div className=\"min-h-[20px] flex items-center\">\n <p className=\"text-h5 text-ods-text-secondary uppercase tracking-[-0.28px] truncate\">\n {subtitle}\n </p>\n </div>\n <div className=\"min-h-[72px] flex items-center\">\n <p className=\"text-h4 text-ods-text-secondary line-clamp-3 break-words\">\n {description || emptyDescription}\n </p>\n </div>\n </div>\n <div className=\"flex-shrink-0 self-start flex flex-col gap-2\">\n {rightBadges}\n </div>\n </div>\n );\n}\n\n/**\n * Skeleton rendering for a single row — the bars mirror the same\n * min-heights as `DevCardRowContent` so the loading→loaded swap\n * doesn't reflow.\n */\nexport function DevCardRowSkeleton() {\n return (\n <div className=\"border-b border-ods-border last:border-b-0 p-[12px] md:p-[16px]\">\n <div className=\"flex flex-col md:flex-row items-start justify-between gap-[12px] md:gap-[16px] w-full\">\n <div className=\"flex-1 min-w-0 w-full md:w-auto flex flex-col gap-[12px] md:gap-[16px]\">\n <div className=\"min-h-[24px] flex items-center\">\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-full\" />\n </div>\n <div className=\"min-h-[20px] flex items-center\">\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-1/2\" />\n </div>\n <div className=\"min-h-[72px] flex items-center\">\n <div className=\"flex-1 space-y-1\">\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-full\" />\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-full\" />\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-2/3\" />\n </div>\n </div>\n </div>\n <div className=\"flex-shrink-0 self-start flex flex-col gap-2\">\n <div className=\"h-[32px] w-[100px] bg-ods-border rounded animate-pulse\" />\n <div className=\"h-[32px] w-[120px] bg-ods-border rounded animate-pulse\" />\n </div>\n </div>\n </div>\n );\n}\n\n/**\n * The standard \"5 skeleton rows inside a bordered card\" loading state\n * used by every list shell. Both delivery (`delivery-table.tsx`) and\n * tickets (`tickets-list.tsx`) mount this directly.\n */\nexport function DevCardRowSkeletonList({ rows = 5 }: { rows?: number }) {\n return (\n <div className=\"bg-ods-card border border-ods-border rounded-[6px] overflow-hidden w-full\">\n {Array.from({ length: rows }, (_, i) => (\n <DevCardRowSkeleton key={i} />\n ))}\n </div>\n );\n}\n","'use client'\n\n/**\n * `<DeliveryRow />` — canonical single-row presentation for a ClickUp\n * delivery item.\n *\n * Single source of truth: both the `/bug-fixes-and-enhancements` page\n * (via `DeliveryTable`) AND the linked-delivery card on a HubSpot ticket\n * (via `TicketLinkedDeliveryCard`) compose this primitive. Visual parity\n * across those two surfaces is the design goal — the user reads the\n * card on their ticket and recognises it as a row from the public\n * delivery list.\n *\n * Behaviors:\n * - `href` set → outer element is an `<a>`, the whole row becomes\n * clickable (used by the linked-card surface to deep-link into\n * `/bug-fixes-and-enhancements?focus=<id>`).\n * - `id` set → outer element gets that DOM id so the consuming page\n * can `scrollIntoView` to it when the URL carries `?focus=<id>`.\n * - `highlighted` true → brief accent border + background pulse\n * (`animate-flash-focus` keyframe defined in `tailwind.config.ts`).\n * - `caption` set → small uppercase label rendered above the title\n * (\"LINKED DELIVERY\" on the ticket-side variant). Omitted on the\n * standard list rendering.\n */\n\nimport * as React from 'react'\nimport Link from '../../../embed-shims/next-link'\nimport { StatusBadge } from '../../ui/status-badge'\nimport { getStatusColorScheme } from '../../../utils'\nimport {\n type DeliveryItem,\n TASK_TYPE_LABELS,\n TASK_TYPE_TEXT_COLORS,\n} from '../../../types/delivery'\nimport { cn } from '../../../utils/cn'\n\n/** Same heuristic as DeliveryTable's local helper. Inlined so the row\n * primitive owns its complete rendering contract. */\nfunction getRelativeTime(timestamp: number): string {\n const now = Date.now()\n const diff = now - timestamp\n const days = Math.floor(diff / (1000 * 60 * 60 * 24))\n const weeks = Math.floor(days / 7)\n const months = Math.floor(days / 30)\n if (months > 0) return months === 1 ? 'last month' : `${months} months ago`\n if (weeks > 0) return weeks === 1 ? 'last week' : `${weeks} weeks ago`\n if (days > 0) return days === 1 ? 'yesterday' : `${days} days ago`\n return 'today'\n}\n\nexport interface DeliveryRowProps {\n item: DeliveryItem\n /** When set, the row becomes a clickable anchor. The ticket-side\n * linked-card composes this from `buildDevSectionUrl('delivery', id)`\n * which carries `?search=<id>` — the delivery list filters to that\n * exact task on landing (canonical deep-link mechanism, same one\n * the chat-inline delivery card uses). */\n href?: string\n /** Small uppercase caption rendered above the title. Used by the\n * linked-delivery card variant (\"LINKED DELIVERY\"). */\n caption?: string\n /** DOM `id` applied to the row's outer element. `DeliveryTable`\n * always sets `delivery-<external_id>` so chat-card deep-links\n * (`?search=<id>#delivery-<id>`) and the ticket linked-card path\n * both have a target for `useScrollToHash` to scroll to. Always\n * paired with `scroll-mt-24` on the outer element so the row lands\n * BELOW the sticky chrome after the scroll. */\n id?: string\n className?: string\n}\n\nexport function DeliveryRow({\n item,\n href,\n caption,\n id,\n className,\n}: DeliveryRowProps) {\n const taskType = item.taskType as keyof typeof TASK_TYPE_LABELS\n const typeBadgeLabel = TASK_TYPE_LABELS[taskType] || 'TASK'\n const typeBadgeTextColor = TASK_TYPE_TEXT_COLORS[taskType] || ''\n const statusBadgeScheme = getStatusColorScheme(item.status)\n const relativeTime = getRelativeTime(item.dateUpdated)\n const subtitle = `ACTIVE ${relativeTime}${item.listNames.length > 0 ? `, ${item.listNames.join(', ')}` : ''}, ${item.id}`\n\n const inner = (\n <div className=\"flex flex-col md:flex-row items-start justify-between gap-[12px] md:gap-[16px] w-full\">\n {/* Left: caption (optional) + title + subtitle + description */}\n <div className=\"flex-1 min-w-0 w-full md:w-auto flex flex-col gap-[12px] md:gap-[16px]\">\n {caption && (\n <p className=\"text-xs font-medium uppercase tracking-wider text-ods-text-secondary\">\n {caption}\n </p>\n )}\n <div className=\"min-h-[24px] md:min-h-[24px] flex items-center\">\n <h3 className=\"text-h3 text-ods-text-primary tracking-[-0.36px] flex-1 line-clamp-2 md:truncate break-words\">\n {item.title}\n </h3>\n </div>\n <div className=\"min-h-[20px] flex items-center\">\n <p className=\"text-h5 text-ods-text-secondary uppercase tracking-[-0.28px] truncate\">\n {subtitle}\n </p>\n </div>\n <div className=\"min-h-[72px] flex items-center\">\n <p className=\"text-h4 text-ods-text-secondary line-clamp-3 break-words\">\n {item.description || 'No description provided'}\n </p>\n </div>\n </div>\n\n {/* Right: status + task-type badges */}\n <div className=\"flex-shrink-0 self-start flex flex-col gap-2\">\n <StatusBadge\n text={item.status.toUpperCase()}\n colorScheme={statusBadgeScheme}\n variant=\"card\"\n className=\"border border-ods-border\"\n />\n <StatusBadge\n text={typeBadgeLabel}\n variant=\"card\"\n className={`border border-ods-border ${typeBadgeTextColor}`}\n />\n </div>\n </div>\n )\n\n const baseClass = cn(\n 'block p-[12px] md:p-[16px] no-underline text-inherit transition-colors duration-150',\n // `scroll-mt-24` is paid for whether `id` is set or not (it's a\n // single Tailwind utility, no runtime cost). Keeping it\n // unconditional means a future caller adding `id` doesn't also\n // have to remember to ask for the offset.\n 'scroll-mt-24',\n href && 'hover:bg-ods-bg-hover cursor-pointer',\n className,\n )\n\n if (href) {\n // `Link` is the env-aware embed-shim — delegates to `next/link` on\n // a Next.js host (soft RSC nav, back-button restores the previous\n // page's React state intact), falls back to a plain `<a>` on\n // non-Next embedders. A raw `<a href>` was hard-navigating +\n // losing TanStack-Query state on back, leaving /tickets stuck on\n // its skeleton.\n return (\n <Link href={href} id={id} className={baseClass} prefetch={false}>\n {inner}\n </Link>\n )\n }\n\n return <div id={id} className={baseClass}>{inner}</div>\n}\n"]}
@@ -1,78 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Page-header primitive — the canonical "back-button + title + subtitle
4
- * + (optional) image / actions" chrome every lib page uses.
5
- *
6
- * Owns the SSOT for the page-header DOM/CSS that the rest of the lib
7
- * was duplicating: pre-`mb` top padding, h1 typography (`text-h2`), h6
8
- * subtitle (`text-h6`), the gap between the back button and the title
9
- * block, and the right-side actions slot. Consumers either render this
10
- * directly (e.g. `<DocViewer>` / `<DocsHubPage>`) or compose it through
11
- * the `<TitleBlock>` adapter which adds the `PageActions` /
12
- * `ActionsMenu` / selector wiring on top.
13
- *
14
- * Why this exists: knowledge-hub vs releases sat at different vertical
15
- * rhythms (px-perfect mismatch on title baseline + subtitle offset)
16
- * because the docs surface hand-rolled its own chrome instead of going
17
- * through `TitleBlock`. Centralizing the layout here means every
18
- * embeddable lib page (DocViewer, DevSectionPage, LegalDocumentPage,
19
- * OnboardingGuideDetailView) renders pixel-identical title/subtitle/
20
- * back-button typography + spacing — and a future spacing/typography
21
- * tweak is one file.
22
- */
23
- export interface PageHeaderProps {
24
- /** Page title (h1). Plain string — ReactNode is intentionally not
25
- * supported here so every consumer renders the same typography. */
26
- title?: string;
27
- /** Optional icon rendered inline before the title text (e.g. the
28
- * rocket emoji on /releases, the docs icon on /knowledge-base).
29
- * Same `flex items-center gap-3` row as `<DevSectionView>`'s hero. */
30
- titleIcon?: React.ReactNode;
31
- /** Page subtitle (description paragraph). */
32
- subtitle?: string;
33
- /**
34
- * Render a yellow accent dot (`.`) after the title. Mirrors the
35
- * hub's legacy `<AdminPageHeader accentDot>` flag — now lib-wide so
36
- * surfaces like `/knowledge-base` keep their existing accent styling
37
- * after the migration.
38
- */
39
- accentDot?: boolean;
40
- /** Optional thumbnail / hero image rendered to the left of the
41
- * title block. Used by entity-image-style headers (onboarding
42
- * guides, knowledge-base entries). */
43
- image?: {
44
- src: string;
45
- alt?: string;
46
- };
47
- /** Back-button shown above the title block. Hidden on mobile (matches
48
- * the existing TitleBlock + DocViewer behavior). */
49
- backButton?: {
50
- label?: string;
51
- onClick: () => void;
52
- };
53
- /** Right-side actions slot (action buttons / menu / tab selector).
54
- * Composed externally (e.g. `<TitleBlock>` builds `PageActions` + menu
55
- * + selector and passes the result here). */
56
- actions?: React.ReactNode;
57
- /**
58
- * Visual variant.
59
- * - `plain` (default): transparent background, no border.
60
- * - `card`: card background, border, and padding on mobile only —
61
- * collapses to plain on md+ (legacy `TitleBlock` variant — kept so
62
- * surfaces that depend on the card affordance don't regress).
63
- */
64
- variant?: 'plain' | 'card';
65
- /** When the consumer wraps `<PageHeader>` in its OWN spacing container
66
- * (e.g. `<DevSectionView>`'s `gap-10 flex-col`), the default `mb-l`
67
- * bottom margin doubles up. Pass `noBottomMargin` to opt out. */
68
- noBottomMargin?: boolean;
69
- /** Same as `noBottomMargin` for the default `pt-l` top padding. Set
70
- * this when PageHeader is nested INSIDE another layout that already
71
- * provides top spacing (e.g. `<DevSectionView>`'s hero, which sits
72
- * inside `<PageLayout>`'s children flow). */
73
- noTopPadding?: boolean;
74
- className?: string;
75
- }
76
- export declare function PageHeader({ title, titleIcon, subtitle, accentDot, image, backButton, actions, variant, noBottomMargin, noTopPadding, className, }: PageHeaderProps): React.JSX.Element;
77
- export default PageHeader;
78
- //# sourceMappingURL=page-header.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../../src/components/layout/page-header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,eAAe;IAC9B;wEACoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;2EAEuE;IACvE,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;2CAEuC;IACvC,KAAK,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACrC;yDACqD;IACrD,UAAU,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAA;IACpD;;kDAE8C;IAC9C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B;;sEAEkE;IAClE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;kDAG8C;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAmBD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAU,EACV,OAAO,EACP,OAAiB,EACjB,cAAsB,EACtB,YAAoB,EACpB,SAAS,GACV,EAAE,eAAe,qBA0EjB;AAED,eAAe,UAAU,CAAA"}
@@ -1,67 +0,0 @@
1
- import React from 'react';
2
- import { type PageHeaderProps } from './page-header';
3
- /**
4
- * `<PageWithHeader>` — the canonical 4-layer unified-chrome wrapper that
5
- * every public lib/hub page now uses (Knowledge Hub, Roadmap, FAQs,
6
- * Authors, Blog, Vendors, Case Studies, Interviews, Investor Updates,
7
- * /webinars-/podcasts-/events, hub admin-but-public pages, …).
8
- *
9
- * Renders the same JSX tree every consumer was hand-rolling individually
10
- * before this helper landed:
11
- *
12
- * PageShell ← bg-ods-bg, max-w-[1920px],
13
- * page-shell-px/pt/pb gutters
14
- * PageLayout backButton ← TitleBlock → PageHeader #1 (back-btn row
15
- * only, pt-l + mb-l)
16
- * div.w-full.flex-col.gap-10 ← matches DevSectionView's hero container
17
- * PageHeader title/subtitle ← PageHeader #2 (noTopPadding +
18
- * titleIcon accentDot noBottomMargin so PageLayout's gap-l owns
19
- * noTopPadding the spacing between #1 and #2)
20
- * noBottomMargin
21
- * children ← page-specific body (search, lists, forms)
22
- *
23
- * Why this exists: 15+ pages copy-pasted the EXACT same nesting + the
24
- * EXACT same `noTopPadding + noBottomMargin + accentDot` triplet on the
25
- * inner `<PageHeader>`. Forgetting one of those flags collapsed the gap
26
- * to ~8px (the FAQs-vs-Onboarding-Guides bug). Centralizing the chain
27
- * here makes the spacing invariant compiler-enforced — consumers can't
28
- * pick the wrong combination.
29
- *
30
- * **Back button is config-driven by default.** Consumers don't have to
31
- * thread `useRouter()` + `() => router.push('/')` themselves anymore —
32
- * the helper supplies a sane default (`{ label: 'Back to home', href: '/' }`).
33
- * Hosts whose `/` lives elsewhere should pass their own `href`. Pass
34
- * `backButton={false}` to suppress entirely (the lib's own
35
- * `<DocsHubPage>` does this on the platform-home docs landing).
36
- */
37
- export interface PageWithHeaderProps {
38
- /** Title — passed straight to inner `<PageHeader>`. */
39
- title?: string;
40
- /** Inline icon rendered before the title (lucide / SVG node). Wrap with
41
- * `SECTION_HERO_ICON_CLASS` at the call site, or use the lib's
42
- * `<PageHeader>`'s `titleIcon` ReactNode signature directly. */
43
- titleIcon?: PageHeaderProps['titleIcon'];
44
- /** Subtitle (1-2 lines, auto-clamped to 2 + min-h-[56px]). */
45
- subtitle?: string;
46
- /** Render yellow accent dot after the title (default true — matches every
47
- * unified surface). Pass `false` to opt out. */
48
- accentDot?: boolean;
49
- /** Back-button config. Defaults to `{ label: 'Back to home', href: '/' }`.
50
- * Pass `false` to hide entirely (platform-home docs landings). */
51
- backButton?: {
52
- label?: string;
53
- href?: string;
54
- } | false;
55
- /** Optional image (entity-image-style — onboarding guides etc.). */
56
- image?: PageHeaderProps['image'];
57
- /** Optional actions slot (right side of header). */
58
- actions?: React.ReactNode;
59
- /** Page body — search bars, lists, forms, sections. Rendered INSIDE the
60
- * gap-10 flex column so it shares gutters + vertical rhythm with the
61
- * header. */
62
- children: React.ReactNode;
63
- /** Extra class applied to the gap-10 content wrapper. */
64
- contentClassName?: string;
65
- }
66
- export declare function PageWithHeader({ title, titleIcon, subtitle, accentDot, backButton, image, actions, children, contentClassName, }: PageWithHeaderProps): React.JSX.Element;
67
- //# sourceMappingURL=page-with-header.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-with-header.d.ts","sourceRoot":"","sources":["../../../src/components/layout/page-with-header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;qEAEiE;IACjE,SAAS,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACxC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;qDACiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;uEACmE;IACnE,UAAU,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,KAAK,CAAA;IACtD,oEAAoE;IACpE,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;IAChC,oDAAoD;IACpD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB;;kBAEc;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,SAAS,EACT,QAAQ,EACR,SAAgB,EAChB,UAAU,EACV,KAAK,EACL,OAAO,EACP,QAAQ,EACR,gBAAgB,GACjB,EAAE,mBAAmB,qBA8BrB"}
@@ -1,182 +0,0 @@
1
- 'use client'
2
-
3
- import React from 'react'
4
- import { cn } from '../../utils/cn'
5
- import { EntityImage } from '../ui/entity-image'
6
- import { BackButton } from './back-button'
7
-
8
- /**
9
- * Page-header primitive — the canonical "back-button + title + subtitle
10
- * + (optional) image / actions" chrome every lib page uses.
11
- *
12
- * Owns the SSOT for the page-header DOM/CSS that the rest of the lib
13
- * was duplicating: pre-`mb` top padding, h1 typography (`text-h2`), h6
14
- * subtitle (`text-h6`), the gap between the back button and the title
15
- * block, and the right-side actions slot. Consumers either render this
16
- * directly (e.g. `<DocViewer>` / `<DocsHubPage>`) or compose it through
17
- * the `<TitleBlock>` adapter which adds the `PageActions` /
18
- * `ActionsMenu` / selector wiring on top.
19
- *
20
- * Why this exists: knowledge-hub vs releases sat at different vertical
21
- * rhythms (px-perfect mismatch on title baseline + subtitle offset)
22
- * because the docs surface hand-rolled its own chrome instead of going
23
- * through `TitleBlock`. Centralizing the layout here means every
24
- * embeddable lib page (DocViewer, DevSectionPage, LegalDocumentPage,
25
- * OnboardingGuideDetailView) renders pixel-identical title/subtitle/
26
- * back-button typography + spacing — and a future spacing/typography
27
- * tweak is one file.
28
- */
29
- export interface PageHeaderProps {
30
- /** Page title (h1). Plain string — ReactNode is intentionally not
31
- * supported here so every consumer renders the same typography. */
32
- title?: string
33
- /** Optional icon rendered inline before the title text (e.g. the
34
- * rocket emoji on /releases, the docs icon on /knowledge-base).
35
- * Same `flex items-center gap-3` row as `<DevSectionView>`'s hero. */
36
- titleIcon?: React.ReactNode
37
- /** Page subtitle (description paragraph). */
38
- subtitle?: string
39
- /**
40
- * Render a yellow accent dot (`.`) after the title. Mirrors the
41
- * hub's legacy `<AdminPageHeader accentDot>` flag — now lib-wide so
42
- * surfaces like `/knowledge-base` keep their existing accent styling
43
- * after the migration.
44
- */
45
- accentDot?: boolean
46
- /** Optional thumbnail / hero image rendered to the left of the
47
- * title block. Used by entity-image-style headers (onboarding
48
- * guides, knowledge-base entries). */
49
- image?: { src: string; alt?: string }
50
- /** Back-button shown above the title block. Hidden on mobile (matches
51
- * the existing TitleBlock + DocViewer behavior). */
52
- backButton?: { label?: string; onClick: () => void }
53
- /** Right-side actions slot (action buttons / menu / tab selector).
54
- * Composed externally (e.g. `<TitleBlock>` builds `PageActions` + menu
55
- * + selector and passes the result here). */
56
- actions?: React.ReactNode
57
- /**
58
- * Visual variant.
59
- * - `plain` (default): transparent background, no border.
60
- * - `card`: card background, border, and padding on mobile only —
61
- * collapses to plain on md+ (legacy `TitleBlock` variant — kept so
62
- * surfaces that depend on the card affordance don't regress).
63
- */
64
- variant?: 'plain' | 'card'
65
- /** When the consumer wraps `<PageHeader>` in its OWN spacing container
66
- * (e.g. `<DevSectionView>`'s `gap-10 flex-col`), the default `mb-l`
67
- * bottom margin doubles up. Pass `noBottomMargin` to opt out. */
68
- noBottomMargin?: boolean
69
- /** Same as `noBottomMargin` for the default `pt-l` top padding. Set
70
- * this when PageHeader is nested INSIDE another layout that already
71
- * provides top spacing (e.g. `<DevSectionView>`'s hero, which sits
72
- * inside `<PageLayout>`'s children flow). */
73
- noTopPadding?: boolean
74
- className?: string
75
- }
76
-
77
- // Title typography — copied verbatim from <DevSectionView>'s hero h1
78
- // (`src/components/shared/dev-section/dev-section-view.tsx`). The user-
79
- // reported "header text not aligned" between /knowledge-base and
80
- // /releases bottomed out here: DevSectionView rendered text-h1 with
81
- // tracking-[-1.12px] while this component used text-h2 — visually huge
82
- // gap. Now both render through the exact same class string. DevSectionView
83
- // is being refactored in this commit to delegate to <PageHeader> so the
84
- // shared-component claim is enforced at the code level too.
85
- const TITLE_CLASS = 'text-h1 tracking-[-1.12px] text-ods-text-primary flex items-center gap-3'
86
- // Subtitle ALWAYS occupies exactly 2 lines of vertical space.
87
- // `min-h-[56px]` (= 2 × 28px leading) reserves the row height so a
88
- // single-line subtitle doesn't shrink the header — page-to-page height
89
- // stays consistent.
90
- // `line-clamp-2` caps long copy at 2 lines + ellipsis so wrapping doesn't
91
- // push the search bar down.
92
- const SUBTITLE_CLASS = "font-['DM_Sans'] font-medium text-[18px] leading-[28px] text-ods-text-secondary max-w-3xl line-clamp-2 min-h-[56px]"
93
-
94
- export function PageHeader({
95
- title,
96
- titleIcon,
97
- subtitle,
98
- accentDot,
99
- image,
100
- backButton,
101
- actions,
102
- variant = 'plain',
103
- noBottomMargin = false,
104
- noTopPadding = false,
105
- className,
106
- }: PageHeaderProps) {
107
- return (
108
- <div
109
- className={cn(
110
- 'flex items-end justify-between gap-[var(--spacing-system-m)]',
111
- 'md:flex-col md:items-start md:justify-start lg:flex-row lg:items-end lg:justify-between',
112
- !noTopPadding && 'pt-[var(--spacing-system-l)]',
113
- variant === 'card'
114
- ? cn(
115
- 'bg-ods-card border-b border-ods-border',
116
- 'px-[var(--spacing-system-l)] pb-[var(--spacing-system-l)]',
117
- 'md:bg-transparent md:border-b-0',
118
- 'md:px-0 md:pb-0',
119
- !noBottomMargin && 'md:mb-[var(--spacing-system-l)]',
120
- )
121
- : !noBottomMargin && 'mb-[var(--spacing-system-l)]',
122
- className,
123
- )}
124
- >
125
- <div className="flex flex-col gap-[var(--spacing-system-xs)] flex-1 min-w-0">
126
- {backButton && (
127
- <BackButton
128
- onClick={backButton.onClick}
129
- label={backButton.label}
130
- className="hidden md:inline-flex"
131
- />
132
- )}
133
- {/* Title + subtitle stack. Matches `<DevSectionView>`'s hero
134
- * exactly: `space-y-4` between h1 and p, `flex items-center
135
- * gap-3` for icon-inline title row, identical class strings.
136
- * Image (entity-image-style) prefixes the title row, NOT a
137
- * separate column with its own vertical rhythm — that's the
138
- * legacy TitleBlock 2-col layout which broke the title-to-
139
- * subtitle gap. */}
140
- {(title || subtitle || image || titleIcon) && (
141
- <div className="space-y-4">
142
- {(title || image || titleIcon) && (
143
- <h1 className={TITLE_CLASS}>
144
- {image && (
145
- <EntityImage
146
- src={image.src}
147
- alt={image.alt}
148
- fallbackText={image.alt || title}
149
- />
150
- )}
151
- {titleIcon}
152
- {title && (
153
- <span>
154
- {title}
155
- {accentDot && <span className="text-ods-accent">.</span>}
156
- </span>
157
- )}
158
- </h1>
159
- )}
160
- {(title || titleIcon || image) && (
161
- // Always render the subtitle <p> when the title block exists,
162
- // even when `subtitle` is empty — `SUBTITLE_CLASS` reserves
163
- // `min-h-[56px]` so headers WITH and WITHOUT subtitles share a
164
- // baseline (the JSDoc on SUBTITLE_CLASS claims "ALWAYS occupies
165
- // exactly 2 lines"; gating the <p> on truthy `subtitle` broke
166
- // that contract — pages without subtitle were ~56px shorter).
167
- // Falsy subtitles render an NBSP placeholder so the empty <p>
168
- // still takes its reserved height.
169
- <p className={SUBTITLE_CLASS}>{subtitle || ' '}</p>
170
- )}
171
- </div>
172
- )}
173
- </div>
174
-
175
- {actions && (
176
- <div className="flex gap-2 items-center shrink-0">{actions}</div>
177
- )}
178
- </div>
179
- )
180
- }
181
-
182
- export default PageHeader
@@ -1,110 +0,0 @@
1
- 'use client'
2
-
3
- import React from 'react'
4
- import { useRouter } from '../../embed-shims/next-navigation'
5
- import { PageShell } from './article-detail-layout'
6
- import { PageLayout } from './page-layout'
7
- import { PageHeader, type PageHeaderProps } from './page-header'
8
-
9
- /**
10
- * `<PageWithHeader>` — the canonical 4-layer unified-chrome wrapper that
11
- * every public lib/hub page now uses (Knowledge Hub, Roadmap, FAQs,
12
- * Authors, Blog, Vendors, Case Studies, Interviews, Investor Updates,
13
- * /webinars-/podcasts-/events, hub admin-but-public pages, …).
14
- *
15
- * Renders the same JSX tree every consumer was hand-rolling individually
16
- * before this helper landed:
17
- *
18
- * PageShell ← bg-ods-bg, max-w-[1920px],
19
- * page-shell-px/pt/pb gutters
20
- * PageLayout backButton ← TitleBlock → PageHeader #1 (back-btn row
21
- * only, pt-l + mb-l)
22
- * div.w-full.flex-col.gap-10 ← matches DevSectionView's hero container
23
- * PageHeader title/subtitle ← PageHeader #2 (noTopPadding +
24
- * titleIcon accentDot noBottomMargin so PageLayout's gap-l owns
25
- * noTopPadding the spacing between #1 and #2)
26
- * noBottomMargin
27
- * children ← page-specific body (search, lists, forms)
28
- *
29
- * Why this exists: 15+ pages copy-pasted the EXACT same nesting + the
30
- * EXACT same `noTopPadding + noBottomMargin + accentDot` triplet on the
31
- * inner `<PageHeader>`. Forgetting one of those flags collapsed the gap
32
- * to ~8px (the FAQs-vs-Onboarding-Guides bug). Centralizing the chain
33
- * here makes the spacing invariant compiler-enforced — consumers can't
34
- * pick the wrong combination.
35
- *
36
- * **Back button is config-driven by default.** Consumers don't have to
37
- * thread `useRouter()` + `() => router.push('/')` themselves anymore —
38
- * the helper supplies a sane default (`{ label: 'Back to home', href: '/' }`).
39
- * Hosts whose `/` lives elsewhere should pass their own `href`. Pass
40
- * `backButton={false}` to suppress entirely (the lib's own
41
- * `<DocsHubPage>` does this on the platform-home docs landing).
42
- */
43
- export interface PageWithHeaderProps {
44
- /** Title — passed straight to inner `<PageHeader>`. */
45
- title?: string
46
- /** Inline icon rendered before the title (lucide / SVG node). Wrap with
47
- * `SECTION_HERO_ICON_CLASS` at the call site, or use the lib's
48
- * `<PageHeader>`'s `titleIcon` ReactNode signature directly. */
49
- titleIcon?: PageHeaderProps['titleIcon']
50
- /** Subtitle (1-2 lines, auto-clamped to 2 + min-h-[56px]). */
51
- subtitle?: string
52
- /** Render yellow accent dot after the title (default true — matches every
53
- * unified surface). Pass `false` to opt out. */
54
- accentDot?: boolean
55
- /** Back-button config. Defaults to `{ label: 'Back to home', href: '/' }`.
56
- * Pass `false` to hide entirely (platform-home docs landings). */
57
- backButton?: { label?: string; href?: string } | false
58
- /** Optional image (entity-image-style — onboarding guides etc.). */
59
- image?: PageHeaderProps['image']
60
- /** Optional actions slot (right side of header). */
61
- actions?: React.ReactNode
62
- /** Page body — search bars, lists, forms, sections. Rendered INSIDE the
63
- * gap-10 flex column so it shares gutters + vertical rhythm with the
64
- * header. */
65
- children: React.ReactNode
66
- /** Extra class applied to the gap-10 content wrapper. */
67
- contentClassName?: string
68
- }
69
-
70
- export function PageWithHeader({
71
- title,
72
- titleIcon,
73
- subtitle,
74
- accentDot = true,
75
- backButton,
76
- image,
77
- actions,
78
- children,
79
- contentClassName,
80
- }: PageWithHeaderProps) {
81
- const router = useRouter()
82
-
83
- const backCfg =
84
- backButton === false
85
- ? undefined
86
- : {
87
- label: backButton?.label ?? 'Back to home',
88
- onClick: () => router.push(backButton?.href ?? '/'),
89
- }
90
-
91
- return (
92
- <PageShell>
93
- <PageLayout backButton={backCfg}>
94
- <div className={`w-full flex flex-col gap-10${contentClassName ? ` ${contentClassName}` : ''}`}>
95
- <PageHeader
96
- title={title}
97
- titleIcon={titleIcon}
98
- subtitle={subtitle}
99
- accentDot={accentDot}
100
- image={image}
101
- actions={actions}
102
- noTopPadding
103
- noBottomMargin
104
- />
105
- {children}
106
- </div>
107
- </PageLayout>
108
- </PageShell>
109
- )
110
- }