{"version":3,"sources":["../src/index.ts","../src/mock.ts"],"names":["createElement"],"mappings":";;;;;;;AAgFO,IAAM,4BAAA,GAAiE,OAAO,MAAA,CAAO;AAAA,EAC1F,gCAAA,EAAkC;AACpC,CAAC;;;AC9DM,IAAM,iBAAA,GAAgD,CAAC,EAAE,QAAA,EAAS,KACvEA,mBAAA,CAAc,KAAA,EAAO,EAAE,aAAA,EAAe,0BAAA,EAA2B,EAAG,QAAqB;AAKpF,SAAS,YAAA,GAAe;AAC7B,EAAA,OAAO;AAAA,IACL,KAAA,EAAO,YAAA;AAAA,IACP,QAAA,EAAU,CAAC,CAAA,KAAc;AAAA,IAAC,CAAA;AAAA,IAC1B,IAAA,EAAM,OAAA;AAAA,IACN,UAAA,EAAY,KAAA;AAAA,IACZ,SAAA,EAAW,KAAA;AAAA,IACX,OAAA,EAAS,CAAC,CAAA,KAAc;AAAA,IAAC;AAAA,GAC3B;AACF","file":"mock.cjs","sourcesContent":["/**\n * @ethisyscore/host-ui-externals\n *\n * Type contracts for the Gogo UI components that the host exposes to\n * Tier T plugin remotes as shared externals. At runtime the host's\n * `hostModuleRegistry.ts` registers the actual `@coreconnect/gogo-ui`\n * instances under `\"@ethisyscore/host-ui-externals\"`; the rewriter maps\n * the plugin's bare import to that registry entry.\n *\n * Plugin builds:\n * 1. Add this package as a devDependency.\n * 2. In `vite.config.ts`, add `\"@ethisyscore/host-ui-externals\"` to the\n *    `external` list (the `ethisysPlatformReactPlugin` handles this\n *    automatically in the next build-plugin update).\n * 3. Import types from `\"@ethisyscore/host-ui-externals\"` — these are\n *    erased at compile time and replaced at runtime with the host instance.\n *\n * For local standalone development (plugin CI, Storybook), replace the\n * production import with the mock sub-path:\n * `import { GogoThemeProvider } from \"@ethisyscore/host-ui-externals/mock\";`\n */\n\n// ── Re-exported type contracts ─────────────────────────────────────\n// These are TYPE-ONLY exports. They carry no runtime bundle weight —\n// the actual implementations live in the host's `@coreconnect/gogo-ui`.\n// Imported (not just re-exported) so `ReactNode` is in local scope for the\n// interface declarations below.\nimport type { ComponentType, ReactNode } from \"react\";\nexport type { ComponentType, ReactNode };\n\n/**\n * Gogo theme colour preset union.\n * Mirrors `GogoTheme` from `@coreconnect/gogo-ui` — kept in sync manually\n * until `gogo-ui` is published to npm.\n */\nexport type GogoTheme = \"theme-purple\" | \"theme-blue\" | \"theme-green\" | \"theme-orange\";\n\n/**\n * Gogo light/dark/system mode.\n */\nexport type GogoMode = \"light\" | \"dark\" | \"system\";\n\n/**\n * Props accepted by the host's `GogoThemeProvider`. Plugin remotes that need\n * to wrap their own subtree in the provider use this type.\n */\nexport interface GogoThemeProviderProps {\n  theme?: GogoTheme;\n  mode?: GogoMode;\n  direction?: \"ltr\" | \"rtl\";\n  children: ReactNode;\n}\n\nexport type { ReactNode as GogoChildren };\n\n/**\n * The menu item shape from `@coreconnect/gogo-ui`.\n */\nexport interface GogoMenuItem {\n  id: string;\n  label: string;\n  icon?: string;\n  href?: string;\n  onClick?: () => void;\n}\n\n// ── Specifier map ──────────────────────────────────────────────────\n\n/**\n * Maps the npm specifier that plugin code imports from to the registry key\n * that `hostModuleRegistry.ts` registers the live instance under.\n *\n * Both keys are `\"@ethisyscore/host-ui-externals\"` because the registry key\n * equals the npm specifier — the rewriter looks up `spec in MODULES` where\n * `spec` is the bare specifier from the plugin's import statement.\n *\n * Plugin Vite configs add the key to `build.rollupOptions.external`.\n * The `ethisysPlatformReactPlugin` vite plugin will auto-add this in its\n * config hook (see `page-bundles.ts` follow-up).\n */\nexport const GOGO_EXTERNALS_SPECIFIER_MAP: Readonly<Record<string, string>> = Object.freeze({\n  \"@ethisyscore/host-ui-externals\": \"@ethisyscore/host-ui-externals\",\n});\n","/**\n * @ethisyscore/host-ui-externals/mock\n *\n * Stub implementations of every host-ui-externals export for use in\n * plugin CI, Storybook, and local development (when no host is running).\n * Renders plain semantic HTML with the correct `data-testid` attributes so\n * plugin tests can assert on structure without a real MUI/Gogo tree.\n *\n * Uses `createElement` (not JSX) so this stays a plain `.ts` module — no\n * `jsx` tsconfig setting required for the package's type-check/build.\n */\nimport { createElement, type FC, type ReactNode } from \"react\";\nimport type { GogoThemeProviderProps } from \"./index\";\nexport type { GogoTheme, GogoMode, GogoThemeProviderProps, GogoMenuItem } from \"./index\";\nexport { GOGO_EXTERNALS_SPECIFIER_MAP } from \"./index\";\n\n/**\n * Mock `GogoThemeProvider` — simply renders `children` inside a `<div>`.\n * Does NOT apply any MUI theme; sufficient for unit/smoke tests.\n */\nexport const GogoThemeProvider: FC<GogoThemeProviderProps> = ({ children }) =>\n  createElement(\"div\", { \"data-testid\": \"mock-gogo-theme-provider\" }, children as ReactNode);\n\n/**\n * Mock `useGogoTheme` — returns stable no-op values.\n */\nexport function useGogoTheme() {\n  return {\n    theme: \"theme-blue\" as const,\n    setTheme: (_: string) => {},\n    mode: \"light\" as const,\n    isDarkMode: false,\n    direction: \"ltr\" as const,\n    setMode: (_: string) => {},\n  };\n}\n"]}