@flamingo-stack/openframe-frontend-core 0.0.413 → 0.0.414-snapshot.20260711204608

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 (110) hide show
  1. package/dist/{chunk-HVFJFOBK.cjs → chunk-24IQYYNK.cjs} +32 -32
  2. package/dist/{chunk-HVFJFOBK.cjs.map → chunk-24IQYYNK.cjs.map} +1 -1
  3. package/dist/{chunk-NG6LNKSV.js → chunk-2HBGX2VN.js} +3 -3
  4. package/dist/{chunk-UQHZWWJD.cjs → chunk-2MEM6QO4.cjs} +19 -19
  5. package/dist/{chunk-UQHZWWJD.cjs.map → chunk-2MEM6QO4.cjs.map} +1 -1
  6. package/dist/{chunk-7FGGAKGM.js → chunk-47FXB4DR.js} +4 -4
  7. package/dist/{chunk-DX2M4WGF.cjs → chunk-57IHEHW3.cjs} +5 -5
  8. package/dist/{chunk-DX2M4WGF.cjs.map → chunk-57IHEHW3.cjs.map} +1 -1
  9. package/dist/{chunk-MGDNOZ7P.js → chunk-CCEQDC7F.js} +5 -5
  10. package/dist/chunk-CCEQDC7F.js.map +1 -0
  11. package/dist/{chunk-KWJIKTOV.cjs → chunk-E6WANQ6K.cjs} +11 -10
  12. package/dist/chunk-E6WANQ6K.cjs.map +1 -0
  13. package/dist/{chunk-PILJ5Q6A.js → chunk-EB4USXFD.js} +6 -6
  14. package/dist/{chunk-ZVQOPHPQ.js → chunk-F5US4NUC.js} +7 -7
  15. package/dist/{chunk-DGIF3YDV.js → chunk-FFCGB73K.js} +2 -2
  16. package/dist/{chunk-LPH2JDOW.cjs → chunk-GHHUCCLX.cjs} +2 -2
  17. package/dist/{chunk-LPH2JDOW.cjs.map → chunk-GHHUCCLX.cjs.map} +1 -1
  18. package/dist/{chunk-W3O6Q7Q3.js → chunk-HBTKCED7.js} +11 -10
  19. package/dist/chunk-HBTKCED7.js.map +1 -0
  20. package/dist/{chunk-OU6XUJTY.js → chunk-I6LSGR3V.js} +2 -2
  21. package/dist/{chunk-O6YUQ5U6.js → chunk-IKWWXX4V.js} +4 -4
  22. package/dist/{chunk-7VIUTGVQ.cjs → chunk-LAGZ56MO.cjs} +18 -18
  23. package/dist/{chunk-7VIUTGVQ.cjs.map → chunk-LAGZ56MO.cjs.map} +1 -1
  24. package/dist/{chunk-QKRJJSYX.js → chunk-MHOKOUKE.js} +6 -6
  25. package/dist/{chunk-N5KMG4QC.cjs → chunk-ND4AYD6P.cjs} +40 -40
  26. package/dist/{chunk-N5KMG4QC.cjs.map → chunk-ND4AYD6P.cjs.map} +1 -1
  27. package/dist/{chunk-SAZL7DUB.cjs → chunk-NG6F7TM4.cjs} +12 -12
  28. package/dist/{chunk-SAZL7DUB.cjs.map → chunk-NG6F7TM4.cjs.map} +1 -1
  29. package/dist/{chunk-2VCKZQJV.cjs → chunk-NM4WUXPO.cjs} +40 -40
  30. package/dist/{chunk-2VCKZQJV.cjs.map → chunk-NM4WUXPO.cjs.map} +1 -1
  31. package/dist/{chunk-4FNDOTW2.js → chunk-OMUCATVA.js} +2 -2
  32. package/dist/{chunk-QVGKD5GX.cjs → chunk-OTUNYR26.cjs} +75 -75
  33. package/dist/{chunk-QVGKD5GX.cjs.map → chunk-OTUNYR26.cjs.map} +1 -1
  34. package/dist/{chunk-MLG4ZP3U.js → chunk-P7NC3H2Y.js} +3 -3
  35. package/dist/{chunk-3SNDISEN.cjs → chunk-SR6LEWCF.cjs} +31 -31
  36. package/dist/{chunk-3SNDISEN.cjs.map → chunk-SR6LEWCF.cjs.map} +1 -1
  37. package/dist/{chunk-R4KADR27.cjs → chunk-SUOPU3OE.cjs} +523 -523
  38. package/dist/{chunk-R4KADR27.cjs.map → chunk-SUOPU3OE.cjs.map} +1 -1
  39. package/dist/{chunk-L3M3MECX.cjs → chunk-VENX4SF4.cjs} +33 -33
  40. package/dist/{chunk-L3M3MECX.cjs.map → chunk-VENX4SF4.cjs.map} +1 -1
  41. package/dist/{chunk-DC5CPGQ5.js → chunk-VVAAUQKZ.js} +5 -5
  42. package/dist/{chunk-HFLWZJN7.cjs → chunk-XAVAHIZR.cjs} +93 -93
  43. package/dist/{chunk-HFLWZJN7.cjs.map → chunk-XAVAHIZR.cjs.map} +1 -1
  44. package/dist/{chunk-K3CVA2LE.js → chunk-XUWZHO32.js} +3 -3
  45. package/dist/{chunk-YKIZWCKU.js → chunk-YQBAYZZV.js} +3 -3
  46. package/dist/{chunk-N7YBNHVT.js → chunk-Z6NIMOXQ.js} +2 -2
  47. package/dist/chunk-Z6NIMOXQ.js.map +1 -0
  48. package/dist/{chunk-3KQZEWR5.cjs → chunk-ZE5CY2H2.cjs} +12 -12
  49. package/dist/{chunk-3KQZEWR5.cjs.map → chunk-ZE5CY2H2.cjs.map} +1 -1
  50. package/dist/{chunk-G2G7HLEM.cjs → chunk-ZKIYCRVQ.cjs} +3 -3
  51. package/dist/{chunk-G2G7HLEM.cjs.map → chunk-ZKIYCRVQ.cjs.map} +1 -1
  52. package/dist/components/case-studies/index.cjs +15 -15
  53. package/dist/components/case-studies/index.js +5 -5
  54. package/dist/components/chat/index.cjs +5 -5
  55. package/dist/components/chat/index.js +4 -4
  56. package/dist/components/contact/index.cjs +6 -6
  57. package/dist/components/contact/index.js +5 -5
  58. package/dist/components/docs/index.cjs +8 -8
  59. package/dist/components/docs/index.js +7 -7
  60. package/dist/components/embeds/index.cjs +6 -6
  61. package/dist/components/embeds/index.js +5 -5
  62. package/dist/components/faq/index.cjs +7 -7
  63. package/dist/components/faq/index.js +6 -6
  64. package/dist/components/features/index.cjs +5 -5
  65. package/dist/components/features/index.js +4 -4
  66. package/dist/components/help-center-pages/index.cjs +24 -24
  67. package/dist/components/help-center-pages/index.js +15 -15
  68. package/dist/components/icons/figma-icon.d.ts.map +1 -1
  69. package/dist/components/icons/index.cjs +2 -2
  70. package/dist/components/icons/index.js +1 -1
  71. package/dist/components/index.cjs +176 -176
  72. package/dist/components/index.js +13 -13
  73. package/dist/components/navigation/index.cjs +5 -5
  74. package/dist/components/navigation/index.js +4 -4
  75. package/dist/components/onboarding-guides/index.cjs +9 -9
  76. package/dist/components/onboarding-guides/index.js +8 -8
  77. package/dist/components/related-content/index.cjs +7 -7
  78. package/dist/components/related-content/index.js +6 -6
  79. package/dist/components/tickets/index.cjs +8 -8
  80. package/dist/components/tickets/index.js +7 -7
  81. package/dist/components/ui/button/button.d.ts.map +1 -1
  82. package/dist/components/ui/file-manager/index.cjs +50 -50
  83. package/dist/components/ui/file-manager/index.js +1 -1
  84. package/dist/components/ui/index.cjs +5 -5
  85. package/dist/components/ui/index.js +4 -4
  86. package/dist/hooks/index.cjs +3 -3
  87. package/dist/hooks/index.js +2 -2
  88. package/dist/index.cjs +5 -5
  89. package/dist/index.js +4 -4
  90. package/package.json +1 -1
  91. package/src/components/chat/entity-cards/roadmap-card.tsx +1 -1
  92. package/src/components/icons/figma-icon.tsx +1 -1
  93. package/src/components/ui/button/button.tsx +10 -9
  94. package/dist/chunk-KWJIKTOV.cjs.map +0 -1
  95. package/dist/chunk-MGDNOZ7P.js.map +0 -1
  96. package/dist/chunk-N7YBNHVT.js.map +0 -1
  97. package/dist/chunk-W3O6Q7Q3.js.map +0 -1
  98. /package/dist/{chunk-NG6LNKSV.js.map → chunk-2HBGX2VN.js.map} +0 -0
  99. /package/dist/{chunk-7FGGAKGM.js.map → chunk-47FXB4DR.js.map} +0 -0
  100. /package/dist/{chunk-PILJ5Q6A.js.map → chunk-EB4USXFD.js.map} +0 -0
  101. /package/dist/{chunk-ZVQOPHPQ.js.map → chunk-F5US4NUC.js.map} +0 -0
  102. /package/dist/{chunk-DGIF3YDV.js.map → chunk-FFCGB73K.js.map} +0 -0
  103. /package/dist/{chunk-OU6XUJTY.js.map → chunk-I6LSGR3V.js.map} +0 -0
  104. /package/dist/{chunk-O6YUQ5U6.js.map → chunk-IKWWXX4V.js.map} +0 -0
  105. /package/dist/{chunk-QKRJJSYX.js.map → chunk-MHOKOUKE.js.map} +0 -0
  106. /package/dist/{chunk-4FNDOTW2.js.map → chunk-OMUCATVA.js.map} +0 -0
  107. /package/dist/{chunk-MLG4ZP3U.js.map → chunk-P7NC3H2Y.js.map} +0 -0
  108. /package/dist/{chunk-DC5CPGQ5.js.map → chunk-VVAAUQKZ.js.map} +0 -0
  109. /package/dist/{chunk-K3CVA2LE.js.map → chunk-XUWZHO32.js.map} +0 -0
  110. /package/dist/{chunk-YKIZWCKU.js.map → chunk-YQBAYZZV.js.map} +0 -0
@@ -70,15 +70,16 @@ var init_button = __esm({
70
70
  small: "p-[var(--spacing-system-xs)] text-h5 h-6 md:h-8",
71
71
  "small-legacy": "py-[var(--spacing-system-xs)] px-[var(--spacing-system-m)] h-10 text-[14px] font-bold",
72
72
  // Temporary alias for "small" — deprecated; grep size="small-legacy" (lib + hub) and migrate the remaining consumers before removal
73
- // Caption-scale 24px pill for slim strips (announcement/promo bars,
74
- // inline banner actions — Primer banner / Polaris banner / Vercel-bar
75
- // convention). Label is text-h6, the system caption token (DM Sans
76
- // medium, sentence case, 12/14px): in-strip CTAs must never read
77
- // louder than the message beside them, so this deliberately does NOT
78
- // use the mono-uppercase control style of "small". Pinned h-6 across
79
- // breakpoints (24px = the WCAG 2.5.8 target-size floor) with
80
- // horizontal-dominant padding and a 14px glyph.
81
- compact: "py-0 px-[var(--spacing-system-sf)] text-h6 h-6 [&_svg]:h-3.5 [&_svg]:w-3.5",
73
+ // 24px pill for slim strips (announcement/promo bars, inline banner
74
+ // actions — Primer banner / Polaris banner / Vercel-bar convention).
75
+ // The label matches the strip's MESSAGE type ramp exactly (DM Sans
76
+ // regular, 13px -> md:14px, snug leading the announcement bar's
77
+ // subtitle styling): in-strip CTAs must never read louder than the
78
+ // message beside them, so this deliberately uses neither the
79
+ // mono-uppercase control style of "small" nor a heavier weight.
80
+ // Pinned h-6 across breakpoints (24px = the WCAG 2.5.8 target-size
81
+ // floor) with horizontal-dominant padding and a 14px glyph.
82
+ compact: "py-0 px-[var(--spacing-system-sf)] font-body font-normal text-[13px] md:text-sm leading-snug h-6 [&_svg]:h-3.5 [&_svg]:w-3.5",
82
83
  icon: "p-[var(--spacing-system-sf)] h-11 w-11 md:h-12 md:w-12 [&_svg]:h-4 [&_svg]:w-4 md:[&_svg]:h-6 md:[&_svg]:w-6",
83
84
  // Quiet 32px icon target with a 16px glyph, fixed across breakpoints
84
85
  // (Carbon ghost sm / Primer medium / shadcn icon-sm all pin 32px;
@@ -951,4 +952,4 @@ export {
951
952
  SkeletonList,
952
953
  SkeletonNavigation
953
954
  };
954
- //# sourceMappingURL=chunk-W3O6Q7Q3.js.map
955
+ //# sourceMappingURL=chunk-HBTKCED7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/button/button-styles.ts","../src/components/ui/button/button.tsx","../src/components/ui/button/split-button.tsx","../src/components/ui/button/index.ts","../src/components/ui/field-wrapper.tsx","../src/components/ui/input.tsx","../src/components/ui/checkbox.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/portal-container.tsx","../src/components/ui/skeleton.tsx"],"sourcesContent":["// Shared style atoms for `Button` and `SplitButton`. Extracted to keep a single\n// source of truth for surface colors, outline borders, and split-divider colors.\n\n// Each variant pairs `disabled:` (real `<button disabled>`) with `aria-disabled:`\n// (used for `<Link aria-disabled>` since anchors don't support `:disabled`).\nexport const buttonSurfaceClasses = {\n accent:\n \"bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover active:bg-ods-accent-active disabled:bg-ods-disabled aria-disabled:bg-ods-disabled\",\n outline:\n \"bg-ods-card text-ods-text-primary hover:bg-ods-bg-hover active:bg-ods-bg-active disabled:bg-ods-card disabled:text-ods-text-disabled aria-disabled:bg-ods-card aria-disabled:text-ods-text-disabled\",\n transparent:\n \"bg-transparent text-ods-text-primary hover:bg-ods-bg-hover active:bg-ods-bg-active disabled:bg-transparent disabled:text-ods-text-disabled aria-disabled:bg-transparent aria-disabled:text-ods-text-disabled\",\n destructive:\n \"bg-ods-error text-ods-text-on-accent hover:bg-ods-error-hover active:bg-ods-error-active disabled:bg-ods-disabled aria-disabled:bg-ods-disabled\",\n} as const\n\nexport const outlineBorderClasses =\n \"border border-ods-border hover:border-ods-border-hover active:border-ods-border-active disabled:border-ods-border aria-disabled:border-ods-border\"\n\n// Color of the vertical seam between the main and icon halves (split layouts).\nexport const splitDividerColorClasses = {\n accent: \"border-ods-accent-active\",\n outline: \"border-ods-border\",\n transparent: \"border-ods-border\",\n destructive: \"border-ods-error-active\",\n} as const\n\nexport type ButtonSurfaceVariant = keyof typeof buttonSurfaceClasses\n","\"use client\"\n\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport Link from \"../../../embed-shims/next-link\"\nimport React from \"react\"\n\nimport { cn } from \"../../../utils/cn\"\nimport { buttonSurfaceClasses, outlineBorderClasses, splitDividerColorClasses } from \"./button-styles\"\n\n// Default layout: centered single content area, padding/gap on the button itself.\nconst buttonVariants = cva(\n [\n \"relative inline-flex items-center justify-center gap-[var(--spacing-system-xsf)]\",\n \"rounded-md whitespace-nowrap\",\n \"transition-colors duration-200\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus\",\n \"disabled:pointer-events-none\",\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:h-5 [&_svg]:w-5\",\n ],\n {\n variants: {\n variant: {\n accent: buttonSurfaceClasses.accent,\n outline: cn(buttonSurfaceClasses.outline, outlineBorderClasses),\n transparent: buttonSurfaceClasses.transparent,\n destructive: buttonSurfaceClasses.destructive,\n },\n size: {\n default: \"py-[var(--spacing-system-sf)] px-[var(--spacing-system-m)] text-h3 md:h-12 h-10\",\n small: \"p-[var(--spacing-system-xs)] text-h5 h-6 md:h-8\",\n \"small-legacy\": \"py-[var(--spacing-system-xs)] px-[var(--spacing-system-m)] h-10 text-[14px] font-bold\", // Temporary alias for \"small\" — deprecated; grep size=\"small-legacy\" (lib + hub) and migrate the remaining consumers before removal\n // 24px pill for slim strips (announcement/promo bars, inline banner\n // actions — Primer banner / Polaris banner / Vercel-bar convention).\n // The label matches the strip's MESSAGE type ramp exactly (DM Sans\n // regular, 13px -> md:14px, snug leading — the announcement bar's\n // subtitle styling): in-strip CTAs must never read louder than the\n // message beside them, so this deliberately uses neither the\n // mono-uppercase control style of \"small\" nor a heavier weight.\n // Pinned h-6 across breakpoints (24px = the WCAG 2.5.8 target-size\n // floor) with horizontal-dominant padding and a 14px glyph.\n compact: \"py-0 px-[var(--spacing-system-sf)] font-body font-normal text-[13px] md:text-sm leading-snug h-6 [&_svg]:h-3.5 [&_svg]:w-3.5\",\n icon: \"p-[var(--spacing-system-sf)] h-11 w-11 md:h-12 md:w-12 [&_svg]:h-4 [&_svg]:w-4 md:[&_svg]:h-6 md:[&_svg]:w-6\",\n // Quiet 32px icon target with a 16px glyph, fixed across breakpoints\n // (Carbon ghost sm / Primer medium / shadcn icon-sm all pin 32px;\n // ≥ the 24px WCAG 2.5.8 target floor). For icon actions that read as\n // metadata rather than CTAs — author-page social rows, share rows.\n // Pair with variant=\"transparent\" for the ghost treatment.\n \"icon-sm\": \"p-[var(--spacing-system-xxs)] h-8 w-8 [&_svg]:h-4 [&_svg]:w-4\",\n },\n fullWidth: {\n true: \"w-full\",\n false: \"\",\n },\n noPaddingX: {\n true: \"px-0\",\n false: \"\",\n },\n },\n compoundVariants: [\n { size: \"small\", class: \"[&_svg]:h-4 [&_svg]:w-4\" },\n ],\n defaultVariants: {\n variant: \"accent\",\n size: \"default\",\n fullWidth: false,\n noPaddingX: false,\n },\n }\n)\n\n// Split layout (used when `splitIcon` is provided): outer button has no padding;\n// inner slots own padding/gap so the divider can span full button height.\nconst splitShellVariants = cva(\n [\n \"group relative inline-flex items-stretch overflow-hidden rounded-md whitespace-nowrap\",\n \"transition-colors duration-200\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus\",\n \"disabled:pointer-events-none\",\n ],\n {\n variants: {\n variant: {\n accent: buttonSurfaceClasses.accent,\n outline: cn(buttonSurfaceClasses.outline, outlineBorderClasses),\n transparent: buttonSurfaceClasses.transparent,\n destructive: buttonSurfaceClasses.destructive,\n },\n size: {\n default: \"h-12 text-h3\",\n small: \"h-6 md:h-8 text-h5\",\n },\n fullWidth: { true: \"w-full\", false: \"\" },\n },\n defaultVariants: { variant: \"accent\", size: \"default\", fullWidth: false },\n }\n)\n\nconst splitSlotVariants = cva(\n [\"inline-flex items-center justify-center\", \"[&_svg]:shrink-0 [&_svg]:h-5 [&_svg]:w-5\"],\n {\n variants: {\n slot: {\n main: \"gap-[var(--spacing-system-xsf)]\",\n icon: \"border-l\",\n },\n size: { default: \"\", small: \"[&_svg]:h-4 [&_svg]:w-4\" },\n variant: { accent: \"\", outline: \"\", transparent: \"\", destructive: \"\" },\n },\n compoundVariants: [\n { slot: \"main\", size: \"default\", class: \"px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)]\" },\n { slot: \"main\", size: \"small\", class: \"px-[var(--spacing-system-xs)]\" },\n { slot: \"icon\", size: \"default\", class: \"w-10\" },\n { slot: \"icon\", size: \"small\", class: \"w-6 md:w-8\" },\n { slot: \"icon\", variant: \"accent\", class: cn(\n splitDividerColorClasses.accent,\n \"group-disabled:border-ods-disabled group-aria-disabled:border-ods-disabled\",\n ) },\n { slot: \"icon\", variant: \"outline\", class: splitDividerColorClasses.outline },\n { slot: \"icon\", variant: \"transparent\", class: splitDividerColorClasses.transparent },\n { slot: \"icon\", variant: \"destructive\", class: cn(\n splitDividerColorClasses.destructive,\n \"group-disabled:border-ods-disabled group-aria-disabled:border-ods-disabled\",\n ) },\n ],\n defaultVariants: { slot: \"main\", size: \"default\", variant: \"accent\" },\n }\n)\n\n/** @deprecated Use `size=\"small\"` instead. Temporary alias kept for backward compatibility; will be removed in the future. */\ntype DeprecatedButtonSize = \"small-legacy\"\n\ntype ButtonSize = Exclude<VariantProps<typeof buttonVariants>[\"size\"], \"small-legacy\" | null | undefined> | DeprecatedButtonSize\n\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n Omit<VariantProps<typeof buttonVariants>, \"size\"> {\n asChild?: boolean\n href?: string\n openInNewTab?: boolean\n prefetch?: boolean\n /**\n * Pre-resolved anchor bundle (from `useNavLink({ href, targetPlatform })`).\n * When set, renders the Button as `<Link>` with `href` / `target` / `rel`\n * / `onClick` spread from this object. Lets callers thread the unified\n * nav decision directly without `<Button asChild><a {...linkProps}/>`\n * gymnastics. Wins over the separate `href` / `openInNewTab` props.\n */\n linkProps?: {\n href: string\n target?: '_blank'\n rel?: 'noopener noreferrer'\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n } | null\n leftIcon?: React.ReactNode\n rightIcon?: React.ReactNode\n /**\n * Renders a vertical divider and trailing icon area inside the button.\n * The whole button stays a single click target — the icon is decorative\n * (`aria-hidden`). For two independent click targets, use `<SplitButton>`.\n * Only honored when `size` is `\"default\"` or `\"small\"`.\n */\n splitIcon?: React.ReactNode\n loading?: boolean\n size?: ButtonSize\n}\n\nconst Spinner = () => (\n <svg className=\"animate-spin\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n)\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n className,\n variant,\n size,\n fullWidth,\n noPaddingX,\n asChild,\n href,\n openInNewTab,\n prefetch,\n linkProps,\n leftIcon,\n rightIcon,\n splitIcon,\n loading,\n children,\n disabled,\n onClick,\n ...props\n },\n ref,\n) {\n const isDisabled = disabled || loading\n\n // splitIcon is only supported for default/small sizes. With other sizes\n // (icon, small-legacy) we silently fall back to the normal layout.\n const useSplitLayout = !!splitIcon && (size === \"default\" || size === \"small\" || size === undefined)\n\n if (useSplitLayout) {\n const safeSize = (size ?? \"default\") as \"default\" | \"small\"\n const safeVariant = (variant ?? \"accent\") as \"accent\" | \"outline\" | \"transparent\" | \"destructive\"\n const shellClasses = cn(\n splitShellVariants({ variant: safeVariant, size: safeSize, fullWidth }),\n className,\n )\n const mainSlotClass = splitSlotVariants({ slot: \"main\", size: safeSize, variant: safeVariant })\n const iconSlotClass = splitSlotVariants({ slot: \"icon\", size: safeSize, variant: safeVariant })\n\n const splitContent = (\n <>\n <span className={cn(\"contents\", loading && \"invisible\")}>\n <span className={mainSlotClass}>\n {leftIcon && <span className=\"inline-flex items-center\">{leftIcon}</span>}\n {children}\n {rightIcon && <span className=\"inline-flex items-center\">{rightIcon}</span>}\n </span>\n <span aria-hidden=\"true\" className={iconSlotClass}>\n {splitIcon}\n </span>\n </span>\n {loading && (\n <span className=\"absolute inset-0 inline-flex items-center justify-center text-ods-text-primary\">\n <Spinner />\n </span>\n )}\n </>\n )\n\n // `linkProps` (the pre-resolved bundle from `useNavLink({ href, targetPlatform })`)\n // wins over the legacy `href` + `openInNewTab` props so callers can thread\n // the unified nav decision directly. Either path produces the same `<Link>`.\n const splitAnchor = linkProps ?? (href ? {\n href,\n target: openInNewTab ? '_blank' as const : undefined,\n rel: openInNewTab ? 'noopener noreferrer' as const : undefined,\n onClick: onClick as unknown as React.MouseEventHandler<HTMLAnchorElement> | undefined,\n } : null)\n if (splitAnchor) {\n return (\n <Link\n href={splitAnchor.href}\n prefetch={prefetch}\n target={splitAnchor.target}\n rel={splitAnchor.rel}\n // The Link branches don't spread {...props} (button attrs don't\n // belong on an anchor), but the accessible name MUST survive —\n // icon-only link buttons have no text content.\n aria-label={props['aria-label']}\n aria-disabled={isDisabled || undefined}\n tabIndex={isDisabled ? -1 : undefined}\n className={cn(shellClasses, isDisabled && \"pointer-events-none\")}\n onClick={splitAnchor.onClick}\n >\n {splitContent}\n </Link>\n )\n }\n\n return (\n <button\n ref={ref}\n className={shellClasses}\n disabled={isDisabled}\n onClick={onClick}\n {...props}\n >\n {splitContent}\n </button>\n )\n }\n\n const classes = cn(buttonVariants({ variant, size, fullWidth, noPaddingX }), className)\n\n // asChild: consumer fully controls the rendered element; we just stamp our classes.\n if (asChild) {\n return (\n <Slot ref={ref} className={classes} {...props}>\n {children}\n </Slot>\n )\n }\n\n // Real content stays in layout (preserving width) but goes invisible while loading.\n // The spinner is absolutely positioned so it never shifts the button's size.\n const content = (\n <>\n <span className={cn(\"contents\", loading && \"invisible\")}>\n {leftIcon && <span className=\"inline-flex items-center\">{leftIcon}</span>}\n {children}\n {rightIcon && <span className=\"inline-flex items-center\">{rightIcon}</span>}\n </span>\n {loading && (\n <span className=\"absolute inset-0 inline-flex items-center justify-center text-ods-text-primary\">\n <Spinner />\n </span>\n )}\n </>\n )\n\n // Same `linkProps`-wins-over-href resolution as the splitIcon branch.\n const anchor = linkProps ?? (href ? {\n href,\n target: openInNewTab ? '_blank' as const : undefined,\n rel: openInNewTab ? 'noopener noreferrer' as const : undefined,\n onClick: onClick as unknown as React.MouseEventHandler<HTMLAnchorElement> | undefined,\n } : null)\n if (anchor) {\n return (\n <Link\n href={anchor.href}\n prefetch={prefetch}\n target={anchor.target}\n rel={anchor.rel}\n // See the splitAnchor branch — keep the accessible name on the\n // anchor render (icon-only link buttons have no text content).\n aria-label={props['aria-label']}\n aria-disabled={isDisabled || undefined}\n tabIndex={isDisabled ? -1 : undefined}\n className={cn(classes, isDisabled && \"pointer-events-none\")}\n onClick={anchor.onClick}\n >\n {content}\n </Link>\n )\n }\n\n return (\n <button\n ref={ref}\n className={classes}\n disabled={isDisabled}\n onClick={onClick}\n {...props}\n >\n {content}\n </button>\n )\n})\n\nexport { Button, buttonVariants, type ButtonProps }\n","\"use client\"\n\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport Link from \"../../../embed-shims/next-link\"\nimport React from \"react\"\n\nimport { cn } from \"../../../utils/cn\"\nimport { buttonSurfaceClasses, splitDividerColorClasses } from \"./button-styles\"\n\n// Two independent interactive halves: each a `<button>` or `<a>`. The seam is\n// a 1px border on the left edge of the icon half, colored per variant. For a\n// single-target variant (decorative trailing icon), use `<Button splitIcon>`.\n\nconst splitHalfBase = [\n \"relative inline-flex items-center justify-center gap-[var(--spacing-system-xsf)]\",\n \"whitespace-nowrap transition-colors duration-200\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus focus-visible:z-10\",\n \"disabled:pointer-events-none\",\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0\",\n]\n\nconst splitHalfVariants = cva(splitHalfBase, {\n variants: {\n variant: {\n accent: buttonSurfaceClasses.accent,\n outline: buttonSurfaceClasses.outline, // Outline border lives in compoundVariants so we can omit the seam edge.\n transparent: buttonSurfaceClasses.transparent,\n destructive: buttonSurfaceClasses.destructive,\n },\n size: {\n default: \"h-10 md:h-12 px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)] text-h3 [&_svg]:h-4 [&_svg]:w-4 md:[&_svg]:h-6 md:[&_svg]:w-6\",\n small: \"h-6 md:h-8 px-[var(--spacing-system-xs)] text-h5 [&_svg]:h-3 [&_svg]:w-3 md:[&_svg]:h-4 md:[&_svg]:w-4\",\n },\n side: { main: \"\", icon: \"\" },\n },\n compoundVariants: [\n // Rounded corners + per-variant seam. The icon-side's left border is the divider.\n { variant: \"accent\", side: \"main\", class: \"rounded-l-md\" },\n { variant: \"accent\", side: \"icon\", class: cn(\n \"rounded-r-md border-l\",\n splitDividerColorClasses.accent,\n \"disabled:border-ods-disabled aria-disabled:border-ods-disabled\",\n ) },\n { variant: \"destructive\", side: \"main\", class: \"rounded-l-md\" },\n { variant: \"destructive\", side: \"icon\", class: cn(\n \"rounded-r-md border-l\",\n splitDividerColorClasses.destructive,\n \"disabled:border-ods-disabled aria-disabled:border-ods-disabled\",\n ) },\n { variant: \"outline\", side: \"main\", class: \"rounded-l-md border-y border-l border-ods-border\" },\n { variant: \"outline\", side: \"icon\", class: \"rounded-r-md border border-ods-border\" },\n { variant: \"transparent\", side: \"main\", class: \"rounded-md\" },\n { variant: \"transparent\", side: \"icon\", class: cn(\"rounded-md\", splitDividerColorClasses.transparent) },\n\n // Icon half: per Figma, narrower than main height (default: 40×48; small: 32×32).\n { side: \"icon\", size: \"default\", class: \"w-10 px-0\" },\n { side: \"icon\", size: \"small\", class: \"w-6 md:w-8 px-0\" },\n ],\n defaultVariants: { variant: \"accent\", size: \"default\", side: \"main\" },\n})\n\ntype SplitButtonVariant = NonNullable<VariantProps<typeof splitHalfVariants>[\"variant\"]>\ntype SplitButtonSize = NonNullable<VariantProps<typeof splitHalfVariants>[\"size\"]>\n\ninterface SplitButtonIconAction {\n icon: React.ReactNode\n /** The icon half is interactive but has no visible text — needs an accessible name. */\n \"aria-label\": string\n onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>\n href?: string\n openInNewTab?: boolean\n prefetch?: boolean\n disabled?: boolean\n}\n\ninterface SplitButtonProps {\n variant?: SplitButtonVariant\n size?: SplitButtonSize\n fullWidth?: boolean\n className?: string\n\n children: React.ReactNode\n onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>\n href?: string\n openInNewTab?: boolean\n prefetch?: boolean\n leftIcon?: React.ReactNode\n rightIcon?: React.ReactNode\n /** Disables both halves. Equivalent to `mainDisabled && iconAction.disabled`. */\n disabled?: boolean\n /** Disables only the main half. Combine with `iconAction.disabled` for finer control. */\n mainDisabled?: boolean\n type?: \"button\" | \"submit\" | \"reset\"\n \"aria-label\"?: string\n groupAriaLabel?: string\n\n iconAction: SplitButtonIconAction\n}\n\ninterface HalfOptions {\n variant: SplitButtonVariant\n size: SplitButtonSize\n side: \"main\" | \"icon\"\n href?: string\n openInNewTab?: boolean\n prefetch?: boolean\n onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>\n disabled?: boolean\n /** Stretch this half to fill the group's free space (the icon half stays fixed-width). */\n grow?: boolean\n type?: \"button\" | \"submit\" | \"reset\"\n ariaLabel?: string\n children: React.ReactNode\n}\n\nfunction Half({ variant, size, side, href, openInNewTab, prefetch, onClick, disabled, grow, type = \"button\", ariaLabel, children }: HalfOptions) {\n const classes = cn(splitHalfVariants({ variant, size, side }), grow && \"flex-1\")\n\n if (href) {\n return (\n <Link\n href={href}\n prefetch={prefetch}\n target={openInNewTab ? \"_blank\" : undefined}\n rel={openInNewTab ? \"noopener noreferrer\" : undefined}\n aria-disabled={disabled || undefined}\n tabIndex={disabled ? -1 : undefined}\n aria-label={ariaLabel}\n className={cn(classes, disabled && \"pointer-events-none\")}\n onClick={onClick as unknown as React.MouseEventHandler<HTMLAnchorElement> | undefined}\n >\n {children}\n </Link>\n )\n }\n\n return (\n <button\n type={type}\n className={classes}\n disabled={disabled}\n aria-label={ariaLabel}\n onClick={onClick as React.MouseEventHandler<HTMLButtonElement>}\n >\n {children}\n </button>\n )\n}\n\nconst SplitButton = React.forwardRef<HTMLDivElement, SplitButtonProps>(function SplitButton(\n {\n variant = \"accent\",\n size = \"default\",\n fullWidth = false,\n className,\n children,\n onClick,\n href,\n openInNewTab,\n prefetch,\n leftIcon,\n rightIcon,\n disabled,\n mainDisabled,\n type,\n iconAction,\n \"aria-label\": ariaLabel,\n groupAriaLabel,\n },\n ref,\n) {\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={groupAriaLabel}\n className={cn(\"inline-flex items-stretch\", fullWidth && \"w-full\", className)}\n >\n <Half\n variant={variant}\n size={size}\n side=\"main\"\n href={href}\n openInNewTab={openInNewTab}\n prefetch={prefetch}\n onClick={onClick}\n disabled={disabled || mainDisabled}\n grow={fullWidth}\n type={type}\n ariaLabel={ariaLabel}\n >\n {leftIcon && <span className=\"inline-flex items-center\">{leftIcon}</span>}\n <span>{children}</span>\n {rightIcon && <span className=\"inline-flex items-center\">{rightIcon}</span>}\n </Half>\n <Half\n variant={variant}\n size={size}\n side=\"icon\"\n href={iconAction.href}\n openInNewTab={iconAction.openInNewTab}\n prefetch={iconAction.prefetch}\n onClick={iconAction.onClick}\n disabled={disabled || iconAction.disabled}\n ariaLabel={iconAction[\"aria-label\"]}\n >\n <span className=\"inline-flex items-center\">{iconAction.icon}</span>\n </Half>\n </div>\n )\n})\n\nexport { SplitButton, type SplitButtonProps, type SplitButtonIconAction }\n","export * from './button'\nexport * from './split-button'\n","\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../../utils/cn\"\n\nexport interface FieldWrapperProps {\n /** Label text displayed above the field */\n label?: string\n /** Status message displayed below the field. Wraps up to two lines, then ellipsizes. */\n error?: string\n /** Color variant for the message: \"error\" (red), \"warning\" (yellow), \"success\" (green) or \"muted\" (grey) */\n errorVariant?: \"error\" | \"warning\" | \"success\" | \"muted\"\n /** Additional className for the outer wrapper */\n className?: string\n children: React.ReactNode\n}\n\nconst errorVariantClasses = {\n error: \"text-ods-error\",\n warning: \"text-[var(--ods-attention-yellow-warning)]\",\n success: \"text-ods-success\",\n muted: \"text-ods-text-secondary\",\n} as const\n\nconst FieldWrapper = React.forwardRef<HTMLDivElement, FieldWrapperProps>(\n ({ label, error, errorVariant = \"error\", className, children }, ref) => {\n const hasChrome = label != null || error != null\n\n return (\n <div ref={ref} className={cn(hasChrome ? \"flex w-full flex-col\" : \"contents\", className)}>\n {label && (\n <label className=\"text-h4 text-ods-text-primary mb-1\">\n {label}\n </label>\n )}\n {children}\n {error && (\n <p\n className={cn(\"mt-1 text-h6 break-words line-clamp-2\", errorVariantClasses[errorVariant])}\n title={error}\n >\n {error}\n </p>\n )}\n </div>\n )\n }\n)\nFieldWrapper.displayName = \"FieldWrapper\"\n\nexport { FieldWrapper }\n","\"use client\"\n\nimport * as React from \"react\";\n\nimport { Loader2 } from \"lucide-react\";\nimport { cn } from \"../../utils/cn\";\nimport { FieldWrapper } from \"./field-wrapper\";\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n /** When true, renders error border & ring */\n invalid?: boolean;\n /** Element displayed at the start (left) of the input */\n startAdornment?: React.ReactNode;\n /** Element displayed at the end (right) of the input */\n endAdornment?: React.ReactNode;\n /** Label text displayed above the input */\n label?: string;\n /** Status message displayed below the input */\n error?: string;\n /** Color variant for the message: \"error\" (red), \"warning\" (yellow), \"success\" (green) or \"muted\" (grey).\n Only \"error\" and \"warning\" mark the field invalid (colored border). */\n errorVariant?: \"error\" | \"warning\" | \"success\" | \"muted\";\n /** When true, shows a loading spinner as end adornment */\n loading?: boolean;\n}\n\nconst invalidBorderClasses = {\n error: \"border-ods-error hover:border-ods-error has-[:focus]:border-ods-error\",\n warning: \"!border-[var(--ods-attention-yellow-warning)] hover:!border-[var(--ods-attention-yellow-warning)] has-[:focus]:!border-[var(--ods-attention-yellow-warning)]\",\n} as const;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, invalid = false, startAdornment, endAdornment, label, error, errorVariant = \"error\", loading = false, ...props }, ref) => {\n // success/muted are informational — they never paint the invalid border\n const variantIsInvalid = errorVariant === \"error\" || errorVariant === \"warning\"\n const isInvalid = invalid || (!!error && variantIsInvalid)\n\n // Range inputs get a clean slider rendering — no label wrapper, borders, or adornments\n if (type === 'range') {\n const rangeInput = (\n <input\n type=\"range\"\n className={cn(\n \"w-full cursor-pointer appearance-none rounded-full bg-white/30 h-1\",\n // Webkit (Chrome/Safari) thumb\n \"[&::-webkit-slider-thumb]:appearance-none\",\n \"[&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3\",\n \"[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white\",\n \"[&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:shadow-sm\",\n // Firefox thumb\n \"[&::-moz-range-thumb]:w-3 [&::-moz-range-thumb]:h-3\",\n \"[&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-white\",\n \"[&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer\",\n // Firefox track\n \"[&::-moz-range-track]:bg-transparent\",\n // Disabled\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n return label ? (\n <FieldWrapper label={label} error={error} errorVariant={errorVariant}>\n {rangeInput}\n </FieldWrapper>\n ) : rangeInput\n }\n\n const content = (\n <label\n data-invalid={isInvalid || undefined}\n className={cn(\n // Layout & spacing\n \"flex w-full items-center gap-2 rounded-[6px] border px-3 h-11 md:h-12 cursor-text\",\n // Focus-within states\n \"has-[:focus-visible]:outline-none\",\n \"group\",\n // Animations & touch UX\n \"transition-colors duration-200\",\n // Theme palette\n \"bg-ods-card border-ods-border has-[:focus]:border-ods-accent\",\n // Hover & active (not disabled)\n !props.disabled && \"hover:bg-ods-bg-hover hover:border-ods-border-hover active:bg-ods-bg-active active:border-ods-border-active\",\n // Disabled\n props.disabled && \"!cursor-not-allowed bg-ods-bg\",\n // Invalid\n isInvalid && invalidBorderClasses[variantIsInvalid ? (errorVariant as \"error\" | \"warning\") : \"error\"],\n className\n )}\n >\n {startAdornment && (\n <span className=\"text-h6 flex-shrink-0 text-ods-text-secondary transition-colors duration-200 group-has-[:focus]:text-ods-accent group-data-[invalid]:text-ods-error [&_svg]:size-4 md:[&_svg]:size-6\">\n {startAdornment}\n </span>\n )}\n <input\n type={type}\n className={cn(\n // Layout\n \"flex-1 min-w-0 bg-transparent border-none outline-none\",\n // Typography\n \"text-h4\",\n // Colors\n \"text-ods-text-primary placeholder:text-ods-text-secondary\",\n // File input adjustments\n \"file:border-0 file:bg-transparent\",\n // Disabled\n \"disabled:cursor-not-allowed disabled:text-ods-text-disabled disabled:placeholder:text-ods-border\",\n // Touch\n \"touch-manipulation\",\n // Autofill override\n \"[&:-webkit-autofill]:[-webkit-box-shadow:0_0_0_9999px_transparent_inset] [&:-webkit-autofill]:[-webkit-text-fill-color:var(--color-text-primary)] [&:-webkit-autofill]:[caret-color:var(--color-text-primary)] [&:-webkit-autofill]:[transition:background-color_9999s_ease-in-out_0s]\"\n )}\n ref={ref}\n {...props}\n />\n {loading && (\n <Loader2 className=\"animate-spin flex-shrink-0 text-ods-text-secondary size-4 md:size-6\" />\n )}\n {!loading && endAdornment && (\n <span className=\"text-h6 flex-shrink-0 text-ods-text-secondary transition-colors duration-200 group-has-[:focus]:text-ods-accent group-data-[invalid]:text-ods-error [&_svg]:size-4 md:[&_svg]:size-6\">\n {endAdornment}\n </span>\n )}\n </label>\n )\n\n return (\n <FieldWrapper label={label} error={error} errorVariant={errorVariant}>\n {content}\n </FieldWrapper>\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input };\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\n\nimport { cn } from \"../../utils/cn\"\nimport { CheckboxCheckmarkIcon } from \"../icons-v2-generated/signs-and-symbols/checkbox-checkmark-icon\"\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-ods-border bg-ods-card focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-ods-accent data-[state=checked]:border-ods-accent\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-ods-text-on-accent\")}\n >\n <CheckboxCheckmarkIcon size={10} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"../../utils/cn\"\nimport { usePortalContainer } from \"./portal-container\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-ods-bg-hover focus:bg-ods-bg-hover data-[state=open]:bg-ods-bg-hover [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border border-ods-border bg-ods-card p-1 text-ods-text-primary shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => {\n // Portal into the active container (e.g. a drawer) so the menu inherits its\n // stacking context; falls back to `document.body` when none is provided.\n const container = usePortalContainer()\n return (\n <DropdownMenuPrimitive.Portal container={container ?? undefined}>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border border-ods-border bg-ods-card p-1 text-ods-text-primary shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n})\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-base outline-none transition-colors text-ods-text-primary hover:bg-ods-bg-hover hover:text-ods-text-primary focus:bg-ods-bg-hover focus:text-ods-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors text-ods-text-primary hover:bg-ods-bg-hover hover:text-ods-text-primary focus:bg-ods-bg-hover focus:text-ods-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors text-ods-text-primary hover:bg-ods-bg-hover hover:text-ods-text-primary focus:bg-ods-bg-hover focus:text-ods-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-ods-accent\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold text-ods-text-secondary\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-ods-border\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-ods-text-secondary opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","'use client'\n\nimport * as React from 'react'\n\n/**\n * The DOM node that Radix overlays (dropdown menus, tooltips) should portal\n * into, instead of the default `document.body`.\n *\n * Portaling to `document.body` lifts content out of every local stacking\n * context, which forces overlays opened *inside* a high-z surface (e.g. the\n * chat drawer) to escalate their own z-index to compete at the document\n * root. Pointing the portal at a node *inside* that surface instead\n * lets the content inherit the surface's stacking context — small, local\n * z-indices then \"just work\" and no escalation is needed. Radix positions\n * content with `strategy: \"fixed\"`, so it still escapes ancestor\n * `overflow: hidden` clipping regardless of where it is portaled.\n *\n * Default `null` → Radix falls back to `document.body` (unchanged behaviour\n * everywhere a provider isn't present).\n */\nexport const PortalContainerContext = React.createContext<HTMLElement | null>(\n null,\n)\n\n/** Read the active portal container (or `null` to use `document.body`). */\nexport function usePortalContainer(): HTMLElement | null {\n return React.useContext(PortalContainerContext)\n}\n","\"use client\"\n\nimport * as React from 'react'\nimport { cn } from \"../../utils/cn\"\n\ninterface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n className?: string\n}\n\nconst Skeleton = React.forwardRef<HTMLDivElement, SkeletonProps>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"animate-pulse rounded-md bg-ods-border\",\n className\n )}\n {...props}\n />\n )\n }\n)\nSkeleton.displayName = 'Skeleton'\n\ninterface SkeletonTextProps extends React.HTMLAttributes<HTMLDivElement> {\n lines?: number\n className?: string\n}\n\nconst SkeletonText = React.forwardRef<HTMLDivElement, SkeletonTextProps>(\n ({ lines = 1, className, ...props }, ref) => {\n return (\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props}>\n {Array.from({ length: lines }).map((_, i) => (\n <Skeleton \n key={i} \n className={cn(\n \"h-4\",\n i === lines - 1 && lines > 1 && \"w-3/4\" // Last line shorter for multi-line\n )} \n />\n ))}\n </div>\n )\n }\n)\nSkeletonText.displayName = 'SkeletonText'\n\ninterface SkeletonCardProps extends React.HTMLAttributes<HTMLDivElement> {\n showImage?: boolean\n className?: string\n}\n\nconst SkeletonCard = React.forwardRef<HTMLDivElement, SkeletonCardProps>(\n ({ showImage = false, className, ...props }, ref) => {\n return (\n <div \n ref={ref}\n className={cn(\n \"rounded-lg border border-ods-border overflow-hidden\",\n className\n )}\n {...props}\n >\n {showImage && (\n <Skeleton className=\"h-48 w-full\" />\n )}\n <div className=\"p-6\">\n <Skeleton className=\"h-6 w-3/4 mb-4\" />\n <SkeletonText lines={3} />\n </div>\n </div>\n )\n }\n)\nSkeletonCard.displayName = 'SkeletonCard'\n\ninterface SkeletonGridProps extends React.HTMLAttributes<HTMLDivElement> {\n columns?: number\n items?: number\n showImages?: boolean\n className?: string\n}\n\nconst SkeletonGrid = React.forwardRef<HTMLDivElement, SkeletonGridProps>(\n ({ columns = 3, items = 6, showImages = false, className, ...props }, ref) => {\n return (\n <div \n ref={ref}\n className={cn(\n `grid grid-cols-1 gap-6`,\n columns === 2 && \"md:grid-cols-2\",\n columns === 3 && \"md:grid-cols-3\",\n columns === 4 && \"md:grid-cols-4\",\n className\n )}\n {...props}\n >\n {Array.from({ length: items }).map((_, i) => (\n <SkeletonCard key={i} showImage={showImages} />\n ))}\n </div>\n )\n }\n)\nSkeletonGrid.displayName = 'SkeletonGrid'\n\ninterface SkeletonButtonProps extends React.HTMLAttributes<HTMLDivElement> {\n size?: 'sm' | 'default' | 'lg'\n className?: string\n}\n\nconst SkeletonButton = React.forwardRef<HTMLDivElement, SkeletonButtonProps>(\n ({ size = 'default', className, ...props }, ref) => {\n const sizeClasses = {\n sm: 'h-8 w-20',\n default: 'h-10 w-32',\n lg: 'h-12 w-40'\n }\n \n return (\n <Skeleton \n ref={ref}\n className={cn(\n \"rounded-lg\",\n sizeClasses[size],\n className\n )}\n {...props}\n />\n )\n }\n)\nSkeletonButton.displayName = 'SkeletonButton'\n\ninterface SkeletonHeadingProps extends React.HTMLAttributes<HTMLDivElement> {\n level?: 1 | 2 | 3 | 4 | 5 | 6\n className?: string\n}\n\nconst SkeletonHeading = React.forwardRef<HTMLDivElement, SkeletonHeadingProps>(\n ({ level = 1, className, ...props }, ref) => {\n const heightClasses = {\n 1: 'h-12',\n 2: 'h-10',\n 3: 'h-8',\n 4: 'h-7',\n 5: 'h-6',\n 6: 'h-5'\n }\n \n return (\n <Skeleton \n ref={ref}\n className={cn(\n heightClasses[level],\n \"w-3/4\",\n className\n )}\n {...props}\n />\n )\n }\n)\nSkeletonHeading.displayName = 'SkeletonHeading'\n\ninterface SkeletonListProps extends React.HTMLAttributes<HTMLDivElement> {\n items?: number\n className?: string\n}\n\nconst SkeletonList = React.forwardRef<HTMLDivElement, SkeletonListProps>(\n ({ items = 5, className, ...props }, ref) => {\n return (\n <div ref={ref} className={cn(\"space-y-3\", className)} {...props}>\n {Array.from({ length: items }).map((_, i) => (\n <div key={i} className=\"flex items-center gap-3\">\n <Skeleton className=\"h-10 w-10 rounded-full flex-shrink-0\" />\n <div className=\"flex-1\">\n <Skeleton className=\"h-4 w-1/3 mb-1\" />\n <Skeleton className=\"h-3 w-1/2\" />\n </div>\n </div>\n ))}\n </div>\n )\n }\n)\nSkeletonList.displayName = 'SkeletonList'\n\ninterface SkeletonNavigationProps extends React.HTMLAttributes<HTMLDivElement> {\n items?: number\n className?: string\n}\n\nconst SkeletonNavigation = React.forwardRef<HTMLDivElement, SkeletonNavigationProps>(\n ({ items = 6, className, ...props }, ref) => {\n return (\n <div ref={ref} className={cn(\"flex items-center gap-6\", className)} {...props}>\n {Array.from({ length: items }).map((_, i) => (\n <Skeleton key={i} className=\"h-5 w-20\" />\n ))}\n </div>\n )\n }\n)\nSkeletonNavigation.displayName = 'SkeletonNavigation'\n\nexport { \n Skeleton,\n SkeletonText,\n SkeletonCard,\n SkeletonGrid,\n SkeletonButton,\n SkeletonHeading,\n SkeletonList,\n SkeletonNavigation\n}"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAKa,sBAWA,sBAIA;AApBb;AAAA;AAAA;AAKO,IAAM,uBAAuB;AAAA,MAClC,QACE;AAAA,MACF,SACE;AAAA,MACF,aACE;AAAA,MACF,aACE;AAAA,IACJ;AAEO,IAAM,uBACX;AAGK,IAAM,2BAA2B;AAAA,MACtC,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,aAAa;AAAA,MACb,aAA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,OACvD,gBAAM,KAAK,EAAE,QAAQ,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,MACrC,gBAAAC,MAAC,SAAY,WAAU,2BACrB;AAAA,sBAAAD,KAAC,YAAS,WAAU,wCAAuC;AAAA,MAC3D,gBAAAC,MAAC,SAAI,WAAU,UACb;AAAA,wBAAAD,KAAC,YAAS,WAAU,kBAAiB;AAAA,QACrC,gBAAAA,KAAC,YAAS,WAAU,aAAY;AAAA,SAClC;AAAA,SALQ,CAMV,CACD,GACH;AAAA,EAEJ;AACF;AACA,aAAa,cAAc;AAO3B,IAAM,qBAA2B;AAAA,EAC/B,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ;AAC3C,WACE,gBAAAA,KAAC,SAAI,KAAU,WAAW,GAAG,2BAA2B,SAAS,GAAI,GAAG,OACrE,gBAAM,KAAK,EAAE,QAAQ,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,MACrC,gBAAAA,KAAC,YAAiB,WAAU,cAAb,CAAwB,CACxC,GACH;AAAA,EAEJ;AACF;AACA,mBAAmB,cAAc;","names":["React","jsx","jsxs","Button","cva","React","jsx","jsxs","SplitButton","init_button","React","jsx","jsxs","React","jsx","React","React","jsx","jsxs","React","jsx","jsxs"]}
@@ -3,7 +3,7 @@ import {
3
3
  PageLayout,
4
4
  formatBioText,
5
5
  getProxiedImageUrl
6
- } from "./chunk-MGDNOZ7P.js";
6
+ } from "./chunk-CCEQDC7F.js";
7
7
  import {
8
8
  useChatRuntime
9
9
  } from "./chunk-KFQXO7QB.js";
@@ -146,4 +146,4 @@ export {
146
146
  DetailPageSkeleton,
147
147
  ArticleAuthorByline
148
148
  };
149
- //# sourceMappingURL=chunk-OU6XUJTY.js.map
149
+ //# sourceMappingURL=chunk-I6LSGR3V.js.map
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useSelfFetch
4
- } from "./chunk-DGIF3YDV.js";
4
+ } from "./chunk-FFCGB73K.js";
5
5
  import {
6
6
  PageLayout,
7
7
  PageShell,
@@ -11,12 +11,12 @@ import {
11
11
  faqSectionSlug,
12
12
  parseFaqHash,
13
13
  serializeJsonLd
14
- } from "./chunk-MGDNOZ7P.js";
14
+ } from "./chunk-CCEQDC7F.js";
15
15
  import {
16
16
  STICKY_HEADER_OFFSET_PX,
17
17
  navigateSamePageHash,
18
18
  useScrollToHash
19
- } from "./chunk-4FNDOTW2.js";
19
+ } from "./chunk-OMUCATVA.js";
20
20
  import {
21
21
  Chevron02DownIcon
22
22
  } from "./chunk-OYGFWWLQ.js";
@@ -382,4 +382,4 @@ export {
382
382
  FaqSection,
383
383
  FaqDocumentPage
384
384
  };
385
- //# sourceMappingURL=chunk-O6YUQ5U6.js.map
385
+ //# sourceMappingURL=chunk-IKWWXX4V.js.map
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
2
 
3
3
 
4
- var _chunkG2G7HLEMcjs = require('./chunk-G2G7HLEM.cjs');
4
+ var _chunkZKIYCRVQcjs = require('./chunk-ZKIYCRVQ.cjs');
5
5
 
6
6
 
7
7
 
@@ -11,12 +11,12 @@ var _chunkG2G7HLEMcjs = require('./chunk-G2G7HLEM.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunkR4KADR27cjs = require('./chunk-R4KADR27.cjs');
14
+ var _chunkSUOPU3OEcjs = require('./chunk-SUOPU3OE.cjs');
15
15
 
16
16
 
17
17
 
18
18
 
19
- var _chunk3SNDISENcjs = require('./chunk-3SNDISEN.cjs');
19
+ var _chunkSR6LEWCFcjs = require('./chunk-SR6LEWCF.cjs');
20
20
 
21
21
 
22
22
  var _chunkBGD345ZVcjs = require('./chunk-BGD345ZV.cjs');
@@ -70,7 +70,7 @@ function FaqAccordion({ items, defaultOpenIds = [] }) {
70
70
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
71
71
  "div",
72
72
  {
73
- id: _chunkR4KADR27cjs.faqItemAnchor.call(void 0, item.id),
73
+ id: _chunkSUOPU3OEcjs.faqItemAnchor.call(void 0, item.id),
74
74
  className: "scroll-mt-24 transition-colors hover:bg-ods-bg-hover",
75
75
  children: [
76
76
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -151,7 +151,7 @@ function buildFaqJsonLdFromFaqs(faqs, opts = {}) {
151
151
 
152
152
  var DEFAULT_HEADING_TEXT = "Frequently Asked Questions";
153
153
  function buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl = "") {
154
- return _chunkR4KADR27cjs.buildSuggestionUrl.call(void 0, "/api/faqs", { apiBaseUrl, entityType, entityId, count: minResults });
154
+ return _chunkSUOPU3OEcjs.buildSuggestionUrl.call(void 0, "/api/faqs", { apiBaseUrl, entityType, entityId, count: minResults });
155
155
  }
156
156
  function groupFaqsBySection(faqs) {
157
157
  const order = [];
@@ -167,7 +167,7 @@ function groupFaqsBySection(faqs) {
167
167
  }
168
168
  let group = byName.get(name);
169
169
  if (!group) {
170
- group = { section: name, slug: _chunkR4KADR27cjs.faqSectionSlug.call(void 0, name), items: [] };
170
+ group = { section: name, slug: _chunkSUOPU3OEcjs.faqSectionSlug.call(void 0, name), items: [] };
171
171
  byName.set(name, group);
172
172
  order.push(name);
173
173
  }
@@ -207,7 +207,7 @@ function GroupedFaqList({
207
207
  }
208
208
  if (bestId) setActiveSlug(bestId);
209
209
  },
210
- { rootMargin: `-${_chunk3SNDISENcjs.STICKY_HEADER_OFFSET_PX}px 0px -55% 0px`, threshold: 0 }
210
+ { rootMargin: `-${_chunkSR6LEWCFcjs.STICKY_HEADER_OFFSET_PX}px 0px -55% 0px`, threshold: 0 }
211
211
  );
212
212
  for (const group of navGroups) {
213
213
  const el = group.slug ? document.getElementById(group.slug) : null;
@@ -217,7 +217,7 @@ function GroupedFaqList({
217
217
  }, [slugKey]);
218
218
  const [hashTarget, setHashTarget] = _react.useState.call(void 0, null);
219
219
  _react.useEffect.call(void 0, () => {
220
- const refresh = () => setHashTarget(_chunkR4KADR27cjs.parseFaqHash.call(void 0, window.location.hash));
220
+ const refresh = () => setHashTarget(_chunkSUOPU3OEcjs.parseFaqHash.call(void 0, window.location.hash));
221
221
  refresh();
222
222
  window.addEventListener("hashchange", refresh);
223
223
  return () => window.removeEventListener("hashchange", refresh);
@@ -234,15 +234,15 @@ function GroupedFaqList({
234
234
  }, [groups, hashTarget]);
235
235
  const accordionKeySuffix = _optionalChain([hashTarget, 'optionalAccess', _8 => _8.kind]) === "item" ? `item:${hashTarget.rawId}` : "default";
236
236
  const scrollDep = `${groups.length}|` + (_optionalChain([hashTarget, 'optionalAccess', _9 => _9.kind]) === "item" ? `item:${hashTarget.rawId}` : _optionalChain([hashTarget, 'optionalAccess', _10 => _10.kind]) === "section" ? `section:${hashTarget.slug}` : "none");
237
- _chunk3SNDISENcjs.useScrollToHash.call(void 0, scrollDep, { headerOffset: _chunk3SNDISENcjs.STICKY_HEADER_OFFSET_PX });
237
+ _chunkSR6LEWCFcjs.useScrollToHash.call(void 0, scrollDep, { headerOffset: _chunkSR6LEWCFcjs.STICKY_HEADER_OFFSET_PX });
238
238
  _react.useEffect.call(void 0, () => {
239
239
  if (_optionalChain([hashTarget, 'optionalAccess', _11 => _11.kind]) === "section") setActiveSlug(hashTarget.slug);
240
240
  }, [hashTarget]);
241
241
  const handleJump = _react.useCallback.call(void 0,
242
242
  (e, slug) => {
243
243
  e.preventDefault();
244
- _chunk3SNDISENcjs.navigateSamePageHash.call(void 0, "#" + slug, {
245
- headerOffset: _chunk3SNDISENcjs.STICKY_HEADER_OFFSET_PX,
244
+ _chunkSR6LEWCFcjs.navigateSamePageHash.call(void 0, "#" + slug, {
245
+ headerOffset: _chunkSR6LEWCFcjs.STICKY_HEADER_OFFSET_PX,
246
246
  history: "replace"
247
247
  });
248
248
  },
@@ -274,7 +274,7 @@ function GroupedFaqList({
274
274
  id: _nullishCoalesce(group.slug, () => ( void 0)),
275
275
  className: "scroll-mt-24 space-y-4",
276
276
  children: [
277
- group.section && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CategoryHeading, { className: _chunkR4KADR27cjs.SECTION_HEADING_CLASS, children: group.section }),
277
+ group.section && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CategoryHeading, { className: _chunkSUOPU3OEcjs.SECTION_HEADING_CLASS, children: group.section }),
278
278
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
279
279
  FaqAccordion,
280
280
  {
@@ -315,10 +315,10 @@ function FaqSection({
315
315
  () => initialFaqs ? { faqs: initialFaqs } : void 0,
316
316
  [initialFaqs]
317
317
  );
318
- const { data, isLoading, error } = _chunkG2G7HLEMcjs.useSelfFetch.call(void 0, url, { initialData });
318
+ const { data, isLoading, error } = _chunkZKIYCRVQcjs.useSelfFetch.call(void 0, url, { initialData });
319
319
  const faqs = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _14 => _14.faqs]), () => ( []));
320
320
  const groups = _react.useMemo.call(void 0, () => faqs.length > 0 ? groupFaqsBySection(faqs) : [], [faqs]);
321
- const headingNode = heading === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: _chunkR4KADR27cjs.SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
321
+ const headingNode = heading === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: _chunkSUOPU3OEcjs.SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
322
322
  if (error) return null;
323
323
  if (!isLoading && faqs.length === 0) return null;
324
324
  if (isLoading && faqs.length === 0) {
@@ -334,7 +334,7 @@ function FaqSection({
334
334
  "script",
335
335
  {
336
336
  type: "application/ld+json",
337
- dangerouslySetInnerHTML: { __html: _chunkR4KADR27cjs.serializeJsonLd.call(void 0, schema) }
337
+ dangerouslySetInnerHTML: { __html: _chunkSUOPU3OEcjs.serializeJsonLd.call(void 0, schema) }
338
338
  }
339
339
  )
340
340
  ] });
@@ -361,7 +361,7 @@ function FaqDocumentPage({
361
361
  label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _15 => _15.label]), () => ( "Back to home")),
362
362
  onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _16 => _16.href]), () => ( "/")))
363
363
  };
364
- const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR4KADR27cjs.PageLayout, { title, subtitle, backButton: backCfg, titleSize: "h1", titleWrap: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
364
+ const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSUOPU3OEcjs.PageLayout, { title, subtitle, backButton: backCfg, titleSize: "h1", titleWrap: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
365
365
  FaqSection,
366
366
  {
367
367
  initialFaqs,
@@ -374,7 +374,7 @@ function FaqDocumentPage({
374
374
  minResults
375
375
  }
376
376
  ) });
377
- return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR4KADR27cjs.PageShell, { children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: inner });
377
+ return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSUOPU3OEcjs.PageShell, { children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: inner });
378
378
  }
379
379
 
380
380
 
@@ -382,4 +382,4 @@ function FaqDocumentPage({
382
382
 
383
383
 
384
384
  exports.FaqAccordion = FaqAccordion; exports.FaqSection = FaqSection; exports.FaqDocumentPage = FaqDocumentPage;
385
- //# sourceMappingURL=chunk-7VIUTGVQ.cjs.map
385
+ //# sourceMappingURL=chunk-LAGZ56MO.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-7VIUTGVQ.cjs","../src/components/faq/faq-section.tsx","../src/components/faq-accordion.tsx","../src/components/faq/json-ld.ts","../src/components/faq/faq-document-page.tsx"],"names":["jsx","jsxs"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;AC7BA,8BAAiE;AD+BjE;AACA;AEhCA;AAEA,uCAAA,CAAA;AAoEY,+CAAA;AArDZ,IAAM,kBAAA,EAAoB,CAAC,MAAA,EAAA,GAAoB;AAC7C,EAAA,MAAM,IAAA,EAAM,2BAAA,IAAkC,CAAA;AAC9C,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,EAAA,EAAI,6BAAA,KAAsB,CAAA;AAExD,EAAA,MAAM,QAAA,EAAU,gCAAA,CAAY,EAAA,GAAM;AAChC,IAAA,GAAA,CAAI,GAAA,CAAI,OAAA,EAAS;AACf,MAAA,MAAM,OAAA,EAAS,GAAA,CAAI,OAAA,CAAQ,YAAA;AAC3B,MAAA,YAAA,CAAa,CAAA,EAAA;AACf,IAAA;AACG,EAAA;AAGW,EAAA;AACF,IAAA;AACF,MAAA;AACH,IAAA;AACQ,MAAA;AACf,IAAA;AACU,EAAA;AAEE,EAAA;AAChB;AAEgB;AACE,EAAA;AAEA,EAAA;AACH,IAAA;AACI,MAAA;AACA,MAAA;AACC,MAAA;AAC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AeP,MAAA;AAGN,IAAA;AACF,EAAA;AAEJ;AAES;AAEL,EAAA;AACEA,oBAAAA;AACAA,oBAAAA;AAGM,sBAAA;AACA,sBAAA;AAGN,IAAA;AACF,EAAA;AAEJ;AAuB2B;AACzB,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACa,EAAA;AACb,EAAA;AACA,EAAA;AACA,EAAA;AACa,EAAA;AACK;AACN,EAAA;AAGN,EAAA;AACG,IAAA;AACK,IAAA;AACd,EAAA;AACc,EAAA;AAED,EAAA;AAEE,EAAA;AAKT,EAAA;AAKY,EAAA;AACA,EAAA;AACD,EAAA;AAEb,IAAA;AAIJ,EAAA;AAEe,EAAA;AAGb,EAAA;AACEC,oBAAAA;AACG,MAAA;AACD,sBAAA;AACF,IAAA;AAEE,IAAA;AAAC,MAAA;AAAA,MAAA;AACM,QAAA;AAIL,QAAA;AAA2D,MAAA;AAC7D,IAAA;AAEJ,EAAA;AAEJ;ADvEoB;AACA;AI9TpB;AA8DMD;AA5BU;AACN,EAAA;AACR,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACQ,EAAA;AACe;AACR,EAAA;AAMb,EAAA;AAGa,IAAA;AACQ,IAAA;AACjB,EAAA;AAGJ,EAAA;AACG,IAAA;AAAA,IAAA;AACC,MAAA;AACS,MAAA;AACT,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AAAA,IAAA;AAEJ,EAAA;AAGa,EAAA;AACjB;AJsRoB;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-7VIUTGVQ.cjs","sourcesContent":[null,"\"use client\"\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport type { Faq } from '../../types/faq'\nimport { FaqAccordion, type FaqItem } from '../faq-accordion'\nimport { useSelfFetch } from '../../hooks/use-self-fetch'\nimport { buildSuggestionUrl } from '../../utils/suggestion-url'\nimport { serializeJsonLd } from '../../utils/common'\nimport { useScrollToHash } from '../../hooks/use-scroll-to-hash'\nimport { navigateSamePageHash, STICKY_HEADER_OFFSET_PX } from '../../utils/same-page-hash-nav'\nimport { faqSectionSlug, parseFaqHash, type FaqHashTarget } from '../../utils/faq-anchor'\nimport { cn } from '../../utils/cn'\nimport { buildFaqJsonLdFromFaqs, type FaqSchemaOptions } from './json-ld'\nimport { SECTION_HEADING_CLASS } from '../layout/page-heading'\n\nexport interface FaqSectionProps {\n /**\n * SSR hydrate. When provided, the hook skips the first client fetch (per\n * useSelfFetch contract). The consuming server page resolves FAQs then drills\n * them into this prop — the lib never re-fetches what the host already gated on.\n */\n initialFaqs?: Faq[]\n /** Both required together for entity-attached FAQs; partial → bare /api/faqs. */\n entityType?: string\n entityId?: number | string\n /**\n * Heading node above the grouped list. `undefined` → default\n * `<h2>`\"Frequently Asked Questions\". `null` → no heading (the host page\n * owns the `<h1>`, as the standalone /faqs surface does). A React node lets a\n * platform drill its own <PageHeading> without the lib referencing platform\n * state. Also drives category nesting so the document outline stays correct:\n * `null` → categories render `<h2>` (directly under the page `<h1>`);\n * otherwise categories render `<h3>` beneath this heading.\n */\n heading?: React.ReactNode | null\n /** Inject FAQPage schema.org JSON-LD as a <script>. Off by default so embeds\n * don't emit duplicate schema. */\n emitJsonLd?: boolean\n /** Overrides for the JSON-LD's name/description/url. */\n jsonLd?: FaqSchemaOptions\n className?: string\n /** Maps to /api/faqs `?count=` (the 5-tier fill target). Absent → param\n * not sent (server default applies). */\n minResults?: number\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin relative). */\n apiBaseUrl?: string\n}\n\nconst DEFAULT_HEADING_TEXT = 'Frequently Asked Questions'\n\n/** URL composition shared with RelatedContentSection (`buildSuggestionUrl`)\n * — byte-identical to the historical `buildFaqsUrl` output when\n * `minResults`/`apiBaseUrl` are absent. */\nfunction buildFaqsUrl(\n entityType?: string,\n entityId?: number | string,\n minResults?: number,\n apiBaseUrl = '',\n): string {\n return buildSuggestionUrl('/api/faqs', { apiBaseUrl, entityType, entityId, count: minResults })\n}\n\ninterface FaqGroup {\n /** null → the uncategorized bucket: no heading, no jump pill, rendered last. */\n section: string | null\n slug: string | null\n items: FaqItem[]\n}\n\n/** Group FAQs by `faq.section`, preserving the server's first-seen\n * (display_order) order for BOTH the section order and the rows within each\n * section. The uncategorized bucket (blank/missing section) sinks to the end\n * since it renders without a heading. Items carry NO badge here — the `<h2>`\n * IS the category, so a per-row chip would be redundant. */\nfunction groupFaqsBySection(faqs: Faq[]): FaqGroup[] {\n const order: string[] = []\n const byName = new Map<string, FaqGroup>()\n let uncategorized: FaqGroup | null = null\n for (const faq of faqs) {\n const item: FaqItem = { id: faq.id, question: faq.question, answer: faq.answer }\n const name = faq.section?.trim()\n if (!name) {\n if (!uncategorized) uncategorized = { section: null, slug: null, items: [] }\n uncategorized.items.push(item)\n continue\n }\n let group = byName.get(name)\n if (!group) {\n group = { section: name, slug: faqSectionSlug(name), items: [] }\n byName.set(name, group)\n order.push(name)\n }\n group.items.push(item)\n }\n const groups = order.map((name) => byName.get(name)!)\n if (uncategorized) groups.push(uncategorized)\n return groups\n}\n\n\n/** Map key for the uncategorized bucket — `group.slug` is null for it, so\n * every per-group map (default-open ids, accordion keys) uses this sentinel\n * to keep the lookup typed. */\nconst UNCATEGORIZED_KEY = '__uncategorized__'\nconst groupKey = (g: FaqGroup): string => g.slug ?? UNCATEGORIZED_KEY\n\n/**\n * Grouped FAQ layout: a category jump-nav above stacked `<h2>` category\n * sections (each its own accordion). Isolated into its own component so the\n * scroll-spy hooks only mount in grouped mode — `FaqSection`'s own hooks stay\n * unconditional.\n *\n * The pills are real `<a href=\"#slug\">` anchors (crawlable in-page links,\n * deep-linkable, work without JS); the click handler upgrades the jump to the\n * cancellation-proof `scrollElementIntoView` tween and syncs the URL hash.\n */\nfunction GroupedFaqList({\n groups,\n categoryHeadingAs,\n}: {\n groups: FaqGroup[]\n /** Heading tag for each category, so the document outline nests correctly\n * under whatever owns the heading above this block: `h2` on the standalone\n * page (the page owns the `<h1>`), `h3` beneath an embed's `<h2>` title.\n * The VISUAL is `SECTION_HEADING_CLASS` either way, so categories look\n * identical on every surface. */\n categoryHeadingAs: 'h2' | 'h3'\n}) {\n const CategoryHeading = categoryHeadingAs\n const navGroups = useMemo(() => groups.filter((g) => g.slug), [groups])\n const [activeSlug, setActiveSlug] = useState<string | null>(navGroups[0]?.slug ?? null)\n // Identity-stable key for the section set so the observer re-binds only when\n // the categories actually change (not on every parent re-render).\n const slugKey = navGroups.map((g) => g.slug).join('|')\n\n // Scroll-spy: mark the pill for the category currently at the top of the\n // viewport. rootMargin drops the trigger line just below the sticky header\n // and ignores the bottom ~55% so \"active\" is the section being read, not the\n // next one peeking in.\n useEffect(() => {\n if (navGroups.length < 2) return\n const tops = new Map<string, number>()\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n const id = (entry.target as HTMLElement).id\n if (entry.isIntersecting) tops.set(id, entry.boundingClientRect.top)\n else tops.delete(id)\n }\n let bestId: string | null = null\n let bestTop = Number.POSITIVE_INFINITY\n for (const [id, top] of tops) {\n if (top < bestTop) {\n bestTop = top\n bestId = id\n }\n }\n if (bestId) setActiveSlug(bestId)\n },\n { rootMargin: `-${STICKY_HEADER_OFFSET_PX}px 0px -55% 0px`, threshold: 0 },\n )\n for (const group of navGroups) {\n const el = group.slug ? document.getElementById(group.slug) : null\n if (el) observer.observe(el)\n }\n return () => observer.disconnect()\n // slugKey encodes the section set; re-observe only when it changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [slugKey])\n\n // ─── Hash dispatch — `/faqs#faq-item-<id>` or `/faqs#faq-<section-slug>` ──\n // Tracks the current hash so:\n // 1. an item-kind hash seeds `defaultOpenIds` on the matching accordion\n // (auto-expands the cited question);\n // 2. either kind triggers the cancellation-proof tween scroll with the\n // sticky-header offset (native browser hash scroll runs once, ignores\n // our offset — re-running the tween puts the target in the right spot).\n // Listens to `hashchange` so back/forward replays the same behavior. SSR-\n // safe: initial null state matches the server render; the first effect\n // tick on the client updates it.\n const [hashTarget, setHashTarget] = useState<FaqHashTarget | null>(null)\n useEffect(() => {\n const refresh = () => setHashTarget(parseFaqHash(window.location.hash))\n refresh()\n window.addEventListener('hashchange', refresh)\n return () => window.removeEventListener('hashchange', refresh)\n }, [])\n\n // Per-group default-open set when the hash points at an item. The map key\n // matches `groupKey(group)` so the render-time lookup is O(1) per group.\n const defaultOpenByGroupKey = useMemo(() => {\n if (hashTarget?.kind !== 'item') return null\n const targetId = hashTarget.rawId\n const result = new Map<string, (string | number)[]>()\n for (const group of groups) {\n const hit = group.items.find((i) => String(i.id) === targetId)\n if (hit) result.set(groupKey(group), [hit.id])\n }\n return result.size > 0 ? result : null\n }, [groups, hashTarget])\n\n // Accordion is uncontrolled — `defaultOpenIds` is only consumed at mount,\n // so a new item hash needs a remount to honor it. Keying off the item-id\n // suffix triggers exactly the remount we need (and stays stable when the\n // hash points at a section, so category navigation never disturbs the\n // accordion's open state).\n const accordionKeySuffix =\n hashTarget?.kind === 'item' ? `item:${hashTarget.rawId}` : 'default'\n\n // Unified scroll-to-hash: rAF-polls for the target row (outlasts the SWR self-fetch\n // + Radix accordion expand) and re-fires on `hashchange` — including the synthetic\n // event `navigateSamePageHash` dispatches for a SOFT same-page chat-card nav (a\n // host-router `pushState` fires no `hashchange`). The ready-dep keys off BOTH the\n // loaded `groups` (so a deep-link / refresh scrolls once the self-fetched list\n // mounts) AND `hashTarget` (so a soft nav re-runs the scroll AFTER the re-render\n // that remounts + opens the cited row, landing on its FINAL expanded position\n // instead of racing the uncontrolled accordion's key-remount — the bare-`hashchange`\n // listener alone fires before the remount and lands on the stale closed position).\n const scrollDep =\n `${groups.length}|` +\n (hashTarget?.kind === 'item'\n ? `item:${hashTarget.rawId}`\n : hashTarget?.kind === 'section'\n ? `section:${hashTarget.slug}`\n : 'none')\n useScrollToHash(scrollDep, { headerOffset: STICKY_HEADER_OFFSET_PX })\n\n // A section hash also lights up its category pill; item hashes leave the pills\n // untouched so deep-linking a question never disturbs scroll-spy state.\n useEffect(() => {\n if (hashTarget?.kind === 'section') setActiveSlug(hashTarget.slug)\n }, [hashTarget])\n\n // Category pill click. `navigateSamePageHash` owns the entire transition:\n // replaceState → synthetic `hashchange` → `scrollElementIntoView` tween\n // with `STICKY_HEADER_OFFSET_PX` so the section heading lands BELOW the\n // sticky category nav on the FIRST tween (covers the same-target\n // re-click case, where the `hashTarget` effect at L214 is a no-op\n // because the state reference is equal). For DIFFERENT-target clicks\n // the helper's synthetic `hashchange` re-fires that effect, which\n // re-scrolls with the same offset and cancels this tween (singleton)\n // — both paths land at the same position. The effect is still\n // required for back/forward + direct URL edits, where the helper\n // isn't in the call chain.\n //\n // `history: 'replace'` matches the pre-helper behavior: category pills\n // are a TOC, not a navigation step, so the Back button leaves the\n // FAQ page in one step regardless of how many categories the user\n // clicked through.\n const handleJump = useCallback(\n (e: React.MouseEvent<HTMLAnchorElement>, slug: string) => {\n e.preventDefault()\n navigateSamePageHash('#' + slug, {\n headerOffset: STICKY_HEADER_OFFSET_PX,\n history: 'replace',\n })\n },\n [],\n )\n\n return (\n <div className=\"space-y-8\">\n {navGroups.length > 1 && (\n <nav aria-label=\"FAQ categories\" className=\"flex flex-wrap gap-2\">\n {navGroups.map((group) => {\n const isActive = group.slug === activeSlug\n return (\n <a\n key={group.slug}\n href={`#${group.slug}`}\n aria-current={isActive ? 'true' : undefined}\n onClick={(e) => handleJump(e, group.slug as string)}\n className={cn(\n \"rounded-full border px-4 py-2 text-sm font-medium font-['DM_Sans'] transition-colors\",\n isActive\n ? 'border-ods-text-primary bg-ods-card text-ods-text-primary'\n : 'border-ods-border bg-ods-card text-ods-text-secondary hover:border-ods-text-secondary hover:text-ods-text-primary',\n )}\n >\n {group.section}\n </a>\n )\n })}\n </nav>\n )}\n <div className=\"space-y-10\">\n {groups.map((group) => {\n const key = groupKey(group)\n return (\n <section\n key={key}\n id={group.slug ?? undefined}\n className=\"scroll-mt-24 space-y-4\"\n >\n {group.section && (\n <CategoryHeading className={SECTION_HEADING_CLASS}>{group.section}</CategoryHeading>\n )}\n <FaqAccordion\n // Re-key on item-hash changes so the remount picks up the new\n // `defaultOpenIds` (the accordion is uncontrolled). Stable for\n // section hashes — category navigation doesn't disturb state.\n key={`${key}:${accordionKeySuffix}`}\n items={group.items}\n defaultOpenIds={defaultOpenByGroupKey?.get(key)}\n />\n </section>\n )\n })}\n </div>\n </div>\n )\n}\n\nfunction FaqSkeleton() {\n return (\n <div className=\"space-y-8 animate-pulse\">\n <div className=\"h-12 md:h-14 w-2/3 rounded bg-ods-border\" />\n <div className=\"rounded-md border border-ods-border overflow-hidden bg-transparent divide-y divide-ods-border w-full\">\n {Array.from({ length: 8 }).map((_, idx) => (\n <div key={idx} className=\"flex items-center justify-between gap-6 md:gap-10 px-6 py-4\">\n <div className=\"h-6 w-5/6 rounded bg-ods-border\" />\n <div className=\"size-6 rounded bg-ods-border\" />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\ninterface FaqsResponse {\n faqs: Faq[]\n}\n\n/**\n * The FAQ display surface — ONE rendering on every host: the list grouped by\n * `faq.section` (each category a heading + its own accordion, with a category\n * jump-nav once there are 2+ categories). There is no flat/ungrouped mode and\n * no page-vs-embedded shell fork; the standalone /faqs page and every embed\n * render through this single path, so they cannot drift.\n *\n * - Standalone /faqs page: pass `initialFaqs` (SSR) + `heading={null}` (the\n * page owns the <h1>) + `emitJsonLd` with `jsonLd` overrides for SEO.\n * - Per-entity embed: pass `entityType` + `entityId` (no `initialFaqs`); the\n * hook self-fetches `GET /api/faqs`, and `heading` is this block's own <h2>.\n *\n * CONTRACT: the consuming app MUST implement `GET /api/faqs`. On a fetch error\n * (or zero FAQs) the component renders nothing so the host page isn't\n * disfigured. The host always supplies the page shell — this renders a bare\n * <section>.\n */\nexport function FaqSection({\n initialFaqs,\n entityType,\n entityId,\n heading,\n emitJsonLd = false,\n jsonLd,\n className,\n minResults,\n apiBaseUrl = '',\n}: FaqSectionProps) {\n const url = buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl)\n // Memoized — useSelfFetch re-syncs on [initialData]; a fresh per-render\n // wrapper object would setState-loop under re-rendering parents.\n const initialData = useMemo<FaqsResponse | undefined>(\n () => (initialFaqs ? { faqs: initialFaqs } : undefined),\n [initialFaqs],\n )\n const { data, isLoading, error } = useSelfFetch<FaqsResponse>(url, { initialData })\n\n const faqs = data?.faqs ?? []\n // Grouped before the early returns so the hook order stays stable.\n const groups = useMemo(() => (faqs.length > 0 ? groupFaqsBySection(faqs) : []), [faqs])\n\n // `undefined` → default <h2> title; `null` → the host page owns the <h1>, so\n // no title renders here. `heading === null` also makes the category headings\n // <h2> (directly under the page <h1>); otherwise they nest as <h3>.\n const headingNode =\n heading === undefined ? <h2 className={SECTION_HEADING_CLASS}>{DEFAULT_HEADING_TEXT}</h2> : heading\n\n // Degrade silently — never show an error banner or an empty section shell\n // where FAQs would be (host pages and the standalone surface both rely on it).\n if (error) return null\n if (!isLoading && faqs.length === 0) return null\n if (isLoading && faqs.length === 0) {\n return (\n <div className={className}>\n <FaqSkeleton />\n </div>\n )\n }\n\n const schema = emitJsonLd ? buildFaqJsonLdFromFaqs(faqs, jsonLd) : null\n\n return (\n <>\n <section className={className ?? 'space-y-10'}>\n {headingNode}\n <GroupedFaqList groups={groups} categoryHeadingAs={heading === null ? 'h2' : 'h3'} />\n </section>\n {schema && (\n <script\n type=\"application/ld+json\"\n // eslint-disable-next-line react/no-danger\n // serializeJsonLd, NOT raw JSON.stringify — FAQ answers are\n // admin-entered; an embedded \"</script>\" must not break the tag.\n dangerouslySetInnerHTML={{ __html: serializeJsonLd(schema) }}\n />\n )}\n </>\n )\n}\n","\"use client\"\n\nimport React, { useRef, useState, useEffect, useCallback } from 'react'\nimport { Chevron02DownIcon } from './icons-v2-generated/arrows/chevron-02-down-icon'\nimport { cn } from \"../utils/cn\"\nimport { faqItemAnchor } from \"../utils/faq-anchor\"\n\nexport interface FaqItem {\n id: number | string\n question: string\n answer: string\n}\n\ninterface FaqAccordionProps {\n items: FaqItem[]\n defaultOpenIds?: (number | string)[]\n}\n\n// Utility to measure scrollHeight outside render cycle\nconst useMeasuredHeight = (isOpen: boolean) => {\n const ref = useRef<HTMLDivElement | null>(null)\n const [maxHeight, setMaxHeight] = useState<string>('0px')\n\n const measure = useCallback(() => {\n if (ref.current) {\n const height = ref.current.scrollHeight\n setMaxHeight(`${height}px`)\n }\n }, [])\n\n // Update height only when section is open\n useEffect(() => {\n if (isOpen) {\n measure()\n } else {\n setMaxHeight('0px')\n }\n }, [isOpen, measure])\n\n return { ref, maxHeight }\n}\n\nexport function FaqAccordion({ items, defaultOpenIds = [] }: FaqAccordionProps) {\n const [openSet, setOpenSet] = useState<Set<string | number>>(new Set(defaultOpenIds))\n\n const toggle = (id: string | number) => {\n setOpenSet(prev => {\n const next = new Set(prev)\n if (next.has(id)) next.delete(id)\n else next.add(id)\n return next\n })\n }\n\n return (\n <div className=\"rounded-md border border-ods-border divide-y divide-ods-border bg-transparent overflow-hidden\">\n {items.map(item => {\n const isOpen = openSet.has(item.id)\n const { ref, maxHeight } = useMeasuredHeight(isOpen)\n\n return (\n <div\n key={item.id}\n // Per-row anchor — chat citation chips (`/faqs#faq-item-<id>`) land\n // here via native browser hash scroll AND via `FaqSection`'s tween\n // dispatch. `scroll-mt-24` keeps the row header below the 96px\n // sticky nav offset (matches `<section>`'s scroll-margin for\n // category anchors).\n id={faqItemAnchor(item.id)}\n className=\"scroll-mt-24 transition-colors hover:bg-ods-bg-hover\"\n >\n {/* Header */}\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => toggle(item.id)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n toggle(item.id);\n }\n }}\n aria-expanded={isOpen}\n className=\"flex w-full items-center gap-6 md:gap-10 px-6 py-4 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-focus transition-colors cursor-pointer\"\n >\n <h3 className=\"flex-1 min-w-0 break-words\">\n {item.question}\n </h3>\n <Chevron02DownIcon\n aria-hidden=\"true\"\n size={24}\n className={cn(\n 'shrink-0 text-ods-text-primary transition-transform duration-300',\n isOpen && 'rotate-180',\n )}\n />\n </div>\n {/* Content wrapper with max-height animation */}\n <div\n style={{ maxHeight, transition: 'max-height 0.35s ease-in-out, opacity 0.35s ease-in-out', opacity: isOpen ? 1 : 0 }}\n className=\"overflow-hidden\"\n >\n {/* break-words: FAQ answers render as plain text, so a long URL or\n token has no wrap opportunity — and the parent is overflow-hidden,\n which would CLIP it past the viewport on mobile. Mirrors the\n markdown-renderer overflow-wrap fix. */}\n <div ref={ref} className=\"px-6 pb-4 text-ods-text-primary text-h4 break-words\">\n {item.answer}\n </div>\n </div>\n </div>\n )\n })}\n </div>\n )\n} ","/**\n * Pure FAQ JSON-LD builder. No React, no client-only deps — safe to import from\n * Server Components via the `./components/faq` subpath export. (Do NOT import\n * through the root `./components` barrel — that barrel is `\"use client\"` and\n * dragging it into a Server Component would force the client graph into the\n * server.)\n *\n * The hub used to harcode `name`/`description` here for OpenMSP; in the lib we\n * accept overrides so every embedder can supply its own platform branding.\n */\nimport type { Faq } from '../../types/faq'\n\nexport interface FaqSchemaOptions {\n name?: string\n description?: string\n url?: string\n}\n\nconst DEFAULT_NAME = 'Frequently Asked Questions'\nconst DEFAULT_DESCRIPTION =\n 'Answers to common questions.'\n\nexport function baseFaqSchema(opts: FaqSchemaOptions = {}) {\n return {\n '@context': 'https://schema.org',\n '@type': 'FAQPage',\n name: opts.name ?? DEFAULT_NAME,\n description: opts.description ?? DEFAULT_DESCRIPTION,\n ...(opts.url ? { url: opts.url } : {}),\n } as const\n}\n\nexport function buildFaqJsonLdFromFaqs(faqs: Faq[], opts: FaqSchemaOptions = {}) {\n return {\n ...baseFaqSchema(opts),\n mainEntity: faqs.map((faq) => ({\n '@type': 'Question',\n name: faq.question,\n acceptedAnswer: {\n '@type': 'Answer',\n text: faq.answer,\n },\n })),\n } as const\n}\n","'use client';\n\n/**\n * FaqDocumentPage — the full `/faqs` page with chrome, so embedders drop in\n * ONE component instead of hand-assembling `PageShell` + `PageLayout` around\n * the bare `<FaqSection>`. Mirrors `LegalDocumentPage` / `DevSectionPage`: the\n * page-level layout lives in the lib, the host page is a thin wrapper that\n * passes only config + the SSR-resolved data.\n *\n * HERO: the title + subtitle route through the canonical (frozen) `PageLayout`\n * `TitleBlock` with `titleSize=\"h1\"` — the unified Help Center header (the\n * `TitleBlock` element is always an `<h1>`; `titleSize` only sets its typography,\n * here `text-h1`). The page owns that `<h1>`, so `<FaqSection heading={null}>`\n * nests its category headings as `<h2>`/`<h3>` (the SEO-recommended FAQ document\n * outline).\n *\n * DATA: pass `initialFaqs` (SSR-resolved, platform-scoped) so `FaqSection`\n * skips its client self-fetch — the standalone page's static platform-only\n * contract. Omit it for embeds that want the self-fetching `/api/faqs`\n * suggestion-fill instead.\n */\n\nimport type { Faq } from '../../types/faq';\nimport { PageShell, PageLayout } from '../ui';\nimport { useRouter } from '../../embed-shims/next-navigation';\nimport { FaqSection } from './faq-section';\nimport type { FaqSchemaOptions } from './json-ld';\n\nexport interface FaqDocumentPageProps {\n /** Page title (frozen `PageLayout` `TitleBlock`). Default \"Frequently Asked Questions\". */\n title?: string;\n /** Subtitle under the title. */\n subtitle?: string;\n /** Back-button config — same pattern as `DevSectionPage` / `LegalDocumentPage`.\n * Pass `false` to hide. Default `{ label: 'Back to home', href: '/' }`. */\n backButton?: { label?: string; href?: string } | false;\n /** Render the standalone `<PageShell>` (own `<main>` + bg + max-width). Default\n * true. Pass false when the host layout already provides the page container\n * (e.g. openframe-frontend's `AppLayout` `<main>`) — only the padding box\n * renders, avoiding a nested `<main>`. */\n shell?: boolean;\n /** SSR-hydrate `FaqSection` (skips the client fetch — the platform-only\n * contract for the standalone page). Omit for self-fetching embeds. */\n initialFaqs?: Faq[];\n /** Emit FAQPage schema.org JSON-LD (forwarded to `FaqSection`). Off by\n * default so embeds don't emit duplicate schema. */\n emitJsonLd?: boolean;\n /** JSON-LD name/description/url overrides (forwarded to `FaqSection`). */\n jsonLd?: FaqSchemaOptions;\n /** Base URL `FaqSection` appends `/api/faqs` to (reverse-proxy embedders). */\n apiBaseUrl?: string;\n /** Optional entity scoping forwarded to `FaqSection`. */\n entityType?: string;\n entityId?: number | string;\n /** Minimum FAQ count before the section renders (forwarded to `FaqSection`). */\n minResults?: number;\n}\n\nexport function FaqDocumentPage({\n title = 'Frequently Asked Questions',\n subtitle,\n backButton,\n initialFaqs,\n emitJsonLd,\n jsonLd,\n apiBaseUrl,\n entityType,\n entityId,\n minResults,\n shell = true,\n}: FaqDocumentPageProps) {\n const router = useRouter();\n\n // Back-button config — mirrors LegalDocumentPage / DevSectionPage. Hide\n // entirely when the caller passes `false` (embed-mode where the host owns\n // nav chrome).\n const backCfg =\n backButton === false\n ? undefined\n : {\n label: backButton?.label ?? 'Back to home',\n onClick: () => router.push(backButton?.href ?? '/'),\n };\n\n const inner = (\n <PageLayout title={title} subtitle={subtitle} backButton={backCfg} titleSize=\"h1\" titleWrap>\n <FaqSection\n initialFaqs={initialFaqs}\n heading={null}\n emitJsonLd={emitJsonLd}\n jsonLd={jsonLd}\n apiBaseUrl={apiBaseUrl}\n entityType={entityType}\n entityId={entityId}\n minResults={minResults}\n />\n </PageLayout>\n );\n\n return shell ? <PageShell>{inner}</PageShell> : <div className=\"page-shell-content\">{inner}</div>;\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-LAGZ56MO.cjs","../src/components/faq/faq-section.tsx","../src/components/faq-accordion.tsx","../src/components/faq/json-ld.ts","../src/components/faq/faq-document-page.tsx"],"names":["jsx","jsxs"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AAC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AA;AACEC,oBAAAA;AACG,MAAA;AACD,sBAAA;AACF,IAAA;AAEE,IAAA;AAAC,MAAA;AAAA,MAAA;AACM,QAAA;AAIL,QAAA;AAA2D,MAAA;AAC7D,IAAA;AAEJ,EAAA;AAEJ;ADvEoB;AACA;AI9TpB;AA8DMD;AA5BU;AACN,EAAA;AACR,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACQ,EAAA;AACe;AACR,EAAA;AAMb,EAAA;AAGa,IAAA;AACQ,IAAA;AACjB,EAAA;AAGJ,EAAA;AACG,IAAA;AAAA,IAAA;AACC,MAAA;AACS,MAAA;AACT,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AAAA,IAAA;AAEJ,EAAA;AAGa,EAAA;AACjB;AJsRoB;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-LAGZ56MO.cjs","sourcesContent":[null,"\"use client\"\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport type { Faq } from '../../types/faq'\nimport { FaqAccordion, type FaqItem } from '../faq-accordion'\nimport { useSelfFetch } from '../../hooks/use-self-fetch'\nimport { buildSuggestionUrl } from '../../utils/suggestion-url'\nimport { serializeJsonLd } from '../../utils/common'\nimport { useScrollToHash } from '../../hooks/use-scroll-to-hash'\nimport { navigateSamePageHash, STICKY_HEADER_OFFSET_PX } from '../../utils/same-page-hash-nav'\nimport { faqSectionSlug, parseFaqHash, type FaqHashTarget } from '../../utils/faq-anchor'\nimport { cn } from '../../utils/cn'\nimport { buildFaqJsonLdFromFaqs, type FaqSchemaOptions } from './json-ld'\nimport { SECTION_HEADING_CLASS } from '../layout/page-heading'\n\nexport interface FaqSectionProps {\n /**\n * SSR hydrate. When provided, the hook skips the first client fetch (per\n * useSelfFetch contract). The consuming server page resolves FAQs then drills\n * them into this prop — the lib never re-fetches what the host already gated on.\n */\n initialFaqs?: Faq[]\n /** Both required together for entity-attached FAQs; partial → bare /api/faqs. */\n entityType?: string\n entityId?: number | string\n /**\n * Heading node above the grouped list. `undefined` → default\n * `<h2>`\"Frequently Asked Questions\". `null` → no heading (the host page\n * owns the `<h1>`, as the standalone /faqs surface does). A React node lets a\n * platform drill its own <PageHeading> without the lib referencing platform\n * state. Also drives category nesting so the document outline stays correct:\n * `null` → categories render `<h2>` (directly under the page `<h1>`);\n * otherwise categories render `<h3>` beneath this heading.\n */\n heading?: React.ReactNode | null\n /** Inject FAQPage schema.org JSON-LD as a <script>. Off by default so embeds\n * don't emit duplicate schema. */\n emitJsonLd?: boolean\n /** Overrides for the JSON-LD's name/description/url. */\n jsonLd?: FaqSchemaOptions\n className?: string\n /** Maps to /api/faqs `?count=` (the 5-tier fill target). Absent → param\n * not sent (server default applies). */\n minResults?: number\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin relative). */\n apiBaseUrl?: string\n}\n\nconst DEFAULT_HEADING_TEXT = 'Frequently Asked Questions'\n\n/** URL composition shared with RelatedContentSection (`buildSuggestionUrl`)\n * — byte-identical to the historical `buildFaqsUrl` output when\n * `minResults`/`apiBaseUrl` are absent. */\nfunction buildFaqsUrl(\n entityType?: string,\n entityId?: number | string,\n minResults?: number,\n apiBaseUrl = '',\n): string {\n return buildSuggestionUrl('/api/faqs', { apiBaseUrl, entityType, entityId, count: minResults })\n}\n\ninterface FaqGroup {\n /** null → the uncategorized bucket: no heading, no jump pill, rendered last. */\n section: string | null\n slug: string | null\n items: FaqItem[]\n}\n\n/** Group FAQs by `faq.section`, preserving the server's first-seen\n * (display_order) order for BOTH the section order and the rows within each\n * section. The uncategorized bucket (blank/missing section) sinks to the end\n * since it renders without a heading. Items carry NO badge here — the `<h2>`\n * IS the category, so a per-row chip would be redundant. */\nfunction groupFaqsBySection(faqs: Faq[]): FaqGroup[] {\n const order: string[] = []\n const byName = new Map<string, FaqGroup>()\n let uncategorized: FaqGroup | null = null\n for (const faq of faqs) {\n const item: FaqItem = { id: faq.id, question: faq.question, answer: faq.answer }\n const name = faq.section?.trim()\n if (!name) {\n if (!uncategorized) uncategorized = { section: null, slug: null, items: [] }\n uncategorized.items.push(item)\n continue\n }\n let group = byName.get(name)\n if (!group) {\n group = { section: name, slug: faqSectionSlug(name), items: [] }\n byName.set(name, group)\n order.push(name)\n }\n group.items.push(item)\n }\n const groups = order.map((name) => byName.get(name)!)\n if (uncategorized) groups.push(uncategorized)\n return groups\n}\n\n\n/** Map key for the uncategorized bucket — `group.slug` is null for it, so\n * every per-group map (default-open ids, accordion keys) uses this sentinel\n * to keep the lookup typed. */\nconst UNCATEGORIZED_KEY = '__uncategorized__'\nconst groupKey = (g: FaqGroup): string => g.slug ?? UNCATEGORIZED_KEY\n\n/**\n * Grouped FAQ layout: a category jump-nav above stacked `<h2>` category\n * sections (each its own accordion). Isolated into its own component so the\n * scroll-spy hooks only mount in grouped mode — `FaqSection`'s own hooks stay\n * unconditional.\n *\n * The pills are real `<a href=\"#slug\">` anchors (crawlable in-page links,\n * deep-linkable, work without JS); the click handler upgrades the jump to the\n * cancellation-proof `scrollElementIntoView` tween and syncs the URL hash.\n */\nfunction GroupedFaqList({\n groups,\n categoryHeadingAs,\n}: {\n groups: FaqGroup[]\n /** Heading tag for each category, so the document outline nests correctly\n * under whatever owns the heading above this block: `h2` on the standalone\n * page (the page owns the `<h1>`), `h3` beneath an embed's `<h2>` title.\n * The VISUAL is `SECTION_HEADING_CLASS` either way, so categories look\n * identical on every surface. */\n categoryHeadingAs: 'h2' | 'h3'\n}) {\n const CategoryHeading = categoryHeadingAs\n const navGroups = useMemo(() => groups.filter((g) => g.slug), [groups])\n const [activeSlug, setActiveSlug] = useState<string | null>(navGroups[0]?.slug ?? null)\n // Identity-stable key for the section set so the observer re-binds only when\n // the categories actually change (not on every parent re-render).\n const slugKey = navGroups.map((g) => g.slug).join('|')\n\n // Scroll-spy: mark the pill for the category currently at the top of the\n // viewport. rootMargin drops the trigger line just below the sticky header\n // and ignores the bottom ~55% so \"active\" is the section being read, not the\n // next one peeking in.\n useEffect(() => {\n if (navGroups.length < 2) return\n const tops = new Map<string, number>()\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n const id = (entry.target as HTMLElement).id\n if (entry.isIntersecting) tops.set(id, entry.boundingClientRect.top)\n else tops.delete(id)\n }\n let bestId: string | null = null\n let bestTop = Number.POSITIVE_INFINITY\n for (const [id, top] of tops) {\n if (top < bestTop) {\n bestTop = top\n bestId = id\n }\n }\n if (bestId) setActiveSlug(bestId)\n },\n { rootMargin: `-${STICKY_HEADER_OFFSET_PX}px 0px -55% 0px`, threshold: 0 },\n )\n for (const group of navGroups) {\n const el = group.slug ? document.getElementById(group.slug) : null\n if (el) observer.observe(el)\n }\n return () => observer.disconnect()\n // slugKey encodes the section set; re-observe only when it changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [slugKey])\n\n // ─── Hash dispatch — `/faqs#faq-item-<id>` or `/faqs#faq-<section-slug>` ──\n // Tracks the current hash so:\n // 1. an item-kind hash seeds `defaultOpenIds` on the matching accordion\n // (auto-expands the cited question);\n // 2. either kind triggers the cancellation-proof tween scroll with the\n // sticky-header offset (native browser hash scroll runs once, ignores\n // our offset — re-running the tween puts the target in the right spot).\n // Listens to `hashchange` so back/forward replays the same behavior. SSR-\n // safe: initial null state matches the server render; the first effect\n // tick on the client updates it.\n const [hashTarget, setHashTarget] = useState<FaqHashTarget | null>(null)\n useEffect(() => {\n const refresh = () => setHashTarget(parseFaqHash(window.location.hash))\n refresh()\n window.addEventListener('hashchange', refresh)\n return () => window.removeEventListener('hashchange', refresh)\n }, [])\n\n // Per-group default-open set when the hash points at an item. The map key\n // matches `groupKey(group)` so the render-time lookup is O(1) per group.\n const defaultOpenByGroupKey = useMemo(() => {\n if (hashTarget?.kind !== 'item') return null\n const targetId = hashTarget.rawId\n const result = new Map<string, (string | number)[]>()\n for (const group of groups) {\n const hit = group.items.find((i) => String(i.id) === targetId)\n if (hit) result.set(groupKey(group), [hit.id])\n }\n return result.size > 0 ? result : null\n }, [groups, hashTarget])\n\n // Accordion is uncontrolled — `defaultOpenIds` is only consumed at mount,\n // so a new item hash needs a remount to honor it. Keying off the item-id\n // suffix triggers exactly the remount we need (and stays stable when the\n // hash points at a section, so category navigation never disturbs the\n // accordion's open state).\n const accordionKeySuffix =\n hashTarget?.kind === 'item' ? `item:${hashTarget.rawId}` : 'default'\n\n // Unified scroll-to-hash: rAF-polls for the target row (outlasts the SWR self-fetch\n // + Radix accordion expand) and re-fires on `hashchange` — including the synthetic\n // event `navigateSamePageHash` dispatches for a SOFT same-page chat-card nav (a\n // host-router `pushState` fires no `hashchange`). The ready-dep keys off BOTH the\n // loaded `groups` (so a deep-link / refresh scrolls once the self-fetched list\n // mounts) AND `hashTarget` (so a soft nav re-runs the scroll AFTER the re-render\n // that remounts + opens the cited row, landing on its FINAL expanded position\n // instead of racing the uncontrolled accordion's key-remount — the bare-`hashchange`\n // listener alone fires before the remount and lands on the stale closed position).\n const scrollDep =\n `${groups.length}|` +\n (hashTarget?.kind === 'item'\n ? `item:${hashTarget.rawId}`\n : hashTarget?.kind === 'section'\n ? `section:${hashTarget.slug}`\n : 'none')\n useScrollToHash(scrollDep, { headerOffset: STICKY_HEADER_OFFSET_PX })\n\n // A section hash also lights up its category pill; item hashes leave the pills\n // untouched so deep-linking a question never disturbs scroll-spy state.\n useEffect(() => {\n if (hashTarget?.kind === 'section') setActiveSlug(hashTarget.slug)\n }, [hashTarget])\n\n // Category pill click. `navigateSamePageHash` owns the entire transition:\n // replaceState → synthetic `hashchange` → `scrollElementIntoView` tween\n // with `STICKY_HEADER_OFFSET_PX` so the section heading lands BELOW the\n // sticky category nav on the FIRST tween (covers the same-target\n // re-click case, where the `hashTarget` effect at L214 is a no-op\n // because the state reference is equal). For DIFFERENT-target clicks\n // the helper's synthetic `hashchange` re-fires that effect, which\n // re-scrolls with the same offset and cancels this tween (singleton)\n // — both paths land at the same position. The effect is still\n // required for back/forward + direct URL edits, where the helper\n // isn't in the call chain.\n //\n // `history: 'replace'` matches the pre-helper behavior: category pills\n // are a TOC, not a navigation step, so the Back button leaves the\n // FAQ page in one step regardless of how many categories the user\n // clicked through.\n const handleJump = useCallback(\n (e: React.MouseEvent<HTMLAnchorElement>, slug: string) => {\n e.preventDefault()\n navigateSamePageHash('#' + slug, {\n headerOffset: STICKY_HEADER_OFFSET_PX,\n history: 'replace',\n })\n },\n [],\n )\n\n return (\n <div className=\"space-y-8\">\n {navGroups.length > 1 && (\n <nav aria-label=\"FAQ categories\" className=\"flex flex-wrap gap-2\">\n {navGroups.map((group) => {\n const isActive = group.slug === activeSlug\n return (\n <a\n key={group.slug}\n href={`#${group.slug}`}\n aria-current={isActive ? 'true' : undefined}\n onClick={(e) => handleJump(e, group.slug as string)}\n className={cn(\n \"rounded-full border px-4 py-2 text-sm font-medium font-['DM_Sans'] transition-colors\",\n isActive\n ? 'border-ods-text-primary bg-ods-card text-ods-text-primary'\n : 'border-ods-border bg-ods-card text-ods-text-secondary hover:border-ods-text-secondary hover:text-ods-text-primary',\n )}\n >\n {group.section}\n </a>\n )\n })}\n </nav>\n )}\n <div className=\"space-y-10\">\n {groups.map((group) => {\n const key = groupKey(group)\n return (\n <section\n key={key}\n id={group.slug ?? undefined}\n className=\"scroll-mt-24 space-y-4\"\n >\n {group.section && (\n <CategoryHeading className={SECTION_HEADING_CLASS}>{group.section}</CategoryHeading>\n )}\n <FaqAccordion\n // Re-key on item-hash changes so the remount picks up the new\n // `defaultOpenIds` (the accordion is uncontrolled). Stable for\n // section hashes — category navigation doesn't disturb state.\n key={`${key}:${accordionKeySuffix}`}\n items={group.items}\n defaultOpenIds={defaultOpenByGroupKey?.get(key)}\n />\n </section>\n )\n })}\n </div>\n </div>\n )\n}\n\nfunction FaqSkeleton() {\n return (\n <div className=\"space-y-8 animate-pulse\">\n <div className=\"h-12 md:h-14 w-2/3 rounded bg-ods-border\" />\n <div className=\"rounded-md border border-ods-border overflow-hidden bg-transparent divide-y divide-ods-border w-full\">\n {Array.from({ length: 8 }).map((_, idx) => (\n <div key={idx} className=\"flex items-center justify-between gap-6 md:gap-10 px-6 py-4\">\n <div className=\"h-6 w-5/6 rounded bg-ods-border\" />\n <div className=\"size-6 rounded bg-ods-border\" />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\ninterface FaqsResponse {\n faqs: Faq[]\n}\n\n/**\n * The FAQ display surface — ONE rendering on every host: the list grouped by\n * `faq.section` (each category a heading + its own accordion, with a category\n * jump-nav once there are 2+ categories). There is no flat/ungrouped mode and\n * no page-vs-embedded shell fork; the standalone /faqs page and every embed\n * render through this single path, so they cannot drift.\n *\n * - Standalone /faqs page: pass `initialFaqs` (SSR) + `heading={null}` (the\n * page owns the <h1>) + `emitJsonLd` with `jsonLd` overrides for SEO.\n * - Per-entity embed: pass `entityType` + `entityId` (no `initialFaqs`); the\n * hook self-fetches `GET /api/faqs`, and `heading` is this block's own <h2>.\n *\n * CONTRACT: the consuming app MUST implement `GET /api/faqs`. On a fetch error\n * (or zero FAQs) the component renders nothing so the host page isn't\n * disfigured. The host always supplies the page shell — this renders a bare\n * <section>.\n */\nexport function FaqSection({\n initialFaqs,\n entityType,\n entityId,\n heading,\n emitJsonLd = false,\n jsonLd,\n className,\n minResults,\n apiBaseUrl = '',\n}: FaqSectionProps) {\n const url = buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl)\n // Memoized — useSelfFetch re-syncs on [initialData]; a fresh per-render\n // wrapper object would setState-loop under re-rendering parents.\n const initialData = useMemo<FaqsResponse | undefined>(\n () => (initialFaqs ? { faqs: initialFaqs } : undefined),\n [initialFaqs],\n )\n const { data, isLoading, error } = useSelfFetch<FaqsResponse>(url, { initialData })\n\n const faqs = data?.faqs ?? []\n // Grouped before the early returns so the hook order stays stable.\n const groups = useMemo(() => (faqs.length > 0 ? groupFaqsBySection(faqs) : []), [faqs])\n\n // `undefined` → default <h2> title; `null` → the host page owns the <h1>, so\n // no title renders here. `heading === null` also makes the category headings\n // <h2> (directly under the page <h1>); otherwise they nest as <h3>.\n const headingNode =\n heading === undefined ? <h2 className={SECTION_HEADING_CLASS}>{DEFAULT_HEADING_TEXT}</h2> : heading\n\n // Degrade silently — never show an error banner or an empty section shell\n // where FAQs would be (host pages and the standalone surface both rely on it).\n if (error) return null\n if (!isLoading && faqs.length === 0) return null\n if (isLoading && faqs.length === 0) {\n return (\n <div className={className}>\n <FaqSkeleton />\n </div>\n )\n }\n\n const schema = emitJsonLd ? buildFaqJsonLdFromFaqs(faqs, jsonLd) : null\n\n return (\n <>\n <section className={className ?? 'space-y-10'}>\n {headingNode}\n <GroupedFaqList groups={groups} categoryHeadingAs={heading === null ? 'h2' : 'h3'} />\n </section>\n {schema && (\n <script\n type=\"application/ld+json\"\n // eslint-disable-next-line react/no-danger\n // serializeJsonLd, NOT raw JSON.stringify — FAQ answers are\n // admin-entered; an embedded \"</script>\" must not break the tag.\n dangerouslySetInnerHTML={{ __html: serializeJsonLd(schema) }}\n />\n )}\n </>\n )\n}\n","\"use client\"\n\nimport React, { useRef, useState, useEffect, useCallback } from 'react'\nimport { Chevron02DownIcon } from './icons-v2-generated/arrows/chevron-02-down-icon'\nimport { cn } from \"../utils/cn\"\nimport { faqItemAnchor } from \"../utils/faq-anchor\"\n\nexport interface FaqItem {\n id: number | string\n question: string\n answer: string\n}\n\ninterface FaqAccordionProps {\n items: FaqItem[]\n defaultOpenIds?: (number | string)[]\n}\n\n// Utility to measure scrollHeight outside render cycle\nconst useMeasuredHeight = (isOpen: boolean) => {\n const ref = useRef<HTMLDivElement | null>(null)\n const [maxHeight, setMaxHeight] = useState<string>('0px')\n\n const measure = useCallback(() => {\n if (ref.current) {\n const height = ref.current.scrollHeight\n setMaxHeight(`${height}px`)\n }\n }, [])\n\n // Update height only when section is open\n useEffect(() => {\n if (isOpen) {\n measure()\n } else {\n setMaxHeight('0px')\n }\n }, [isOpen, measure])\n\n return { ref, maxHeight }\n}\n\nexport function FaqAccordion({ items, defaultOpenIds = [] }: FaqAccordionProps) {\n const [openSet, setOpenSet] = useState<Set<string | number>>(new Set(defaultOpenIds))\n\n const toggle = (id: string | number) => {\n setOpenSet(prev => {\n const next = new Set(prev)\n if (next.has(id)) next.delete(id)\n else next.add(id)\n return next\n })\n }\n\n return (\n <div className=\"rounded-md border border-ods-border divide-y divide-ods-border bg-transparent overflow-hidden\">\n {items.map(item => {\n const isOpen = openSet.has(item.id)\n const { ref, maxHeight } = useMeasuredHeight(isOpen)\n\n return (\n <div\n key={item.id}\n // Per-row anchor — chat citation chips (`/faqs#faq-item-<id>`) land\n // here via native browser hash scroll AND via `FaqSection`'s tween\n // dispatch. `scroll-mt-24` keeps the row header below the 96px\n // sticky nav offset (matches `<section>`'s scroll-margin for\n // category anchors).\n id={faqItemAnchor(item.id)}\n className=\"scroll-mt-24 transition-colors hover:bg-ods-bg-hover\"\n >\n {/* Header */}\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => toggle(item.id)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n toggle(item.id);\n }\n }}\n aria-expanded={isOpen}\n className=\"flex w-full items-center gap-6 md:gap-10 px-6 py-4 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-focus transition-colors cursor-pointer\"\n >\n <h3 className=\"flex-1 min-w-0 break-words\">\n {item.question}\n </h3>\n <Chevron02DownIcon\n aria-hidden=\"true\"\n size={24}\n className={cn(\n 'shrink-0 text-ods-text-primary transition-transform duration-300',\n isOpen && 'rotate-180',\n )}\n />\n </div>\n {/* Content wrapper with max-height animation */}\n <div\n style={{ maxHeight, transition: 'max-height 0.35s ease-in-out, opacity 0.35s ease-in-out', opacity: isOpen ? 1 : 0 }}\n className=\"overflow-hidden\"\n >\n {/* break-words: FAQ answers render as plain text, so a long URL or\n token has no wrap opportunity — and the parent is overflow-hidden,\n which would CLIP it past the viewport on mobile. Mirrors the\n markdown-renderer overflow-wrap fix. */}\n <div ref={ref} className=\"px-6 pb-4 text-ods-text-primary text-h4 break-words\">\n {item.answer}\n </div>\n </div>\n </div>\n )\n })}\n </div>\n )\n} ","/**\n * Pure FAQ JSON-LD builder. No React, no client-only deps — safe to import from\n * Server Components via the `./components/faq` subpath export. (Do NOT import\n * through the root `./components` barrel — that barrel is `\"use client\"` and\n * dragging it into a Server Component would force the client graph into the\n * server.)\n *\n * The hub used to harcode `name`/`description` here for OpenMSP; in the lib we\n * accept overrides so every embedder can supply its own platform branding.\n */\nimport type { Faq } from '../../types/faq'\n\nexport interface FaqSchemaOptions {\n name?: string\n description?: string\n url?: string\n}\n\nconst DEFAULT_NAME = 'Frequently Asked Questions'\nconst DEFAULT_DESCRIPTION =\n 'Answers to common questions.'\n\nexport function baseFaqSchema(opts: FaqSchemaOptions = {}) {\n return {\n '@context': 'https://schema.org',\n '@type': 'FAQPage',\n name: opts.name ?? DEFAULT_NAME,\n description: opts.description ?? DEFAULT_DESCRIPTION,\n ...(opts.url ? { url: opts.url } : {}),\n } as const\n}\n\nexport function buildFaqJsonLdFromFaqs(faqs: Faq[], opts: FaqSchemaOptions = {}) {\n return {\n ...baseFaqSchema(opts),\n mainEntity: faqs.map((faq) => ({\n '@type': 'Question',\n name: faq.question,\n acceptedAnswer: {\n '@type': 'Answer',\n text: faq.answer,\n },\n })),\n } as const\n}\n","'use client';\n\n/**\n * FaqDocumentPage — the full `/faqs` page with chrome, so embedders drop in\n * ONE component instead of hand-assembling `PageShell` + `PageLayout` around\n * the bare `<FaqSection>`. Mirrors `LegalDocumentPage` / `DevSectionPage`: the\n * page-level layout lives in the lib, the host page is a thin wrapper that\n * passes only config + the SSR-resolved data.\n *\n * HERO: the title + subtitle route through the canonical (frozen) `PageLayout`\n * `TitleBlock` with `titleSize=\"h1\"` — the unified Help Center header (the\n * `TitleBlock` element is always an `<h1>`; `titleSize` only sets its typography,\n * here `text-h1`). The page owns that `<h1>`, so `<FaqSection heading={null}>`\n * nests its category headings as `<h2>`/`<h3>` (the SEO-recommended FAQ document\n * outline).\n *\n * DATA: pass `initialFaqs` (SSR-resolved, platform-scoped) so `FaqSection`\n * skips its client self-fetch — the standalone page's static platform-only\n * contract. Omit it for embeds that want the self-fetching `/api/faqs`\n * suggestion-fill instead.\n */\n\nimport type { Faq } from '../../types/faq';\nimport { PageShell, PageLayout } from '../ui';\nimport { useRouter } from '../../embed-shims/next-navigation';\nimport { FaqSection } from './faq-section';\nimport type { FaqSchemaOptions } from './json-ld';\n\nexport interface FaqDocumentPageProps {\n /** Page title (frozen `PageLayout` `TitleBlock`). Default \"Frequently Asked Questions\". */\n title?: string;\n /** Subtitle under the title. */\n subtitle?: string;\n /** Back-button config — same pattern as `DevSectionPage` / `LegalDocumentPage`.\n * Pass `false` to hide. Default `{ label: 'Back to home', href: '/' }`. */\n backButton?: { label?: string; href?: string } | false;\n /** Render the standalone `<PageShell>` (own `<main>` + bg + max-width). Default\n * true. Pass false when the host layout already provides the page container\n * (e.g. openframe-frontend's `AppLayout` `<main>`) — only the padding box\n * renders, avoiding a nested `<main>`. */\n shell?: boolean;\n /** SSR-hydrate `FaqSection` (skips the client fetch — the platform-only\n * contract for the standalone page). Omit for self-fetching embeds. */\n initialFaqs?: Faq[];\n /** Emit FAQPage schema.org JSON-LD (forwarded to `FaqSection`). Off by\n * default so embeds don't emit duplicate schema. */\n emitJsonLd?: boolean;\n /** JSON-LD name/description/url overrides (forwarded to `FaqSection`). */\n jsonLd?: FaqSchemaOptions;\n /** Base URL `FaqSection` appends `/api/faqs` to (reverse-proxy embedders). */\n apiBaseUrl?: string;\n /** Optional entity scoping forwarded to `FaqSection`. */\n entityType?: string;\n entityId?: number | string;\n /** Minimum FAQ count before the section renders (forwarded to `FaqSection`). */\n minResults?: number;\n}\n\nexport function FaqDocumentPage({\n title = 'Frequently Asked Questions',\n subtitle,\n backButton,\n initialFaqs,\n emitJsonLd,\n jsonLd,\n apiBaseUrl,\n entityType,\n entityId,\n minResults,\n shell = true,\n}: FaqDocumentPageProps) {\n const router = useRouter();\n\n // Back-button config — mirrors LegalDocumentPage / DevSectionPage. Hide\n // entirely when the caller passes `false` (embed-mode where the host owns\n // nav chrome).\n const backCfg =\n backButton === false\n ? undefined\n : {\n label: backButton?.label ?? 'Back to home',\n onClick: () => router.push(backButton?.href ?? '/'),\n };\n\n const inner = (\n <PageLayout title={title} subtitle={subtitle} backButton={backCfg} titleSize=\"h1\" titleWrap>\n <FaqSection\n initialFaqs={initialFaqs}\n heading={null}\n emitJsonLd={emitJsonLd}\n jsonLd={jsonLd}\n apiBaseUrl={apiBaseUrl}\n entityType={entityType}\n entityId={entityId}\n minResults={minResults}\n />\n </PageLayout>\n );\n\n return shell ? <PageShell>{inner}</PageShell> : <div className=\"page-shell-content\">{inner}</div>;\n}\n"]}
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  ArticleAuthorByline,
4
4
  DetailPageSkeleton
5
- } from "./chunk-OU6XUJTY.js";
5
+ } from "./chunk-I6LSGR3V.js";
6
6
  import {
7
7
  DocSearchBar,
8
8
  useDocSearch
9
- } from "./chunk-K3CVA2LE.js";
9
+ } from "./chunk-XUWZHO32.js";
10
10
  import {
11
11
  useSelfFetch
12
- } from "./chunk-DGIF3YDV.js";
12
+ } from "./chunk-FFCGB73K.js";
13
13
  import {
14
14
  EntityAuthorCard,
15
15
  EntityTagBadges,
@@ -26,10 +26,10 @@ import {
26
26
  resolveContentHref,
27
27
  toStripProfile,
28
28
  useVideoWarmup
29
- } from "./chunk-MGDNOZ7P.js";
29
+ } from "./chunk-CCEQDC7F.js";
30
30
  import {
31
31
  buildOgPlaceholderUrl
32
- } from "./chunk-4FNDOTW2.js";
32
+ } from "./chunk-OMUCATVA.js";
33
33
  import {
34
34
  useChatRuntime
35
35
  } from "./chunk-KFQXO7QB.js";
@@ -395,4 +395,4 @@ export {
395
395
  useOnboardingGuide,
396
396
  useOnboardingGuideSections
397
397
  };
398
- //# sourceMappingURL=chunk-QKRJJSYX.js.map
398
+ //# sourceMappingURL=chunk-MHOKOUKE.js.map