slice-machine-ui 2.17.3-beta.6 → 2.17.3-beta.7
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-f1d584386a1ead7e.js +1 -0
- package/out/_next/static/chunks/907-590c914f55547b96.js +1 -0
- package/out/_next/static/chunks/pages/{_app-9bd805183e832369.js → _app-df4a4d1aaa9d7216.js} +1 -1
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-041985d94bb9649f.js → [customTypeId]-4024560ca59ad2be.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-338f685c0723043b.js → [pageTypeId]-0d2416da0958eb40.js} +1 -1
- package/out/_next/static/chunks/pages/slices-a0aa3bbe2cf1689c.js +1 -0
- package/out/_next/static/{ycrZ72RsSEIu0t0h6roCF → i3RCInXoJzCEi4NnU8YGb}/_buildManifest.js +1 -1
- 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/settings.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/SliceZoneBlankSlate.tsx +9 -13
- package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +9 -13
- package/src/pages/slices.tsx +9 -13
- package/out/_next/static/chunks/268-6a9214b97195af9c.js +0 -1
- package/out/_next/static/chunks/489-7e73874528df7603.js +0 -1
- package/out/_next/static/chunks/pages/slices-4a60cd5f2c71327e.js +0 -1
- package/src/features/builder/useAiSliceGenerationExperiment.ts +0 -8
- /package/out/_next/static/{ycrZ72RsSEIu0t0h6roCF → i3RCInXoJzCEi4NnU8YGb}/_ssgManifest.js +0 -0
|
@@ -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,183,44,349,385,34,647,630,
|
|
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,183,44,349,385,34,647,630,907,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,183,44,349,385,34,647,630,
|
|
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,183,44,349,385,34,647,630,907,489,888,774,179],function(){return n(n.s=61367)}),_N_E=n.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[436],{74600:function(e,t,n){var i=n(34311),o=n(23779),r=i(function(e,t,n){return e+(n?" ":"")+o(t)});e.exports=r},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 f},tB:function(){return u}});var i=n(52322),o=n(56803),r=n(2784),l=n(30195),s=n(94160),a=n(76611),c=n(5683);function d(e){let{type:t,library:n,sliceId:i,variationId:o,langSmithUrl:r}=e,l=(0,c.i)({type:t,library:n,sliceId:i,variationId:o}),s=JSON.stringify({langSmithUrl:r});localStorage.setItem(l,s)}function u(e){let{type:t,library:n,sliceId:i,variationId:o}=e,r=(0,c.i)({type:t,library:n,sliceId:i,variationId:o});localStorage.removeItem(r)}function f(e){let{type:t,library:n,sliceId:d,variationId:u}=e,{key:f,value:m,done:x}=function(e){let{type:t,library:n,sliceId:i,variationId:o}=e,r=(0,c.i)({type:t,library:n,sliceId:i,variationId:o}),[s,d]=(0,a.V)(r,void 0,{schema:l.z.object({langSmithUrl:l.z.string().url().optional()})});return{key:r,value:s,done:()=>d(void 0)}}({type:t,library:n,sliceId:d,variationId:u}),[h,p]=(0,r.useState)(),v=e=>()=>{m&&(p(f),s.Xe.track({event:"slice-generation-feedback",type:t,sliceId:d,variationId:u,feedback:e,langSmithUrl:m.langSmithUrl}),x())};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.be,{children:(0,i.jsx)(o.bQ,{anchor:(0,i.jsx)(o.D,{width:"100%",justifyContent:"center",position:"absolute",bottom:64}),icon:"check",title:"Thanks for your feedback!",seconds:2,open:!!h,onOpenChange:e=>{e||p(void 0)}},h)}),(0,i.jsx)(o.i,{children:m&&(0,i.jsxs)(o.D,{flexDirection:"row",justifyContent:"end",gap:8,alignItems:"center",children:[(0,i.jsx)(o.bL,{color:"grey11",children:"Did the AI get it right?"}),(0,i.jsxs)(o.D,{flexDirection:"row",gap:4,children:[(0,i.jsx)(o.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Looks good",children:(0,i.jsx)(o.aZ,{variant:"solid",size:"small",icon:"thumbUp",onClick:v("up")})}),(0,i.jsx)(o.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Needs improvement",children:(0,i.jsx)(o.aZ,{variant:"solid",size:"small",icon:"thumbDown",onClick:v("down")})})]})]})})]})}},76611:function(e,t,n){"use strict";n.d(t,{V:function(){return o}});var i=n(2784);function o(e,t,n){let{schema:o}=null!=n?n:{},r=()=>{try{let n=localStorage.getItem(e);if(null==n)return t;if(!o)return JSON.parse(n);return o.parse(JSON.parse(n))}catch(e){return t}},[l,s]=(0,i.useState)(r),[a,c]=(0,i.useState)(e);return a!==e&&(c(e),s(r())),[l,(0,i.useCallback)(n=>{s(i=>{let o;if(void 0===(o="function"==typeof n?n(i):n)){try{localStorage.removeItem(e)}catch(e){return i}return t}try{localStorage.setItem(e,JSON.stringify(o))}catch(e){return i}return o})},[e,t])]}},33986:function(e,t,n){"use strict";n.d(t,{z:function(){return a}});var i=n(52322),o=n(2784),r=n(75289);let l=(e,t)=>e?"".concat(e,"-").concat(t):"",s=e=>{switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},a=(0,o.forwardRef)((e,t)=>{let{label:n,Icon:o,type:a,form:c,isLoading:d=!1,disabled:u=!1,onClick:f,sx:m={},iconSize:x=16,iconFill:h,variant:p="primary",...v}=e;return(0,i.jsx)(r.zx,{ref:t,sx:{...m,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",...d?{cursor:"wait !important"}:{}},type:a,form:c,disabled:u||d,onClick:d?void 0:f,variant:p,...v,children:d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.$j,{size:x,color:s(p),"data-testid":l(v["data-testid"],"spinner")}),o&&n]}):(0,i.jsxs)(i.Fragment,{children:[o&&(0,i.jsx)(o,{size:x,fill:h,"data-testid":l(v["data-testid"],"icon")}),n]})})})},46999:function(e,t,n){"use strict";n.d(t,{W:function(){return l}});var i=n(52322),o=n(63397);n(2784);var r=n(75289);let l=e=>{let{name:t,label:n,placeholder:l,error:s,testId:a,onChange:c}=e;return(0,i.jsxs)(r.xu,{mb:3,children:[(0,i.jsx)(r.__,{htmlFor:t,mb:2,children:n}),(0,i.jsx)(o.gN,{name:t,type:"text",placeholder:l,as:r.II,autoComplete:"off",...c?{onChange:c}:null,...a?{"data-testid":a}:null}),s?(0,i.jsx)(r.xv,{"data-testid":a?"".concat(a,"-error"):"input-error",sx:{color:"error",mt:1},children:s}):null]})}},59532:function(e,t,n){"use strict";var i=n(52322),o=n(63397),r=n(37149),l=n.n(r),s=n(75289),a=n(33986),c=n(55862),d=n(30527);function u(e){let{children:t}=e,n=(0,d.W)();return(0,i.jsx)(s.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:r,formId:f,validate:m,onSubmit:x,widthInPx:h,initialValues:p,content:{title:v},cardProps:y,omitFooter:g=!1,isLoading:b=!1,buttonLabel:j="Save",testId:k,actionMessage:S}=e;return l().setAppElement("#__next"),(0,i.jsx)(c.Z,{isOpen:r,shouldCloseOnOverlayClick:!0,onRequestClose:n,contentLabel:v,style:{content:{width:null!=h?h:"900px"}},children:(0,i.jsx)(o.J9,{initialValues:p,validate:e=>m?m(e):void 0,onSubmit:e=>{x(e)},children:e=>{let{isValid:r,isSubmitting:l,values:c,errors:m,touched:x,setFieldValue:h,setValues:p}=e;return(0,i.jsx)(o.l0,{id:f,...null!=k?{"data-testid":k}: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"},...y,Header:(0,i.jsxs)(u,{children:[(0,i.jsx)(s.X6,{sx:{fontSize:"20px"},children:v}),(0,i.jsx)(s.x8,{type:"button",onClick:n})]}),Footer:g?null:(0,i.jsxs)(s.kC,{sx:{alignItems:"space-between"},children:[(0,i.jsx)(s.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof S?S(e):S}),(0,i.jsxs)(s.kC,{sx:{ml:"auto"},children:[(0,i.jsx)(s.zx,{mr:2,type:"button",onClick:n,variant:"secondary",disabled:l||b,children:"Cancel"}),(0,i.jsx)(a.z,{label:j,form:f,type:"submit",disabled:!r||l||b,isLoading:l||b,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:t({isValid:r,isSubmitting:l,values:c,errors:m,touched:x,setFieldValue:h,setValues:p})})})}})})}},31562:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return q}});var i=n(52322),o=n(56803),r=n(97729),l=n.n(r),s=n(5632),a=n(2784),c=n(56580),d=n(88932),u=n(65077),f=n(75289),m=n(43388),x=n(63470),h=n(91589),p=n(27213),v=n(51507),y=n(27763),g=n(21442),b=n(51384),j=n(65186),k=n(59326),S=n(34166),w=n(80148);async function C(e){let{sliceName:t,sliceID:n,libraryID:i,sliceVariationIds:o,onSuccess:r}=e;try{let{errors:e}=await w.managerClient.slices.deleteSlice({libraryID:i,sliceID:n});if(e.length>0)throw e;o.forEach(e=>{(0,S.tB)({type:"model",library:i,sliceId:n,variationId:e})}),r(),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 I=n(68968),L=n(33986),E=n(30527),O=n(55862),R=n(54597);let A=e=>{var t;let{isOpen:n,libName:o,sliceId:r,sliceName:l,sliceVariationIds:s,onClose:c}=e,[d,u]=(0,a.useState)(!1),{deleteSliceSuccess:m}=(0,R.Z)(),{syncChanges:x}=(0,I.g)(),{theme:h}=(0,k.B7)(),p=async()=>{u(!0),await C({libraryID:o,sliceID:r,sliceName:l,sliceVariationIds:s,onSuccess:()=>{m(r,o),x()}}),c(),u(!1)};return(0,i.jsx)(O.Z,{isOpen:n,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:c,children:(0,i.jsx)(E.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)(f.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)(f.kC,{sx:{alignItems:"center"},children:[(0,i.jsx)(j.$vK,{size:20,color:null===(t=h.colors)||void 0===t?void 0:t.greyIcon}),(0,i.jsx)(f.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Delete Slice"})]}),(0,i.jsx)(f.x8,{type:"button",onClick:c})]}),Footer:()=>(0,i.jsxs)(f.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)(L.z,{label:"Cancel",variant:"secondary",onClick:c,sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,i.jsx)(L.z,{label:"Delete",variant:"danger",isLoading:d,sx:{minHeight:39,minWidth:78},onClick:()=>{p()}})]}),children:(0,i.jsxs)(f.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)(f.xv,{sx:{fontWeight:"bold"},children:[o,"/",l,"/"]})," ","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 N=n(36887),z=n(94160),D=e=>{let{title:t,onCreateNew:n,buttonText:o,documentationComponent:r,videoPublicIdUrl:l,...s}=e;return(0,i.jsxs)(f.xu,{sx:{display:"flex",width:"80%",flexWrap:"wrap",justifyContent:"center"},...s,children:[(0,i.jsx)(f.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)(N.nk,{cloudName:"dmtf1daqp",controls:!0,loop:!0,style:{maxWidth:"100%",objectFit:"contain"},publicId:l,onPlay:()=>{z.Xe.track({event:"open-video-tutorials",video:l})}})}),(0,i.jsxs)(f.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)(f.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)(f.X6,{as:"h3",variant:"heading",sx:{fontSize:"16px",lineHeight:"24px",mb:2},children:t}),(0,i.jsx)(f.xv,{variant:"xs",sx:{lineHeight:"24px",fontSize:"13px"},children:r})]}),(0,i.jsxs)(f.xu,{sx:{display:"flex",p:4,alignItems:"center"},children:[(0,i.jsx)(f.zx,{onClick:n,"data-testid":"empty-state-main-button",sx:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0,mr:4},children:o}),(0,i.jsx)(f.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"})]})]})]})},_=n(6256),W=n(63908),P=n(26109);async function F(e){let{slice:t,newSliceName:n,onSuccess:i}=e;try{let e=(0,W.PQ)(t,n),{errors:o}=await w.managerClient.slices.renameSlice({libraryID:t.from,model:P.id.fromSM(e.model)});if(o.length>0)throw o;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 Z=n(7723),T=n(59532),B=n(46999),K=n(63019);let H=e=>{var t,n;let{slice:o,isOpen:r,onClose:l}=e,{renameSliceSuccess:s}=(0,R.Z)(),{syncChanges:a}=(0,I.g)(),{localLibs:d,remoteLibs:u}=(0,c.v9)(e=>({localLibs:(0,Z.Sd)(e),remoteLibs:(0,Z.sT)(e)})),m=null!==(t=null==o?void 0:o.model.name)&&void 0!==t?t:"",x=async e=>{o&&(await F({slice:o,newSliceName:e.sliceName,onSuccess:e=>{s(e.from,e.model),a()}}),l())};return(0,i.jsx)(T.Z,{testId:"rename-slice-modal",isOpen:r,widthInPx:"530px",formId:"rename-slice-modal-".concat(null!==(n=null==o?void 0:o.model.id)&&void 0!==n?n:""),close:l,buttonLabel:"Rename",onSubmit:e=>void x(e),initialValues:{sliceName:m},content:{title:"Rename a slice"},validate:e=>(0,K.h)(e,d,u),children:e=>{let{touched:t,errors:n}=e;return(0,i.jsx)(f.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 X=n(21151),U=n(68105),M=n(39204),V=n(7974),J=n(31860),q=()=>{var e,t,n,r;let j=(0,s.useRouter)(),{modalPayload:k,onOpenModal:S}=(0,g.H)(),{openLoginModal:C}=(0,R.Z)(),I=(0,x.k)(),L=(0,p.F)({menuType:"Dropdown",sectionsNamingExperiment:I}),{sliceFilterFn:E,defaultVariationSelector:O}=k,{remoteSlices:N,libraries:z}=(0,c.v9)(e=>({remoteSlices:(0,Z.sT)(e),libraries:(0,Z.Sd)(e)})),[W,P]=(0,a.useState)(!1),[F,T]=(0,a.useState)(!1),[B,K]=(0,a.useState)(!1),[q,Q]=(0,a.useState)(!1),Y=z.filter(e=>e.isLocal),G=z.map(e=>(e.components=[...e.components].sort((e,t)=>e.model.name.localeCompare(t.model.name)),e)),$=(z||[]).map(e=>e.components).flat(),ee=$.length,[et,en]=(0,a.useState)(),ei=()=>{T(!0)},eo=()=>{K(!0)},er=async()=>{await w.managerClient.user.checkIsLoggedIn()?Q(!0):C()},el=()=>{Q(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l(),{children:(0,i.jsxs)("title",{children:[(0,J._)((0,J.f)(I.value))," - Slice Machine"]})}),(0,i.jsxs)(b.LN,{children:[(0,i.jsxs)(b.wd,{children:[(0,i.jsx)(b.Cx,{children:(0,i.jsx)(m.g,{children:(0,J._)((0,J.f)(I.value))})}),(null==Y?void 0:Y.length)!==0&&0!==ee?(0,i.jsxs)(o.ar,{children:[(0,i.jsx)(o.av,{children:(0,i.jsx)(o.E,{color:"purple",startIcon:"add","data-testid":"add-new-slice-dropdown",children:"Add"})}),(0,i.jsxs)(o.as,{align:"end",children:[(0,i.jsx)(o.at,{renderStartIcon:()=>L.fromImage.BackgroundIcon,onSelect:()=>void er(),description:L.fromImage.description,children:L.fromImage.title}),(0,i.jsx)(o.at,{renderStartIcon:()=>L.fromScratch.BackgroundIcon,onSelect:()=>P(!0),description:L.fromScratch.description,children:L.fromScratch.title})]})]}):void 0]}),(0,i.jsxs)(b.RN,{children:[(0,i.jsx)(u.xR,{sx:{display:"flex",flexDirection:"column"},children:G.length>0?(0,i.jsx)(f.kC,{sx:{flex:1,flexDirection:"column"},children:0===ee?(0,i.jsx)(f.kC,{sx:{flex:1,justifyContent:"center",alignItems:"center"},children:(0,i.jsx)(D,{title:"What are ".concat((0,J._)(I.value),"?"),onCreateNew:()=>{P(!0)},buttonText:"Create one",videoPublicIdUrl:V.rd,documentationComponent:(0,i.jsxs)(i.Fragment,{children:[(0,J._)((0,J.f)(I.value))," ",'are sections of your website. Prismic documents contain a dynamic "',(0,J.f)(I.value)," ",'Zone" that allows content creators to add, edit, and rearrange ',(0,J._)(I.value)," ","to compose dynamic layouts for any page design."," ",(0,i.jsx)(f.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"})}):G.map(e=>{let{name:t,isLocal:n,components:o}=e;return(0,i.jsxs)(f.kC,{sx:{flexDirection:"column","&:not(:last-of-type)":{mb:4}},children:[(0,i.jsxs)(f.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(f.kC,{sx:{alignItems:"center",fontSize:3,lineHeight:"48px",fontWeight:"heading",mb:1},children:(0,i.jsx)(f.xv,{children:I.eligible&&1===G.length?"Your ".concat((0,J._)(I.value)):t})}),!n&&(0,i.jsx)("p",{children:"⚠️ External libraries are read-only"})]}),(0,i.jsx)(X.Z,{elems:o,defineElementKey:e=>e.model.name,renderElem:e=>(0,i.jsx)(v.b,{action:{type:"menu",onRemove:()=>{en(e),ei()},onRename:()=>{en(e),eo()}},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==Y?void 0:Y.length)>0&&(0,i.jsx)(U.Z,{slices:E($),defaultVariationSelector:O}),(null==Y?void 0:Y.length)>0&&W&&(0,i.jsx)(_.c,{localLibraries:Y,location:"slices",remoteSlices:N,onSuccess:(e,t)=>{let n=e.variations[0].id,i=y.Y.getBuilderPagePathname({libraryName:t,sliceName:e.name,variationId:n});j.push(i),d.Am.success((0,M.kQ)({sectionsNamingExperiment:I,path:"".concat(t,"/").concat(e.name,"/model.json")}))},onClose:()=>{P(!1)}}),(0,i.jsx)(H,{isOpen:B,slice:et,onClose:()=>{K(!1)},"data-testid":"rename-slice-modal"}),(0,i.jsx)(A,{isOpen:F,libName:null!==(e=null==et?void 0:et.from)&&void 0!==e?e:"",sliceId:null!==(t=null==et?void 0:et.model.id)&&void 0!==t?t:"",sliceName:null!==(n=null==et?void 0:et.model.name)&&void 0!==n?n:"",sliceVariationIds:(null!==(r=null==et?void 0:et.model.variations)&&void 0!==r?r:[]).map(e=>e.id),onClose:()=>{T(!1)}}),(0,i.jsx)(h.S,{open:q,location:"slices",onSuccess:e=>{let{library:t}=e;d.Am.success((0,i.jsx)(M.GX,{message:"".concat((0,J.f)(I.value),"(s) added to ").concat(I.value," zone and created at: "),path:t})),el()},onClose:el})]})]})]})}},5683:function(e,t,n){"use strict";n.d(t,{i:function(){return r},v:function(){return o}});let i=e=>"slice-machine_".concat(e),o=i("staticFieldsInfoDialogDismissed");function r(e){let{type:t,library:n,sliceId:o,variationId:r}=e;return i(["ai-feedback",t,n,o,r].join("#"))}},76473:function(e,t,n){"use strict";n.d(t,{y1:function(){return b}});var i=n(2784);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}n(52322);var r=["shift","alt","meta","mod","ctrl"],l={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function s(e){return(l[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function a(e,t){return void 0===t&&(t=","),e.split(t)}function c(e,t,n){void 0===t&&(t="+");var i=e.toLocaleLowerCase().split(t).map(function(e){return s(e)}),l={alt:i.includes("alt"),ctrl:i.includes("ctrl")||i.includes("control"),shift:i.includes("shift"),meta:i.includes("meta"),mod:i.includes("mod")},a=i.filter(function(e){return!r.includes(e)});return o({},l,{keys:a,description:n})}"undefined"!=typeof document&&(document.addEventListener("keydown",function(e){void 0!==e.key&&f([s(e.key),s(e.code)])}),document.addEventListener("keyup",function(e){void 0!==e.key&&m([s(e.key),s(e.code)])})),"undefined"!=typeof window&&window.addEventListener("blur",function(){d.clear()});var d=new Set;function u(e){return Array.isArray(e)}function f(e){var t=Array.isArray(e)?e:[e];d.has("meta")&&d.forEach(function(e){return!r.includes(e)&&d.delete(e.toLowerCase())}),t.forEach(function(e){return d.add(e.toLowerCase())})}function m(e){var t=Array.isArray(e)?e:[e];"meta"===e?d.clear():t.forEach(function(e){return d.delete(e.toLowerCase())})}function x(e,t){var n=e.target;void 0===t&&(t=!1);var i=n&&n.tagName;return u(t)?!!(i&&t&&t.some(function(e){return e.toLowerCase()===i.toLowerCase()})):!!(i&&t&&!0===t)}var h=function(e,t,n){void 0===n&&(n=!1);var i,o=t.alt,r=t.meta,l=t.mod,a=t.shift,c=t.ctrl,f=t.keys,m=e.key,x=e.code,h=e.ctrlKey,p=e.metaKey,v=e.shiftKey,y=e.altKey,g=s(x),b=m.toLowerCase();if(!n){if(!y===o&&"alt"!==b||!v===a&&"shift"!==b)return!1;if(l){if(!p&&!h)return!1}else if(!p===r&&"meta"!==b&&"os"!==b||!h===c&&"ctrl"!==b&&"control"!==b)return!1}return!!(f&&1===f.length&&(f.includes(b)||f.includes(g)))||(f?(void 0===i&&(i=","),(u(f)?f:f.split(i)).every(function(e){return d.has(e.trim().toLowerCase())})):!f)},p=(0,i.createContext)(void 0),v=(0,i.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),y=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},g="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function b(e,t,n,o){var r,l=(0,i.useRef)(null),d=(0,i.useRef)(!1),b=n instanceof Array?o instanceof Array?void 0:o:n,j=u(e)?e.join(null==b?void 0:b.splitKey):e,k=n instanceof Array?n:o instanceof Array?o:void 0,S=(0,i.useCallback)(t,null!=k?k:[]),w=(0,i.useRef)(S);k?w.current=S:w.current=t;var C=(!function e(t,n){return t&&n&&"object"==typeof t&&"object"==typeof n?Object.keys(t).length===Object.keys(n).length&&Object.keys(t).reduce(function(i,o){return i&&e(t[o],n[o])},!0):t===n}((r=(0,i.useRef)(void 0)).current,b)&&(r.current=b),r.current),I=(0,i.useContext)(v).enabledScopes,L=(0,i.useContext)(p);return g(function(){if((null==C?void 0:C.enabled)!==!1&&(e=null==C?void 0:C.scopes,0===I.length&&e?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):!!(!e||I.some(function(t){return e.includes(t)})||I.includes("*")))){var e,t=function(e,t){var n;if(void 0===t&&(t=!1),!(x(e,["input","textarea","select"])&&!x(e,null==C?void 0:C.enableOnFormTags)||null!=C&&null!=C.ignoreEventWhen&&C.ignoreEventWhen(e))){if(null!==l.current&&document.activeElement!==l.current&&!l.current.contains(document.activeElement)){y(e);return}(null==(n=e.target)||!n.isContentEditable||null!=C&&C.enableOnContentEditable)&&a(j,null==C?void 0:C.splitKey).forEach(function(n){var i,o,r,l=c(n,null==C?void 0:C.combinationKey);if(h(e,l,null==C?void 0:C.ignoreModifiers)||null!=(r=l.keys)&&r.includes("*")){if(t&&d.current)return;if(("function"==typeof(i=null==C?void 0:C.preventDefault)&&i(e,l)||!0===i)&&e.preventDefault(),"function"==typeof(o=null==C?void 0:C.enabled)?!o(e,l):!0!==o&&void 0!==o){y(e);return}w.current(e,l),t||(d.current=!0)}})}},n=function(e){void 0!==e.key&&(f(s(e.code)),((null==C?void 0:C.keydown)===void 0&&(null==C?void 0:C.keyup)!==!0||null!=C&&C.keydown)&&t(e))},i=function(e){void 0!==e.key&&(m(s(e.code)),d.current=!1,null!=C&&C.keyup&&t(e,!0))},o=l.current||(null==b?void 0:b.document)||document;return o.addEventListener("keyup",i),o.addEventListener("keydown",n),L&&a(j,null==C?void 0:C.splitKey).forEach(function(e){return L.addHotkey(c(e,null==C?void 0:C.combinationKey,null==C?void 0:C.description))}),function(){o.removeEventListener("keyup",i),o.removeEventListener("keydown",n),L&&a(j,null==C?void 0:C.splitKey).forEach(function(e){return L.removeHotkey(c(e,null==C?void 0:C.combinationKey,null==C?void 0:C.description))})}}},[j,C,I]),l}}},function(e){e.O(0,[898,789,397,44,34,658,907,888,774,179],function(){return e(e.s=26688)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,u,
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,d,u,f,h,l,k,j,p,g,o,r,m){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,e,p,g,"static/chunks/pages/index-0d8cb369de720a35.js"],"/_error":["static/chunks/pages/_error-fedd2c6ebd3d27b9.js"],"/changelog":[c,t,"static/chunks/870-a72b74312773efea.js","static/chunks/pages/changelog-063c5e11dfc8fd55.js"],"/changes":[c,i,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-fa4f2563cb5fd014.js",a,n,"static/css/d98ebc475f8423a3.css","static/chunks/pages/changes-564336edb0ed18b0.js"],"/custom-types":[s,e,p,g,"static/chunks/pages/custom-types-5acd56959b60346f.js"],"/custom-types/[customTypeId]":[c,d,u,f,h,s,t,b,l,o,a,e,k,j,r,m,"static/chunks/pages/custom-types/[customTypeId]-4024560ca59ad2be.js"],"/labs":["static/chunks/pages/labs-9630bfb1005be02b.js"],"/page-types/[pageTypeId]":[c,d,u,f,h,s,t,b,l,o,a,e,k,j,r,m,"static/chunks/pages/page-types/[pageTypeId]-0d2416da0958eb40.js"],"/settings":[s,"static/css/e5f781f20e24a5ea.css","static/chunks/pages/settings-01f4aeb9112a1f87.js"],"/slices":[c,i,s,b,a,n,j,"static/css/efa5152b7c0f35c0.css","static/chunks/pages/slices-a0aa3bbe2cf1689c.js"],"/slices/[lib]/[sliceName]/[variation]":[c,i,d,u,f,h,s,t,b,l,a,k,n,"static/css/cdee5b195444f185.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-bd5e45632c419567.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[i,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/157-54b8336d20b41933.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-5008e29008aa04f4.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/settings","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/397-e6c340070a3bcb41.js","static/chunks/59b4e022-ef680789f7cc9b11.js","static/chunks/34-6c3125e6f01c62c7.js","static/chunks/647-7b9b5aa9468f9e4b.js","static/chunks/183-4ea255b867ff171b.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/44-a2056f993381ad0f.js","static/chunks/658-8231c0b729e0124a.js","static/chunks/f36c6662-1f3a854183168b10.js","static/chunks/4c744e84-480e426e4b1cfef3.js","static/chunks/065a3ddb-9a38ca0d60f0bf2f.js","static/chunks/1cc2734a-09fb3b997ad1eb70.js","static/chunks/349-7118116b93278f73.js","static/chunks/630-29c729ad2a291ef6.js","static/chunks/907-590c914f55547b96.js","static/chunks/248-03446cd9e9f13730.js","static/css/4e475d945cf8a890.css","static/chunks/385-b949173dfa03dd3e.js","static/chunks/489-f1d584386a1ead7e.js","static/css/56f2a6684a524374.css"),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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.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-063c5e11dfc8fd55.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"i3RCInXoJzCEi4NnU8YGb","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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.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/918-fa4f2563cb5fd014.js" defer=""></script><script src="/_next/static/chunks/34-6c3125e6f01c62c7.js" defer=""></script><script src="/_next/static/chunks/658-8231c0b729e0124a.js" defer=""></script><script src="/_next/static/chunks/pages/changes-564336edb0ed18b0.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"i3RCInXoJzCEi4NnU8YGb","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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.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/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/44-a2056f993381ad0f.js" defer=""></script><script src="/_next/static/chunks/349-7118116b93278f73.js" defer=""></script><script src="/_next/static/chunks/385-b949173dfa03dd3e.js" defer=""></script><script src="/_next/static/chunks/34-6c3125e6f01c62c7.js" defer=""></script><script src="/_next/static/chunks/647-7b9b5aa9468f9e4b.js" defer=""></script><script src="/_next/static/chunks/630-29c729ad2a291ef6.js" defer=""></script><script src="/_next/static/chunks/907-590c914f55547b96.js" defer=""></script><script src="/_next/static/chunks/489-f1d584386a1ead7e.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-4024560ca59ad2be.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_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":"i3RCInXoJzCEi4NnU8YGb","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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-7b9b5aa9468f9e4b.js" defer=""></script><script src="/_next/static/chunks/248-03446cd9e9f13730.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-5acd56959b60346f.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"i3RCInXoJzCEi4NnU8YGb","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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-7b9b5aa9468f9e4b.js" defer=""></script><script src="/_next/static/chunks/248-03446cd9e9f13730.js" defer=""></script><script src="/_next/static/chunks/pages/index-0d8cb369de720a35.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"i3RCInXoJzCEi4NnU8YGb","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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.js" defer=""></script><script src="/_next/static/chunks/pages/labs-9630bfb1005be02b.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"i3RCInXoJzCEi4NnU8YGb","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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.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/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/44-a2056f993381ad0f.js" defer=""></script><script src="/_next/static/chunks/349-7118116b93278f73.js" defer=""></script><script src="/_next/static/chunks/385-b949173dfa03dd3e.js" defer=""></script><script src="/_next/static/chunks/34-6c3125e6f01c62c7.js" defer=""></script><script src="/_next/static/chunks/647-7b9b5aa9468f9e4b.js" defer=""></script><script src="/_next/static/chunks/630-29c729ad2a291ef6.js" defer=""></script><script src="/_next/static/chunks/907-590c914f55547b96.js" defer=""></script><script src="/_next/static/chunks/489-f1d584386a1ead7e.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-0d2416da0958eb40.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_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":"i3RCInXoJzCEi4NnU8YGb","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/settings.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.css" data-n-g=""/><link rel="preload" href="/_next/static/css/e5f781f20e24a5ea.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e5f781f20e24a5ea.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.css" data-n-g=""/><link rel="preload" href="/_next/static/css/e5f781f20e24a5ea.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e5f781f20e24a5ea.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/pages/settings-01f4aeb9112a1f87.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/settings","query":{},"buildId":"i3RCInXoJzCEi4NnU8YGb","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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.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/157-54b8336d20b41933.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-5008e29008aa04f4.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_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":"i3RCInXoJzCEi4NnU8YGb","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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.css" data-n-g=""/><link rel="preload" href="/_next/static/css/cdee5b195444f185.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cdee5b195444f185.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.css" data-n-g=""/><link rel="preload" href="/_next/static/css/cdee5b195444f185.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cdee5b195444f185.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.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/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/44-a2056f993381ad0f.js" defer=""></script><script src="/_next/static/chunks/349-7118116b93278f73.js" defer=""></script><script src="/_next/static/chunks/34-6c3125e6f01c62c7.js" defer=""></script><script src="/_next/static/chunks/630-29c729ad2a291ef6.js" defer=""></script><script src="/_next/static/chunks/658-8231c0b729e0124a.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-bd5e45632c419567.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_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":"i3RCInXoJzCEi4NnU8YGb","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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.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/cc9b10286400c2b9.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cc9b10286400c2b9.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-b3522fdebabf510a.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-df4a4d1aaa9d7216.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/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/44-a2056f993381ad0f.js" defer=""></script><script src="/_next/static/chunks/34-6c3125e6f01c62c7.js" defer=""></script><script src="/_next/static/chunks/658-8231c0b729e0124a.js" defer=""></script><script src="/_next/static/chunks/907-590c914f55547b96.js" defer=""></script><script src="/_next/static/chunks/pages/slices-a0aa3bbe2cf1689c.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_buildManifest.js" defer=""></script><script src="/_next/static/i3RCInXoJzCEi4NnU8YGb/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"i3RCInXoJzCEi4NnU8YGb","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.17.3-beta.
|
|
3
|
+
"version": "2.17.3-beta.7",
|
|
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.2-beta.
|
|
39
|
-
"start-slicemachine": "0.12.60-beta.
|
|
38
|
+
"@slicemachine/manager": "0.25.2-beta.11",
|
|
39
|
+
"start-slicemachine": "0.12.60-beta.11"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@emotion/react": "11.11.1",
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
} from "@prismicio/editor-ui";
|
|
10
10
|
import { FC } from "react";
|
|
11
11
|
|
|
12
|
-
import { useAiSliceGenerationExperiment } from "@/features/builder/useAiSliceGenerationExperiment";
|
|
13
12
|
import { useSectionsNamingExperiment } from "@/features/builder/useSectionsNamingExperiment";
|
|
14
13
|
import { capitalizeFirstLetter, pluralize } from "@/utils/textConversion";
|
|
15
14
|
|
|
@@ -32,7 +31,6 @@ export const SliceZoneBlankSlate: FC<SliceZoneBlankSlateProps> = ({
|
|
|
32
31
|
projectHasAvailableSlices,
|
|
33
32
|
isSlicesTemplatesSupported,
|
|
34
33
|
}) => {
|
|
35
|
-
const aiSliceGenerationExperiment = useAiSliceGenerationExperiment();
|
|
36
34
|
const sectionsNamingExperiment = useSectionsNamingExperiment();
|
|
37
35
|
const sliceCreationOptions = getSliceCreationOptions({
|
|
38
36
|
menuType: "ActionList",
|
|
@@ -58,17 +56,15 @@ export const SliceZoneBlankSlate: FC<SliceZoneBlankSlateProps> = ({
|
|
|
58
56
|
</BlankSlateDescription>
|
|
59
57
|
<BlankSlateActions>
|
|
60
58
|
<ActionList>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</ActionListItem>
|
|
71
|
-
)}
|
|
59
|
+
<ActionListItem
|
|
60
|
+
renderStartIcon={() =>
|
|
61
|
+
sliceCreationOptions.fromImage.BackgroundIcon
|
|
62
|
+
}
|
|
63
|
+
onClick={openCreateSliceFromImageModal}
|
|
64
|
+
description={sliceCreationOptions.fromImage.description}
|
|
65
|
+
>
|
|
66
|
+
{sliceCreationOptions.fromImage.title}
|
|
67
|
+
</ActionListItem>
|
|
72
68
|
<ActionListItem
|
|
73
69
|
renderStartIcon={() =>
|
|
74
70
|
sliceCreationOptions.fromScratch.BackgroundIcon
|
|
@@ -15,7 +15,6 @@ import { BaseStyles } from "theme-ui";
|
|
|
15
15
|
|
|
16
16
|
import { telemetry } from "@/apiClient";
|
|
17
17
|
import { ListHeader } from "@/components/List";
|
|
18
|
-
import { useAiSliceGenerationExperiment } from "@/features/builder/useAiSliceGenerationExperiment";
|
|
19
18
|
import { useSectionsNamingExperiment } from "@/features/builder/useSectionsNamingExperiment";
|
|
20
19
|
import { CreateSliceFromImageModal } from "@/features/customTypes/customTypesBuilder/CreateSliceFromImageModal";
|
|
21
20
|
import { useCustomTypeState } from "@/features/customTypes/customTypesBuilder/CustomTypeProvider";
|
|
@@ -116,7 +115,6 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
116
115
|
sliceZone,
|
|
117
116
|
tabId,
|
|
118
117
|
}) => {
|
|
119
|
-
const aiSliceGenerationExperiment = useAiSliceGenerationExperiment();
|
|
120
118
|
const availableSlicesTemplates = useSlicesTemplates();
|
|
121
119
|
const [isSlicesTemplatesModalOpen, setIsSlicesTemplatesModalOpen] =
|
|
122
120
|
useState(false);
|
|
@@ -236,17 +234,15 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
236
234
|
</DropdownMenuTrigger>
|
|
237
235
|
|
|
238
236
|
<DropdownMenuContent align="end">
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
</DropdownMenuItem>
|
|
249
|
-
)}
|
|
237
|
+
<DropdownMenuItem
|
|
238
|
+
renderStartIcon={() =>
|
|
239
|
+
sliceCreationOptions.fromImage.BackgroundIcon
|
|
240
|
+
}
|
|
241
|
+
onSelect={() => void openCreateSliceFromImageModal()}
|
|
242
|
+
description={sliceCreationOptions.fromImage.description}
|
|
243
|
+
>
|
|
244
|
+
{sliceCreationOptions.fromImage.title}
|
|
245
|
+
</DropdownMenuItem>
|
|
250
246
|
<DropdownMenuItem
|
|
251
247
|
renderStartIcon={() =>
|
|
252
248
|
sliceCreationOptions.fromScratch.BackgroundIcon
|
package/src/pages/slices.tsx
CHANGED
|
@@ -14,7 +14,6 @@ import { toast } from "react-toastify";
|
|
|
14
14
|
import { BaseStyles, Flex, Link, Text } from "theme-ui";
|
|
15
15
|
|
|
16
16
|
import { BreadcrumbItem } from "@/components/Breadcrumb";
|
|
17
|
-
import { useAiSliceGenerationExperiment } from "@/features/builder/useAiSliceGenerationExperiment";
|
|
18
17
|
import { useSectionsNamingExperiment } from "@/features/builder/useSectionsNamingExperiment";
|
|
19
18
|
import { CreateSliceFromImageModal } from "@/features/customTypes/customTypesBuilder/CreateSliceFromImageModal";
|
|
20
19
|
import { getSliceCreationOptions } from "@/features/customTypes/customTypesBuilder/sliceCreationOptions";
|
|
@@ -47,7 +46,6 @@ import { SliceMachineStoreType } from "@/redux/type";
|
|
|
47
46
|
import { capitalizeFirstLetter, pluralize } from "@/utils/textConversion";
|
|
48
47
|
|
|
49
48
|
const SlicesIndex: React.FunctionComponent = () => {
|
|
50
|
-
const aiSliceGenerationExperiment = useAiSliceGenerationExperiment();
|
|
51
49
|
const router = useRouter();
|
|
52
50
|
const { modalPayload, onOpenModal } = useScreenshotChangesModal();
|
|
53
51
|
const { openLoginModal } = useSliceMachineActions();
|
|
@@ -138,17 +136,15 @@ const SlicesIndex: React.FunctionComponent = () => {
|
|
|
138
136
|
</DropdownMenuTrigger>
|
|
139
137
|
|
|
140
138
|
<DropdownMenuContent align="end">
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
</DropdownMenuItem>
|
|
151
|
-
)}
|
|
139
|
+
<DropdownMenuItem
|
|
140
|
+
renderStartIcon={() =>
|
|
141
|
+
sliceCreationOptions.fromImage.BackgroundIcon
|
|
142
|
+
}
|
|
143
|
+
onSelect={() => void openCreateSliceFromImageModal()}
|
|
144
|
+
description={sliceCreationOptions.fromImage.description}
|
|
145
|
+
>
|
|
146
|
+
{sliceCreationOptions.fromImage.title}
|
|
147
|
+
</DropdownMenuItem>
|
|
152
148
|
<DropdownMenuItem
|
|
153
149
|
renderStartIcon={() =>
|
|
154
150
|
sliceCreationOptions.fromScratch.BackgroundIcon
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[268],{22654:function(e,t,a){a.d(t,{l:function(){return n}});var r=a(96317);function n(){let e=(0,r.L)("slicemachine-image-to-slice");return{eligible:(null==e?void 0:e.value)==="on"}}},91589:function(e,t,a){a.d(t,{S:function(){return x}});var r=a(52322),n=a(56803),i=a(2784),l=a(88932),s=a(94160),c=a(34166),o=a(63470),u=a(98250),d=a(68968),m=a(80148),g=a(54597),p=a(31860),h=a(62434);function f(e){let{slice:t}=e,a="uploading"===t.status||"generating"===t.status,i="uploadError"===t.status||"generateError"===t.status,l="generateError"===t.status||"generating"===t.status||"success"===t.status;return(0,r.jsxs)(h.Zb,{disabled:a,children:[l?(0,r.jsx)(h.ZB,{src:t.thumbnailUrl}):(0,r.jsx)(h.ZB,{component:"div"}),(0,r.jsx)(h.eW,{loading:a,startIcon:function(e){switch(e){case"uploadError":case"generateError":return"close";case"success":return"check";default:return}}(t.status),title:"success"===t.status?t.model.name:t.image.name,subtitle:function(e){switch(e){case"uploading":return"Uploading...";case"uploadError":return"Unable to upload image";case"generating":return"Generating...";case"generateError":return"Something went wrong";case"success":return"Generated"}}(t.status),error:i,action:i?(0,r.jsx)(n.E,{startIcon:"refresh",color:"grey",onClick:t.onRetry,children:"Retry"}):void 0})]})}function x(e){let{open:t,location:a,onSuccess:h,onClose:x}=e,[S,b]=(0,i.useState)([]),[C,I]=(0,i.useState)(!1),{syncChanges:k}=(0,d.g)(),{createSliceSuccess:A}=(0,g.Z)(),{completeStep:E}=(0,u.k)(),U=(0,o.k)(),L=(0,i.useRef)(crypto.randomUUID()),N=e=>{let{index:t,slice:a}=e;b(e=>e.map((e,r)=>r===t?a(e):e))},D=e=>{if(e.length>10){l.Am.error("You can only upload ".concat(10," images at a time."));return}b(e.map(e=>({status:"uploading",image:e}))),e.forEach((e,t)=>B({index:t,image:e}))},B=e=>{let{index:t,image:a}=e,r=L.current;N({index:t,slice:e=>({...e,status:"uploading"})}),j({image:a}).then(e=>{r===L.current&&F({index:t,imageUrl:e})},()=>{r===L.current&&N({index:t,slice:e=>({...e,status:"uploadError",onRetry:()=>B({index:t,image:a})})})})},_=function(e){let{open:t}=e,a=(0,i.useRef)([]);return(0,i.useEffect)(()=>{t&&(a.current=[],m.managerClient.slices.readAllSlices().then(e=>{a.current=e.models.map(e=>{let{model:t}=e;return t})}).catch(()=>null))},[t]),a}({open:t}),F=e=>{let{index:t,imageUrl:a}=e,r=L.current;N({index:t,slice:e=>({...e,status:"generating",thumbnailUrl:a})}),m.managerClient.customTypes.inferSlice({imageUrl:a}).then(e=>{let{slice:n,langSmithUrl:i}=e;r===L.current&&b(e=>e.map((r,l)=>l===t?{...r,status:"success",thumbnailUrl:a,model:function(e){let{existingSlices:t,newSlices:a,slice:r}=e,n=new Set,i=new Set;for(let{id:e,name:a}of t)n.add(e),i.add(a.toLowerCase());for(let e of a)"success"===e.status&&(n.add(e.model.id),i.add(e.model.name.toLowerCase()));let l=r.id,s=2;for(;n.has(l);)l="".concat(r.id,"_").concat(s),s++;let c=r.name;for(s=2;i.has(c.toLowerCase());)c="".concat(r.name).concat(s),s++;return{...r,id:l,name:c}}({existingSlices:_.current,newSlices:e,slice:n}),langSmithUrl:i}:r))},()=>{r===L.current&&N({index:t,slice:e=>({...e,status:"generateError",thumbnailUrl:a,onRetry:()=>F({index:t,imageUrl:a})})})})},z=S.some(e=>"uploading"===e.status||"generating"===e.status),R=S.filter(e=>"success"===e.status),Z=R.length>0;return(0,r.jsxs)(n.ae,{open:t,onOpenChange:e=>{e||C||(x(),L.current=crypto.randomUUID(),b([]))},children:[(0,r.jsx)(n.al,{title:"Generate from image"}),(0,r.jsxs)(n.aj,{gap:0,children:[(0,r.jsxs)(n.ak,{hidden:!0,children:["Upload images to generate ",(0,p._)(U.value)," ","with AI"]}),0===S.length?(0,r.jsx)(n.D,{padding:16,height:"100%",children:(0,r.jsx)(n.aF,{onFilesSelected:D,assetType:"image",maxFiles:10,overlay:(0,r.jsx)(y,{onFilesSelected:D,droppingFiles:!0}),children:(0,r.jsx)(y,{onFilesSelected:D})})}):(0,r.jsx)(n.bn,{stableScrollbar:!1,children:(0,r.jsx)(n.D,{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,padding:16,children:S.map((e,t)=>(0,r.jsx)(f,{slice:e},"slice-".concat(t)))})}),(0,r.jsxs)(n.ah,{children:[(0,r.jsx)(n.ai,{disabled:C}),(0,r.jsxs)(n.af,{disabled:!Z||z,loading:C,onClick:()=>{let e=S.reduce((e,t)=>("success"===t.status&&e.push(t),e),[]);if(!e.length)return;let t=L.current;I(!0),v(e).then(async e=>{let{slices:r,library:n}=e;if(t===L.current)for(let{model:e,langSmithUrl:t}of(A((await (0,s.y0)()).libraries),k(),h({slices:r,library:n}),I(!1),L.current=crypto.randomUUID(),b([]),E("createSlice"),r))s.Xe.track({event:"slice:created",id:e.id,name:e.name,library:n,location:a,mode:"ai",langSmithUrl:t}),(0,c.nZ)({type:"model",library:n,sliceId:e.id,variationId:e.variations[0].id,langSmithUrl:t})}).catch(()=>{t===L.current&&(I(!1),l.Am.error("An unexpected error happened while adding slices."))})},children:[w({location:a,sectionsNamingExperiment:U})," (",R.length,")"]})]})]})]})}function y(e){let t=(0,o.k)(),{droppingFiles:a=!1,onFilesSelected:i}=e;return(0,r.jsx)(n.D,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:a?"purple2":"grey2",border:!0,borderStyle:"dashed",borderColor:a?"purple9":"grey6",children:(0,r.jsxs)(n.s,{children:[(0,r.jsx)(n.x,{lineColor:"purple11",backgroundColor:"purple5",name:"cloudUpload",size:"large"}),(0,r.jsx)(n.z,{children:"Upload your design images."}),(0,r.jsxs)(n.w,{children:["Once uploaded, you can generate"," ",(0,p._)(t.value)," automatically using AI."]}),(0,r.jsx)(n.v,{children:(0,r.jsx)(n.aG,{startIcon:"attachFile",onFilesSelected:i,color:"grey",children:"Add images"})})]})})}async function j(e){let{image:t}=e,a=[await m.managerClient.project.getResolvedRepositoryName(),"shared-slices","prismic-inferred-slices",crypto.randomUUID()].join("/");await m.managerClient.screenshots.initS3ACL();let{url:r}=await m.managerClient.screenshots.uploadScreenshot({keyPrefix:a,data:t});return r}async function v(e){let{libraries:t=[]}=await m.managerClient.project.getSliceMachineConfig(),a=t[0];if(!a)throw Error("No library found in the config.");for(let{model:t}of e){let{errors:e}=await m.managerClient.slices.createSlice({libraryID:a,model:t});if(e.length)throw Error("Failed to create slice ".concat(t.id,"."))}let r=await Promise.all(e.map(async e=>{let{model:t,image:r,langSmithUrl:n}=e;return await m.managerClient.slices.updateSliceScreenshot({libraryID:a,sliceID:t.id,variationID:t.variations[0].id,data:r}),{model:t,langSmithUrl:n}}));return{library:a,slices:r}}let w=e=>{let{location:t,sectionsNamingExperiment:a}=e;switch(t){case"custom_type":return"Add to type";case"page_type":return"Add to page";case"slices":return"Add to ".concat((0,p._)(a.value))}}},27213:function(e,t,a){a.d(t,{F:function(){return l}});var r=a(52322),n=a(56803),i=a(31860);let l=e=>{let{menuType:t,sectionsNamingExperiment:a}=e;return{fromImage:{BackgroundIcon:(0,r.jsx)(n.B,{name:"autoFixHigh",size:"ActionList"===t?"small":"extraSmall",iconSize:"ActionList"===t?"medium":"small",color:"purple",variant:"solid",radius:6}),title:"Generate from image",description:"Build a ".concat(a.value," based on your design image.")},fromScratch:{BackgroundIcon:(0,r.jsx)(n.B,{name:"add",size:"ActionList"===t?"small":"extraSmall",iconSize:"ActionList"===t?"medium":"small",color:"white",variant:"solid",radius:6}),title:"Start from scratch",description:"Build a custom ".concat(a.value," your way.")},fromTemplate:{BackgroundIcon:(0,r.jsx)(n.B,{name:"contentCopy",size:"ActionList"===t?"small":"extraSmall",iconSize:"ActionList"===t?"medium":"small",color:"white",variant:"solid",radius:6}),title:"Use a template",description:"Choose from ready-made examples."},fromExisting:{BackgroundIcon:(0,r.jsx)(n.B,{name:"folder",size:"ActionList"===t?"small":"extraSmall",iconSize:"ActionList"===t?"medium":"small",color:"white",variant:"solid",radius:6}),title:"Reuse an existing ".concat(a.value),description:"Select from your created ".concat((0,i._)(a.value))}}}},6256:function(e,t,a){a.d(t,{c:function(){return w}});var r=a(52322),n=a(2784),i=a(36131),l=a(75289),s=a(94160),c=a(63470),o=a(98250),u=a(88932),d=a(63908),m=a(358),g=a(80148);async function p(e){let{sliceName:t,libraryName:a,location:r,onSuccess:n}=e;try{let e=(0,d.fo)(t),{errors:i}=await g.managerClient.slices.createSlice({libraryID:a,model:e});if(i.length>0)throw i;s.Xe.track({event:"slice:created",id:(0,m.MP)(t),name:t,library:a,location:r,mode:"manual"}),await n(e)}catch(a){let e="An unexpected error happened while creating slice ".concat(t,".");console.error(e,a),u.Am.error(e)}}var h=a(68968),f=a(59532),x=a(54597),y=a(31860),j=a(46999),v=a(63019);let w=e=>{let{onClose:t,onSuccess:a,localLibraries:u,location:d,remoteSlices:m}=e,{createSliceSuccess:g}=(0,x.Z)(),[w,S]=(0,n.useState)(!1),{syncChanges:b}=(0,h.g)(),{completeStep:C}=(0,o.k)(),I=(0,c.k)(),k=async e=>{let t=e.sliceName,r=e.from;S(!0),await p({sliceName:t,libraryName:r,location:d,onSuccess:async e=>{g((await (0,s.y0)()).libraries),a(e,r),b(),C("createSlice")}})};return(0,r.jsx)(f.Z,{testId:"create-slice-modal",isOpen:!0,widthInPx:"530px",isLoading:w,formId:"create-new-slice",close:t,buttonLabel:"Create",onSubmit:e=>{k(e)},initialValues:{sliceName:"",from:u[0].name},validate:e=>(0,v.h)(e,u,m),content:{title:"Create a new ".concat(I.value)},children:e=>{let{touched:t,values:a,setFieldValue:n,errors:s}=e;return(0,r.jsxs)(l.xu,{children:[(0,r.jsx)(j.W,{name:"sliceName",label:"".concat((0,y.f)(I.value)," name"),placeholder:"Pascalised ".concat(I.value," API ID (e.g. TextBlock)"),error:t.sliceName?s.sliceName:void 0,testId:"slice-name-input"}),(0,r.jsx)(l.__,{htmlFor:"from",sx:{mb:2},children:"Target Library"}),(0,r.jsx)(i.ZP,{name:"from",options:u.map(e=>({value:e.name,label:e.name})),onChange:e=>e?void n("from",e.value):null,defaultValue:{value:a.from,label:a.from},styles:{option:e=>({...e,color:"#161618"})},theme:e=>({...e,colors:{...e.colors,primary:"#E9E8EA"}}),menuPortalTarget:document.body})]})}})}},63019:function(e,t,a){a.d(t,{h:function(){return c}});var r=a(96009),n=a.n(r),i=a(74600),l=a.n(i),s=a(7974);function c(e,t,a){let{sliceName:r}=e;return r?s.lS.includes(r.toLowerCase())?{sliceName:'Name "'.concat(r,'" is reserved for Slice Machine use.')}:s.xo.exec(r)?l()(n()(r)).replace(/\s/gm,"")!==r.trim()?{sliceName:"Value has to be PascalCased."}:r.match(/^\d/)?{sliceName:"Value cannot start with a number."}:[...t.flatMap(e=>e.components.map(e=>e.model.name)),...a.map(e=>e.name)].includes(r)?{sliceName:"Slice name is already taken."}:void 0:{sliceName:"No special characters allowed."}:{sliceName:"Cannot be empty"}}},21151:function(e,t,a){var r=a(52322),n=a(75289);t.Z=function(e){let{elems:t,renderElem:a,defineElementKey:i,gridTemplateMinPx:l="320px",gridGap:s="16px",sx:c}=e;return(0,r.jsx)(n.xu,{as:"section",sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(l,", 1fr))"),gridGap:s,pt:2,...c},children:t.map((e,t)=>e?(0,r.jsx)("span",{children:a(e,t)},"".concat(i(e),"-").concat(t+1)):null)})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[489],{19489:function(e,t,l){"use strict";l.d(t,{H:function(){return e2}});var n=l(52322),a=l(56803),i=l(97729),o=l.n(i),r=l(5632),s=l(2784),c=l(56580),d=l(43388),u=l(77630),m=l(23094),h=l(59294),p=l(51384),x=l(74217),v=l(94160),b=l(68968),y=l(23710),f=l(54597),g=l(98564);let j=(0,s.createContext)(void 0);function S(e){let{children:t,initialCustomType:l}=e,[a,i]=(0,s.useState)(l),o=(0,u.y6)(a),r=g.$[o],{actionQueueStatus:c,setNextAction:d}=(0,y.c)({errorMessage:r.autoSaveFailed}),{refreshState:m}=(0,f.Z)(),h=(0,x.R9)(m),{syncChanges:p}=(0,b.g)(),S=(0,s.useCallback)(e=>{let{customType:t,onSaveCallback:l,updateMeta:n}=e;i(t),d(async()=>{let{errors:e}=await (0,v.KA)({customType:t,updateMeta:n});if(e.length>0)throw e;h(await (0,v.y0)()),p(),null==l||l()})},[d,h,p]),I=(0,s.useMemo)(()=>({actionQueueStatus:c,customType:a,setCustomType:S}),[c,a,S]);return(0,n.jsx)(j.Provider,{value:I,children:"function"==typeof t?t(I):t})}function I(){let e=(0,s.useContext)(j);if(!e)throw Error("CustomTypeProvider not found");return e}var C=l(30195);function T(){var e;let[t,l]=(0,s.useState)(!1),{customType:i,setCustomType:o}=I(),[r,c]=null!==(e=(0,u.j5)(i))&&void 0!==e?e:[],d=c?(0,u.N3)(c):"",[m,h]=(0,s.useState)(null!=d?d:""),[p,v]=(0,s.useState)();(0,x.pQ)(t,()=>{t||(h(null!=d?d:""),v(void 0))});let b=(0,s.useCallback)(()=>(0,n.jsx)(a.aX,{name:c?"language":"add",size:"small",color:"grey11"}),[c]);return(0,n.jsxs)(a.ae,{open:t,onOpenChange:l,size:"small",trigger:(0,n.jsx)(a.E,{color:"grey",textColor:"placeholder",textWeight:"normal",renderStartIcon:b,sx:{marginInline:"auto"},children:c?d:"Add an UID"}),children:[(0,n.jsx)(a.al,{title:"Edit the UID label"}),(0,n.jsx)(a.aj,{children:(0,n.jsxs)(a.aJ,{onSubmit:function(){p||(o({customType:c?(0,u.eK)(m,i):(0,u.H8)(m,i)}),l(!1))},children:[(0,n.jsx)(a.D,{flexDirection:"column",padding:16,gap:4,children:(0,n.jsx)(a.aM,{type:"text",label:"Label *",placeholder:"UID",value:m,onValueChange:function(e){h(e),v(function(e){let t=D.safeParse(e,{errorMap:k});if(t.error)return t.error.errors[0].message}(e))},error:p,description:"A label for the UID"})}),(0,n.jsxs)(a.ah,{children:[(0,n.jsx)(a.ai,{size:"medium"}),(0,n.jsx)(a.af,{type:"submit",size:"medium",disabled:!!p,children:"Save"})]})]})})]})}let D=C.z.string().max(35).min(1),k=e=>{switch(e.code){case C.z.ZodIssueCode.too_big:return{message:"The label can't be longer than ".concat(e.maximum," characters")};case C.z.ZodIssueCode.too_small:return{message:"This field is required"};default:return{message:"Invalid value"}}};var w=l(94840),_=l(59532),L=l(63397),A=l(75289);let E=e=>{let{name:t,label:l,placeholder:a,error:i,...o}=e;return(0,n.jsxs)(A.xu,{mb:3,children:[(0,n.jsx)(A.__,{htmlFor:t,mb:2,children:l}),(0,n.jsx)(L.gN,{name:t,type:"text",placeholder:a,as:A.II,autoComplete:"off",...o}),i?(0,n.jsx)(A.xv,{sx:{color:"error",mt:1},children:i}):null]})};var N=e=>{let{isOpen:t,onSubmit:l,close:a,tabIds:i}=e;return(0,n.jsx)(_.Z,{isOpen:t,widthInPx:"530px",formId:"create-tab",close:a,onSubmit:e=>{l(e),a()},initialValues:{id:""},validate:e=>{let{id:t}=e;return t?i.includes(t.toLowerCase())?{id:"Tab exists already"}:void 0:{id:"Tab ID is required"}},content:{title:"Add Tab"},children:e=>{let{errors:t}=e;return(0,n.jsx)(E,{name:"id",label:"New Tab ID",placeholder:"A label for selecting the tab (i.e. not used in the API)",error:t.id})}})},M=e=>{let{isOpen:t,onSubmit:l,close:a}=e;return(0,n.jsx)(_.Z,{omitFooter:!0,isOpen:t,widthInPx:"530px",formId:"create-tab",close:a,cardProps:{bodySx:{p:0}},onSubmit:e=>{l(e),a()},initialValues:{},content:{title:"Remove Tab"},children:()=>(0,n.jsxs)(A.xu,{sx:{px:4,py:4},children:[(0,n.jsx)(A.X6,{as:"h4",children:"Remove this tab?"}),(0,n.jsx)(A.xv,{as:"p",color:"textClear",sx:{mt:2},children:"This action cannot be undone."}),(0,n.jsx)(A.zx,{type:"button",variant:"buttons.actionDelete",sx:{mt:3},onClick:()=>{l({}),a()},children:"Yes, remove tab"})]})})},z=e=>{let{isOpen:t,onSubmit:l,close:a,tabIds:i,initialTabKey:o}=e;return(0,n.jsx)(_.Z,{omitFooter:!0,isOpen:t,widthInPx:"530px",formId:"create-tab",close:a,cardProps:{bodySx:{p:0}},onSubmit:e=>{l(e),a()},initialValues:{id:o},validate:e=>{let{id:t}=e;return t?i.includes(t.toLowerCase())?{id:"Tab exists already"}:void 0:{id:"Tab ID is required"}},content:{title:"Rename Tab"},children:e=>{let{errors:t,values:i,setFieldValue:o,isValid:r}=e;return(0,n.jsxs)(A.xu,{sx:{px:4,py:4},children:[(0,n.jsx)(E,{name:"id",label:"Rename Tab ID",placeholder:"A label for selecting the tab (i.e. not used in the API)",error:t.id,onBlur:e=>{i.id!==e.target.value&&o("id",e.target.value.trim())},onChange:e=>{o("id",e.target.value)}}),(0,n.jsx)(A.zx,{type:"button",sx:{mt:3,width:"100%"},disabled:!r,onClick:()=>{i.id&&i.id.length&&l({id:i.id.trim()}),a()},children:"Save"})]})}})},Z=l(28316),O=l(88932),P=l(35289),F=l(17378),K=l(45440),B=l(16086),R=l(358),U=l(5495),V=l(39302),X=l(3285),G=l(40141),Y=l(65077),q=l(22654),H=l(63470),Q=l(91589),W=l(27213),$=l(31860);let J=e=>{let{openCreateSliceModal:t,openCreateSliceFromImageModal:l,openUpdateSliceZoneModal:i,openSlicesTemplatesModal:o,projectHasAvailableSlices:r,isSlicesTemplatesSupported:s}=e,c=(0,q.l)(),d=(0,H.k)(),u=(0,W.F)({menuType:"ActionList",sectionsNamingExperiment:d});return(0,n.jsxs)(a.s,{"data-testid":"slice-zone-blank-slate",sx:{width:648},children:[(0,n.jsx)(a.x,{lineColor:"purple9",backgroundColor:"purple5",name:"add",size:"large"}),(0,n.jsxs)(a.z,{size:"big",children:["Add ",(0,$._)(d.value)]}),(0,n.jsxs)(a.w,{children:[(0,$._)((0,$.f)(d.value))," are website sections that you can reuse on different pages with different content. Each on different pages with different content. Each"," ",d.value," has its own component in your code."]}),(0,n.jsx)(a.v,{children:(0,n.jsxs)(a.A,{children:[c.eligible&&(0,n.jsx)(a.b,{renderStartIcon:()=>u.fromImage.BackgroundIcon,onClick:l,description:u.fromImage.description,children:u.fromImage.title}),(0,n.jsx)(a.b,{renderStartIcon:()=>u.fromScratch.BackgroundIcon,onClick:t,description:u.fromScratch.description,children:u.fromScratch.title}),s&&(0,n.jsx)(a.b,{renderStartIcon:()=>u.fromTemplate.BackgroundIcon,onClick:o,description:u.fromTemplate.description,children:u.fromTemplate.title}),r&&(0,n.jsx)(a.b,{renderStartIcon:()=>u.fromExisting.BackgroundIcon,onClick:i,description:u.fromExisting.description,children:u.fromExisting.title})]})})]})};var ee=l(98250);function et(e){let{customType:t,tabId:l,slices:n}=e,a={...t};return n.forEach(e=>{a={...a,tabs:a.tabs.map(t=>t.key===l&&t.sliceZone?{...t,sliceZone:{key:t.sliceZone.key,value:[{key:e.id,value:e},...t.sliceZone.value]}}:t)}}),v.Xe.track({event:"custom-type:slice-zone-updated",customTypeId:t.id}),a}var el=l(18566),en=l(80148);async function ea(){try{let{templates:e,errors:t}=await en.managerClient.sliceTemplateLibrary.readLibrary({});if(t.length>0)throw t;return e.map(e=>({model:e.model,screenshots:Object.fromEntries(Object.entries(e.screenshots).map(e=>{let[t,l]=e;return[t,URL.createObjectURL(l)]}))}))}catch(e){return[]}}var ei=l(6256),eo=l(39204),er=l(7723),es=l(33986),ec=l(30527),ed=l(55862);let eu=e=>{let{deleteSliceZone:t,closeDeleteSliceZoneModal:l}=e;return(0,n.jsx)(ed.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:l,children:(0,n.jsx)(ec.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none",overflow:"hidden"},borderFooter:!0,Header:(0,n.jsxs)(A.kC,{sx:{position:"sticky",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,n.jsx)(A.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Do you really want to delete Slice Zone?"}),(0,n.jsx)(A.x8,{type:"button",onClick:l})]}),Footer:()=>(0,n.jsxs)(A.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,n.jsx)(es.z,{label:"Cancel",variant:"secondary",onClick:l,sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,n.jsx)(es.z,{label:"Delete",variant:"danger",onClick:t,sx:{minHeight:39,minWidth:78}})]}),children:(0,n.jsx)(A.nv,{children:"You're about to delete Slice Zone."})})})};var em=l(43776),eh=l(62434),ep=l(63908),ex=l(63019),ev=l(65375),eb=l.n(ev);let ey=e=>{var t;let{isOpen:l,close:i,onSubmit:o,isLoading:r,slice:d,libraries:u}=e,{remoteSlices:m}=(0,c.v9)(e=>({remoteSlices:(0,er.sT)(e)})),h={from:null===(t=u[0])||void 0===t?void 0:t.name,sliceName:(0,R.MP)(d.key)},[p,v]=(0,s.useState)(h),[b,y]=(0,s.useState)();function f(e){v(e),y((0,ex.h)(e,u,m))}return(0,x.pQ)(l,()=>{l||(v(h),y(void 0))}),(0,n.jsxs)(a.ae,{open:l,onOpenChange:e=>!e&&i(),size:{width:448,height:"auto"},children:[(0,n.jsx)(a.al,{title:"Upgrade slice"}),(0,n.jsx)(a.aj,{children:(0,n.jsx)(a.aJ,{onSubmit:function(){b&&Object.keys(b).length>0||o({libraryID:p.from,sliceID:p.sliceName})},children:(0,n.jsxs)(a.D,{flexDirection:"column",children:[(0,n.jsxs)(a.bn,{className:eb().scrollArea,children:[(0,n.jsx)(a.bL,{variant:"normal",color:"grey11",children:"This will create a new slice with the same fields. The new slice will replace the legacy slice in all of your types, and the existing slice content will be re-mapped to the new slice."}),(0,n.jsx)(a.bL,{variant:"normal",color:"grey11",children:"This will not migrate your component. You will need to do that manually."}),(0,n.jsxs)(a.D,{flexDirection:"column",gap:4,children:[(0,n.jsx)(a.aM,{label:"Slice name *",placeholder:"Pascalised Slice API ID (e.g. ".concat((0,R.MP)(d.key),")"),error:null==b?void 0:b.sliceName,value:p.sliceName,onValueChange:e=>f({...p,sliceName:e.slice(0,30)}),"data-testid":"slice-name-input"}),(0,n.jsx)(a.bL,{variant:"normal",color:"grey11",children:"A display name for the slice"})]}),(0,n.jsxs)(a.D,{flexDirection:"column",gap:4,children:[(0,n.jsx)("label",{className:eb().label,children:(0,n.jsx)(a.bL,{variant:"bold",children:"Slice library *"})}),(0,n.jsx)(a.bq,{size:"medium",color:"grey",startIcon:"folder",flexContent:!0,value:p.from,onValueChange:e=>{e&&f({...p,from:e})},children:u.map(e=>(0,n.jsx)(a.bt,{value:e.name,children:e.name},e.name))}),(0,n.jsx)(a.bL,{variant:"normal",color:"grey11",children:"The library where we'll store your slice"})]})]}),(0,n.jsxs)(a.ah,{children:[(0,n.jsx)(a.ai,{size:"medium"}),(0,n.jsx)(a.af,{type:"submit",size:"medium",loading:r,disabled:b&&Object.keys(b).length>0,children:"Upgrade"})]})]})})})]})};var ef=l(96009),eg=l.n(ef);let ej=e=>{var t,l;let{isOpen:i,close:o,onSubmit:r,isLoading:c,slice:d,sliceName:u,libraries:m,localSharedSlices:h}=e,p={libraryID:null===(t=h[0])||void 0===t?void 0:t.from,sliceID:null===(l=h[0])||void 0===l?void 0:l.model.id,variationID:eg()(d.key),variationName:u},[v,b]=(0,s.useState)(!0),[y,f]=(0,s.useState)(p),[g,j]=(0,s.useState)({});function S(e){f(e),j(eS(e,m))}return(0,x.pQ)(i,()=>{i||(f(p),j({}))}),(0,n.jsxs)(a.ae,{open:i,onOpenChange:e=>!e&&o(),size:{width:448,height:"auto"},children:[(0,n.jsx)(a.al,{title:"Convert to slice variation"}),(0,n.jsx)(a.aj,{children:(0,n.jsx)(a.aJ,{onSubmit:function(){Object.keys(g).length>0||r(y)},children:(0,n.jsxs)(a.D,{display:"flex",flexDirection:"column",children:[(0,n.jsxs)(a.bn,{className:eb().scrollArea,children:[(0,n.jsx)(a.bL,{variant:"normal",color:"grey11",children:"If you have multiple slices that are similar, you can combine them as variations of the same slice."}),(0,n.jsxs)(a.D,{display:"flex",flexDirection:"column",gap:4,children:[(0,n.jsxs)("label",{className:eb().label,children:[(0,n.jsx)(a.bL,{variant:"bold",children:"Target slice *"}),"string"==typeof g.libraryID?(0,n.jsx)(a.bL,{variant:"small",color:"tomato10",children:g.libraryID}):null,"string"==typeof g.sliceID?(0,n.jsx)(a.bL,{variant:"small",color:"tomato10",children:g.sliceID}):null]}),(0,n.jsx)(a.bq,{size:"medium",color:"grey",startIcon:"viewDay",flexContent:!0,value:"".concat(y.libraryID,"::").concat(y.sliceID),onValueChange:e=>{if(e){let[t,l]=e.split("::");S({...y,libraryID:t,sliceID:l})}},children:h.map(e=>(0,n.jsxs)(a.bt,{value:"".concat(e.from,"::").concat(e.model.id),children:[e.from," ",">"," ",e.model.name," (",e.model.id,")"]},"".concat(e.from,"::").concat(e.model.id)))}),(0,n.jsx)(a.bL,{variant:"normal",color:"grey11",children:"Choose the slice to which you would like to add this variation."})]}),(0,n.jsx)(a.D,{display:"flex",flexDirection:"column",gap:4,children:(0,n.jsx)(a.aM,{label:"Variation name *",placeholder:u,error:g.variationName,value:y.variationName,onValueChange:e=>{let t={...y,variationName:e.slice(0,30)};v&&(t.variationID=eg()(t.variationName)),S(t)},"data-testid":"variation-name-input"})}),(0,n.jsx)(a.D,{display:"flex",flexDirection:"column",gap:4,children:(0,n.jsx)(a.aM,{label:"ID *",placeholder:eg()(d.key),error:g.variationID,value:y.variationID,onValueChange:e=>{b(!1),S({...y,variationID:e.slice(0,30)})},"data-testid":"variation-id-input"})})]}),(0,n.jsxs)(a.ah,{children:[(0,n.jsx)(a.ai,{size:"medium"}),(0,n.jsx)(a.af,{type:"submit",size:"medium",loading:c,disabled:Object.keys(g).length>0,children:"Convert"})]})]})})})]})},eS=(e,t)=>{let l={};e.libraryID||(l.libraryID="Cannot be empty.");let n=t.find(t=>t.path===e.libraryID);l.libraryID||n||(l.libraryID="Does not exist."),e.sliceID||(l.sliceID="Cannot be empty.");let a=null==n?void 0:n.components.find(t=>t.model.id===e.sliceID);if(l.sliceID||a||(l.sliceID="Does not exist."),e.variationName||(l.variationName="Cannot be empty."),e.variationID){var i;(null!==(i=null==a?void 0:a.model.variations.map(e=>e.id))&&void 0!==i?i:[]).includes(e.variationID)&&(l.variationID="Slice variation ID is already taken.")}else l.variationID="Cannot be empty.";return l},eI=e=>{var t,l;let{isOpen:i,close:o,onSubmit:r,isLoading:c,identicalSlices:d}=e,u=null!==(l=null===(t=d[0])||void 0===t?void 0:t.path)&&void 0!==l?l:"",[m,h]=(0,s.useState)(u),[p,v]=(0,s.useState)();return(0,x.pQ)(i,()=>{i||(h(u),v(void 0))}),(0,n.jsxs)(a.ae,{open:i,onOpenChange:e=>!e&&o(),size:{width:448,height:"auto"},children:[(0,n.jsx)(a.al,{title:"Merge with an existing slice"}),(0,n.jsx)(a.aj,{children:(0,n.jsx)(a.aJ,{onSubmit:function(){if(p)return;let[e,t,l]=m.split("::");r({libraryID:e,sliceID:t,variationID:l})},children:(0,n.jsxs)(a.D,{display:"flex",flexDirection:"column",children:[(0,n.jsxs)(a.bn,{className:eb().scrollArea,children:[(0,n.jsx)(a.bL,{variant:"normal",color:"grey11",children:"If you have multiple identical slices, you can merge them. All of your content will be remapped to the target slice."}),(0,n.jsxs)(a.D,{display:"flex",flexDirection:"column",gap:4,children:[(0,n.jsxs)("label",{className:eb().label,children:[(0,n.jsx)(a.bL,{variant:"bold",children:"Target slice*"}),"string"==typeof p?(0,n.jsx)(a.bL,{variant:"small",color:"tomato10",children:p}):null]}),(0,n.jsx)(a.bq,{size:"medium",color:"grey",startIcon:"viewDay",flexContent:!0,value:m,onValueChange:function(e){h(e),e||v("Cannot be empty.")},children:d.map(e=>(0,n.jsx)(a.bt,{value:e.path,children:e.path.split("::").join(" > ")},e.path))}),(0,n.jsx)(a.bL,{variant:"normal",color:"grey11",children:"Choose a slice that you would like to merge this into."})]})]}),(0,n.jsxs)(a.ah,{children:[(0,n.jsx)(a.ai,{size:"medium"}),(0,n.jsx)(a.af,{type:"submit",size:"medium",loading:c,disabled:!!p,children:"Merge"})]})]})})})]})},eC=e=>{var t;let{slice:l,path:i}=e,{refreshState:o}=(0,f.Z)(),[r,d]=(0,s.useState)(!1),[u,m]=(0,s.useState)(),{setCustomType:h}=I(),{libraries:p}=(0,c.v9)(e=>({libraries:(0,er.Sd)(e)})),x="Slice"===l.value.type&&null!==(t=l.value.fieldset)&&void 0!==t?t:l.key,b=p.filter(e=>e.isLocal),y=b.map(e=>e.components).flat(),g=eT(l,x,y),j=async e=>{var t,n,a;if(!u)return;d(!0),v.Xe.track({event:"legacy-slice:converted",id:e.sliceID,variation:null!==(t=e.variationID)&&void 0!==t?t:"default",library:e.libraryID,conversionType:u});let{errors:r}=await en.managerClient.slices.convertLegacySliceToSharedSlice({model:l.value,src:{...i,sliceID:l.key},dest:{libraryID:e.libraryID,sliceID:e.sliceID,variationName:null!==(n=e.variationName)&&void 0!==n?n:"Default",variationID:null!==(a=e.variationID)&&void 0!==a?a:"default"}});if(r.length)throw console.error("Could not convert slice `".concat(x,"`"),r),O.Am.error("Could not convert slice `".concat(x,"`")),r;let{model:s,errors:c}=await en.managerClient.customTypes.readCustomType({id:i.customTypeID});if(c.length||!s){console.error("Could not refresh custom type view `".concat(i.customTypeID,"`"),c),O.Am.error("Could not refresh custom type view `".concat(i.customTypeID,"`"));return}switch(o(await (0,v.y0)()),d(!1),m(void 0),u){case"as_new_slice":O.Am.success("".concat(x," has been upgraded to a new slice ").concat(e.libraryID," > ").concat(e.sliceID));break;case"as_new_variation":O.Am.success("".concat(x," has been converted as a variation of ").concat(e.libraryID," > ").concat(e.sliceID));break;default:O.Am.success("".concat(x," has been merged with ").concat(e.libraryID," > ").concat(e.sliceID))}h({customType:s})},S={path:i,slice:l,sliceName:x,libraries:b,localSharedSlices:y,identicalSlices:g,close:()=>m(void 0),onSubmit:j,isLoading:r};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.ar,{children:[(0,n.jsx)(a.av,{children:(0,n.jsx)(a.E,{"data-testid":"convert-legacy-slice",startIcon:"refresh",endIcon:"arrowDropDown",size:"medium",color:"grey",children:"Migrate legacy slice"})}),(0,n.jsxs)(a.as,{align:"start",children:[(0,n.jsx)(a.at,{startIcon:(0,n.jsx)(a.aX,{name:"folder",size:"large"}),description:"Use it with new types",onSelect:()=>m("as_new_slice"),children:"Upgrade slice"}),(0,n.jsx)(a.at,{startIcon:(0,n.jsx)(a.aX,{name:"viewDay",size:"large"}),description:"Add it to another slice",onSelect:()=>m("as_new_variation"),disabled:!y.length,children:"Convert to slice variation"}),(0,n.jsx)(a.at,{startIcon:(0,n.jsx)(a.aX,{name:"driveFileMove",size:"large"}),description:"Combine identical slices",onSelect:()=>m("merge_with_identical"),disabled:!g.length,children:"Merge with another slice"})]})]}),(0,n.jsx)(ey,{...S,isOpen:"as_new_slice"===u}),(0,n.jsx)(ej,{...S,isOpen:"as_new_variation"===u}),(0,n.jsx)(eI,{...S,isOpen:"merge_with_identical"===u})]})},eT=(e,t,l)=>(0,s.useMemo)(()=>{let n=[],a=(0,ep.ux)(e.value,t);for(let e of l)for(let t of e.model.variations){let l=(0,ep.ux)(t,e.model.name);a.primary===l.primary&&a.items===l.items&&n.push({libraryID:e.from,sliceID:e.model.id,variationID:t.id,path:"".concat(e.from,"::").concat(e.model.id,"::").concat(t.id)})}return n},[e,t,l]),eD=e=>{let{slice:t,path:l}=e,[i]=(0,em.E)("legacySliceUpgrader"),o=i.enabled?"This Slice was created with the Legacy Builder. It needs to be converted first to be used within Slice Machine.":"This Slice was created with the Legacy Builder, and is incompatible with Slice Machine. You cannot edit, push, or delete it in Slice Machine. In order to proceed, manually remove the Slice from your type model. Then create a new Slice with the same fields using Slice Machine.";return(0,n.jsxs)(eh.Zb,{children:[(0,n.jsx)(eh.ZB,{component:"div",children:(0,n.jsx)(a.D,{alignItems:"center",justifyContent:"center",children:(0,n.jsx)(a.bL,{color:"grey11",component:"span",children:"No screenshot available"})})}),(0,n.jsxs)(eh.T$,{children:[(0,n.jsx)(a.c3,{content:o,side:"bottom",children:(0,n.jsx)(a.m,{color:"purple",title:"Legacy Slice"})}),i.enabled?(0,n.jsx)(eC,{slice:t,path:l}):null]}),(0,n.jsx)(eh.eW,{subtitle:"1 variation",title:(0,ep.Dj)(t.value)})]})};var ek=l(51507),ew=l(21151);let e_=e=>{let{slices:t,format:l,path:a,onRemoveSharedSlice:i}=e,o=t.some(e=>"SharedSlice"!==e.type),r=g.$[l],[c]=(0,em.E)("legacySliceUpgrader");return(0,s.useEffect)(()=>{o&&(c.enabled?O.Am.info("This ".concat(r.name({start:!1,plural:!1})," contains legacy slices that can be upgraded.")):O.Am.warning("This ".concat(r.name({start:!1,plural:!1})," contains slices that are incompatible.")))},[o]),(0,n.jsx)(ew.Z,{elems:t,defineElementKey:e=>"SharedSlice"!==e.type?e.payload.key:e.payload.model.name,renderElem:e=>{if("SharedSlice"!==e.type){let t=e.payload;return(0,n.jsx)(eD,{slice:t,path:a})}{let t=e.payload;return(0,n.jsx)(ek.b,{action:{type:"remove",onRemove:()=>{i(t.model.id)}},mode:"navigation",slice:t,variant:"solid"})}},sx:{padding:"16px"}})};async function eL(e){try{let{templateIDs:t,localLibrariesNames:l,location:n,onSuccess:a}=e,{data:i,errors:o}=await en.managerClient.sliceTemplateLibrary.createSlices({templateIDs:t});if(o.length>0||void 0===i)throw o;i.sliceIDs.forEach((e,a)=>{v.Xe.track({event:"slice:created",id:e,name:e,library:l[0],location:n,mode:"template",sliceTemplate:t[a]})}),await a(i.sliceIDs)}catch(t){let e="Internal Error: Slice(s) not created";console.error(e,t),O.Am.error(e)}}var eA=l(26109),eE=e=>{let{availableSlices:t,values:l}=e;return(0,n.jsx)(L.F2,{name:"sliceKeys",render:e=>(0,n.jsx)(ew.Z,{gridTemplateMinPx:"200px",elems:t,defineElementKey:e=>"".concat(e.from,"-").concat(e.model.name),renderElem:t=>{let a=l.sliceKeys.includes(t.model.id);return(0,n.jsx)(ek.b,{action:{type:"checkbox"},mode:"selection",onSelectedChange:n=>{n?e.push(t.model.id):e.remove(l.sliceKeys.indexOf(t.model.id))},selected:a,slice:t,variant:"outlined"})}})})};let eN=e=>{let{formId:t,close:l,onSuccess:a,availableSlicesTemplates:i,localLibraries:o,location:r}=e,{createSliceSuccess:s}=(0,f.Z)(),c=(0,H.k)();return(0,n.jsx)(_.Z,{isOpen:!0,buttonLabel:"Add",formId:t,close:l,onSubmit:e=>{let{sliceKeys:t}=e;eL({templateIDs:t,localLibrariesNames:o.map(e=>e.name),location:r,onSuccess:async e=>{s((await (0,v.y0)()).libraries),a(await Promise.all(e.map(async e=>(await en.managerClient.slices.readSlice({libraryID:o[0].name,sliceID:e})).model).filter(e=>void 0!==e)))}})},initialValues:{sliceKeys:[]},content:{title:"Use template ".concat((0,$._)(c.value))},validate:e=>{if(0===e.sliceKeys.length)return{sliceKeys:"Select at least one template to add"}},actionMessage:e=>{let{errors:t}=e;return void 0!==t.sliceKeys?(0,n.jsx)(A.xv,{sx:{color:"error"},children:t.sliceKeys}):void 0},children:e=>{let{values:t}=e;return(0,n.jsx)(eE,{values:t,availableSlices:i.map(e=>({extension:"",fileName:"",from:"",href:"",pathToSlice:"",model:eA.id.toSM(e.model),screenshots:Object.entries(e.screenshots).reduce((e,t)=>({...e,[t[0]]:{url:t[1]}}),{})}))})}})};var eM=e=>{let{formId:t,close:l,onSubmit:a,availableSlices:i}=e,o=(0,H.k)();return(0,n.jsx)(_.Z,{isOpen:!0,buttonLabel:"Add",formId:t,close:l,onSubmit:e=>{let{sliceKeys:t}=e;a(t.map(e=>{var t;return null===(t=i.find(t=>t.model.id===e))||void 0===t?void 0:t.model}).filter(e=>void 0!==e))},initialValues:{sliceKeys:[]},content:{title:"Select existing ".concat((0,$._)(o.value))},testId:"update-slices-modal",validate:e=>{if(0===e.sliceKeys.length)return{sliceKeys:"Select at least one slice to add"}},actionMessage:e=>{let{errors:t}=e;return void 0!==t.sliceKeys?(0,n.jsx)(A.xv,{sx:{color:"error"},children:t.sliceKeys}):void 0},children:e=>{let{values:t}=e;return(0,n.jsx)(eE,{values:t,availableSlices:i})}})};let ez=(e,t)=>{let l=(t||[]).reduce((e,t)=>[...e,...t.components],[]),{slicesInSliceZone:n,notFound:a}=e.value.reduce((e,t)=>{let{key:n,value:a}=t;if("SharedSlice"===a.type){let t=l.find(e=>e.model.id===n);return t?{...e,slicesInSliceZone:[...e.slicesInSliceZone,{type:"SharedSlice",payload:t}]}:{...e,notFound:[...e.notFound,{key:n}]}}return{...e,slicesInSliceZone:[...e.slicesInSliceZone,{type:"Slice",payload:{key:n,value:a}}]}},{slicesInSliceZone:[],notFound:[]});return{availableSlices:l,slicesInSliceZone:n,notFound:a}};var eZ=e=>{var t;let{customType:l,onCreateSliceZone:i,onDeleteSliceZone:o,onRemoveSharedSlice:r,sliceZone:d,tabId:u}=e,m=(0,q.l)(),h=(0,el.QT)(ea,[]),[p,x]=(0,s.useState)(!1),[b,y]=(0,s.useState)(!1),[g,j]=(0,s.useState)(!1),[S,C]=(0,s.useState)(!1),{remoteSlices:T,libraries:D}=(0,c.v9)(e=>({remoteSlices:(0,er.sT)(e),libraries:(0,er.Sd)(e),slices:(0,er.xC)(e)})),{setCustomType:k}=I(),{completeStep:_}=(0,ee.k)(),{openLoginModal:L}=(0,f.Z)(),A=(0,H.k)(),E=(0,W.F)({menuType:"Dropdown",sectionsNamingExperiment:A}),N=D.filter(e=>e.isLocal),{availableSlices:M,slicesInSliceZone:z,notFound:Z}=(0,s.useMemo)(()=>d?ez(d,D):{availableSlices:[],slicesInSliceZone:[],notFound:[]},[d,D]),[F,K]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(null==Z?void 0:Z.length)&&Z.forEach(e=>{let{key:t}=e;r(t)})},[Z]);let B=z.filter(e=>"SharedSlice"===e.type).map(e=>e.payload),R=M.filter(e=>!B.some(t=>t.model.id===e.model.id)),U=()=>{y(!0)},V=()=>{j(!0)},X=async()=>{await en.managerClient.user.checkIsLoggedIn()?C(!0):L()},G=()=>{x(!0),v.Xe.track({event:"custom-type:open-add-from-templates",customTypeId:l.id,customTypeFormat:l.format})},es=()=>{y(!1)},ec=()=>{j(!1)},ed=()=>{C(!1)},em=()=>{x(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P.Bu,{actions:d?(0,n.jsxs)(a.ar,{children:[(0,n.jsx)(a.av,{children:(0,n.jsx)(a.E,{color:"purple",startIcon:"add","data-testid":"add-new-slice-dropdown",children:"Add"})}),(0,n.jsxs)(a.as,{align:"end",children:[m.eligible&&(0,n.jsx)(a.at,{renderStartIcon:()=>E.fromImage.BackgroundIcon,onSelect:()=>void X(),description:E.fromImage.description,children:E.fromImage.title}),(0,n.jsx)(a.at,{renderStartIcon:()=>E.fromScratch.BackgroundIcon,onSelect:V,description:E.fromScratch.description,children:E.fromScratch.title}),h.length>0?(0,n.jsx)(a.at,{onSelect:G,renderStartIcon:()=>E.fromTemplate.BackgroundIcon,description:E.fromTemplate.description,children:E.fromTemplate.title}):void 0,R.length>0?(0,n.jsx)(a.at,{onSelect:U,renderStartIcon:()=>E.fromExisting.BackgroundIcon,description:E.fromExisting.description,children:E.fromExisting.title}):void 0]})]}):void 0,toggle:"page"!==l.format||"Main"!==u?(0,n.jsx)(a.bC,{checked:!!d,onCheckedChange:e=>{e?i():K(!0)},size:"small","data-testid":"slice-zone-switch"}):void 0,children:(0,$._)((0,$.f)(A.value))}),d?z.length>0?(0,n.jsx)(Y.xR,{children:(0,n.jsx)(e_,{slices:z,format:l.format,path:{customTypeID:l.id,tabID:u,sliceZoneID:null!==(t=null==d?void 0:d.key)&&void 0!==t?t:""},onRemoveSharedSlice:r})}):(0,n.jsx)(a.D,{flexDirection:"column",flexGrow:1,justifyContent:"center",alignItems:"center",padding:{block:32},children:(0,n.jsx)(J,{openUpdateSliceZoneModal:U,openCreateSliceModal:V,openCreateSliceFromImageModal:()=>void X(),openSlicesTemplatesModal:G,projectHasAvailableSlices:R.length>0,isSlicesTemplatesSupported:h.length>0})}):void 0,b&&(0,n.jsx)(eM,{formId:"tab-slicezone-form-".concat(u),availableSlices:R,onSubmit:e=>{let t=et({customType:l,tabId:u,slices:e});k({customType:w.Dc.fromSM(t),onSaveCallback:()=>{O.Am.success("Slice(s) added to slice zone")}}),_("createSlice"),es()},close:es}),p&&(0,n.jsx)(eN,{formId:"tab-slicezone-form-".concat(u),availableSlicesTemplates:h,localLibraries:N,location:"".concat(l.format,"_type"),onSuccess:e=>{let t=et({customType:l,tabId:u,slices:e});k({customType:w.Dc.fromSM(t),onSaveCallback:()=>{O.Am.success((0,n.jsx)(eo.GX,{message:"".concat((0,$.f)(A.value)," template(s) added to ").concat(A.value," zone and created at: "),path:"".concat(N[0].name,"/")}))}}),_("createSlice"),em()},close:em}),F&&(0,n.jsx)(eu,{closeDeleteSliceZoneModal:()=>{K(!1)},deleteSliceZone:()=>{o(),K(!1)}}),(null==N?void 0:N.length)!==0&&g&&(0,n.jsx)(ei.c,{onSuccess:e=>{let t=et({customType:l,tabId:u,slices:[e]});k({customType:w.Dc.fromSM(t),onSaveCallback:()=>{O.Am.success((0,n.jsx)(eo.GX,{message:"New ".concat(A.value," added to ").concat(A.value," zone and created at: "),path:"".concat(N[0].name,"/")}))}}),ec()},localLibraries:N,location:"".concat(l.format,"_type"),remoteSlices:T,onClose:ec}),(0,n.jsx)(Q.S,{open:S,location:"".concat(l.format,"_type"),onSuccess:e=>{let{slices:t,library:a}=e,i=et({customType:l,tabId:u,slices:t.map(e=>e.model)});k({customType:w.Dc.fromSM(i),onSaveCallback:()=>{O.Am.success((0,n.jsx)(eo.GX,{message:"".concat((0,$.f)(A.value),"(s) added to ").concat(A.value," zone and created at: "),path:a}))}}),ed()},onClose:ed})]})};let eO=[K.C.UID,K.C.Image,K.C.Text,K.C.StructuredText,K.C.Link,K.C.Select,K.C.Boolean,K.C.Number,K.C.Color,K.C.Date,K.C.Table,K.C.Embed,K.C.Timestamp,K.C.GeoPoint,K.C.ContentRelationship,K.C.LinkToMedia,K.C.Group,K.C.NestedGroup];var eP=e=>{var t,l,i,o;let{tabId:r}=e,{customType:c,setCustomType:d}=I(),m=w.Dc.toSM(c),h=null===(t=m.tabs.find(e=>e.key===r))||void 0===t?void 0:t.sliceZone,p=null!==(i=null===(l=m.tabs.find(e=>e.key===r))||void 0===l?void 0:l.value)&&void 0!==i?i:[],x="page"===m.format&&m.repeatable?p.filter(e=>"uid"!==e.key):p,v=m.tabs.reduce((e,t)=>[...e,...t.value],[]),b=e=>{var t;let{apiId:l,value:n}=e,a=null===(t=n.config)||void 0===t?void 0:t.label;if((0,B.Ss)(K.C,n.type)||null==a)return;if("Range"===n.type||"IntegrationFields"===n.type||"Separator"===n.type)throw Error("Unsupported Field Type: ".concat(n.type));let i=K.C[n.type];try{i.schema.validateSync(n,{stripUnknown:!1})}catch(e){throw Error('Add field: Model is invalid for field "'.concat(n.type,'".'))}let o=w.L$.fromSM(n);d({customType:(0,u.xS)({customType:c,newField:o,newFieldId:l,sectionId:r}),onSaveCallback:()=>{O.Am.success("".concat("Group"===n.type?"Group":"Field"," added"))}}),(0,U.V)({id:l,field:o})},y=e=>{let{apiId:t,newKey:l,value:n,inGroupFieldAction:a,updateMeta:i}=e;if((0,B.Ss)(K.C,n.type))return;let o=w.L$.fromSM(n);d({customType:(0,u.L4)({customType:c,previousFieldId:t,newFieldId:l,newField:o,sectionId:r}),onSaveCallback:()=>{"add"===a&&O.Am.success("Field added")},updateMeta:i}),a||(0,V.Z)({previousId:t,id:l,field:o})};return(0,n.jsx)(F.S,{children:(0,n.jsx)(s.Suspense,{fallback:(0,n.jsx)(a.D,{padding:32,children:(0,n.jsx)(a.bg,{})}),children:(0,n.jsxs)(P.aV,{border:!1,style:{flexGrow:1},children:[(0,n.jsx)(G.Z,{zoneType:"customType",zoneTypeFormat:null!==(o=c.format)&&void 0!==o?o:"custom",tabId:r,title:"Static zone",dataTip:"",fields:x,poolOfFieldsToCheck:v,showHints:!0,EditModal:X.Z,widgetsArray:eO,onDeleteItem:e=>{d({customType:(0,u.AK)({customType:c,fieldId:e,sectionId:r})})},onSave:e=>""===e.apiId?b({...e,apiId:e.newKey}):y(e),onDragEnd:e=>{if((0,B.uS)(e))return;let{source:t,destination:l}=e;if(!l)return;let n=(0,u.gR)({customType:c,sourceIndex:t.index,destinationIndex:l.index,sectionId:r});(0,Z.flushSync)(()=>d({customType:n}))},renderHintBase:e=>{let{item:t}=e;return"data".concat((0,R.Ti)(t.key))},renderFieldAccessor:e=>"data".concat((0,R.Ti)(e)),testId:"static-zone-content",isRepeatableCustomType:c.repeatable}),(0,n.jsx)(eZ,{customType:m,tabId:r,sliceZone:h,onRemoveSharedSlice:e=>{d({customType:(0,u.EN)({customType:c,sectionId:r,sliceId:e})})},onCreateSliceZone:()=>{d({customType:(0,u.Tr)(c,r)})},onDeleteSliceZone:()=>{d({customType:(0,u.E3)(c,r)})}})]})})})};let eF=()=>{var e,t,l;let{customType:i,setCustomType:o}=I(),r=w.Dc.toSM(i),[c,d]=(0,s.useState)(null===(e=r.tabs[0])||void 0===e?void 0:e.key),[m,h]=(0,s.useState)(),p=(null===(l=r.tabs.find(e=>e.key===c))||void 0===l?void 0:null===(t=l.sliceZone)||void 0===t?void 0:t.value.length)===0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.c9,{sx:p?{flexGrow:1}:void 0,children:["page"===i.format?(0,n.jsx)(a.ca,{title:i.repeatable?(0,n.jsx)(T,{}):void 0}):void 0,(0,n.jsxs)(a.cb,{onValueChange:d,value:c,children:[(0,n.jsx)(a.cd,{onAddNewTab:()=>{h({type:"CREATE_CUSTOM_TYPE_TAB"})},children:r.tabs.map(e=>(0,n.jsx)(a.ce,{menu:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.at,{onSelect:()=>{h({type:"UPDATE_CUSTOM_TYPE_TAB",tabKey:e.key})},startIcon:(0,n.jsx)(a.aX,{name:"edit"}),children:"Rename"}),(0,n.jsx)(a.at,{color:"tomato",disabled:function(e){if(r.tabs.length<=1)return!0;let t=r.tabs.find(e=>e.value.find(e=>"uid"===e.key));return"page"===i.format&&i.repeatable&&(null==t?void 0:t.key)===e}(e.key),onSelect:()=>{h({type:"DELETE_CUSTOM_TYPE_TAB",tabKey:e.key})},startIcon:(0,n.jsx)(a.aX,{name:"delete"}),children:"Remove"})]}),value:e.key,children:e.key},e.key))}),r.tabs.map(e=>(0,n.jsx)(a.cc,{value:e.key,children:(0,n.jsx)(eP,{tabId:e.key})},e.key))]})]}),(null==m?void 0:m.type)==="CREATE_CUSTOM_TYPE_TAB"?(0,n.jsx)(N,{close:()=>{h(void 0)},isOpen:!0,onSubmit:e=>{let{id:t}=e;o({customType:(0,u.vB)(i,t)}),d(t)},tabIds:r.tabs.map(e=>e.key.toLowerCase())}):void 0,(null==m?void 0:m.type)==="UPDATE_CUSTOM_TYPE_TAB"?(0,n.jsx)(z,{close:()=>{h(void 0)},initialTabKey:m.tabKey,isOpen:!0,onSubmit:e=>{let{id:t}=e;o({customType:(0,u.HO)(i,m.tabKey,t)}),c===m.tabKey&&d(t)},tabIds:r.tabs.filter(e=>e.key!==m.tabKey).map(e=>e.key.toLowerCase())}):void 0,(null==m?void 0:m.type)==="DELETE_CUSTOM_TYPE_TAB"?(0,n.jsx)(M,{close:()=>{h(void 0)},isOpen:!0,onSubmit:()=>{if(o({customType:(0,u.F$)(i,m.tabKey)}),c===m.tabKey){var e;let t=null===(e=r.tabs.find(e=>e.key!==m.tabKey))||void 0===e?void 0:e.key;void 0!==t&&d(t)}}}):void 0]})};var eK=l(16442),eB=l(78254),eR=l(60867),eU=l(9975),eV=l(34919),eX=l.n(eV);let eG=e=>{let{tabs:t,...l}=e;return(0,n.jsxs)(eU.fC,{...l,className:eX().root,defaultValue:t[0].label,orientation:"vertical",children:[(0,n.jsx)(eU.aV,{className:eX().list,"aria-label":"content tabs",children:t.map((e,t)=>{let{label:l}=e;return(0,n.jsx)(eU.xz,{className:eX().trigger,value:l,children:(0,n.jsx)(a.bL,{className:eX().triggerText,component:"span",color:"inherit",children:l})},"".concat(l,"-trig").concat(t+1))})}),t.map((e,t)=>{let{label:l,content:i}=e;return(0,n.jsx)(eU.VY,{className:eX().content,value:l,children:(0,n.jsx)(a.bn,{className:eX().scrollArea,children:i})},"".concat(l,"-content").concat(t+1))})]})};var eY=l(25661),eq=l(88241),eH=l(32554),eQ=l(44621),eW=l.n(eQ);let e$=e=>{var t,l;let{inline:i,...o}=e,r=(0,eH.p)();if(!0===i)return(0,n.jsx)("code",{...o,className:eW().inlineCode});let s=(()=>{var e,t,l,n,a;if((null===(t=o.node)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.meta)!==void 0){let e=null===(n=o.node)||void 0===n?void 0:null===(l=n.data)||void 0===l?void 0:l.meta;return{fileName:e.substring(1,e.length-1),language:null===(a=o.className)||void 0===a?void 0:a.split("-")[1]}}return null})(),c=null===(t=/language-(\w+)/.exec(null!==(l=o.className)&&void 0!==l?l:""))||void 0===t?void 0:t[1];return(0,n.jsx)(a.W,{...o,onCopy:()=>{v.Xe.track({event:"page-type:copy-snippet",framework:r})},language:c,code:String(o.children).replace(/\n$/,""),title:null==s?void 0:s.fileName})},eJ=e=>{let{markdown:t}=e;return(0,n.jsx)(eY.D,{children:t,linkTarget:"_blank",remarkPlugins:[eq.Z],components:{code:e=>(0,n.jsx)(e$,{...e}),h1:e=>(0,n.jsx)(a.bL,{children:e.children,component:"h1",variant:"h1"}),h2:e=>(0,n.jsx)(a.bL,{children:e.children,component:"h2",variant:"h2"}),h3:e=>(0,n.jsx)(a.bL,{children:e.children,component:"h3",variant:"h3"}),h4:e=>(0,n.jsx)(a.bL,{children:e.children,component:"h4",variant:"h4"}),h5:e=>(0,n.jsx)(a.bL,{children:e.children,component:"h4",variant:"h4"}),p:e=>(0,n.jsx)(a.bL,{className:eW().section,children:e.children,component:"p",variant:"normal"}),pre:e=>(0,n.jsx)(a.bL,{className:eW().section,children:e.children,component:"pre",variant:"normal"})}})};async function e0(e){let t=JSON.parse(e),{errors:l,documentation:n}=await en.managerClient.documentation.read({kind:t.kind,data:t.data});if(l.length>0)throw l;return n}var e1=l(65480),e4=l.n(e1);let e3=e=>{var t;let{model:l}=e,i=(0,eH.p)(),o=(t={kind:"PageSnippet",data:{model:l}},(0,el.QT)(e0,[JSON.stringify(t)])),{completeStep:r}=(0,ee.k)();return 0===o.length?null:(0,n.jsxs)(a.ae,{size:"small",trigger:(0,n.jsx)(a.E,{color:"grey",onClick:()=>{r("codePage"),v.Xe.track({event:"page-type:open-snippet",framework:i})},startIcon:"code",children:"Page snippet"}),children:[(0,n.jsx)(a.al,{icon:"code",title:"Page snippet"}),(0,n.jsx)("section",{className:e4().content,children:o.length>1?(0,n.jsx)(eG,{style:{flex:1},tabs:o.map((e,t)=>{let{label:l,content:a}=e;return{label:null!=l?l:"Tab ".concat(t+1),content:(0,n.jsx)(eJ,{markdown:a})}})}):(0,n.jsx)(a.bn,{style:{flex:1,padding:16},children:(0,n.jsx)(eJ,{markdown:o[0].content})})})]})},e6=e=>{let{model:t}=e;return(0,n.jsx)("div",{children:(0,n.jsx)(F.S,{children:(0,n.jsx)(s.Suspense,{fallback:(0,n.jsx)(a.E,{color:"grey",startIcon:"code",children:"Page snippet"}),children:(0,n.jsx)(e3,{model:t})})})})},e2=()=>{let e=(0,r.useRouter)(),{selectedCustomType:t}=(0,c.v9)(t=>({selectedCustomType:(0,eB.Jk)(t,(0,h.Ag)(e.query))}));return((0,s.useEffect)(()=>{t&&(0,eK.TG)(t)||e.replace("/")},[t,e]),t&&(0,eK.TG)(t))?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o(),{children:(0,n.jsxs)("title",{children:[t.local.label," - Slice Machine"]})}),(0,n.jsx)(e8,{customType:t.local})]}):(0,n.jsx)(p.LN,{})},e8=e=>{let{customType:t}=e;return null===t?(0,n.jsx)(p.LN,{}):(0,n.jsx)(p.LN,{children:(0,n.jsx)(S,{initialCustomType:w.Dc.fromSM(t),children:e=>{var l;let{actionQueueStatus:i,customType:o,setCustomType:r}=e,s=(0,u.y6)(o),c=h.cd[t.format],x=g.$[t.format];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(p.wd,{children:[(0,n.jsx)(p.Xq,{url:c.tablePagePathname}),(0,n.jsxs)(p.Cx,{children:[(0,n.jsx)(d.g,{children:x.name({start:!0,plural:!0})}),(0,n.jsx)(d.g,{active:!0,children:null!==(l=o.label)&&void 0!==l?l:o.id})]}),(0,n.jsxs)(p.K2,{children:[(0,n.jsx)(m.X,{status:i}),"page"===o.format?(0,n.jsx)(e6,{model:o}):void 0,(0,n.jsx)(eR._,{isChangesLocal:!0,format:s,customType:o,setLocalCustomType:r})]})]}),(0,n.jsx)(p.RN,{children:(0,n.jsx)(a.D,{flexDirection:"column",minWidth:0,children:(0,n.jsx)(eF,{})})})]})}})})}},43776:function(e,t,l){"use strict";l.d(t,{E:function(){return a}});var n=l(31470);function a(e){var t,l;let[a,i]=(0,n.f)(),o=async t=>{let l={...a,labs:{...a.labs}};t?l.labs[e]=t:e in l.labs&&delete l.labs[e],0===Object.keys(l.labs).length&&delete l.labs,await i(l)};return[{enabled:null!==(l=null==a?void 0:null===(t=a.labs)||void 0===t?void 0:t[e])&&void 0!==l&&l},o]}},31470:function(e,t,l){"use strict";l.d(t,{f:function(){return i}});var n=l(18566),a=l(80148);function i(){return[(0,n.QT)(o,[]),async e=>{await a.managerClient.project.writeSliceMachineConfig({config:e}),(0,n.VA)(o,[],e)}]}async function o(){return a.managerClient.project.getSliceMachineConfig()}},34919:function(e){e.exports={flex:"ContentTabs_flex__T21Oc",column:"ContentTabs_column__1f8b8 ContentTabs_flex__T21Oc",root:"ContentTabs_root__Gn3Zg ContentTabs_column__1f8b8 ContentTabs_flex__T21Oc",list:"ContentTabs_list__rAZtl ContentTabs_flex__T21Oc",trigger:"ContentTabs_trigger__cTyPN ContentTabs_column__1f8b8 ContentTabs_flex__T21Oc",triggerText:"ContentTabs_triggerText__p_ZBl",content:"ContentTabs_content__H1Stj ContentTabs_column__1f8b8 ContentTabs_flex__T21Oc",scrollArea:"ContentTabs_scrollArea__DuDcQ"}},65480:function(e){e.exports={content:"PageSnippetDialog_content__jIN6d"}},44621:function(e){e.exports={section:"MarkdownRenderer_section__uNS1M",inlineCode:"MarkdownRenderer_inlineCode__lmGTi"}},65375:function(e){e.exports={scrollArea:"ConvertLegacySliceButton_scrollArea__xf3vM",label:"ConvertLegacySliceButton_label__BK0Gd"}}}]);
|