[{"data":1,"prerenderedAt":1968},["ShallowReactive",2],{"navigation_docs":3,"-docs-storefront-sdk-nextjs-hooks":357,"-docs-storefront-sdk-nextjs-hooks-surround":1963,"docs-site-config":1953},[4,74,135,139,161,195,273],{"title":5,"path":6,"stem":7,"children":8},"Assets API","\u002Fdocs\u002Fassets","docs\u002Fassets\u002Findex",[9,10,32,57],{"title":5,"path":6,"stem":7},{"title":11,"path":12,"stem":13,"children":14,"page":31},"Getting Started","\u002Fdocs\u002Fassets\u002Fgetting-started","docs\u002Fassets\u002F1.getting-started",[15,19,23,27],{"title":16,"path":17,"stem":18},"Base URL","\u002Fdocs\u002Fassets\u002Fgetting-started\u002Fbase-url","docs\u002Fassets\u002F1.getting-started\u002F1.base-url",{"title":20,"path":21,"stem":22},"Important Notes","\u002Fdocs\u002Fassets\u002Fgetting-started\u002Fimportant-notes","docs\u002Fassets\u002F1.getting-started\u002F2.important-notes",{"title":24,"path":25,"stem":26},"URL Format","\u002Fdocs\u002Fassets\u002Fgetting-started\u002Furl-format","docs\u002Fassets\u002F1.getting-started\u002F3.url-format",{"title":28,"path":29,"stem":30},"Custom Domains","\u002Fdocs\u002Fassets\u002Fgetting-started\u002Fcustom-domains","docs\u002Fassets\u002F1.getting-started\u002F4.custom-domains",false,{"title":33,"path":34,"stem":35,"children":36,"page":31},"Usage","\u002Fdocs\u002Fassets\u002Fusage","docs\u002Fassets\u002F2.usage",[37,41,45,49,53],{"title":38,"path":39,"stem":40},"Transforms","\u002Fdocs\u002Fassets\u002Fusage\u002Ftransforms","docs\u002Fassets\u002F2.usage\u002F1.transforms",{"title":42,"path":43,"stem":44},"Caching","\u002Fdocs\u002Fassets\u002Fusage\u002Fcaching","docs\u002Fassets\u002F2.usage\u002F2.caching",{"title":46,"path":47,"stem":48},"Recipes","\u002Fdocs\u002Fassets\u002Fusage\u002Frecipes","docs\u002Fassets\u002F2.usage\u002F3.recipes",{"title":50,"path":51,"stem":52},"Best Practices","\u002Fdocs\u002Fassets\u002Fusage\u002Fbest-practices","docs\u002Fassets\u002F2.usage\u002F4.best-practices",{"title":54,"path":55,"stem":56},"Reference","\u002Fdocs\u002Fassets\u002Fusage\u002Freference","docs\u002Fassets\u002F2.usage\u002F5.reference",{"title":58,"path":59,"stem":60,"children":61,"page":31},"Integration","\u002Fdocs\u002Fassets\u002Fintegration","docs\u002Fassets\u002F3.integration",[62,66,70],{"title":63,"path":64,"stem":65},"Nuxt","\u002Fdocs\u002Fassets\u002Fintegration\u002Fnuxt","docs\u002Fassets\u002F3.integration\u002F1.nuxt",{"title":67,"path":68,"stem":69},"Next.js","\u002Fdocs\u002Fassets\u002Fintegration\u002Fnextjs","docs\u002Fassets\u002F3.integration\u002F2.nextjs",{"title":71,"path":72,"stem":73},"Plain HTML","\u002Fdocs\u002Fassets\u002Fintegration\u002Fhtml","docs\u002Fassets\u002F3.integration\u002F3.html",{"title":75,"path":76,"stem":77,"children":78},"Avvyr CMS","\u002Fdocs\u002Fcms","docs\u002Fcms\u002Findex",[79,80,92,105,118,131],{"title":75,"path":76,"stem":77},{"title":11,"path":81,"stem":82,"children":83,"page":31},"\u002Fdocs\u002Fcms\u002Fgetting-started","docs\u002Fcms\u002F1.getting-started",[84,88],{"title":85,"path":86,"stem":87},"Quickstart","\u002Fdocs\u002Fcms\u002Fgetting-started\u002Fquickstart","docs\u002Fcms\u002F1.getting-started\u002F1.quickstart",{"title":89,"path":90,"stem":91},"Keys and access","\u002Fdocs\u002Fcms\u002Fgetting-started\u002Fkeys-and-access","docs\u002Fcms\u002F1.getting-started\u002F2.keys-and-access",{"title":93,"path":94,"stem":95,"children":96,"page":31},"Content Model","\u002Fdocs\u002Fcms\u002Fcontent-model","docs\u002Fcms\u002F2.content-model",[97,101],{"title":98,"path":99,"stem":100},"Types and fields","\u002Fdocs\u002Fcms\u002Fcontent-model\u002Ftypes-and-fields","docs\u002Fcms\u002F2.content-model\u002F1.types-and-fields",{"title":102,"path":103,"stem":104},"Entries and publishing","\u002Fdocs\u002Fcms\u002Fcontent-model\u002Fentries-and-publishing","docs\u002Fcms\u002F2.content-model\u002F2.entries-and-publishing",{"title":106,"path":107,"stem":108,"children":109,"page":31},"Delivery","\u002Fdocs\u002Fcms\u002Fdelivery","docs\u002Fcms\u002F3.delivery",[110,114],{"title":111,"path":112,"stem":113},"Delivery API","\u002Fdocs\u002Fcms\u002Fdelivery\u002Fdelivery-api","docs\u002Fcms\u002F3.delivery\u002F1.delivery-api",{"title":115,"path":116,"stem":117},"Preview and live editing","\u002Fdocs\u002Fcms\u002Fdelivery\u002Fpreview","docs\u002Fcms\u002F3.delivery\u002F2.preview",{"title":119,"path":120,"stem":121,"children":122,"page":31},"Frameworks","\u002Fdocs\u002Fcms\u002Fframeworks","docs\u002Fcms\u002F4.frameworks",[123,127],{"title":124,"path":125,"stem":126},"JavaScript client","\u002Fdocs\u002Fcms\u002Fframeworks\u002Fjavascript-client","docs\u002Fcms\u002F4.frameworks\u002F1.javascript-client",{"title":128,"path":129,"stem":130},"Nuxt layer","\u002Fdocs\u002Fcms\u002Fframeworks\u002Fnuxt","docs\u002Fcms\u002F4.frameworks\u002F2.nuxt",{"title":132,"path":133,"stem":134},"Management API","\u002Fdocs\u002Fcms\u002Fmanagement-api","docs\u002Fcms\u002F5.management-api",{"title":136,"path":137,"stem":138},"Early Access","\u002Fdocs\u002Fearly-access","docs\u002Fearly-access",{"title":140,"path":141,"stem":142,"children":143},"Events API","\u002Fdocs\u002Fevents","docs\u002Fevents\u002Findex",[144,145],{"title":140,"path":141,"stem":142},{"title":11,"path":146,"stem":147,"children":148,"page":31},"\u002Fdocs\u002Fevents\u002Fgetting-started","docs\u002Fevents\u002F1.getting-started",[149,153,157],{"title":150,"path":151,"stem":152},"Subscribing","\u002Fdocs\u002Fevents\u002Fgetting-started\u002Fsubscribing","docs\u002Fevents\u002F1.getting-started\u002F1.subscribing",{"title":154,"path":155,"stem":156},"Event Delivery","\u002Fdocs\u002Fevents\u002Fgetting-started\u002Fevent-delivery","docs\u002Fevents\u002F1.getting-started\u002F2.event-delivery",{"title":158,"path":159,"stem":160},"Event Reference","\u002Fdocs\u002Fevents\u002Fgetting-started\u002Fevent-reference","docs\u002Fevents\u002F1.getting-started\u002F3.event-reference",{"title":162,"path":163,"stem":164,"children":165},"Integrations API","\u002Fdocs\u002Fintegrations","docs\u002Fintegrations\u002Findex",[166,167],{"title":162,"path":163,"stem":164},{"title":11,"path":168,"stem":169,"children":170,"page":31},"\u002Fdocs\u002Fintegrations\u002Fgetting-started","docs\u002Fintegrations\u002F1.getting-started",[171,175,179,183,187,191],{"title":172,"path":173,"stem":174},"Why Use It?","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fwhy-integrations-api","docs\u002Fintegrations\u002F1.getting-started\u002F1.why-integrations-api",{"title":176,"path":177,"stem":178},"Use Cases","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fwho-is-it-for","docs\u002Fintegrations\u002F1.getting-started\u002F2.who-is-it-for",{"title":180,"path":181,"stem":182},"Pre-built Connectors","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fpre-built-integrations","docs\u002Fintegrations\u002F1.getting-started\u002F3.pre-built-integrations",{"title":184,"path":185,"stem":186},"Custom Inbound","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fcustom-inbound-api","docs\u002Fintegrations\u002F1.getting-started\u002F4.custom-inbound-api",{"title":188,"path":189,"stem":190},"Event Lifecycle","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fevent-lifecycle","docs\u002Fintegrations\u002F1.getting-started\u002F5.event-lifecycle",{"title":192,"path":193,"stem":194},"API Endpoints","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fmanagement-api-endpoints","docs\u002Fintegrations\u002F1.getting-started\u002F6.management-api-endpoints",{"title":196,"path":197,"stem":198,"children":199},"MCP Server","\u002Fdocs\u002Fmcp","docs\u002Fmcp\u002Findex",[200,201,225,234,244],{"title":196,"path":197,"stem":198},{"title":11,"path":202,"stem":203,"children":204,"page":31},"\u002Fdocs\u002Fmcp\u002Fgetting-started","docs\u002Fmcp\u002F1.getting-started",[205,209,213,217,221],{"title":206,"path":207,"stem":208},"Claude","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fclaude","docs\u002Fmcp\u002F1.getting-started\u002F1.claude",{"title":210,"path":211,"stem":212},"Claude Code","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fclaude-code","docs\u002Fmcp\u002F1.getting-started\u002F2.claude-code",{"title":214,"path":215,"stem":216},"VS Code","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fvscode","docs\u002Fmcp\u002F1.getting-started\u002F3.vscode",{"title":218,"path":219,"stem":220},"Cursor","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fcursor","docs\u002Fmcp\u002F1.getting-started\u002F4.cursor",{"title":222,"path":223,"stem":224},"Verify the connection","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fverify","docs\u002Fmcp\u002F1.getting-started\u002F5.verify",{"title":226,"path":227,"stem":228,"children":229,"page":31},"Docs Server","\u002Fdocs\u002Fmcp\u002Fdocs-server","docs\u002Fmcp\u002F2.docs-server",[230],{"title":231,"path":232,"stem":233},"Docs server tools","\u002Fdocs\u002Fmcp\u002Fdocs-server\u002Ftools","docs\u002Fmcp\u002F2.docs-server\u002F1.tools",{"title":235,"path":236,"stem":237,"children":238},"API Server","\u002Fdocs\u002Fmcp\u002Fapi-server","docs\u002Fmcp\u002F3.api-server\u002Findex",[239,240],{"title":235,"path":236,"stem":237},{"title":241,"path":242,"stem":243},"Available tools","\u002Fdocs\u002Fmcp\u002Fapi-server\u002Ftools","docs\u002Fmcp\u002F3.api-server\u002F1.tools",{"title":245,"path":246,"stem":247,"children":248,"page":31},"Examples","\u002Fdocs\u002Fmcp\u002Fexamples","docs\u002Fmcp\u002F4.examples",[249,253,257,261,265,269],{"title":250,"path":251,"stem":252},"Exploring an API","\u002Fdocs\u002Fmcp\u002Fexamples\u002Fexploring-an-api","docs\u002Fmcp\u002F4.examples\u002F1.exploring-an-api",{"title":254,"path":255,"stem":256},"Building a Feature","\u002Fdocs\u002Fmcp\u002Fexamples\u002Fbuilding-a-feature","docs\u002Fmcp\u002F4.examples\u002F2.building-a-feature",{"title":258,"path":259,"stem":260},"Understanding Models","\u002Fdocs\u002Fmcp\u002Fexamples\u002Funderstanding-models","docs\u002Fmcp\u002F4.examples\u002F3.understanding-models",{"title":262,"path":263,"stem":264},"Code Review","\u002Fdocs\u002Fmcp\u002Fexamples\u002Fcode-review","docs\u002Fmcp\u002F4.examples\u002F4.code-review",{"title":266,"path":267,"stem":268},"Combining MCP Servers","\u002Fdocs\u002Fmcp\u002Fexamples\u002Fmulti-mcp","docs\u002Fmcp\u002F4.examples\u002F5.multi-mcp",{"title":270,"path":271,"stem":272},"Tips","\u002Fdocs\u002Fmcp\u002Fexamples\u002Ftips","docs\u002Fmcp\u002F4.examples\u002F6.tips",{"title":274,"path":275,"stem":276,"children":277,"page":31},"Storefront SDK","\u002Fdocs\u002Fstorefront-sdk","docs\u002Fstorefront-sdk",[278,290,323,338],{"title":11,"path":279,"stem":280,"children":281,"page":31},"\u002Fdocs\u002Fstorefront-sdk\u002Fgetting-started","docs\u002Fstorefront-sdk\u002F1.getting-started",[282,286],{"title":283,"path":284,"stem":285},"Installation","\u002Fdocs\u002Fstorefront-sdk\u002Fgetting-started\u002Finstallation","docs\u002Fstorefront-sdk\u002F1.getting-started\u002F1.installation",{"title":287,"path":288,"stem":289},"Configuration","\u002Fdocs\u002Fstorefront-sdk\u002Fgetting-started\u002Fconfiguration","docs\u002Fstorefront-sdk\u002F1.getting-started\u002F2.configuration",{"title":291,"path":292,"stem":293,"children":294,"page":31},"Resources","\u002Fdocs\u002Fstorefront-sdk\u002Fresources","docs\u002Fstorefront-sdk\u002F2.resources",[295,299,303,307,311,315,319],{"title":296,"path":297,"stem":298},"Products","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fproducts","docs\u002Fstorefront-sdk\u002F2.resources\u002F1.products",{"title":300,"path":301,"stem":302},"Cart","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fcart","docs\u002Fstorefront-sdk\u002F2.resources\u002F2.cart",{"title":304,"path":305,"stem":306},"Auth","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fauth","docs\u002Fstorefront-sdk\u002F2.resources\u002F3.auth",{"title":308,"path":309,"stem":310},"Checkout & Shipping","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fcheckout-shipping","docs\u002Fstorefront-sdk\u002F2.resources\u002F4.checkout-shipping",{"title":312,"path":313,"stem":314},"Orders, Returns & Reviews","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Forders-returns-reviews","docs\u002Fstorefront-sdk\u002F2.resources\u002F5.orders-returns-reviews",{"title":316,"path":317,"stem":318},"Customer assistant","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fassistant","docs\u002Fstorefront-sdk\u002F2.resources\u002F6.assistant",{"title":320,"path":321,"stem":322},"Products in images","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fproducts-in-images","docs\u002Fstorefront-sdk\u002F2.resources\u002F7.products-in-images",{"title":128,"path":324,"stem":325,"children":326,"page":31},"\u002Fdocs\u002Fstorefront-sdk\u002Fnuxt-layer","docs\u002Fstorefront-sdk\u002F3.nuxt-layer",[327,331,335],{"title":328,"path":329,"stem":330},"Overview","\u002Fdocs\u002Fstorefront-sdk\u002Fnuxt-layer\u002Foverview","docs\u002Fstorefront-sdk\u002F3.nuxt-layer\u002F1.overview",{"title":332,"path":333,"stem":334},"Composables","\u002Fdocs\u002Fstorefront-sdk\u002Fnuxt-layer\u002Fcomposables","docs\u002Fstorefront-sdk\u002F3.nuxt-layer\u002F2.composables",{"title":316,"path":336,"stem":337},"\u002Fdocs\u002Fstorefront-sdk\u002Fnuxt-layer\u002Fassistant","docs\u002Fstorefront-sdk\u002F3.nuxt-layer\u002F3.assistant",{"title":67,"path":339,"stem":340,"children":341,"page":31},"\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs","docs\u002Fstorefront-sdk\u002F4.nextjs",[342,345,349,353],{"title":328,"path":343,"stem":344},"\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs\u002Foverview","docs\u002Fstorefront-sdk\u002F4.nextjs\u002F1.overview",{"title":346,"path":347,"stem":348},"Hooks","\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs\u002Fhooks","docs\u002Fstorefront-sdk\u002F4.nextjs\u002F2.hooks",{"title":350,"path":351,"stem":352},"Server helpers and proxy","\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs\u002Fserver","docs\u002Fstorefront-sdk\u002F4.nextjs\u002F3.server",{"title":354,"path":355,"stem":356},"Components","\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs\u002Fcomponents","docs\u002Fstorefront-sdk\u002F4.nextjs\u002F4.components",{"id":358,"title":346,"body":359,"description":1951,"extension":1952,"links":1953,"meta":1954,"navigation":408,"path":347,"seo":1961,"stem":348,"__hash__":1962},"docs\u002Fdocs\u002Fstorefront-sdk\u002F4.nextjs\u002F2.hooks.md",{"type":360,"value":361,"toc":1937},"minimark",[362,380,434,439,452,486,497,503,506,674,691,697,810,836,847,853,944,948,1115,1121,1128,1177,1196,1200,1315,1319,1549,1553,1750,1768,1772,1810,1813,1817,1838,1854,1858,1933],[363,364,365,366,370,371,374,375,379],"p",{},"Every hook must be used inside ",[367,368,369],"code",{},"\u003CStorefrontProvider>"," in a client component (",[367,372,373],{},"'use client'","). The hooks have the same names as the ",[376,377,378],"a",{"href":333},"Nuxt composables",". They return plain values instead of refs.",[381,382,387],"pre",{"className":383,"code":384,"language":385,"meta":386,"style":386},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","'use client'\nimport { useCart } from '@avvyr\u002Fstorefront-next'\n\nexport function AddToCart({ sku }: { sku: string }) {\n  const { addItem, loading } = useCart()\n  return \u003Cbutton disabled={loading} onClick={() => addItem({ sku, quantity: 1 })}>Add to cart\u003C\u002Fbutton>\n}\n","tsx","",[367,388,389,397,403,410,416,422,428],{"__ignoreMap":386},[390,391,394],"span",{"class":392,"line":393},"line",1,[390,395,396],{},"'use client'\n",[390,398,400],{"class":392,"line":399},2,[390,401,402],{},"import { useCart } from '@avvyr\u002Fstorefront-next'\n",[390,404,406],{"class":392,"line":405},3,[390,407,409],{"emptyLinePlaceholder":408},true,"\n",[390,411,413],{"class":392,"line":412},4,[390,414,415],{},"export function AddToCart({ sku }: { sku: string }) {\n",[390,417,419],{"class":392,"line":418},5,[390,420,421],{},"  const { addItem, loading } = useCart()\n",[390,423,425],{"class":392,"line":424},6,[390,426,427],{},"  return \u003Cbutton disabled={loading} onClick={() => addItem({ sku, quantity: 1 })}>Add to cart\u003C\u002Fbutton>\n",[390,429,431],{"class":392,"line":430},7,[390,432,433],{},"}\n",[435,436,438],"h2",{"id":437},"fetch-in-the-server-hydrate-in-the-client","Fetch in the server, hydrate in the client",[363,440,441,442,447,448,451],{},"In the App Router, a page usually fetches its data in a Server Component with ",[376,443,444],{"href":351},[367,445,446],{},"storefront.client()",". Pass the result as ",[367,449,450],{},"initialData"," when a client component needs it to stay live. The hook then renders the server's data without a second request:",[381,453,455],{"className":383,"code":454,"language":385,"meta":386,"style":386},"\u002F\u002F app\u002Fproducts\u002F[handle]\u002Fpage.tsx (Server Component)\nconst product = await (await storefront.client()).products.getByHandle(handle)\nreturn \u003CProductView handle={handle} initialProduct={product} \u002F>\n\n\u002F\u002F ProductView.tsx ('use client')\nconst { data: product } = useProductByHandle(handle, { initialData: initialProduct })\n",[367,456,457,462,467,472,476,481],{"__ignoreMap":386},[390,458,459],{"class":392,"line":393},[390,460,461],{},"\u002F\u002F app\u002Fproducts\u002F[handle]\u002Fpage.tsx (Server Component)\n",[390,463,464],{"class":392,"line":399},[390,465,466],{},"const product = await (await storefront.client()).products.getByHandle(handle)\n",[390,468,469],{"class":392,"line":405},[390,470,471],{},"return \u003CProductView handle={handle} initialProduct={product} \u002F>\n",[390,473,474],{"class":392,"line":412},[390,475,409],{"emptyLinePlaceholder":408},[390,477,478],{"class":392,"line":418},[390,479,480],{},"\u002F\u002F ProductView.tsx ('use client')\n",[390,482,483],{"class":392,"line":424},[390,484,485],{},"const { data: product } = useProductByHandle(handle, { initialData: initialProduct })\n",[363,487,488,489,492,493,496],{},"Query hooks return ",[367,490,491],{},"{ data, error, loading, refresh }",". Hooks that share a key share both the request and the result. Pass ",[367,494,495],{},"null"," instead of a parameter to pause a hook.",[435,498,500],{"id":499},"usecart",[367,501,502],{},"useCart()",[363,504,505],{},"The cart is shared across the app. Its id and token are stored in cookies, so the server renders the cart on the next request.",[381,507,511],{"className":508,"code":509,"language":510,"meta":386,"style":386},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const {\n  cart,        \u002F\u002F StorefrontCart | null\n  loading,     \u002F\u002F boolean, stays true across multi-step updates\n  itemCount,   \u002F\u002F number of items (charge lines excluded)\n  create, fetch,\n  addItem, addConfiguredItems, updateConfiguredItems, removeConfiguredGroup,\n  removeItem, updateItemQuantity,\n  setCustomerType, setCustomer, setAddress, setShipping,\n  applyCode, removeCode,\n  complete,    \u002F\u002F needs the private key: call it from a Server Action instead\n  clear,\n} = useCart()\n","ts",[367,512,513,523,536,546,556,569,591,603,626,639,650,658],{"__ignoreMap":386},[390,514,515,519],{"class":392,"line":393},[390,516,518],{"class":517},"spNyl","const",[390,520,522],{"class":521},"sMK4o"," {\n",[390,524,525,529,532],{"class":392,"line":399},[390,526,528],{"class":527},"sTEyZ","  cart",[390,530,531],{"class":521},",",[390,533,535],{"class":534},"sHwdD","        \u002F\u002F StorefrontCart | null\n",[390,537,538,541,543],{"class":392,"line":405},[390,539,540],{"class":527},"  loading",[390,542,531],{"class":521},[390,544,545],{"class":534},"     \u002F\u002F boolean, stays true across multi-step updates\n",[390,547,548,551,553],{"class":392,"line":412},[390,549,550],{"class":527},"  itemCount",[390,552,531],{"class":521},[390,554,555],{"class":534},"   \u002F\u002F number of items (charge lines excluded)\n",[390,557,558,561,563,566],{"class":392,"line":418},[390,559,560],{"class":527},"  create",[390,562,531],{"class":521},[390,564,565],{"class":527}," fetch",[390,567,568],{"class":521},",\n",[390,570,571,574,576,579,581,584,586,589],{"class":392,"line":424},[390,572,573],{"class":527},"  addItem",[390,575,531],{"class":521},[390,577,578],{"class":527}," addConfiguredItems",[390,580,531],{"class":521},[390,582,583],{"class":527}," updateConfiguredItems",[390,585,531],{"class":521},[390,587,588],{"class":527}," removeConfiguredGroup",[390,590,568],{"class":521},[390,592,593,596,598,601],{"class":392,"line":430},[390,594,595],{"class":527},"  removeItem",[390,597,531],{"class":521},[390,599,600],{"class":527}," updateItemQuantity",[390,602,568],{"class":521},[390,604,606,609,611,614,616,619,621,624],{"class":392,"line":605},8,[390,607,608],{"class":527},"  setCustomerType",[390,610,531],{"class":521},[390,612,613],{"class":527}," setCustomer",[390,615,531],{"class":521},[390,617,618],{"class":527}," setAddress",[390,620,531],{"class":521},[390,622,623],{"class":527}," setShipping",[390,625,568],{"class":521},[390,627,629,632,634,637],{"class":392,"line":628},9,[390,630,631],{"class":527},"  applyCode",[390,633,531],{"class":521},[390,635,636],{"class":527}," removeCode",[390,638,568],{"class":521},[390,640,642,645,647],{"class":392,"line":641},10,[390,643,644],{"class":527},"  complete",[390,646,531],{"class":521},[390,648,649],{"class":534},"    \u002F\u002F needs the private key: call it from a Server Action instead\n",[390,651,653,656],{"class":392,"line":652},11,[390,654,655],{"class":527},"  clear",[390,657,568],{"class":521},[390,659,661,664,667,671],{"class":392,"line":660},12,[390,662,663],{"class":521},"}",[390,665,666],{"class":521}," =",[390,668,670],{"class":669},"s2Zo4"," useCart",[390,672,673],{"class":527},"()\n",[363,675,676,679,680,683,684,687,688,690],{},[367,677,678],{},"addItem"," creates a cart when there is none. Cart mutations push GA4 ",[367,681,682],{},"add_to_cart"," and ",[367,685,686],{},"remove_from_cart"," events to the dataLayer, and send ",[367,689,682],{}," to Avvyr tracking when the visitor has consented.",[435,692,694],{"id":693},"useauth",[367,695,696],{},"useAuth()",[381,698,700],{"className":508,"code":699,"language":510,"meta":386,"style":386},"const {\n  customer,          \u002F\u002F CustomerProfile | null\n  isAuthenticated,   \u002F\u002F boolean, from the session cookie (same on server and client)\n  loading,\n  login, register,\n  sendMagicLink, verifyMagicLink, verifyMagicLinkCode,\n  acceptInvite,\n  refresh, logout,\n  fetchMe, updateMe, setPassword,\n} = useAuth()\n",[367,701,702,708,718,728,734,746,763,770,782,799],{"__ignoreMap":386},[390,703,704,706],{"class":392,"line":393},[390,705,518],{"class":517},[390,707,522],{"class":521},[390,709,710,713,715],{"class":392,"line":399},[390,711,712],{"class":527},"  customer",[390,714,531],{"class":521},[390,716,717],{"class":534},"          \u002F\u002F CustomerProfile | null\n",[390,719,720,723,725],{"class":392,"line":405},[390,721,722],{"class":527},"  isAuthenticated",[390,724,531],{"class":521},[390,726,727],{"class":534},"   \u002F\u002F boolean, from the session cookie (same on server and client)\n",[390,729,730,732],{"class":392,"line":412},[390,731,540],{"class":527},[390,733,568],{"class":521},[390,735,736,739,741,744],{"class":392,"line":418},[390,737,738],{"class":527},"  login",[390,740,531],{"class":521},[390,742,743],{"class":527}," register",[390,745,568],{"class":521},[390,747,748,751,753,756,758,761],{"class":392,"line":424},[390,749,750],{"class":527},"  sendMagicLink",[390,752,531],{"class":521},[390,754,755],{"class":527}," verifyMagicLink",[390,757,531],{"class":521},[390,759,760],{"class":527}," verifyMagicLinkCode",[390,762,568],{"class":521},[390,764,765,768],{"class":392,"line":430},[390,766,767],{"class":527},"  acceptInvite",[390,769,568],{"class":521},[390,771,772,775,777,780],{"class":392,"line":605},[390,773,774],{"class":527},"  refresh",[390,776,531],{"class":521},[390,778,779],{"class":527}," logout",[390,781,568],{"class":521},[390,783,784,787,789,792,794,797],{"class":392,"line":628},[390,785,786],{"class":527},"  fetchMe",[390,788,531],{"class":521},[390,790,791],{"class":527}," updateMe",[390,793,531],{"class":521},[390,795,796],{"class":527}," setPassword",[390,798,568],{"class":521},[390,800,801,803,805,808],{"class":392,"line":641},[390,802,663],{"class":521},[390,804,666],{"class":521},[390,806,807],{"class":669}," useAuth",[390,809,673],{"class":527},[363,811,812,815,816,818,819,822,823,826,827,830,831,835],{},[367,813,814],{},"customer"," is ",[367,817,495],{}," until you call ",[367,820,821],{},"fetchMe()",", unless the layout called ",[367,824,825],{},"storefront.initialState({ customer: true })",". Call ",[367,828,829],{},"verifyMagicLink"," from a button click, never on mount: email scanners open links and would use up the one-time token. Signing in or out reloads the page (see ",[376,832,834],{"href":833},"\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs\u002Foverview#how-sessions-work","How sessions work",").",[363,837,838,839,842,843,846],{},"To protect pages, list them in ",[367,840,841],{},"auth.protectedPaths"," in the config (checked by the proxy) or call ",[367,844,845],{},"await storefront.requireSession()"," in the page.",[435,848,850],{"id":849},"usemarket",[367,851,852],{},"useMarket()",[381,854,856],{"className":508,"code":855,"language":510,"meta":386,"style":386},"const {\n  market, marketId, id, name, locale, i18nLocale, currency,\n  markets, strategy,\n  path,          \u002F\u002F (p) => p, with the market prefix under the path strategy\n  switchMarket,  \u002F\u002F (id) => void\n} = useMarket()\n",[367,857,858,864,901,913,923,933],{"__ignoreMap":386},[390,859,860,862],{"class":392,"line":393},[390,861,518],{"class":517},[390,863,522],{"class":521},[390,865,866,869,871,874,876,879,881,884,886,889,891,894,896,899],{"class":392,"line":399},[390,867,868],{"class":527},"  market",[390,870,531],{"class":521},[390,872,873],{"class":527}," marketId",[390,875,531],{"class":521},[390,877,878],{"class":527}," id",[390,880,531],{"class":521},[390,882,883],{"class":527}," name",[390,885,531],{"class":521},[390,887,888],{"class":527}," locale",[390,890,531],{"class":521},[390,892,893],{"class":527}," i18nLocale",[390,895,531],{"class":521},[390,897,898],{"class":527}," currency",[390,900,568],{"class":521},[390,902,903,906,908,911],{"class":392,"line":405},[390,904,905],{"class":527},"  markets",[390,907,531],{"class":521},[390,909,910],{"class":527}," strategy",[390,912,568],{"class":521},[390,914,915,918,920],{"class":392,"line":412},[390,916,917],{"class":527},"  path",[390,919,531],{"class":521},[390,921,922],{"class":534},"          \u002F\u002F (p) => p, with the market prefix under the path strategy\n",[390,924,925,928,930],{"class":392,"line":418},[390,926,927],{"class":527},"  switchMarket",[390,929,531],{"class":521},[390,931,932],{"class":534},"  \u002F\u002F (id) => void\n",[390,934,935,937,939,942],{"class":392,"line":424},[390,936,663],{"class":521},[390,938,666],{"class":521},[390,940,941],{"class":669}," useMarket",[390,943,673],{"class":527},[435,945,947],{"id":946},"catalog","Catalog",[949,950,951,964],"table",{},[952,953,954],"thead",{},[955,956,957,961],"tr",{},[958,959,960],"th",{},"Hook",[958,962,963],{},"Returns",[965,966,967,981,993,1004,1018,1030,1040,1053,1065,1075,1089,1102],"tbody",{},[955,968,969,975],{},[970,971,972],"td",{},[367,973,974],{},"useProductSearch(params, options?)",[970,976,977,980],{},[367,978,979],{},"ProductSearchResponse",". Keeps the previous result while the next one loads.",[955,982,983,988],{},[970,984,985],{},[367,986,987],{},"useProductByHandle(handle, options?)",[970,989,990],{},[367,991,992],{},"StorefrontProduct",[955,994,995,1000],{},[970,996,997],{},[367,998,999],{},"useProductBySku(sku, options?)",[970,1001,1002],{},[367,1003,992],{},[955,1005,1006,1011],{},[970,1007,1008],{},[367,1009,1010],{},"useProductSuggest(params, options?)",[970,1012,1013,1014,1017],{},"Typeahead suggestions. Pauses while ",[367,1015,1016],{},"q"," is empty.",[955,1019,1020,1025],{},[970,1021,1022],{},[367,1023,1024],{},"useRelatedProducts(sku, { attributes?, variants? }, options?)",[970,1026,1027],{},[367,1028,1029],{},"RelatedProductGroup[]",[955,1031,1032,1037],{},[970,1033,1034],{},[367,1035,1036],{},"useProductsByRule(ruleId, context?, options?)",[970,1038,1039],{},"Products from a recommendation rule",[955,1041,1042,1047],{},[970,1043,1044],{},[367,1045,1046],{},"useCategories(options?)",[970,1048,1049,1052],{},[367,1050,1051],{},"StorefrontCategory[]"," from the server's category cache",[955,1054,1055,1060],{},[970,1056,1057],{},[367,1058,1059],{},"useCategoryByHandle(handle, options?)",[970,1061,1062],{},[367,1063,1064],{},"StorefrontCategory",[955,1066,1067,1072],{},[970,1068,1069],{},[367,1070,1071],{},"useCategoryProducts(params, options?)",[970,1073,1074],{},"Products in a category",[955,1076,1077,1086],{},[970,1078,1079,1082,1083],{},[367,1080,1081],{},"useReviews(params)"," \u002F ",[367,1084,1085],{},"useReviewStatistics()",[970,1087,1088],{},"Reviews and aggregates",[955,1090,1091,1099],{},[970,1092,1093,1082,1096],{},[367,1094,1095],{},"useCampaigns(locale?)",[367,1097,1098],{},"useCampaignByCode(code, locale?)",[970,1100,1101],{},"Active campaigns",[955,1103,1104,1112],{},[970,1105,1106,1082,1109],{},[367,1107,1108],{},"useShippingOptions(params)",[367,1110,1111],{},"useProductShipping(sku, { postalCode })",[970,1113,1114],{},"Shipping options",[435,1116,1118],{"id":1117},"useproductlistingoptions",[367,1119,1120],{},"useProductListing(options)",[363,1122,1123,1124,1127],{},"A paginated product listing for category and search pages. \"Load more\" appends pages, and ",[367,1125,1126],{},"?page="," is kept in the URL so a reload or the back button returns to the same position. Facets and sort are included.",[381,1129,1131],{"className":383,"code":1130,"language":385,"meta":386,"style":386},"\u002F\u002F The Server Component fetches page 1 and passes it on, so the first render needs no client request.\nconst listing = useProductListing({\n  params: { categoryId, filters },\n  limit: 24,\n  analytics: { listId: `category-${handle}`, listName: name },\n  initialData: firstPage,\n})\n\nconst { products, facets, total, sort, setSort, hasMore, loadMore, hasPrevious, loadPrevious, loading } = listing\n",[367,1132,1133,1138,1143,1148,1153,1158,1163,1168,1172],{"__ignoreMap":386},[390,1134,1135],{"class":392,"line":393},[390,1136,1137],{},"\u002F\u002F The Server Component fetches page 1 and passes it on, so the first render needs no client request.\n",[390,1139,1140],{"class":392,"line":399},[390,1141,1142],{},"const listing = useProductListing({\n",[390,1144,1145],{"class":392,"line":405},[390,1146,1147],{},"  params: { categoryId, filters },\n",[390,1149,1150],{"class":392,"line":412},[390,1151,1152],{},"  limit: 24,\n",[390,1154,1155],{"class":392,"line":418},[390,1156,1157],{},"  analytics: { listId: `category-${handle}`, listName: name },\n",[390,1159,1160],{"class":392,"line":424},[390,1161,1162],{},"  initialData: firstPage,\n",[390,1164,1165],{"class":392,"line":430},[390,1166,1167],{},"})\n",[390,1169,1170],{"class":392,"line":605},[390,1171,409],{"emptyLinePlaceholder":408},[390,1173,1174],{"class":392,"line":628},[390,1175,1176],{},"const { products, facets, total, sort, setSort, hasMore, loadMore, hasPrevious, loadPrevious, loading } = listing\n",[363,1178,1179,1180,1183,1184,1187,1188,1191,1192,1195],{},"The hook reads ",[367,1181,1182],{},"useSearchParams",", so on a statically rendered page you must wrap the component in ",[367,1185,1186],{},"\u003CSuspense>",". It updates the URL with ",[367,1189,1190],{},"history.replaceState",", so loading another page does not re-render the page's Server Component. It pushes GA4 ",[367,1193,1194],{},"view_item_list"," for every page it loads.",[435,1197,1199],{"id":1198},"navigation-and-history","Navigation and history",[381,1201,1203],{"className":508,"code":1202,"language":510,"meta":386,"style":386},"const { tree, roots, loading } = useCategoryNav({ initialData: categories }) \u002F\u002F nested menu from useCategories()\nconst { crumbs } = useProductBreadcrumb(product)                             \u002F\u002F category trail for a product\nconst { skus, track, clear, getProducts } = useRecentlyViewed()             \u002F\u002F localStorage, empty during SSR\n",[367,1204,1205,1256,1278],{"__ignoreMap":386},[390,1206,1207,1209,1212,1215,1217,1220,1222,1225,1227,1229,1232,1235,1238,1242,1245,1248,1250,1253],{"class":392,"line":393},[390,1208,518],{"class":517},[390,1210,1211],{"class":521}," {",[390,1213,1214],{"class":527}," tree",[390,1216,531],{"class":521},[390,1218,1219],{"class":527}," roots",[390,1221,531],{"class":521},[390,1223,1224],{"class":527}," loading ",[390,1226,663],{"class":521},[390,1228,666],{"class":521},[390,1230,1231],{"class":669}," useCategoryNav",[390,1233,1234],{"class":527},"(",[390,1236,1237],{"class":521},"{",[390,1239,1241],{"class":1240},"swJcz"," initialData",[390,1243,1244],{"class":521},":",[390,1246,1247],{"class":527}," categories ",[390,1249,663],{"class":521},[390,1251,1252],{"class":527},") ",[390,1254,1255],{"class":534},"\u002F\u002F nested menu from useCategories()\n",[390,1257,1258,1260,1262,1265,1267,1269,1272,1275],{"class":392,"line":399},[390,1259,518],{"class":517},[390,1261,1211],{"class":521},[390,1263,1264],{"class":527}," crumbs ",[390,1266,663],{"class":521},[390,1268,666],{"class":521},[390,1270,1271],{"class":669}," useProductBreadcrumb",[390,1273,1274],{"class":527},"(product)                             ",[390,1276,1277],{"class":534},"\u002F\u002F category trail for a product\n",[390,1279,1280,1282,1284,1287,1289,1292,1294,1297,1299,1302,1304,1306,1309,1312],{"class":392,"line":405},[390,1281,518],{"class":517},[390,1283,1211],{"class":521},[390,1285,1286],{"class":527}," skus",[390,1288,531],{"class":521},[390,1290,1291],{"class":527}," track",[390,1293,531],{"class":521},[390,1295,1296],{"class":527}," clear",[390,1298,531],{"class":521},[390,1300,1301],{"class":527}," getProducts ",[390,1303,663],{"class":521},[390,1305,666],{"class":521},[390,1307,1308],{"class":669}," useRecentlyViewed",[390,1310,1311],{"class":527},"()             ",[390,1313,1314],{"class":534},"\u002F\u002F localStorage, empty during SSR\n",[435,1316,1318],{"id":1317},"b2b-company-and-saved-lists","B2B: company and saved lists",[381,1320,1322],{"className":508,"code":1321,"language":510,"meta":386,"style":386},"const {\n  company, members, invites, companies, activeCompany, setActiveCompany,\n  fetchCompany, fetchMembers, fetchInvites,\n  inviteMember, revokeInvite, updateMemberRole, removeMember,\n  updateAddress, addShippingAddress, updateShippingAddress, removeShippingAddress,\n} = useCompany()\n\nconst {\n  lists, favorites, membership, loaded,\n  fetchLists, getList, createList, updateList, shareList, deleteList, duplicateList,\n  addItems, updateItem, removeItem,\n  isSaved, toggleFavorite, addToCart,\n} = useSavedLists()\n",[367,1323,1324,1330,1362,1379,1401,1423,1434,1438,1444,1466,1503,1520,1537],{"__ignoreMap":386},[390,1325,1326,1328],{"class":392,"line":393},[390,1327,518],{"class":517},[390,1329,522],{"class":521},[390,1331,1332,1335,1337,1340,1342,1345,1347,1350,1352,1355,1357,1360],{"class":392,"line":399},[390,1333,1334],{"class":527},"  company",[390,1336,531],{"class":521},[390,1338,1339],{"class":527}," members",[390,1341,531],{"class":521},[390,1343,1344],{"class":527}," invites",[390,1346,531],{"class":521},[390,1348,1349],{"class":527}," companies",[390,1351,531],{"class":521},[390,1353,1354],{"class":527}," activeCompany",[390,1356,531],{"class":521},[390,1358,1359],{"class":527}," setActiveCompany",[390,1361,568],{"class":521},[390,1363,1364,1367,1369,1372,1374,1377],{"class":392,"line":405},[390,1365,1366],{"class":527},"  fetchCompany",[390,1368,531],{"class":521},[390,1370,1371],{"class":527}," fetchMembers",[390,1373,531],{"class":521},[390,1375,1376],{"class":527}," fetchInvites",[390,1378,568],{"class":521},[390,1380,1381,1384,1386,1389,1391,1394,1396,1399],{"class":392,"line":412},[390,1382,1383],{"class":527},"  inviteMember",[390,1385,531],{"class":521},[390,1387,1388],{"class":527}," revokeInvite",[390,1390,531],{"class":521},[390,1392,1393],{"class":527}," updateMemberRole",[390,1395,531],{"class":521},[390,1397,1398],{"class":527}," removeMember",[390,1400,568],{"class":521},[390,1402,1403,1406,1408,1411,1413,1416,1418,1421],{"class":392,"line":418},[390,1404,1405],{"class":527},"  updateAddress",[390,1407,531],{"class":521},[390,1409,1410],{"class":527}," addShippingAddress",[390,1412,531],{"class":521},[390,1414,1415],{"class":527}," updateShippingAddress",[390,1417,531],{"class":521},[390,1419,1420],{"class":527}," removeShippingAddress",[390,1422,568],{"class":521},[390,1424,1425,1427,1429,1432],{"class":392,"line":424},[390,1426,663],{"class":521},[390,1428,666],{"class":521},[390,1430,1431],{"class":669}," useCompany",[390,1433,673],{"class":527},[390,1435,1436],{"class":392,"line":430},[390,1437,409],{"emptyLinePlaceholder":408},[390,1439,1440,1442],{"class":392,"line":605},[390,1441,518],{"class":517},[390,1443,522],{"class":521},[390,1445,1446,1449,1451,1454,1456,1459,1461,1464],{"class":392,"line":628},[390,1447,1448],{"class":527},"  lists",[390,1450,531],{"class":521},[390,1452,1453],{"class":527}," favorites",[390,1455,531],{"class":521},[390,1457,1458],{"class":527}," membership",[390,1460,531],{"class":521},[390,1462,1463],{"class":527}," loaded",[390,1465,568],{"class":521},[390,1467,1468,1471,1473,1476,1478,1481,1483,1486,1488,1491,1493,1496,1498,1501],{"class":392,"line":641},[390,1469,1470],{"class":527},"  fetchLists",[390,1472,531],{"class":521},[390,1474,1475],{"class":527}," getList",[390,1477,531],{"class":521},[390,1479,1480],{"class":527}," createList",[390,1482,531],{"class":521},[390,1484,1485],{"class":527}," updateList",[390,1487,531],{"class":521},[390,1489,1490],{"class":527}," shareList",[390,1492,531],{"class":521},[390,1494,1495],{"class":527}," deleteList",[390,1497,531],{"class":521},[390,1499,1500],{"class":527}," duplicateList",[390,1502,568],{"class":521},[390,1504,1505,1508,1510,1513,1515,1518],{"class":392,"line":652},[390,1506,1507],{"class":527},"  addItems",[390,1509,531],{"class":521},[390,1511,1512],{"class":527}," updateItem",[390,1514,531],{"class":521},[390,1516,1517],{"class":527}," removeItem",[390,1519,568],{"class":521},[390,1521,1522,1525,1527,1530,1532,1535],{"class":392,"line":660},[390,1523,1524],{"class":527},"  isSaved",[390,1526,531],{"class":521},[390,1528,1529],{"class":527}," toggleFavorite",[390,1531,531],{"class":521},[390,1533,1534],{"class":527}," addToCart",[390,1536,568],{"class":521},[390,1538,1540,1542,1544,1547],{"class":392,"line":1539},13,[390,1541,663],{"class":521},[390,1543,666],{"class":521},[390,1545,1546],{"class":669}," useSavedLists",[390,1548,673],{"class":527},[435,1550,1552],{"id":1551},"checkout-and-orders","Checkout and orders",[381,1554,1556],{"className":508,"code":1555,"language":510,"meta":386,"style":386},"const { init, authorize, loading } = useCheckout()\nconst { data: confirmation } = useCheckoutConfirmation(reference) \u002F\u002F pushes GA4 purchase once per order\nconst { methods, fetchPaymentMethods } = usePaymentMethods()\nconst { validate, create } = useReturns()\n\nconst { data: orders } = useCustomerOrders({ page: 1 })  \u002F\u002F pauses until signed in\nconst { data: order } = useCustomerOrder(orderNumber)\nconst { data: publicOrder } = usePublicOrder(token)\n",[367,1557,1558,1585,1612,1635,1658,1662,1704,1727],{"__ignoreMap":386},[390,1559,1560,1562,1564,1567,1569,1572,1574,1576,1578,1580,1583],{"class":392,"line":393},[390,1561,518],{"class":517},[390,1563,1211],{"class":521},[390,1565,1566],{"class":527}," init",[390,1568,531],{"class":521},[390,1570,1571],{"class":527}," authorize",[390,1573,531],{"class":521},[390,1575,1224],{"class":527},[390,1577,663],{"class":521},[390,1579,666],{"class":521},[390,1581,1582],{"class":669}," useCheckout",[390,1584,673],{"class":527},[390,1586,1587,1589,1591,1594,1596,1599,1601,1603,1606,1609],{"class":392,"line":399},[390,1588,518],{"class":517},[390,1590,1211],{"class":521},[390,1592,1593],{"class":1240}," data",[390,1595,1244],{"class":521},[390,1597,1598],{"class":527}," confirmation ",[390,1600,663],{"class":521},[390,1602,666],{"class":521},[390,1604,1605],{"class":669}," useCheckoutConfirmation",[390,1607,1608],{"class":527},"(reference) ",[390,1610,1611],{"class":534},"\u002F\u002F pushes GA4 purchase once per order\n",[390,1613,1614,1616,1618,1621,1623,1626,1628,1630,1633],{"class":392,"line":405},[390,1615,518],{"class":517},[390,1617,1211],{"class":521},[390,1619,1620],{"class":527}," methods",[390,1622,531],{"class":521},[390,1624,1625],{"class":527}," fetchPaymentMethods ",[390,1627,663],{"class":521},[390,1629,666],{"class":521},[390,1631,1632],{"class":669}," usePaymentMethods",[390,1634,673],{"class":527},[390,1636,1637,1639,1641,1644,1646,1649,1651,1653,1656],{"class":392,"line":412},[390,1638,518],{"class":517},[390,1640,1211],{"class":521},[390,1642,1643],{"class":527}," validate",[390,1645,531],{"class":521},[390,1647,1648],{"class":527}," create ",[390,1650,663],{"class":521},[390,1652,666],{"class":521},[390,1654,1655],{"class":669}," useReturns",[390,1657,673],{"class":527},[390,1659,1660],{"class":392,"line":418},[390,1661,409],{"emptyLinePlaceholder":408},[390,1663,1664,1666,1668,1670,1672,1675,1677,1679,1682,1684,1686,1689,1691,1695,1698,1701],{"class":392,"line":424},[390,1665,518],{"class":517},[390,1667,1211],{"class":521},[390,1669,1593],{"class":1240},[390,1671,1244],{"class":521},[390,1673,1674],{"class":527}," orders ",[390,1676,663],{"class":521},[390,1678,666],{"class":521},[390,1680,1681],{"class":669}," useCustomerOrders",[390,1683,1234],{"class":527},[390,1685,1237],{"class":521},[390,1687,1688],{"class":1240}," page",[390,1690,1244],{"class":521},[390,1692,1694],{"class":1693},"sbssI"," 1",[390,1696,1697],{"class":521}," }",[390,1699,1700],{"class":527},")  ",[390,1702,1703],{"class":534},"\u002F\u002F pauses until signed in\n",[390,1705,1706,1708,1710,1712,1714,1717,1719,1721,1724],{"class":392,"line":430},[390,1707,518],{"class":517},[390,1709,1211],{"class":521},[390,1711,1593],{"class":1240},[390,1713,1244],{"class":521},[390,1715,1716],{"class":527}," order ",[390,1718,663],{"class":521},[390,1720,666],{"class":521},[390,1722,1723],{"class":669}," useCustomerOrder",[390,1725,1726],{"class":527},"(orderNumber)\n",[390,1728,1729,1731,1733,1735,1737,1740,1742,1744,1747],{"class":392,"line":605},[390,1730,518],{"class":517},[390,1732,1211],{"class":521},[390,1734,1593],{"class":1240},[390,1736,1244],{"class":521},[390,1738,1739],{"class":527}," publicOrder ",[390,1741,663],{"class":521},[390,1743,666],{"class":521},[390,1745,1746],{"class":669}," usePublicOrder",[390,1748,1749],{"class":527},"(token)\n",[363,1751,1752,1755,1756,1759,1760,1763,1764,1767],{},[367,1753,1754],{},"useMarketDelivery()"," returns the market's delivery rules: ",[367,1757,1758],{},"{ market, deliveryCountries, deliversTo(countryCode), loaded }",". ",[367,1761,1762],{},"usePriceVisibility()"," returns ",[367,1765,1766],{},"{ pricesRequireLogin, canSeePrices }"," for markets that only show prices to signed-in customers.",[435,1769,1771],{"id":1770},"customer-type","Customer type",[381,1773,1775],{"className":508,"code":1774,"language":510,"meta":386,"style":386},"const { customerType, showIncVat, setCustomerType, toggleCustomerType } = useCustomerType()\n",[367,1776,1777],{"__ignoreMap":386},[390,1778,1779,1781,1783,1786,1788,1791,1793,1796,1798,1801,1803,1805,1808],{"class":392,"line":393},[390,1780,518],{"class":517},[390,1782,1211],{"class":521},[390,1784,1785],{"class":527}," customerType",[390,1787,531],{"class":521},[390,1789,1790],{"class":527}," showIncVat",[390,1792,531],{"class":521},[390,1794,1795],{"class":527}," setCustomerType",[390,1797,531],{"class":521},[390,1799,1800],{"class":527}," toggleCustomerType ",[390,1802,663],{"class":521},[390,1804,666],{"class":521},[390,1806,1807],{"class":669}," useCustomerType",[390,1809,673],{"class":527},[363,1811,1812],{},"The value is stored in a cookie, so prices render with the right VAT basis on the server.",[435,1814,1816],{"id":1815},"tracking-and-consent","Tracking and consent",[363,1818,1819,1822,1823,1826,1827,1830,1831,1834,1835,835],{},[367,1820,1821],{},"useTracking()"," sends Avvyr behavioural events: ",[367,1824,1825],{},"{ track, flush, grantConsent, revokeConsent, consentGranted, identity }",". The provider sends ",[367,1828,1829],{},"page_view"," on every navigation. Nothing is sent and no identity cookies are set until the visitor consents (",[367,1832,1833],{},"tracking.requireConsent",", default ",[367,1836,1837],{},"true",[363,1839,1840,683,1843,1846,1847,1850,1851,1853],{},[367,1841,1842],{},"useConsent()",[367,1844,1845],{},"useDataLayer()"," are described with ",[367,1848,1849],{},"\u003CAvvyrCookieConsent \u002F>"," in ",[376,1852,354],{"href":355},".",[435,1855,1857],{"id":1856},"low-level","Low-level",[949,1859,1860,1869],{},[952,1861,1862],{},[955,1863,1864,1866],{},[958,1865,960],{},[958,1867,1868],{},"Use",[965,1870,1871,1881,1894,1907,1920],{},[955,1872,1873,1878],{},[970,1874,1875],{},[367,1876,1877],{},"useStorefrontClient()",[970,1879,1880],{},"The browser SDK client (public key)",[955,1882,1883,1891],{},[970,1884,1885,1082,1888],{},[367,1886,1887],{},"useStorefrontConfig()",[367,1889,1890],{},"useStorefrontEnv()",[970,1892,1893],{},"The resolved config \u002F public env values",[955,1895,1896,1901],{},[970,1897,1898],{},[367,1899,1900],{},"useStorefrontQuery(key, fetcher, options)",[970,1902,1903,1904],{},"Your own cached query: ",[367,1905,1906],{},"useStorefrontQuery('brands', (c) => c.products.search({ … }))",[955,1908,1909,1914],{},[970,1910,1911],{},[367,1912,1913],{},"useSharedState(key, init)",[970,1915,1916,1917],{},"App-wide state shared by key, the equivalent of Nuxt's ",[367,1918,1919],{},"useState",[955,1921,1922,1927],{},[970,1923,1924],{},[367,1925,1926],{},"useInvalidateQueries()",[970,1928,1929,1932],{},[367,1930,1931],{},"invalidate(prefix?)"," marks cached queries stale",[1934,1935,1936],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":386,"searchDepth":399,"depth":399,"links":1938},[1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950],{"id":437,"depth":399,"text":438},{"id":499,"depth":399,"text":502},{"id":693,"depth":399,"text":696},{"id":849,"depth":399,"text":852},{"id":946,"depth":399,"text":947},{"id":1117,"depth":399,"text":1120},{"id":1198,"depth":399,"text":1199},{"id":1317,"depth":399,"text":1318},{"id":1551,"depth":399,"text":1552},{"id":1770,"depth":399,"text":1771},{"id":1815,"depth":399,"text":1816},{"id":1856,"depth":399,"text":1857},"All React hooks provided by @avvyr\u002Fstorefront-next","md",null,{"questions":1955},{"en":1956},[1957,1958,1959,1960],"How do I add an item to the cart in Next.js?","How do I show the signed-in customer in a client component?","How do I hydrate a client component with product data from a Server Component?","How do I switch market in a Next.js storefront?",{"title":346,"description":1951},"Jb6zjKCwvQGn7XbLDrMm7GMG-b_8RnktBoWgulunXjk",[1964,1966],{"title":328,"path":343,"stem":344,"description":1965,"children":-1},"What @avvyr\u002Fstorefront-next gives you and how to add it to a Next.js App Router project",{"title":350,"path":351,"stem":352,"description":1967,"children":-1},"Use the Storefront SDK in Server Components, Route Handlers and Server Actions, and what the storefront proxy does",1793388942053]