ConusAI vendor v0.1.0-beta.114
ci / gate (push) Waiting to run

This commit is contained in:
ConusAI vendor v0.1.0-beta.114
2026-11-14 09:56:45 +00:00
commit 1ce8d23c35
867 changed files with 122104 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
// The client entry: start observability before the app hydrates (what Next's `instrumentation-client.ts`
// did; src/observe/browser.ts holds all of it), then hydrate the document the server rendered.
//
// Install React event replay immediately, and prepare the current view before its first render.
// The server-rendered page remains in place while the router and its matched view load.
import "./zod-browser"
import { instrumentationClient } from "@conusai-sdk/observe-start/client"
import { Await, RouterProvider } from "@tanstack/react-router"
import { hydrateStart } from "@tanstack/react-start/client"
import { StrictMode, startTransition } from "react"
import { hydrateRoot } from "react-dom/client"
import { startBrowserObserve } from "./observe/browser"
import { prepareInitialModuleViews } from "./ui/page-views"
export const observe = startBrowserObserve(document, instrumentationClient)
const hydration = hydrateStart().then(async (router) => {
await prepareInitialModuleViews(router.state.matches)
return router
})
startTransition(() => {
hydrateRoot(
document,
<StrictMode>
<Await promise={hydration}>{(router) => <RouterProvider router={router} />}</Await>
</StrictMode>,
)
})