@flamingo-stack/openframe-frontend-core 0.0.470 → 0.0.471-snapshot.20260724003551

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 (132) hide show
  1. package/dist/{chunk-O7N2PGM2.cjs → chunk-4BUX2F5P.cjs} +40 -40
  2. package/dist/{chunk-O7N2PGM2.cjs.map → chunk-4BUX2F5P.cjs.map} +1 -1
  3. package/dist/{chunk-XTCBRQN2.js → chunk-4GPWLGKT.js} +11 -2
  4. package/dist/{chunk-XTCBRQN2.js.map → chunk-4GPWLGKT.js.map} +1 -1
  5. package/dist/{chunk-27ZGHJDS.cjs → chunk-73CH4CZL.cjs} +12 -12
  6. package/dist/{chunk-27ZGHJDS.cjs.map → chunk-73CH4CZL.cjs.map} +1 -1
  7. package/dist/{chunk-VWNYNJWU.js → chunk-74ZFCTRZ.js} +4 -4
  8. package/dist/{chunk-7HNLEZ6N.js → chunk-7D5KOJMF.js} +6 -6
  9. package/dist/{chunk-FIG2RKZF.cjs → chunk-A62C4C4V.cjs} +11 -2
  10. package/dist/chunk-A62C4C4V.cjs.map +1 -0
  11. package/dist/{chunk-7WT3K34L.js → chunk-BY6TZ6KA.js} +6 -6
  12. package/dist/{chunk-WPNVOQ4O.cjs → chunk-CUBNUQPZ.cjs} +12 -12
  13. package/dist/{chunk-WPNVOQ4O.cjs.map → chunk-CUBNUQPZ.cjs.map} +1 -1
  14. package/dist/{chunk-V6OVMRXL.cjs → chunk-DWQ4L3IB.cjs} +73 -73
  15. package/dist/{chunk-V6OVMRXL.cjs.map → chunk-DWQ4L3IB.cjs.map} +1 -1
  16. package/dist/{chunk-QA5LN5NS.js → chunk-EK2VQXUN.js} +3 -3
  17. package/dist/{chunk-ILUX3DXS.js → chunk-FPOHUGEK.js} +2 -2
  18. package/dist/{chunk-PYR4LVAF.cjs → chunk-G3UN2DXU.cjs} +71 -56
  19. package/dist/chunk-G3UN2DXU.cjs.map +1 -0
  20. package/dist/{chunk-6TI3DCOG.cjs → chunk-HQL5GJ35.cjs} +3 -3
  21. package/dist/{chunk-6TI3DCOG.cjs.map → chunk-HQL5GJ35.cjs.map} +1 -1
  22. package/dist/{chunk-DK42EGBQ.cjs → chunk-JO7XJQ6G.cjs} +22 -22
  23. package/dist/{chunk-DK42EGBQ.cjs.map → chunk-JO7XJQ6G.cjs.map} +1 -1
  24. package/dist/{chunk-RRCWF5N3.cjs → chunk-KZZCBQDU.cjs} +33 -33
  25. package/dist/{chunk-RRCWF5N3.cjs.map → chunk-KZZCBQDU.cjs.map} +1 -1
  26. package/dist/{chunk-6O47KXGR.js → chunk-NY4WLKNU.js} +3 -3
  27. package/dist/{chunk-GHHUCCLX.cjs → chunk-OB7YDOTK.cjs} +8 -8
  28. package/dist/{chunk-GHHUCCLX.cjs.map → chunk-OB7YDOTK.cjs.map} +1 -1
  29. package/dist/{chunk-2W3BAKMP.cjs → chunk-ONK4D4LG.cjs} +11 -11
  30. package/dist/{chunk-2W3BAKMP.cjs.map → chunk-ONK4D4LG.cjs.map} +1 -1
  31. package/dist/{chunk-MK2YWJAA.js → chunk-OTV4A6NA.js} +3 -3
  32. package/dist/{chunk-V3SOAVX4.js → chunk-OUHLWOPJ.js} +6 -6
  33. package/dist/{chunk-JI24IMOW.js → chunk-PJYGEXWM.js} +4 -4
  34. package/dist/{chunk-CGUYR6DR.cjs → chunk-RIEAXUJX.cjs} +1606 -1606
  35. package/dist/{chunk-CGUYR6DR.cjs.map → chunk-RIEAXUJX.cjs.map} +1 -1
  36. package/dist/{chunk-6CITW5BD.js → chunk-SASR7SK5.js} +23 -8
  37. package/dist/chunk-SASR7SK5.js.map +1 -0
  38. package/dist/{chunk-Z6NIMOXQ.js → chunk-SZMA65OW.js} +2 -2
  39. package/dist/{chunk-IOHQJOLR.cjs → chunk-TONMD7QX.cjs} +38 -38
  40. package/dist/{chunk-IOHQJOLR.cjs.map → chunk-TONMD7QX.cjs.map} +1 -1
  41. package/dist/{chunk-NPN4WYOI.js → chunk-TVMARS74.js} +5 -5
  42. package/dist/{chunk-C667B74I.cjs → chunk-U5FNZ2TL.cjs} +23 -23
  43. package/dist/{chunk-C667B74I.cjs.map → chunk-U5FNZ2TL.cjs.map} +1 -1
  44. package/dist/{chunk-MCO55ART.cjs → chunk-VC4FOIY7.cjs} +93 -93
  45. package/dist/{chunk-MCO55ART.cjs.map → chunk-VC4FOIY7.cjs.map} +1 -1
  46. package/dist/{chunk-QNWYTEM6.js → chunk-W6RDDT3S.js} +8 -8
  47. package/dist/{chunk-MAZGXV4D.cjs → chunk-WD7SE532.cjs} +86 -86
  48. package/dist/{chunk-MAZGXV4D.cjs.map → chunk-WD7SE532.cjs.map} +1 -1
  49. package/dist/{chunk-ZWVQULAJ.js → chunk-XDBNMB5K.js} +3 -3
  50. package/dist/{chunk-AYNDMF5C.js → chunk-XNJ2LZH2.js} +3 -3
  51. package/dist/{chunk-WSKUYW3G.cjs → chunk-YTLINJRR.cjs} +32 -32
  52. package/dist/{chunk-WSKUYW3G.cjs.map → chunk-YTLINJRR.cjs.map} +1 -1
  53. package/dist/{chunk-H5SCS5XW.js → chunk-ZPUT2BB4.js} +5 -5
  54. package/dist/components/case-studies/index.cjs +16 -16
  55. package/dist/components/case-studies/index.js +6 -6
  56. package/dist/components/chat/index.cjs +6 -6
  57. package/dist/components/chat/index.js +5 -5
  58. package/dist/components/contact/index.cjs +7 -7
  59. package/dist/components/contact/index.js +6 -6
  60. package/dist/components/docs/index.cjs +9 -9
  61. package/dist/components/docs/index.js +8 -8
  62. package/dist/components/embeds/index.cjs +7 -7
  63. package/dist/components/embeds/index.js +6 -6
  64. package/dist/components/faq/index.cjs +8 -8
  65. package/dist/components/faq/index.js +7 -7
  66. package/dist/components/features/index.cjs +6 -6
  67. package/dist/components/features/index.js +5 -5
  68. package/dist/components/help-center-pages/index.cjs +25 -25
  69. package/dist/components/help-center-pages/index.js +16 -16
  70. package/dist/components/icons/index.cjs +3 -3
  71. package/dist/components/icons/index.js +2 -2
  72. package/dist/components/index.cjs +244 -244
  73. package/dist/components/index.js +14 -14
  74. package/dist/components/navigation/index.cjs +6 -6
  75. package/dist/components/navigation/index.js +5 -5
  76. package/dist/components/onboarding-guides/index.cjs +10 -10
  77. package/dist/components/onboarding-guides/index.js +9 -9
  78. package/dist/components/related-content/index.cjs +8 -8
  79. package/dist/components/related-content/index.js +7 -7
  80. package/dist/components/tickets/index.cjs +9 -9
  81. package/dist/components/tickets/index.js +8 -8
  82. package/dist/components/ui/button/button-styles.d.ts +2 -0
  83. package/dist/components/ui/button/button-styles.d.ts.map +1 -1
  84. package/dist/components/ui/button/button.d.ts +1 -1
  85. package/dist/components/ui/button/button.d.ts.map +1 -1
  86. package/dist/components/ui/button/split-button.d.ts +1 -1
  87. package/dist/components/ui/button/split-button.d.ts.map +1 -1
  88. package/dist/components/ui/file-manager/index.cjs +69 -69
  89. package/dist/components/ui/file-manager/index.js +2 -2
  90. package/dist/components/ui/index.cjs +6 -6
  91. package/dist/components/ui/index.js +5 -5
  92. package/dist/hooks/index.cjs +4 -4
  93. package/dist/hooks/index.js +3 -3
  94. package/dist/index.cjs +6 -6
  95. package/dist/index.js +5 -5
  96. package/dist/types/index.cjs +10 -1
  97. package/dist/types/index.cjs.map +1 -1
  98. package/dist/types/index.js +10 -1
  99. package/dist/types/index.js.map +1 -1
  100. package/dist/utils/cn.d.ts.map +1 -1
  101. package/dist/utils/index.cjs +10 -1
  102. package/dist/utils/index.cjs.map +1 -1
  103. package/dist/utils/index.js +10 -1
  104. package/dist/utils/index.js.map +1 -1
  105. package/package.json +1 -1
  106. package/src/components/ui/button/.button-styles.md +2 -2
  107. package/src/components/ui/button/.button.md +1 -1
  108. package/src/components/ui/button/.split-button.md +1 -1
  109. package/src/components/ui/button/button-styles.ts +3 -0
  110. package/src/components/ui/button/button.tsx +8 -2
  111. package/src/components/ui/button/split-button.tsx +7 -0
  112. package/src/stories/Button.stories.tsx +9 -3
  113. package/src/stories/SplitButton.stories.tsx +15 -2
  114. package/src/utils/cn.ts +27 -1
  115. package/dist/chunk-6CITW5BD.js.map +0 -1
  116. package/dist/chunk-FIG2RKZF.cjs.map +0 -1
  117. package/dist/chunk-PYR4LVAF.cjs.map +0 -1
  118. /package/dist/{chunk-VWNYNJWU.js.map → chunk-74ZFCTRZ.js.map} +0 -0
  119. /package/dist/{chunk-7HNLEZ6N.js.map → chunk-7D5KOJMF.js.map} +0 -0
  120. /package/dist/{chunk-7WT3K34L.js.map → chunk-BY6TZ6KA.js.map} +0 -0
  121. /package/dist/{chunk-QA5LN5NS.js.map → chunk-EK2VQXUN.js.map} +0 -0
  122. /package/dist/{chunk-ILUX3DXS.js.map → chunk-FPOHUGEK.js.map} +0 -0
  123. /package/dist/{chunk-6O47KXGR.js.map → chunk-NY4WLKNU.js.map} +0 -0
  124. /package/dist/{chunk-MK2YWJAA.js.map → chunk-OTV4A6NA.js.map} +0 -0
  125. /package/dist/{chunk-V3SOAVX4.js.map → chunk-OUHLWOPJ.js.map} +0 -0
  126. /package/dist/{chunk-JI24IMOW.js.map → chunk-PJYGEXWM.js.map} +0 -0
  127. /package/dist/{chunk-Z6NIMOXQ.js.map → chunk-SZMA65OW.js.map} +0 -0
  128. /package/dist/{chunk-NPN4WYOI.js.map → chunk-TVMARS74.js.map} +0 -0
  129. /package/dist/{chunk-QNWYTEM6.js.map → chunk-W6RDDT3S.js.map} +0 -0
  130. /package/dist/{chunk-ZWVQULAJ.js.map → chunk-XDBNMB5K.js.map} +0 -0
  131. /package/dist/{chunk-AYNDMF5C.js.map → chunk-XNJ2LZH2.js.map} +0 -0
  132. /package/dist/{chunk-H5SCS5XW.js.map → chunk-ZPUT2BB4.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/platform-domains.ts","../src/utils/cn.ts"],"sourcesContent":["/**\n * Platform-Domain SSOT (single source of truth) + derivations.\n *\n * ONE registry maps each platform → its canonical production URL (`defaultUrl`,\n * the load-bearing source) with an optional per-deploy `NEXT_PUBLIC_*_URL`\n * OVERRIDE. Everything else — the reverse host→platform resolver, the cookie\n * base-domain set (the cross-subdomain SSO mechanism), www/apex expansion, the\n * URL→host parse, preview detection — derives from this one table.\n *\n * EDGE-SAFE + PURE: no React/clsx/tailwind, no `server-only`, no `node:`\n * builtins, no `'use client'`. So it is legal in the Edge middleware\n * (`proxy.ts`), in `'use client'` providers, AND in `server-only` modules\n * (e.g. cookie-domain-server.ts) simultaneously. The ONLY non-pure export is\n * `getAllPlatformBaseDomains`, which reads `typeof window`/`process.env` to\n * preserve byte-identical cookie behavior.\n */\n\nimport type { PlatformName } from './types/platform'\n\nexport type PlatformDomainKey = PlatformName | 'openframe-dashboard'\n\nexport interface PlatformDomainEntry {\n /** Platform key (matches `PlatformName`, plus the forward-only `openframe-dashboard`). */\n key: PlatformDomainKey\n /** Canonical production URL — the LOAD-BEARING source of truth (today's hardcoded fallbacks). */\n defaultUrl: string\n /** `NEXT_PUBLIC_*_URL` per-deploy OVERRIDE. The `defaultUrl` covers it when unset. */\n envVar: string\n /** Legacy/secondary hosts that REVERSE-map to this key (no env var exists — NOT canonical). */\n aliasHostnames?: string[]\n /** Forward-only: no DB row, excluded from the reverse index + cookie set (e.g. the product-CTA dashboard). */\n pseudo?: boolean\n}\n\nexport const PLATFORM_DOMAINS: readonly PlatformDomainEntry[] = [\n { key: 'marketing-hub', defaultUrl: 'https://marketing-hub.flamingo.so', envVar: 'NEXT_PUBLIC_MARKETING_HUB_URL' },\n { key: 'company-hub', defaultUrl: 'https://company-hub.flamingo.so', envVar: 'NEXT_PUBLIC_COMPANY_HUB_URL' },\n { key: 'product-hub', defaultUrl: 'https://product-hub.flamingo.so', envVar: 'NEXT_PUBLIC_PRODUCT_HUB_URL' },\n { key: 'revenue-hub', defaultUrl: 'https://revenue-hub.flamingo.so', envVar: 'NEXT_PUBLIC_REVENUE_HUB_URL' },\n { key: 'people-hub', defaultUrl: 'https://people-hub.flamingo.so', envVar: 'NEXT_PUBLIC_PEOPLE_HUB_URL' },\n { key: 'openmsp', defaultUrl: 'https://www.openmsp.ai', envVar: 'NEXT_PUBLIC_OPENMSP_URL' },\n // ORDERING INVARIANT (first-wins, load-bearing): `flamingo` MUST precede `flamingo-teaser` + `universal`.\n // All three resolve to www.flamingo.run; the reverse index is first-wins → flamingo claims the shared host,\n // teaser keeps only its unique flamingo.cx aliases, universal contributes no unique host.\n // ⚠️ DO NOT REORDER — enforced by the module-load self-check at the bottom of this file.\n { key: 'flamingo', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL' },\n { key: 'tmcg', defaultUrl: 'https://www.tmcg.miami', envVar: 'NEXT_PUBLIC_TMCG_URL' },\n { key: 'flamingo-teaser', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL', aliasHostnames: ['flamingo.cx', 'www.flamingo.cx'] },\n { key: 'openframe', defaultUrl: 'https://openframe.ai', envVar: 'NEXT_PUBLIC_OPENFRAME_URL', aliasHostnames: ['openframe.ai', 'www.openframe.ai', 'hub.openframe.ai'] },\n { key: 'openframe-dashboard', defaultUrl: 'https://openframe.ai', envVar: 'NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL', pseudo: true },\n { key: 'universal', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL' },\n]\n\n// ── Compile-time key guards (anchor the table on PlatformName, both directions) ──\n// (1) Removal/typo guard: every table key must be a valid PlatformDomainKey.\nconst _tableSatisfies = PLATFORM_DOMAINS satisfies readonly PlatformDomainEntry[]\nvoid _tableSatisfies\n// (2) Addition guard: a NEW PlatformName member that lacks a table row fails the build.\ntype _MissingKey = Exclude<PlatformName, (typeof PLATFORM_DOMAINS)[number]['key']>\nconst _exhaustive: [_MissingKey] extends [never] ? true : false = true\nvoid _exhaustive\n\n// ── Env overrides (the ONLY place env URLs enter — literal-key inlined + compile-time-guarded) ──\n// `process.env.NEXT_PUBLIC_X` is build-inlined ONLY with a LITERAL key, so the env-var name is the\n// irreducible two-copy (the registry `envVar` column + the literal access below). The `satisfies` makes\n// `tsc`/`next build` FAIL if this map is missing a registry env var OR carries a stale one (bidirectional).\ntype EnvVarKey = (typeof PLATFORM_DOMAINS)[number]['envVar']\nconst ENV_OVERRIDES = {\n NEXT_PUBLIC_MARKETING_HUB_URL: process.env.NEXT_PUBLIC_MARKETING_HUB_URL,\n NEXT_PUBLIC_COMPANY_HUB_URL: process.env.NEXT_PUBLIC_COMPANY_HUB_URL,\n NEXT_PUBLIC_PRODUCT_HUB_URL: process.env.NEXT_PUBLIC_PRODUCT_HUB_URL,\n NEXT_PUBLIC_REVENUE_HUB_URL: process.env.NEXT_PUBLIC_REVENUE_HUB_URL,\n NEXT_PUBLIC_PEOPLE_HUB_URL: process.env.NEXT_PUBLIC_PEOPLE_HUB_URL,\n NEXT_PUBLIC_OPENMSP_URL: process.env.NEXT_PUBLIC_OPENMSP_URL,\n NEXT_PUBLIC_FLAMINGO_URL: process.env.NEXT_PUBLIC_FLAMINGO_URL,\n NEXT_PUBLIC_TMCG_URL: process.env.NEXT_PUBLIC_TMCG_URL,\n NEXT_PUBLIC_OPENFRAME_URL: process.env.NEXT_PUBLIC_OPENFRAME_URL,\n NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL: process.env.NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL,\n} satisfies Record<EnvVarKey, string | undefined>\n\n/** The registry entry for a key (undefined for an unknown key). */\nexport function byKey(key: string): PlatformDomainEntry | undefined {\n return PLATFORM_DOMAINS.find((e) => e.key === key)\n}\n\n/** Read a platform's `NEXT_PUBLIC_*_URL` override (or null). */\nfunction envOverrideFor(key: string): string | null {\n const envVar = byKey(key)?.envVar\n if (!envVar) return null\n return (ENV_OVERRIDES as Record<string, string | undefined>)[envVar] || null\n}\n\n/**\n * Ensure a URL string carries a scheme. Per-deploy `NEXT_PUBLIC_*_URL` overrides are\n * stored SCHEME-LESS (bare host, e.g. `www.openmsp.ai` / `hub.openframe.ai`) — the\n * canonical convention in the Vercel shared-env store. This normalizes them to a full\n * `https://` URL so every downstream consumer (`hostOf`/`new URL`, hrefs, the cookie\n * base-domain derivation, CSP) receives a parseable URL. Full-URL inputs (the registry\n * `defaultUrl`s, any scheme'd override) pass through unchanged.\n *\n * EXPORTED as the single owner of the scheme-normalization rule (next.config.mjs keeps a\n * byte-identical local copy ONLY because Next evaluates its config outside the TS module\n * graph and cannot import this — see the comment there).\n *\n * Handles a (theoretical) protocol-relative `//host` too: strips the leading slashes so it\n * doesn't become `https:////host` (empty-host → hostOf null → silent platform drop).\n */\nexport function ensureScheme(url: string): string {\n const trimmed = url.trim()\n if (/^[a-z][a-z0-9+.-]*:\\/\\//i.test(trimmed)) return trimmed // already has a scheme\n return `https://${trimmed.replace(/^\\/+/, '')}` // bare host or protocol-relative `//host`\n}\n\n/**\n * Canonical production URL for a platform: env override wins, else the `defaultUrl`.\n * NEVER throws / undefined — the default guarantees a host (this is what keeps the\n * cookie base-domains, the reverse map, and CSP intact even with every override unset).\n * The result ALWAYS carries a scheme (`ensureScheme`), so the scheme-less env overrides\n * resolve to valid URLs. Unknown-key fallback preserves cn.ts's flamingo.run default.\n */\nexport function getPlatformProductionUrl(platform: string): string {\n const resolved =\n envOverrideFor(platform) ??\n byKey(platform)?.defaultUrl ??\n envOverrideFor('flamingo') ??\n 'https://www.flamingo.run'\n return ensureScheme(resolved)\n}\n\n// ── Single-owner host primitives ──\n\n/** Canonical URL→host parser: `.hostname` (PORT-STRIPPED, lowercased), null on parse failure. */\nexport function hostOf(value: string | null | undefined): string | null {\n if (!value) return null\n try {\n return new URL(value).hostname.toLowerCase()\n } catch {\n return null\n }\n}\n\n/** Expand a host into its `www.`/apex pair. 3+-label and single-label hosts return `[host]`. */\nexport function expandWwwApex(host: string): string[] {\n if (host.startsWith('www.')) return [host, host.slice(4)]\n if (host.split('.').length === 2) return [host, `www.${host}`]\n return [host]\n}\n\n/** Registrable base domain (`parts.slice(-2).join('.')`), dotless; undefined for <2-label. */\nexport function toRegistrableBaseDomain(host: string): string | undefined {\n const parts = host.split('.')\n if (parts.length >= 2) return parts.slice(-2).join('.')\n return undefined\n}\n\n/** An entry's alias hosts (single-owner reader). */\nexport function aliasHostsOf(key: string): string[] {\n return byKey(key)?.aliasHostnames ?? []\n}\n\n/** All hosts an entry contributes to the reverse index (resolved host + optional aliases). */\nfunction hostsForEntry(entry: PlatformDomainEntry, opts: { includeAliases: boolean }): string[] {\n const resolved = hostOf(getPlatformProductionUrl(entry.key))\n const hosts = resolved ? expandWwwApex(resolved) : []\n if (opts.includeAliases) hosts.push(...aliasHostsOf(entry.key))\n return hosts\n}\n\n/**\n * Reverse resolver: hostname → platform key (first-wins over registry order, non-pseudo only).\n * Guarantees openframe.ai / www.openframe.ai / hub.openframe.ai → openframe in every env.\n * Replaces the hub `PLATFORM_DOMAIN_MAP`.\n */\nexport function getPlatformByHostname(hostname: string): PlatformDomainKey | null {\n const host = hostname.toLowerCase()\n for (const entry of PLATFORM_DOMAINS) {\n if (entry.pseudo) continue\n if (hostsForEntry(entry, { includeAliases: true }).includes(host)) return entry.key\n }\n return null\n}\n\n// ── Preview detection (two distinct predicates — env-form vs host-form) ──\n\n/** Env-form preview predicate (Vercel `VERCEL_ENV`). */\nexport function isPreviewEnv(): boolean {\n return process.env.VERCEL_ENV === 'preview'\n}\n\n/** Host-form preview predicate (a `*.vercel.app` host). Dot-bounded suffix so a\n * malicious `foo.vercel.app.evil.com` is NOT treated as preview. */\nexport function isPreviewHost(hostname: string): boolean {\n return hostname.endsWith('.vercel.app')\n}\n\n/**\n * ALL unique cookie base domains (the cross-subdomain SSO mechanism).\n *\n * NON-PURE (the sole such export): reads `typeof window` + `process.env` to\n * preserve byte-identical cookie behavior. Keeps the original three branches:\n * 1. localhost / private IP → [] (host-only cookies)\n * 2. Vercel preview (env OR host) → ['.vercel.app','vercel.app']\n * 3. production → for each non-pseudo platform, registrable base of its resolved\n * host, emitted as both `.base` and bare `base`.\n *\n * Because `getPlatformProductionUrl` always yields a host (override OR default),\n * `.flamingo.so` / `.flamingo.run` / `.openmsp.ai` / `.tmcg.miami` / `.openframe.ai`\n * are ALWAYS present → cross-hub SSO is byte-identical to today.\n */\nexport function getAllPlatformBaseDomains(): string[] {\n if (typeof window === 'undefined') return []\n\n const hostname = window.location.hostname\n\n // Case 1: localhost / private IP — no domains\n if (hostname === 'localhost' || hostname === '127.0.0.1' || hostname.startsWith('127.')) {\n return []\n }\n\n // Case 2: Vercel preview — vercel.app domain\n const previewEnv =\n process.env.VERCEL_ENV === 'preview' ||\n process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview' ||\n isPreviewHost(hostname)\n if (previewEnv) {\n return ['.vercel.app', 'vercel.app']\n }\n\n // Case 3: production — registrable base of every non-pseudo platform's resolved host\n const baseDomains = new Set<string>()\n for (const entry of PLATFORM_DOMAINS) {\n if (entry.pseudo) continue\n const host = hostOf(getPlatformProductionUrl(entry.key))\n if (!host) continue\n const base = toRegistrableBaseDomain(host)\n if (base) {\n baseDomains.add(`.${base}`)\n baseDomains.add(base)\n }\n }\n return Array.from(baseDomains)\n}\n\n// ── Cookie-domain guard + match (single owner; shared by the client cookie-domain.ts +\n// server-only cookie-domain-server.ts resolvers, which previously hand-rolled both 3×) ──\n\n/**\n * Hosts that must NOT receive a `Domain=` cookie → the caller returns undefined (host-only):\n * localhost, loopback/private IPs, and any `*.vercel.app`. `vercel.app` is on the Public Suffix\n * List, so browsers SILENTLY drop `Set-Cookie: Domain=.vercel.app` — which broke the PKCE verifier\n * + session cookies on preview deploys. Host-only is sufficient there (the same preview host\n * round-trips the OAuth chain); production hosts (`.flamingo.so`/`.openmsp.ai`/…) fall through.\n */\nexport function isNonCookieableHost(hostname: string): boolean {\n return (\n hostname === 'localhost' ||\n hostname === '127.0.0.1' ||\n hostname.startsWith('127.') ||\n hostname.startsWith('192.168.') ||\n hostname.startsWith('10.') ||\n hostname.includes('.vercel.app')\n )\n}\n\n/**\n * Match a hostname against a set of registrable base domains → the dotted cookie `Domain`\n * (`.flamingo.so`), or undefined when none contains the host. Accepts bases with or without a\n * leading dot and always returns the dotted form. Single owner for the match loop both resolvers ran.\n */\nexport function matchCookieDomain(hostname: string, baseDomains: string[]): string | undefined {\n for (const domain of baseDomains) {\n const bare = domain.startsWith('.') ? domain.slice(1) : domain\n if (hostname === bare || hostname.endsWith(`.${bare}`)) {\n return domain.startsWith('.') ? domain : `.${domain}`\n }\n }\n return undefined\n}\n\n// ── Module-load ordering self-check (NON-fatal — this module is imported by cn.ts → ~everything,\n// so a hard throw would be a total outage if the assertion were ever over-strict). Checks the REAL\n// invariant — table order — STRUCTURALLY (findIndex), NOT via getPlatformByHostname on a hardcoded\n// host: the latter false-positives when NEXT_PUBLIC_FLAMINGO_URL is overridden to a non-default host\n// (flamingo's resolved host changes, so `www.flamingo.run` no longer reverse-maps to it though the\n// ordering is fine). The alias checks below ARE env-immune (aliasHostnames are unique per key). The\n// authoritative guard is the reverse-map vitest. ⚠️ keep `flamingo` before `flamingo-teaser`/`universal`.\nconst _orderIdx = (k: PlatformDomainKey) => PLATFORM_DOMAINS.findIndex((e) => e.key === k)\nif (\n _orderIdx('flamingo') > _orderIdx('flamingo-teaser') ||\n _orderIdx('flamingo') > _orderIdx('universal') ||\n getPlatformByHostname('flamingo.cx') !== 'flamingo-teaser' ||\n getPlatformByHostname('hub.openframe.ai') !== 'openframe'\n) {\n // eslint-disable-next-line no-console\n console.error(\n '[platform-domains] ⚠️ PLATFORM_DOMAINS ordering invariant violated — `flamingo` must precede ' +\n '`flamingo-teaser`/`universal`, and the openframe/teaser aliases must be intact. Do not reorder the table.',\n )\n}\n","import { clsx, type ClassValue } from \"clsx\"\nimport { extendTailwindMerge } from \"tailwind-merge\"\n// Platform→domain resolution moved to the SSOT module `src/platform-domains.ts`.\n// `getPlatformProductionUrl` / `getAllPlatformBaseDomains` now live there (re-exported\n// via the utils barrel for existing callers); `getBaseUrl` stays here because it owns the\n// dev-localhost + Vercel-self-origin branches, and delegates its platform branch.\nimport { getPlatformProductionUrl } from \"../platform-domains\"\n\nconst twMerge = extendTailwindMerge<'ods-typography'>({\n extend: {\n classGroups: {\n 'ods-typography': ['text-h1', 'text-h2', 'text-h3', 'text-h4', 'text-h5', 'text-h6'],\n },\n },\n})\n\n/**\n * Combine class names with Tailwind's merge utility\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n/**\n * Get the application base URL for the current environment\n *\n * @param platform - Optional platform name (openmsp, flamingo, tmcg, openframe, etc.)\n * @returns The base URL with protocol (https:// or http://)\n *\n * Priority order:\n * 1. Development (http://localhost:3000)\n * 2. Platform-specific URL via the SSOT (if `platform` provided) — env override ?? default\n * 3. VERCEL_PROJECT_PRODUCTION_URL (Vercel production domain)\n * 4. Production fallback: the DEPLOYING platform's canonical URL (NEXT_PUBLIC_APP_TYPE),\n * openmsp if unset — sourced from the SSOT, no hardcoded literal.\n *\n * The per-platform canonical URLs + their `NEXT_PUBLIC_*_URL` overrides are the single\n * source of truth in `src/platform-domains.ts` (`PLATFORM_DOMAINS`).\n *\n * @example\n * getBaseUrl() // Current deployment's URL\n * getBaseUrl('flamingo') // https://www.flamingo.run (prod) or http://localhost:3000 (dev)\n */\nexport function getBaseUrl(platform?: string): string {\n // In development, always use localhost (regardless of platform)\n if (process.env.NODE_ENV !== 'production') {\n return process.env.NEXT_PUBLIC_DEV_URL || 'http://localhost:3000'\n }\n\n // If platform is specified, return its production URL (env override ?? default)\n if (platform) {\n return getPlatformProductionUrl(platform)\n }\n\n // Production: Use Vercel domain if available\n if (process.env.VERCEL_PROJECT_PRODUCTION_URL) {\n return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`\n }\n\n // Production fallback: the deploying platform's canonical www domain (avoids Google\n // \"Page with redirect\"). Derived from the SSOT for the current app type (openmsp when\n // unset → 'https://www.openmsp.ai', byte-identical to the old hardcoded fallback).\n return getPlatformProductionUrl(process.env.NEXT_PUBLIC_APP_TYPE || 'openmsp')\n}\n"],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QAAQ,CAAC;AACzF,QACE,UAAU,UAAU,IAAI,UAAU,iBAAiB,KACnD,UAAU,UAAU,IAAI,UAAU,WAAW,KAC7C,sBAAsB,aAAa,MAAM,qBACzC,sBAAsB,kBAAkB,MAAM,aAC9C;AAEA,cAAQ;AAAA,QACN;AAAA,MAEF;AAAA,IACF;AAAA;AAAA;;;AC1SA,SAAS,YAA6B;AACtC,SAAS,2BAA2B;AAkB7B,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;AAsBO,SAAS,WAAW,UAA2B;AAEpD,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,WAAO,QAAQ,IAAI,uBAAuB;AAAA,EAC5C;AAGA,MAAI,UAAU;AACZ,WAAO,yBAAyB,QAAQ;AAAA,EAC1C;AAGA,MAAI,QAAQ,IAAI,+BAA+B;AAC7C,WAAO,WAAW,QAAQ,IAAI,6BAA6B;AAAA,EAC7D;AAKA,SAAO,yBAAyB,QAAQ,IAAI,wBAAwB,SAAS;AAC/E;AA/DA,IAQM;AARN;AAAA;AAAA;AAMA;AAEA,IAAM,UAAU,oBAAsC;AAAA,MACpD,QAAQ;AAAA,QACN,aAAa;AAAA,UACX,kBAAkB,CAAC,WAAW,WAAW,WAAW,WAAW,WAAW,SAAS;AAAA,QACrF;AAAA,MACF;AAAA,IACF,CAAC;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/platform-domains.ts","../src/utils/cn.ts"],"sourcesContent":["/**\n * Platform-Domain SSOT (single source of truth) + derivations.\n *\n * ONE registry maps each platform → its canonical production URL (`defaultUrl`,\n * the load-bearing source) with an optional per-deploy `NEXT_PUBLIC_*_URL`\n * OVERRIDE. Everything else — the reverse host→platform resolver, the cookie\n * base-domain set (the cross-subdomain SSO mechanism), www/apex expansion, the\n * URL→host parse, preview detection — derives from this one table.\n *\n * EDGE-SAFE + PURE: no React/clsx/tailwind, no `server-only`, no `node:`\n * builtins, no `'use client'`. So it is legal in the Edge middleware\n * (`proxy.ts`), in `'use client'` providers, AND in `server-only` modules\n * (e.g. cookie-domain-server.ts) simultaneously. The ONLY non-pure export is\n * `getAllPlatformBaseDomains`, which reads `typeof window`/`process.env` to\n * preserve byte-identical cookie behavior.\n */\n\nimport type { PlatformName } from './types/platform'\n\nexport type PlatformDomainKey = PlatformName | 'openframe-dashboard'\n\nexport interface PlatformDomainEntry {\n /** Platform key (matches `PlatformName`, plus the forward-only `openframe-dashboard`). */\n key: PlatformDomainKey\n /** Canonical production URL — the LOAD-BEARING source of truth (today's hardcoded fallbacks). */\n defaultUrl: string\n /** `NEXT_PUBLIC_*_URL` per-deploy OVERRIDE. The `defaultUrl` covers it when unset. */\n envVar: string\n /** Legacy/secondary hosts that REVERSE-map to this key (no env var exists — NOT canonical). */\n aliasHostnames?: string[]\n /** Forward-only: no DB row, excluded from the reverse index + cookie set (e.g. the product-CTA dashboard). */\n pseudo?: boolean\n}\n\nexport const PLATFORM_DOMAINS: readonly PlatformDomainEntry[] = [\n { key: 'marketing-hub', defaultUrl: 'https://marketing-hub.flamingo.so', envVar: 'NEXT_PUBLIC_MARKETING_HUB_URL' },\n { key: 'company-hub', defaultUrl: 'https://company-hub.flamingo.so', envVar: 'NEXT_PUBLIC_COMPANY_HUB_URL' },\n { key: 'product-hub', defaultUrl: 'https://product-hub.flamingo.so', envVar: 'NEXT_PUBLIC_PRODUCT_HUB_URL' },\n { key: 'revenue-hub', defaultUrl: 'https://revenue-hub.flamingo.so', envVar: 'NEXT_PUBLIC_REVENUE_HUB_URL' },\n { key: 'people-hub', defaultUrl: 'https://people-hub.flamingo.so', envVar: 'NEXT_PUBLIC_PEOPLE_HUB_URL' },\n { key: 'openmsp', defaultUrl: 'https://www.openmsp.ai', envVar: 'NEXT_PUBLIC_OPENMSP_URL' },\n // ORDERING INVARIANT (first-wins, load-bearing): `flamingo` MUST precede `flamingo-teaser` + `universal`.\n // All three resolve to www.flamingo.run; the reverse index is first-wins → flamingo claims the shared host,\n // teaser keeps only its unique flamingo.cx aliases, universal contributes no unique host.\n // ⚠️ DO NOT REORDER — enforced by the module-load self-check at the bottom of this file.\n { key: 'flamingo', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL' },\n { key: 'tmcg', defaultUrl: 'https://www.tmcg.miami', envVar: 'NEXT_PUBLIC_TMCG_URL' },\n { key: 'flamingo-teaser', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL', aliasHostnames: ['flamingo.cx', 'www.flamingo.cx'] },\n { key: 'openframe', defaultUrl: 'https://openframe.ai', envVar: 'NEXT_PUBLIC_OPENFRAME_URL', aliasHostnames: ['openframe.ai', 'www.openframe.ai', 'hub.openframe.ai'] },\n { key: 'openframe-dashboard', defaultUrl: 'https://openframe.ai', envVar: 'NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL', pseudo: true },\n { key: 'universal', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL' },\n]\n\n// ── Compile-time key guards (anchor the table on PlatformName, both directions) ──\n// (1) Removal/typo guard: every table key must be a valid PlatformDomainKey.\nconst _tableSatisfies = PLATFORM_DOMAINS satisfies readonly PlatformDomainEntry[]\nvoid _tableSatisfies\n// (2) Addition guard: a NEW PlatformName member that lacks a table row fails the build.\ntype _MissingKey = Exclude<PlatformName, (typeof PLATFORM_DOMAINS)[number]['key']>\nconst _exhaustive: [_MissingKey] extends [never] ? true : false = true\nvoid _exhaustive\n\n// ── Env overrides (the ONLY place env URLs enter — literal-key inlined + compile-time-guarded) ──\n// `process.env.NEXT_PUBLIC_X` is build-inlined ONLY with a LITERAL key, so the env-var name is the\n// irreducible two-copy (the registry `envVar` column + the literal access below). The `satisfies` makes\n// `tsc`/`next build` FAIL if this map is missing a registry env var OR carries a stale one (bidirectional).\ntype EnvVarKey = (typeof PLATFORM_DOMAINS)[number]['envVar']\nconst ENV_OVERRIDES = {\n NEXT_PUBLIC_MARKETING_HUB_URL: process.env.NEXT_PUBLIC_MARKETING_HUB_URL,\n NEXT_PUBLIC_COMPANY_HUB_URL: process.env.NEXT_PUBLIC_COMPANY_HUB_URL,\n NEXT_PUBLIC_PRODUCT_HUB_URL: process.env.NEXT_PUBLIC_PRODUCT_HUB_URL,\n NEXT_PUBLIC_REVENUE_HUB_URL: process.env.NEXT_PUBLIC_REVENUE_HUB_URL,\n NEXT_PUBLIC_PEOPLE_HUB_URL: process.env.NEXT_PUBLIC_PEOPLE_HUB_URL,\n NEXT_PUBLIC_OPENMSP_URL: process.env.NEXT_PUBLIC_OPENMSP_URL,\n NEXT_PUBLIC_FLAMINGO_URL: process.env.NEXT_PUBLIC_FLAMINGO_URL,\n NEXT_PUBLIC_TMCG_URL: process.env.NEXT_PUBLIC_TMCG_URL,\n NEXT_PUBLIC_OPENFRAME_URL: process.env.NEXT_PUBLIC_OPENFRAME_URL,\n NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL: process.env.NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL,\n} satisfies Record<EnvVarKey, string | undefined>\n\n/** The registry entry for a key (undefined for an unknown key). */\nexport function byKey(key: string): PlatformDomainEntry | undefined {\n return PLATFORM_DOMAINS.find((e) => e.key === key)\n}\n\n/** Read a platform's `NEXT_PUBLIC_*_URL` override (or null). */\nfunction envOverrideFor(key: string): string | null {\n const envVar = byKey(key)?.envVar\n if (!envVar) return null\n return (ENV_OVERRIDES as Record<string, string | undefined>)[envVar] || null\n}\n\n/**\n * Ensure a URL string carries a scheme. Per-deploy `NEXT_PUBLIC_*_URL` overrides are\n * stored SCHEME-LESS (bare host, e.g. `www.openmsp.ai` / `hub.openframe.ai`) — the\n * canonical convention in the Vercel shared-env store. This normalizes them to a full\n * `https://` URL so every downstream consumer (`hostOf`/`new URL`, hrefs, the cookie\n * base-domain derivation, CSP) receives a parseable URL. Full-URL inputs (the registry\n * `defaultUrl`s, any scheme'd override) pass through unchanged.\n *\n * EXPORTED as the single owner of the scheme-normalization rule (next.config.mjs keeps a\n * byte-identical local copy ONLY because Next evaluates its config outside the TS module\n * graph and cannot import this — see the comment there).\n *\n * Handles a (theoretical) protocol-relative `//host` too: strips the leading slashes so it\n * doesn't become `https:////host` (empty-host → hostOf null → silent platform drop).\n */\nexport function ensureScheme(url: string): string {\n const trimmed = url.trim()\n if (/^[a-z][a-z0-9+.-]*:\\/\\//i.test(trimmed)) return trimmed // already has a scheme\n return `https://${trimmed.replace(/^\\/+/, '')}` // bare host or protocol-relative `//host`\n}\n\n/**\n * Canonical production URL for a platform: env override wins, else the `defaultUrl`.\n * NEVER throws / undefined — the default guarantees a host (this is what keeps the\n * cookie base-domains, the reverse map, and CSP intact even with every override unset).\n * The result ALWAYS carries a scheme (`ensureScheme`), so the scheme-less env overrides\n * resolve to valid URLs. Unknown-key fallback preserves cn.ts's flamingo.run default.\n */\nexport function getPlatformProductionUrl(platform: string): string {\n const resolved =\n envOverrideFor(platform) ??\n byKey(platform)?.defaultUrl ??\n envOverrideFor('flamingo') ??\n 'https://www.flamingo.run'\n return ensureScheme(resolved)\n}\n\n// ── Single-owner host primitives ──\n\n/** Canonical URL→host parser: `.hostname` (PORT-STRIPPED, lowercased), null on parse failure. */\nexport function hostOf(value: string | null | undefined): string | null {\n if (!value) return null\n try {\n return new URL(value).hostname.toLowerCase()\n } catch {\n return null\n }\n}\n\n/** Expand a host into its `www.`/apex pair. 3+-label and single-label hosts return `[host]`. */\nexport function expandWwwApex(host: string): string[] {\n if (host.startsWith('www.')) return [host, host.slice(4)]\n if (host.split('.').length === 2) return [host, `www.${host}`]\n return [host]\n}\n\n/** Registrable base domain (`parts.slice(-2).join('.')`), dotless; undefined for <2-label. */\nexport function toRegistrableBaseDomain(host: string): string | undefined {\n const parts = host.split('.')\n if (parts.length >= 2) return parts.slice(-2).join('.')\n return undefined\n}\n\n/** An entry's alias hosts (single-owner reader). */\nexport function aliasHostsOf(key: string): string[] {\n return byKey(key)?.aliasHostnames ?? []\n}\n\n/** All hosts an entry contributes to the reverse index (resolved host + optional aliases). */\nfunction hostsForEntry(entry: PlatformDomainEntry, opts: { includeAliases: boolean }): string[] {\n const resolved = hostOf(getPlatformProductionUrl(entry.key))\n const hosts = resolved ? expandWwwApex(resolved) : []\n if (opts.includeAliases) hosts.push(...aliasHostsOf(entry.key))\n return hosts\n}\n\n/**\n * Reverse resolver: hostname → platform key (first-wins over registry order, non-pseudo only).\n * Guarantees openframe.ai / www.openframe.ai / hub.openframe.ai → openframe in every env.\n * Replaces the hub `PLATFORM_DOMAIN_MAP`.\n */\nexport function getPlatformByHostname(hostname: string): PlatformDomainKey | null {\n const host = hostname.toLowerCase()\n for (const entry of PLATFORM_DOMAINS) {\n if (entry.pseudo) continue\n if (hostsForEntry(entry, { includeAliases: true }).includes(host)) return entry.key\n }\n return null\n}\n\n// ── Preview detection (two distinct predicates — env-form vs host-form) ──\n\n/** Env-form preview predicate (Vercel `VERCEL_ENV`). */\nexport function isPreviewEnv(): boolean {\n return process.env.VERCEL_ENV === 'preview'\n}\n\n/** Host-form preview predicate (a `*.vercel.app` host). Dot-bounded suffix so a\n * malicious `foo.vercel.app.evil.com` is NOT treated as preview. */\nexport function isPreviewHost(hostname: string): boolean {\n return hostname.endsWith('.vercel.app')\n}\n\n/**\n * ALL unique cookie base domains (the cross-subdomain SSO mechanism).\n *\n * NON-PURE (the sole such export): reads `typeof window` + `process.env` to\n * preserve byte-identical cookie behavior. Keeps the original three branches:\n * 1. localhost / private IP → [] (host-only cookies)\n * 2. Vercel preview (env OR host) → ['.vercel.app','vercel.app']\n * 3. production → for each non-pseudo platform, registrable base of its resolved\n * host, emitted as both `.base` and bare `base`.\n *\n * Because `getPlatformProductionUrl` always yields a host (override OR default),\n * `.flamingo.so` / `.flamingo.run` / `.openmsp.ai` / `.tmcg.miami` / `.openframe.ai`\n * are ALWAYS present → cross-hub SSO is byte-identical to today.\n */\nexport function getAllPlatformBaseDomains(): string[] {\n if (typeof window === 'undefined') return []\n\n const hostname = window.location.hostname\n\n // Case 1: localhost / private IP — no domains\n if (hostname === 'localhost' || hostname === '127.0.0.1' || hostname.startsWith('127.')) {\n return []\n }\n\n // Case 2: Vercel preview — vercel.app domain\n const previewEnv =\n process.env.VERCEL_ENV === 'preview' ||\n process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview' ||\n isPreviewHost(hostname)\n if (previewEnv) {\n return ['.vercel.app', 'vercel.app']\n }\n\n // Case 3: production — registrable base of every non-pseudo platform's resolved host\n const baseDomains = new Set<string>()\n for (const entry of PLATFORM_DOMAINS) {\n if (entry.pseudo) continue\n const host = hostOf(getPlatformProductionUrl(entry.key))\n if (!host) continue\n const base = toRegistrableBaseDomain(host)\n if (base) {\n baseDomains.add(`.${base}`)\n baseDomains.add(base)\n }\n }\n return Array.from(baseDomains)\n}\n\n// ── Cookie-domain guard + match (single owner; shared by the client cookie-domain.ts +\n// server-only cookie-domain-server.ts resolvers, which previously hand-rolled both 3×) ──\n\n/**\n * Hosts that must NOT receive a `Domain=` cookie → the caller returns undefined (host-only):\n * localhost, loopback/private IPs, and any `*.vercel.app`. `vercel.app` is on the Public Suffix\n * List, so browsers SILENTLY drop `Set-Cookie: Domain=.vercel.app` — which broke the PKCE verifier\n * + session cookies on preview deploys. Host-only is sufficient there (the same preview host\n * round-trips the OAuth chain); production hosts (`.flamingo.so`/`.openmsp.ai`/…) fall through.\n */\nexport function isNonCookieableHost(hostname: string): boolean {\n return (\n hostname === 'localhost' ||\n hostname === '127.0.0.1' ||\n hostname.startsWith('127.') ||\n hostname.startsWith('192.168.') ||\n hostname.startsWith('10.') ||\n hostname.includes('.vercel.app')\n )\n}\n\n/**\n * Match a hostname against a set of registrable base domains → the dotted cookie `Domain`\n * (`.flamingo.so`), or undefined when none contains the host. Accepts bases with or without a\n * leading dot and always returns the dotted form. Single owner for the match loop both resolvers ran.\n */\nexport function matchCookieDomain(hostname: string, baseDomains: string[]): string | undefined {\n for (const domain of baseDomains) {\n const bare = domain.startsWith('.') ? domain.slice(1) : domain\n if (hostname === bare || hostname.endsWith(`.${bare}`)) {\n return domain.startsWith('.') ? domain : `.${domain}`\n }\n }\n return undefined\n}\n\n// ── Module-load ordering self-check (NON-fatal — this module is imported by cn.ts → ~everything,\n// so a hard throw would be a total outage if the assertion were ever over-strict). Checks the REAL\n// invariant — table order — STRUCTURALLY (findIndex), NOT via getPlatformByHostname on a hardcoded\n// host: the latter false-positives when NEXT_PUBLIC_FLAMINGO_URL is overridden to a non-default host\n// (flamingo's resolved host changes, so `www.flamingo.run` no longer reverse-maps to it though the\n// ordering is fine). The alias checks below ARE env-immune (aliasHostnames are unique per key). The\n// authoritative guard is the reverse-map vitest. ⚠️ keep `flamingo` before `flamingo-teaser`/`universal`.\nconst _orderIdx = (k: PlatformDomainKey) => PLATFORM_DOMAINS.findIndex((e) => e.key === k)\nif (\n _orderIdx('flamingo') > _orderIdx('flamingo-teaser') ||\n _orderIdx('flamingo') > _orderIdx('universal') ||\n getPlatformByHostname('flamingo.cx') !== 'flamingo-teaser' ||\n getPlatformByHostname('hub.openframe.ai') !== 'openframe'\n) {\n // eslint-disable-next-line no-console\n console.error(\n '[platform-domains] ⚠️ PLATFORM_DOMAINS ordering invariant violated — `flamingo` must precede ' +\n '`flamingo-teaser`/`universal`, and the openframe/teaser aliases must be intact. Do not reorder the table.',\n )\n}\n","import { clsx, type ClassValue } from \"clsx\"\nimport { extendTailwindMerge } from \"tailwind-merge\"\n// Platform→domain resolution moved to the SSOT module `src/platform-domains.ts`.\n// `getPlatformProductionUrl` / `getAllPlatformBaseDomains` now live there (re-exported\n// via the utils barrel for existing callers); `getBaseUrl` stays here because it owns the\n// dev-localhost + Vercel-self-origin branches, and delegates its platform branch.\nimport { getPlatformProductionUrl } from \"../platform-domains\"\n\n/**\n * EVERY custom `text-*` utility we add in `tailwind.config.ts` MUST be listed here.\n *\n * tailwind-merge has no knowledge of our utilities, and `text-<word>` is\n * indistinguishable from a text COLOUR to it. So an unlisted `text-badge` gets\n * filed in tailwind-merge's `text-color` group, where it and any real colour\n * class silently annihilate each other — last one wins, the other is dropped\n * from the output entirely:\n *\n * cn('text-badge', 'text-ods-text-on-accent') -> 'text-ods-text-on-accent' (size lost)\n * cn('text-[--some-colour]', 'text-badge') -> 'text-badge' (colour lost)\n *\n * Listing them in their own group makes them non-conflicting with colours, so\n * both survive. This is why `text-h1`…`text-h6` are here; `text-code` and\n * `text-badge` were added to the config later and missing them shipped exactly\n * the two failures above (huge badges, and badge text losing its colour).\n */\nconst twMerge = extendTailwindMerge<'ods-typography'>({\n extend: {\n classGroups: {\n 'ods-typography': [\n 'text-h1',\n 'text-h2',\n 'text-h3',\n 'text-h4',\n 'text-h5',\n 'text-h6',\n 'text-code',\n 'text-badge',\n ],\n },\n },\n})\n\n/**\n * Combine class names with Tailwind's merge utility\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n/**\n * Get the application base URL for the current environment\n *\n * @param platform - Optional platform name (openmsp, flamingo, tmcg, openframe, etc.)\n * @returns The base URL with protocol (https:// or http://)\n *\n * Priority order:\n * 1. Development (http://localhost:3000)\n * 2. Platform-specific URL via the SSOT (if `platform` provided) — env override ?? default\n * 3. VERCEL_PROJECT_PRODUCTION_URL (Vercel production domain)\n * 4. Production fallback: the DEPLOYING platform's canonical URL (NEXT_PUBLIC_APP_TYPE),\n * openmsp if unset — sourced from the SSOT, no hardcoded literal.\n *\n * The per-platform canonical URLs + their `NEXT_PUBLIC_*_URL` overrides are the single\n * source of truth in `src/platform-domains.ts` (`PLATFORM_DOMAINS`).\n *\n * @example\n * getBaseUrl() // Current deployment's URL\n * getBaseUrl('flamingo') // https://www.flamingo.run (prod) or http://localhost:3000 (dev)\n */\nexport function getBaseUrl(platform?: string): string {\n // In development, always use localhost (regardless of platform)\n if (process.env.NODE_ENV !== 'production') {\n return process.env.NEXT_PUBLIC_DEV_URL || 'http://localhost:3000'\n }\n\n // If platform is specified, return its production URL (env override ?? default)\n if (platform) {\n return getPlatformProductionUrl(platform)\n }\n\n // Production: Use Vercel domain if available\n if (process.env.VERCEL_PROJECT_PRODUCTION_URL) {\n return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`\n }\n\n // Production fallback: the deploying platform's canonical www domain (avoids Google\n // \"Page with redirect\"). Derived from the SSOT for the current app type (openmsp when\n // unset → 'https://www.openmsp.ai', byte-identical to the old hardcoded fallback).\n return getPlatformProductionUrl(process.env.NEXT_PUBLIC_APP_TYPE || 'openmsp')\n}\n"],"mappings":";;;;;;AAiFO,SAAS,MAAM,KAA8C;AAClE,SAAO,iBAAiB,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG;AACnD;AAGA,SAAS,eAAe,KAA4B;AAClD,QAAM,SAAS,MAAM,GAAG,GAAG;AAC3B,MAAI,CAAC,OAAQ,QAAO;AACpB,SAAQ,cAAqD,MAAM,KAAK;AAC1E;AAiBO,SAAS,aAAa,KAAqB;AAChD,QAAM,UAAU,IAAI,KAAK;AACzB,MAAI,2BAA2B,KAAK,OAAO,EAAG,QAAO;AACrD,SAAO,WAAW,QAAQ,QAAQ,QAAQ,EAAE,CAAC;AAC/C;AASO,SAAS,yBAAyB,UAA0B;AACjE,QAAM,WACJ,eAAe,QAAQ,KACvB,MAAM,QAAQ,GAAG,cACjB,eAAe,UAAU,KACzB;AACF,SAAO,aAAa,QAAQ;AAC9B;AAKO,SAAS,OAAO,OAAiD;AACtE,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI;AACF,WAAO,IAAI,IAAI,KAAK,EAAE,SAAS,YAAY;AAAA,EAC7C,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAGO,SAAS,cAAc,MAAwB;AACpD,MAAI,KAAK,WAAW,MAAM,EAAG,QAAO,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;AACxD,MAAI,KAAK,MAAM,GAAG,EAAE,WAAW,EAAG,QAAO,CAAC,MAAM,OAAO,IAAI,EAAE;AAC7D,SAAO,CAAC,IAAI;AACd;AAGO,SAAS,wBAAwB,M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 +4,14 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkCGUYR6DRcjs = require('./chunk-CGUYR6DR.cjs');
7
+ var _chunkRIEAXUJXcjs = require('./chunk-RIEAXUJX.cjs');
8
8
 
9
9
 
10
10
 
11
11
  var _chunkBGD345ZVcjs = require('./chunk-BGD345ZV.cjs');
12
12
 
13
13
 
14
- var _chunkPYR4LVAFcjs = require('./chunk-PYR4LVAF.cjs');
14
+ var _chunkG3UN2DXUcjs = require('./chunk-G3UN2DXU.cjs');
15
15
 
16
16
  // src/components/embeds/pdf-viewer.tsx
17
17
  var _lucidereact = require('lucide-react');
@@ -32,7 +32,7 @@ function PdfViewer({ src, fileName, onPreview, onDownload, height }) {
32
32
  ] }),
33
33
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full sm:w-auto", children: [
34
34
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
35
- _chunkPYR4LVAFcjs.Button,
35
+ _chunkG3UN2DXUcjs.Button,
36
36
  {
37
37
  variant: "outline",
38
38
  size: "small-legacy",
@@ -45,7 +45,7 @@ function PdfViewer({ src, fileName, onPreview, onDownload, height }) {
45
45
  }
46
46
  ),
47
47
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
48
- _chunkPYR4LVAFcjs.Button,
48
+ _chunkG3UN2DXUcjs.Button,
49
49
  {
50
50
  variant: "outline",
51
51
  size: "small-legacy",
@@ -59,7 +59,7 @@ function PdfViewer({ src, fileName, onPreview, onDownload, height }) {
59
59
  )
60
60
  ] })
61
61
  ] }),
62
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCGUYR6DRcjs.EmbedIframe, { src, title: displayName, height })
62
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRIEAXUJXcjs.EmbedIframe, { src, title: displayName, height })
63
63
  ] });
64
64
  }
65
65
 
@@ -81,11 +81,11 @@ function GoogleSheetsViewer({ externalUrl, fileName, height }) {
81
81
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-h3 text-ods-text-primary truncate", children: displayName })
82
82
  ] }),
83
83
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
84
- _chunkPYR4LVAFcjs.Button,
84
+ _chunkG3UN2DXUcjs.Button,
85
85
  {
86
86
  variant: "outline",
87
87
  size: "small-legacy",
88
- href: _chunkCGUYR6DRcjs.toGoogleSheetsOriginalUrl.call(void 0, externalUrl),
88
+ href: _chunkRIEAXUJXcjs.toGoogleSheetsOriginalUrl.call(void 0, externalUrl),
89
89
  openInNewTab: true,
90
90
  leftIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBGD345ZVcjs.GoogleSheetsIcon, { className: "w-4 h-4" }),
91
91
  rightIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "w-4 h-4" }),
@@ -95,9 +95,9 @@ function GoogleSheetsViewer({ externalUrl, fileName, height }) {
95
95
  )
96
96
  ] }),
97
97
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
98
- _chunkCGUYR6DRcjs.EmbedIframe,
98
+ _chunkRIEAXUJXcjs.EmbedIframe,
99
99
  {
100
- src: _chunkCGUYR6DRcjs.toGoogleSheetsEmbedUrl.call(void 0, externalUrl),
100
+ src: _chunkRIEAXUJXcjs.toGoogleSheetsEmbedUrl.call(void 0, externalUrl),
101
101
  title: displayName,
102
102
  height
103
103
  }
@@ -120,11 +120,11 @@ function FileDownloadCard({
120
120
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-h3 text-ods-text-primary", children: fileName || "File" }),
121
121
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-center gap-3 mt-2 text-h6 text-ods-text-secondary", children: [
122
122
  mimeType && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: mimeType }),
123
- typeof fileSize === "number" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkCGUYR6DRcjs.formatFileSize.call(void 0, fileSize) })
123
+ typeof fileSize === "number" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkRIEAXUJXcjs.formatFileSize.call(void 0, fileSize) })
124
124
  ] })
125
125
  ] }),
126
126
  fileUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
127
- _chunkPYR4LVAFcjs.Button,
127
+ _chunkG3UN2DXUcjs.Button,
128
128
  {
129
129
  variant: "accent",
130
130
  href: fileUrl,
@@ -141,4 +141,4 @@ function FileDownloadCard({
141
141
 
142
142
 
143
143
  exports.PdfViewer = PdfViewer; exports.GoogleSheetsViewer = GoogleSheetsViewer; exports.FileDownloadCard = FileDownloadCard;
144
- //# sourceMappingURL=chunk-27ZGHJDS.cjs.map
144
+ //# sourceMappingURL=chunk-73CH4CZL.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-27ZGHJDS.cjs","../src/components/embeds/pdf-viewer.tsx","../src/components/embeds/google-sheets-viewer.tsx","../src/components/embeds/file-download-card.tsx"],"names":["jsxs","jsx","Download"],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACXA,2CAA8B;AAiBxB,+CAAA;AALC,SAAS,SAAA,CAAU,EAAE,GAAA,EAAK,QAAA,EAAU,SAAA,EAAW,UAAA,EAAY,OAAO,CAAA,EAAmB;AAC1F,EAAA,MAAM,YAAA,EAAc,SAAA,GAAY,cAAA;AAEhC,EAAA,GAAA,CAAI,CAAC,GAAA,EAAK;AACR,IAAA,uBACE,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,6DAAA,EACb,QAAA,EAAA;AAAA,sBAAA,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,yCAAA,CAAyC,CAAA;AAAA,sBACjE,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A,KAAC,EAAA,EAAI,SAAA,EAAU,6EAAA,EACZ,QAAA,EAAA;AAAA,QAAA,SAAA,mBAAYC,6BAAAA,MAAC,EAAA,EAAM,QAAA,EAAA,SAAA,CAAS,CAAA;AAAA,QAC5B,OAAO,SAAA,IAAa,SAAA,mBAAYA,6BAAAA,MAAC,EAAA,EAAM,QAAA,EAAA,8CAAA,QAAuB,EAAA,CAAE;AAAA,MAAA,EAAA,CACnE;AAAA,IAAA,EAAA,CACF,CAAA;AAAA,IACC,QAAA,mBACCA,6BAAAA;AAAA,MAAC,wBAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,QAAA;AAAA,QACR,IAAA,EAAM,OAAA;AAAA,QACN,YAAA,EAAY,IAAA;AAAA,QACZ,QAAA,kBAAUA,6BAAAA,qBAACC,EAAA,EAAS,SAAA,EAAU,UAAA,CAAU,CAAA;AAAA,QACzC,QAAA,EAAA;AAAA,MAAA;AAAA,IAED;AAAA,EAAA,EAAA,CAEJ,EAAA,CACF,CAAA;AAEJ;AHoFA;AACA;AACE;AACA;AACA;AACF,4HAAC","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-27ZGHJDS.cjs","sourcesContent":[null,"\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { Download, Eye } from 'lucide-react'\nimport { AdobePdfIcon } from '../icons-v2-generated'\nimport { EmbedIframe } from './embed-iframe'\n\nexport interface PdfViewerProps {\n src: string\n fileName?: string\n onPreview?: () => void\n onDownload?: () => void\n height?: string\n}\n\nexport function PdfViewer({ src, fileName, onPreview, onDownload, height }: PdfViewerProps) {\n const displayName = fileName || 'PDF Document'\n\n if (!src) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <AdobePdfIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">PDF file not available</p>\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <AdobePdfIcon className=\"w-5 h-5 shrink-0\" />\n <h2 className=\"text-h3 text-ods-text-primary truncate\">{displayName}</h2>\n </div>\n <div className=\"flex items-center gap-2 w-full sm:w-auto\">\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onPreview ? undefined : src}\n openInNewTab={!onPreview}\n onClick={onPreview}\n leftIcon={<Eye className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Preview\n </Button>\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onDownload ? undefined : src}\n openInNewTab={!onDownload}\n onClick={onDownload}\n leftIcon={<Download className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Download\n </Button>\n </div>\n </div>\n <EmbedIframe src={src} title={displayName} height={height} />\n </div>\n )\n}\n","\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { ExternalLink } from 'lucide-react'\nimport { GoogleSheetsIcon } from '../icons-v2-generated'\nimport { EmbedIframe } from './embed-iframe'\nimport { toGoogleSheetsEmbedUrl, toGoogleSheetsOriginalUrl } from '../../utils/embed-url-converters'\n\nexport interface GoogleSheetsViewerProps {\n externalUrl: string\n fileName?: string\n height?: string\n}\n\nexport function GoogleSheetsViewer({ externalUrl, fileName, height }: GoogleSheetsViewerProps) {\n const displayName = fileName || 'Google Sheet'\n\n if (!externalUrl) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <GoogleSheetsIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">Google Sheet URL not configured</p>\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <GoogleSheetsIcon className=\"w-5 h-5 shrink-0\" />\n <h2 className=\"text-h3 text-ods-text-primary truncate\">{displayName}</h2>\n </div>\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={toGoogleSheetsOriginalUrl(externalUrl)}\n openInNewTab\n leftIcon={<GoogleSheetsIcon className=\"w-4 h-4\" />}\n rightIcon={<ExternalLink className=\"w-4 h-4\" />}\n className=\"w-full sm:w-auto\"\n >\n Open in Google Sheets\n </Button>\n </div>\n <EmbedIframe\n src={toGoogleSheetsEmbedUrl(externalUrl)}\n title={displayName}\n height={height}\n />\n </div>\n )\n}\n","import React from 'react'\nimport { Button } from '../ui'\nimport { FileText, Download } from 'lucide-react'\nimport { formatFileSize } from '../../utils'\n\nexport interface FileDownloadCardProps {\n fileName?: string\n mimeType?: string\n fileSize?: number\n fileUrl?: string\n}\n\n/**\n * Generic downloadable-file card for the `file` document type. Used by\n * `<DocsHubPage>`'s default `documentTypeRenderers.file`. Embedders can\n * override the default by passing their own `file` renderer.\n *\n * When `fileUrl` is missing, the Download button is omitted (the card still\n * renders the filename + type + size so the user knows what they were\n * about to download).\n */\nexport function FileDownloadCard({\n fileName,\n mimeType,\n fileSize,\n fileUrl,\n}: FileDownloadCardProps) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16\">\n <div className=\"bg-ods-card border border-ods-border rounded-xl p-8 max-w-md w-full text-center space-y-4\">\n <FileText className=\"w-16 h-16 text-ods-text-secondary mx-auto\" />\n <div>\n <h3 className=\"text-h3 text-ods-text-primary\">\n {fileName || 'File'}\n </h3>\n <div className=\"flex items-center justify-center gap-3 mt-2 text-h6 text-ods-text-secondary\">\n {mimeType && <span>{mimeType}</span>}\n {typeof fileSize === 'number' && <span>{formatFileSize(fileSize)}</span>}\n </div>\n </div>\n {fileUrl && (\n <Button\n variant=\"accent\"\n href={fileUrl}\n openInNewTab\n leftIcon={<Download className=\"w-4 h-4\" />}\n >\n Download File\n </Button>\n )}\n </div>\n </div>\n )\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-73CH4CZL.cjs","../src/components/embeds/pdf-viewer.tsx","../src/components/embeds/google-sheets-viewer.tsx","../src/components/embeds/file-download-card.tsx"],"names":["jsxs","jsx","Download"],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACXA,2CAA8B;AAiBxB,+CAAA;AALC,SAAS,SAAA,CAAU,EAAE,GAAA,EAAK,QAAA,EAAU,SAAA,EAAW,UAAA,EAAY,OAAO,CAAA,EAAmB;AAC1F,EAAA,MAAM,YAAA,EAAc,SAAA,GAAY,cAAA;AAEhC,EAAA,GAAA,CAAI,CAAC,GAAA,EAAK;AACR,IAAA,uBACE,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,6DAAA,EACb,QAAA,EAAA;AAAA,sBAAA,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,yCAAA,CAAyC,CAAA;AAAA,sBACjE,6BAAA,GAAC,EAAA,EAAE,SAAA,EAAU,yBAAA,EAA0B,QAAA,EAAA,yBAAA,CAAsB;AAAA,IAAA,EAAA,CAC/D,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACE,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,WAAA,EACb,QAAA,EAAA;AAAA,oBAAA,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,oEAAA,EACb,QAAA,EAAA;AAAA,sBAAA,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,iCAAA,EACb,QAAA,EAAA;AAAA,wBAAA,6BAAA,8BAAC,EAAA,EAAa,SAAA,EAAU,mBAAA,CAAmB,CAAA;AAAA,wBAC3C,6BAAA,IAAC,EAAA,EAAG,SAAA,EAAU,wCAAA,EAA0C,QAAA,EAAA,YAAA,CAAY;AAAA,MAAA,EAAA,CACtE,CAAA;AAAA,sBACA,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,0CAAA,EACb,QAAA,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,EAAA,CACF,CAAA;AAEJ;AHoFA;AACA;AACE;AACA;AACA;AACF,4HAAC","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-73CH4CZL.cjs","sourcesContent":[null,"\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { Download, Eye } from 'lucide-react'\nimport { AdobePdfIcon } from '../icons-v2-generated'\nimport { EmbedIframe } from './embed-iframe'\n\nexport interface PdfViewerProps {\n src: string\n fileName?: string\n onPreview?: () => void\n onDownload?: () => void\n height?: string\n}\n\nexport function PdfViewer({ src, fileName, onPreview, onDownload, height }: PdfViewerProps) {\n const displayName = fileName || 'PDF Document'\n\n if (!src) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <AdobePdfIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">PDF file not available</p>\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <AdobePdfIcon className=\"w-5 h-5 shrink-0\" />\n <h2 className=\"text-h3 text-ods-text-primary truncate\">{displayName}</h2>\n </div>\n <div className=\"flex items-center gap-2 w-full sm:w-auto\">\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onPreview ? undefined : src}\n openInNewTab={!onPreview}\n onClick={onPreview}\n leftIcon={<Eye className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Preview\n </Button>\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={onDownload ? undefined : src}\n openInNewTab={!onDownload}\n onClick={onDownload}\n leftIcon={<Download className=\"w-4 h-4\" />}\n className=\"flex-1 sm:flex-initial\"\n >\n Download\n </Button>\n </div>\n </div>\n <EmbedIframe src={src} title={displayName} height={height} />\n </div>\n )\n}\n","\"use client\"\n\nimport React from 'react'\nimport { Button } from '../ui'\nimport { ExternalLink } from 'lucide-react'\nimport { GoogleSheetsIcon } from '../icons-v2-generated'\nimport { EmbedIframe } from './embed-iframe'\nimport { toGoogleSheetsEmbedUrl, toGoogleSheetsOriginalUrl } from '../../utils/embed-url-converters'\n\nexport interface GoogleSheetsViewerProps {\n externalUrl: string\n fileName?: string\n height?: string\n}\n\nexport function GoogleSheetsViewer({ externalUrl, fileName, height }: GoogleSheetsViewerProps) {\n const displayName = fileName || 'Google Sheet'\n\n if (!externalUrl) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <GoogleSheetsIcon className=\"w-16 h-16 text-ods-text-secondary mb-4\" />\n <p className=\"text-ods-text-secondary\">Google Sheet URL not configured</p>\n </div>\n )\n }\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-2 min-w-0\">\n <GoogleSheetsIcon className=\"w-5 h-5 shrink-0\" />\n <h2 className=\"text-h3 text-ods-text-primary truncate\">{displayName}</h2>\n </div>\n <Button\n variant=\"outline\"\n size=\"small-legacy\"\n href={toGoogleSheetsOriginalUrl(externalUrl)}\n openInNewTab\n leftIcon={<GoogleSheetsIcon className=\"w-4 h-4\" />}\n rightIcon={<ExternalLink className=\"w-4 h-4\" />}\n className=\"w-full sm:w-auto\"\n >\n Open in Google Sheets\n </Button>\n </div>\n <EmbedIframe\n src={toGoogleSheetsEmbedUrl(externalUrl)}\n title={displayName}\n height={height}\n />\n </div>\n )\n}\n","import React from 'react'\nimport { Button } from '../ui'\nimport { FileText, Download } from 'lucide-react'\nimport { formatFileSize } from '../../utils'\n\nexport interface FileDownloadCardProps {\n fileName?: string\n mimeType?: string\n fileSize?: number\n fileUrl?: string\n}\n\n/**\n * Generic downloadable-file card for the `file` document type. Used by\n * `<DocsHubPage>`'s default `documentTypeRenderers.file`. Embedders can\n * override the default by passing their own `file` renderer.\n *\n * When `fileUrl` is missing, the Download button is omitted (the card still\n * renders the filename + type + size so the user knows what they were\n * about to download).\n */\nexport function FileDownloadCard({\n fileName,\n mimeType,\n fileSize,\n fileUrl,\n}: FileDownloadCardProps) {\n return (\n <div className=\"flex flex-col items-center justify-center py-16\">\n <div className=\"bg-ods-card border border-ods-border rounded-xl p-8 max-w-md w-full text-center space-y-4\">\n <FileText className=\"w-16 h-16 text-ods-text-secondary mx-auto\" />\n <div>\n <h3 className=\"text-h3 text-ods-text-primary\">\n {fileName || 'File'}\n </h3>\n <div className=\"flex items-center justify-center gap-3 mt-2 text-h6 text-ods-text-secondary\">\n {mimeType && <span>{mimeType}</span>}\n {typeof fileSize === 'number' && <span>{formatFileSize(fileSize)}</span>}\n </div>\n </div>\n {fileUrl && (\n <Button\n variant=\"accent\"\n href={fileUrl}\n openInNewTab\n leftIcon={<Download className=\"w-4 h-4\" />}\n >\n Download File\n </Button>\n )}\n </div>\n </div>\n )\n}\n"]}
@@ -12,15 +12,15 @@ import {
12
12
  SelectValue,
13
13
  Textarea,
14
14
  useChatAttachments
15
- } from "./chunk-NPN4WYOI.js";
15
+ } from "./chunk-TVMARS74.js";
16
16
  import {
17
17
  useContactSubmission,
18
18
  useHumanitySignals
19
- } from "./chunk-MK2YWJAA.js";
19
+ } from "./chunk-OTV4A6NA.js";
20
20
  import {
21
21
  Button,
22
22
  Input
23
- } from "./chunk-6CITW5BD.js";
23
+ } from "./chunk-SASR7SK5.js";
24
24
 
25
25
  // src/components/contact/contact-form.tsx
26
26
  import { useState } from "react";
@@ -372,4 +372,4 @@ function ContactForm({
372
372
  export {
373
373
  ContactForm
374
374
  };
375
- //# sourceMappingURL=chunk-VWNYNJWU.js.map
375
+ //# sourceMappingURL=chunk-74ZFCTRZ.js.map
@@ -3,11 +3,11 @@ import {
3
3
  FileDownloadCard,
4
4
  GoogleSheetsViewer,
5
5
  PdfViewer
6
- } from "./chunk-ZWVQULAJ.js";
6
+ } from "./chunk-XDBNMB5K.js";
7
7
  import {
8
8
  DocSearchBar,
9
9
  useDocSearch
10
- } from "./chunk-6O47KXGR.js";
10
+ } from "./chunk-NY4WLKNU.js";
11
11
  import {
12
12
  DEFAULT_FOLDER_INDEX_FILE,
13
13
  FigmaEmbed,
@@ -19,13 +19,13 @@ import {
19
19
  findDocNodeByPath,
20
20
  getDocAncestorNodeIds,
21
21
  stripFolderIndexFromPath
22
- } from "./chunk-NPN4WYOI.js";
22
+ } from "./chunk-TVMARS74.js";
23
23
  import {
24
24
  HUB_HEADER_OFFSET_PX,
25
25
  contentFetch,
26
26
  navigateSamePageHash,
27
27
  scrollElementIntoView
28
- } from "./chunk-MK2YWJAA.js";
28
+ } from "./chunk-OTV4A6NA.js";
29
29
  import {
30
30
  useChatRuntime
31
31
  } from "./chunk-KFQXO7QB.js";
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  cn,
38
38
  init_cn
39
- } from "./chunk-XTCBRQN2.js";
39
+ } from "./chunk-4GPWLGKT.js";
40
40
 
41
41
  // src/components/docs/doc-viewer.tsx
42
42
  import { useMemo as useMemo2 } from "react";
@@ -1845,4 +1845,4 @@ export {
1845
1845
  EmbedSkeleton,
1846
1846
  DocsHubPage
1847
1847
  };
1848
- //# sourceMappingURL=chunk-7HNLEZ6N.js.map
1848
+ //# sourceMappingURL=chunk-7D5KOJMF.js.map
@@ -151,7 +151,16 @@ var init_cn = _chunkVRHGVLSLcjs.__esm.call(void 0, {
151
151
  twMerge = _tailwindmerge.extendTailwindMerge.call(void 0, {
152
152
  extend: {
153
153
  classGroups: {
154
- "ods-typography": ["text-h1", "text-h2", "text-h3", "text-h4", "text-h5", "text-h6"]
154
+ "ods-typography": [
155
+ "text-h1",
156
+ "text-h2",
157
+ "text-h3",
158
+ "text-h4",
159
+ "text-h5",
160
+ "text-h6",
161
+ "text-code",
162
+ "text-badge"
163
+ ]
155
164
  }
156
165
  }
157
166
  });
@@ -166,4 +175,4 @@ var init_cn = _chunkVRHGVLSLcjs.__esm.call(void 0, {
166
175
 
167
176
 
168
177
  exports.getPlatformProductionUrl = getPlatformProductionUrl; exports.getAllPlatformBaseDomains = getAllPlatformBaseDomains; exports.init_platform_domains = init_platform_domains; exports.cn = cn; exports.getBaseUrl = getBaseUrl; exports.init_cn = init_cn;
169
- //# sourceMappingURL=chunk-FIG2RKZF.cjs.map
178
+ //# sourceMappingURL=chunk-A62C4C4V.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-A62C4C4V.cjs","../src/platform-domains.ts","../src/utils/cn.ts"],"names":[],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACA;AC4EO,SAAS,KAAA,CAAM,GAAA,EAA8C;AAClE,EAAA,OAAO,gBAAA,CAAiB,IAAA,CAAK,CAAC,CAAA,EAAA,GAAM,CAAA,CAAE,IAAA,IAAQ,GAAG,CAAA;AACnD;AAGA,SAAS,cAAA,CAAe,GAAA,EAA4B;AAClD,EAAA,MAAM,OAAA,kBAAS,KAAA,iBAAM,GAAG,CAAA,6BAAG,QAAA;AAC3B,EAAA,GAAA,CAAI,CAAC,MAAA,EAAQ,OAAO,IAAA;AACpB,EAAA,OAAQ,aAAA,CAAqD,MAAM,EAAA,GAAK,IAAA;AAC1E;AAiBO,SAAS,YAAA,CAAa,GAAA,EAAqB;AAChD,EAAA,MAAM,QAAA,EAAU,GAAA,CAAI,IAAA,CAAK,CAAA;AACzB,EAAA,GAAA,CAAI,0BAAA,CAA2B,IAAA,CAAK,OAAO,CAAA,EAAG,OAAO,OAAA;AACrD,EAAA,OAAO,CAAA,QAAA,EAAW,OAAA,CAAQ,OAAA,CAAQ,MAAA,EAAQ,EAAE,CAAC,CAAA,CAAA;AAC/C;AASmE;AAG/D,EAAA;AAG0B,EAAA;AAC9B;AAKwE;AACnD,EAAA;AACf,EAAA;AACyC,IAAA;AACrC,EAAA;AACC,IAAA;AACT,EAAA;AACF;AAGsD;AACT,EAAA;AACD,EAAA;AAC9B,EAAA;AACd;AAG0E;AA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;AACO,UAAA;AAChB,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACF,UAAA;AACF,QAAA;AACF,MAAA;AACD,IAAA;AAAA,EAAA;AAAA;AFgI+C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-A62C4C4V.cjs","sourcesContent":[null,"/**\n * Platform-Domain SSOT (single source of truth) + derivations.\n *\n * ONE registry maps each platform → its canonical production URL (`defaultUrl`,\n * the load-bearing source) with an optional per-deploy `NEXT_PUBLIC_*_URL`\n * OVERRIDE. Everything else — the reverse host→platform resolver, the cookie\n * base-domain set (the cross-subdomain SSO mechanism), www/apex expansion, the\n * URL→host parse, preview detection — derives from this one table.\n *\n * EDGE-SAFE + PURE: no React/clsx/tailwind, no `server-only`, no `node:`\n * builtins, no `'use client'`. So it is legal in the Edge middleware\n * (`proxy.ts`), in `'use client'` providers, AND in `server-only` modules\n * (e.g. cookie-domain-server.ts) simultaneously. The ONLY non-pure export is\n * `getAllPlatformBaseDomains`, which reads `typeof window`/`process.env` to\n * preserve byte-identical cookie behavior.\n */\n\nimport type { PlatformName } from './types/platform'\n\nexport type PlatformDomainKey = PlatformName | 'openframe-dashboard'\n\nexport interface PlatformDomainEntry {\n /** Platform key (matches `PlatformName`, plus the forward-only `openframe-dashboard`). */\n key: PlatformDomainKey\n /** Canonical production URL — the LOAD-BEARING source of truth (today's hardcoded fallbacks). */\n defaultUrl: string\n /** `NEXT_PUBLIC_*_URL` per-deploy OVERRIDE. The `defaultUrl` covers it when unset. */\n envVar: string\n /** Legacy/secondary hosts that REVERSE-map to this key (no env var exists — NOT canonical). */\n aliasHostnames?: string[]\n /** Forward-only: no DB row, excluded from the reverse index + cookie set (e.g. the product-CTA dashboard). */\n pseudo?: boolean\n}\n\nexport const PLATFORM_DOMAINS: readonly PlatformDomainEntry[] = [\n { key: 'marketing-hub', defaultUrl: 'https://marketing-hub.flamingo.so', envVar: 'NEXT_PUBLIC_MARKETING_HUB_URL' },\n { key: 'company-hub', defaultUrl: 'https://company-hub.flamingo.so', envVar: 'NEXT_PUBLIC_COMPANY_HUB_URL' },\n { key: 'product-hub', defaultUrl: 'https://product-hub.flamingo.so', envVar: 'NEXT_PUBLIC_PRODUCT_HUB_URL' },\n { key: 'revenue-hub', defaultUrl: 'https://revenue-hub.flamingo.so', envVar: 'NEXT_PUBLIC_REVENUE_HUB_URL' },\n { key: 'people-hub', defaultUrl: 'https://people-hub.flamingo.so', envVar: 'NEXT_PUBLIC_PEOPLE_HUB_URL' },\n { key: 'openmsp', defaultUrl: 'https://www.openmsp.ai', envVar: 'NEXT_PUBLIC_OPENMSP_URL' },\n // ORDERING INVARIANT (first-wins, load-bearing): `flamingo` MUST precede `flamingo-teaser` + `universal`.\n // All three resolve to www.flamingo.run; the reverse index is first-wins → flamingo claims the shared host,\n // teaser keeps only its unique flamingo.cx aliases, universal contributes no unique host.\n // ⚠️ DO NOT REORDER — enforced by the module-load self-check at the bottom of this file.\n { key: 'flamingo', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL' },\n { key: 'tmcg', defaultUrl: 'https://www.tmcg.miami', envVar: 'NEXT_PUBLIC_TMCG_URL' },\n { key: 'flamingo-teaser', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL', aliasHostnames: ['flamingo.cx', 'www.flamingo.cx'] },\n { key: 'openframe', defaultUrl: 'https://openframe.ai', envVar: 'NEXT_PUBLIC_OPENFRAME_URL', aliasHostnames: ['openframe.ai', 'www.openframe.ai', 'hub.openframe.ai'] },\n { key: 'openframe-dashboard', defaultUrl: 'https://openframe.ai', envVar: 'NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL', pseudo: true },\n { key: 'universal', defaultUrl: 'https://www.flamingo.run', envVar: 'NEXT_PUBLIC_FLAMINGO_URL' },\n]\n\n// ── Compile-time key guards (anchor the table on PlatformName, both directions) ──\n// (1) Removal/typo guard: every table key must be a valid PlatformDomainKey.\nconst _tableSatisfies = PLATFORM_DOMAINS satisfies readonly PlatformDomainEntry[]\nvoid _tableSatisfies\n// (2) Addition guard: a NEW PlatformName member that lacks a table row fails the build.\ntype _MissingKey = Exclude<PlatformName, (typeof PLATFORM_DOMAINS)[number]['key']>\nconst _exhaustive: [_MissingKey] extends [never] ? true : false = true\nvoid _exhaustive\n\n// ── Env overrides (the ONLY place env URLs enter — literal-key inlined + compile-time-guarded) ──\n// `process.env.NEXT_PUBLIC_X` is build-inlined ONLY with a LITERAL key, so the env-var name is the\n// irreducible two-copy (the registry `envVar` column + the literal access below). The `satisfies` makes\n// `tsc`/`next build` FAIL if this map is missing a registry env var OR carries a stale one (bidirectional).\ntype EnvVarKey = (typeof PLATFORM_DOMAINS)[number]['envVar']\nconst ENV_OVERRIDES = {\n NEXT_PUBLIC_MARKETING_HUB_URL: process.env.NEXT_PUBLIC_MARKETING_HUB_URL,\n NEXT_PUBLIC_COMPANY_HUB_URL: process.env.NEXT_PUBLIC_COMPANY_HUB_URL,\n NEXT_PUBLIC_PRODUCT_HUB_URL: process.env.NEXT_PUBLIC_PRODUCT_HUB_URL,\n NEXT_PUBLIC_REVENUE_HUB_URL: process.env.NEXT_PUBLIC_REVENUE_HUB_URL,\n NEXT_PUBLIC_PEOPLE_HUB_URL: process.env.NEXT_PUBLIC_PEOPLE_HUB_URL,\n NEXT_PUBLIC_OPENMSP_URL: process.env.NEXT_PUBLIC_OPENMSP_URL,\n NEXT_PUBLIC_FLAMINGO_URL: process.env.NEXT_PUBLIC_FLAMINGO_URL,\n NEXT_PUBLIC_TMCG_URL: process.env.NEXT_PUBLIC_TMCG_URL,\n NEXT_PUBLIC_OPENFRAME_URL: process.env.NEXT_PUBLIC_OPENFRAME_URL,\n NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL: process.env.NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL,\n} satisfies Record<EnvVarKey, string | undefined>\n\n/** The registry entry for a key (undefined for an unknown key). */\nexport function byKey(key: string): PlatformDomainEntry | undefined {\n return PLATFORM_DOMAINS.find((e) => e.key === key)\n}\n\n/** Read a platform's `NEXT_PUBLIC_*_URL` override (or null). */\nfunction envOverrideFor(key: string): string | null {\n const envVar = byKey(key)?.envVar\n if (!envVar) return null\n return (ENV_OVERRIDES as Record<string, string | undefined>)[envVar] || null\n}\n\n/**\n * Ensure a URL string carries a scheme. Per-deploy `NEXT_PUBLIC_*_URL` overrides are\n * stored SCHEME-LESS (bare host, e.g. `www.openmsp.ai` / `hub.openframe.ai`) — the\n * canonical convention in the Vercel shared-env store. This normalizes them to a full\n * `https://` URL so every downstream consumer (`hostOf`/`new URL`, hrefs, the cookie\n * base-domain derivation, CSP) receives a parseable URL. Full-URL inputs (the registry\n * `defaultUrl`s, any scheme'd override) pass through unchanged.\n *\n * EXPORTED as the single owner of the scheme-normalization rule (next.config.mjs keeps a\n * byte-identical local copy ONLY because Next evaluates its config outside the TS module\n * graph and cannot import this — see the comment there).\n *\n * Handles a (theoretical) protocol-relative `//host` too: strips the leading slashes so it\n * doesn't become `https:////host` (empty-host → hostOf null → silent platform drop).\n */\nexport function ensureScheme(url: string): string {\n const trimmed = url.trim()\n if (/^[a-z][a-z0-9+.-]*:\\/\\//i.test(trimmed)) return trimmed // already has a scheme\n return `https://${trimmed.replace(/^\\/+/, '')}` // bare host or protocol-relative `//host`\n}\n\n/**\n * Canonical production URL for a platform: env override wins, else the `defaultUrl`.\n * NEVER throws / undefined — the default guarantees a host (this is what keeps the\n * cookie base-domains, the reverse map, and CSP intact even with every override unset).\n * The result ALWAYS carries a scheme (`ensureScheme`), so the scheme-less env overrides\n * resolve to valid URLs. Unknown-key fallback preserves cn.ts's flamingo.run default.\n */\nexport function getPlatformProductionUrl(platform: string): string {\n const resolved =\n envOverrideFor(platform) ??\n byKey(platform)?.defaultUrl ??\n envOverrideFor('flamingo') ??\n 'https://www.flamingo.run'\n return ensureScheme(resolved)\n}\n\n// ── Single-owner host primitives ──\n\n/** Canonical URL→host parser: `.hostname` (PORT-STRIPPED, lowercased), null on parse failure. */\nexport function hostOf(value: string | null | undefined): string | null {\n if (!value) return null\n try {\n return new URL(value).hostname.toLowerCase()\n } catch {\n return null\n }\n}\n\n/** Expand a host into its `www.`/apex pair. 3+-label and single-label hosts return `[host]`. */\nexport function expandWwwApex(host: string): string[] {\n if (host.startsWith('www.')) return [host, host.slice(4)]\n if (host.split('.').length === 2) return [host, `www.${host}`]\n return [host]\n}\n\n/** Registrable base domain (`parts.slice(-2).join('.')`), dotless; undefined for <2-label. */\nexport function toRegistrableBaseDomain(host: string): string | undefined {\n const parts = host.split('.')\n if (parts.length >= 2) return parts.slice(-2).join('.')\n return undefined\n}\n\n/** An entry's alias hosts (single-owner reader). */\nexport function aliasHostsOf(key: string): string[] {\n return byKey(key)?.aliasHostnames ?? []\n}\n\n/** All hosts an entry contributes to the reverse index (resolved host + optional aliases). */\nfunction hostsForEntry(entry: PlatformDomainEntry, opts: { includeAliases: boolean }): string[] {\n const resolved = hostOf(getPlatformProductionUrl(entry.key))\n const hosts = resolved ? expandWwwApex(resolved) : []\n if (opts.includeAliases) hosts.push(...aliasHostsOf(entry.key))\n return hosts\n}\n\n/**\n * Reverse resolver: hostname → platform key (first-wins over registry order, non-pseudo only).\n * Guarantees openframe.ai / www.openframe.ai / hub.openframe.ai → openframe in every env.\n * Replaces the hub `PLATFORM_DOMAIN_MAP`.\n */\nexport function getPlatformByHostname(hostname: string): PlatformDomainKey | null {\n const host = hostname.toLowerCase()\n for (const entry of PLATFORM_DOMAINS) {\n if (entry.pseudo) continue\n if (hostsForEntry(entry, { includeAliases: true }).includes(host)) return entry.key\n }\n return null\n}\n\n// ── Preview detection (two distinct predicates — env-form vs host-form) ──\n\n/** Env-form preview predicate (Vercel `VERCEL_ENV`). */\nexport function isPreviewEnv(): boolean {\n return process.env.VERCEL_ENV === 'preview'\n}\n\n/** Host-form preview predicate (a `*.vercel.app` host). Dot-bounded suffix so a\n * malicious `foo.vercel.app.evil.com` is NOT treated as preview. */\nexport function isPreviewHost(hostname: string): boolean {\n return hostname.endsWith('.vercel.app')\n}\n\n/**\n * ALL unique cookie base domains (the cross-subdomain SSO mechanism).\n *\n * NON-PURE (the sole such export): reads `typeof window` + `process.env` to\n * preserve byte-identical cookie behavior. Keeps the original three branches:\n * 1. localhost / private IP → [] (host-only cookies)\n * 2. Vercel preview (env OR host) → ['.vercel.app','vercel.app']\n * 3. production → for each non-pseudo platform, registrable base of its resolved\n * host, emitted as both `.base` and bare `base`.\n *\n * Because `getPlatformProductionUrl` always yields a host (override OR default),\n * `.flamingo.so` / `.flamingo.run` / `.openmsp.ai` / `.tmcg.miami` / `.openframe.ai`\n * are ALWAYS present → cross-hub SSO is byte-identical to today.\n */\nexport function getAllPlatformBaseDomains(): string[] {\n if (typeof window === 'undefined') return []\n\n const hostname = window.location.hostname\n\n // Case 1: localhost / private IP — no domains\n if (hostname === 'localhost' || hostname === '127.0.0.1' || hostname.startsWith('127.')) {\n return []\n }\n\n // Case 2: Vercel preview — vercel.app domain\n const previewEnv =\n process.env.VERCEL_ENV === 'preview' ||\n process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview' ||\n isPreviewHost(hostname)\n if (previewEnv) {\n return ['.vercel.app', 'vercel.app']\n }\n\n // Case 3: production — registrable base of every non-pseudo platform's resolved host\n const baseDomains = new Set<string>()\n for (const entry of PLATFORM_DOMAINS) {\n if (entry.pseudo) continue\n const host = hostOf(getPlatformProductionUrl(entry.key))\n if (!host) continue\n const base = toRegistrableBaseDomain(host)\n if (base) {\n baseDomains.add(`.${base}`)\n baseDomains.add(base)\n }\n }\n return Array.from(baseDomains)\n}\n\n// ── Cookie-domain guard + match (single owner; shared by the client cookie-domain.ts +\n// server-only cookie-domain-server.ts resolvers, which previously hand-rolled both 3×) ──\n\n/**\n * Hosts that must NOT receive a `Domain=` cookie → the caller returns undefined (host-only):\n * localhost, loopback/private IPs, and any `*.vercel.app`. `vercel.app` is on the Public Suffix\n * List, so browsers SILENTLY drop `Set-Cookie: Domain=.vercel.app` — which broke the PKCE verifier\n * + session cookies on preview deploys. Host-only is sufficient there (the same preview host\n * round-trips the OAuth chain); production hosts (`.flamingo.so`/`.openmsp.ai`/…) fall through.\n */\nexport function isNonCookieableHost(hostname: string): boolean {\n return (\n hostname === 'localhost' ||\n hostname === '127.0.0.1' ||\n hostname.startsWith('127.') ||\n hostname.startsWith('192.168.') ||\n hostname.startsWith('10.') ||\n hostname.includes('.vercel.app')\n )\n}\n\n/**\n * Match a hostname against a set of registrable base domains → the dotted cookie `Domain`\n * (`.flamingo.so`), or undefined when none contains the host. Accepts bases with or without a\n * leading dot and always returns the dotted form. Single owner for the match loop both resolvers ran.\n */\nexport function matchCookieDomain(hostname: string, baseDomains: string[]): string | undefined {\n for (const domain of baseDomains) {\n const bare = domain.startsWith('.') ? domain.slice(1) : domain\n if (hostname === bare || hostname.endsWith(`.${bare}`)) {\n return domain.startsWith('.') ? domain : `.${domain}`\n }\n }\n return undefined\n}\n\n// ── Module-load ordering self-check (NON-fatal — this module is imported by cn.ts → ~everything,\n// so a hard throw would be a total outage if the assertion were ever over-strict). Checks the REAL\n// invariant — table order — STRUCTURALLY (findIndex), NOT via getPlatformByHostname on a hardcoded\n// host: the latter false-positives when NEXT_PUBLIC_FLAMINGO_URL is overridden to a non-default host\n// (flamingo's resolved host changes, so `www.flamingo.run` no longer reverse-maps to it though the\n// ordering is fine). The alias checks below ARE env-immune (aliasHostnames are unique per key). The\n// authoritative guard is the reverse-map vitest. ⚠️ keep `flamingo` before `flamingo-teaser`/`universal`.\nconst _orderIdx = (k: PlatformDomainKey) => PLATFORM_DOMAINS.findIndex((e) => e.key === k)\nif (\n _orderIdx('flamingo') > _orderIdx('flamingo-teaser') ||\n _orderIdx('flamingo') > _orderIdx('universal') ||\n getPlatformByHostname('flamingo.cx') !== 'flamingo-teaser' ||\n getPlatformByHostname('hub.openframe.ai') !== 'openframe'\n) {\n // eslint-disable-next-line no-console\n console.error(\n '[platform-domains] ⚠️ PLATFORM_DOMAINS ordering invariant violated — `flamingo` must precede ' +\n '`flamingo-teaser`/`universal`, and the openframe/teaser aliases must be intact. Do not reorder the table.',\n )\n}\n","import { clsx, type ClassValue } from \"clsx\"\nimport { extendTailwindMerge } from \"tailwind-merge\"\n// Platform→domain resolution moved to the SSOT module `src/platform-domains.ts`.\n// `getPlatformProductionUrl` / `getAllPlatformBaseDomains` now live there (re-exported\n// via the utils barrel for existing callers); `getBaseUrl` stays here because it owns the\n// dev-localhost + Vercel-self-origin branches, and delegates its platform branch.\nimport { getPlatformProductionUrl } from \"../platform-domains\"\n\n/**\n * EVERY custom `text-*` utility we add in `tailwind.config.ts` MUST be listed here.\n *\n * tailwind-merge has no knowledge of our utilities, and `text-<word>` is\n * indistinguishable from a text COLOUR to it. So an unlisted `text-badge` gets\n * filed in tailwind-merge's `text-color` group, where it and any real colour\n * class silently annihilate each other — last one wins, the other is dropped\n * from the output entirely:\n *\n * cn('text-badge', 'text-ods-text-on-accent') -> 'text-ods-text-on-accent' (size lost)\n * cn('text-[--some-colour]', 'text-badge') -> 'text-badge' (colour lost)\n *\n * Listing them in their own group makes them non-conflicting with colours, so\n * both survive. This is why `text-h1`…`text-h6` are here; `text-code` and\n * `text-badge` were added to the config later and missing them shipped exactly\n * the two failures above (huge badges, and badge text losing its colour).\n */\nconst twMerge = extendTailwindMerge<'ods-typography'>({\n extend: {\n classGroups: {\n 'ods-typography': [\n 'text-h1',\n 'text-h2',\n 'text-h3',\n 'text-h4',\n 'text-h5',\n 'text-h6',\n 'text-code',\n 'text-badge',\n ],\n },\n },\n})\n\n/**\n * Combine class names with Tailwind's merge utility\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n/**\n * Get the application base URL for the current environment\n *\n * @param platform - Optional platform name (openmsp, flamingo, tmcg, openframe, etc.)\n * @returns The base URL with protocol (https:// or http://)\n *\n * Priority order:\n * 1. Development (http://localhost:3000)\n * 2. Platform-specific URL via the SSOT (if `platform` provided) — env override ?? default\n * 3. VERCEL_PROJECT_PRODUCTION_URL (Vercel production domain)\n * 4. Production fallback: the DEPLOYING platform's canonical URL (NEXT_PUBLIC_APP_TYPE),\n * openmsp if unset — sourced from the SSOT, no hardcoded literal.\n *\n * The per-platform canonical URLs + their `NEXT_PUBLIC_*_URL` overrides are the single\n * source of truth in `src/platform-domains.ts` (`PLATFORM_DOMAINS`).\n *\n * @example\n * getBaseUrl() // Current deployment's URL\n * getBaseUrl('flamingo') // https://www.flamingo.run (prod) or http://localhost:3000 (dev)\n */\nexport function getBaseUrl(platform?: string): string {\n // In development, always use localhost (regardless of platform)\n if (process.env.NODE_ENV !== 'production') {\n return process.env.NEXT_PUBLIC_DEV_URL || 'http://localhost:3000'\n }\n\n // If platform is specified, return its production URL (env override ?? default)\n if (platform) {\n return getPlatformProductionUrl(platform)\n }\n\n // Production: Use Vercel domain if available\n if (process.env.VERCEL_PROJECT_PRODUCTION_URL) {\n return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`\n }\n\n // Production fallback: the deploying platform's canonical www domain (avoids Google\n // \"Page with redirect\"). Derived from the SSOT for the current app type (openmsp when\n // unset → 'https://www.openmsp.ai', byte-identical to the old hardcoded fallback).\n return getPlatformProductionUrl(process.env.NEXT_PUBLIC_APP_TYPE || 'openmsp')\n}\n"]}
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  ArticleAuthorByline,
4
4
  DetailPageSkeleton
5
- } from "./chunk-QA5LN5NS.js";
5
+ } from "./chunk-EK2VQXUN.js";
6
6
  import {
7
7
  DocSearchBar,
8
8
  useDocSearch
9
- } from "./chunk-6O47KXGR.js";
9
+ } from "./chunk-NY4WLKNU.js";
10
10
  import {
11
11
  useSelfFetch
12
- } from "./chunk-ILUX3DXS.js";
12
+ } from "./chunk-FPOHUGEK.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-NPN4WYOI.js";
29
+ } from "./chunk-TVMARS74.js";
30
30
  import {
31
31
  buildOgPlaceholderUrl
32
- } from "./chunk-MK2YWJAA.js";
32
+ } from "./chunk-OTV4A6NA.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-7WT3K34L.js.map
398
+ //# sourceMappingURL=chunk-BY6TZ6KA.js.map
@@ -6,11 +6,11 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkCGUYR6DRcjs = require('./chunk-CGUYR6DR.cjs');
9
+ var _chunkRIEAXUJXcjs = require('./chunk-RIEAXUJX.cjs');
10
10
 
11
11
 
12
12
 
13
- var _chunkIOHQJOLRcjs = require('./chunk-IOHQJOLR.cjs');
13
+ var _chunkTONMD7QXcjs = require('./chunk-TONMD7QX.cjs');
14
14
 
15
15
 
16
16
  var _chunk2B6773QMcjs = require('./chunk-2B6773QM.cjs');
@@ -34,7 +34,7 @@ function DocSearchResultRow({
34
34
  }) {
35
35
  const docType = _optionalChain([result, 'access', _ => _.metadata, 'optionalAccess', _2 => _2.documentType]) || void 0;
36
36
  const sourceRepo = _optionalChain([result, 'access', _3 => _3.metadata, 'optionalAccess', _4 => _4.sourceRepo]) || void 0;
37
- const { Icon: SourceIcon, label: iconLabel } = _chunkCGUYR6DRcjs.resolveSourceIcon.call(void 0, {
37
+ const { Icon: SourceIcon, label: iconLabel } = _chunkRIEAXUJXcjs.resolveSourceIcon.call(void 0, {
38
38
  sourceRepo,
39
39
  documentType: docType
40
40
  });
@@ -77,7 +77,7 @@ function DocSearchBar({
77
77
  renderResult
78
78
  }) {
79
79
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
80
- _chunkCGUYR6DRcjs.SearchInput,
80
+ _chunkRIEAXUJXcjs.SearchInput,
81
81
  {
82
82
  placeholder,
83
83
  value: query,
@@ -186,7 +186,7 @@ function resolveSearchResultAction(result, source, runtimeMode) {
186
186
  const externalUrl = meta.externalUrl;
187
187
  if (externalUrl) {
188
188
  const targetPlatform = meta.targetPlatform;
189
- const isNewTab = _chunkCGUYR6DRcjs.decideNewTab.call(void 0, {
189
+ const isNewTab = _chunkRIEAXUJXcjs.decideNewTab.call(void 0, {
190
190
  href: externalUrl,
191
191
  targetPlatform,
192
192
  surface: "useUnifiedNav",
@@ -231,7 +231,7 @@ function useDocSearch(config) {
231
231
  const [query, setQuery] = _react.useState.call(void 0, "");
232
232
  const [results, setResults] = _react.useState.call(void 0, []);
233
233
  const [isFetching, setIsFetching] = _react.useState.call(void 0, false);
234
- const debouncedQuery = _chunkIOHQJOLRcjs.useDebounce.call(void 0, query, 300);
234
+ const debouncedQuery = _chunkTONMD7QXcjs.useDebounce.call(void 0, query, 300);
235
235
  _react.useEffect.call(void 0, () => {
236
236
  if (!debouncedQuery || debouncedQuery.trim().length < 2) {
237
237
  setResults([]);
@@ -248,7 +248,7 @@ function useDocSearch(config) {
248
248
  limit: "10"
249
249
  });
250
250
  if (tableIdsKey) params.set("tableIds", tableIdsKey);
251
- const response = await _chunkIOHQJOLRcjs.contentFetch.call(void 0, `${resolvedSearchEndpoint}?${params.toString()}`);
251
+ const response = await _chunkTONMD7QXcjs.contentFetch.call(void 0, `${resolvedSearchEndpoint}?${params.toString()}`);
252
252
  if (!response.ok) {
253
253
  throw new Error(`Search request failed: ${response.status}`);
254
254
  }
@@ -288,7 +288,7 @@ function useDocSearch(config) {
288
288
  if (_optionalChain([runtime, 'optionalAccess', _14 => _14.navigation, 'access', _15 => _15.mode]) === "embed") {
289
289
  setKeepOpen(true);
290
290
  const targetPlatform = _nullishCoalesce(_optionalChain([result, 'access', _16 => _16.metadata, 'optionalAccess', _17 => _17.targetPlatform]), () => ( null));
291
- _chunkCGUYR6DRcjs.resolveExternalNavigation.call(void 0, {
291
+ _chunkRIEAXUJXcjs.resolveExternalNavigation.call(void 0, {
292
292
  href: action.href,
293
293
  targetPlatform,
294
294
  runtime
@@ -297,18 +297,18 @@ function useDocSearch(config) {
297
297
  }
298
298
  if (wantsNewTab) {
299
299
  setKeepOpen(true);
300
- window.open(action.href, "_blank", _chunkCGUYR6DRcjs.NEW_TAB_FEATURES);
300
+ window.open(action.href, "_blank", _chunkRIEAXUJXcjs.NEW_TAB_FEATURES);
301
301
  return;
302
302
  }
303
303
  setKeepOpen(false);
304
304
  const path = baseRoute && action.href.startsWith(`${baseRoute}/`) ? action.href.slice(baseRoute.length + 1) : null;
305
305
  if (path && _optionalChain([onInPageSwap, 'optionalCall', _18 => _18(path)])) return;
306
- router.push(_chunkCGUYR6DRcjs.stripSameOriginToPath.call(void 0, action.href));
306
+ router.push(_chunkRIEAXUJXcjs.stripSameOriginToPath.call(void 0, action.href));
307
307
  return;
308
308
  }
309
309
  case "navigate-new-tab":
310
310
  setKeepOpen(true);
311
- window.open(action.href, "_blank", _chunkCGUYR6DRcjs.NEW_TAB_FEATURES);
311
+ window.open(action.href, "_blank", _chunkRIEAXUJXcjs.NEW_TAB_FEATURES);
312
312
  return;
313
313
  case "ask-ai":
314
314
  setKeepOpen(false);
@@ -347,4 +347,4 @@ function useDocSearch(config) {
347
347
 
348
348
 
349
349
  exports.formatRelativePath = formatRelativePath; exports.DocSearchResultRow = DocSearchResultRow; exports.DocSearchBar = DocSearchBar; exports.mapDocSearchResults = mapDocSearchResults; exports.resolveSearchResultAction = resolveSearchResultAction; exports.useDocSearch = useDocSearch;
350
- //# sourceMappingURL=chunk-WPNVOQ4O.cjs.map
350
+ //# sourceMappingURL=chunk-CUBNUQPZ.cjs.map