import { ReactNode } from 'react'; export { ComponentType, ReactNode as GogoChildren, ReactNode } from 'react'; /** * @ethisyscore/host-ui-externals * * Type contracts for the Gogo UI components that the host exposes to * Tier T plugin remotes as shared externals. At runtime the host's * `hostModuleRegistry.ts` registers the actual `@coreconnect/gogo-ui` * instances under `"@ethisyscore/host-ui-externals"`; the rewriter maps * the plugin's bare import to that registry entry. * * Plugin builds: * 1. Add this package as a devDependency. * 2. In `vite.config.ts`, add `"@ethisyscore/host-ui-externals"` to the * `external` list (the `ethisysPlatformReactPlugin` handles this * automatically in the next build-plugin update). * 3. Import types from `"@ethisyscore/host-ui-externals"` — these are * erased at compile time and replaced at runtime with the host instance. * * For local standalone development (plugin CI, Storybook), replace the * production import with the mock sub-path: * `import { GogoThemeProvider } from "@ethisyscore/host-ui-externals/mock";` */ /** * Gogo theme colour preset union. * Mirrors `GogoTheme` from `@coreconnect/gogo-ui` — kept in sync manually * until `gogo-ui` is published to npm. */ type GogoTheme = "theme-purple" | "theme-blue" | "theme-green" | "theme-orange"; /** * Gogo light/dark/system mode. */ type GogoMode = "light" | "dark" | "system"; /** * Props accepted by the host's `GogoThemeProvider`. Plugin remotes that need * to wrap their own subtree in the provider use this type. */ interface GogoThemeProviderProps { theme?: GogoTheme; mode?: GogoMode; direction?: "ltr" | "rtl"; children: ReactNode; } /** * The menu item shape from `@coreconnect/gogo-ui`. */ interface GogoMenuItem { id: string; label: string; icon?: string; href?: string; onClick?: () => void; } /** * Maps the npm specifier that plugin code imports from to the registry key * that `hostModuleRegistry.ts` registers the live instance under. * * Both keys are `"@ethisyscore/host-ui-externals"` because the registry key * equals the npm specifier — the rewriter looks up `spec in MODULES` where * `spec` is the bare specifier from the plugin's import statement. * * Plugin Vite configs add the key to `build.rollupOptions.external`. * The `ethisysPlatformReactPlugin` vite plugin will auto-add this in its * config hook (see `page-bundles.ts` follow-up). */ declare const GOGO_EXTERNALS_SPECIFIER_MAP: Readonly>; export { GOGO_EXTERNALS_SPECIFIER_MAP, type GogoMenuItem, type GogoMode, type GogoTheme, type GogoThemeProviderProps };