How the Svelte SDK works
Developer preview
A page request passes through the catch-all route, the project map, the composition renderer, and your component map:
A visitor requests a page. SvelteKit's catch-all route
[...path]/+page.server.tsreceives the request.The composition is fetched server-side.
createUniformLoadfrom@uniformdev/canvas-sveltekitusesRouteClientto resolve the URL against the Project Map and fetch the full composition data.Components render via the composition tree.
UniformCompositionwalks the tree and uses yourcomponentMap(or a customresolveRenderer) to map each Uniform component type to a Svelte component. Parameters are flattened and passed directly as props.Personalization and testing are evaluated. The
UniformContextprovider evaluates personalization rules and A/B tests either client-side (standard) or outputs NESI placeholders for edge evaluation (edge).Visual editing works out of the box. When previewing in the Uniform dashboard, the SDK automatically enables contextual editing, inline text editing, and live preview via the playground route.