slice-machine-ui 2.19.2-beta.2 → 2.19.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/_next/static/chunks/{489-ce3053e1d81ade83.js → 489-32281540712d98bb.js} +1 -1
- package/out/_next/static/chunks/593-7ffd1197c3405ef8.js +1 -0
- package/out/_next/static/chunks/633-275b9968b5aaa920.js +1 -0
- package/out/_next/static/chunks/882-48d61b2fabee28d8.js +1 -0
- package/out/_next/static/chunks/pages/{_app-83c4f5b209504941.js → _app-9cc2da8ff60c3087.js} +1 -1
- package/out/_next/static/chunks/pages/{changes-7f24b37f5bf872ae.js → changes-e66094f57453cf9c.js} +1 -1
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-1b47424a37b49dff.js → [customTypeId]-6d613b67e6967ae5.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-385f933c203e8b16.js → [pageTypeId]-40207b66190e3fcd.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-08cdeefc96106c0c.js → [variation]-22ffa2561ac66557.js} +1 -1
- package/out/_next/static/chunks/pages/{slices-bedcb854fbdca8cd.js → slices-a9b4d6d022cfcd88.js} +1 -1
- package/out/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +3 -3
- package/src/features/customTypes/customTypesBuilder/CreateSliceFromImageModal/CreateSliceFromImageModal.tsx +428 -240
- package/src/features/customTypes/customTypesBuilder/CreateSliceFromImageModal/SliceCard.tsx +49 -12
- package/src/icons/FigmaIcon.tsx +33 -34
- package/src/icons/FigmaIconSquare.tsx +45 -0
- package/src/legacy/components/ScreenshotChangesModal/index.tsx +2 -2
- package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +1 -1
- package/out/_next/static/4ZbwQOH1s2JwSCJTqy_83/_buildManifest.js +0 -1
- package/out/_next/static/chunks/34-28725deef8b874b1.js +0 -1
- package/out/_next/static/chunks/658-8231c0b729e0124a.js +0 -1
- package/out/_next/static/chunks/907-bf4215e6fc238ea0.js +0 -1
- /package/out/_next/static/{4ZbwQOH1s2JwSCJTqy_83 → uC4K1_hgf7dK4FL02cbUH}/_ssgManifest.js +0 -0
package/out/_next/static/chunks/pages/{changes-7f24b37f5bf872ae.js → changes-e66094f57453cf9c.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[849],{21985:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/changes",function(){return n(22425)}])},72641:function(e,t,n){"use strict";n.d(t,{R$:function(){return o},Qj:function(){return x},T9:function(){return d},nf:function(){return u},u2:function(){return c},_T:function(){return h}});var i=n(52322),s=n(11699),l=n(6277),r=n(83478),a=n.n(r);let o=e=>{let{backgroundImage:t,style:n,...s}=e,r=void 0!==t;return(0,i.jsx)("article",{...s,className:(0,l.W)(a().root,{[a().withBackground]:r}),style:{backgroundImage:r?"url(".concat(t,")"):void 0,...n}})},c=e=>(0,i.jsx)("div",{...e,className:a().image}),d=e=>(0,i.jsx)("div",{...e,className:a().content}),h=e=>(0,i.jsx)(s.bL,{...e,variant:"h3"}),u=e=>(0,i.jsx)(s.bL,{...e,color:"grey11"}),x=e=>(0,i.jsx)("div",{...e,className:a().actions,color:"grey"})},33986:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var i=n(52322),s=n(2784),l=n(75289);let r=(e,t)=>e?"".concat(e,"-").concat(t):"",a=e=>{switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},o=(0,s.forwardRef)((e,t)=>{let{label:n,Icon:s,type:o,form:c,isLoading:d=!1,disabled:h=!1,onClick:u,sx:x={},iconSize:m=16,iconFill:g,variant:p="primary",...j}=e;return(0,i.jsx)(l.zx,{ref:t,sx:{...x,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",...d?{cursor:"wait !important"}:{}},type:o,form:c,disabled:h||d,onClick:d?void 0:u,variant:p,...j,children:d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.$j,{size:m,color:a(p),"data-testid":r(j["data-testid"],"spinner")}),s&&n]}):(0,i.jsxs)(i.Fragment,{children:[s&&(0,i.jsx)(s,{size:m,fill:g,"data-testid":r(j["data-testid"],"icon")}),n]})})})},21151:function(e,t,n){"use strict";var i=n(52322),s=n(75289);t.Z=function(e){let{elems:t,renderElem:n,defineElementKey:l,gridTemplateMinPx:r="320px",gridGap:a="16px",sx:o}=e;return(0,i.jsx)(s.xu,{as:"section",sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(r,", 1fr))"),gridGap:a,pt:2,...o},children:t.map((e,t)=>e?(0,i.jsx)("span",{children:n(e,t)},"".concat(l(e),"-").concat(t+1)):null)})}},22425:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ea}});var i=n(52322),s=n(11699),l=n(97729),r=n.n(l),a=n(5632),o=n(2784),c=n(88932),d=n(65077),h=n(94160),u=n(43388),x=n(72641);function m(e){let{isPostPush:t,documentsListEndpoint:n}=e,l=t?p:g;return(0,i.jsxs)(x.R$,{style:{alignSelf:"center",marginTop:s.t.space[72]},children:[(0,i.jsx)(x.u2,{children:(0,i.jsx)(s.a_,{src:l.img,sizing:"cover"})}),(0,i.jsxs)(x.T9,{children:[(0,i.jsx)(x._T,{children:l.title}),(0,i.jsx)(x.nf,{children:l.description}),t&&(0,i.jsx)(x.Qj,{children:(0,i.jsx)(s.E,{onClick:()=>{h.Xe.track({event:"post-push:empty-state-cta-clicked"}),window.open(n,"_blank")},size:"large",children:"Create content in the Page Builder"})})]})]})}let g={img:"/blank-slate-changes-uptodate.png",title:"Everything is up-to-date",description:"No changes are staged. Saved updates will appear here, ready to be pushed to the Page Builder."},p={img:"/blank-slate-push-success.png",title:"Success! Your changes have been pushed to the Page Builder.",description:"Add content to your website to bring it to life!"},j=(0,o.forwardRef)((e,t)=>(0,i.jsx)(s.E,{...e,ref:t,startIcon:"upload",children:"Push"}));var f=n(98250),v=n(98033),b=n(68968),y=n(13434),k=n(19468),C=n(978),w=n(30613),S=n(58446),_=n(91914),D=n(75289);let T=()=>(0,i.jsx)(D.kC,{sx:{justifyContent:"center",alignItems:"center",flex:1},children:(0,i.jsxs)(D.kC,{sx:{flexDirection:"column",alignItems:"center",transform:"translateY(-50%)"},children:[(0,i.jsx)(_.wQ1,{size:48}),(0,i.jsx)(D.xv,{sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",mb:"8px",mt:"2px",textAlign:"center"},children:"No internet connection"}),(0,i.jsx)(D.xv,{sx:{fontSize:"13px",lineHeight:"24px",textAlign:"center"},children:"Connect to the internet to sync your changes."})]})});var L=n(54597);let B=()=>{let{openLoginModal:e}=(0,L.Z)();return(0,i.jsxs)(s.D,{flexDirection:"column",height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[(0,i.jsx)(s.bL,{variant:"h3",align:"center",children:"It seems like you are logged out"}),(0,i.jsx)(s.bL,{align:"center",children:"Log in to connect to your repository."}),(0,i.jsxs)(s.bL,{align:"center",children:["If that doesn't work, it's possible that Slice Machine is having trouble accessing Prismic's servers."," ",(0,i.jsx)(s.bL,{href:"https://community.prismic.io/",children:"Contact our support team"}),"."]}),(0,i.jsx)(s.E,{onClick:()=>e(),children:"Log in to Prismic"})]})};var E=n(951),I=n(63908),O=n(87446),N=n(51507),F=n(21442);let R=e=>{let{children:t}=e;return(0,i.jsx)(D.kC,{sx:{alignItems:"center",justifyContent:"space-between",mt:"8px",bg:"grey02",borderRadius:4,padding:"12px 16px",width:"100%"},children:t})};var z=n(39097),A=n.n(z),P=n(99195),W=n(59294),H=n(16442);let X=e=>{let{ct:t,status:n,authStatus:s,isOnline:l}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(D.xu,{as:"td",style:{width:"40%"},children:(0,i.jsx)(D.xv,{sx:{fontWeight:500},children:t.label})}),(0,i.jsx)(D.xu,{as:"td",style:{width:"40%"},children:t.id}),(0,i.jsx)(D.xu,{as:"td",style:{width:"20%"},children:(0,i.jsx)(P.O,{authStatus:s,isOnline:l,modelStatus:n,modelType:"CustomType"})})]})},Z=e=>{let{customTypes:t,modelsStatuses:n,authStatus:s,isOnline:l}=e;return(0,i.jsxs)(D.xu,{as:"table","data-legacy-component":!0,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{className:"transparent small",children:[(0,i.jsx)(D.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"Name"}),(0,i.jsx)(D.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"API ID"}),(0,i.jsx)(D.xu,{as:"th",sx:{width:"20%",fontWeight:600},children:"Status"})]})}),(0,i.jsx)("tbody",{children:t.map(e=>(0,H.TG)(e)?(0,i.jsx)(A(),{passHref:!0,href:W.cd[e.local.format].getBuilderPagePathname(e.local.id),legacyBehavior:!0,children:(0,i.jsx)("tr",{tabIndex:0,"data-testid":"custom-type-".concat(e.local.id),children:(0,i.jsx)(X,{ct:e.local,status:n.customTypes[e.local.id],authStatus:s,isOnline:l},e.local.id)})},e.local.id):(0,i.jsx)("tr",{tabIndex:0,className:"disabled","data-testid":"custom-type-".concat(e.remote.id),children:(0,i.jsx)(X,{ct:e.remote,status:n.customTypes[e.remote.id],authStatus:s,isOnline:l},e.remote.id)},e.remote.id))})]})};var G=n(21151),M=n(68105),U=n(56448),Y=n(96317);function Q(){let e=(0,Y.L)("slicemachine-dev-collaboration"),[t,n]=(0,o.useState)(!1),l=null==e?void 0:e.payload;return((0,o.useEffect)(()=>{(null==e?void 0:e.value)==="on"&&void 0!==l&&h.Xe.track({event:"dev-collab:workflow-stub-displayed"})},[e,l]),(null==e?void 0:e.value)!=="on"||void 0===l)?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.D,{alignItems:"flex-start",border:{bottom:!0,left:!0,right:!0,top:!0},borderRadius:6,borderStyle:"dashed",flexDirection:"column",flexShrink:0,gap:8,padding:16,width:320,children:[(0,i.jsxs)(s.D,{flexDirection:"column",gap:2,children:[(0,i.jsx)(s.bL,{variant:"smallBold",children:l.cardTitle}),(0,i.jsx)(s.bL,{color:"grey11",variant:"small",children:l.cardDescription})]}),(0,i.jsx)(s.E,{color:"grey",onClick:()=>{h.Xe.track({event:"dev-collab:set-up-workflow-opened"}),n(!0)},children:l.cardButtonLabel})]}),(0,i.jsxs)(s.ae,{onOpenChange:e=>{e||n(!1)},open:t,size:{height:"auto",width:448},children:[(0,i.jsx)(s.al,{title:l.dialogTitle}),(0,i.jsx)(s.aj,{children:(0,i.jsxs)(s.D,{flexDirection:"column",children:[(0,i.jsx)(s.D,{flexDirection:"column",padding:16,children:(0,i.jsx)(s.bL,{children:l.dialogDescription})}),(0,i.jsxs)(s.ah,{children:[(0,i.jsx)(s.ai,{size:"medium"}),(0,i.jsx)(s.af,{size:"medium",onClick:()=>{h.Xe.track({event:"dev-collab:join-beta-clicked"}),window.open(l.dialogButtonLink,"_blank"),n(!1)},children:l.dialogButtonLabel})]})]})})]})]})}let J=e=>{let{unSyncedCustomTypes:t,unSyncedSlices:n,modelsStatuses:l,authStatus:r,isOnline:a}=e,{modalPayload:c,onOpenModal:d}=(0,F.H)(),{sliceFilterFn:h,defaultVariationSelector:u}=c,x=n.filter(e=>l.slices[e.model.id]!==U.GJ.Deleted);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(s.D,{gap:16,alignItems:"flex-start",children:[(0,i.jsxs)(s.D,{flexDirection:"column",flexGrow:1,children:[t.length>0&&(0,i.jsxs)(s.D,{flexDirection:"column",children:[(0,i.jsx)(R,{children:(0,i.jsxs)(s.D,{children:[(0,i.jsx)(s.bL,{variant:"h5",children:"Types"}),(0,i.jsx)(s.bL,{variant:"h5",sx:{marginLeft:8},children:t.length})]})}),(0,i.jsx)(Z,{customTypes:t,modelsStatuses:l,authStatus:r,isOnline:a})]}),n.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.D,{padding:{bottom:8},children:(0,i.jsxs)(R,{children:[(0,i.jsxs)(s.D,{children:[(0,i.jsx)(s.bL,{variant:"h5",children:"Slices"}),(0,i.jsx)(s.bL,{variant:"h5",sx:{marginLeft:8},children:n.length})]}),(0,i.jsxs)(s.D,{children:[n.some(e=>(0,I.cx)(e)>0&&l.slices[e.model.id]!==U.GJ.Deleted)&&(0,i.jsxs)(s.bL,{color:"amber11",sx:{marginRight:8,alignSelf:"center"},children:[(0,i.jsx)(E.sQg,{size:16,style:{marginRight:"4px",position:"relative",top:"3px"}}),"Missing Screenshots"]}),(0,i.jsx)(s.E,{color:"dark",startIcon:"photoCamera",onClick:()=>d({sliceFilterFn:e=>e}),children:"Update all screenshots"})]})]})}),(0,i.jsx)(G.Z,{gridGap:"32px 16px",elems:n,gridTemplateMinPx:"305px",defineElementKey:e=>e.model.name,renderElem:e=>{let t=l.slices[e.model.id];return(0,i.jsx)(N.b,{action:{type:"status",authStatus:r,isOnline:a,modelStatus:t},isDeleted:t===U.GJ.Deleted,mode:"navigation",onUpdateScreenshot:()=>{d({sliceFilterFn:t=>t.filter(t=>t.model.id===e.model.id)})},slice:e,variant:"solid"})}}),(0,i.jsx)(M.Z,{slices:h(x),defaultVariationSelector:u})]})]}),(0,i.jsx)(O.h,{children:(0,i.jsx)(o.Suspense,{children:(0,i.jsx)(Q,{})})})]})})};var $=n(56580),q=n(33986),K=n(79797),V=n(30527);let ee=e=>{let{isOpen:t,title:n,footer:s,explanations:l,onClose:r}=e;return(0,i.jsx)(K.Z,{placement:"right",open:t,level:null,onClose:r,width:496,children:(0,i.jsx)(V.Z,{radius:"0px",bodySx:{bg:"white",padding:24,flex:1,display:"flex",flexDirection:"column",overflow:"scroll"},footerSx:{p:0},sx:{flexDirection:"column",display:"flex",height:"100%",border:"none"},borderFooter:!0,Header:(0,i.jsxs)(D.kC,{sx:{p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,i.jsx)(D.kC,{sx:{alignItems:"center"},children:(0,i.jsx)(D.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:n})}),(0,i.jsx)(D.x8,{type:"button",onClick:()=>r()})]}),Footer:()=>(0,i.jsx)(D.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center",paddingRight:16,borderTop:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.darkBorders))},backgroundColor:"white",padding:20},children:s}),children:l})})};var et=n(78254);n(98564);let en=e=>{let{ctName:t,numberOfDocuments:n,link:s,isOverLimit:l=!1}=e;return(0,i.jsxs)(D.Zb,{sx:{mb:12},variant:"drawerCard","data-testid":"AssociatedDocumentsCard-".concat(t),children:[(0,i.jsxs)(D.kC,{sx:{flexDirection:"column"},children:[(0,i.jsx)(D.xv,{children:t}),(0,i.jsxs)(D.xv,{sx:{color:"textClear",fontSize:"12px",lineHeight:"16px"},children:[n," documents"]})]}),(0,i.jsx)(D.rU,{href:s,target:"_blank",variant:"cardSmall",sx:{color:l?"danger":"purple08"},children:"View documents"})]})},ei=e=>{let{pushChanges:t,modalData:n,onClose:s}=e,{remoteOnlyCustomTypes:l}=(0,$.v9)(e=>({remoteOnlyCustomTypes:(0,et.Ch)(e).filter(H.yp)}));if((null==n?void 0:n.type)!=="HARD")return null;let r=n.details.customTypes.map(e=>{var t;let n=l.find(t=>(0,H.n5)(t)===e.id);return void 0===n?null:(0,i.jsx)(en,{isOverLimit:!0,ctName:null!==(t=n.remote.label)&&void 0!==t?t:n.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,i.jsx)(ee,{isOpen:"HARD"===n.type,title:"Manual action required",onClose:s,footer:(0,i.jsx)(q.z,{label:"Try again",variant:"primary",onClick:()=>{t(!1)},sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}}),explanations:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(D.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:["Your type",n.details.customTypes.length>1&&"s"," cannot be deleted."]}),(0,i.jsxs)(D.xv,{sx:{mb:24},children:[n.details.customTypes.length>1?"These types have":"This type has"," ","too many associated Documents. Archive and delete these Documents manually and then try deleting the types again."]}),r]})})},es=e=>{let{onToggle:t,isConfirmed:n,sx:s}=e;return(0,i.jsxs)(D.kC,{sx:{borderRadius:6,flexDirection:"column",backgroundColor:"grey03",padding:12,width:"100%",...s},children:[(0,i.jsx)(D.xv,{sx:{fontWeight:"bold",mb:2},children:"Are you sure to proceed?"}),(0,i.jsxs)(D.__,{sx:{mt:"4px",py:1},variant:"large",children:[(0,i.jsx)(D.XZ,{defaultChecked:n,onChange:t,variant:"forms.checkbox.dark"}),"Delete these Documents"]})]})},el=e=>{let{pushChanges:t,modalData:n,onClose:s}=e,[l,r]=(0,o.useState)(!1),{remoteOnlyCustomTypes:a}=(0,$.v9)(e=>({remoteOnlyCustomTypes:(0,et.Ch)(e).filter(H.yp)}));if((null==n?void 0:n.type)!=="SOFT")return null;let c=n.details.customTypes.map(e=>{var t;let n=a.find(t=>(0,H.n5)(t)===e.id);return void 0===n?null:(0,i.jsx)(en,{isOverLimit:!0,ctName:null!==(t=n.remote.label)&&void 0!==t?t:n.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,i.jsx)(ee,{isOpen:"SOFT"===n.type,title:"Confirm deletion",onClose:s,footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(es,{onToggle:()=>{r(!l)},isConfirmed:l,sx:{mb:10}}),(0,i.jsx)(q.z,{label:"Push changes",variant:"primary",onClick:()=>{t(l)},disabled:!l,sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}})]}),explanations:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(D.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:"This action will also delete Documents."}),(0,i.jsxs)(D.xv,{sx:{mb:24},children:[n.details.customTypes.length>1?"These types have":"This type has"," ","associated Documents, which will also be deleted. This might create broken links in your repository."]}),c]})})};var er=n(93671),ea=()=>{let{unSyncedSlices:e,unSyncedCustomTypes:t,changedCustomTypes:n,changedSlices:l,modelsStatuses:x}=(0,y.X)(),g=(0,C.L)(),p=(0,k.n)(),{pushChangesSuccess:_,refreshState:D}=(0,L.Z)(),[E,I]=(0,o.useState)(!1),[O,N]=(0,o.useState)(void 0),{autoSyncStatus:F}=(0,b.g)(),R=(0,a.useRouter)(),[z,A]=(0,o.useState)(!1),[P,W]=(0,o.useState)(!1),{repositoryUrl:H}=(0,w.U)(),{completeStep:X}=(0,f.k)(),Z=e.length+t.length;(0,o.useEffect)(()=>{("synced"===F||"failed"===F||"syncing"===F)&&R.push("/")},[F,R]);let G=async e=>{try{I(!0),N(void 0);let t=await (0,v.t)({confirmDeleteDocuments:e,changedCustomTypes:n,changedSlices:l});if(void 0!==t)N(t);else{let e=await (0,h.y0)();D(e),_(),A(!0),W(!0),X("reviewAndPush")}}catch(e){console.error("Something went wrong when manually pushing your changes",e),c.Am.error("Something went wrong when pushing your changes. Check your terminal logs.")}I(!1)},M=(0,o.useMemo)(()=>g?p===er.t.UNAUTHENTICATED?(0,i.jsx)(B,{}):0===Z?(0,i.jsx)(m,{isPostPush:z,documentsListEndpoint:H}):(0,i.jsx)(J,{unSyncedSlices:e,unSyncedCustomTypes:t,modelsStatuses:x,authStatus:p,isOnline:g}):(0,i.jsx)(T,{}),[g,p,Z,e,t,x,z,H]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r(),{children:(0,i.jsx)("title",{children:"Changes - Slice Machine"})}),(0,i.jsxs)(S.LN,{children:[(0,i.jsxs)(S.wd,{children:[(0,i.jsx)(S.Cx,{children:(0,i.jsx)(u.g,{children:"Changes"})}),(0,i.jsxs)(S.K2,{children:[(0,i.jsx)(j,{disabled:0===Z||!g||p!==er.t.AUTHENTICATED||E,loading:E,onClick:()=>{G(!1)}}),(0,i.jsx)(s.bQ,{anchor:(0,i.jsx)(s.D,{position:"fixed",top:32,right:32,width:322}),open:P,variant:"card",seconds:20,title:"Success! \uD83C\uDF89",subtitle:"Your changes have been pushed.",action:{title:"Create content in the Page Builder",onClick:()=>{h.Xe.track({event:"post-push:toast-cta-clicked"}),window.open(H,"_blank")}},cancel:{onClick:()=>W(!1)},onOpenChange:W})]})]}),(0,i.jsx)(S.RN,{children:(0,i.jsxs)(d.xR,{sx:{display:"flex",flexDirection:"column"},children:[M,(0,i.jsx)(el,{pushChanges:e=>void G(e),modalData:O,onClose:()=>N(void 0)}),(0,i.jsx)(ei,{pushChanges:e=>void G(e),modalData:O,onClose:()=>N(void 0)})]})})]})]})}},83478:function(e){e.exports={column:"BlankSlate_column__genEe",root:"BlankSlate_root__CmSqW BlankSlate_column__genEe",fadeIn:"BlankSlate_fadeIn__mAfi5",withBackground:"BlankSlate_withBackground__mLYij",image:"BlankSlate_image__Jn90S BlankSlate_column__genEe",content:"BlankSlate_content__0Yt2d BlankSlate_column__genEe",desc:"BlankSlate_desc___Dl7e",actions:"BlankSlate_actions__OYRj4"}}},function(e){e.O(0,[898,789,123,66,125,34,658,888,774,179],function(){return e(e.s=21985)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[849],{21985:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/changes",function(){return n(22425)}])},72641:function(e,t,n){"use strict";n.d(t,{R$:function(){return o},Qj:function(){return x},T9:function(){return d},nf:function(){return u},u2:function(){return c},_T:function(){return h}});var i=n(52322),s=n(11699),l=n(6277),r=n(83478),a=n.n(r);let o=e=>{let{backgroundImage:t,style:n,...s}=e,r=void 0!==t;return(0,i.jsx)("article",{...s,className:(0,l.W)(a().root,{[a().withBackground]:r}),style:{backgroundImage:r?"url(".concat(t,")"):void 0,...n}})},c=e=>(0,i.jsx)("div",{...e,className:a().image}),d=e=>(0,i.jsx)("div",{...e,className:a().content}),h=e=>(0,i.jsx)(s.bL,{...e,variant:"h3"}),u=e=>(0,i.jsx)(s.bL,{...e,color:"grey11"}),x=e=>(0,i.jsx)("div",{...e,className:a().actions,color:"grey"})},33986:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var i=n(52322),s=n(2784),l=n(75289);let r=(e,t)=>e?"".concat(e,"-").concat(t):"",a=e=>{switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},o=(0,s.forwardRef)((e,t)=>{let{label:n,Icon:s,type:o,form:c,isLoading:d=!1,disabled:h=!1,onClick:u,sx:x={},iconSize:m=16,iconFill:g,variant:p="primary",...j}=e;return(0,i.jsx)(l.zx,{ref:t,sx:{...x,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",...d?{cursor:"wait !important"}:{}},type:o,form:c,disabled:h||d,onClick:d?void 0:u,variant:p,...j,children:d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.$j,{size:m,color:a(p),"data-testid":r(j["data-testid"],"spinner")}),s&&n]}):(0,i.jsxs)(i.Fragment,{children:[s&&(0,i.jsx)(s,{size:m,fill:g,"data-testid":r(j["data-testid"],"icon")}),n]})})})},21151:function(e,t,n){"use strict";var i=n(52322),s=n(75289);t.Z=function(e){let{elems:t,renderElem:n,defineElementKey:l,gridTemplateMinPx:r="320px",gridGap:a="16px",sx:o}=e;return(0,i.jsx)(s.xu,{as:"section",sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(r,", 1fr))"),gridGap:a,pt:2,...o},children:t.map((e,t)=>e?(0,i.jsx)("span",{children:n(e,t)},"".concat(l(e),"-").concat(t+1)):null)})}},22425:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ea}});var i=n(52322),s=n(11699),l=n(97729),r=n.n(l),a=n(5632),o=n(2784),c=n(88932),d=n(65077),h=n(94160),u=n(43388),x=n(72641);function m(e){let{isPostPush:t,documentsListEndpoint:n}=e,l=t?p:g;return(0,i.jsxs)(x.R$,{style:{alignSelf:"center",marginTop:s.t.space[72]},children:[(0,i.jsx)(x.u2,{children:(0,i.jsx)(s.a_,{src:l.img,sizing:"cover"})}),(0,i.jsxs)(x.T9,{children:[(0,i.jsx)(x._T,{children:l.title}),(0,i.jsx)(x.nf,{children:l.description}),t&&(0,i.jsx)(x.Qj,{children:(0,i.jsx)(s.E,{onClick:()=>{h.Xe.track({event:"post-push:empty-state-cta-clicked"}),window.open(n,"_blank")},size:"large",children:"Create content in the Page Builder"})})]})]})}let g={img:"/blank-slate-changes-uptodate.png",title:"Everything is up-to-date",description:"No changes are staged. Saved updates will appear here, ready to be pushed to the Page Builder."},p={img:"/blank-slate-push-success.png",title:"Success! Your changes have been pushed to the Page Builder.",description:"Add content to your website to bring it to life!"},j=(0,o.forwardRef)((e,t)=>(0,i.jsx)(s.E,{...e,ref:t,startIcon:"upload",children:"Push"}));var f=n(98250),v=n(98033),b=n(68968),y=n(13434),k=n(19468),C=n(978),w=n(30613),S=n(58446),_=n(91914),D=n(75289);let T=()=>(0,i.jsx)(D.kC,{sx:{justifyContent:"center",alignItems:"center",flex:1},children:(0,i.jsxs)(D.kC,{sx:{flexDirection:"column",alignItems:"center",transform:"translateY(-50%)"},children:[(0,i.jsx)(_.wQ1,{size:48}),(0,i.jsx)(D.xv,{sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",mb:"8px",mt:"2px",textAlign:"center"},children:"No internet connection"}),(0,i.jsx)(D.xv,{sx:{fontSize:"13px",lineHeight:"24px",textAlign:"center"},children:"Connect to the internet to sync your changes."})]})});var L=n(54597);let B=()=>{let{openLoginModal:e}=(0,L.Z)();return(0,i.jsxs)(s.D,{flexDirection:"column",height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[(0,i.jsx)(s.bL,{variant:"h3",align:"center",children:"It seems like you are logged out"}),(0,i.jsx)(s.bL,{align:"center",children:"Log in to connect to your repository."}),(0,i.jsxs)(s.bL,{align:"center",children:["If that doesn't work, it's possible that Slice Machine is having trouble accessing Prismic's servers."," ",(0,i.jsx)(s.bL,{href:"https://community.prismic.io/",children:"Contact our support team"}),"."]}),(0,i.jsx)(s.E,{onClick:()=>e(),children:"Log in to Prismic"})]})};var E=n(951),I=n(63908),O=n(87446),N=n(51507),F=n(21442);let R=e=>{let{children:t}=e;return(0,i.jsx)(D.kC,{sx:{alignItems:"center",justifyContent:"space-between",mt:"8px",bg:"grey02",borderRadius:4,padding:"12px 16px",width:"100%"},children:t})};var z=n(39097),A=n.n(z),P=n(99195),W=n(59294),H=n(16442);let X=e=>{let{ct:t,status:n,authStatus:s,isOnline:l}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(D.xu,{as:"td",style:{width:"40%"},children:(0,i.jsx)(D.xv,{sx:{fontWeight:500},children:t.label})}),(0,i.jsx)(D.xu,{as:"td",style:{width:"40%"},children:t.id}),(0,i.jsx)(D.xu,{as:"td",style:{width:"20%"},children:(0,i.jsx)(P.O,{authStatus:s,isOnline:l,modelStatus:n,modelType:"CustomType"})})]})},Z=e=>{let{customTypes:t,modelsStatuses:n,authStatus:s,isOnline:l}=e;return(0,i.jsxs)(D.xu,{as:"table","data-legacy-component":!0,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{className:"transparent small",children:[(0,i.jsx)(D.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"Name"}),(0,i.jsx)(D.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"API ID"}),(0,i.jsx)(D.xu,{as:"th",sx:{width:"20%",fontWeight:600},children:"Status"})]})}),(0,i.jsx)("tbody",{children:t.map(e=>(0,H.TG)(e)?(0,i.jsx)(A(),{passHref:!0,href:W.cd[e.local.format].getBuilderPagePathname(e.local.id),legacyBehavior:!0,children:(0,i.jsx)("tr",{tabIndex:0,"data-testid":"custom-type-".concat(e.local.id),children:(0,i.jsx)(X,{ct:e.local,status:n.customTypes[e.local.id],authStatus:s,isOnline:l},e.local.id)})},e.local.id):(0,i.jsx)("tr",{tabIndex:0,className:"disabled","data-testid":"custom-type-".concat(e.remote.id),children:(0,i.jsx)(X,{ct:e.remote,status:n.customTypes[e.remote.id],authStatus:s,isOnline:l},e.remote.id)},e.remote.id))})]})};var G=n(21151),M=n(86652),U=n(56448),Y=n(96317);function Q(){let e=(0,Y.L)("slicemachine-dev-collaboration"),[t,n]=(0,o.useState)(!1),l=null==e?void 0:e.payload;return((0,o.useEffect)(()=>{(null==e?void 0:e.value)==="on"&&void 0!==l&&h.Xe.track({event:"dev-collab:workflow-stub-displayed"})},[e,l]),(null==e?void 0:e.value)!=="on"||void 0===l)?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.D,{alignItems:"flex-start",border:{bottom:!0,left:!0,right:!0,top:!0},borderRadius:6,borderStyle:"dashed",flexDirection:"column",flexShrink:0,gap:8,padding:16,width:320,children:[(0,i.jsxs)(s.D,{flexDirection:"column",gap:2,children:[(0,i.jsx)(s.bL,{variant:"smallBold",children:l.cardTitle}),(0,i.jsx)(s.bL,{color:"grey11",variant:"small",children:l.cardDescription})]}),(0,i.jsx)(s.E,{color:"grey",onClick:()=>{h.Xe.track({event:"dev-collab:set-up-workflow-opened"}),n(!0)},children:l.cardButtonLabel})]}),(0,i.jsxs)(s.ae,{onOpenChange:e=>{e||n(!1)},open:t,size:{height:"auto",width:448},children:[(0,i.jsx)(s.al,{title:l.dialogTitle}),(0,i.jsx)(s.aj,{children:(0,i.jsxs)(s.D,{flexDirection:"column",children:[(0,i.jsx)(s.D,{flexDirection:"column",padding:16,children:(0,i.jsx)(s.bL,{children:l.dialogDescription})}),(0,i.jsxs)(s.ah,{children:[(0,i.jsx)(s.ai,{size:"medium"}),(0,i.jsx)(s.af,{size:"medium",onClick:()=>{h.Xe.track({event:"dev-collab:join-beta-clicked"}),window.open(l.dialogButtonLink,"_blank"),n(!1)},children:l.dialogButtonLabel})]})]})})]})]})}let J=e=>{let{unSyncedCustomTypes:t,unSyncedSlices:n,modelsStatuses:l,authStatus:r,isOnline:a}=e,{modalPayload:c,onOpenModal:d}=(0,F.H)(),{sliceFilterFn:h,defaultVariationSelector:u}=c,x=n.filter(e=>l.slices[e.model.id]!==U.GJ.Deleted);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(s.D,{gap:16,alignItems:"flex-start",children:[(0,i.jsxs)(s.D,{flexDirection:"column",flexGrow:1,children:[t.length>0&&(0,i.jsxs)(s.D,{flexDirection:"column",children:[(0,i.jsx)(R,{children:(0,i.jsxs)(s.D,{children:[(0,i.jsx)(s.bL,{variant:"h5",children:"Types"}),(0,i.jsx)(s.bL,{variant:"h5",sx:{marginLeft:8},children:t.length})]})}),(0,i.jsx)(Z,{customTypes:t,modelsStatuses:l,authStatus:r,isOnline:a})]}),n.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.D,{padding:{bottom:8},children:(0,i.jsxs)(R,{children:[(0,i.jsxs)(s.D,{children:[(0,i.jsx)(s.bL,{variant:"h5",children:"Slices"}),(0,i.jsx)(s.bL,{variant:"h5",sx:{marginLeft:8},children:n.length})]}),(0,i.jsxs)(s.D,{children:[n.some(e=>(0,I.cx)(e)>0&&l.slices[e.model.id]!==U.GJ.Deleted)&&(0,i.jsxs)(s.bL,{color:"amber11",sx:{marginRight:8,alignSelf:"center"},children:[(0,i.jsx)(E.sQg,{size:16,style:{marginRight:"4px",position:"relative",top:"3px"}}),"Missing Screenshots"]}),(0,i.jsx)(s.E,{color:"dark",startIcon:"photoCamera",onClick:()=>d({sliceFilterFn:e=>e}),children:"Update all screenshots"})]})]})}),(0,i.jsx)(G.Z,{gridGap:"32px 16px",elems:n,gridTemplateMinPx:"305px",defineElementKey:e=>e.model.name,renderElem:e=>{let t=l.slices[e.model.id];return(0,i.jsx)(N.b,{action:{type:"status",authStatus:r,isOnline:a,modelStatus:t},isDeleted:t===U.GJ.Deleted,mode:"navigation",onUpdateScreenshot:()=>{d({sliceFilterFn:t=>t.filter(t=>t.model.id===e.model.id)})},slice:e,variant:"solid"})}}),(0,i.jsx)(M.Z,{slices:h(x),defaultVariationSelector:u})]})]}),(0,i.jsx)(O.h,{children:(0,i.jsx)(o.Suspense,{children:(0,i.jsx)(Q,{})})})]})})};var $=n(56580),q=n(33986),K=n(79797),V=n(30527);let ee=e=>{let{isOpen:t,title:n,footer:s,explanations:l,onClose:r}=e;return(0,i.jsx)(K.Z,{placement:"right",open:t,level:null,onClose:r,width:496,children:(0,i.jsx)(V.Z,{radius:"0px",bodySx:{bg:"white",padding:24,flex:1,display:"flex",flexDirection:"column",overflow:"scroll"},footerSx:{p:0},sx:{flexDirection:"column",display:"flex",height:"100%",border:"none"},borderFooter:!0,Header:(0,i.jsxs)(D.kC,{sx:{p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,i.jsx)(D.kC,{sx:{alignItems:"center"},children:(0,i.jsx)(D.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:n})}),(0,i.jsx)(D.x8,{type:"button",onClick:()=>r()})]}),Footer:()=>(0,i.jsx)(D.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center",paddingRight:16,borderTop:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.darkBorders))},backgroundColor:"white",padding:20},children:s}),children:l})})};var et=n(78254);n(98564);let en=e=>{let{ctName:t,numberOfDocuments:n,link:s,isOverLimit:l=!1}=e;return(0,i.jsxs)(D.Zb,{sx:{mb:12},variant:"drawerCard","data-testid":"AssociatedDocumentsCard-".concat(t),children:[(0,i.jsxs)(D.kC,{sx:{flexDirection:"column"},children:[(0,i.jsx)(D.xv,{children:t}),(0,i.jsxs)(D.xv,{sx:{color:"textClear",fontSize:"12px",lineHeight:"16px"},children:[n," documents"]})]}),(0,i.jsx)(D.rU,{href:s,target:"_blank",variant:"cardSmall",sx:{color:l?"danger":"purple08"},children:"View documents"})]})},ei=e=>{let{pushChanges:t,modalData:n,onClose:s}=e,{remoteOnlyCustomTypes:l}=(0,$.v9)(e=>({remoteOnlyCustomTypes:(0,et.Ch)(e).filter(H.yp)}));if((null==n?void 0:n.type)!=="HARD")return null;let r=n.details.customTypes.map(e=>{var t;let n=l.find(t=>(0,H.n5)(t)===e.id);return void 0===n?null:(0,i.jsx)(en,{isOverLimit:!0,ctName:null!==(t=n.remote.label)&&void 0!==t?t:n.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,i.jsx)(ee,{isOpen:"HARD"===n.type,title:"Manual action required",onClose:s,footer:(0,i.jsx)(q.z,{label:"Try again",variant:"primary",onClick:()=>{t(!1)},sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}}),explanations:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(D.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:["Your type",n.details.customTypes.length>1&&"s"," cannot be deleted."]}),(0,i.jsxs)(D.xv,{sx:{mb:24},children:[n.details.customTypes.length>1?"These types have":"This type has"," ","too many associated Documents. Archive and delete these Documents manually and then try deleting the types again."]}),r]})})},es=e=>{let{onToggle:t,isConfirmed:n,sx:s}=e;return(0,i.jsxs)(D.kC,{sx:{borderRadius:6,flexDirection:"column",backgroundColor:"grey03",padding:12,width:"100%",...s},children:[(0,i.jsx)(D.xv,{sx:{fontWeight:"bold",mb:2},children:"Are you sure to proceed?"}),(0,i.jsxs)(D.__,{sx:{mt:"4px",py:1},variant:"large",children:[(0,i.jsx)(D.XZ,{defaultChecked:n,onChange:t,variant:"forms.checkbox.dark"}),"Delete these Documents"]})]})},el=e=>{let{pushChanges:t,modalData:n,onClose:s}=e,[l,r]=(0,o.useState)(!1),{remoteOnlyCustomTypes:a}=(0,$.v9)(e=>({remoteOnlyCustomTypes:(0,et.Ch)(e).filter(H.yp)}));if((null==n?void 0:n.type)!=="SOFT")return null;let c=n.details.customTypes.map(e=>{var t;let n=a.find(t=>(0,H.n5)(t)===e.id);return void 0===n?null:(0,i.jsx)(en,{isOverLimit:!0,ctName:null!==(t=n.remote.label)&&void 0!==t?t:n.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,i.jsx)(ee,{isOpen:"SOFT"===n.type,title:"Confirm deletion",onClose:s,footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(es,{onToggle:()=>{r(!l)},isConfirmed:l,sx:{mb:10}}),(0,i.jsx)(q.z,{label:"Push changes",variant:"primary",onClick:()=>{t(l)},disabled:!l,sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}})]}),explanations:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(D.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:"This action will also delete Documents."}),(0,i.jsxs)(D.xv,{sx:{mb:24},children:[n.details.customTypes.length>1?"These types have":"This type has"," ","associated Documents, which will also be deleted. This might create broken links in your repository."]}),c]})})};var er=n(93671),ea=()=>{let{unSyncedSlices:e,unSyncedCustomTypes:t,changedCustomTypes:n,changedSlices:l,modelsStatuses:x}=(0,y.X)(),g=(0,C.L)(),p=(0,k.n)(),{pushChangesSuccess:_,refreshState:D}=(0,L.Z)(),[E,I]=(0,o.useState)(!1),[O,N]=(0,o.useState)(void 0),{autoSyncStatus:F}=(0,b.g)(),R=(0,a.useRouter)(),[z,A]=(0,o.useState)(!1),[P,W]=(0,o.useState)(!1),{repositoryUrl:H}=(0,w.U)(),{completeStep:X}=(0,f.k)(),Z=e.length+t.length;(0,o.useEffect)(()=>{("synced"===F||"failed"===F||"syncing"===F)&&R.push("/")},[F,R]);let G=async e=>{try{I(!0),N(void 0);let t=await (0,v.t)({confirmDeleteDocuments:e,changedCustomTypes:n,changedSlices:l});if(void 0!==t)N(t);else{let e=await (0,h.y0)();D(e),_(),A(!0),W(!0),X("reviewAndPush")}}catch(e){console.error("Something went wrong when manually pushing your changes",e),c.Am.error("Something went wrong when pushing your changes. Check your terminal logs.")}I(!1)},M=(0,o.useMemo)(()=>g?p===er.t.UNAUTHENTICATED?(0,i.jsx)(B,{}):0===Z?(0,i.jsx)(m,{isPostPush:z,documentsListEndpoint:H}):(0,i.jsx)(J,{unSyncedSlices:e,unSyncedCustomTypes:t,modelsStatuses:x,authStatus:p,isOnline:g}):(0,i.jsx)(T,{}),[g,p,Z,e,t,x,z,H]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r(),{children:(0,i.jsx)("title",{children:"Changes - Slice Machine"})}),(0,i.jsxs)(S.LN,{children:[(0,i.jsxs)(S.wd,{children:[(0,i.jsx)(S.Cx,{children:(0,i.jsx)(u.g,{children:"Changes"})}),(0,i.jsxs)(S.K2,{children:[(0,i.jsx)(j,{disabled:0===Z||!g||p!==er.t.AUTHENTICATED||E,loading:E,onClick:()=>{G(!1)}}),(0,i.jsx)(s.bQ,{anchor:(0,i.jsx)(s.D,{position:"fixed",top:32,right:32,width:322}),open:P,variant:"card",seconds:20,title:"Success! \uD83C\uDF89",subtitle:"Your changes have been pushed.",action:{title:"Create content in the Page Builder",onClick:()=>{h.Xe.track({event:"post-push:toast-cta-clicked"}),window.open(H,"_blank")}},cancel:{onClick:()=>W(!1)},onOpenChange:W})]})]}),(0,i.jsx)(S.RN,{children:(0,i.jsxs)(d.xR,{sx:{display:"flex",flexDirection:"column"},children:[M,(0,i.jsx)(el,{pushChanges:e=>void G(e),modalData:O,onClose:()=>N(void 0)}),(0,i.jsx)(ei,{pushChanges:e=>void G(e),modalData:O,onClose:()=>N(void 0)})]})})]})]})}},83478:function(e){e.exports={column:"BlankSlate_column__genEe",root:"BlankSlate_root__CmSqW BlankSlate_column__genEe",fadeIn:"BlankSlate_fadeIn__mAfi5",withBackground:"BlankSlate_withBackground__mLYij",image:"BlankSlate_image__Jn90S BlankSlate_column__genEe",content:"BlankSlate_content__0Yt2d BlankSlate_column__genEe",desc:"BlankSlate_desc___Dl7e",actions:"BlankSlate_actions__OYRj4"}}},function(e){e.O(0,[898,789,123,66,125,882,593,888,774,179],function(){return e(e.s=21985)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[625],{95759:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/custom-types/[customTypeId]",function(){return t(60802)}])},60802:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return _.H}});var _=t(19489)}},function(n){n.O(0,[898,917,525,461,139,397,66,183,344,256,422,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[625],{95759:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/custom-types/[customTypeId]",function(){return t(60802)}])},60802:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return _.H}});var _=t(19489)}},function(n){n.O(0,[898,917,525,461,139,397,66,183,344,256,422,882,647,630,633,489,888,774,179],function(){return n(n.s=95759)}),_N_E=n.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{61367:function(n,u,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/page-types/[pageTypeId]",function(){return e(89173)}])},89173:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return t.H}});var t=e(19489)}},function(n){n.O(0,[898,917,525,461,139,397,66,183,344,256,422,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{61367:function(n,u,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/page-types/[pageTypeId]",function(){return e(89173)}])},89173:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return t.H}});var t=e(19489)}},function(n){n.O(0,[898,917,525,461,139,397,66,183,344,256,422,882,647,630,633,489,888,774,179],function(){return n(n.s=61367)}),_N_E=n.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[136],{31314:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices/[lib]/[sliceName]/[variation]",function(){return i(82080)}])},50477:function(e,t,i){"use strict";i.d(t,{NG:function(){return s},xU:function(){return a}});var r=i(18566),n=i(2784),o=i(80148);function a(e){let t=(0,n.useCallback)(t=>(0,r.VA)(l,[e],t),[e]);return{customTypes:(0,r.QT)(l,[e]),updateCustomTypes:t}}async function l(e){let{errors:t,models:i}=await o.managerClient.customTypes.readAllCustomTypes(e?{format:e}:void 0);if(t.length>0)throw t;return i.map(e=>{let{model:t}=e;return t})}function s(e){(0,r.gw)(l,[]),(0,r.gw)(l,[e])}},44309:function(e,t,i){"use strict";i.d(t,{Z:function(){return l}});var r=i(5632),n=i(56580),o=i(7723);let a=(e,t,i)=>{var r;let n=null===(r=(0,o.Sd)(e))||void 0===r?void 0:r.find(e=>e.name.replace(/\//g,"--")===t);return null==n?void 0:n.components.find(e=>e.model.name===i)};var l=()=>{let e=(0,r.useRouter)(),{slice:t}=(0,n.v9)(t=>({slice:a(t,e.query.lib,e.query.sliceName)}));if(!t)return{};let i=t.model.variations.find(t=>t.id===e.query.variation);return i?{slice:t,variation:i}:{}}},82080:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return eY}});var r=i(52322),n=i(97729),o=i.n(n),a=i(5632),l=i(74217),s=i(2784),d=i(94160),c=i(68968),u=i(23710),m=i(54597);let h=(0,s.createContext)(void 0);function p(e){let{children:t,initialSlice:i}=e,n=(0,a.useRouter)(),[o,p]=(0,s.useState)(i),{actionQueueStatus:v,setNextAction:x}=(0,u.c)({errorMessage:"Failed to save slice. Check your browser's console for more information."}),{saveSliceSuccess:f}=(0,m.Z)(),g=(0,l.R9)(f),{syncChanges:j}=(0,c.g)(),C=(0,s.useMemo)(()=>{let e=n.query.variation,t=o.model.variations.find(t=>t.id===e);if(t)return t;throw Error("Variation not found")},[o,n]),b=(0,s.useCallback)((e,t)=>{p(e),x(async()=>{let{errors:i}=await (0,d.Ve)(e);if(i.length>0)throw i;let{errors:r,mocks:n}=await (0,d.pL)({libraryID:e.from,sliceID:e.model.id});if(r.length>0)throw r;g({...e,mocks:n}),j(),null==t||t()})},[x,g,j]),y=(0,s.useMemo)(()=>({actionQueueStatus:v,slice:o,setSlice:b,variation:C}),[v,o,b,C]);return(0,r.jsx)(h.Provider,{value:y,children:"function"==typeof t?t(y):t})}function v(){let e=(0,s.useContext)(h);if(!e)throw Error("SliceBuilderProvider not found");return e}var x=i(44309),f=i(11699),g=i(43388),j=i(23094),C=i(18566),b=i(80148);async function y(e){let{errors:t,model:i}=await b.managerClient.customTypes.readCustomType({id:e});if(t.length>0)throw t;return i}var _=i(59294),w=i(87446),I=i(14101);let D=e=>(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.8536 6.85355C18.0488 6.65829 18.0488 6.34171 17.8536 6.14645C17.6583 5.95118 17.3417 5.95118 17.1464 6.14645L12 11.2929L6.85355 6.14645C6.65829 5.95118 6.34171 5.95118 6.14645 6.14645C5.95118 6.34171 5.95118 6.65829 6.14645 6.85355L11.2929 12L6.14645 17.1464C5.95118 17.3417 5.95118 17.6583 6.14645 17.8536C6.34171 18.0488 6.65829 18.0488 6.85355 17.8536L12 12.7071L17.1464 17.8536C17.3417 18.0488 17.6583 18.0488 17.8536 17.8536C18.0488 17.6583 18.0488 17.3417 17.8536 17.1464L12.7071 12L17.8536 6.85355Z",fill:"currentColor"})}),S=e=>(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M9.5 12L6 9.5L9.5 7V9.5V12Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M6 9.5H11C14.3 9.5 17 12.2 17 15.5V17.5M6 9.5L9.5 12V9.5V7L6 9.5Z",stroke:"currentColor",strokeLinecap:"round"})]}),k=()=>{let{source:e}=(0,I.l)(),t=function(e){let t=(0,_.Ag)(e.query);return void 0!==t&&(0,_.ne)(e.asPath,t)?t:void 0}(e);return void 0!==t?(0,r.jsx)(w.h,{children:(0,r.jsx)(s.Suspense,{children:(0,r.jsx)(f.D,{bottom:32,justifyContent:"center",position:"fixed",right:0,width:"100vw",children:(0,r.jsx)(T,{sourceCustomTypeId:t})})})}):null},T=e=>{let{sourceCustomTypeId:t}=e,i=(0,C.QT)(y,[t]),[n,o]=(0,s.useState)(!0),l=(0,a.useRouter)();if(void 0===i||!n)return null;{let{format:e,id:t}=i,n=_.cd[e].getBuilderPagePathname(t);return(0,r.jsxs)(f.F,{density:"compact",color:"dark",children:[(0,r.jsxs)(f.E,{onClick:()=>{l.push(n)},renderStartIcon:()=>(0,r.jsx)(S,{}),children:["Return to ",i.label]}),(0,r.jsx)(f.E,{onClick:()=>{o(!1)},renderStartIcon:()=>(0,r.jsx)(D,{})})]})}},R=()=>(0,r.jsx)(f.E,{asChild:!0,invisible:!0,color:"grey",endIcon:"openInNew",sx:{alignSelf:"center"},onClick:()=>{d.Xe.track({event:"mcp:promo-link-clicked",source:"slice_editor",target:"docs"})},children:(0,r.jsx)("a",{href:"https://prismic.io/docs/ai#code-with-prismics-mcp-server",target:"_blank",children:"Boost your workflow in Cursor with Prismic MCP"})});var H=i(58446),F=i(56580),E=i(33710),N=i(36887),A=i(6277),L=i(40484),O=i(10704),V=i.n(O);let z=e=>{let{align:t,alignOffset:i,arrowSize:n=12,children:o,collisionPadding:a=parseFloat(f.t.space[16]),side:l,sideOffset:d=4,trigger:c,...u}=e,{arrowWidth:m,arrowHeight:h}=(0,s.useMemo)(()=>{if(void 0===n)return{arrowWidth:10,arrowHeight:5};let e=Math.SQRT2*n;return{arrowWidth:e,arrowHeight:e/2}},[n]);return(0,r.jsxs)(L.fC,{...u,children:[(0,r.jsx)(L.xz,{asChild:!0,children:c}),(0,r.jsx)(L.h_,{children:(0,r.jsxs)(L.VY,{align:t,alignOffset:i,className:V().container,collisionPadding:a,side:l,sideOffset:d,children:[o,(0,r.jsx)(L.Eh,{className:V().arrow,height:h,width:m})]})})]})};var M=i(56099),P=i.n(M);let Z=e=>{let{align:t,alignOffset:i,arrowSize:n,children:o,collisionPadding:a,onClose:l,open:d,openDelay:c=5e3,side:u,sideOffset:m,trigger:h}=e,[p,v]=(0,s.useState)(!1),x=(0,s.useCallback)(()=>{l&&l(),v(!1)},[l,v]);return!function(e){let{condition:t,action:i,delay:r}=e,[n,o]=(0,s.useState)(null);(0,s.useEffect)(()=>(t&&null===n&&o(setTimeout(i,r)),()=>{null!==n&&(clearTimeout(n),o(null))}),[t,i,r,n,o])}({condition:!0===d,action:(0,s.useCallback)(()=>v(e=>!1===e),[v]),delay:c}),(0,r.jsx)(z,{align:t,alignOffset:i,arrowSize:n,collisionPadding:a,onOpenChange:e=>{!0===e&&!0===d&&v(e)},open:p,openDelay:c,side:u,sideOffset:m,trigger:h,children:(0,r.jsx)(B,{handleClose:x,children:o})})},B=e=>{let{handleClose:t,children:i}=e;return(0,r.jsx)(W.Provider,{value:{handleClose:t},children:(0,r.jsx)("div",{className:P().root,children:i})})},W=(0,s.createContext)({handleClose:()=>void 0});function q(){return(0,s.useContext)(W)}let X=e=>{let{children:t}=e,{handleClose:i}=q();return(0,r.jsxs)("div",{className:P().title,children:[(0,r.jsx)("span",{children:t}),(0,r.jsx)("button",{className:P().titleCloseIcon,onClick:i,children:(0,r.jsx)(D,{})})]})},G=e=>{let{component:t,...i}=e,n="image"===t?"img":N.nk;return(0,r.jsx)("div",{className:P().mediaContainer,children:(0,s.createElement)(n,{...i,className:(0,A.W)(P().media,i.className)})})},U=e=>{let{children:t}=e;return(0,r.jsx)("div",{className:P().description,children:t})},Y=e=>{let{children:t}=e,{handleClose:i}=q();return(0,r.jsx)("div",{className:P().closeButtonContainer,children:(0,r.jsx)(f.E,{sx:{width:"100%"},onClick:i,children:t})})};var K=i(39180),Q=i(7974),J=i(79384);let $=e=>{let{children:t,open:i,onClose:n}=e;return(0,r.jsxs)(Z,{open:i,trigger:t,onClose:n,children:[(0,r.jsx)(X,{children:"Simulate your slices"}),(0,r.jsx)(G,{component:"video",cloudName:"dmtf1daqp",loop:!1,autoPlay:!1,publicId:Q.Sn,poster:"/simulator-video-thumbnail.png",controls:!0,onPlay:()=>{d.Xe.track({event:"open-video-tutorials",video:Q.Sn})}}),(0,r.jsx)(U,{children:"Minimize context-switching by previewing your Slice components in the simulator."}),(0,r.jsx)(Y,{children:"Got it"})]})};var ee=e=>{let{disabled:t}=e,i=(0,a.useRouter)(),n=(0,s.useRef)(null),{setSeenSimulatorToolTip:o}=(0,m.Z)(),{hasSeenSimulatorTooltip:l}=(0,F.v9)(e=>({hasSeenSimulatorTooltip:(0,J.bv)(e)}));(0,s.useEffect)(()=>{let e=n.current;e&&!l&&setTimeout(()=>E.Z.show(e),5e3)},[l]);let d=()=>{if(o(),n.current){let{current:e}=n;E.Z.hide(e)}};return(0,r.jsx)("span",{"data-tip":!0,"data-tip-disable":!1,"data-for":"simulator-button-tooltip",ref:n,children:(0,r.jsx)($,{open:!l,onClose:d,children:(0,r.jsx)(f.E,{"data-tip":!0,"data-testid":"simulator-open-button",onClick:()=>{d(),window.open("".concat(i.asPath,"/simulator"),Q.pq)},disabled:t,renderStartIcon:()=>(0,r.jsx)(K.z,{color:f.t.color.grey1,height:"24px",style:{transform:"scale(calc(4 / 3))"},width:"24px"}),children:"Simulate"})})})},et=i(88866),ei=i(28316),er=i(88932),en=i(35289),eo=i(63908),ea=i(34166),el=i(3285),es=i(40141),ed=i(49219),ec=i(26109),eu=i(45440),em=i(16086),eh=i(358),ep=i(5495),ev=i(39302);let ex=[eu.C.Image,eu.C.Text,eu.C.StructuredText,eu.C.Link,eu.C.Select,eu.C.Boolean,eu.C.Number,eu.C.Color,eu.C.Date,eu.C.Table,eu.C.Embed,eu.C.Timestamp,eu.C.GeoPoint,eu.C.ContentRelationship,eu.C.LinkToMedia];var ef=()=>{let{slice:e,setSlice:t,variation:i}=v(),[n,o]=(0,s.useState)(!1),a=[eu.C.Group,...ex],l=!!(i.items&&Object.keys(i.items).length>0),d=r=>n=>{if(r===ec.Rt.Items&&i.items&&Object.keys(i.items).length<=1){o(!0);return}t((0,eo.AK)({slice:e,variationId:i.id,widgetArea:r,fieldId:n}))},c=(r,n)=>{let{apiId:o,newKey:a,value:l,inGroupFieldAction:s}=n;t((0,eo.L4)({slice:e,variationId:i.id,widgetArea:r,previousFieldId:o,newFieldId:a,newField:l}),()=>{"add"===s&&er.Am.success("Field added")}),s||(0,ev.Z)({previousId:o,id:a,field:l})},u=(r,n)=>{let{apiId:o,value:l}=n,{type:s}=l,d=a.find(e=>e.CUSTOM_NAME===s||e.TYPE_NAME===s);if(!d)throw Error("Unsupported Field Type: ".concat(s));try{d.schema.validateSync(l,{stripUnknown:!1})}catch(e){throw Error('Model is invalid for widget "'.concat(l.type,'".'))}t((0,eo.xS)({slice:e,variationId:i.id,widgetArea:r,newFieldId:o,newField:l.type===et.GroupFieldType?ed.Fl.fromSM(l):l}),()=>{er.Am.success("".concat("Group"===s?"Group":"Field"," added"))}),(0,ep.V)({id:o,field:l})},m=e=>t=>""===t.apiId?u(e,{...t,apiId:t.newKey}):c(e,t),h=r=>n=>{if((0,em.uS)(n))return;let{source:o,destination:a}=n;if(!a)return;let l=(0,eo.gR)({slice:e,variationId:i.id,widgetArea:r,sourceIndex:o.index,destinationIndex:a.index});(0,ei.flushSync)(()=>t(l))};return(0,r.jsxs)(f.D,{flexDirection:"column",gap:18,children:[(0,r.jsxs)(en.aV,{children:[(0,r.jsx)(es.Z,{zoneType:"slice",zoneTypeFormat:void 0,tabId:void 0,title:"Fields",dataTip:" The non-repeatable zone\n is for fields<br/> that should appear once, like a<br/>\n section title.\n",fields:i.primary,EditModal:el.Z,widgetsArray:a,onDeleteItem:d(ec.Rt.Primary),onSave:m(ec.Rt.Primary),onDragEnd:h(ec.Rt.Primary),poolOfFieldsToCheck:i.primary||[],renderHintBase:e=>{let{item:t}=e;return"slice.primary".concat((0,eh.Ti)(t.key))},renderFieldAccessor:e=>"slice.primary".concat((0,eh.Ti)(e)),testId:"static-zone-content",isRepeatableCustomType:void 0,emptyStateHeading:void 0}),l?(0,r.jsx)(es.Z,{zoneType:"slice",zoneTypeFormat:void 0,tabId:void 0,isRepeatable:!0,title:"Repeatable Zone",dataTip:"The repeatable zone is for a group<br/>\n of fields that you want to be able to repeat an<br/>\n indeterminate number of times, like FAQs",widgetsArray:ex,fields:i.items,EditModal:el.Z,onDeleteItem:d(ec.Rt.Items),onSave:m(ec.Rt.Items),onDragEnd:h(ec.Rt.Items),poolOfFieldsToCheck:i.items||[],renderHintBase:e=>{let{item:t}=e;return"item".concat((0,eh.Ti)(t.key))},renderFieldAccessor:e=>"slice.items[i]".concat((0,eh.Ti)(e)),testId:"slice-repeatable-zone",isRepeatableCustomType:void 0,emptyStateHeading:"No fields"}):null,(0,r.jsxs)(f.ae,{size:"small",open:n,onOpenChange:e=>o(e),children:[(0,r.jsx)(f.al,{icon:"delete",title:"Delete field"}),(0,r.jsxs)(f.aj,{children:[(0,r.jsx)(f.D,{padding:24,gap:12,flexDirection:"column",children:e.model.variations.length>1?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("strong",{children:["This action will permanently remove the repeatable zone from the ",e.model.name," slice ",i.name," variation."]}),(0,r.jsx)("div",{children:"Other variations will be left untouched. To reimplement repeatable fields later, use a group field instead of the repeatable zone."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("strong",{children:["This action will permanently remove the repeatable zone from the ",e.model.name,"."]}),(0,r.jsx)("div",{children:"To reimplement repeatable fields later, use a group field instead of the repeatable zone."})]})}),(0,r.jsxs)(f.ah,{children:[(0,r.jsx)(f.ai,{}),(0,r.jsx)(f.af,{color:"tomato",onClick:()=>{t((0,eo.Oh)({slice:e,variationId:i.id})),o(!1)},children:"Delete"})]})]})]})]}),(0,r.jsx)(ea.rT,{type:"model",library:e.from,sliceId:e.model.id,variationId:i.id})]})},eg=i(34887),ej=i.n(eg);let eC=e=>{let{variant:t="dashed",color:i="currentColor",className:n}=e;return(0,r.jsx)("hr",{className:(0,A.W)(ej()["variant-".concat(t)],n),style:{color:f.t.color[i]}})};var eb=i(51507),ey=i(27763),e_=i(21442);async function ew(e){try{let{errors:t}=await (0,d.Ve)(e.component);if(t.length>0)throw t;let{errors:i}=await (0,d.Xi)({libraryID:e.component.from,sliceID:e.component.model.id,variationID:e.variation.id});if(i.length>0)throw i;(0,ea.tB)({type:"model",library:e.component.from,sliceId:e.component.model.id,variationId:e.variation.id});let{slice:r,errors:n}=await (0,d.X$)(e.component.from,e.component.model.id);if(n.length>0)throw n;if(!r)throw Error("Could not read variation `".concat(e.variation.name,"`"));let{mocks:o}=await (0,d.pL)({libraryID:e.component.from,sliceID:e.component.model.id}),a=ey.Y.getBuilderPagePathname({libraryName:e.component.href,sliceName:r.name,variationId:r.variations[0].id});await e.router.replace(a);let l={...e.component,model:r,mocks:o};return e.saveSliceSuccess(l),l}catch(i){let t="Could not delete variation `".concat(e.variation.name,"`");throw console.error(t,i),er.Am.error(t),i}}let eI=e=>{let{isOpen:t,onClose:i,slice:n,variation:o}=e,l=(0,a.useRouter)(),[d,c]=(0,s.useState)(!1),{saveSliceSuccess:u}=(0,m.Z)(),{setSlice:h}=v();return(0,r.jsxs)(f.ae,{open:t,onOpenChange:e=>!e&&i(),size:{width:448,height:"auto"},children:[(0,r.jsx)(f.al,{icon:"delete",title:"Delete variation"}),(0,r.jsx)(f.aj,{children:(0,r.jsxs)(f.D,{flexDirection:"column",children:[(0,r.jsxs)(f.bL,{color:"grey11",sx:{marginBlock:16,marginInline:16},children:["This action will remove the variation from the slice model and delete associated files. When you push your changes, the variation will disappear from your repository. This update will"," ",(0,r.jsx)(eD,{children:"not"})," affect your documents until you ",(0,r.jsx)(eD,{children:"edit"})," ","them manually."]}),(0,r.jsxs)(f.ah,{children:[(0,r.jsx)(f.ai,{size:"medium"}),(0,r.jsx)(f.af,{size:"medium",color:"tomato",onClick:()=>{o&&(async()=>{c(!0);try{let e=await ew({component:n,router:l,saveSliceSuccess:u,variation:o});h(e)}catch(e){}c(!1),i()})()},loading:d,children:"Delete"})]})]})})]})},eD=e=>(0,r.jsx)(f.bL,{...e,color:"inherit",component:"span",variant:"bold"});var eS=i(30195);async function ek(e){try{let{errors:t}=await (0,d.Ve)(e.component);if(t.length>0)throw t;let{errors:i}=await (0,d.eH)(e.component,{...e.variation,name:e.variationName});if(i.length>0)throw i;let{slice:r,errors:n}=await (0,d.X$)(e.component.from,e.component.model.id);if(n.length>0)throw n;if(!r)throw Error("Could not read variation `".concat(e.variation.name,"`"));let{mocks:o}=await (0,d.pL)({libraryID:e.component.from,sliceID:e.component.model.id}),a={...e.component,model:r,mocks:o};return e.saveSliceSuccess(a),a}catch(i){let t="Could not rename variation `".concat(e.variation.name,"`");throw console.error(t,i),er.Am.error(t),i}}let eT=e=>{let{isOpen:t,onClose:i,slice:n,variation:o}=e,[a,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(""),[h,p]=(0,s.useState)(),{setSlice:x}=v(),{saveSliceSuccess:g}=(0,m.Z)();return(0,l.pQ)(t,()=>{if(t&&(null==o?void 0:o.name)!==c){var e;u(null!==(e=null==o?void 0:o.name)&&void 0!==e?e:""),p(void 0)}}),(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(f.ae,{open:t,onOpenChange:e=>!e&&i(),size:{width:448,height:"auto"},children:[(0,r.jsx)(f.al,{icon:"edit",title:"Rename variation"}),(0,r.jsx)(f.aj,{children:(0,r.jsxs)(f.aJ,{onSubmit:function(){if(!h&&o){d(!0);try{ek({component:n,saveSliceSuccess:g,variation:o,variationName:c.trim()}).then(e=>{x(e)})}catch(e){}d(!1),i()}},children:[(0,r.jsxs)(f.D,{flexDirection:"column",gap:8,padding:16,children:[(0,r.jsx)(f.bL,{variant:"normal",color:"grey11",children:"This action will rename the variation in the slice model. When you push your changes, the variation will be renamed in your repository."}),(0,r.jsx)(f.D,{flexDirection:"column",gap:4,children:(0,r.jsx)(f.aM,{type:"text",label:"Variation name *",placeholder:"Variation name",error:h,value:c,onValueChange:function(e){u(e),p(function(e){let t=eR.safeParse(e,{errorMap:eH});if(t.error)return t.error.errors[0].message}(e))}})})]}),(0,r.jsxs)(f.ah,{children:[(0,r.jsx)(f.ai,{size:"medium"}),(0,r.jsx)(f.af,{type:"submit",size:"medium",loading:a,disabled:!!h,children:"Rename"})]})]})})]})})},eR=eS.z.string().min(1),eH=e=>e.code===eS.z.ZodIssueCode.too_small?{message:"This field is required"}:{message:"Invalid value"};var eF=i(68105),eE=i(63397),eN=i(96009),eA=i.n(eN),eL=i(36131),eO=i(75289),eV=i(30527);function ez(e){let{children:t}=e,i=(0,eV.W)();return(0,r.jsx)(eO.kC,{sx:{p:3,pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:i,borderTopRightRadius:i,borderBottom:e=>{var t;return"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.borders)}},children:t})}var eM=e=>{let{children:t,FooterContent:i,HeaderContent:n,close:o,sx:a={}}=e;return(0,r.jsx)(eV.Z,{borderFooter:!0,footerSx:{p:0},bodySx:{pt:2,pb:4,px:4},sx:{border:"none",...a},Header:(0,r.jsxs)(ez,{children:[n,o?(0,r.jsx)(eO.x8,{onClick:o,type:"button"}):null]}),Footer:i?(0,r.jsxs)(eO.kC,{sx:{alignItems:"space-between",bg:"headSection",p:3},children:[(0,r.jsx)(eO.xu,{sx:{ml:"auto"}}),i]}):null,children:t})},eP=i(55862);let eZ=e=>{let{msg:t}=e;return(0,r.jsx)(eO.xv,{as:"span",sx:{fontSize:12,color:"error",mt:"5px",ml:2},children:t||"Error!"})};var eB=e=>{let{isOpen:t,onClose:i,onSubmit:n,initialVariation:o,variations:a}=e,[l,d]=(0,s.useState)({}),[c,u]=(0,s.useState)(""),[m,h]=(0,s.useState)(!0),[p,v]=(0,s.useState)(""),[x,g]=(0,s.useState)({value:o.id,label:o.name}),[j,C]=(0,s.useState)(!1);function b(){y(),i()}function y(){u(""),v(""),d({}),h(!0),g({value:o.id,label:o.name})}async function _(){let e=function(e){let{id:t,name:i,origin:r}=e,n=t&&t.length?null:{id:"Required!"},o=a.find(e=>e.id===t)?{id:"This id already exists!"}:null,l=i&&i.length?null:{name:"Required!"},s=r.value.length&&a.find(e=>e.id===r.value)?null:{id:"You must select an existing variation!"},d=t&&t.length&&!/^[A-Za-z0-9]+([A-Za-z0-9]+)*$/.exec(t)&&{id:"No special characters allowed"};return{...n,...o,...l,...s,...d}}({id:c,name:p,origin:x});if(Object.keys(e).length)d(e);else{let e=a.find(e=>e.id===x.value);e&&(C(!0),await n(c,p,e),C(!1),b())}}return(0,s.useEffect)(()=>{y()},[o,t]),(0,r.jsx)(eP.Z,{isOpen:t,shouldCloseOnOverlayClick:!0,onRequestClose:()=>b(),contentLabel:"Widget Form Modal",style:{content:{maxWidth:"700px"}},children:(0,r.jsx)(eE.J9,{initialValues:{id:c,name:p,origin:x},onSubmit:_,children:(0,r.jsx)(eE.l0,{id:"variation-add",onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),_())},children:(0,r.jsx)(f.D,{children:(0,r.jsxs)(eM,{sx:{textAlign:"left"},HeaderContent:(0,r.jsx)(eO.xv,{as:"h2",children:"Add new Variation"}),FooterContent:(0,r.jsxs)(f.D,{gap:16,alignItems:"center",children:[(0,r.jsx)(f.E,{onClick:b,color:"grey",children:"Cancel"}),(0,r.jsx)(f.E,{type:"submit",loading:j,children:"Submit"})]}),close:b,children:[(0,r.jsxs)(f.D,{flexDirection:"column",padding:{block:16},children:[(0,r.jsxs)(eO.__,{htmlFor:"name",sx:{mb:1},children:["Variation name*",l.name?(0,r.jsx)(eZ,{msg:l.name}):""]}),(0,r.jsx)(eE.gN,{autoComplete:"off",id:"name",name:"name",placeholder:"e.g. Grid - With Icon",as:eO.II,maxLength:30,value:p,onChange:e=>{var t;v(t=e.currentTarget.value),m&&u(eA()(t))}}),(0,r.jsx)(eO.xv,{children:"It will appear here in Slice Machine, and in the page editor in Prismic"})]}),(0,r.jsxs)(f.D,{flexDirection:"column",padding:{bottom:16},children:[(0,r.jsxs)(eO.__,{htmlFor:"id",sx:{mb:1},children:["Variation ID*",l.id?(0,r.jsx)(eZ,{msg:l.id}):""]}),(0,r.jsx)(eE.gN,{autoComplete:"off",id:"id",name:"id",placeholder:"e.g. gridWithIcon",as:eO.II,maxLength:30,value:c,onChange:e=>{var t;return t=e.currentTarget.value,void(h(!1),u(eA()(t)))}}),(0,r.jsx)(eO.xv,{children:"It's generated automatically based on the variation name and will appear in the API responses."})]}),(0,r.jsxs)(f.D,{flexDirection:"column",padding:{bottom:8},children:[(0,r.jsx)(eO.__,{htmlFor:"origin",sx:{mb:1},children:"Duplicate from"}),(0,r.jsx)(eL.ZP,{name:"origin",options:a.map(e=>({value:e.id,label:e.name})),onChange:e=>{e&&g(e)},defaultValue:x,maxMenuHeight:150,theme:e=>({...e,colors:{...e.colors,text:"text",primary:"background"}})})]})]})})})})})},eW=i(20136),eq=i.n(eW);let eX=e=>{let{horizontalScroll:t=!1}=e,{slice:i,variation:n,setSlice:o}=v(),[l,c]=(0,s.useState)(),u=(0,e_.H)(),{sliceFilterFn:h,defaultVariationSelector:p,onUploadSuccess:x}=u.modalPayload,g=(0,a.useRouter)(),{saveSliceSuccess:j}=(0,m.Z)(),C=i.model.variations.length;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.D,{flexDirection:"column",gap:16,children:t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eC,{variant:"edgeFaded",color:"grey6"}),(0,r.jsxs)(f.D,{justifyContent:"space-between",children:[(0,r.jsxs)(f.bL,{color:"grey11",children:[C," variation",1!==C&&"s"]}),(0,r.jsx)(f.E,{onClick:()=>{c({type:"ADD_VARIATION"})},startIcon:"add",color:"grey",children:"Add a variation"})]}),(0,r.jsx)("div",{className:eq().hideScrollbar,style:{height:"240px",position:"relative",marginRight:"-32px",overflowX:"scroll",scrollSnapType:"x mandatory"},children:(0,r.jsx)("div",{style:{position:"absolute",paddingRight:"32px"},children:(0,r.jsx)(f.D,{flexDirection:"row",gap:16,children:(0,r.jsx)(eG,{screenshotChangesModal:u,setDialog:c,width:320})})})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eG,{screenshotChangesModal:u,setDialog:c}),(0,r.jsx)("div",{style:{bottom:f.t.space[0],marginBottom:"-".concat(f.t.space[16]),position:"sticky"},children:(0,r.jsxs)(f.D,{backgroundColor:"grey2",flexDirection:"column",padding:{bottom:40,inline:24},children:[(0,r.jsx)(f.aS,{sx:{left:0,position:"absolute",right:0}}),(0,r.jsx)(f.E,{color:"grey",onClick:()=>{c({type:"ADD_VARIATION"})},startIcon:"add",sx:{position:"relative"},children:"Add a variation"})]})})]})}),(0,r.jsx)(eF.Z,{slices:h([i]),defaultVariationSelector:p,onUploadSuccess:x}),(0,r.jsx)(eT,{isOpen:(null==l?void 0:l.type)==="RENAME_VARIATION",onClose:()=>{c(void 0)},slice:i,variation:null==l?void 0:l.variation}),(0,r.jsx)(eI,{isOpen:(null==l?void 0:l.type)==="DELETE_VARIATION",onClose:()=>{c(void 0)},slice:i,variation:null==l?void 0:l.variation}),(0,r.jsx)(eB,{initialVariation:n,isOpen:(null==l?void 0:l.type)==="ADD_VARIATION",onClose:()=>{c(void 0)},onSubmit:async(e,t,r)=>{try{let{slice:n,variation:a}=(0,eo.Kp)({slice:i,id:e,name:t,copiedVariation:r});await (0,d.Ve)(n),j(n),o(n);let l=ey.Y.getBuilderPagePathname({libraryName:n.href,sliceName:n.model.name,variationId:a.id});g.replace(l)}catch(i){let e="Could not add variation `".concat(t,"`");console.error(e,i),er.Am.error(e)}},variations:i.model.variations})]})},eG=e=>{let{screenshotChangesModal:t,setDialog:i,width:n}=e,{slice:o,variation:a,setSlice:l}=v(),s={scrollSnapAlign:"start"};return(0,r.jsx)(r.Fragment,{children:o.model.variations.map(e=>(0,r.jsx)("div",{style:void 0!==n?{...s,width:n}:s,children:(0,r.jsx)(eb.b,{action:{type:"menu",onRename:()=>{i({type:"RENAME_VARIATION",variation:e})},onRemove:()=>{i({type:"DELETE_VARIATION",variation:e})},removeDisabled:o.model.variations.length<=1},mode:"navigation",onUpdateScreenshot:()=>{t.onOpenModal({sliceFilterFn:e=>e,defaultVariationSelector:{sliceID:o.model.id,variationID:e.id},onUploadSuccess:e=>{l(e)}})},replace:!0,selected:e.id===a.id,slice:o,variant:"outlined",variationId:e.id},e.id)},e.id))})};var eU=()=>{let{slice:e,actionQueueStatus:t}=v(),i=(0,f.cj)({max:"large"});return(0,r.jsxs)(H.LN,{children:[(0,r.jsxs)(H.wd,{children:[(0,r.jsx)(H.Xq,{url:"/slices"}),(0,r.jsxs)(H.Cx,{children:[(0,r.jsx)(g.g,{children:"Slices"}),(0,r.jsx)(g.g,{active:!0,children:e.model.name})]}),(0,r.jsxs)(H.K2,{children:[(0,r.jsx)(R,{}),(0,r.jsx)(j.X,{status:t}),(0,r.jsx)(ee,{disabled:"done"!==t})]})]}),(0,r.jsxs)(H.RN,{children:[(0,r.jsxs)(f.D,{display:"grid",alignItems:"flex-start",gap:16,...i?{gridTemplateRows:"304px 1fr"}:{gridTemplateColumns:"320px 1fr"},children:[(0,r.jsx)(eX,{horizontalScroll:i}),(0,r.jsx)(ef,{})]}),(0,r.jsx)(k,{})]})]})};function eY(){let e=(0,a.useRouter)(),{slice:t,variation:i}=(0,x.Z)();return void 0===t||void 0===i?(e.replace("/"),null):(0,r.jsx)(p,{initialSlice:t,children:e=>{let{slice:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o(),{children:(0,r.jsxs)("title",{children:[t.model.name," - Slice Machine"]})}),(0,r.jsx)(eU,{})]})}})}},10704:function(e){e.exports={reset:"BaseHoverCard_reset__HckHR",container:"BaseHoverCard_container__IZMCG BaseHoverCard_reset__HckHR",arrow:"BaseHoverCard_arrow__gvcjD BaseHoverCard_reset__HckHR"}},34887:function(e){e.exports={base:"Divider_base__4eT6E","variant-dashed":"Divider_variant-dashed__4Lvrj Divider_base__4eT6E","variant-edgeFaded":"Divider_variant-edgeFaded__049V2 Divider_base__4eT6E"}},56099:function(e){e.exports={block:"HoverCard_block__Fubs4",blockWithDisplayRevert:"HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4",root:"HoverCard_root__OaRBr HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4",title:"HoverCard_title__dO_Y9 HoverCard_block__Fubs4",titleCloseIcon:"HoverCard_titleCloseIcon__DlZJS HoverCard_block__Fubs4",mediaContainer:"HoverCard_mediaContainer__4Lt3z HoverCard_block__Fubs4",media:"HoverCard_media__U7jSc HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4",description:"HoverCard_description__HZ9_z HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4",closeButtonContainer:"HoverCard_closeButtonContainer__7JiLA HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4"}},20136:function(e){e.exports={hideScrollbar:"VariationsList_hideScrollbar__cHCIS"}}},function(e){e.O(0,[898,789,917,525,461,139,797,397,66,183,344,256,444,484,34,630,658,888,774,179],function(){return e(e.s=31314)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[136],{31314:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices/[lib]/[sliceName]/[variation]",function(){return i(82080)}])},50477:function(e,t,i){"use strict";i.d(t,{NG:function(){return s},xU:function(){return a}});var r=i(18566),n=i(2784),o=i(80148);function a(e){let t=(0,n.useCallback)(t=>(0,r.VA)(l,[e],t),[e]);return{customTypes:(0,r.QT)(l,[e]),updateCustomTypes:t}}async function l(e){let{errors:t,models:i}=await o.managerClient.customTypes.readAllCustomTypes(e?{format:e}:void 0);if(t.length>0)throw t;return i.map(e=>{let{model:t}=e;return t})}function s(e){(0,r.gw)(l,[]),(0,r.gw)(l,[e])}},44309:function(e,t,i){"use strict";i.d(t,{Z:function(){return l}});var r=i(5632),n=i(56580),o=i(7723);let a=(e,t,i)=>{var r;let n=null===(r=(0,o.Sd)(e))||void 0===r?void 0:r.find(e=>e.name.replace(/\//g,"--")===t);return null==n?void 0:n.components.find(e=>e.model.name===i)};var l=()=>{let e=(0,r.useRouter)(),{slice:t}=(0,n.v9)(t=>({slice:a(t,e.query.lib,e.query.sliceName)}));if(!t)return{};let i=t.model.variations.find(t=>t.id===e.query.variation);return i?{slice:t,variation:i}:{}}},82080:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return eY}});var r=i(52322),n=i(97729),o=i.n(n),a=i(5632),l=i(74217),s=i(2784),d=i(94160),c=i(68968),u=i(23710),m=i(54597);let h=(0,s.createContext)(void 0);function p(e){let{children:t,initialSlice:i}=e,n=(0,a.useRouter)(),[o,p]=(0,s.useState)(i),{actionQueueStatus:v,setNextAction:x}=(0,u.c)({errorMessage:"Failed to save slice. Check your browser's console for more information."}),{saveSliceSuccess:f}=(0,m.Z)(),g=(0,l.R9)(f),{syncChanges:j}=(0,c.g)(),C=(0,s.useMemo)(()=>{let e=n.query.variation,t=o.model.variations.find(t=>t.id===e);if(t)return t;throw Error("Variation not found")},[o,n]),b=(0,s.useCallback)((e,t)=>{p(e),x(async()=>{let{errors:i}=await (0,d.Ve)(e);if(i.length>0)throw i;let{errors:r,mocks:n}=await (0,d.pL)({libraryID:e.from,sliceID:e.model.id});if(r.length>0)throw r;g({...e,mocks:n}),j(),null==t||t()})},[x,g,j]),y=(0,s.useMemo)(()=>({actionQueueStatus:v,slice:o,setSlice:b,variation:C}),[v,o,b,C]);return(0,r.jsx)(h.Provider,{value:y,children:"function"==typeof t?t(y):t})}function v(){let e=(0,s.useContext)(h);if(!e)throw Error("SliceBuilderProvider not found");return e}var x=i(44309),f=i(11699),g=i(43388),j=i(23094),C=i(18566),b=i(80148);async function y(e){let{errors:t,model:i}=await b.managerClient.customTypes.readCustomType({id:e});if(t.length>0)throw t;return i}var _=i(59294),w=i(87446),I=i(14101);let D=e=>(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.8536 6.85355C18.0488 6.65829 18.0488 6.34171 17.8536 6.14645C17.6583 5.95118 17.3417 5.95118 17.1464 6.14645L12 11.2929L6.85355 6.14645C6.65829 5.95118 6.34171 5.95118 6.14645 6.14645C5.95118 6.34171 5.95118 6.65829 6.14645 6.85355L11.2929 12L6.14645 17.1464C5.95118 17.3417 5.95118 17.6583 6.14645 17.8536C6.34171 18.0488 6.65829 18.0488 6.85355 17.8536L12 12.7071L17.1464 17.8536C17.3417 18.0488 17.6583 18.0488 17.8536 17.8536C18.0488 17.6583 18.0488 17.3417 17.8536 17.1464L12.7071 12L17.8536 6.85355Z",fill:"currentColor"})}),S=e=>(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M9.5 12L6 9.5L9.5 7V9.5V12Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M6 9.5H11C14.3 9.5 17 12.2 17 15.5V17.5M6 9.5L9.5 12V9.5V7L6 9.5Z",stroke:"currentColor",strokeLinecap:"round"})]}),k=()=>{let{source:e}=(0,I.l)(),t=function(e){let t=(0,_.Ag)(e.query);return void 0!==t&&(0,_.ne)(e.asPath,t)?t:void 0}(e);return void 0!==t?(0,r.jsx)(w.h,{children:(0,r.jsx)(s.Suspense,{children:(0,r.jsx)(f.D,{bottom:32,justifyContent:"center",position:"fixed",right:0,width:"100vw",children:(0,r.jsx)(T,{sourceCustomTypeId:t})})})}):null},T=e=>{let{sourceCustomTypeId:t}=e,i=(0,C.QT)(y,[t]),[n,o]=(0,s.useState)(!0),l=(0,a.useRouter)();if(void 0===i||!n)return null;{let{format:e,id:t}=i,n=_.cd[e].getBuilderPagePathname(t);return(0,r.jsxs)(f.F,{density:"compact",color:"dark",children:[(0,r.jsxs)(f.E,{onClick:()=>{l.push(n)},renderStartIcon:()=>(0,r.jsx)(S,{}),children:["Return to ",i.label]}),(0,r.jsx)(f.E,{onClick:()=>{o(!1)},renderStartIcon:()=>(0,r.jsx)(D,{})})]})}},R=()=>(0,r.jsx)(f.E,{asChild:!0,invisible:!0,color:"grey",endIcon:"openInNew",sx:{alignSelf:"center"},onClick:()=>{d.Xe.track({event:"mcp:promo-link-clicked",source:"slice_editor",target:"docs"})},children:(0,r.jsx)("a",{href:"https://prismic.io/docs/ai#code-with-prismics-mcp-server",target:"_blank",children:"Boost your workflow in Cursor with Prismic MCP"})});var H=i(58446),F=i(56580),E=i(33710),N=i(36887),A=i(6277),L=i(40484),O=i(10704),V=i.n(O);let z=e=>{let{align:t,alignOffset:i,arrowSize:n=12,children:o,collisionPadding:a=parseFloat(f.t.space[16]),side:l,sideOffset:d=4,trigger:c,...u}=e,{arrowWidth:m,arrowHeight:h}=(0,s.useMemo)(()=>{if(void 0===n)return{arrowWidth:10,arrowHeight:5};let e=Math.SQRT2*n;return{arrowWidth:e,arrowHeight:e/2}},[n]);return(0,r.jsxs)(L.fC,{...u,children:[(0,r.jsx)(L.xz,{asChild:!0,children:c}),(0,r.jsx)(L.h_,{children:(0,r.jsxs)(L.VY,{align:t,alignOffset:i,className:V().container,collisionPadding:a,side:l,sideOffset:d,children:[o,(0,r.jsx)(L.Eh,{className:V().arrow,height:h,width:m})]})})]})};var M=i(56099),P=i.n(M);let Z=e=>{let{align:t,alignOffset:i,arrowSize:n,children:o,collisionPadding:a,onClose:l,open:d,openDelay:c=5e3,side:u,sideOffset:m,trigger:h}=e,[p,v]=(0,s.useState)(!1),x=(0,s.useCallback)(()=>{l&&l(),v(!1)},[l,v]);return!function(e){let{condition:t,action:i,delay:r}=e,[n,o]=(0,s.useState)(null);(0,s.useEffect)(()=>(t&&null===n&&o(setTimeout(i,r)),()=>{null!==n&&(clearTimeout(n),o(null))}),[t,i,r,n,o])}({condition:!0===d,action:(0,s.useCallback)(()=>v(e=>!1===e),[v]),delay:c}),(0,r.jsx)(z,{align:t,alignOffset:i,arrowSize:n,collisionPadding:a,onOpenChange:e=>{!0===e&&!0===d&&v(e)},open:p,openDelay:c,side:u,sideOffset:m,trigger:h,children:(0,r.jsx)(B,{handleClose:x,children:o})})},B=e=>{let{handleClose:t,children:i}=e;return(0,r.jsx)(W.Provider,{value:{handleClose:t},children:(0,r.jsx)("div",{className:P().root,children:i})})},W=(0,s.createContext)({handleClose:()=>void 0});function q(){return(0,s.useContext)(W)}let X=e=>{let{children:t}=e,{handleClose:i}=q();return(0,r.jsxs)("div",{className:P().title,children:[(0,r.jsx)("span",{children:t}),(0,r.jsx)("button",{className:P().titleCloseIcon,onClick:i,children:(0,r.jsx)(D,{})})]})},G=e=>{let{component:t,...i}=e,n="image"===t?"img":N.nk;return(0,r.jsx)("div",{className:P().mediaContainer,children:(0,s.createElement)(n,{...i,className:(0,A.W)(P().media,i.className)})})},U=e=>{let{children:t}=e;return(0,r.jsx)("div",{className:P().description,children:t})},Y=e=>{let{children:t}=e,{handleClose:i}=q();return(0,r.jsx)("div",{className:P().closeButtonContainer,children:(0,r.jsx)(f.E,{sx:{width:"100%"},onClick:i,children:t})})};var K=i(39180),Q=i(7974),J=i(79384);let $=e=>{let{children:t,open:i,onClose:n}=e;return(0,r.jsxs)(Z,{open:i,trigger:t,onClose:n,children:[(0,r.jsx)(X,{children:"Simulate your slices"}),(0,r.jsx)(G,{component:"video",cloudName:"dmtf1daqp",loop:!1,autoPlay:!1,publicId:Q.Sn,poster:"/simulator-video-thumbnail.png",controls:!0,onPlay:()=>{d.Xe.track({event:"open-video-tutorials",video:Q.Sn})}}),(0,r.jsx)(U,{children:"Minimize context-switching by previewing your Slice components in the simulator."}),(0,r.jsx)(Y,{children:"Got it"})]})};var ee=e=>{let{disabled:t}=e,i=(0,a.useRouter)(),n=(0,s.useRef)(null),{setSeenSimulatorToolTip:o}=(0,m.Z)(),{hasSeenSimulatorTooltip:l}=(0,F.v9)(e=>({hasSeenSimulatorTooltip:(0,J.bv)(e)}));(0,s.useEffect)(()=>{let e=n.current;e&&!l&&setTimeout(()=>E.Z.show(e),5e3)},[l]);let d=()=>{if(o(),n.current){let{current:e}=n;E.Z.hide(e)}};return(0,r.jsx)("span",{"data-tip":!0,"data-tip-disable":!1,"data-for":"simulator-button-tooltip",ref:n,children:(0,r.jsx)($,{open:!l,onClose:d,children:(0,r.jsx)(f.E,{"data-tip":!0,"data-testid":"simulator-open-button",onClick:()=>{d(),window.open("".concat(i.asPath,"/simulator"),Q.pq)},disabled:t,renderStartIcon:()=>(0,r.jsx)(K.z,{color:f.t.color.grey1,height:"24px",style:{transform:"scale(calc(4 / 3))"},width:"24px"}),children:"Simulate"})})})},et=i(88866),ei=i(28316),er=i(88932),en=i(35289),eo=i(63908),ea=i(34166),el=i(3285),es=i(40141),ed=i(49219),ec=i(26109),eu=i(45440),em=i(16086),eh=i(358),ep=i(5495),ev=i(39302);let ex=[eu.C.Image,eu.C.Text,eu.C.StructuredText,eu.C.Link,eu.C.Select,eu.C.Boolean,eu.C.Number,eu.C.Color,eu.C.Date,eu.C.Table,eu.C.Embed,eu.C.Timestamp,eu.C.GeoPoint,eu.C.ContentRelationship,eu.C.LinkToMedia];var ef=()=>{let{slice:e,setSlice:t,variation:i}=v(),[n,o]=(0,s.useState)(!1),a=[eu.C.Group,...ex],l=!!(i.items&&Object.keys(i.items).length>0),d=r=>n=>{if(r===ec.Rt.Items&&i.items&&Object.keys(i.items).length<=1){o(!0);return}t((0,eo.AK)({slice:e,variationId:i.id,widgetArea:r,fieldId:n}))},c=(r,n)=>{let{apiId:o,newKey:a,value:l,inGroupFieldAction:s}=n;t((0,eo.L4)({slice:e,variationId:i.id,widgetArea:r,previousFieldId:o,newFieldId:a,newField:l}),()=>{"add"===s&&er.Am.success("Field added")}),s||(0,ev.Z)({previousId:o,id:a,field:l})},u=(r,n)=>{let{apiId:o,value:l}=n,{type:s}=l,d=a.find(e=>e.CUSTOM_NAME===s||e.TYPE_NAME===s);if(!d)throw Error("Unsupported Field Type: ".concat(s));try{d.schema.validateSync(l,{stripUnknown:!1})}catch(e){throw Error('Model is invalid for widget "'.concat(l.type,'".'))}t((0,eo.xS)({slice:e,variationId:i.id,widgetArea:r,newFieldId:o,newField:l.type===et.GroupFieldType?ed.Fl.fromSM(l):l}),()=>{er.Am.success("".concat("Group"===s?"Group":"Field"," added"))}),(0,ep.V)({id:o,field:l})},m=e=>t=>""===t.apiId?u(e,{...t,apiId:t.newKey}):c(e,t),h=r=>n=>{if((0,em.uS)(n))return;let{source:o,destination:a}=n;if(!a)return;let l=(0,eo.gR)({slice:e,variationId:i.id,widgetArea:r,sourceIndex:o.index,destinationIndex:a.index});(0,ei.flushSync)(()=>t(l))};return(0,r.jsxs)(f.D,{flexDirection:"column",gap:18,children:[(0,r.jsxs)(en.aV,{children:[(0,r.jsx)(es.Z,{zoneType:"slice",zoneTypeFormat:void 0,tabId:void 0,title:"Fields",dataTip:" The non-repeatable zone\n is for fields<br/> that should appear once, like a<br/>\n section title.\n",fields:i.primary,EditModal:el.Z,widgetsArray:a,onDeleteItem:d(ec.Rt.Primary),onSave:m(ec.Rt.Primary),onDragEnd:h(ec.Rt.Primary),poolOfFieldsToCheck:i.primary||[],renderHintBase:e=>{let{item:t}=e;return"slice.primary".concat((0,eh.Ti)(t.key))},renderFieldAccessor:e=>"slice.primary".concat((0,eh.Ti)(e)),testId:"static-zone-content",isRepeatableCustomType:void 0,emptyStateHeading:void 0}),l?(0,r.jsx)(es.Z,{zoneType:"slice",zoneTypeFormat:void 0,tabId:void 0,isRepeatable:!0,title:"Repeatable Zone",dataTip:"The repeatable zone is for a group<br/>\n of fields that you want to be able to repeat an<br/>\n indeterminate number of times, like FAQs",widgetsArray:ex,fields:i.items,EditModal:el.Z,onDeleteItem:d(ec.Rt.Items),onSave:m(ec.Rt.Items),onDragEnd:h(ec.Rt.Items),poolOfFieldsToCheck:i.items||[],renderHintBase:e=>{let{item:t}=e;return"item".concat((0,eh.Ti)(t.key))},renderFieldAccessor:e=>"slice.items[i]".concat((0,eh.Ti)(e)),testId:"slice-repeatable-zone",isRepeatableCustomType:void 0,emptyStateHeading:"No fields"}):null,(0,r.jsxs)(f.ae,{size:"small",open:n,onOpenChange:e=>o(e),children:[(0,r.jsx)(f.al,{icon:"delete",title:"Delete field"}),(0,r.jsxs)(f.aj,{children:[(0,r.jsx)(f.D,{padding:24,gap:12,flexDirection:"column",children:e.model.variations.length>1?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("strong",{children:["This action will permanently remove the repeatable zone from the ",e.model.name," slice ",i.name," variation."]}),(0,r.jsx)("div",{children:"Other variations will be left untouched. To reimplement repeatable fields later, use a group field instead of the repeatable zone."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("strong",{children:["This action will permanently remove the repeatable zone from the ",e.model.name,"."]}),(0,r.jsx)("div",{children:"To reimplement repeatable fields later, use a group field instead of the repeatable zone."})]})}),(0,r.jsxs)(f.ah,{children:[(0,r.jsx)(f.ai,{}),(0,r.jsx)(f.af,{color:"tomato",onClick:()=>{t((0,eo.Oh)({slice:e,variationId:i.id})),o(!1)},children:"Delete"})]})]})]})]}),(0,r.jsx)(ea.rT,{type:"model",library:e.from,sliceId:e.model.id,variationId:i.id})]})},eg=i(34887),ej=i.n(eg);let eC=e=>{let{variant:t="dashed",color:i="currentColor",className:n}=e;return(0,r.jsx)("hr",{className:(0,A.W)(ej()["variant-".concat(t)],n),style:{color:f.t.color[i]}})};var eb=i(51507),ey=i(27763),e_=i(21442);async function ew(e){try{let{errors:t}=await (0,d.Ve)(e.component);if(t.length>0)throw t;let{errors:i}=await (0,d.Xi)({libraryID:e.component.from,sliceID:e.component.model.id,variationID:e.variation.id});if(i.length>0)throw i;(0,ea.tB)({type:"model",library:e.component.from,sliceId:e.component.model.id,variationId:e.variation.id});let{slice:r,errors:n}=await (0,d.X$)(e.component.from,e.component.model.id);if(n.length>0)throw n;if(!r)throw Error("Could not read variation `".concat(e.variation.name,"`"));let{mocks:o}=await (0,d.pL)({libraryID:e.component.from,sliceID:e.component.model.id}),a=ey.Y.getBuilderPagePathname({libraryName:e.component.href,sliceName:r.name,variationId:r.variations[0].id});await e.router.replace(a);let l={...e.component,model:r,mocks:o};return e.saveSliceSuccess(l),l}catch(i){let t="Could not delete variation `".concat(e.variation.name,"`");throw console.error(t,i),er.Am.error(t),i}}let eI=e=>{let{isOpen:t,onClose:i,slice:n,variation:o}=e,l=(0,a.useRouter)(),[d,c]=(0,s.useState)(!1),{saveSliceSuccess:u}=(0,m.Z)(),{setSlice:h}=v();return(0,r.jsxs)(f.ae,{open:t,onOpenChange:e=>!e&&i(),size:{width:448,height:"auto"},children:[(0,r.jsx)(f.al,{icon:"delete",title:"Delete variation"}),(0,r.jsx)(f.aj,{children:(0,r.jsxs)(f.D,{flexDirection:"column",children:[(0,r.jsxs)(f.bL,{color:"grey11",sx:{marginBlock:16,marginInline:16},children:["This action will remove the variation from the slice model and delete associated files. When you push your changes, the variation will disappear from your repository. This update will"," ",(0,r.jsx)(eD,{children:"not"})," affect your documents until you ",(0,r.jsx)(eD,{children:"edit"})," ","them manually."]}),(0,r.jsxs)(f.ah,{children:[(0,r.jsx)(f.ai,{size:"medium"}),(0,r.jsx)(f.af,{size:"medium",color:"tomato",onClick:()=>{o&&(async()=>{c(!0);try{let e=await ew({component:n,router:l,saveSliceSuccess:u,variation:o});h(e)}catch(e){}c(!1),i()})()},loading:d,children:"Delete"})]})]})})]})},eD=e=>(0,r.jsx)(f.bL,{...e,color:"inherit",component:"span",variant:"bold"});var eS=i(30195);async function ek(e){try{let{errors:t}=await (0,d.Ve)(e.component);if(t.length>0)throw t;let{errors:i}=await (0,d.eH)(e.component,{...e.variation,name:e.variationName});if(i.length>0)throw i;let{slice:r,errors:n}=await (0,d.X$)(e.component.from,e.component.model.id);if(n.length>0)throw n;if(!r)throw Error("Could not read variation `".concat(e.variation.name,"`"));let{mocks:o}=await (0,d.pL)({libraryID:e.component.from,sliceID:e.component.model.id}),a={...e.component,model:r,mocks:o};return e.saveSliceSuccess(a),a}catch(i){let t="Could not rename variation `".concat(e.variation.name,"`");throw console.error(t,i),er.Am.error(t),i}}let eT=e=>{let{isOpen:t,onClose:i,slice:n,variation:o}=e,[a,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(""),[h,p]=(0,s.useState)(),{setSlice:x}=v(),{saveSliceSuccess:g}=(0,m.Z)();return(0,l.pQ)(t,()=>{if(t&&(null==o?void 0:o.name)!==c){var e;u(null!==(e=null==o?void 0:o.name)&&void 0!==e?e:""),p(void 0)}}),(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(f.ae,{open:t,onOpenChange:e=>!e&&i(),size:{width:448,height:"auto"},children:[(0,r.jsx)(f.al,{icon:"edit",title:"Rename variation"}),(0,r.jsx)(f.aj,{children:(0,r.jsxs)(f.aJ,{onSubmit:function(){if(!h&&o){d(!0);try{ek({component:n,saveSliceSuccess:g,variation:o,variationName:c.trim()}).then(e=>{x(e)})}catch(e){}d(!1),i()}},children:[(0,r.jsxs)(f.D,{flexDirection:"column",gap:8,padding:16,children:[(0,r.jsx)(f.bL,{variant:"normal",color:"grey11",children:"This action will rename the variation in the slice model. When you push your changes, the variation will be renamed in your repository."}),(0,r.jsx)(f.D,{flexDirection:"column",gap:4,children:(0,r.jsx)(f.aM,{type:"text",label:"Variation name *",placeholder:"Variation name",error:h,value:c,onValueChange:function(e){u(e),p(function(e){let t=eR.safeParse(e,{errorMap:eH});if(t.error)return t.error.errors[0].message}(e))}})})]}),(0,r.jsxs)(f.ah,{children:[(0,r.jsx)(f.ai,{size:"medium"}),(0,r.jsx)(f.af,{type:"submit",size:"medium",loading:a,disabled:!!h,children:"Rename"})]})]})})]})})},eR=eS.z.string().min(1),eH=e=>e.code===eS.z.ZodIssueCode.too_small?{message:"This field is required"}:{message:"Invalid value"};var eF=i(86652),eE=i(63397),eN=i(96009),eA=i.n(eN),eL=i(36131),eO=i(75289),eV=i(30527);function ez(e){let{children:t}=e,i=(0,eV.W)();return(0,r.jsx)(eO.kC,{sx:{p:3,pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:i,borderTopRightRadius:i,borderBottom:e=>{var t;return"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.borders)}},children:t})}var eM=e=>{let{children:t,FooterContent:i,HeaderContent:n,close:o,sx:a={}}=e;return(0,r.jsx)(eV.Z,{borderFooter:!0,footerSx:{p:0},bodySx:{pt:2,pb:4,px:4},sx:{border:"none",...a},Header:(0,r.jsxs)(ez,{children:[n,o?(0,r.jsx)(eO.x8,{onClick:o,type:"button"}):null]}),Footer:i?(0,r.jsxs)(eO.kC,{sx:{alignItems:"space-between",bg:"headSection",p:3},children:[(0,r.jsx)(eO.xu,{sx:{ml:"auto"}}),i]}):null,children:t})},eP=i(55862);let eZ=e=>{let{msg:t}=e;return(0,r.jsx)(eO.xv,{as:"span",sx:{fontSize:12,color:"error",mt:"5px",ml:2},children:t||"Error!"})};var eB=e=>{let{isOpen:t,onClose:i,onSubmit:n,initialVariation:o,variations:a}=e,[l,d]=(0,s.useState)({}),[c,u]=(0,s.useState)(""),[m,h]=(0,s.useState)(!0),[p,v]=(0,s.useState)(""),[x,g]=(0,s.useState)({value:o.id,label:o.name}),[j,C]=(0,s.useState)(!1);function b(){y(),i()}function y(){u(""),v(""),d({}),h(!0),g({value:o.id,label:o.name})}async function _(){let e=function(e){let{id:t,name:i,origin:r}=e,n=t&&t.length?null:{id:"Required!"},o=a.find(e=>e.id===t)?{id:"This id already exists!"}:null,l=i&&i.length?null:{name:"Required!"},s=r.value.length&&a.find(e=>e.id===r.value)?null:{id:"You must select an existing variation!"},d=t&&t.length&&!/^[A-Za-z0-9]+([A-Za-z0-9]+)*$/.exec(t)&&{id:"No special characters allowed"};return{...n,...o,...l,...s,...d}}({id:c,name:p,origin:x});if(Object.keys(e).length)d(e);else{let e=a.find(e=>e.id===x.value);e&&(C(!0),await n(c,p,e),C(!1),b())}}return(0,s.useEffect)(()=>{y()},[o,t]),(0,r.jsx)(eP.Z,{isOpen:t,shouldCloseOnOverlayClick:!0,onRequestClose:()=>b(),contentLabel:"Widget Form Modal",style:{content:{maxWidth:"700px"}},children:(0,r.jsx)(eE.J9,{initialValues:{id:c,name:p,origin:x},onSubmit:_,children:(0,r.jsx)(eE.l0,{id:"variation-add",onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),_())},children:(0,r.jsx)(f.D,{children:(0,r.jsxs)(eM,{sx:{textAlign:"left"},HeaderContent:(0,r.jsx)(eO.xv,{as:"h2",children:"Add new Variation"}),FooterContent:(0,r.jsxs)(f.D,{gap:16,alignItems:"center",children:[(0,r.jsx)(f.E,{onClick:b,color:"grey",children:"Cancel"}),(0,r.jsx)(f.E,{type:"submit",loading:j,children:"Submit"})]}),close:b,children:[(0,r.jsxs)(f.D,{flexDirection:"column",padding:{block:16},children:[(0,r.jsxs)(eO.__,{htmlFor:"name",sx:{mb:1},children:["Variation name*",l.name?(0,r.jsx)(eZ,{msg:l.name}):""]}),(0,r.jsx)(eE.gN,{autoComplete:"off",id:"name",name:"name",placeholder:"e.g. Grid - With Icon",as:eO.II,maxLength:30,value:p,onChange:e=>{var t;v(t=e.currentTarget.value),m&&u(eA()(t))}}),(0,r.jsx)(eO.xv,{children:"It will appear here in Slice Machine, and in the page editor in Prismic"})]}),(0,r.jsxs)(f.D,{flexDirection:"column",padding:{bottom:16},children:[(0,r.jsxs)(eO.__,{htmlFor:"id",sx:{mb:1},children:["Variation ID*",l.id?(0,r.jsx)(eZ,{msg:l.id}):""]}),(0,r.jsx)(eE.gN,{autoComplete:"off",id:"id",name:"id",placeholder:"e.g. gridWithIcon",as:eO.II,maxLength:30,value:c,onChange:e=>{var t;return t=e.currentTarget.value,void(h(!1),u(eA()(t)))}}),(0,r.jsx)(eO.xv,{children:"It's generated automatically based on the variation name and will appear in the API responses."})]}),(0,r.jsxs)(f.D,{flexDirection:"column",padding:{bottom:8},children:[(0,r.jsx)(eO.__,{htmlFor:"origin",sx:{mb:1},children:"Duplicate from"}),(0,r.jsx)(eL.ZP,{name:"origin",options:a.map(e=>({value:e.id,label:e.name})),onChange:e=>{e&&g(e)},defaultValue:x,maxMenuHeight:150,theme:e=>({...e,colors:{...e.colors,text:"text",primary:"background"}})})]})]})})})})})},eW=i(20136),eq=i.n(eW);let eX=e=>{let{horizontalScroll:t=!1}=e,{slice:i,variation:n,setSlice:o}=v(),[l,c]=(0,s.useState)(),u=(0,e_.H)(),{sliceFilterFn:h,defaultVariationSelector:p,onUploadSuccess:x}=u.modalPayload,g=(0,a.useRouter)(),{saveSliceSuccess:j}=(0,m.Z)(),C=i.model.variations.length;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.D,{flexDirection:"column",gap:16,children:t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eC,{variant:"edgeFaded",color:"grey6"}),(0,r.jsxs)(f.D,{justifyContent:"space-between",children:[(0,r.jsxs)(f.bL,{color:"grey11",children:[C," variation",1!==C&&"s"]}),(0,r.jsx)(f.E,{onClick:()=>{c({type:"ADD_VARIATION"})},startIcon:"add",color:"grey",children:"Add a variation"})]}),(0,r.jsx)("div",{className:eq().hideScrollbar,style:{height:"240px",position:"relative",marginRight:"-32px",overflowX:"scroll",scrollSnapType:"x mandatory"},children:(0,r.jsx)("div",{style:{position:"absolute",paddingRight:"32px"},children:(0,r.jsx)(f.D,{flexDirection:"row",gap:16,children:(0,r.jsx)(eG,{screenshotChangesModal:u,setDialog:c,width:320})})})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eG,{screenshotChangesModal:u,setDialog:c}),(0,r.jsx)("div",{style:{bottom:f.t.space[0],marginBottom:"-".concat(f.t.space[16]),position:"sticky"},children:(0,r.jsxs)(f.D,{backgroundColor:"grey2",flexDirection:"column",padding:{bottom:40,inline:24},children:[(0,r.jsx)(f.aS,{sx:{left:0,position:"absolute",right:0}}),(0,r.jsx)(f.E,{color:"grey",onClick:()=>{c({type:"ADD_VARIATION"})},startIcon:"add",sx:{position:"relative"},children:"Add a variation"})]})})]})}),(0,r.jsx)(eF.Z,{slices:h([i]),defaultVariationSelector:p,onUploadSuccess:x}),(0,r.jsx)(eT,{isOpen:(null==l?void 0:l.type)==="RENAME_VARIATION",onClose:()=>{c(void 0)},slice:i,variation:null==l?void 0:l.variation}),(0,r.jsx)(eI,{isOpen:(null==l?void 0:l.type)==="DELETE_VARIATION",onClose:()=>{c(void 0)},slice:i,variation:null==l?void 0:l.variation}),(0,r.jsx)(eB,{initialVariation:n,isOpen:(null==l?void 0:l.type)==="ADD_VARIATION",onClose:()=>{c(void 0)},onSubmit:async(e,t,r)=>{try{let{slice:n,variation:a}=(0,eo.Kp)({slice:i,id:e,name:t,copiedVariation:r});await (0,d.Ve)(n),j(n),o(n);let l=ey.Y.getBuilderPagePathname({libraryName:n.href,sliceName:n.model.name,variationId:a.id});g.replace(l)}catch(i){let e="Could not add variation `".concat(t,"`");console.error(e,i),er.Am.error(e)}},variations:i.model.variations})]})},eG=e=>{let{screenshotChangesModal:t,setDialog:i,width:n}=e,{slice:o,variation:a,setSlice:l}=v(),s={scrollSnapAlign:"start"};return(0,r.jsx)(r.Fragment,{children:o.model.variations.map(e=>(0,r.jsx)("div",{style:void 0!==n?{...s,width:n}:s,children:(0,r.jsx)(eb.b,{action:{type:"menu",onRename:()=>{i({type:"RENAME_VARIATION",variation:e})},onRemove:()=>{i({type:"DELETE_VARIATION",variation:e})},removeDisabled:o.model.variations.length<=1},mode:"navigation",onUpdateScreenshot:()=>{t.onOpenModal({sliceFilterFn:e=>e,defaultVariationSelector:{sliceID:o.model.id,variationID:e.id},onUploadSuccess:e=>{l(e)}})},replace:!0,selected:e.id===a.id,slice:o,variant:"outlined",variationId:e.id},e.id)},e.id))})};var eU=()=>{let{slice:e,actionQueueStatus:t}=v(),i=(0,f.cj)({max:"large"});return(0,r.jsxs)(H.LN,{children:[(0,r.jsxs)(H.wd,{children:[(0,r.jsx)(H.Xq,{url:"/slices"}),(0,r.jsxs)(H.Cx,{children:[(0,r.jsx)(g.g,{children:"Slices"}),(0,r.jsx)(g.g,{active:!0,children:e.model.name})]}),(0,r.jsxs)(H.K2,{children:[(0,r.jsx)(R,{}),(0,r.jsx)(j.X,{status:t}),(0,r.jsx)(ee,{disabled:"done"!==t})]})]}),(0,r.jsxs)(H.RN,{children:[(0,r.jsxs)(f.D,{display:"grid",alignItems:"flex-start",gap:16,...i?{gridTemplateRows:"304px 1fr"}:{gridTemplateColumns:"320px 1fr"},children:[(0,r.jsx)(eX,{horizontalScroll:i}),(0,r.jsx)(ef,{})]}),(0,r.jsx)(k,{})]})]})};function eY(){let e=(0,a.useRouter)(),{slice:t,variation:i}=(0,x.Z)();return void 0===t||void 0===i?(e.replace("/"),null):(0,r.jsx)(p,{initialSlice:t,children:e=>{let{slice:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o(),{children:(0,r.jsxs)("title",{children:[t.model.name," - Slice Machine"]})}),(0,r.jsx)(eU,{})]})}})}},10704:function(e){e.exports={reset:"BaseHoverCard_reset__HckHR",container:"BaseHoverCard_container__IZMCG BaseHoverCard_reset__HckHR",arrow:"BaseHoverCard_arrow__gvcjD BaseHoverCard_reset__HckHR"}},34887:function(e){e.exports={base:"Divider_base__4eT6E","variant-dashed":"Divider_variant-dashed__4Lvrj Divider_base__4eT6E","variant-edgeFaded":"Divider_variant-edgeFaded__049V2 Divider_base__4eT6E"}},56099:function(e){e.exports={block:"HoverCard_block__Fubs4",blockWithDisplayRevert:"HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4",root:"HoverCard_root__OaRBr HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4",title:"HoverCard_title__dO_Y9 HoverCard_block__Fubs4",titleCloseIcon:"HoverCard_titleCloseIcon__DlZJS HoverCard_block__Fubs4",mediaContainer:"HoverCard_mediaContainer__4Lt3z HoverCard_block__Fubs4",media:"HoverCard_media__U7jSc HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4",description:"HoverCard_description__HZ9_z HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4",closeButtonContainer:"HoverCard_closeButtonContainer__7JiLA HoverCard_blockWithDisplayRevert__H6Rbw HoverCard_block__Fubs4"}},20136:function(e){e.exports={hideScrollbar:"VariationsList_hideScrollbar__cHCIS"}}},function(e){e.O(0,[898,789,917,525,461,139,797,397,66,183,344,256,444,484,882,630,593,888,774,179],function(){return e(e.s=31314)}),_N_E=e.O()}]);
|
package/out/_next/static/chunks/pages/{slices-bedcb854fbdca8cd.js → slices-a9b4d6d022cfcd88.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[436],{74600:function(e,t,n){var i=n(34311),l=n(23779),o=i(function(e,t,n){return e+(n?" ":"")+l(t)});e.exports=o},26688:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices",function(){return n(31562)}])},34166:function(e,t,n){"use strict";n.d(t,{nZ:function(){return d},rT:function(){return u},tB:function(){return x}});var i=n(52322),l=n(11699),o=n(2784),s=n(30195),r=n(94160),a=n(76611),c=n(5683);function d(e){let{type:t,library:n,sliceId:i,variationId:l,langSmithUrl:o}=e,s=(0,c.iv)({type:t,library:n,sliceId:i,variationId:l}),r=JSON.stringify({langSmithUrl:o});localStorage.setItem(s,r)}function x(e){let{type:t,library:n,sliceId:i,variationId:l}=e,o=(0,c.iv)({type:t,library:n,sliceId:i,variationId:l});localStorage.removeItem(o)}function u(e){let{type:t,library:n,sliceId:d,variationId:x}=e,{key:u,value:m,done:h}=function(e){let{type:t,library:n,sliceId:i,variationId:l}=e,o=(0,c.iv)({type:t,library:n,sliceId:i,variationId:l}),[r,d]=(0,a.V)(o,void 0,{schema:s.z.object({langSmithUrl:s.z.string().url().optional()})});return{key:o,value:r,done:()=>d(void 0)}}({type:t,library:n,sliceId:d,variationId:x}),[p,f]=(0,o.useState)(),g=e=>()=>{m&&(f(u),r.Xe.track({event:"slice-generation-feedback",type:t,sliceId:d,variationId:x,feedback:e,langSmithUrl:m.langSmithUrl}),h())};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.be,{children:(0,i.jsx)(l.bQ,{anchor:(0,i.jsx)(l.D,{width:"100%",justifyContent:"center",position:"absolute",bottom:64}),icon:"check",title:"Thanks for your feedback!",seconds:2,open:!!p,onOpenChange:e=>{e||f(void 0)}},p)}),(0,i.jsx)(l.i,{children:m&&(0,i.jsxs)(l.D,{flexDirection:"row",justifyContent:"end",gap:8,alignItems:"center",children:[(0,i.jsx)(l.bL,{color:"grey11",children:"Did the AI get it right?"}),(0,i.jsxs)(l.D,{flexDirection:"row",gap:4,children:[(0,i.jsx)(l.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Looks good",children:(0,i.jsx)(l.aZ,{variant:"solid",size:"small",icon:"thumbUp",onClick:g("up")})}),(0,i.jsx)(l.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Needs improvement",children:(0,i.jsx)(l.aZ,{variant:"solid",size:"small",icon:"thumbDown",onClick:g("down")})})]})]})})]})}},33986:function(e,t,n){"use strict";n.d(t,{z:function(){return a}});var i=n(52322),l=n(2784),o=n(75289);let s=(e,t)=>e?"".concat(e,"-").concat(t):"",r=e=>{switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},a=(0,l.forwardRef)((e,t)=>{let{label:n,Icon:l,type:a,form:c,isLoading:d=!1,disabled:x=!1,onClick:u,sx:m={},iconSize:h=16,iconFill:p,variant:f="primary",...g}=e;return(0,i.jsx)(o.zx,{ref:t,sx:{...m,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",...d?{cursor:"wait !important"}:{}},type:a,form:c,disabled:x||d,onClick:d?void 0:u,variant:f,...g,children:d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.$j,{size:h,color:r(f),"data-testid":s(g["data-testid"],"spinner")}),l&&n]}):(0,i.jsxs)(i.Fragment,{children:[l&&(0,i.jsx)(l,{size:h,fill:p,"data-testid":s(g["data-testid"],"icon")}),n]})})})},46999:function(e,t,n){"use strict";n.d(t,{W:function(){return s}});var i=n(52322),l=n(63397);n(2784);var o=n(75289);let s=e=>{let{name:t,label:n,placeholder:s,error:r,testId:a,onChange:c}=e;return(0,i.jsxs)(o.xu,{mb:3,children:[(0,i.jsx)(o.__,{htmlFor:t,mb:2,children:n}),(0,i.jsx)(l.gN,{name:t,type:"text",placeholder:s,as:o.II,autoComplete:"off",...c?{onChange:c}:null,...a?{"data-testid":a}:null}),r?(0,i.jsx)(o.xv,{"data-testid":a?"".concat(a,"-error"):"input-error",sx:{color:"error",mt:1},children:r}):null]})}},59532:function(e,t,n){"use strict";var i=n(52322),l=n(63397),o=n(37149),s=n.n(o),r=n(75289),a=n(33986),c=n(55862),d=n(30527);function x(e){let{children:t}=e,n=(0,d.W)();return(0,i.jsx)(r.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:e=>{var t;return"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.borders)}},children:t})}t.Z=function(e){let{children:t,close:n,isOpen:o,formId:u,validate:m,onSubmit:h,widthInPx:p,initialValues:f,content:{title:g},cardProps:j,omitFooter:v=!1,isLoading:y=!1,buttonLabel:b="Save",testId:S,actionMessage:C}=e;return s().setAppElement("#__next"),(0,i.jsx)(c.Z,{isOpen:o,shouldCloseOnOverlayClick:!0,onRequestClose:n,contentLabel:g,style:{content:{width:null!=p?p:"900px"}},children:(0,i.jsx)(l.J9,{initialValues:f,validate:e=>m?m(e):void 0,onSubmit:e=>{h(e)},children:e=>{let{isValid:o,isSubmitting:s,values:c,errors:m,touched:h,setFieldValue:p,setValues:f}=e;return(0,i.jsx)(l.l0,{id:u,...null!=S?{"data-testid":S}:null,children:(0,i.jsx)(d.Z,{borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"},...j,Header:(0,i.jsxs)(x,{children:[(0,i.jsx)(r.X6,{sx:{fontSize:"20px"},children:g}),(0,i.jsx)(r.x8,{type:"button",onClick:n})]}),Footer:v?null:(0,i.jsxs)(r.kC,{sx:{alignItems:"space-between"},children:[(0,i.jsx)(r.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof C?C(e):C}),(0,i.jsxs)(r.kC,{sx:{ml:"auto"},children:[(0,i.jsx)(r.zx,{mr:2,type:"button",onClick:n,variant:"secondary",disabled:s||y,children:"Cancel"}),(0,i.jsx)(a.z,{label:b,form:u,type:"submit",disabled:!o||s||y,isLoading:s||y,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:t({isValid:o,isSubmitting:s,values:c,errors:m,touched:h,setFieldValue:p,setValues:f})})})}})})}},31562:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return M}});var i=n(52322),l=n(11699),o=n(97729),s=n.n(o),r=n(5632),a=n(2784),c=n(56580),d=n(88932),x=n(65077),u=n(75289),m=n(43388),h=n(91589),p=n(27213),f=n(51507),g=n(27763),j=n(21442),v=n(58446),y=n(65186),b=n(59326),S=n(34166),C=n(80148);async function k(e){let{sliceName:t,sliceID:n,libraryID:i,sliceVariationIds:l,onSuccess:o}=e;try{let{errors:e}=await C.managerClient.slices.deleteSlice({libraryID:i,sliceID:n});if(e.length>0)throw e;l.forEach(e=>{(0,S.tB)({type:"model",library:i,sliceId:n,variationId:e})}),o(),d.Am.success("Successfully deleted slice “".concat(t,"”"))}catch(n){let e="An unexpected error happened while deleting slice “".concat(t,"”.");console.error(e,n),d.Am.error(e)}}var w=n(68968),I=n(33986),z=n(30527),N=n(55862),D=n(54597);let R=e=>{var t;let{isOpen:n,libName:l,sliceId:o,sliceName:s,sliceVariationIds:r,onClose:c}=e,[d,x]=(0,a.useState)(!1),{deleteSliceSuccess:m}=(0,D.Z)(),{syncChanges:h}=(0,w.g)(),{theme:p}=(0,b.B7)(),f=async()=>{x(!0),await k({libraryID:l,sliceID:o,sliceName:s,sliceVariationIds:r,onSuccess:()=>{m(o,l),h()}}),c(),x(!1)};return(0,i.jsx)(N.Z,{isOpen:n,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:c,children:(0,i.jsx)(z.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none"},borderFooter:!0,Header:(0,i.jsxs)(u.kC,{sx:{position:"sticky",background:"gray",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,i.jsxs)(u.kC,{sx:{alignItems:"center"},children:[(0,i.jsx)(y.$vK,{size:20,color:null===(t=p.colors)||void 0===t?void 0:t.greyIcon}),(0,i.jsx)(u.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Delete Slice"})]}),(0,i.jsx)(u.x8,{type:"button",onClick:c})]}),Footer:()=>(0,i.jsxs)(u.kC,{sx:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.darkBorders))},backgroundColor:"gray"},children:[(0,i.jsx)(I.z,{label:"Cancel",variant:"secondary",onClick:c,sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,i.jsx)(I.z,{label:"Delete",variant:"danger",isLoading:d,sx:{minHeight:39,minWidth:78},onClick:()=>{f()}})]}),children:(0,i.jsxs)(u.nv,{children:["This action will immediately make the following changes:",(0,i.jsxs)("ul",{children:[(0,i.jsxs)("li",{children:["Delete the"," ",(0,i.jsxs)(u.xv,{sx:{fontWeight:"bold"},children:[l,"/",s,"/"]})," ","directory."]}),(0,i.jsx)("li",{children:"Remove the Slice from all Slice Zones that use it."})]}),"The next time you push your changes to Prismic, the following change will happen:",(0,i.jsx)("ul",{children:(0,i.jsx)("li",{children:"Remove the Slice from the list of available Slices to use in the Page Builder."})}),"You will need to manually remove the Slice from any Pages that currently use it."]})})})};var W=n(36887),_=n(94160),Z=e=>{let{title:t,onCreateNew:n,buttonText:l,documentationComponent:o,videoPublicIdUrl:s,...r}=e;return(0,i.jsxs)(u.xu,{sx:{display:"flex",width:"80%",flexWrap:"wrap",justifyContent:"center"},...r,children:[(0,i.jsx)(u.xu,{sx:e=>{var t;return{display:"flex",flex:1,alignItems:"center",minWidth:"400px",maxWidth:"70%",border:"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.grey02)}},children:(0,i.jsx)(W.nk,{cloudName:"dmtf1daqp",controls:!0,loop:!0,style:{maxWidth:"100%",objectFit:"contain"},publicId:s,onPlay:()=>{_.Xe.track({event:"open-video-tutorials",video:s})}})}),(0,i.jsxs)(u.xu,{sx:e=>{var t;return{bg:"white",display:"flex",flexDirection:"column",border:"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.grey02),flex:1,minWidth:"400px",maxWidth:"70%"}},children:[(0,i.jsxs)(u.xu,{sx:e=>{var t;return{display:"flex",flexDirection:"column",p:4,borderBottom:"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.grey02)}},children:[(0,i.jsx)(u.X6,{as:"h3",variant:"heading",sx:{fontSize:"16px",lineHeight:"24px",mb:2},children:t}),(0,i.jsx)(u.xv,{variant:"xs",sx:{lineHeight:"24px",fontSize:"13px"},children:o})]}),(0,i.jsxs)(u.xu,{sx:{display:"flex",p:4,alignItems:"center"},children:[(0,i.jsx)(u.zx,{onClick:n,"data-testid":"empty-state-main-button",sx:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0,mr:4},children:l}),(0,i.jsx)(u.xv,{sx:{fontSize:"12px",color:"grey04",maxWidth:"280px"},children:"It will be stored locally and you will be able to push it to your repository"})]})]})]})},O=n(6256),F=n(63908),L=n(26109);async function P(e){let{slice:t,newSliceName:n,onSuccess:i}=e;try{let e=(0,F.PQ)(t,n),{errors:l}=await C.managerClient.slices.renameSlice({libraryID:t.from,model:L.id.fromSM(e.model)});if(l.length>0)throw l;i(e),d.Am.success("Slice name updated")}catch(n){let e="An unexpected error happened while renaming “".concat(t.model.name,"”.");console.error(e,n),d.Am.error(e)}}var T=n(7723),A=n(59532),B=n(46999),E=n(63019);let X=e=>{var t,n;let{slice:l,isOpen:o,onClose:s}=e,{renameSliceSuccess:r}=(0,D.Z)(),{syncChanges:a}=(0,w.g)(),{localLibs:d,remoteLibs:x}=(0,c.v9)(e=>({localLibs:(0,T.Sd)(e),remoteLibs:(0,T.sT)(e)})),m=null!==(t=null==l?void 0:l.model.name)&&void 0!==t?t:"",h=async e=>{l&&(await P({slice:l,newSliceName:e.sliceName,onSuccess:e=>{r(e.from,e.model),a()}}),s())};return(0,i.jsx)(A.Z,{testId:"rename-slice-modal",isOpen:o,widthInPx:"530px",formId:"rename-slice-modal-".concat(null!==(n=null==l?void 0:l.model.id)&&void 0!==n?n:""),close:s,buttonLabel:"Rename",onSubmit:e=>void h(e),initialValues:{sliceName:m},content:{title:"Rename a slice"},validate:e=>(0,E.h)(e,d,x),children:e=>{let{touched:t,errors:n}=e;return(0,i.jsx)(u.xu,{children:(0,i.jsx)(B.W,{name:"sliceName",label:"Slice Name","data-testid":"slice-name-input",placeholder:"Pascalised Slice API ID (e.g. TextBlock)",error:t.sliceName?n.sliceName:void 0,testId:"slice-name-input"})})}})};var H=n(21151),U=n(68105),V=n(39204),q=n(7974),M=()=>{var e,t,n,o;let y=(0,r.useRouter)(),{modalPayload:b,onOpenModal:S}=(0,j.H)(),{openLoginModal:k}=(0,D.Z)(),w=(0,p.F)({menuType:"Dropdown"}),{sliceFilterFn:I,defaultVariationSelector:z}=b,{remoteSlices:N,libraries:W}=(0,c.v9)(e=>({remoteSlices:(0,T.sT)(e),libraries:(0,T.Sd)(e)})),[_,F]=(0,a.useState)(!1),[L,P]=(0,a.useState)(!1),[A,B]=(0,a.useState)(!1),[E,M]=(0,a.useState)(!1),Q=W.filter(e=>e.isLocal),Y=W.map(e=>(e.components=[...e.components].sort((e,t)=>e.model.name.localeCompare(t.model.name)),e)),G=(W||[]).map(e=>e.components).flat(),J=G.length,[K,$]=(0,a.useState)(),ee=()=>{P(!0)},et=()=>{B(!0)},en=async()=>{await C.managerClient.user.checkIsLoggedIn()?M(!0):k()},ei=()=>{M(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s(),{children:(0,i.jsx)("title",{children:"Slices - Slice Machine"})}),(0,i.jsxs)(v.LN,{children:[(0,i.jsxs)(v.wd,{children:[(0,i.jsx)(v.Cx,{children:(0,i.jsx)(m.g,{children:"Slices"})}),(null==Q?void 0:Q.length)!==0&&0!==J?(0,i.jsxs)(l.ar,{children:[(0,i.jsx)(l.av,{children:(0,i.jsx)(l.E,{color:"purple",startIcon:"add","data-testid":"add-new-slice-dropdown",children:"Add"})}),(0,i.jsxs)(l.as,{align:"end",children:[(0,i.jsx)(l.at,{renderStartIcon:()=>w.fromImage.BackgroundIcon,onSelect:()=>void en(),description:w.fromImage.description,children:w.fromImage.title}),(0,i.jsx)(l.at,{renderStartIcon:()=>w.fromScratch.BackgroundIcon,onSelect:()=>F(!0),description:w.fromScratch.description,children:w.fromScratch.title})]})]}):void 0]}),(0,i.jsxs)(v.RN,{children:[(0,i.jsx)(x.xR,{sx:{display:"flex",flexDirection:"column"},children:Y.length>0?(0,i.jsx)(u.kC,{sx:{flex:1,flexDirection:"column"},children:0===J?(0,i.jsx)(u.kC,{sx:{flex:1,justifyContent:"center",alignItems:"center"},children:(0,i.jsx)(Z,{title:"What are slices?",onCreateNew:()=>{F(!0)},buttonText:"Create one",videoPublicIdUrl:q.rd,documentationComponent:(0,i.jsxs)(i.Fragment,{children:['Slices are sections of your website. Prismic documents contain a dynamic "Slice Zone" that allows content creators to add, edit, and rearrange slices to compose dynamic layouts for any page design.'," ",(0,i.jsx)(u.rU,{target:"_blank",href:"https://prismic.io/docs/core-concepts/slices",sx:e=>{var t;return{color:null==e?void 0:null===(t=e.colors)||void 0===t?void 0:t.primary}},children:"Learn more"}),"."]}),"data-testid":"slices-table-blank-slate"})}):Y.map(e=>{let{name:t,isLocal:n,components:l}=e;return(0,i.jsxs)(u.kC,{sx:{flexDirection:"column","&:not(:last-of-type)":{mb:4}},children:[(0,i.jsxs)(u.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(u.kC,{sx:{alignItems:"center",fontSize:3,lineHeight:"48px",fontWeight:"heading",mb:1},children:(0,i.jsx)(u.xv,{children:1===Y.length?"Your slices":t})}),!n&&(0,i.jsx)("p",{children:"⚠️ External libraries are read-only"})]}),(0,i.jsx)(H.Z,{elems:l,defineElementKey:e=>e.model.name,renderElem:e=>(0,i.jsx)(f.b,{action:{type:"menu",onRemove:()=>{$(e),ee()},onRename:()=>{$(e),et()}},mode:"navigation",onUpdateScreenshot:()=>{S({sliceFilterFn:t=>t.filter(t=>t.model.id===e.model.id)})},slice:e,variant:"solid"}),gridGap:"32px 16px"})]},t)})}):void 0}),(null==Q?void 0:Q.length)>0&&(0,i.jsx)(U.Z,{slices:I(G),defaultVariationSelector:z}),(null==Q?void 0:Q.length)>0&&_&&(0,i.jsx)(O.c,{localLibraries:Q,location:"slices",remoteSlices:N,onSuccess:(e,t)=>{let n=e.variations[0].id,i=g.Y.getBuilderPagePathname({libraryName:t,sliceName:e.name,variationId:n});y.push(i),d.Am.success((0,V.kQ)({path:"".concat(t,"/").concat(e.name,"/model.json")}))},onClose:()=>{F(!1)}}),(0,i.jsx)(X,{isOpen:A,slice:K,onClose:()=>{B(!1)},"data-testid":"rename-slice-modal"}),(0,i.jsx)(R,{isOpen:L,libName:null!==(e=null==K?void 0:K.from)&&void 0!==e?e:"",sliceId:null!==(t=null==K?void 0:K.model.id)&&void 0!==t?t:"",sliceName:null!==(n=null==K?void 0:K.model.name)&&void 0!==n?n:"",sliceVariationIds:(null!==(o=null==K?void 0:K.model.variations)&&void 0!==o?o:[]).map(e=>e.id),onClose:()=>{P(!1)}}),(0,i.jsx)(h.S,{open:E,location:"slices",onSuccess:e=>{let{library:t}=e;d.Am.success((0,i.jsx)(V.GX,{message:"Slice(s) added to slice zone and created at: ",path:t})),ei()},onClose:ei})]})]})]})}}},function(e){e.O(0,[898,789,797,397,66,344,444,34,907,658,888,774,179],function(){return e(e.s=26688)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[436],{74600:function(e,t,n){var i=n(34311),l=n(23779),o=i(function(e,t,n){return e+(n?" ":"")+l(t)});e.exports=o},26688:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices",function(){return n(31562)}])},34166:function(e,t,n){"use strict";n.d(t,{nZ:function(){return d},rT:function(){return u},tB:function(){return x}});var i=n(52322),l=n(11699),o=n(2784),s=n(30195),r=n(94160),a=n(76611),c=n(5683);function d(e){let{type:t,library:n,sliceId:i,variationId:l,langSmithUrl:o}=e,s=(0,c.iv)({type:t,library:n,sliceId:i,variationId:l}),r=JSON.stringify({langSmithUrl:o});localStorage.setItem(s,r)}function x(e){let{type:t,library:n,sliceId:i,variationId:l}=e,o=(0,c.iv)({type:t,library:n,sliceId:i,variationId:l});localStorage.removeItem(o)}function u(e){let{type:t,library:n,sliceId:d,variationId:x}=e,{key:u,value:m,done:h}=function(e){let{type:t,library:n,sliceId:i,variationId:l}=e,o=(0,c.iv)({type:t,library:n,sliceId:i,variationId:l}),[r,d]=(0,a.V)(o,void 0,{schema:s.z.object({langSmithUrl:s.z.string().url().optional()})});return{key:o,value:r,done:()=>d(void 0)}}({type:t,library:n,sliceId:d,variationId:x}),[p,f]=(0,o.useState)(),g=e=>()=>{m&&(f(u),r.Xe.track({event:"slice-generation-feedback",type:t,sliceId:d,variationId:x,feedback:e,langSmithUrl:m.langSmithUrl}),h())};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.be,{children:(0,i.jsx)(l.bQ,{anchor:(0,i.jsx)(l.D,{width:"100%",justifyContent:"center",position:"absolute",bottom:64}),icon:"check",title:"Thanks for your feedback!",seconds:2,open:!!p,onOpenChange:e=>{e||f(void 0)}},p)}),(0,i.jsx)(l.i,{children:m&&(0,i.jsxs)(l.D,{flexDirection:"row",justifyContent:"end",gap:8,alignItems:"center",children:[(0,i.jsx)(l.bL,{color:"grey11",children:"Did the AI get it right?"}),(0,i.jsxs)(l.D,{flexDirection:"row",gap:4,children:[(0,i.jsx)(l.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Looks good",children:(0,i.jsx)(l.aZ,{variant:"solid",size:"small",icon:"thumbUp",onClick:g("up")})}),(0,i.jsx)(l.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Needs improvement",children:(0,i.jsx)(l.aZ,{variant:"solid",size:"small",icon:"thumbDown",onClick:g("down")})})]})]})})]})}},33986:function(e,t,n){"use strict";n.d(t,{z:function(){return a}});var i=n(52322),l=n(2784),o=n(75289);let s=(e,t)=>e?"".concat(e,"-").concat(t):"",r=e=>{switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},a=(0,l.forwardRef)((e,t)=>{let{label:n,Icon:l,type:a,form:c,isLoading:d=!1,disabled:x=!1,onClick:u,sx:m={},iconSize:h=16,iconFill:p,variant:f="primary",...g}=e;return(0,i.jsx)(o.zx,{ref:t,sx:{...m,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",...d?{cursor:"wait !important"}:{}},type:a,form:c,disabled:x||d,onClick:d?void 0:u,variant:f,...g,children:d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.$j,{size:h,color:r(f),"data-testid":s(g["data-testid"],"spinner")}),l&&n]}):(0,i.jsxs)(i.Fragment,{children:[l&&(0,i.jsx)(l,{size:h,fill:p,"data-testid":s(g["data-testid"],"icon")}),n]})})})},46999:function(e,t,n){"use strict";n.d(t,{W:function(){return s}});var i=n(52322),l=n(63397);n(2784);var o=n(75289);let s=e=>{let{name:t,label:n,placeholder:s,error:r,testId:a,onChange:c}=e;return(0,i.jsxs)(o.xu,{mb:3,children:[(0,i.jsx)(o.__,{htmlFor:t,mb:2,children:n}),(0,i.jsx)(l.gN,{name:t,type:"text",placeholder:s,as:o.II,autoComplete:"off",...c?{onChange:c}:null,...a?{"data-testid":a}:null}),r?(0,i.jsx)(o.xv,{"data-testid":a?"".concat(a,"-error"):"input-error",sx:{color:"error",mt:1},children:r}):null]})}},59532:function(e,t,n){"use strict";var i=n(52322),l=n(63397),o=n(37149),s=n.n(o),r=n(75289),a=n(33986),c=n(55862),d=n(30527);function x(e){let{children:t}=e,n=(0,d.W)();return(0,i.jsx)(r.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:e=>{var t;return"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.borders)}},children:t})}t.Z=function(e){let{children:t,close:n,isOpen:o,formId:u,validate:m,onSubmit:h,widthInPx:p,initialValues:f,content:{title:g},cardProps:j,omitFooter:v=!1,isLoading:y=!1,buttonLabel:b="Save",testId:S,actionMessage:C}=e;return s().setAppElement("#__next"),(0,i.jsx)(c.Z,{isOpen:o,shouldCloseOnOverlayClick:!0,onRequestClose:n,contentLabel:g,style:{content:{width:null!=p?p:"900px"}},children:(0,i.jsx)(l.J9,{initialValues:f,validate:e=>m?m(e):void 0,onSubmit:e=>{h(e)},children:e=>{let{isValid:o,isSubmitting:s,values:c,errors:m,touched:h,setFieldValue:p,setValues:f}=e;return(0,i.jsx)(l.l0,{id:u,...null!=S?{"data-testid":S}:null,children:(0,i.jsx)(d.Z,{borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"},...j,Header:(0,i.jsxs)(x,{children:[(0,i.jsx)(r.X6,{sx:{fontSize:"20px"},children:g}),(0,i.jsx)(r.x8,{type:"button",onClick:n})]}),Footer:v?null:(0,i.jsxs)(r.kC,{sx:{alignItems:"space-between"},children:[(0,i.jsx)(r.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof C?C(e):C}),(0,i.jsxs)(r.kC,{sx:{ml:"auto"},children:[(0,i.jsx)(r.zx,{mr:2,type:"button",onClick:n,variant:"secondary",disabled:s||y,children:"Cancel"}),(0,i.jsx)(a.z,{label:b,form:u,type:"submit",disabled:!o||s||y,isLoading:s||y,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:t({isValid:o,isSubmitting:s,values:c,errors:m,touched:h,setFieldValue:p,setValues:f})})})}})})}},31562:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return M}});var i=n(52322),l=n(11699),o=n(97729),s=n.n(o),r=n(5632),a=n(2784),c=n(56580),d=n(88932),x=n(65077),u=n(75289),m=n(43388),h=n(21446),p=n(27213),f=n(51507),g=n(27763),j=n(21442),v=n(58446),y=n(65186),b=n(59326),S=n(34166),C=n(80148);async function k(e){let{sliceName:t,sliceID:n,libraryID:i,sliceVariationIds:l,onSuccess:o}=e;try{let{errors:e}=await C.managerClient.slices.deleteSlice({libraryID:i,sliceID:n});if(e.length>0)throw e;l.forEach(e=>{(0,S.tB)({type:"model",library:i,sliceId:n,variationId:e})}),o(),d.Am.success("Successfully deleted slice “".concat(t,"”"))}catch(n){let e="An unexpected error happened while deleting slice “".concat(t,"”.");console.error(e,n),d.Am.error(e)}}var w=n(68968),I=n(33986),z=n(30527),N=n(55862),D=n(54597);let R=e=>{var t;let{isOpen:n,libName:l,sliceId:o,sliceName:s,sliceVariationIds:r,onClose:c}=e,[d,x]=(0,a.useState)(!1),{deleteSliceSuccess:m}=(0,D.Z)(),{syncChanges:h}=(0,w.g)(),{theme:p}=(0,b.B7)(),f=async()=>{x(!0),await k({libraryID:l,sliceID:o,sliceName:s,sliceVariationIds:r,onSuccess:()=>{m(o,l),h()}}),c(),x(!1)};return(0,i.jsx)(N.Z,{isOpen:n,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:c,children:(0,i.jsx)(z.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none"},borderFooter:!0,Header:(0,i.jsxs)(u.kC,{sx:{position:"sticky",background:"gray",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,i.jsxs)(u.kC,{sx:{alignItems:"center"},children:[(0,i.jsx)(y.$vK,{size:20,color:null===(t=p.colors)||void 0===t?void 0:t.greyIcon}),(0,i.jsx)(u.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Delete Slice"})]}),(0,i.jsx)(u.x8,{type:"button",onClick:c})]}),Footer:()=>(0,i.jsxs)(u.kC,{sx:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.darkBorders))},backgroundColor:"gray"},children:[(0,i.jsx)(I.z,{label:"Cancel",variant:"secondary",onClick:c,sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,i.jsx)(I.z,{label:"Delete",variant:"danger",isLoading:d,sx:{minHeight:39,minWidth:78},onClick:()=>{f()}})]}),children:(0,i.jsxs)(u.nv,{children:["This action will immediately make the following changes:",(0,i.jsxs)("ul",{children:[(0,i.jsxs)("li",{children:["Delete the"," ",(0,i.jsxs)(u.xv,{sx:{fontWeight:"bold"},children:[l,"/",s,"/"]})," ","directory."]}),(0,i.jsx)("li",{children:"Remove the Slice from all Slice Zones that use it."})]}),"The next time you push your changes to Prismic, the following change will happen:",(0,i.jsx)("ul",{children:(0,i.jsx)("li",{children:"Remove the Slice from the list of available Slices to use in the Page Builder."})}),"You will need to manually remove the Slice from any Pages that currently use it."]})})})};var W=n(36887),_=n(94160),Z=e=>{let{title:t,onCreateNew:n,buttonText:l,documentationComponent:o,videoPublicIdUrl:s,...r}=e;return(0,i.jsxs)(u.xu,{sx:{display:"flex",width:"80%",flexWrap:"wrap",justifyContent:"center"},...r,children:[(0,i.jsx)(u.xu,{sx:e=>{var t;return{display:"flex",flex:1,alignItems:"center",minWidth:"400px",maxWidth:"70%",border:"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.grey02)}},children:(0,i.jsx)(W.nk,{cloudName:"dmtf1daqp",controls:!0,loop:!0,style:{maxWidth:"100%",objectFit:"contain"},publicId:s,onPlay:()=>{_.Xe.track({event:"open-video-tutorials",video:s})}})}),(0,i.jsxs)(u.xu,{sx:e=>{var t;return{bg:"white",display:"flex",flexDirection:"column",border:"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.grey02),flex:1,minWidth:"400px",maxWidth:"70%"}},children:[(0,i.jsxs)(u.xu,{sx:e=>{var t;return{display:"flex",flexDirection:"column",p:4,borderBottom:"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.grey02)}},children:[(0,i.jsx)(u.X6,{as:"h3",variant:"heading",sx:{fontSize:"16px",lineHeight:"24px",mb:2},children:t}),(0,i.jsx)(u.xv,{variant:"xs",sx:{lineHeight:"24px",fontSize:"13px"},children:o})]}),(0,i.jsxs)(u.xu,{sx:{display:"flex",p:4,alignItems:"center"},children:[(0,i.jsx)(u.zx,{onClick:n,"data-testid":"empty-state-main-button",sx:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0,mr:4},children:l}),(0,i.jsx)(u.xv,{sx:{fontSize:"12px",color:"grey04",maxWidth:"280px"},children:"It will be stored locally and you will be able to push it to your repository"})]})]})]})},O=n(6256),F=n(63908),L=n(26109);async function P(e){let{slice:t,newSliceName:n,onSuccess:i}=e;try{let e=(0,F.PQ)(t,n),{errors:l}=await C.managerClient.slices.renameSlice({libraryID:t.from,model:L.id.fromSM(e.model)});if(l.length>0)throw l;i(e),d.Am.success("Slice name updated")}catch(n){let e="An unexpected error happened while renaming “".concat(t.model.name,"”.");console.error(e,n),d.Am.error(e)}}var T=n(7723),A=n(59532),B=n(46999),E=n(63019);let X=e=>{var t,n;let{slice:l,isOpen:o,onClose:s}=e,{renameSliceSuccess:r}=(0,D.Z)(),{syncChanges:a}=(0,w.g)(),{localLibs:d,remoteLibs:x}=(0,c.v9)(e=>({localLibs:(0,T.Sd)(e),remoteLibs:(0,T.sT)(e)})),m=null!==(t=null==l?void 0:l.model.name)&&void 0!==t?t:"",h=async e=>{l&&(await P({slice:l,newSliceName:e.sliceName,onSuccess:e=>{r(e.from,e.model),a()}}),s())};return(0,i.jsx)(A.Z,{testId:"rename-slice-modal",isOpen:o,widthInPx:"530px",formId:"rename-slice-modal-".concat(null!==(n=null==l?void 0:l.model.id)&&void 0!==n?n:""),close:s,buttonLabel:"Rename",onSubmit:e=>void h(e),initialValues:{sliceName:m},content:{title:"Rename a slice"},validate:e=>(0,E.h)(e,d,x),children:e=>{let{touched:t,errors:n}=e;return(0,i.jsx)(u.xu,{children:(0,i.jsx)(B.W,{name:"sliceName",label:"Slice Name","data-testid":"slice-name-input",placeholder:"Pascalised Slice API ID (e.g. TextBlock)",error:t.sliceName?n.sliceName:void 0,testId:"slice-name-input"})})}})};var H=n(21151),U=n(86652),V=n(39204),q=n(7974),M=()=>{var e,t,n,o;let y=(0,r.useRouter)(),{modalPayload:b,onOpenModal:S}=(0,j.H)(),{openLoginModal:k}=(0,D.Z)(),w=(0,p.F)({menuType:"Dropdown"}),{sliceFilterFn:I,defaultVariationSelector:z}=b,{remoteSlices:N,libraries:W}=(0,c.v9)(e=>({remoteSlices:(0,T.sT)(e),libraries:(0,T.Sd)(e)})),[_,F]=(0,a.useState)(!1),[L,P]=(0,a.useState)(!1),[A,B]=(0,a.useState)(!1),[E,M]=(0,a.useState)(!1),Q=W.filter(e=>e.isLocal),Y=W.map(e=>(e.components=[...e.components].sort((e,t)=>e.model.name.localeCompare(t.model.name)),e)),G=(W||[]).map(e=>e.components).flat(),J=G.length,[K,$]=(0,a.useState)(),ee=()=>{P(!0)},et=()=>{B(!0)},en=async()=>{await C.managerClient.user.checkIsLoggedIn()?M(!0):k()},ei=()=>{M(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s(),{children:(0,i.jsx)("title",{children:"Slices - Slice Machine"})}),(0,i.jsxs)(v.LN,{children:[(0,i.jsxs)(v.wd,{children:[(0,i.jsx)(v.Cx,{children:(0,i.jsx)(m.g,{children:"Slices"})}),(null==Q?void 0:Q.length)!==0&&0!==J?(0,i.jsxs)(l.ar,{children:[(0,i.jsx)(l.av,{children:(0,i.jsx)(l.E,{color:"purple",startIcon:"add","data-testid":"add-new-slice-dropdown",children:"Add"})}),(0,i.jsxs)(l.as,{align:"end",children:[(0,i.jsx)(l.at,{renderStartIcon:()=>w.fromImage.BackgroundIcon,onSelect:()=>void en(),description:w.fromImage.description,children:w.fromImage.title}),(0,i.jsx)(l.at,{renderStartIcon:()=>w.fromScratch.BackgroundIcon,onSelect:()=>F(!0),description:w.fromScratch.description,children:w.fromScratch.title})]})]}):void 0]}),(0,i.jsxs)(v.RN,{children:[(0,i.jsx)(x.xR,{sx:{display:"flex",flexDirection:"column"},children:Y.length>0?(0,i.jsx)(u.kC,{sx:{flex:1,flexDirection:"column"},children:0===J?(0,i.jsx)(u.kC,{sx:{flex:1,justifyContent:"center",alignItems:"center"},children:(0,i.jsx)(Z,{title:"What are slices?",onCreateNew:()=>{F(!0)},buttonText:"Create one",videoPublicIdUrl:q.rd,documentationComponent:(0,i.jsxs)(i.Fragment,{children:['Slices are sections of your website. Prismic documents contain a dynamic "Slice Zone" that allows content creators to add, edit, and rearrange slices to compose dynamic layouts for any page design.'," ",(0,i.jsx)(u.rU,{target:"_blank",href:"https://prismic.io/docs/core-concepts/slices",sx:e=>{var t;return{color:null==e?void 0:null===(t=e.colors)||void 0===t?void 0:t.primary}},children:"Learn more"}),"."]}),"data-testid":"slices-table-blank-slate"})}):Y.map(e=>{let{name:t,isLocal:n,components:l}=e;return(0,i.jsxs)(u.kC,{sx:{flexDirection:"column","&:not(:last-of-type)":{mb:4}},children:[(0,i.jsxs)(u.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(u.kC,{sx:{alignItems:"center",fontSize:3,lineHeight:"48px",fontWeight:"heading",mb:1},children:(0,i.jsx)(u.xv,{children:1===Y.length?"Your slices":t})}),!n&&(0,i.jsx)("p",{children:"⚠️ External libraries are read-only"})]}),(0,i.jsx)(H.Z,{elems:l,defineElementKey:e=>e.model.name,renderElem:e=>(0,i.jsx)(f.b,{action:{type:"menu",onRemove:()=>{$(e),ee()},onRename:()=>{$(e),et()}},mode:"navigation",onUpdateScreenshot:()=>{S({sliceFilterFn:t=>t.filter(t=>t.model.id===e.model.id)})},slice:e,variant:"solid"}),gridGap:"32px 16px"})]},t)})}):void 0}),(null==Q?void 0:Q.length)>0&&(0,i.jsx)(U.Z,{slices:I(G),defaultVariationSelector:z}),(null==Q?void 0:Q.length)>0&&_&&(0,i.jsx)(O.c,{localLibraries:Q,location:"slices",remoteSlices:N,onSuccess:(e,t)=>{let n=e.variations[0].id,i=g.Y.getBuilderPagePathname({libraryName:t,sliceName:e.name,variationId:n});y.push(i),d.Am.success((0,V.kQ)({path:"".concat(t,"/").concat(e.name,"/model.json")}))},onClose:()=>{F(!1)}}),(0,i.jsx)(X,{isOpen:A,slice:K,onClose:()=>{B(!1)},"data-testid":"rename-slice-modal"}),(0,i.jsx)(R,{isOpen:L,libName:null!==(e=null==K?void 0:K.from)&&void 0!==e?e:"",sliceId:null!==(t=null==K?void 0:K.model.id)&&void 0!==t?t:"",sliceName:null!==(n=null==K?void 0:K.model.name)&&void 0!==n?n:"",sliceVariationIds:(null!==(o=null==K?void 0:K.model.variations)&&void 0!==o?o:[]).map(e=>e.id),onClose:()=>{P(!1)}}),(0,i.jsx)(h.S,{open:E,location:"slices",onSuccess:e=>{let{library:t}=e;d.Am.success((0,i.jsx)(V.GX,{message:"Slice(s) added to slice zone and created at: ",path:t})),ei()},onClose:ei})]})]})]})}}},function(e){e.O(0,[898,789,797,397,66,344,444,882,633,593,888,774,179],function(){return e(e.s=26688)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,u,f,d,h,k,j,l,p,g,o,r,m,_,y,I){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,t,g,o,"static/chunks/pages/index-0d8cb369de720a35.js"],"/_error":["static/chunks/pages/_error-fedd2c6ebd3d27b9.js"],"/changelog":[c,i,"static/chunks/870-a72b74312773efea.js","static/chunks/pages/changelog-8514e0696e90a1b2.js"],"/changes":[c,b,"static/chunks/8eec4907-b712959d9f984b68.js",a,"static/chunks/125-00b909bdbab2ca15.js",e,u,"static/css/d98ebc475f8423a3.css","static/chunks/pages/changes-e66094f57453cf9c.js"],"/custom-types":[s,t,g,o,"static/chunks/pages/custom-types-5acd56959b60346f.js"],"/custom-types/[customTypeId]":[c,f,d,h,k,s,a,i,n,j,r,e,t,l,p,m,_,"static/chunks/pages/custom-types/[customTypeId]-6d613b67e6967ae5.js"],"/labs":["static/chunks/pages/labs-56fd818a63553497.js"],"/page-types/[pageTypeId]":[c,f,d,h,k,s,a,i,n,j,r,e,t,l,p,m,_,"static/chunks/pages/page-types/[pageTypeId]-40207b66190e3fcd.js"],"/slices":[c,b,y,s,a,n,I,e,p,u,"static/css/efa5152b7c0f35c0.css","static/chunks/pages/slices-a9b4d6d022cfcd88.js"],"/slices/[lib]/[sliceName]/[variation]":[c,b,f,d,h,k,y,s,a,i,n,j,I,"static/chunks/484-3e011e79c41f0342.js",e,l,u,"static/css/e8e03c0d4003d1eb.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-22ffa2561ac66557.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[b,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/429-aab52070cad2884b.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-faeb6d2f77d97096.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/397-e6c340070a3bcb41.js","static/chunks/59b4e022-ef680789f7cc9b11.js","static/chunks/66-d9d3bcb5d041cb6d.js","static/chunks/882-48d61b2fabee28d8.js","static/chunks/647-aa094286bc248d52.js","static/chunks/183-4ea255b867ff171b.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/344-b64f09e670634ed1.js","static/chunks/593-7ffd1197c3405ef8.js","static/chunks/f36c6662-1f3a854183168b10.js","static/chunks/4c744e84-480e426e4b1cfef3.js","static/chunks/065a3ddb-9a38ca0d60f0bf2f.js","static/chunks/1cc2734a-09fb3b997ad1eb70.js","static/chunks/256-07f768a2b19b0a0e.js","static/chunks/630-2bf927bca082a191.js","static/chunks/633-275b9968b5aaa920.js","static/chunks/248-84a5987f0499b074.js","static/css/4e475d945cf8a890.css","static/chunks/422-c9192a1dbdd2ae0e.js","static/chunks/489-32281540712d98bb.js","static/css/56f2a6684a524374.css","static/chunks/52d4c156-89c6ec6efca0a0bb.js","static/chunks/444-d39213143f782fec.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
package/out/changelog.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/870-a72b74312773efea.js" defer=""></script><script src="/_next/static/chunks/pages/changelog-8514e0696e90a1b2.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/changes.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d98ebc475f8423a3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d98ebc475f8423a3.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d98ebc475f8423a3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d98ebc475f8423a3.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/8eec4907-b712959d9f984b68.js" defer=""></script><script src="/_next/static/chunks/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/125-00b909bdbab2ca15.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/593-7ffd1197c3405ef8.js" defer=""></script><script src="/_next/static/chunks/pages/changes-e66094f57453cf9c.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/f36c6662-1f3a854183168b10.js" defer=""></script><script src="/_next/static/chunks/4c744e84-480e426e4b1cfef3.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-09fb3b997ad1eb70.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/422-c9192a1dbdd2ae0e.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/647-aa094286bc248d52.js" defer=""></script><script src="/_next/static/chunks/630-2bf927bca082a191.js" defer=""></script><script src="/_next/static/chunks/633-275b9968b5aaa920.js" defer=""></script><script src="/_next/static/chunks/489-32281540712d98bb.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-6d613b67e6967ae5.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types/[customTypeId]","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/custom-types.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-aa094286bc248d52.js" defer=""></script><script src="/_next/static/chunks/248-84a5987f0499b074.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-5acd56959b60346f.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-aa094286bc248d52.js" defer=""></script><script src="/_next/static/chunks/248-84a5987f0499b074.js" defer=""></script><script src="/_next/static/chunks/pages/index-0d8cb369de720a35.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/labs.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/pages/labs-56fd818a63553497.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/f36c6662-1f3a854183168b10.js" defer=""></script><script src="/_next/static/chunks/4c744e84-480e426e4b1cfef3.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-09fb3b997ad1eb70.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/422-c9192a1dbdd2ae0e.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/647-aa094286bc248d52.js" defer=""></script><script src="/_next/static/chunks/630-2bf927bca082a191.js" defer=""></script><script src="/_next/static/chunks/633-275b9968b5aaa920.js" defer=""></script><script src="/_next/static/chunks/489-32281540712d98bb.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-40207b66190e3fcd.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/page-types/[pageTypeId]","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/72585f70-28b4d7d5384b3703.js" defer=""></script><script src="/_next/static/chunks/429-aab52070cad2884b.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-faeb6d2f77d97096.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]/simulator","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/e8e03c0d4003d1eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e8e03c0d4003d1eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/e8e03c0d4003d1eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e8e03c0d4003d1eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/f36c6662-1f3a854183168b10.js" defer=""></script><script src="/_next/static/chunks/4c744e84-480e426e4b1cfef3.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-09fb3b997ad1eb70.js" defer=""></script><script src="/_next/static/chunks/52d4c156-89c6ec6efca0a0bb.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/444-d39213143f782fec.js" defer=""></script><script src="/_next/static/chunks/484-3e011e79c41f0342.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/630-2bf927bca082a191.js" defer=""></script><script src="/_next/static/chunks/593-7ffd1197c3405ef8.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-22ffa2561ac66557.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/slices.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/efa5152b7c0f35c0.css" as="style"/><link rel="stylesheet" href="/_next/static/css/efa5152b7c0f35c0.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/efa5152b7c0f35c0.css" as="style"/><link rel="stylesheet" href="/_next/static/css/efa5152b7c0f35c0.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9cc2da8ff60c3087.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/52d4c156-89c6ec6efca0a0bb.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/444-d39213143f782fec.js" defer=""></script><script src="/_next/static/chunks/882-48d61b2fabee28d8.js" defer=""></script><script src="/_next/static/chunks/633-275b9968b5aaa920.js" defer=""></script><script src="/_next/static/chunks/593-7ffd1197c3405ef8.js" defer=""></script><script src="/_next/static/chunks/pages/slices-a9b4d6d022cfcd88.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_buildManifest.js" defer=""></script><script src="/_next/static/uC4K1_hgf7dK4FL02cbUH/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"uC4K1_hgf7dK4FL02cbUH","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slice-machine-ui",
|
|
3
|
-
"version": "2.19.2-beta.
|
|
3
|
+
"version": "2.19.2-beta.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A visual builder for your Slice Models with all the tools you need to generate data models and mock CMS content locally.",
|
|
6
6
|
"repository": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"start-slicemachine": "./bin/start-slicemachine.cjs"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@slicemachine/manager": "0.25.7-beta.
|
|
39
|
-
"start-slicemachine": "0.12.65-beta.
|
|
38
|
+
"@slicemachine/manager": "0.25.7-beta.3",
|
|
39
|
+
"start-slicemachine": "0.12.65-beta.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@emotion/react": "11.11.1",
|