@flamingo-stack/openframe-frontend-core 0.0.679 → 0.0.680-snapshot.20260929023516

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 (120) hide show
  1. package/dist/{chunk-OV6YSKMP.cjs → chunk-2UTUZGMF.cjs} +17 -8
  2. package/dist/chunk-2UTUZGMF.cjs.map +1 -0
  3. package/dist/{chunk-25Y3UR3R.cjs → chunk-3YWZNB2S.cjs} +3 -3
  4. package/dist/{chunk-25Y3UR3R.cjs.map → chunk-3YWZNB2S.cjs.map} +1 -1
  5. package/dist/{chunk-UKZAW4FE.js → chunk-4DA64VEW.js} +3 -3
  6. package/dist/{chunk-HA3SBMR2.cjs → chunk-4NUKFUPW.cjs} +7 -7
  7. package/dist/{chunk-HA3SBMR2.cjs.map → chunk-4NUKFUPW.cjs.map} +1 -1
  8. package/dist/{chunk-TKL5JKZS.cjs → chunk-757VTCIH.cjs} +6 -6
  9. package/dist/{chunk-TKL5JKZS.cjs.map → chunk-757VTCIH.cjs.map} +1 -1
  10. package/dist/{chunk-ICGGFQQU.js → chunk-7OZ5P7Z2.js} +4 -4
  11. package/dist/{chunk-QU7SDFKO.cjs → chunk-AHXAD26W.cjs} +61 -61
  12. package/dist/{chunk-QU7SDFKO.cjs.map → chunk-AHXAD26W.cjs.map} +1 -1
  13. package/dist/{chunk-CTF5IQQZ.js → chunk-BGHQW5D5.js} +17 -8
  14. package/dist/chunk-BGHQW5D5.js.map +1 -0
  15. package/dist/{chunk-UL2TY6GY.cjs → chunk-BOM6MMWB.cjs} +3 -3
  16. package/dist/{chunk-UL2TY6GY.cjs.map → chunk-BOM6MMWB.cjs.map} +1 -1
  17. package/dist/{chunk-CDMZOXS7.js → chunk-C5RRTWYW.js} +19 -13
  18. package/dist/{chunk-CDMZOXS7.js.map → chunk-C5RRTWYW.js.map} +1 -1
  19. package/dist/{chunk-EEL4RGHX.js → chunk-D5QSGV3I.js} +2 -2
  20. package/dist/{chunk-6LN7ZNHT.js → chunk-DIWJ6NBT.js} +2 -2
  21. package/dist/{chunk-IPZCEAAH.js → chunk-EWZPMPQP.js} +2 -2
  22. package/dist/{chunk-CY3XHQM3.cjs → chunk-F7EZBJTL.cjs} +3 -3
  23. package/dist/{chunk-CY3XHQM3.cjs.map → chunk-F7EZBJTL.cjs.map} +1 -1
  24. package/dist/{chunk-UAPSU6YW.cjs → chunk-FRXIDN6T.cjs} +3 -3
  25. package/dist/{chunk-UAPSU6YW.cjs.map → chunk-FRXIDN6T.cjs.map} +1 -1
  26. package/dist/{chunk-XSSYG7KU.js → chunk-JV7SNSYT.js} +5 -5
  27. package/dist/{chunk-NQCID4VF.js → chunk-KLLH632Q.js} +7 -7
  28. package/dist/{chunk-HTNUTEXN.cjs → chunk-KQXKQ4PX.cjs} +17 -17
  29. package/dist/{chunk-HTNUTEXN.cjs.map → chunk-KQXKQ4PX.cjs.map} +1 -1
  30. package/dist/{chunk-3LW6AJMJ.cjs → chunk-KSDOCJ7B.cjs} +45 -45
  31. package/dist/{chunk-3LW6AJMJ.cjs.map → chunk-KSDOCJ7B.cjs.map} +1 -1
  32. package/dist/{chunk-XRQKJ22I.cjs → chunk-NMXL34Z2.cjs} +4 -4
  33. package/dist/{chunk-XRQKJ22I.cjs.map → chunk-NMXL34Z2.cjs.map} +1 -1
  34. package/dist/{chunk-FN7DMNA4.js → chunk-Q76YVNCQ.js} +4 -4
  35. package/dist/chunk-Q76YVNCQ.js.map +1 -0
  36. package/dist/{chunk-KNPUHPIF.cjs → chunk-QFGPSBAX.cjs} +33 -33
  37. package/dist/{chunk-KNPUHPIF.cjs.map → chunk-QFGPSBAX.cjs.map} +1 -1
  38. package/dist/{chunk-M7ILWHDA.js → chunk-RF2EYX3B.js} +2 -2
  39. package/dist/{chunk-CGYFCEHM.cjs → chunk-RNRAPL6V.cjs} +13 -13
  40. package/dist/{chunk-CGYFCEHM.cjs.map → chunk-RNRAPL6V.cjs.map} +1 -1
  41. package/dist/{chunk-GZIYE35W.cjs → chunk-RSDTLURW.cjs} +30 -24
  42. package/dist/chunk-RSDTLURW.cjs.map +1 -0
  43. package/dist/{chunk-L4NLXAET.js → chunk-S3OS6FIM.js} +3 -3
  44. package/dist/{chunk-RJYYGWJL.cjs → chunk-SJC2XUTE.cjs} +21 -21
  45. package/dist/{chunk-RJYYGWJL.cjs.map → chunk-SJC2XUTE.cjs.map} +1 -1
  46. package/dist/{chunk-4ZKZSWX4.js → chunk-ULOUTQBX.js} +3 -3
  47. package/dist/{chunk-ZB34GLOZ.cjs → chunk-UOZXREDM.cjs} +44 -44
  48. package/dist/{chunk-ZB34GLOZ.cjs.map → chunk-UOZXREDM.cjs.map} +1 -1
  49. package/dist/{chunk-2YMFBKYR.js → chunk-V4L2MYXY.js} +2 -2
  50. package/dist/{chunk-HLMMG6Q7.js → chunk-VKTQQ7TS.js} +7 -7
  51. package/dist/{chunk-ZRN244JV.js → chunk-WTNFYZB6.js} +2 -2
  52. package/dist/{chunk-FUBOKAYO.js → chunk-YC7DIARJ.js} +4 -4
  53. package/dist/{chunk-7WGUMITJ.js → chunk-YDJBSKLB.js} +3 -3
  54. package/dist/{chunk-MGSWL3L3.cjs → chunk-YFU7BULM.cjs} +23 -23
  55. package/dist/{chunk-MGSWL3L3.cjs.map → chunk-YFU7BULM.cjs.map} +1 -1
  56. package/dist/{chunk-H27EHTLX.cjs → chunk-ZFQ3ZHMR.cjs} +3 -3
  57. package/dist/{chunk-H27EHTLX.cjs.map → chunk-ZFQ3ZHMR.cjs.map} +1 -1
  58. package/dist/components/case-studies/index.cjs +13 -13
  59. package/dist/components/case-studies/index.js +3 -3
  60. package/dist/components/contact/index.cjs +4 -4
  61. package/dist/components/contact/index.js +3 -3
  62. package/dist/components/docs/index.cjs +7 -7
  63. package/dist/components/docs/index.js +6 -6
  64. package/dist/components/embeds/index.cjs +4 -4
  65. package/dist/components/embeds/index.js +3 -3
  66. package/dist/components/empty-state.d.ts.map +1 -1
  67. package/dist/components/faq/index.cjs +4 -4
  68. package/dist/components/faq/index.js +3 -3
  69. package/dist/components/features/index.cjs +3 -3
  70. package/dist/components/features/index.js +2 -2
  71. package/dist/components/help-center-pages/index.cjs +54 -54
  72. package/dist/components/help-center-pages/index.js +16 -16
  73. package/dist/components/index.cjs +35 -35
  74. package/dist/components/index.js +15 -15
  75. package/dist/components/meeting-scheduler/index.cjs +33 -33
  76. package/dist/components/meeting-scheduler/index.js +4 -4
  77. package/dist/components/navigation/index.cjs +6 -6
  78. package/dist/components/navigation/index.js +5 -5
  79. package/dist/components/onboarding-guides/index.cjs +6 -6
  80. package/dist/components/onboarding-guides/index.js +5 -5
  81. package/dist/components/shared/onboarding/onboarding-walkthrough.d.ts +9 -1
  82. package/dist/components/shared/onboarding/onboarding-walkthrough.d.ts.map +1 -1
  83. package/dist/components/tickets/index.cjs +8 -8
  84. package/dist/components/tickets/index.js +7 -7
  85. package/dist/components/ui/index.cjs +3 -3
  86. package/dist/components/ui/index.js +2 -2
  87. package/dist/hooks/index.cjs +2 -2
  88. package/dist/hooks/index.js +1 -1
  89. package/dist/hooks/ui/use-onboarding-state.d.ts +1 -0
  90. package/dist/hooks/ui/use-onboarding-state.d.ts.map +1 -1
  91. package/dist/index.cjs +7 -7
  92. package/dist/index.js +6 -6
  93. package/dist/utils/onboarding-storage.d.ts +5 -0
  94. package/dist/utils/onboarding-storage.d.ts.map +1 -1
  95. package/package.json +1 -1
  96. package/src/components/__tests__/empty-state-cta.test.tsx +31 -0
  97. package/src/components/empty-state.tsx +5 -6
  98. package/src/components/shared/onboarding/onboarding-walkthrough.tsx +26 -10
  99. package/src/hooks/ui/use-onboarding-state.ts +8 -6
  100. package/src/utils/__tests__/onboarding-storage.test.ts +42 -0
  101. package/src/utils/onboarding-storage.ts +15 -1
  102. package/dist/chunk-CTF5IQQZ.js.map +0 -1
  103. package/dist/chunk-FN7DMNA4.js.map +0 -1
  104. package/dist/chunk-GZIYE35W.cjs.map +0 -1
  105. package/dist/chunk-OV6YSKMP.cjs.map +0 -1
  106. /package/dist/{chunk-UKZAW4FE.js.map → chunk-4DA64VEW.js.map} +0 -0
  107. /package/dist/{chunk-ICGGFQQU.js.map → chunk-7OZ5P7Z2.js.map} +0 -0
  108. /package/dist/{chunk-EEL4RGHX.js.map → chunk-D5QSGV3I.js.map} +0 -0
  109. /package/dist/{chunk-6LN7ZNHT.js.map → chunk-DIWJ6NBT.js.map} +0 -0
  110. /package/dist/{chunk-IPZCEAAH.js.map → chunk-EWZPMPQP.js.map} +0 -0
  111. /package/dist/{chunk-XSSYG7KU.js.map → chunk-JV7SNSYT.js.map} +0 -0
  112. /package/dist/{chunk-NQCID4VF.js.map → chunk-KLLH632Q.js.map} +0 -0
  113. /package/dist/{chunk-M7ILWHDA.js.map → chunk-RF2EYX3B.js.map} +0 -0
  114. /package/dist/{chunk-L4NLXAET.js.map → chunk-S3OS6FIM.js.map} +0 -0
  115. /package/dist/{chunk-4ZKZSWX4.js.map → chunk-ULOUTQBX.js.map} +0 -0
  116. /package/dist/{chunk-2YMFBKYR.js.map → chunk-V4L2MYXY.js.map} +0 -0
  117. /package/dist/{chunk-HLMMG6Q7.js.map → chunk-VKTQQ7TS.js.map} +0 -0
  118. /package/dist/{chunk-ZRN244JV.js.map → chunk-WTNFYZB6.js.map} +0 -0
  119. /package/dist/{chunk-FUBOKAYO.js.map → chunk-YC7DIARJ.js.map} +0 -0
  120. /package/dist/{chunk-7WGUMITJ.js.map → chunk-YDJBSKLB.js.map} +0 -0
@@ -125,13 +125,13 @@ function EmptyState({
125
125
  const displayTitle = title || defaultContent.title;
126
126
  const displayDescription = description || defaultContent.description;
127
127
  const smartCTA = ctaHref ? null : getSmartCTA();
128
- const ctaClassName = ctaVariant === "primary" ? "w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-body font-medium" : "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-body font-medium";
128
+ const ctaButtonVariant = ctaVariant === "primary" ? "accent" : "outline";
129
129
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center px-6 py-6 text-center md:py-16", children: [
130
130
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-3 flex items-center justify-center md:mb-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-full border border-ods-border bg-ods-card p-3 md:p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-8 w-8 items-center justify-center text-ods-text-secondary md:h-16 md:w-16", children: defaultContent.icon }) }) }),
131
131
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-ods-text-primary text-h3 md:mb-3", children: displayTitle }),
132
132
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 max-w-md text-ods-text-secondary text-h6 md:mb-8", children: displayDescription }),
133
- showCTA && ctaHref && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-3 w-full max-w-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { href: ctaHref, className: ctaClassName, children: ctaText || "Contact us" }) }),
134
- showCTA && !ctaHref && smartCTA && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-3 w-full max-w-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { onClick: smartCTA.action, className: ctaClassName, children: smartCTA.text }) }),
133
+ showCTA && ctaHref && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-3 w-full max-w-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { href: ctaHref, variant: ctaButtonVariant, className: "w-full", children: ctaText || "Contact us" }) }),
134
+ showCTA && !ctaHref && smartCTA && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-3 w-full max-w-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { onClick: smartCTA.action, variant: ctaButtonVariant, className: "w-full", children: smartCTA.text }) }),
135
135
  showBackButton && onGoBack && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full max-w-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
136
136
  _chunkF6U2H42Lcjs.Button,
137
137
  {
@@ -185,4 +185,4 @@ function UnifiedPagination({
185
185
 
186
186
 
187
187
  exports.EmptyState = EmptyState; exports.UnifiedPagination = UnifiedPagination;
188
- //# sourceMappingURL=chunk-XRQKJ22I.cjs.map
188
+ //# sourceMappingURL=chunk-NMXL34Z2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-XRQKJ22I.cjs","../src/components/empty-state.tsx","../src/components/unified-pagination.tsx"],"names":["jsx"],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACdA,2CAA0C;AA6C1B,+CAAA;AApBT,SAAS,UAAA,CAAW;AAAA,EACzB,IAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,eAAA,EAAiB,KAAA;AAAA,EACjB,QAAA;AAAA,EACA,eAAA,EAAiB,SAAA;AAAA,EACjB,QAAA,EAAU,IAAA;AAAA,EACV,OAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA,EAAa;AACf,CAAA,EAAoB;AAClB,EAAA,MAAM,OAAA,EAAS,yCAAA,CAAU;AAGzB,EAAA,MAAM,kBAAA,EAAoB,CAAA,EAAA,GAAM;AAC9B,IAAA,OAAA,CAAQ,IAAA,EAAM;AAAA,MACZ,KAAK,SAAA;AACH,QAAA,OAAO;AAAA,UAC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AACf,IAAA;AAKa,IAAA;AACI,MAAA;AACJ,MAAA;AACI,MAAA;AACjB,IAAA;AAGiB,IAAA;AACC,MAAA;AACT,QAAA;AACK,QAAA;AAAA;AACX,MAAA;AACC,IAAA;AACN,EAAA;AASkB,EAAA;AACT,IAAA;AAMH,IAAA;AACN,EAAA;AAGE,EAAA;AAIJ;AFkGsB;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-XRQKJ22I.cjs","sourcesContent":[null,"'use client';\n\nimport { Search, FileText, Package } from 'lucide-react';\nimport { useRouter } from '../embed-shims/next-navigation';\nimport { Button } from './ui/button';\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 /**\n * Link-CTA mode: render the CTA as a navigation link (`href` — plain or\n * `mailto:`). Wins over `onCtaClick`, and SHORT-CIRCUITS the smart-CTA\n * path-sniffing below (which reads `window.location.pathname` — an\n * SSR/client divergence server-rendered pages must never enter).\n */\n ctaHref?: string;\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 ctaHref,\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=\"h-full w-full\" />,\n title: 'No vendors found',\n description:\n \"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=\"h-full w-full\" />,\n title: 'No articles found',\n description:\n \"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=\"h-full w-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=\"h-full w-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 // Surgical filter reset (promoted from the hub's diverged clone during\n // the EmptyState convergence): delete ONLY the filter params the surface\n // owns — nuking the whole query string threw away unrelated state — and\n // use `replace` with `scroll: false` so resetting filters neither adds a\n // history entry nor jumps the page.\n const resetParams = (paramsToDelete: string[]) => {\n if (!isClient) return;\n const params = new URLSearchParams(window.location.search);\n for (const p of paramsToDelete) params.delete(p);\n const queryString = params.toString();\n // Keep the hash — a filter reset must not clear an unrelated\n // deep-link anchor (e.g. #delivery-123).\n const hash = window.location.hash;\n router.replace(`${window.location.pathname}${queryString ? `?${queryString}` : ''}${hash}`, { scroll: false });\n };\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page']),\n };\n case 'posts':\n // Blog-style listing pages (blog, case studies) reset their filters\n if (currentPath.includes('/blog') || currentPath.includes('/case-studies')) {\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page', 'category', 'tags']),\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: () => resetParams(['search', 'page', 'category', 'subcategory']),\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 // ctaHref short-circuits BEFORE getSmartCTA(): the smart defaults read\n // window.location.pathname (SSR-empty, client-real), so a server-rendered\n // page with a link CTA must never enter that branch. Existing callers\n // without ctaHref keep today's smart-default behavior unchanged.\n const smartCTA = ctaHref ? null : getSmartCTA();\n const ctaClassName =\n ctaVariant === 'primary'\n ? 'w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-body 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-body font-medium';\n\n return (\n <div className=\"flex flex-col items-center justify-center px-6 py-6 text-center md:py-16\">\n {/* Icon */}\n <div className=\"mb-3 flex items-center justify-center md:mb-6\">\n <div className=\"rounded-full border border-ods-border bg-ods-card p-3 md:p-6\">\n <div className=\"flex h-8 w-8 items-center justify-center text-ods-text-secondary md:h-16 md:w-16\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 text-ods-text-primary text-h3 md:mb-3\">{displayTitle}</h2>\n\n {/* Description */}\n <p className=\"mb-4 max-w-md text-ods-text-secondary text-h6 md:mb-8\">{displayDescription}</p>\n\n {/* Link CTA (ctaHref) — SSR-safe, no path sniffing */}\n {showCTA && ctaHref && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button href={ctaHref} className={ctaClassName}>\n {ctaText || 'Contact us'}\n </Button>\n </div>\n )}\n\n {/* Smart CTA Button */}\n {showCTA && !ctaHref && smartCTA && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button onClick={smartCTA.action} className={ctaClassName}>\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 font-body font-medium transition-all duration-150\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport { useSearchParams, usePathname } from '../embed-shims/next-navigation';\nimport { withQuery } from '../utils/search-params';\nimport { Pagination } from './pagination';\n\ninterface UnifiedPaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange?: (page: number) => void;\n className?: string;\n /**\n * Write `?page=` into the URL on every change (default true, the historical\n * behaviour). Set false when the CALLER owns the URL — a surface whose whole\n * filter state is one schema would otherwise get two writers racing on it.\n */\n syncUrl?: boolean;\n /**\n * Keep the row's height when there is only one page, instead of rendering\n * nothing. Stops a one-page result from shifting the content above it.\n */\n reserveSpace?: boolean;\n}\n\nexport function UnifiedPagination({\n currentPage,\n totalPages,\n onPageChange,\n className = 'mt-8 flex justify-center w-full',\n syncUrl = true,\n reserveSpace = false,\n}: UnifiedPaginationProps) {\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 — unless the caller owns\n // the URL (`syncUrl={false}`), in which case a second writer here would\n // race the caller's own param write.\n if (syncUrl) {\n const params = new URLSearchParams(searchParams.toString());\n params.set('page', page.toString());\n window.history.replaceState(null, '', withQuery(pathname, params.toString()));\n }\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 (optionally holding the\n // row's height so the content above it does not shift).\n //\n // The reserved row renders the REAL control, hidden — an empty div reserves\n // nothing, and a hardcoded spacer height silently drifts the day the control\n // changes. `invisible` keeps the box, `aria-hidden` + `pointer-events-none`\n // keep it out of the accessibility tree and out of the way.\n if (totalPages <= 1) {\n return reserveSpace ? (\n <div className={className} aria-hidden=\"true\">\n <div className=\"pointer-events-none invisible\">\n <Pagination currentPage={1} totalPages={1} onPageChange={() => {}} />\n </div>\n </div>\n ) : null;\n }\n\n return (\n <div className={className}>\n <Pagination currentPage={currentPage} totalPages={totalPages} onPageChange={handlePageChange} />\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-NMXL34Z2.cjs","../src/components/empty-state.tsx","../src/components/unified-pagination.tsx"],"names":["jsx"],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACdA,2CAA0C;AA6C1B,+CAAA;AApBT,SAAS,UAAA,CAAW;AAAA,EACzB,IAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,eAAA,EAAiB,KAAA;AAAA,EACjB,QAAA;AAAA,EACA,eAAA,EAAiB,SAAA;AAAA,EACjB,QAAA,EAAU,IAAA;AAAA,EACV,OAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA,EAAa;AACf,CAAA,EAAoB;AAClB,EAAA,MAAM,OAAA,EAAS,yCAAA,CAAU;AAGzB,EAAA,MAAM,kBAAA,EAAoB,CAAA,EAAA,GAAM;AAC9B,IAAA,OAAA,CAAQ,IAAA,EAAM;AAAA,MACZ,KAAK,SAAA;AACH,QAAA,OAAO;AAAA,UACL,IAAA,kBAAM,6BAAA,oBAAC,EAAA,EAAQ,SAAA,EAAU,gBAAA,CAAgB,CAAA;AAAA,UACzC,KAAA,EAAO,kBAAA;AAAA,UACP,WAAA,EACE;AAAA,QACJ,CAAA;AAAA,MACF,KAAK,OAAA;AACH,QAAA,OAAO;AAAA,UACL,IAA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AGE,EAAA;AAIJ;AFkGsB;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-NMXL34Z2.cjs","sourcesContent":[null,"'use client';\n\nimport { Search, FileText, Package } from 'lucide-react';\nimport { useRouter } from '../embed-shims/next-navigation';\nimport { Button } from './ui/button';\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 /**\n * Link-CTA mode: render the CTA as a navigation link (`href` — plain or\n * `mailto:`). Wins over `onCtaClick`, and SHORT-CIRCUITS the smart-CTA\n * path-sniffing below (which reads `window.location.pathname` — an\n * SSR/client divergence server-rendered pages must never enter).\n */\n ctaHref?: string;\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 ctaHref,\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=\"h-full w-full\" />,\n title: 'No vendors found',\n description:\n \"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=\"h-full w-full\" />,\n title: 'No articles found',\n description:\n \"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=\"h-full w-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=\"h-full w-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 // Surgical filter reset (promoted from the hub's diverged clone during\n // the EmptyState convergence): delete ONLY the filter params the surface\n // owns — nuking the whole query string threw away unrelated state — and\n // use `replace` with `scroll: false` so resetting filters neither adds a\n // history entry nor jumps the page.\n const resetParams = (paramsToDelete: string[]) => {\n if (!isClient) return;\n const params = new URLSearchParams(window.location.search);\n for (const p of paramsToDelete) params.delete(p);\n const queryString = params.toString();\n // Keep the hash — a filter reset must not clear an unrelated\n // deep-link anchor (e.g. #delivery-123).\n const hash = window.location.hash;\n router.replace(`${window.location.pathname}${queryString ? `?${queryString}` : ''}${hash}`, { scroll: false });\n };\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page']),\n };\n case 'posts':\n // Blog-style listing pages (blog, case studies) reset their filters\n if (currentPath.includes('/blog') || currentPath.includes('/case-studies')) {\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page', 'category', 'tags']),\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: () => resetParams(['search', 'page', 'category', 'subcategory']),\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 // ctaHref short-circuits BEFORE getSmartCTA(): the smart defaults read\n // window.location.pathname (SSR-empty, client-real), so a server-rendered\n // page with a link CTA must never enter that branch. Existing callers\n // without ctaHref keep today's smart-default behavior unchanged.\n const smartCTA = ctaHref ? null : getSmartCTA();\n // The CTA is the house Button in its own variant: painting colours over the\n // default accent Button with classes lost to its hover (green text on green).\n const ctaButtonVariant = ctaVariant === 'primary' ? 'accent' : 'outline';\n\n return (\n <div className=\"flex flex-col items-center justify-center px-6 py-6 text-center md:py-16\">\n {/* Icon */}\n <div className=\"mb-3 flex items-center justify-center md:mb-6\">\n <div className=\"rounded-full border border-ods-border bg-ods-card p-3 md:p-6\">\n <div className=\"flex h-8 w-8 items-center justify-center text-ods-text-secondary md:h-16 md:w-16\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 text-ods-text-primary text-h3 md:mb-3\">{displayTitle}</h2>\n\n {/* Description */}\n <p className=\"mb-4 max-w-md text-ods-text-secondary text-h6 md:mb-8\">{displayDescription}</p>\n\n {/* Link CTA (ctaHref) — SSR-safe, no path sniffing */}\n {showCTA && ctaHref && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button href={ctaHref} variant={ctaButtonVariant} className=\"w-full\">\n {ctaText || 'Contact us'}\n </Button>\n </div>\n )}\n\n {/* Smart CTA Button */}\n {showCTA && !ctaHref && smartCTA && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button onClick={smartCTA.action} variant={ctaButtonVariant} className=\"w-full\">\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 font-body font-medium transition-all duration-150\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport { useSearchParams, usePathname } from '../embed-shims/next-navigation';\nimport { withQuery } from '../utils/search-params';\nimport { Pagination } from './pagination';\n\ninterface UnifiedPaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange?: (page: number) => void;\n className?: string;\n /**\n * Write `?page=` into the URL on every change (default true, the historical\n * behaviour). Set false when the CALLER owns the URL — a surface whose whole\n * filter state is one schema would otherwise get two writers racing on it.\n */\n syncUrl?: boolean;\n /**\n * Keep the row's height when there is only one page, instead of rendering\n * nothing. Stops a one-page result from shifting the content above it.\n */\n reserveSpace?: boolean;\n}\n\nexport function UnifiedPagination({\n currentPage,\n totalPages,\n onPageChange,\n className = 'mt-8 flex justify-center w-full',\n syncUrl = true,\n reserveSpace = false,\n}: UnifiedPaginationProps) {\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 — unless the caller owns\n // the URL (`syncUrl={false}`), in which case a second writer here would\n // race the caller's own param write.\n if (syncUrl) {\n const params = new URLSearchParams(searchParams.toString());\n params.set('page', page.toString());\n window.history.replaceState(null, '', withQuery(pathname, params.toString()));\n }\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 (optionally holding the\n // row's height so the content above it does not shift).\n //\n // The reserved row renders the REAL control, hidden — an empty div reserves\n // nothing, and a hardcoded spacer height silently drifts the day the control\n // changes. `invisible` keeps the box, `aria-hidden` + `pointer-events-none`\n // keep it out of the accessibility tree and out of the way.\n if (totalPages <= 1) {\n return reserveSpace ? (\n <div className={className} aria-hidden=\"true\">\n <div className=\"pointer-events-none invisible\">\n <Pagination currentPage={1} totalPages={1} onPageChange={() => {}} />\n </div>\n </div>\n ) : null;\n }\n\n return (\n <div className={className}>\n <Pagination currentPage={currentPage} totalPages={totalPages} onPageChange={handlePageChange} />\n </div>\n );\n}\n"]}
@@ -125,13 +125,13 @@ function EmptyState({
125
125
  const displayTitle = title || defaultContent.title;
126
126
  const displayDescription = description || defaultContent.description;
127
127
  const smartCTA = ctaHref ? null : getSmartCTA();
128
- const ctaClassName = ctaVariant === "primary" ? "w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-body font-medium" : "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-body font-medium";
128
+ const ctaButtonVariant = ctaVariant === "primary" ? "accent" : "outline";
129
129
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center px-6 py-6 text-center md:py-16", children: [
130
130
  /* @__PURE__ */ jsx("div", { className: "mb-3 flex items-center justify-center md:mb-6", children: /* @__PURE__ */ jsx("div", { className: "rounded-full border border-ods-border bg-ods-card p-3 md:p-6", children: /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 items-center justify-center text-ods-text-secondary md:h-16 md:w-16", children: defaultContent.icon }) }) }),
131
131
  /* @__PURE__ */ jsx("h2", { className: "mb-2 text-ods-text-primary text-h3 md:mb-3", children: displayTitle }),
132
132
  /* @__PURE__ */ jsx("p", { className: "mb-4 max-w-md text-ods-text-secondary text-h6 md:mb-8", children: displayDescription }),
133
- showCTA && ctaHref && /* @__PURE__ */ jsx("div", { className: "mb-3 w-full max-w-xs", children: /* @__PURE__ */ jsx(Button, { href: ctaHref, className: ctaClassName, children: ctaText || "Contact us" }) }),
134
- showCTA && !ctaHref && smartCTA && /* @__PURE__ */ jsx("div", { className: "mb-3 w-full max-w-xs", children: /* @__PURE__ */ jsx(Button, { onClick: smartCTA.action, className: ctaClassName, children: smartCTA.text }) }),
133
+ showCTA && ctaHref && /* @__PURE__ */ jsx("div", { className: "mb-3 w-full max-w-xs", children: /* @__PURE__ */ jsx(Button, { href: ctaHref, variant: ctaButtonVariant, className: "w-full", children: ctaText || "Contact us" }) }),
134
+ showCTA && !ctaHref && smartCTA && /* @__PURE__ */ jsx("div", { className: "mb-3 w-full max-w-xs", children: /* @__PURE__ */ jsx(Button, { onClick: smartCTA.action, variant: ctaButtonVariant, className: "w-full", children: smartCTA.text }) }),
135
135
  showBackButton && onGoBack && /* @__PURE__ */ jsx("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ jsx(
136
136
  Button,
137
137
  {
@@ -185,4 +185,4 @@ export {
185
185
  EmptyState,
186
186
  UnifiedPagination
187
187
  };
188
- //# sourceMappingURL=chunk-FN7DMNA4.js.map
188
+ //# sourceMappingURL=chunk-Q76YVNCQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/empty-state.tsx","../src/components/unified-pagination.tsx"],"sourcesContent":["'use client';\n\nimport { Search, FileText, Package } from 'lucide-react';\nimport { useRouter } from '../embed-shims/next-navigation';\nimport { Button } from './ui/button';\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 /**\n * Link-CTA mode: render the CTA as a navigation link (`href` — plain or\n * `mailto:`). Wins over `onCtaClick`, and SHORT-CIRCUITS the smart-CTA\n * path-sniffing below (which reads `window.location.pathname` — an\n * SSR/client divergence server-rendered pages must never enter).\n */\n ctaHref?: string;\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 ctaHref,\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=\"h-full w-full\" />,\n title: 'No vendors found',\n description:\n \"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=\"h-full w-full\" />,\n title: 'No articles found',\n description:\n \"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=\"h-full w-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=\"h-full w-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 // Surgical filter reset (promoted from the hub's diverged clone during\n // the EmptyState convergence): delete ONLY the filter params the surface\n // owns — nuking the whole query string threw away unrelated state — and\n // use `replace` with `scroll: false` so resetting filters neither adds a\n // history entry nor jumps the page.\n const resetParams = (paramsToDelete: string[]) => {\n if (!isClient) return;\n const params = new URLSearchParams(window.location.search);\n for (const p of paramsToDelete) params.delete(p);\n const queryString = params.toString();\n // Keep the hash — a filter reset must not clear an unrelated\n // deep-link anchor (e.g. #delivery-123).\n const hash = window.location.hash;\n router.replace(`${window.location.pathname}${queryString ? `?${queryString}` : ''}${hash}`, { scroll: false });\n };\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page']),\n };\n case 'posts':\n // Blog-style listing pages (blog, case studies) reset their filters\n if (currentPath.includes('/blog') || currentPath.includes('/case-studies')) {\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page', 'category', 'tags']),\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: () => resetParams(['search', 'page', 'category', 'subcategory']),\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 // ctaHref short-circuits BEFORE getSmartCTA(): the smart defaults read\n // window.location.pathname (SSR-empty, client-real), so a server-rendered\n // page with a link CTA must never enter that branch. Existing callers\n // without ctaHref keep today's smart-default behavior unchanged.\n const smartCTA = ctaHref ? null : getSmartCTA();\n // The CTA is the house Button in its own variant: painting colours over the\n // default accent Button with classes lost to its hover (green text on green).\n const ctaButtonVariant = ctaVariant === 'primary' ? 'accent' : 'outline';\n\n return (\n <div className=\"flex flex-col items-center justify-center px-6 py-6 text-center md:py-16\">\n {/* Icon */}\n <div className=\"mb-3 flex items-center justify-center md:mb-6\">\n <div className=\"rounded-full border border-ods-border bg-ods-card p-3 md:p-6\">\n <div className=\"flex h-8 w-8 items-center justify-center text-ods-text-secondary md:h-16 md:w-16\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 text-ods-text-primary text-h3 md:mb-3\">{displayTitle}</h2>\n\n {/* Description */}\n <p className=\"mb-4 max-w-md text-ods-text-secondary text-h6 md:mb-8\">{displayDescription}</p>\n\n {/* Link CTA (ctaHref) — SSR-safe, no path sniffing */}\n {showCTA && ctaHref && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button href={ctaHref} variant={ctaButtonVariant} className=\"w-full\">\n {ctaText || 'Contact us'}\n </Button>\n </div>\n )}\n\n {/* Smart CTA Button */}\n {showCTA && !ctaHref && smartCTA && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button onClick={smartCTA.action} variant={ctaButtonVariant} className=\"w-full\">\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 font-body font-medium transition-all duration-150\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport { useSearchParams, usePathname } from '../embed-shims/next-navigation';\nimport { withQuery } from '../utils/search-params';\nimport { Pagination } from './pagination';\n\ninterface UnifiedPaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange?: (page: number) => void;\n className?: string;\n /**\n * Write `?page=` into the URL on every change (default true, the historical\n * behaviour). Set false when the CALLER owns the URL — a surface whose whole\n * filter state is one schema would otherwise get two writers racing on it.\n */\n syncUrl?: boolean;\n /**\n * Keep the row's height when there is only one page, instead of rendering\n * nothing. Stops a one-page result from shifting the content above it.\n */\n reserveSpace?: boolean;\n}\n\nexport function UnifiedPagination({\n currentPage,\n totalPages,\n onPageChange,\n className = 'mt-8 flex justify-center w-full',\n syncUrl = true,\n reserveSpace = false,\n}: UnifiedPaginationProps) {\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 — unless the caller owns\n // the URL (`syncUrl={false}`), in which case a second writer here would\n // race the caller's own param write.\n if (syncUrl) {\n const params = new URLSearchParams(searchParams.toString());\n params.set('page', page.toString());\n window.history.replaceState(null, '', withQuery(pathname, params.toString()));\n }\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 (optionally holding the\n // row's height so the content above it does not shift).\n //\n // The reserved row renders the REAL control, hidden — an empty div reserves\n // nothing, and a hardcoded spacer height silently drifts the day the control\n // changes. `invisible` keeps the box, `aria-hidden` + `pointer-events-none`\n // keep it out of the accessibility tree and out of the way.\n if (totalPages <= 1) {\n return reserveSpace ? (\n <div className={className} aria-hidden=\"true\">\n <div className=\"pointer-events-none invisible\">\n <Pagination currentPage={1} totalPages={1} onPageChange={() => {}} />\n </div>\n </div>\n ) : null;\n }\n\n return (\n <div className={className}>\n <Pagination currentPage={currentPage} totalPages={totalPages} onPageChange={handlePageChange} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAEA,SAAS,QAAQ,UAAU,eAAe;AA6C1B,cAuHZ,YAvHY;AApBT,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACf,GAAoB;AAClB,QAAM,SAAS,UAAU;AAGzB,QAAM,oBAAoB,MAAM;AAC9B,YAAQ,MAAM;AAAA,MACZ,KAAK;AACH,eAAO;AAAA,UACL,MAAM,oBAAC,WAAQ,WAAU,iBAAgB;AAAA,UACzC,OAAO;AAAA,UACP,aACE;AAAA,QACJ;AAAA,MACF,KAAK;AACH,eAAO;AAAA,UACL,MAAM,oBAAC,YAAS,WAAU,iBAAgB;AAAA,UAC1C,OAAO;AAAA,UACP,aACE;AAAA,QACJ;AAAA,MACF,KAAK;AACH,eAAO;AAAA,UACL,MAAM,oBAAC,UAAO,WAAU,iBAAgB;AAAA,UACxC,OAAO;AAAA,UACP,aAAa;AAAA,QACf;AAAA,MACF;AACE,eAAO;AAAA,UACL,MAAM,oBAAC,UAAO,WAAU,iBAAgB;AAAA,UACxC,OAAO;AAAA,UACP,aAAa;AAAA,QACf;AAAA,IACJ;AAAA,EACF;AAGA,QAAM,cAAc,MAAM;AAExB,QAAI,WAAW,YAAY;AACzB,aAAO;AAAA,QACL,MAAM;A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A,EACZ,UAAU;AAAA,EACV,eAAe;AACjB,GAA2B;AACzB,QAAM,eAAe,gBAAgB;AACrC,QAAM,WAAW,YAAY;AAE7B,QAAM,mBAAmB,CAAC,SAAiB;AAEzC,UAAM,iBAAiB,OAAO;AAG9B,QAAI,cAAc;AAChB,mBAAa,IAAI;AAAA,IACnB;AAKA,QAAI,SAAS;AACX,YAAM,SAAS,IAAI,gBAAgB,aAAa,SAAS,CAAC;AAC1D,aAAO,IAAI,QAAQ,KAAK,SAAS,CAAC;AAClC,aAAO,QAAQ,aAAa,MAAM,IAAI,UAAU,UAAU,OAAO,SAAS,CAAC,CAAC;AAAA,IAC9E;AAGA,eAAW,MAAM;AACf,aAAO,SAAS;AAAA,QACd,KAAK;AAAA,QACL,UAAU;AAAA;AAAA,MACZ,CAAC;AAAA,IACH,GAAG,CAAC;AAAA,EACN;AASA,MAAI,cAAc,GAAG;AACnB,WAAO,eACL,gBAAAA,KAAC,SAAI,WAAsB,eAAY,QACrC,0BAAAA,KAAC,SAAI,WAAU,iCACb,0BAAAA,KAAC,cAAW,aAAa,GAAG,YAAY,GAAG,cAAc,MAAM;AAAA,IAAC,GAAG,GACrE,GACF,IACE;AAAA,EACN;AAEA,SACE,gBAAAA,KAAC,SAAI,WACH,0BAAAA,KAAC,cAAW,aAA0B,YAAwB,cAAc,kBAAkB,GAChG;AAEJ;","names":["jsx"]}
@@ -3,16 +3,16 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkHA3SBMR2cjs = require('./chunk-HA3SBMR2.cjs');
6
+ var _chunk4NUKFUPWcjs = require('./chunk-4NUKFUPW.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
- var _chunkUAPSU6YWcjs = require('./chunk-UAPSU6YW.cjs');
11
+ var _chunkFRXIDN6Tcjs = require('./chunk-FRXIDN6T.cjs');
12
12
 
13
13
 
14
14
 
15
- var _chunk25Y3UR3Rcjs = require('./chunk-25Y3UR3R.cjs');
15
+ var _chunk3YWZNB2Scjs = require('./chunk-3YWZNB2S.cjs');
16
16
 
17
17
 
18
18
 
@@ -22,7 +22,7 @@ var _chunk25Y3UR3Rcjs = require('./chunk-25Y3UR3R.cjs');
22
22
 
23
23
 
24
24
 
25
- var _chunk3LW6AJMJcjs = require('./chunk-3LW6AJMJ.cjs');
25
+ var _chunkKSDOCJ7Bcjs = require('./chunk-KSDOCJ7B.cjs');
26
26
 
27
27
 
28
28
  var _chunkJGVJRUGBcjs = require('./chunk-JGVJRUGB.cjs');
@@ -325,8 +325,8 @@ function toDocContent(value, requestedPath) {
325
325
  }
326
326
  function useDocumentTree(config, initialPath) {
327
327
  const { structureEndpoint, contentEndpoint, baseRoute } = config;
328
- const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunk3LW6AJMJcjs.DEFAULT_FOLDER_INDEX_FILE));
329
- const cleanInitialPath = _chunk3LW6AJMJcjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\/$/, "")]) || "", folderIndexFile);
328
+ const folderIndexFile = _nullishCoalesce(config.folderIndexFile, () => ( _chunkKSDOCJ7Bcjs.DEFAULT_FOLDER_INDEX_FILE));
329
+ const cleanInitialPath = _chunkKSDOCJ7Bcjs.stripFolderIndexFromPath.call(void 0, _optionalChain([initialPath, 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\/$/, "")]) || "", folderIndexFile);
330
330
  const [structure, setStructure] = _react.useState.call(void 0, []);
331
331
  const [selectedPath, setSelectedPath] = _react.useState.call(void 0, cleanInitialPath);
332
332
  const [content, setContent] = _react.useState.call(void 0, null);
@@ -350,12 +350,12 @@ function useDocumentTree(config, initialPath) {
350
350
  } else if (pathname.startsWith(`${normalizedBaseRoute}/`)) {
351
351
  pathFromUrl = pathname.substring(`${normalizedBaseRoute}/`.length);
352
352
  }
353
- pathFromUrl = _chunk3LW6AJMJcjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
353
+ pathFromUrl = _chunkKSDOCJ7Bcjs.stripFolderIndexFromPath.call(void 0, pathFromUrl, folderIndexFile);
354
354
  if (pathFromUrl !== selectedPathRef.current) {
355
355
  setSelectedPath(pathFromUrl);
356
356
  if (pathFromUrl) {
357
357
  const parentPath = pathFromUrl.includes("/") ? pathFromUrl.substring(0, pathFromUrl.lastIndexOf("/")) : pathFromUrl;
358
- setExpandedNodes(new Set(_chunk3LW6AJMJcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
358
+ setExpandedNodes(new Set(_chunkKSDOCJ7Bcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
359
359
  }
360
360
  setTimeout(() => {
361
361
  scrollToContent();
@@ -373,7 +373,7 @@ function useDocumentTree(config, initialPath) {
373
373
  setSelectedPath(cleanInitialPath);
374
374
  if (cleanInitialPath) {
375
375
  const parentPath = cleanInitialPath.includes("/") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
376
- setExpandedNodes(new Set(_chunk3LW6AJMJcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
376
+ setExpandedNodes(new Set(_chunkKSDOCJ7Bcjs.getDocAncestorNodeIds.call(void 0, parentPath)));
377
377
  }
378
378
  setExternalNavCount((n) => n + 1);
379
379
  }
@@ -398,7 +398,7 @@ function useDocumentTree(config, initialPath) {
398
398
  if (cleanInitialPath) {
399
399
  const pathForExpansion = cleanInitialPath.includes(".") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
400
400
  if (pathForExpansion) {
401
- setExpandedNodes(new Set(_chunk3LW6AJMJcjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
401
+ setExpandedNodes(new Set(_chunkKSDOCJ7Bcjs.getDocAncestorNodeIds.call(void 0, pathForExpansion)));
402
402
  }
403
403
  } else if (nodes.length > 0) {
404
404
  const hasRootReadme = nodes.some((node) => node.type === "file" && node.path === folderIndexFile);
@@ -438,7 +438,7 @@ function useDocumentTree(config, initialPath) {
438
438
  setContent(null);
439
439
  return;
440
440
  }
441
- const probe = _chunk3LW6AJMJcjs.findDocNodeByPath.call(void 0, _chunk3LW6AJMJcjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), structure);
441
+ const probe = _chunkKSDOCJ7Bcjs.findDocNodeByPath.call(void 0, _chunkKSDOCJ7Bcjs.stripFolderIndexFromPath.call(void 0, path, folderIndexFile), structure);
442
442
  const probeIsNoReadmeFolder = !!probe && probe.type === "folder" && !probe.hasReadme;
443
443
  const preStructureFolderLike = structure.length === 0 && !path.endsWith(".md");
444
444
  if (probeIsNoReadmeFolder || preStructureFolderLike) {
@@ -495,7 +495,7 @@ function useDocumentTree(config, initialPath) {
495
495
  if (selectedPath === "") {
496
496
  pathToFetch = folderIndexFile;
497
497
  } else {
498
- const node = _chunk3LW6AJMJcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
498
+ const node = _chunkKSDOCJ7Bcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
499
499
  if (node && node.type === "folder" && !node.hasReadme) {
500
500
  const firstDocPath = findFirstDocPath(node);
501
501
  if (!firstDocPath) {
@@ -536,16 +536,16 @@ function useDocumentTree(config, initialPath) {
536
536
  if (node.type === "folder") {
537
537
  setExpandedNodes((prev) => {
538
538
  if (prev.has(node.id)) {
539
- const ancestorIds = _chunk3LW6AJMJcjs.getDocAncestorNodeIds.call(void 0, node.path);
539
+ const ancestorIds = _chunkKSDOCJ7Bcjs.getDocAncestorNodeIds.call(void 0, node.path);
540
540
  ancestorIds.pop();
541
541
  return new Set(ancestorIds);
542
542
  }
543
- return new Set(_chunk3LW6AJMJcjs.getDocAncestorNodeIds.call(void 0, node.path));
543
+ return new Set(_chunkKSDOCJ7Bcjs.getDocAncestorNodeIds.call(void 0, node.path));
544
544
  });
545
545
  } else {
546
546
  const lastSlash = node.path.lastIndexOf("/");
547
547
  if (lastSlash > 0) {
548
- setExpandedNodes(new Set(_chunk3LW6AJMJcjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
548
+ setExpandedNodes(new Set(_chunkKSDOCJ7Bcjs.getDocAncestorNodeIds.call(void 0, node.path.substring(0, lastSlash))));
549
549
  }
550
550
  }
551
551
  lastFetchedPath.current = null;
@@ -560,7 +560,7 @@ function useDocumentTree(config, initialPath) {
560
560
  const hashIndex = path.indexOf("#");
561
561
  const anchor = hashIndex !== -1 ? path.substring(hashIndex) : "";
562
562
  const cleanPath = path.replace(/\/$/, "").split("#")[0];
563
- const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunk3LW6AJMJcjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
563
+ const pathForSelection = anchor && _optionalChain([options, 'optionalAccess', _6 => _6.fromInternalLink]) && cleanPath === "" ? selectedPathRef.current : _chunkKSDOCJ7Bcjs.stripFolderIndexFromPath.call(void 0, cleanPath, folderIndexFile);
564
564
  if (anchor && _optionalChain([options, 'optionalAccess', _7 => _7.fromInternalLink]) && pathForSelection === selectedPathRef.current) {
565
565
  _chunkILAHSBZIcjs.navigateSamePageHash.call(void 0, anchor, { headerOffset: _chunkILAHSBZIcjs.HUB_HEADER_OFFSET_PX });
566
566
  return;
@@ -624,15 +624,15 @@ function useDocumentTree(config, initialPath) {
624
624
  return docNavigation.register({
625
625
  baseRoute: normalizedBaseRoute,
626
626
  findNodeByPath: (path) => {
627
- const clean = _chunk3LW6AJMJcjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
628
- return _nullishCoalesce(_chunk3LW6AJMJcjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
627
+ const clean = _chunkKSDOCJ7Bcjs.stripFolderIndexFromPath.call(void 0, path.replace(/\/$/, "").split("#")[0], folderIndexFile);
628
+ return _nullishCoalesce(_chunkKSDOCJ7Bcjs.findDocNodeByPath.call(void 0, clean, structure), () => ( null));
629
629
  },
630
630
  selectNode
631
631
  });
632
632
  }, [docNavigation, normalizedBaseRoute, structure, selectNode, folderIndexFile]);
633
633
  const isEmptyFolder = _react.useMemo.call(void 0, () => {
634
634
  if (!selectedPath || structure.length === 0) return false;
635
- const node = _chunk3LW6AJMJcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
635
+ const node = _chunkKSDOCJ7Bcjs.findDocNodeByPath.call(void 0, selectedPath, structure);
636
636
  return !!node && node.type === "folder" && !node.hasReadme && !findFirstDocPath(node);
637
637
  }, [selectedPath, structure]);
638
638
  return {
@@ -815,7 +815,7 @@ function DocViewerContent({
815
815
  label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _16 => _16.label]), () => ( "Back to home")),
816
816
  onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _17 => _17.href]), () => ( "/")))
817
817
  };
818
- const docSearch = _chunk25Y3UR3Rcjs.useDocSearch.call(void 0, {
818
+ const docSearch = _chunk3YWZNB2Scjs.useDocSearch.call(void 0, {
819
819
  source: chatSource,
820
820
  baseRoute,
821
821
  searchEndpoint,
@@ -839,7 +839,7 @@ function DocViewerContent({
839
839
  onResolveLink: resolveLink
840
840
  });
841
841
  }, [content, renderContent, navigateToDoc, sourceId, resolveLink]);
842
- const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunk3LW6AJMJcjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _18 => _18.documentType]) : void 0;
842
+ const selectedNodeDocType = selectedPath && structure.length > 0 ? _optionalChain([_chunkKSDOCJ7Bcjs.findDocNodeByPath.call(void 0, selectedPath, structure), 'optionalAccess', _18 => _18.documentType]) : void 0;
843
843
  const activeDocType = _nullishCoalesce(_optionalChain([content, 'optionalAccess', _19 => _19.documentType]), () => ( selectedNodeDocType));
844
844
  const isMarkdownContent = !activeDocType || activeDocType === "markdown";
845
845
  const showStickyNav = isMarkdownContent;
@@ -850,9 +850,9 @@ function DocViewerContent({
850
850
  const containerBgStyle = colorPalette.containerBackground !== "transparent" ? { backgroundColor: colorPalette.containerBackground } : {};
851
851
  const defaultEmptyText = structure.length > 0 ? "Select a document from the sidebar to view" : "No documents yet. Add content from the admin panel.";
852
852
  const resolvedEmptyText = emptyStateText || defaultEmptyText;
853
- const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3LW6AJMJcjs.PageLayout, { title, subtitle, titleSize: "h1", titleWrap: true, backButton: _nullishCoalesce(backCfg, () => ( void 0)), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-10", children: [
853
+ const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...bgStyle, ...containerBgStyle }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKSDOCJ7Bcjs.PageLayout, { title, subtitle, titleSize: "h1", titleWrap: true, backButton: _nullishCoalesce(backCfg, () => ( void 0)), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-10", children: [
854
854
  showAIChat && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
855
- _chunk25Y3UR3Rcjs.DocSearchBar,
855
+ _chunk3YWZNB2Scjs.DocSearchBar,
856
856
  {
857
857
  placeholder: `Search ${_optionalChain([sidebarLabel, 'optionalAccess', _23 => _23.toLowerCase, 'call', _24 => _24()]) || "documents"}...`,
858
858
  query: docSearch.query,
@@ -871,9 +871,9 @@ function DocViewerContent({
871
871
  ] })
872
872
  ] }) }),
873
873
  !error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 flex-col items-start gap-6 lg:flex-row lg:gap-10", children: [
874
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full lg:w-[320px] lg:shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "lg:sticky lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3LW6AJMJcjs.CategorySidebarSkeleton, {}) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
874
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full lg:w-[320px] lg:shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "lg:sticky lg:top-20", children: isLoadingStructure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKSDOCJ7Bcjs.CategorySidebarSkeleton, {}) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
875
875
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentMobileDropdown, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
876
- _chunkUAPSU6YWcjs.MobileNavigationDropdown,
876
+ _chunkFRXIDN6Tcjs.MobileNavigationDropdown,
877
877
  {
878
878
  nodes: structure,
879
879
  selectedPath,
@@ -887,7 +887,7 @@ function DocViewerContent({
887
887
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PersistentSidebar, { isLoading: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
888
888
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-ods-text-secondary text-h5", children: sidebarLabel }),
889
889
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
890
- _chunkUAPSU6YWcjs.MultiLevelNavigation,
890
+ _chunkFRXIDN6Tcjs.MultiLevelNavigation,
891
891
  {
892
892
  nodes: structure,
893
893
  selectedPath,
@@ -926,7 +926,7 @@ function DocViewerContent({
926
926
  showStickyNav && content && stickyNavSections.length > 0 && !isLoadingContent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hidden lg:block", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "sticky top-24", children: [
927
927
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-4 font-semibold text-ods-text-secondary text-h5", children: "ON THIS PAGE" }),
928
928
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
929
- _chunkUAPSU6YWcjs.StickySectionNav,
929
+ _chunkFRXIDN6Tcjs.StickySectionNav,
930
930
  {
931
931
  sections: stickyNavSections,
932
932
  activeSection,
@@ -941,7 +941,7 @@ function DocViewerContent({
941
941
  ) })
942
942
  ] })
943
943
  ] }) }) });
944
- return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3LW6AJMJcjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
944
+ return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKSDOCJ7Bcjs.PageShell, { contentClassName: `${bgClass} ${className}`, children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `page-shell-content ${bgClass} ${className}`.trim(), children: inner });
945
945
  }
946
946
 
947
947
  // src/components/docs/skeletons.tsx
@@ -1031,11 +1031,11 @@ function EmbedSkeleton({ documentType } = {}) {
1031
1031
 
1032
1032
  var DEFAULT_TITLE = "Documents";
1033
1033
  var defaultFallbackRenderer = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "py-16 text-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary", children: "Unsupported document type" }) });
1034
- var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHA3SBMR2cjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
1035
- var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHA3SBMR2cjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
1036
- var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3LW6AJMJcjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
1034
+ var defaultPdfRenderer = (content, handlers) => content.fileUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4NUKFUPWcjs.PdfViewer, { src: content.fileUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
1035
+ var defaultGoogleSheetRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4NUKFUPWcjs.GoogleSheetsViewer, { externalUrl: content.externalUrl, fileName: content.fileName }) : defaultFallbackRenderer(content, handlers);
1036
+ var defaultFigmaRenderer = (content, handlers) => content.externalUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKSDOCJ7Bcjs.FigmaEmbed, { url: content.externalUrl, title: content.fileName, loading: "eager" }) : defaultFallbackRenderer(content, handlers);
1037
1037
  var defaultFileRenderer = (content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1038
- _chunkHA3SBMR2cjs.FileDownloadCard,
1038
+ _chunk4NUKFUPWcjs.FileDownloadCard,
1039
1039
  {
1040
1040
  fileName: content.fileName,
1041
1041
  mimeType: content.mimeType,
@@ -1098,4 +1098,4 @@ function DocsHubPage({
1098
1098
 
1099
1099
 
1100
1100
  exports.PersistentFilterControls = PersistentFilterControls; exports.PersistentSearchContainer = PersistentSearchContainer; exports.PersistentSidebar = PersistentSidebar; exports.PersistentMobileDropdown = PersistentMobileDropdown; exports.DocNavigationProvider = DocNavigationProvider; exports.useDocNavigation = useDocNavigation; exports.useDocumentTree = useDocumentTree; exports.useScrollSpy = useScrollSpy; exports.DocViewer = DocViewer; exports.MarkdownSkeleton = MarkdownSkeleton; exports.EmbedSkeleton = EmbedSkeleton; exports.DocsHubPage = DocsHubPage;
1101
- //# sourceMappingURL=chunk-KNPUHPIF.cjs.map
1101
+ //# sourceMappingURL=chunk-QFGPSBAX.cjs.map