(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3130],{82389:function(e,r,t){Promise.resolve().then(t.bind(t,13210))},69117:function(e,r,t){"use strict";t.d(r,{w:function(){return h}});var s=t(13870),o=t(87356),l=t(90164),a=t(18117),n=t(30076),i=t(33514),c=t(56738);let h=e=>{let{blogs:r}=e,t=r.slice(0,3),h=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.xu,{pos:"relative",...i.l,children:[(0,s.jsx)(o.xu,{textAlign:{base:"start",md:"center"},mb:16,children:(0,s.jsx)(l.X,{as:"h2",size:"xl",color:"titleAccent",children:"Explore more resources"})}),(0,s.jsx)(a.M,{columns:{base:1,md:2,lg:3},gap:8,children:t.map(e=>(0,s.jsx)(c.c,{blog:e},e.frontmatter.slug))})]}),(0,s.jsx)(n.d,{})]});return t.length>=3?h:null}},56738:function(e,r,t){"use strict";t.d(r,{c:function(){return g}});var s=t(13870),o=t(87356),l=t(47839),a=t(22534),n=t(17302),i=t(90164),c=t(93566),h=t(31179),d=t(9588),x=t(23998),u=t(3834),m=t(70819),j=t(21440);let g=e=>{let{blog:r,isLoading:t,showTags:g}=e;return(0,s.jsxs)(x.Zb,{isClickable:!0,flexDirection:{base:"column",md:"row"},gap:{base:0,md:4},children:[(0,s.jsx)(o.xu,{w:"100%",pos:"relative",borderBottom:"1px solid",borderColor:"stroke",children:t?(0,s.jsx)(l.O,{width:"100%",height:"auto",aspectRatio:800/520,startColor:"contrastLowest",endColor:"contrastLow"}):(0,s.jsx)(u.default,{width:800,height:520,src:r.frontmatter.image.src,alt:r.frontmatter.image.alt})}),(0,s.jsxs)(a.k,{direction:"column",p:4,alignItems:"flex-start",gap:2,children:[(0,s.jsx)(a.k,{gap:1,flexWrap:"wrap",children:g&&r.frontmatter.tags&&r.frontmatter.tags.map(e=>(0,s.jsx)(n.Vp,{display:"inline-flex",size:"sm",colorScheme:"gray",variant:"subtle",borderRadius:"sm",children:(0,s.jsx)(n.Sn,{minW:"10",children:t?"":e.toLocaleLowerCase().replace(/\b(\w)/g,e=>e.toUpperCase())})},e))}),(0,s.jsx)(i.X,{as:"h2",size:"sm",color:"titleAccent",children:(0,s.jsx)(c.A,{as:m.default,href:"/blog/".concat(r.frontmatter.slug),children:t?(0,s.jsx)(h.N,{startColor:"contrastLow",endColor:"contrastMedium",skeletonHeight:"4",noOfLines:2,children:r.frontmatter.title}):r.frontmatter.title})}),t?(0,s.jsxs)(h.N,{startColor:"contrastLowest",endColor:"contrastLow",skeletonHeight:"2",noOfLines:1,children:[r.frontmatter.author," ",(0,j.p)(r.frontmatter.date)]}):(0,s.jsxs)(a.k,{gap:2,children:[(0,s.jsxs)(d.x,{color:"textSubtle",fontSize:"xs",fontWeight:"medium",children:["By ",(0,s.jsx)("b",{children:r.frontmatter.author})]}),(0,s.jsxs)(d.x,{color:"textSubtle",fontSize:"xs",fontWeight:"medium",children:["• ",(0,j.p)(r.frontmatter.date)]})]}),(0,s.jsx)(d.x,{color:"text",fontSize:"sm",children:t?(0,s.jsx)(h.N,{startColor:"contrastLowest",endColor:"contrastLow",skeletonHeight:"3",noOfLines:3,children:r.frontmatter.description}):r.frontmatter.description})]})]},r.frontmatter.slug)}},13210:function(e,r,t){"use strict";t.d(r,{BranchingPage:function(){return F}});var s=t(13870),o=t(47379),l=t(17014),a=t(62797),n=t(32346),i=t(84658),c=t(69117),h=t(27794),d=t(69895),x=t(30076),u=t(72908),m=t(72127),j=t(55720),g=t(6625),p=t(3834);let b=()=>(0,s.jsx)(p.default,{src:"/images/feature-pages/branching-hero.svg",width:646,height:646,alt:"Branching hero image"});var f=t(1354),k=t(22534),v=t(31828),w=t(87356),y=t(9588),z=t(24599),S=t(49894),C=t(28123),A=t(74482),T=t(38832),I=t(83038),B=t(52021),P=t(15272),E=t(90164),D=t(74970),X=t(23998),W=t(41133),L=t(33514),R=t(1200),M=t(18117),q=t(66306);let U=e=>{let{title:r,description:t,illustration:o,number:l,isLast:a}=e;return(0,s.jsx)(w.xu,{children:(0,s.jsxs)(M.M,{columns:{base:1,lg:2},gap:{base:0,lg:24},pos:"relative",alignItems:"center",flexDir:{base:"column",lg:"row"},children:[(0,s.jsxs)(k.k,{gap:8,flexDir:{base:"column",lg:"row"},h:"full",children:[(0,s.jsxs)(k.k,{alignItems:{base:"start",lg:"center"},flexDir:"column",h:"full",pos:"relative",justifyContent:"space-around",children:[(0,s.jsx)(q.U,{display:"flex",borderRadius:"50%",minW:12,minH:12,boxSize:12,fontSize:"xl",bg:"bg",alignItems:"center",justifyContent:"center",boxShadow:"outline",fontWeight:"bold",pos:"relative",zIndex:2,children:l}),(0,s.jsx)(w.xu,{top:1===l?"50%":0,bottom:a?"50%":0,bg:"stroke",w:"1px",display:{base:"none",lg:"block"},pos:"absolute"})]}),(0,s.jsx)(w.xu,{display:"flex",alignItems:"center",justifyContent:"space-around",flexDir:"column",children:(0,s.jsx)(q.U,{display:"flex",alignItems:"center",justifyContent:"space-around",flexDir:"column",delay:.3,children:(0,s.jsxs)(w.xu,{children:[(0,s.jsx)(k.k,{children:(0,s.jsx)(E.X,{as:"h1",size:"xl",mb:4,children:r})}),(0,s.jsx)(y.x,{mb:4,children:t})]})})})]}),(0,s.jsx)(w.xu,{children:(0,s.jsx)(q.U,{pos:"relative",my:{base:4,lg:24},delay:.6,children:o})})]})})},_=e=>{let{children:r}=e;return(0,s.jsx)(f.E,{color:"ghost",bg:"blackAlpha.500",children:r})},H=e=>{let{codeBlocks:r,...t}=e,o=(0,s.jsxs)(k.k,{flexDir:"column",pos:"relative",zIndex:2,children:[(0,s.jsxs)(k.k,{alignItems:"start",gap:4,mb:4,ml:4,children:[(0,s.jsx)(v.q,{src:"https://avatars.githubusercontent.com/u/2181866?v=4",size:"md",boxShadow:"md",showBorder:!0,borderColor:"stroke"}),(0,s.jsx)(w.xu,{bg:"bgPrimary",color:"ghost",fontWeight:"medium",p:2,borderRadius:"md",boxShadow:"md",children:(0,s.jsx)(y.x,{fontSize:"sm",children:"Hey team. I'm making a feature branch so we can collaborate."})})]}),(0,s.jsx)(R.s,{mdxContent:r.branch,pos:"relative",zIndex:2}),(0,s.jsx)(w.xu,{w:"2px",h:4,bg:"stroke",ml:"27px"}),(0,s.jsxs)(k.k,{alignItems:"center",gap:2,fontSize:"xs",ml:4,children:[(0,s.jsx)(v.q,{size:"xs",icon:(0,s.jsx)(z.J,{as:D._lU,boxSize:4})}),(0,s.jsx)(X.BE,{boxSize:4}),(0,s.jsx)(f.E,{fontSize:"xs",children:"xata pull"}),(0,s.jsx)(S.C,{variant:"outline",children:"CLI"}),"updated TS Types in ",(0,s.jsx)(f.E,{fontSize:"xs",children:"src/xata.ts"})]}),(0,s.jsx)(w.xu,{w:"2px",h:4,bg:"stroke",ml:"27px"}),(0,s.jsxs)(k.k,{alignItems:"center",gap:2,fontSize:"xs",ml:4,children:[(0,s.jsx)(v.q,{size:"xs",icon:(0,s.jsx)(z.J,{as:D._lU,boxSize:4})}),(0,s.jsx)(X.BE,{boxSize:4}),(0,s.jsx)(f.E,{fontSize:"xs",children:"xata pull"}),(0,s.jsx)(S.C,{variant:"outline",children:"CLI"}),"created new migration files in ",(0,s.jsx)(f.E,{fontSize:"xs",children:".xata/migrations"})]})]}),n=(0,s.jsxs)(k.k,{flexDir:"column",children:[(0,s.jsxs)(k.k,{alignItems:"start",gap:4,mb:4,ml:4,children:[(0,s.jsx)(v.q,{src:"https://avatars.githubusercontent.com/u/2181866?v=4",size:"md",boxShadow:"md",showBorder:!0,borderColor:"stroke"}),(0,s.jsx)(w.xu,{bg:"bgPrimary",color:"ghost",fontWeight:"medium",p:2,borderRadius:"md",boxShadow:"md",children:(0,s.jsxs)(y.x,{fontSize:"sm",children:["I made some changes to the Xata schema in the UI. Time to run"," ",(0,s.jsx)(_,{children:"xata pull my-changes"})," to get back Types! Now I'll commit the generated migration files into a PR along with my app code."]})})]}),(0,s.jsxs)(k.k,{alignItems:"center",gap:2,fontSize:"xs",ml:4,children:[(0,s.jsx)(v.q,{size:"xs",bg:"bgPrimary",icon:(0,s.jsx)(z.J,{as:a.EhG,boxSize:4})}),(0,s.jsx)(v.q,{src:"https://avatars.githubusercontent.com/u/2181866?v=4",size:"xs",boxShadow:"md",showBorder:!0,borderColor:"stroke"}),(0,s.jsx)(y.x,{children:"Alexis"}),"committed ",(0,s.jsx)(f.E,{fontSize:"xs",children:"add desc column"})," into ",(0,s.jsx)(f.E,{fontSize:"xs",children:"my-changes"})," just now"]}),(0,s.jsx)(w.xu,{w:"2px",h:4,bg:"stroke",ml:"27px"}),(0,s.jsx)(R.s,{mdxContent:r.pr,pos:"relative",zIndex:2}),(0,s.jsx)(w.xu,{w:"2px",h:4,bg:"stroke",ml:"27px"}),(0,s.jsxs)(k.k,{alignItems:"center",gap:2,fontSize:"xs",ml:4,children:[(0,s.jsx)(v.q,{size:"xs",icon:(0,s.jsx)(z.J,{as:D._lU,boxSize:4})}),(0,s.jsx)(X.BE,{boxSize:4}),(0,s.jsx)(y.x,{children:"Xata"}),(0,s.jsx)(S.C,{variant:"outline",children:"bot"}),"noticed a migration on GitHub. Creating a preview branch for this PR."]})]}),i=(0,s.jsxs)(k.k,{flexDir:"column",pos:"relative",zIndex:2,children:[(0,s.jsxs)(k.k,{flexDir:"column",alignItems:"start",fontSize:"xs",borderRadius:"md",bg:"bg",zIndex:2,overflow:"hidden",mr:12,boxShadow:"outline",children:[(0,s.jsxs)(k.k,{alignItems:"center",bg:"contrastLowest",px:4,py:2,w:"full",gap:2,children:[(0,s.jsx)(X.BE,{boxSize:4}),(0,s.jsx)(y.x,{fontWeight:"semibold",children:"Xata"}),(0,s.jsx)(S.C,{variant:"outline",children:"bot"}),(0,s.jsx)(y.x,{children:"commented 3 minutes ago on GitHub"})]}),(0,s.jsxs)(w.xu,{p:4,w:"full",bg:"bg",children:[(0,s.jsxs)(y.x,{mb:4,children:[(0,s.jsx)("strong",{children:"Preview branches created for your PR"}),". Learn more about"," ",(0,s.jsx)(y.x,{color:"textPrimary",as:"span",children:"Xata for GitHub"}),"."]}),(0,s.jsxs)(C.i,{size:"xs",variant:"bordered",children:[(0,s.jsx)(A.h,{children:(0,s.jsxs)(T.Tr,{children:[(0,s.jsx)(I.Th,{children:"Database"}),(0,s.jsx)(I.Th,{children:"State"}),(0,s.jsx)(I.Th,{children:"Preview"})]})}),(0,s.jsx)(B.p,{children:(0,s.jsxs)(T.Tr,{children:[(0,s.jsx)(P.Td,{children:"preview-my-changes"}),(0,s.jsx)(P.Td,{children:"✅ Ready"}),(0,s.jsx)(P.Td,{children:(0,s.jsx)(y.x,{color:"textPrimary",children:"View on Xata"})})]})})]})]})]}),(0,s.jsx)(w.xu,{w:"2px",h:4,bg:"stroke",ml:"40px",pos:"relative",zIndex:2}),(0,s.jsxs)(k.k,{alignItems:"start",gap:4,ml:4,children:[(0,s.jsx)(v.q,{src:"https://avatars.githubusercontent.com/u/2181866?v=4",size:"md",boxShadow:"md",showBorder:!0,borderColor:"stroke"}),(0,s.jsx)(w.xu,{bg:"bgPrimary",color:"ghost",fontWeight:"medium",p:2,borderRadius:"md",boxShadow:"md",children:(0,s.jsxs)(y.x,{fontSize:"sm",children:["The"," ",(0,s.jsx)(y.x,{textDecoration:"underline",as:"span",children:"pull request"})," ","creates a cloned Xata database with data. Feel free to mess around, it won't affect production data. The Vercel preview build automatically points to the linked Xata database. \uD83C\uDF89"]})})]}),(0,s.jsxs)(k.k,{flexDir:"column",alignItems:"start",fontSize:"xs",borderRadius:"md",bg:"bg",zIndex:2,overflow:"hidden",mr:12,mt:4,boxShadow:"outline",children:[(0,s.jsxs)(k.k,{alignItems:"center",bg:"contrastLowest",px:4,py:2,w:"full",gap:2,children:[(0,s.jsx)(W.Kn,{boxSize:4}),(0,s.jsx)(y.x,{fontWeight:"semibold",children:"Vercel"}),(0,s.jsx)(S.C,{variant:"outline",children:"bot"}),(0,s.jsx)(y.x,{children:"commented 3 minutes ago on GitHub"})]}),(0,s.jsxs)(w.xu,{p:4,w:"full",bg:"bg",children:[(0,s.jsxs)(y.x,{mb:4,children:[(0,s.jsx)("strong",{children:"The latest updates on your project"}),". Learn more about"," ",(0,s.jsx)(y.x,{color:"textPrimary",as:"span",children:"Vercel for GitHub"}),"."]}),(0,s.jsxs)(C.i,{size:"xs",variant:"bordered",children:[(0,s.jsx)(A.h,{children:(0,s.jsxs)(T.Tr,{children:[(0,s.jsx)(I.Th,{children:"Name"}),(0,s.jsx)(I.Th,{children:"State"}),(0,s.jsx)(I.Th,{children:"Preview"})]})}),(0,s.jsx)(B.p,{children:(0,s.jsxs)(T.Tr,{children:[(0,s.jsx)(P.Td,{children:"my-website"}),(0,s.jsx)(P.Td,{children:"✅ Ready"}),(0,s.jsx)(P.Td,{children:(0,s.jsx)(y.x,{color:"textPrimary",children:"View on Xata"})})]})})]})]})]})]}),c=(0,s.jsxs)(k.k,{flexDir:"column",pos:"relative",zIndex:2,children:[(0,s.jsxs)(k.k,{alignItems:"center",gap:2,fontSize:"xs",ml:4,children:[(0,s.jsx)(v.q,{size:"xs",bg:"bgPrimary",icon:(0,s.jsx)(z.J,{as:l.W69,boxSize:4})}),(0,s.jsx)(v.q,{src:"https://avatars.githubusercontent.com/u/2181866?v=4",size:"xs",boxShadow:"md",showBorder:!0,borderColor:"stroke"}),(0,s.jsx)(y.x,{children:"Alexis"}),"merged commit ",(0,s.jsx)(f.E,{fontSize:"xs",children:"3daa381"})," into ",(0,s.jsx)(f.E,{fontSize:"xs",children:"main"})," just now"]}),(0,s.jsx)(w.xu,{w:"2px",h:4,bg:"stroke",ml:"27px"}),(0,s.jsxs)(k.k,{alignItems:"center",gap:2,fontSize:"xs",ml:4,children:[(0,s.jsx)(v.q,{size:"xs",icon:(0,s.jsx)(z.J,{as:D._lU,boxSize:4})}),(0,s.jsx)(X.BE,{boxSize:4,ml:1,mr:1}),(0,s.jsx)(y.x,{children:"Xata"}),(0,s.jsx)(S.C,{variant:"outline",children:"bot"}),"noticed a merge. Deleting branch ",(0,s.jsx)(f.E,{fontSize:"xs",children:"preview-my-changes"})]}),(0,s.jsx)(w.xu,{w:"2px",h:4,bg:"stroke",ml:"27px"}),(0,s.jsxs)(k.k,{alignItems:"center",gap:2,fontSize:"xs",ml:4,children:[(0,s.jsx)(v.q,{size:"xs",icon:(0,s.jsx)(z.J,{as:D._lU,boxSize:4})}),(0,s.jsx)(X.BE,{boxSize:4,ml:1,mr:1}),(0,s.jsx)(y.x,{children:"Xata"}),(0,s.jsx)(S.C,{variant:"outline",children:"bot"}),"noticed a merge. Merging branch ",(0,s.jsx)(f.E,{fontSize:"xs",children:"my-changes"})," to ",(0,s.jsx)(f.E,{fontSize:"xs",children:"main"})]}),(0,s.jsx)(w.xu,{w:"2px",h:4,bg:"stroke",ml:"27px"}),(0,s.jsxs)(k.k,{alignItems:"start",gap:4,ml:4,children:[(0,s.jsx)(v.q,{src:"https://avatars.githubusercontent.com/u/2181866?v=4",size:"md",boxShadow:"md",showBorder:!0,borderColor:"stroke"}),(0,s.jsx)(w.xu,{bg:"bgPrimary",color:"ghost",fontWeight:"medium",p:2,borderRadius:"md",boxShadow:"md",children:(0,s.jsxs)(y.x,{fontSize:"sm",children:["Merged the"," ",(0,s.jsx)(y.x,{textDecoration:"underline",as:"span",children:"pull request"}),". Xata automatically merged the database changes to the ",(0,s.jsx)(_,{children:"main"})," branch with zero downtime."]})})]})]}),h=[{title:"Branch",description:(0,s.jsxs)(s.Fragment,{children:["Branch your database like your code. Run ",(0,s.jsx)(f.E,{children:"xata branch"})," from our CLI then ",(0,s.jsx)(f.E,{children:"xata pull"})," and"," ",(0,s.jsx)(f.E,{children:"xata push"})," to start collaborating with your team."]}),illustration:o,url:"/docs/getting-started",number:1},{title:"Create a PR",description:(0,s.jsx)(s.Fragment,{children:"Create a PR like normal in GitHub. Xata keeps track of your schema changes in the background and will create a comment with your schema and status in the PR."}),illustration:n,url:"/docs/getting-started",number:2},{title:"Preview",description:(0,s.jsx)(s.Fragment,{children:"Vercel and Netlify integrations generate a preview branch with your PR and deployment preview, eliminating the need for separate dev and staging environments."}),illustration:i,url:"/docs/getting-started",number:3},{title:"Merge",description:(0,s.jsx)(s.Fragment,{children:"Merge your pull request as usual. Our system will run checks, perform a zero-downtime migration, and close any open branches, automatically."}),illustration:c,url:"/docs/getting-started",number:4}];return(0,s.jsxs)(w.xu,{id:"workflow-list",children:[(0,s.jsxs)(k.k,{alignItems:{base:"start",lg:"center"},flexDir:"column",...L.l,mb:12,children:[(0,s.jsx)(E.X,{size:"md",color:"textSubtle",mb:4,children:"Keep doing what works best for your team"}),(0,s.jsx)(E.X,{size:"lg",maxW:1200,mx:"auto",children:"A complete end-to-end workflow for preview deployments"})]}),(0,s.jsx)(k.k,{...t,flexDir:"column",...L.l,gap:{base:32,lg:0},children:h.map((e,r)=>(0,s.jsx)(U,{...e,number:r+1,isLast:h.length===r+1},r))})]})},F=e=>{let{blogs:r,snippetPRCode:t,snippetBranchCode:p}=e,f=[{icon:l.U6g,title:"Version control",description:"Create a branch with every pull request for local development and faster collaboration.",link:"/docs/getting-started/workflow"},{icon:a.WB7,title:"Testing environments",description:"Have a branch in every stage of your development lifecycle. From QA to staging to production.",link:"/docs/getting-started/workflow#branching-your-database"},{icon:n.AGA,title:"Preview deployments supported",description:"Pair with your preview deployments in Vercel and Netlify.",link:"/docs/integrations/vercel"},{icon:i.QcD,title:"CI/CD pipeline",description:"Plug into your existing CI/CD pipeline to reduce operational overhead and minimize risk.",link:"/docs/integrations/github"}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.D,{title:(0,s.jsxs)(s.Fragment,{children:["Branch your database ",(0,s.jsx)("br",{}),(0,s.jsx)(u.D,{children:"just like your code"})]}),description:"Create a copy of your database for local development, testing or staging environments, then merge into production with zero downtime.",img:(0,s.jsx)(b,{}),buttons:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(o.z,{as:"a",variant:"gradient",href:"https://app.xata.io",size:"md",children:"Start free"})})}),(0,s.jsx)(x.d,{}),(0,s.jsx)(j.J,{features:f}),(0,s.jsx)(x.d,{}),(0,s.jsx)(d.$,{children:(0,s.jsx)(H,{codeBlocks:{pr:t,branch:p}})}),(0,s.jsx)(x.d,{}),(0,s.jsx)(c.w,{blogs:r}),(0,s.jsx)(g.B,{}),(0,s.jsx)(x.d,{}),(0,s.jsx)(d.$,{children:(0,s.jsx)(h.J,{})})]})}},1200:function(e,r,t){"use strict";t.d(r,{s:function(){return c}});var s=t(13870),o=t(33985),l=t(87356),a=t(33508),n=t(12167),i=t(23489);let c=e=>{let{mdxContent:r,minHeight:t,hasTabs:c,hasOutline:h,fallbackMDXBlock:d,...x}=e,u=(0,n.useMemo)(()=>{try{return(0,a.getMDXComponent)(r)}catch(e){if(d)return e=>(0,s.jsx)(d,{mdxContent:r});throw Error("Error parsing MDX: ".concat(e," ").concat(r))}},[r,d]),m=(0,o.m)(u);return(0,s.jsx)(l.xu,{...x,minHeight:t,...c&&{className:"snippet--hasTabs",as:"pre",bg:"codeBg",borderRadius:"md",overflow:"hidden"},...h&&{className:"snippet--hasOutline",borderRadius:"md",boxShadow:"outline",overflow:"hidden"},children:(0,s.jsx)(m,{components:i.h})})}},72127:function(e,r,t){"use strict";t.d(r,{D:function(){return d}});var s=t(13870),o=t(22534),l=t(87356),a=t(90164),n=t(9588),i=t(23998),c=t(69895),h=t(33514);let d=e=>{let{title:r,description:t,video:d,img:x,buttons:u,...m}=e;return(0,s.jsx)(c.$,{position:"relative",my:{base:8,lg:24},variant:"gradient",...m,children:(0,s.jsx)(o.k,{flexDir:"column",pos:"relative",zIndex:5,w:"full",children:(0,s.jsx)(l.xu,{pos:"relative",children:(0,s.jsxs)(o.k,{gap:{base:8,lg:24},pos:"relative",alignItems:"center",flexDir:{base:"column",lg:"row"},justifyContent:{base:"center",lg:"space-between"},textAlign:{base:"center",lg:"left"},...h.l,children:[(0,s.jsxs)(l.xu,{flexBasis:"60%",maxW:"560px",order:{base:1,lg:0},children:[(0,s.jsx)(a.X,{as:"h1",size:{base:"xl",md:"2xl"},mb:4,color:"titleAccent",children:r}),(0,s.jsx)(n.x,{mb:8,textShadow:"sm",children:t}),(0,s.jsx)(o.k,{gap:4,alignItems:"center",justifyContent:{base:"center",lg:"flex-start"},children:u})]}),d&&(0,s.jsx)(i.nk,{src:d.videoUrl,platform:d.videoPlatform,flexBasis:"40%",boxShadow:"under",w:"full"}),x&&x]})})})})}},55720:function(e,r,t){"use strict";t.d(r,{J:function(){return u}});var s=t(13870),o=t(22534),l=t(18117),a=t(24599),n=t(87356),i=t(90164),c=t(9588),h=t(23998),d=t(33514),x=t(66306);let u=e=>{let{features:r,sectionTitle:t,...u}=e;return(0,s.jsxs)(o.k,{alignItems:{base:"start",lg:"center"},flexDir:"column",...d.l,mb:12,...u,children:[t,(0,s.jsx)(l.M,{columns:{base:1,md:2},gap:24,children:r.map((e,r)=>{let{icon:t,title:l,description:d,link:u}=e;return(0,s.jsxs)(o.k,{gap:8,children:[(0,s.jsx)(x.U,{delay:.3*r,children:(0,s.jsx)(o.k,{bg:"bgPrimary",width:16,height:16,alignItems:"center",justifyContent:"center",borderRadius:"md",children:(0,s.jsx)(a.J,{as:t,boxSize:{base:8},color:"ghost"})})}),(0,s.jsxs)(n.xu,{children:[(0,s.jsx)(i.X,{as:"h3",size:"lg",mb:4,children:l}),"string"==typeof d?(0,s.jsx)(c.x,{mb:4,children:d}):d,u&&(0,s.jsx)(h.rU,{href:u,fontWeight:"semibold",children:"Learn More"})]})]},r)})})]})}},6625:function(e,r,t){"use strict";t.d(r,{B:function(){return j}});var s=t(13870),o=t(22534),l=t(90164),a=t(9588),n=t(47379),i=t(87356),c=t(41133),h=t(3834),d=t(70819),x=t(69895),u=t(59003),m=t(33514);let j=()=>(0,s.jsx)(x.$,{children:(0,s.jsxs)(o.k,{flexDir:{base:"column",lg:"column"},pos:"relative",...m.l,zIndex:2,w:"full",alignItems:"center",children:[(0,s.jsx)(l.X,{size:"md",color:"textSubtle",mb:4,children:"Learn by example"}),(0,s.jsx)(l.X,{size:"lg",fontWeight:"bold",as:"h1",mb:2,children:"Try out a sample app"}),(0,s.jsx)(a.x,{mb:12,maxW:{base:"full",md:"66%"},textAlign:"center",children:"Built with Next.js, Chakra UI, and Xata, the sample app will help you learn how to query, paginate and search records with a heavy focus on file attachments."}),(0,s.jsx)(o.k,{mb:12,children:(0,s.jsx)(n.z,{as:d.default,href:"https://github.com/xataio/sample-nextjs-chakra-gallery-app",leftIcon:(0,s.jsx)(c.fy,{boxSize:4}),children:"View source on GitHub"})}),(0,s.jsx)(i.xu,{boxShadow:"outline",borderRadius:"md",overflow:"hidden",children:(0,s.jsx)(h.default,{src:u.Z,alt:"Add column to table"})})]})})},23489:function(e,r,t){"use strict";t.d(r,{w:function(){return R},h:function(){return M}});var s=t(13870),o=t(33985),l=t(85359),a=t(47379),n=t(87356),i=t(37343),c=t(98360),h=t(33416),d=t(4954),x=t(24466),u=t(34302),m=t(90164),j=t(1354),g=t(9588),p=t(43538),b=t(38080),f=t(28123),k=t(74482),v=t(52021),w=t(83038),y=t(15272),z=t(38832),S=t(23998);let C={hljs:{display:"block",overflowX:"auto",color:"var(--chakra-colors-codeText)",background:"var(--chakra-colors-codeBg)",whiteSpace:"pre-wrap",padding:"1rem",borderRadius:"0.5rem",border:"1px solid var(--chakra-colors-codeBorder)"},"hljs-comment":{color:"var(--chakra-colors-codeTextComment)"},"hljs-subst":{color:"var(--chakra-colors-codeTextSubst)"},"hljs-selector-tag":{color:"var(--chakra-colors-codeTextDanger)"},"hljs-selector-id":{color:"var(--chakra-colors-codeTextPrimary)",fontWeight:"bold"},"hljs-selector-class":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-selector-attr":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-selector-pseudo":{color:"var(--chakra-colors-purple-300)"},"hljs-addition":{backgroundColor:"rgba(163, 190, 140, 0.3)"},"hljs-deletion":{backgroundColor:"rgba(191, 97, 106, 0.3)"},"hljs-built_in":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-type":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-class":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-function":{color:"var(--chakra-colors-purple-300)"},"hljs-function > .hljs-title":{color:"var(--chakra-colors-purple-300)"},"hljs-keyword":{color:"var(--chakra-colors-textAccent)"},"hljs-literal":{color:"var(--chakra-colors-textAccent)"},"hljs-symbol":{color:"var(--chakra-colors-textAccent)"},"hljs-number":{color:"var(--chakra-colors-textDanger)"},"hljs-regexp":{color:"#EBCB8B"},"hljs-string":{color:"var(--chakra-colors-textAccent)"},"hljs-title":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-params":{color:"var(--chakra-colors-contrastHigh)"},"hljs-bullet":{color:"var(--chakra-colors-textAccent)"},"hljs-code":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-emphasis":{fontStyle:"italic"},"hljs-formula":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-strong":{fontWeight:"bold"},"hljs-link:hover":{textDecoration:"underline"},"hljs-quote":{color:"var(--chakra-colors-codeTextComment)"},"hljs-doctag":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-meta":{color:"var(--chakra-colors-textSuccess)"},"hljs-meta-keyword":{color:"var(--chakra-colors-textSuccess)"},"hljs-meta-string":{color:"var(--chakra-colors-textSubtle)"},"hljs-attr":{color:"var(--chakra-colors-codeTextPrimary)"},"hljs-attribute":{color:"var(--chakra-colors-contrastHigh)"},"hljs-builtin-name":{color:"var(--chakra-colors-textAccent)"},"hljs-name":{color:"var(--chakra-colors-textAccent)"},"hljs-section":{color:"var(--chakra-colors-purple-300)"},"hljs-tag":{color:"var(--chakra-colors-textAccent)"},"hljs-variable":{color:"var(--chakra-colors-contrastHigh)"},"hljs-template-variable":{color:"var(--chakra-colors-contrastHigh)"},"hljs-template-tag":{color:"var(--chakra-colors-textSuccess)"},"abnf .hljs-attribute":{color:"var(--chakra-colors-purple-300)"},"abnf .hljs-symbol":{color:"#EBCB8B"},"apache .hljs-attribute":{color:"var(--chakra-colors-purple-300)"},"apache .hljs-section":{color:"var(--chakra-colors-textAccent)"},"arduino .hljs-built_in":{color:"var(--chakra-colors-purple-300)"},"aspectj .hljs-meta":{color:"var(--chakra-colors--textWarning)"},"aspectj > .hljs-title":{color:"var(--chakra-colors-purple-300)"},"bnf .hljs-attribute":{color:"var(--chakra-colors-codeTextPrimary)"},"clojure .hljs-name":{color:"var(--chakra-colors-purple-300)"},"clojure .hljs-symbol":{color:"#EBCB8B"},"coq .hljs-built_in":{color:"var(--chakra-colors-purple-300)"},"cpp .hljs-meta-string":{color:"var(--chakra-colors-codeTextPrimary)"},"css .hljs-built_in":{color:"var(--chakra-colors-purple-300)"},"css .hljs-keyword":{color:"var(--chakra-colors--textWarning)"},"diff .hljs-meta":{color:"var(--chakra-colors-codeTextPrimary)"},"ebnf .hljs-attribute":{color:"var(--chakra-colors-codeTextPrimary)"},"glsl .hljs-built_in":{color:"var(--chakra-colors-purple-300)"},"groovy .hljs-meta:not(:first-child)":{color:"var(--chakra-colors--textWarning)"},"haxe .hljs-meta":{color:"var(--chakra-colors--textWarning)"},"java .hljs-meta":{color:"var(--chakra-colors--textWarning)"},"ldif .hljs-attribute":{color:"var(--chakra-colors-codeTextPrimary)"},"lisp .hljs-name":{color:"var(--chakra-colors-purple-300)"},"lua .hljs-built_in":{color:"var(--chakra-colors-purple-300)"},"moonscript .hljs-built_in":{color:"var(--chakra-colors-purple-300)"},"nginx .hljs-attribute":{color:"var(--chakra-colors-purple-300)"},"nginx .hljs-section":{color:"var(--chakra-colors-textSuccess)"},"pf .hljs-built_in":{color:"var(--chakra-colors-purple-300)"},"processing .hljs-built_in":{color:"var(--chakra-colors-purple-300)"},"scss .hljs-keyword":{color:"var(--chakra-colors-textAccent)"},"stylus .hljs-keyword":{color:"var(--chakra-colors-textAccent)"},"swift .hljs-meta":{color:"var(--chakra-colors--textWarning)"},"vim .hljs-built_in":{color:"var(--chakra-colors-purple-300)",fontStyle:"italic"},"yaml .hljs-meta":{color:"var(--chakra-colors--textWarning)"}};var A=t(70819),T=t(12167),I=t(91549),B=t(30158),P=t.n(B);let E=(0,o.m)(I.Z),D={sx:{maxW:800,w:"full",mx:"auto","&:not(:last-child)":{mb:6}}},X=e=>{let{ctx:r,...t}=e,{onCopy:o,setValue:n,hasCopied:i}=(0,l.V)("");return(0,T.useEffect)(()=>{var e,t;n(null!==(t=null===(e=r.current)||void 0===e?void 0:e.textContent)&&void 0!==t?t:"")},[r,n]),(0,s.jsx)(a.z,{onClick:o,size:"xs","aria-label":"copy",color:"white",bg:"primary.500",pos:"absolute",right:2,top:2,opacity:0,_hover:{bg:"primary.600"},...t,children:i?"Copied":"Copy"})},W=e=>{let{children:r,...t}=e;return(0,s.jsx)(n.xu,{as:"blockquote",borderLeftWidth:"3px",borderLeftStyle:"solid",borderLeftColor:"accent",paddingX:"3",wordBreak:"break-word",bg:"contrastLowest",...t,sx:{"&:not(blockquote blockquote)":{paddingY:"2"},...D.sx},children:r})},L={DocsEnablePostgres:e=>(0,s.jsx)(S.oZ,{...e,...D}),TabList:i.t,Tab:c.O,TabPanels:h.n,TabPanel:d.x,CodeCompare:e=>(0,s.jsx)(S.cE,{...e,...D,maxW:1200,children:e.children}),TabbedCode:e=>(0,s.jsx)(S.jr,{tabs:e.tabs,...e,...D,children:e.children}),Tabs:e=>(0,s.jsx)(x.m,{...e,...D,variant:"minimal"}),Alert:e=>(0,s.jsx)(u.b,{...e,...D,variant:"left-accent"}),Box:e=>(0,s.jsx)(n.xu,{...e,...D}),TransformImageExample:e=>(0,s.jsx)(S.gO,{url:e.url,options:e.options,...D}),Expand:e=>(0,s.jsx)(S.M0,{title:e.title,...e,...D}),blockquote:e=>(0,s.jsx)(W,{...e,...D}),ArticleImage:e=>(0,s.jsx)(S.Se,{src:e.src,width:e.width,height:e.height,alt:e.alt,...D,...e}),ArticleVideo:e=>(0,s.jsx)(S.nk,{src:e.src,width:e.width,height:e.height,platform:e.platform,...D,...e}),h1:e=>(0,s.jsx)(m.X,{as:"h1",size:"2xl",id:P()(String(e.children)),...e,...D}),h2:e=>{let r=P()(String(e.children),{lower:!0,strict:!0});return(0,s.jsx)(S.nY,{href:"#".concat(r),pt:8,...D,children:(0,s.jsx)(m.X,{size:"xl",as:"h2",id:r,...e,style:{scrollMarginTop:80}})})},h3:e=>{let r=P()(String(e.children),{lower:!0,strict:!0});return(0,s.jsx)(S.nY,{href:"#".concat(r),pt:6,...D,children:(0,s.jsx)(m.X,{size:"md",as:"h3",id:r,...e,style:{scrollMarginTop:80}})})},h4:e=>{let r=P()(String(e.children),{lower:!0,strict:!0});return(0,s.jsx)(S.nY,{href:"#".concat(r),pt:6,...D,children:(0,s.jsx)(m.X,{size:"sm",as:"h4",id:r,...e,style:{scrollMarginTop:80}})})},h5:e=>{let r=P()(String(e.children),{lower:!0,strict:!0});return(0,s.jsx)(S.nY,{href:"#".concat(r),pt:4,...D,children:(0,s.jsx)(m.X,{size:"xs",as:"h5",id:r,...e,style:{scrollMarginTop:80}})})},h6:e=>{let r=P()(String(e.children),{lower:!0,strict:!0});return(0,s.jsx)(S.nY,{href:"#".concat(r),pt:4,...D,children:(0,s.jsx)(m.X,{size:"xs",as:"h6",id:r,...e,style:{scrollMarginTop:80}})})},pre:e=>{let{children:r,...t}=e,o=(0,T.useRef)(null);return(0,s.jsxs)(n.xu,{pos:"relative",role:"group",...D,children:[(0,s.jsx)(X,{ctx:o,_groupHover:{opacity:1}}),(0,s.jsx)(n.xu,{ref:o,as:"pre",...D,...t,children:r})]})},code:e=>"string"!=typeof e.children?(0,s.jsx)("code",{children:e.children}):(0,s.jsx)(j.E,{whiteSpace:"normal",...e}),p:e=>"string"!=typeof e.children&&void 0!==e.children.props&&e.children.props.src?(0,s.jsx)(s.Fragment,{children:e.children}):(0,s.jsx)(g.x,{...e,...D}),img:e=>{let{src:r,alt:t,width:o,height:l}=e;return(0,s.jsx)(S.Se,{src:r,caption:t,width:o,height:l,alt:t,...D})},li:e=>(0,s.jsx)(p.HC,{children:e.children}),ul:e=>(0,s.jsx)(p.QI,{pl:8,spacing:2,...D,children:e.children}),ol:e=>(0,s.jsx)(p.GS,{pl:8,spacing:2,...D,children:e.children}),a:e=>(0,s.jsx)(b.r,{as:A.default,href:e.href,children:e.children}),table:e=>(0,s.jsx)(f.i,{...D,size:"sm",layout:"fixed",variant:"docs",children:e.children}),thead:e=>(0,s.jsx)(k.h,{children:e.children}),tbody:e=>(0,s.jsx)(v.p,{children:e.children}),th:e=>(0,s.jsx)(w.Th,{children:e.children}),td:e=>(0,s.jsx)(y.Td,{children:e.children}),tr:e=>(0,s.jsx)(z.Tr,{children:e.children})},R={...L,code:e=>void 0===e.className?(0,s.jsx)(j.E,{...e}):(0,s.jsx)(E,{style:C,language:"typescript",...D,mb:8,children:e.children})},M=L},21440:function(e,r,t){"use strict";t.d(r,{p:function(){return o}});var s=t(53192);let o=e=>(0,s.Qc)(e,"MM-dd-yyyy",new Date).toLocaleDateString("en-us",{year:"numeric",month:"long",day:"numeric"})},59003:function(e,r){"use strict";r.Z={src:"/_next/static/media/gallery-example.d5b6e4f2.png",height:1200,width:2400,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAAMFBMVEUMCxVbVHx5cbNseWFLSjsxMCQfJSaGebtlWoWXh8pfYUyCaE5oUzx4f29xZKxDNT3rxyJJAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAJ0lEQVR4nBXBhw0AIAwDsKS7zP+/RdjoIslqZOBLiHuoXcFZU/cweQo0AKr4kUOaAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:4}}},function(e){e.O(0,[5597,8431,430,4521,2818,8613,4087,757,2483,2599,6461,4619,4139,1837,4912,6646,5398,9834,2230,1133,2068,9989,8399,1862,1744],function(){return e(e.s=82389)}),_N_E=e.O()}]);