{"version":3,"file":"index.cjs","sources":["../src/index.tsx"],"sourcesContent":["\"use client\";\nimport type { ComponentProps } from \"react\";\nimport AppChromeInner from \"./components/app-chrome\";\nimport { QueryClientProvider } from \"./internal/common/libraries/tanstack/__internal_query__/provider\";\n// Vendored source uses next/navigation's `useRouter`; when consumed outside a\n// Next.js App Router (e.g., in a Vite host), the hook throws an invariant. We\n// pull the shared-runtime context directly and inject a no-op router so\n// AppChrome renders. Real navigation still needs consumer wiring.\nimport { AppRouterContext } from \"next/dist/shared/lib/app-router-context.shared-runtime\";\n\nconst noopRouter = {\n  push: (_: string) => {},\n  replace: (_: string) => {},\n  refresh: () => {},\n  back: () => {},\n  forward: () => {},\n  prefetch: (_: string) => {},\n} as any;\n\n/**\n * Public entry: wraps the vendored AppChrome with the providers it expects\n * (React Query + a fallback App Router context) so consumer apps get a\n * working chrome without needing Next.js scaffolding.\n */\nexport function AppChrome(props: ComponentProps<typeof AppChromeInner>) {\n  return (\n    <AppRouterContext.Provider value={noopRouter}>\n      <QueryClientProvider>\n        <AppChromeInner {...props} />\n      </QueryClientProvider>\n    </AppRouterContext.Provider>\n  );\n}\n\nexport { useManifest } from \"./components/app-chrome\";\nexport { AuthService } from \"./services\";\nexport { ManifestContext, ManifestDispatchContext } from \"./context/manifest\";\nexport { appendScript } from \"./helpers/appendScript\";\n"],"names":["noopRouter","_","AppChrome","props","jsx","AppRouterContext","QueryClientProvider","AppChromeInner"],"mappings":"gOAUMA,EAAa,CACjB,KAAOC,GAAc,CAAC,EACtB,QAAUA,GAAc,CAAC,EACzB,QAAS,IAAM,CAAC,EAChB,KAAM,IAAM,CAAC,EACb,QAAS,IAAM,CAAC,EAChB,SAAWA,GAAc,CAAC,CAC5B,EAOO,SAASC,EAAUC,EAA8C,CACtE,OACEC,EAAAA,IAACC,EAAAA,iBAAiB,SAAjB,CAA0B,MAAOL,EAChC,SAAAI,EAAAA,IAACE,EAAAA,oBAAA,CACC,SAAAF,EAAAA,IAACG,EAAAA,UAAA,CAAgB,GAAGJ,CAAA,CAAO,EAC7B,EACF,CAEJ"}