Packages narrative
packages / cart / next

cart / next

Functions

NameDescription
createCartEnsurerBuilds an "ensure a cart exists" helper for server actions and RSC entry points that need a non-null cart to operate on. Delegates to the supplied reader for the existing-cart path so cache dedup is preserved, then falls back to
createCartReaderBuilds an RSC-safe reader that resolves the active cart for the current request. The reader is wrapped in
createFormCartActionsWraps a
createTypedCartActionsBuilds the typed, JSON-arg server-action surface for cart-next hosts. Each returned method threads the supplied
httpOnlyCookieStorageBuilds a
nextEventBridgeBuilds a Next.js-aware event bridge that pipes cart kernel events into

Interfaces

NameDescription
AuthBridgePluggable identity bridge for
CartIdStoragePluggable persistence contract for the active cart's identifier. cart-next ships
CreateTypedCartActionsOptsConstruction options for
FormCartActionsSet of
HttpOnlyCookieStorageOptsOptions bag for
NextEventBridgeReturn type of
TypedCartActionsStrongly-typed server-action surface built by

Types

NameDescription
NextEventBridgeHandlersPer-event handler map passed to

On this page