@flamingo-stack/openframe-frontend-core 0.0.381 → 0.0.382

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 (91) hide show
  1. package/dist/{chunk-2AO6O7CU.js → chunk-23PZFAET.js} +4 -4
  2. package/dist/{chunk-D2Q43SCD.cjs → chunk-32YONDMH.cjs} +26 -26
  3. package/dist/{chunk-D2Q43SCD.cjs.map → chunk-32YONDMH.cjs.map} +1 -1
  4. package/dist/{chunk-3MOKIGOW.js → chunk-3GGIVFSI.js} +2 -2
  5. package/dist/{chunk-DL4YRO3S.js → chunk-4A4DA7OX.js} +2 -2
  6. package/dist/{chunk-ZSBALQJA.cjs → chunk-7IQK3Y3G.cjs} +25 -25
  7. package/dist/{chunk-ZSBALQJA.cjs.map → chunk-7IQK3Y3G.cjs.map} +1 -1
  8. package/dist/{chunk-AXUAW3HT.cjs → chunk-AS6FET7G.cjs} +15 -15
  9. package/dist/{chunk-AXUAW3HT.cjs.map → chunk-AS6FET7G.cjs.map} +1 -1
  10. package/dist/{chunk-YA2ZDROZ.js → chunk-DQJCWNRT.js} +2 -2
  11. package/dist/{chunk-GTBR4AZK.cjs → chunk-EE26RXMG.cjs} +12 -12
  12. package/dist/{chunk-GTBR4AZK.cjs.map → chunk-EE26RXMG.cjs.map} +1 -1
  13. package/dist/{chunk-POZPF4GF.js → chunk-GZ5N76H2.js} +4 -4
  14. package/dist/{chunk-OLXGKYNO.js → chunk-GZIHB6TH.js} +86 -97
  15. package/dist/{chunk-OLXGKYNO.js.map → chunk-GZIHB6TH.js.map} +1 -1
  16. package/dist/{chunk-XIW3H3MG.js → chunk-HDWY2SXF.js} +4 -4
  17. package/dist/{chunk-HJXKBLQ5.cjs → chunk-IENK6OY5.cjs} +5 -5
  18. package/dist/{chunk-HJXKBLQ5.cjs.map → chunk-IENK6OY5.cjs.map} +1 -1
  19. package/dist/{chunk-CICZZ4BP.cjs → chunk-JQT7PD6Z.cjs} +57 -57
  20. package/dist/{chunk-CICZZ4BP.cjs.map → chunk-JQT7PD6Z.cjs.map} +1 -1
  21. package/dist/{chunk-NZL5EBEC.js → chunk-K5P6XKIT.js} +2 -2
  22. package/dist/{chunk-SINYS4WL.cjs → chunk-L3DRZ2WE.cjs} +62 -62
  23. package/dist/{chunk-SINYS4WL.cjs.map → chunk-L3DRZ2WE.cjs.map} +1 -1
  24. package/dist/{chunk-WGZGZDXK.js → chunk-LIK575RM.js} +2 -2
  25. package/dist/{chunk-CUTFUKBD.js → chunk-LRA7FGQC.js} +4 -4
  26. package/dist/{chunk-GLHRSU5B.js → chunk-MGDDM2UI.js} +2 -2
  27. package/dist/{chunk-QHNE2BLP.js → chunk-PI3XFKEW.js} +2 -2
  28. package/dist/{chunk-OJECASVU.cjs → chunk-QI3PW4F7.cjs} +7 -7
  29. package/dist/{chunk-OJECASVU.cjs.map → chunk-QI3PW4F7.cjs.map} +1 -1
  30. package/dist/{chunk-3ETXMQL3.cjs → chunk-QQAHEWSR.cjs} +31 -31
  31. package/dist/{chunk-3ETXMQL3.cjs.map → chunk-QQAHEWSR.cjs.map} +1 -1
  32. package/dist/{chunk-J746ERW2.cjs → chunk-SZSBHBXE.cjs} +42 -53
  33. package/dist/chunk-SZSBHBXE.cjs.map +1 -0
  34. package/dist/{chunk-NMUZ6AHP.cjs → chunk-XHCRZDM6.cjs} +37 -37
  35. package/dist/{chunk-NMUZ6AHP.cjs.map → chunk-XHCRZDM6.cjs.map} +1 -1
  36. package/dist/{chunk-N546ZNOS.cjs → chunk-Z56MCQ6X.cjs} +9 -9
  37. package/dist/{chunk-N546ZNOS.cjs.map → chunk-Z56MCQ6X.cjs.map} +1 -1
  38. package/dist/components/case-studies/index.cjs +8 -8
  39. package/dist/components/case-studies/index.js +2 -2
  40. package/dist/components/chat/index.cjs +2 -2
  41. package/dist/components/chat/index.js +1 -1
  42. package/dist/components/contact/index.cjs +3 -3
  43. package/dist/components/contact/index.js +2 -2
  44. package/dist/components/docs/index.cjs +5 -5
  45. package/dist/components/docs/index.js +4 -4
  46. package/dist/components/embeds/index.cjs +3 -3
  47. package/dist/components/embeds/index.js +2 -2
  48. package/dist/components/faq/index.cjs +3 -3
  49. package/dist/components/faq/index.js +2 -2
  50. package/dist/components/features/auth/accept-invitation-form.d.ts +3 -9
  51. package/dist/components/features/auth/accept-invitation-form.d.ts.map +1 -1
  52. package/dist/components/features/auth/invite-link-invalid-modal.d.ts +3 -2
  53. package/dist/components/features/auth/invite-link-invalid-modal.d.ts.map +1 -1
  54. package/dist/components/features/auth/password-reset-form.d.ts +3 -1
  55. package/dist/components/features/auth/password-reset-form.d.ts.map +1 -1
  56. package/dist/components/features/index.cjs +2 -2
  57. package/dist/components/features/index.js +1 -1
  58. package/dist/components/help-center-pages/index.cjs +20 -20
  59. package/dist/components/help-center-pages/index.js +11 -11
  60. package/dist/components/index.cjs +120 -120
  61. package/dist/components/index.js +9 -9
  62. package/dist/components/navigation/index.cjs +2 -2
  63. package/dist/components/navigation/index.js +1 -1
  64. package/dist/components/onboarding-guides/index.cjs +5 -5
  65. package/dist/components/onboarding-guides/index.js +4 -4
  66. package/dist/components/related-content/index.cjs +3 -3
  67. package/dist/components/related-content/index.js +2 -2
  68. package/dist/components/tickets/index.cjs +5 -5
  69. package/dist/components/tickets/index.js +4 -4
  70. package/dist/components/ui/index.cjs +2 -2
  71. package/dist/components/ui/index.js +1 -1
  72. package/dist/index.cjs +2 -2
  73. package/dist/index.js +1 -1
  74. package/package.json +1 -1
  75. package/src/components/features/auth/accept-invitation-form.tsx +4 -26
  76. package/src/components/features/auth/invite-link-invalid-modal.tsx +6 -4
  77. package/src/components/features/auth/password-reset-form.tsx +7 -0
  78. package/src/stories/auth/AcceptInvitation.stories.tsx +4 -16
  79. package/src/stories/auth/PasswordReset.stories.tsx +1 -0
  80. package/dist/chunk-J746ERW2.cjs.map +0 -1
  81. /package/dist/{chunk-2AO6O7CU.js.map → chunk-23PZFAET.js.map} +0 -0
  82. /package/dist/{chunk-3MOKIGOW.js.map → chunk-3GGIVFSI.js.map} +0 -0
  83. /package/dist/{chunk-DL4YRO3S.js.map → chunk-4A4DA7OX.js.map} +0 -0
  84. /package/dist/{chunk-YA2ZDROZ.js.map → chunk-DQJCWNRT.js.map} +0 -0
  85. /package/dist/{chunk-POZPF4GF.js.map → chunk-GZ5N76H2.js.map} +0 -0
  86. /package/dist/{chunk-XIW3H3MG.js.map → chunk-HDWY2SXF.js.map} +0 -0
  87. /package/dist/{chunk-NZL5EBEC.js.map → chunk-K5P6XKIT.js.map} +0 -0
  88. /package/dist/{chunk-WGZGZDXK.js.map → chunk-LIK575RM.js.map} +0 -0
  89. /package/dist/{chunk-CUTFUKBD.js.map → chunk-LRA7FGQC.js.map} +0 -0
  90. /package/dist/{chunk-GLHRSU5B.js.map → chunk-MGDDM2UI.js.map} +0 -0
  91. /package/dist/{chunk-QHNE2BLP.js.map → chunk-PI3XFKEW.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-GTBR4AZK.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;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;AC3BA,8BAAiE;AD6BjE;AACA;AE9BA;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,EAA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ACG,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;AJmRoB;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-GTBR4AZK.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-3xl border border-ods-border overflow-hidden bg-ods-card divide-y divide-ods-border w-full\">\n {Array.from({ length: 8 }).map((_, idx) => (\n <div key={idx} className=\"flex items-center justify-between px-6 md:px-8 py-6\">\n <div className=\"h-6 w-5/6 rounded bg-ods-border\" />\n <div className=\"h-10 w-10 rounded-md 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 { ChevronButton } from './ui/chevron-button'\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-3xl border border-ods-border divide-y divide-ods-border bg-ods-card 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={cn('group scroll-mt-24 transition-colors hover:bg-[#1E1E1E]', isOpen ? 'bg-ods-bg' : 'bg-transparent')}\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 justify-between px-6 md:px-8 py-6 text-left focus:outline-none transition-colors cursor-pointer\"\n >\n <div className=\"min-w-0 pr-4\">\n <h3>\n {item.question}\n </h3>\n </div>\n <div className=\"flex-shrink-0\">\n <ChevronButton\n aria-label={isOpen ? 'Collapse question' : 'Expand question'}\n size=\"md\"\n isExpanded={isOpen}\n backgroundColor=\"transparent\"\n borderColor=\"#3A3A3A\"\n />\n </div>\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 group-hover:bg-[#1E1E1E]/30\"\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 md:px-8 pb-6 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-EE26RXMG.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;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;AC3BA,8BAAiE;AD6BjE;AACA;AE9BA;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;AACP,MAAA;A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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;AD1EoB;AACA;AI3TpB;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;AJmRoB;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-EE26RXMG.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-3xl border border-ods-border overflow-hidden bg-ods-card divide-y divide-ods-border w-full\">\n {Array.from({ length: 8 }).map((_, idx) => (\n <div key={idx} className=\"flex items-center justify-between px-6 md:px-8 py-6\">\n <div className=\"h-6 w-5/6 rounded bg-ods-border\" />\n <div className=\"h-10 w-10 rounded-md 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 { ChevronButton } from './ui/chevron-button'\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-3xl border border-ods-border divide-y divide-ods-border bg-ods-card 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={cn('group scroll-mt-24 transition-colors hover:bg-[#1E1E1E]', isOpen ? 'bg-ods-bg' : 'bg-transparent')}\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 justify-between px-6 md:px-8 py-6 text-left focus:outline-none transition-colors cursor-pointer\"\n >\n <div className=\"min-w-0 pr-4\">\n <h3>\n {item.question}\n </h3>\n </div>\n <div className=\"flex-shrink-0\">\n <ChevronButton\n aria-label={isOpen ? 'Collapse question' : 'Expand question'}\n size=\"md\"\n isExpanded={isOpen}\n backgroundColor=\"transparent\"\n borderColor=\"#3A3A3A\"\n />\n </div>\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 group-hover:bg-[#1E1E1E]/30\"\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 md:px-8 pb-6 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,11 +2,11 @@
2
2
  import {
3
3
  ArticleAuthorByline,
4
4
  DetailPageSkeleton
5
- } from "./chunk-DL4YRO3S.js";
5
+ } from "./chunk-4A4DA7OX.js";
6
6
  import {
7
7
  DocSearchBar,
8
8
  useDocSearch
9
- } from "./chunk-WGZGZDXK.js";
9
+ } from "./chunk-LIK575RM.js";
10
10
  import {
11
11
  useSelfFetch
12
12
  } from "./chunk-WWHPTP4B.js";
@@ -25,7 +25,7 @@ import {
25
25
  getCaptionsUrl,
26
26
  resolveContentHref,
27
27
  useVideoWarmup
28
- } from "./chunk-OLXGKYNO.js";
28
+ } from "./chunk-GZIHB6TH.js";
29
29
  import {
30
30
  buildOgPlaceholderUrl
31
31
  } from "./chunk-KQESCGVG.js";
@@ -392,4 +392,4 @@ export {
392
392
  useOnboardingGuide,
393
393
  useOnboardingGuideSections
394
394
  };
395
- //# sourceMappingURL=chunk-POZPF4GF.js.map
395
+ //# sourceMappingURL=chunk-GZ5N76H2.js.map
@@ -24401,50 +24401,14 @@ function SsoProviderButtons({
24401
24401
  }) });
24402
24402
  }
24403
24403
 
24404
- // src/components/features/auth/terms-agreement-label.tsx
24405
- import { jsx as jsx183, jsxs as jsxs142 } from "react/jsx-runtime";
24406
- function TermsAgreementLabel({ termsUrl = "#", privacyPolicyUrl = "#" }) {
24407
- return /* @__PURE__ */ jsxs142("span", { className: "text-h4 text-ods-text-primary", children: [
24408
- "Agree to ",
24409
- /* @__PURE__ */ jsx183(
24410
- "a",
24411
- {
24412
- href: termsUrl,
24413
- target: "_blank",
24414
- rel: "noopener noreferrer",
24415
- className: "text-ods-text-secondary underline",
24416
- onClick: (event) => event.stopPropagation(),
24417
- children: "Terms"
24418
- }
24419
- ),
24420
- " & ",
24421
- /* @__PURE__ */ jsx183(
24422
- "a",
24423
- {
24424
- href: privacyPolicyUrl,
24425
- target: "_blank",
24426
- rel: "noopener noreferrer",
24427
- className: "text-ods-text-secondary underline",
24428
- onClick: (event) => event.stopPropagation(),
24429
- children: "Privacy Policy"
24430
- }
24431
- ),
24432
- " by signing up."
24433
- ] });
24434
- }
24435
-
24436
24404
  // src/components/features/auth/accept-invitation-form.tsx
24437
- import { jsx as jsx184, jsxs as jsxs143 } from "react/jsx-runtime";
24405
+ import { jsx as jsx183, jsxs as jsxs142 } from "react/jsx-runtime";
24438
24406
  function AcceptInvitationForm({
24439
24407
  email,
24440
- agreedToTerms,
24441
- onAgreedToTermsChange,
24442
24408
  ssoProviders,
24443
24409
  onSsoClick,
24444
24410
  onBackToLogin,
24445
24411
  ssoActionLabel = "Sign Up with",
24446
- termsUrl = "#",
24447
- privacyPolicyUrl = "#",
24448
24412
  emailLabel = "Email",
24449
24413
  title = "Accept Invitation",
24450
24414
  subtitle = "Complete your registration to join the organization",
@@ -24452,7 +24416,7 @@ function AcceptInvitationForm({
24452
24416
  disabled = false,
24453
24417
  className
24454
24418
  }) {
24455
- return /* @__PURE__ */ jsxs143(
24419
+ return /* @__PURE__ */ jsxs142(
24456
24420
  "div",
24457
24421
  {
24458
24422
  className: cn(
@@ -24460,32 +24424,21 @@ function AcceptInvitationForm({
24460
24424
  className
24461
24425
  ),
24462
24426
  children: [
24463
- /* @__PURE__ */ jsxs143("div", { className: "flex flex-col", children: [
24464
- /* @__PURE__ */ jsx184("h1", { className: "text-h2 text-ods-text-primary tracking-[-0.64px]", children: title }),
24465
- /* @__PURE__ */ jsx184("p", { className: "text-h4 text-ods-text-secondary", children: subtitle })
24427
+ /* @__PURE__ */ jsxs142("div", { className: "flex flex-col", children: [
24428
+ /* @__PURE__ */ jsx183("h1", { className: "text-h2 text-ods-text-primary tracking-[-0.64px]", children: title }),
24429
+ /* @__PURE__ */ jsx183("p", { className: "text-h4 text-ods-text-secondary", children: subtitle })
24466
24430
  ] }),
24467
- /* @__PURE__ */ jsx184(Input, { type: "email", label: emailLabel, value: email, disabled: true, readOnly: true }),
24468
- /* @__PURE__ */ jsx184(
24469
- CheckboxBlock,
24470
- {
24471
- id: "accept-invite-terms",
24472
- label: /* @__PURE__ */ jsx184(TermsAgreementLabel, { termsUrl, privacyPolicyUrl }),
24473
- truncateLabel: true,
24474
- checked: agreedToTerms,
24475
- disabled: disabled || loading,
24476
- onCheckedChange: onAgreedToTermsChange
24477
- }
24478
- ),
24479
- /* @__PURE__ */ jsx184(
24431
+ /* @__PURE__ */ jsx183(Input, { type: "email", label: emailLabel, value: email, disabled: true, readOnly: true }),
24432
+ /* @__PURE__ */ jsx183(
24480
24433
  SsoProviderButtons,
24481
24434
  {
24482
24435
  providers: ssoProviders,
24483
24436
  onSsoClick,
24484
24437
  actionLabel: ssoActionLabel,
24485
- disabled: disabled || loading || !agreedToTerms
24438
+ disabled: disabled || loading
24486
24439
  }
24487
24440
  ),
24488
- /* @__PURE__ */ jsx184(BackToLoginLink, { onClick: onBackToLogin, className: "self-start lg:hidden" })
24441
+ /* @__PURE__ */ jsx183(BackToLoginLink, { onClick: onBackToLogin, className: "self-start lg:hidden" })
24489
24442
  ]
24490
24443
  }
24491
24444
  );
@@ -24494,14 +24447,14 @@ function AcceptInvitationForm({
24494
24447
  // src/components/features/auth/auth-benefits-panel.tsx
24495
24448
  init_cn();
24496
24449
  init_button2();
24497
- import { jsx as jsx185, jsxs as jsxs144 } from "react/jsx-runtime";
24450
+ import { jsx as jsx184, jsxs as jsxs143 } from "react/jsx-runtime";
24498
24451
  var DEFAULT_TITLE2 = "The All-in-One Open Platform for MSPs";
24499
24452
  var DEFAULT_DESCRIPTION = "All your core ops in one place - built for MSPs who are done duct-taping tools together. Open-source, AI-ready, no vendor tax. Just solid software that lets you run lean and fast.";
24500
24453
  var DEFAULT_BENEFITS = [
24501
- { icon: /* @__PURE__ */ jsx185(CreditCardXmarkIcon, {}), label: "No card required" },
24502
- { icon: /* @__PURE__ */ jsx185(XmarkAltIcon, {}), label: "Cancel Anytime" },
24503
- { icon: /* @__PURE__ */ jsx185(FlaskVialIcon, {}), label: "14 day free trial" },
24504
- { icon: /* @__PURE__ */ jsx185(FileOffIcon, {}), label: "No Contract" }
24454
+ { icon: /* @__PURE__ */ jsx184(CreditCardXmarkIcon, {}), label: "No card required" },
24455
+ { icon: /* @__PURE__ */ jsx184(XmarkAltIcon, {}), label: "Cancel Anytime" },
24456
+ { icon: /* @__PURE__ */ jsx184(FlaskVialIcon, {}), label: "14 day free trial" },
24457
+ { icon: /* @__PURE__ */ jsx184(FileOffIcon, {}), label: "No Contract" }
24505
24458
  ];
24506
24459
  function AuthBenefitsPanel({
24507
24460
  title = DEFAULT_TITLE2,
@@ -24511,7 +24464,7 @@ function AuthBenefitsPanel({
24511
24464
  learnMoreUrl = "https://openframe.ai",
24512
24465
  className
24513
24466
  }) {
24514
- return /* @__PURE__ */ jsxs144(
24467
+ return /* @__PURE__ */ jsxs143(
24515
24468
  "div",
24516
24469
  {
24517
24470
  className: cn(
@@ -24519,19 +24472,19 @@ function AuthBenefitsPanel({
24519
24472
  className
24520
24473
  ),
24521
24474
  children: [
24522
- /* @__PURE__ */ jsx185("h2", { className: "text-h2 text-ods-text-primary tracking-[-0.64px]", children: title }),
24523
- /* @__PURE__ */ jsx185("p", { className: "text-h4 text-ods-text-primary", children: description }),
24524
- /* @__PURE__ */ jsx185("div", { className: "flex flex-wrap content-center items-center gap-[var(--spacing-system-m)]", children: benefits.map((benefit) => /* @__PURE__ */ jsxs144("div", { className: "flex items-center gap-[var(--spacing-system-xs)]", children: [
24525
- /* @__PURE__ */ jsx185("span", { className: "flex size-4 shrink-0 items-center justify-center text-ods-text-secondary [&_svg]:size-4", children: benefit.icon }),
24526
- /* @__PURE__ */ jsx185("span", { className: "whitespace-nowrap text-h4 text-ods-text-primary", children: benefit.label })
24475
+ /* @__PURE__ */ jsx184("h2", { className: "text-h2 text-ods-text-primary tracking-[-0.64px]", children: title }),
24476
+ /* @__PURE__ */ jsx184("p", { className: "text-h4 text-ods-text-primary", children: description }),
24477
+ /* @__PURE__ */ jsx184("div", { className: "flex flex-wrap content-center items-center gap-[var(--spacing-system-m)]", children: benefits.map((benefit) => /* @__PURE__ */ jsxs143("div", { className: "flex items-center gap-[var(--spacing-system-xs)]", children: [
24478
+ /* @__PURE__ */ jsx184("span", { className: "flex size-4 shrink-0 items-center justify-center text-ods-text-secondary [&_svg]:size-4", children: benefit.icon }),
24479
+ /* @__PURE__ */ jsx184("span", { className: "whitespace-nowrap text-h4 text-ods-text-primary", children: benefit.label })
24527
24480
  ] }, benefit.label)) }),
24528
- /* @__PURE__ */ jsx185(
24481
+ /* @__PURE__ */ jsx184(
24529
24482
  Button,
24530
24483
  {
24531
24484
  variant: "outline",
24532
24485
  href: learnMoreUrl,
24533
24486
  openInNewTab: true,
24534
- leftIcon: /* @__PURE__ */ jsx185(
24487
+ leftIcon: /* @__PURE__ */ jsx184(
24535
24488
  OpenFrameLogo,
24536
24489
  {
24537
24490
  className: "h-6 w-6",
@@ -24549,10 +24502,10 @@ function AuthBenefitsPanel({
24549
24502
  }
24550
24503
 
24551
24504
  // src/components/features/auth/auth-branding.tsx
24552
- import { jsx as jsx186, jsxs as jsxs145 } from "react/jsx-runtime";
24505
+ import { jsx as jsx185, jsxs as jsxs144 } from "react/jsx-runtime";
24553
24506
  function OpenFrameWordmark() {
24554
- return /* @__PURE__ */ jsxs145("div", { className: "flex items-center gap-[var(--spacing-system-xs)]", children: [
24555
- /* @__PURE__ */ jsx186(
24507
+ return /* @__PURE__ */ jsxs144("div", { className: "flex items-center gap-[var(--spacing-system-xs)]", children: [
24508
+ /* @__PURE__ */ jsx185(
24556
24509
  OpenFrameLogo,
24557
24510
  {
24558
24511
  className: "h-10 w-10",
@@ -24560,23 +24513,23 @@ function OpenFrameWordmark() {
24560
24513
  upperPathColor: "var(--color-text-primary)"
24561
24514
  }
24562
24515
  ),
24563
- /* @__PURE__ */ jsx186("span", { className: "text-h2 text-ods-text-primary tracking-[-0.64px]", children: "OpenFrame" })
24516
+ /* @__PURE__ */ jsx185("span", { className: "text-h2 text-ods-text-primary tracking-[-0.64px]", children: "OpenFrame" })
24564
24517
  ] });
24565
24518
  }
24566
24519
  function PoweredByFlamingo({ compact = false }) {
24567
- return /* @__PURE__ */ jsxs145("div", { className: "flex items-center gap-[var(--spacing-system-xs)] text-ods-text-secondary", children: [
24568
- /* @__PURE__ */ jsx186("span", { className: "text-h6", children: "Powered by" }),
24569
- /* @__PURE__ */ jsx186(FlamingoLogoIcon, { className: compact ? "h-4 w-14" : "h-4 w-14 md:h-6 md:w-[83px]" })
24520
+ return /* @__PURE__ */ jsxs144("div", { className: "flex items-center gap-[var(--spacing-system-xs)] text-ods-text-secondary", children: [
24521
+ /* @__PURE__ */ jsx185("span", { className: "text-h6", children: "Powered by" }),
24522
+ /* @__PURE__ */ jsx185(FlamingoLogoIcon, { className: compact ? "h-4 w-14" : "h-4 w-14 md:h-6 md:w-[83px]" })
24570
24523
  ] });
24571
24524
  }
24572
24525
 
24573
24526
  // src/components/features/auth/auth-shell.tsx
24574
24527
  init_cn();
24575
- import { jsx as jsx187, jsxs as jsxs146 } from "react/jsx-runtime";
24528
+ import { jsx as jsx186, jsxs as jsxs145 } from "react/jsx-runtime";
24576
24529
  function AuthShell({ tabs, children, benefits, mobileTagline, footer, className }) {
24577
- const benefitsNode = benefits ?? /* @__PURE__ */ jsx187(AuthBenefitsPanel, {});
24578
- return /* @__PURE__ */ jsxs146("div", { className: cn("min-h-screen w-full bg-ods-bg lg:flex lg:h-screen lg:overflow-hidden", className), children: [
24579
- /* @__PURE__ */ jsx187("div", { className: "flex min-h-screen w-full flex-col items-center p-[var(--spacing-system-l)] lg:h-full lg:min-h-0 lg:w-1/2 lg:justify-start lg:overflow-y-auto lg:px-[var(--spacing-system-xl)] lg:py-[var(--spacing-system-xxl)]", children: /* @__PURE__ */ jsxs146(
24530
+ const benefitsNode = benefits ?? /* @__PURE__ */ jsx186(AuthBenefitsPanel, {});
24531
+ return /* @__PURE__ */ jsxs145("div", { className: cn("min-h-screen w-full bg-ods-bg lg:flex lg:h-screen lg:overflow-hidden", className), children: [
24532
+ /* @__PURE__ */ jsx186("div", { className: "flex min-h-screen w-full flex-col items-center p-[var(--spacing-system-l)] lg:h-full lg:min-h-0 lg:w-1/2 lg:justify-start lg:overflow-y-auto lg:px-[var(--spacing-system-xl)] lg:py-[var(--spacing-system-xxl)]", children: /* @__PURE__ */ jsxs145(
24580
24533
  "div",
24581
24534
  {
24582
24535
  className: cn(
@@ -24584,24 +24537,24 @@ function AuthShell({ tabs, children, benefits, mobileTagline, footer, className
24584
24537
  footer && "lg:min-h-full"
24585
24538
  ),
24586
24539
  children: [
24587
- /* @__PURE__ */ jsxs146("div", { className: "flex w-full flex-col items-center gap-[var(--spacing-system-l)] lg:hidden", children: [
24588
- /* @__PURE__ */ jsx187(OpenFrameWordmark, {}),
24589
- mobileTagline && /* @__PURE__ */ jsx187("div", { className: "w-full text-center text-h4 text-ods-text-primary [&>p]:truncate md:hidden", children: mobileTagline })
24540
+ /* @__PURE__ */ jsxs145("div", { className: "flex w-full flex-col items-center gap-[var(--spacing-system-l)] lg:hidden", children: [
24541
+ /* @__PURE__ */ jsx186(OpenFrameWordmark, {}),
24542
+ mobileTagline && /* @__PURE__ */ jsx186("div", { className: "w-full text-center text-h4 text-ods-text-primary [&>p]:truncate md:hidden", children: mobileTagline })
24590
24543
  ] }),
24591
- tabs && /* @__PURE__ */ jsx187("div", { className: "w-full md:max-w-[320px]", children: tabs }),
24592
- /* @__PURE__ */ jsx187("div", { className: "w-full", children }),
24593
- /* @__PURE__ */ jsxs146("div", { className: "flex w-full flex-col items-center gap-[var(--spacing-system-l)] lg:hidden", children: [
24544
+ tabs && /* @__PURE__ */ jsx186("div", { className: "w-full md:max-w-[320px]", children: tabs }),
24545
+ /* @__PURE__ */ jsx186("div", { className: "w-full", children }),
24546
+ /* @__PURE__ */ jsxs145("div", { className: "flex w-full flex-col items-center gap-[var(--spacing-system-l)] lg:hidden", children: [
24594
24547
  benefitsNode,
24595
- /* @__PURE__ */ jsx187(PoweredByFlamingo, {})
24548
+ /* @__PURE__ */ jsx186(PoweredByFlamingo, {})
24596
24549
  ] }),
24597
- footer && /* @__PURE__ */ jsx187("div", { className: "hidden w-full self-start lg:mt-auto lg:block", children: footer })
24550
+ footer && /* @__PURE__ */ jsx186("div", { className: "hidden w-full self-start lg:mt-auto lg:block", children: footer })
24598
24551
  ]
24599
24552
  }
24600
24553
  ) }),
24601
- /* @__PURE__ */ jsxs146("div", { className: "hidden border-l border-ods-border bg-ods-card lg:flex lg:h-full lg:w-1/2 lg:flex-col lg:items-center lg:justify-start lg:gap-[var(--spacing-system-xxl)] lg:overflow-y-auto lg:px-[var(--spacing-system-xl)] lg:py-[var(--spacing-system-xxl)]", children: [
24602
- /* @__PURE__ */ jsx187(OpenFrameWordmark, {}),
24603
- /* @__PURE__ */ jsx187("div", { className: "w-full max-w-lg", children: benefitsNode }),
24604
- /* @__PURE__ */ jsx187(PoweredByFlamingo, {})
24554
+ /* @__PURE__ */ jsxs145("div", { className: "hidden border-l border-ods-border bg-ods-card lg:flex lg:h-full lg:w-1/2 lg:flex-col lg:items-center lg:justify-start lg:gap-[var(--spacing-system-xxl)] lg:overflow-y-auto lg:px-[var(--spacing-system-xl)] lg:py-[var(--spacing-system-xxl)]", children: [
24555
+ /* @__PURE__ */ jsx186(OpenFrameWordmark, {}),
24556
+ /* @__PURE__ */ jsx186("div", { className: "w-full max-w-lg", children: benefitsNode }),
24557
+ /* @__PURE__ */ jsx186(PoweredByFlamingo, {})
24605
24558
  ] })
24606
24559
  ] });
24607
24560
  }
@@ -24609,6 +24562,40 @@ function AuthShell({ tabs, children, benefits, mobileTagline, footer, className
24609
24562
  // src/components/features/auth/create-organization-form.tsx
24610
24563
  init_cn();
24611
24564
  init_button2();
24565
+
24566
+ // src/components/features/auth/terms-agreement-label.tsx
24567
+ import { jsx as jsx187, jsxs as jsxs146 } from "react/jsx-runtime";
24568
+ function TermsAgreementLabel({ termsUrl = "#", privacyPolicyUrl = "#" }) {
24569
+ return /* @__PURE__ */ jsxs146("span", { className: "text-h4 text-ods-text-primary", children: [
24570
+ "Agree to ",
24571
+ /* @__PURE__ */ jsx187(
24572
+ "a",
24573
+ {
24574
+ href: termsUrl,
24575
+ target: "_blank",
24576
+ rel: "noopener noreferrer",
24577
+ className: "text-ods-text-secondary underline",
24578
+ onClick: (event) => event.stopPropagation(),
24579
+ children: "Terms"
24580
+ }
24581
+ ),
24582
+ " & ",
24583
+ /* @__PURE__ */ jsx187(
24584
+ "a",
24585
+ {
24586
+ href: privacyPolicyUrl,
24587
+ target: "_blank",
24588
+ rel: "noopener noreferrer",
24589
+ className: "text-ods-text-secondary underline",
24590
+ onClick: (event) => event.stopPropagation(),
24591
+ children: "Privacy Policy"
24592
+ }
24593
+ ),
24594
+ " by signing up."
24595
+ ] });
24596
+ }
24597
+
24598
+ // src/components/features/auth/create-organization-form.tsx
24612
24599
  import { jsx as jsx188, jsxs as jsxs147 } from "react/jsx-runtime";
24613
24600
  function CreateOrganizationForm({
24614
24601
  email,
@@ -24748,10 +24735,10 @@ function InviteLinkInvalidModal({
24748
24735
  backLabel = "Back to Login",
24749
24736
  className
24750
24737
  }) {
24751
- return /* @__PURE__ */ jsx189("div", { className: cn("flex min-h-screen w-full items-center justify-center bg-ods-bg p-[var(--spacing-system-l)]", className), children: /* @__PURE__ */ jsxs148("div", { className: "flex w-full max-w-[600px] flex-col gap-[var(--spacing-system-l)] rounded-md border border-ods-border bg-ods-card p-[var(--spacing-system-xl)]", children: [
24738
+ return /* @__PURE__ */ jsx189("div", { className: cn("flex min-h-screen w-full items-end justify-center bg-ods-bg p-[var(--spacing-system-l)] md:items-center", className), children: /* @__PURE__ */ jsxs148("div", { className: "flex w-full max-w-[600px] flex-col gap-[var(--spacing-system-l)] rounded-md border border-ods-border bg-ods-card p-[var(--spacing-system-xl)]", children: [
24752
24739
  /* @__PURE__ */ jsxs148("div", { className: "flex items-center gap-[var(--spacing-system-mf)]", children: [
24753
24740
  /* @__PURE__ */ jsx189("h1", { className: "flex-1 text-h2 text-ods-text-primary tracking-[-0.64px]", children: title }),
24754
- /* @__PURE__ */ jsx189("button", { type: "button", "aria-label": "Close", onClick: onClose ?? onBackToLogin, className: "shrink-0 text-ods-text-primary", children: /* @__PURE__ */ jsx189(XmarkIcon, { className: "h-6 w-6" }) })
24741
+ /* @__PURE__ */ jsx189("button", { type: "button", "aria-label": "Close", onClick: onClose ?? onBackToLogin, className: "hidden shrink-0 text-ods-text-primary md:block", children: /* @__PURE__ */ jsx189(XmarkIcon, { className: "h-6 w-6" }) })
24755
24742
  ] }),
24756
24743
  /* @__PURE__ */ jsx189("p", { className: "text-h4 text-ods-text-primary", children: description }),
24757
24744
  /* @__PURE__ */ jsxs148("div", { className: "flex items-center gap-[var(--spacing-system-l)]", children: [
@@ -25139,6 +25126,7 @@ function PasswordResetForm({
25139
25126
  onConfirmPasswordChange,
25140
25127
  onSubmit,
25141
25128
  onCancel,
25129
+ onBackToLogin,
25142
25130
  submitDisabled = false,
25143
25131
  loading = false,
25144
25132
  disabled = false,
@@ -25223,7 +25211,8 @@ function PasswordResetForm({
25223
25211
  children: submitLabel
25224
25212
  }
25225
25213
  )
25226
- ] })
25214
+ ] }),
25215
+ onBackToLogin && /* @__PURE__ */ jsx194(BackToLoginLink, { onClick: onBackToLogin, className: "self-start lg:hidden" })
25227
25216
  ]
25228
25217
  }
25229
25218
  );
@@ -51563,12 +51552,12 @@ export {
51563
51552
  BackToLoginLink,
51564
51553
  PROVIDER_META,
51565
51554
  SsoProviderButtons,
51566
- TermsAgreementLabel,
51567
51555
  AcceptInvitationForm,
51568
51556
  AuthBenefitsPanel,
51569
51557
  OpenFrameWordmark,
51570
51558
  PoweredByFlamingo,
51571
51559
  AuthShell,
51560
+ TermsAgreementLabel,
51572
51561
  CreateOrganizationForm,
51573
51562
  InviteLinkInvalidModal,
51574
51563
  LoginForm,
@@ -51769,4 +51758,4 @@ export {
51769
51758
  LogsList,
51770
51759
  assets
51771
51760
  };
51772
- //# sourceMappingURL=chunk-OLXGKYNO.js.map
51761
+ //# sourceMappingURL=chunk-GZIHB6TH.js.map