/** * Platform identity + brand SSOT (single source of truth). * * ONE module owns every per-platform STRING (display/short/long name, description, * slogan, icon name) and every per-platform COLOUR DECISION (the accent/secondary * "stem", the theme, the surface). Everything downstream DERIVES from here: * `platform-config.tsx`'s icon + colour maps, `PlatformBadge`, `getPlatformConfig`, * the hub's `AppConfig.brandColors`, the hub's manifest generator and `theme-color`. * * JSX-FREE + zero-dependency ON PURPOSE: it carries its own tsup entry and * `exports` subpath (`@flamingo-stack/openframe-frontend-core/utils/platform-identity`) * so hub SCRIPTS and `server-only` modules can import it without dragging React, * the icon components, or the utils barrel into their graph. * * TWO accepted by-construction copies of the colour decision remain, both LOCKED * by `src/__tests__/mlg-platform-leaves.test.ts` in this package: * 1. `platformHexColors` below (hand-typed hex mirror of each accent token). * 2. The `[data-app-type='…']` blocks in `src/styles/ods-colors.css`. */ import type { PlatformName } from '../types/platform'; /** Human-readable platform names. THE naming source for lib-side presentation. */ export declare const platformDisplayNames: { openmsp: string; openframe: string; flamingo: string; 'flamingo-teaser': string; 'marketing-hub': string; 'product-hub': string; 'revenue-hub': string; 'people-hub': string; 'company-hub': string; tmcg: string; mlg: string; universal: string; }; /** * Short-name OVERRIDES only. A platform without a row falls back to its display * name, so this map never lists a name that equals `platformDisplayNames`. */ export declare const platformShortNames: Partial>; export declare const platformDescriptions: { openmsp: string; openframe: string; flamingo: string; 'flamingo-teaser': string; tmcg: string; mlg: string; universal: string; }; export declare const platformSlogans: { openmsp: string; openframe: string; flamingo: string; 'flamingo-teaser': string; tmcg: string; mlg: string; universal: string; }; export declare const platformIconNames: { openmsp: string; openframe: string; flamingo: string; universal: string; 'flamingo-teaser': string; 'marketing-hub': string; 'product-hub': string; 'revenue-hub': string; 'people-hub': string; 'company-hub': string; tmcg: string; mlg: string; }; export declare function getPlatformDisplayName(platformName: string): string; /** Compact label (nav chips, manifest `short_name`, JSON-LD `alternateName`). */ export declare function getPlatformShortName(platformName: string): string; export declare function getPlatformDescription(platformName: string): string; export declare function getPlatformSlogan(platformName: string): string; export declare function getDefaultIconForPlatform(platformName: string): string; /** * The six brand/attention colours (plus the neutral) a platform may adopt, named * by STEM rather than by token so the token spelling has exactly one home below. */ export type OdsColorStem = 'flamingo-pink' | 'flamingo-cyan' | 'open-yellow' | 'success' | 'warning' | 'error' | 'text-secondary'; /** Stem → ODS token name (without the `--ods-` prefix). THE token spelling. */ export declare const ODS_STEM_TOKENS: Record; /** * Stem → Tailwind class strings. STATIC LITERALS on purpose: the Tailwind * scanner reads source text, so a template-built class would be purged. * This is the ONLY place a stem-to-class literal exists. */ export declare const ODS_STEM_CLASSES: Record; /** * Every platform ships the dark theme today (the hub's flamingo config says so * explicitly, and every `[data-app-type]` block inherits the dark `:root`). * ONE constant instead of a per-platform field: reintroduce the field only when * a platform actually differs. */ export declare const PLATFORM_THEME: "dark"; /** The dark surface's tokens, consumed by config `brandColors` and the manifest. */ export declare const PLATFORM_SURFACE: { readonly background: "system-greys-background"; readonly text: "system-greys-white"; }; export declare const getPlatformBackgroundVarName: () => string; export declare const getPlatformTextVarName: () => string; export interface PlatformBrand { /** Primary brand colour (`--color-accent-primary` in the platform's CSS block). */ accentStem: OdsColorStem; /** Link colour (`--color-link`). Equals `accentStem` for most platforms. */ secondaryStem: OdsColorStem; } /** * THE accent/link table. Every row is verified against that platform's * `[data-app-type='…']` block in `ods-colors.css` by the hub's parity test. */ export declare const PLATFORM_BRAND: Record; /** The brand row for a platform, falling back to `universal` for anything unknown. */ export declare function getPlatformBrand(platformName: string): PlatformBrand; export declare function platformAccentToken(platformName: string): string; export declare function platformSecondaryToken(platformName: string): string; /** `--ods-…` CSS variable NAME for a platform's accent (input to `resolveOdsColor`). */ export declare function platformAccentVarName(platformName: string): string; export declare function platformSecondaryVarName(platformName: string): string; /** `var(--ods-…)` VALUE for a platform's accent (config `brandColors` data). */ export declare function getPlatformAccentColor(platformName: string): string; export declare function getPlatformSecondaryColor(platformName: string): string; /** Tailwind classes for a platform, DERIVED from its stems. */ export declare function getPlatformBrandClasses(platformName: string): { accentText: string; accentBg: string; accentBgSoft: string; accentBorderSoft: string; secondaryText: string; }; /** Platform background classes, DERIVED (was a hand-typed hex map). */ export declare const platformColors: Record; export declare function getPlatformColor(platformName: string): string; /** * Hand-typed hex mirror of each platform's accent token (the DB `default_color` * and other JS-value consumers). Accepted copy #1 — locked by * `src/__tests__/mlg-platform-leaves.test.ts` in this package, which asserts * every row against the `[data-app-type]` blocks in `ods-colors.css`. * (The hub has its OWN parity test, but it holds different copies: the asset * generator's map and the generated manifests.) */ export declare const platformHexColors: Record; export declare function getDefaultColorForPlatform(platformName: string): string; //# sourceMappingURL=platform-identity.d.ts.map