@malloy-publisher/server 0.9.7 → 0.9.8

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.
Files changed (29) hide show
  1. package/dist/app/api-doc.yaml +727 -361
  2. package/dist/app/assets/EnvironmentPage-1dxk_vne.js +1 -0
  3. package/dist/app/assets/{HomePage-BM31X4Y8.js → HomePage-DOCeWyiv.js} +1 -1
  4. package/dist/app/assets/MainPage-Baqv8q6B.js +1 -0
  5. package/dist/app/assets/ModelPage-BuMKFY0Q.js +2 -0
  6. package/dist/app/assets/PackagePage-DMRAjKE6.js +1 -0
  7. package/dist/app/assets/{RenderedResult-CkUS04tl.es-CNz9JsEK.js → RenderedResult-DZj-FnOJ.es-8Pxk7Ln2.js} +2 -2
  8. package/dist/app/assets/{RouteError-DLJlCtRG.js → RouteError-CXf8Frkp.js} +1 -1
  9. package/dist/app/assets/{ThemeEditorPage-Ck4rJ1vv.js → ThemeEditorPage-BzjDFaw6.js} +1 -1
  10. package/dist/app/assets/ToggleButtonGroup-o0Gqmq5F.js +1 -0
  11. package/dist/app/assets/documentRoutes-B2MDvZ3y.js +1 -0
  12. package/dist/app/assets/{index-BcsfsLm3.js → index-Buv5Qzfs.js} +1 -1
  13. package/dist/app/assets/{index-D3HZqxOW.js → index-BuyzVBLU.js} +1 -1
  14. package/dist/app/assets/index-CDTd6FbM.js +483 -0
  15. package/dist/app/assets/{index-wawGd6k1.js → index-CvMqTqVr.js} +1 -1
  16. package/dist/app/assets/index.es-CECvOvgr.js +195 -0
  17. package/dist/app/index.html +1 -1
  18. package/dist/package_load_worker.mjs +15899 -17181
  19. package/dist/server.mjs +11292 -11153
  20. package/dist/sshcrypto-cqb52edz.node +0 -0
  21. package/package.json +1 -1
  22. package/dist/app/assets/EnvironmentPage-V6cQ_Kpr.js +0 -1
  23. package/dist/app/assets/MainPage-CQW3P4wB.js +0 -1
  24. package/dist/app/assets/ModelPage-dBHaHb6u.js +0 -2
  25. package/dist/app/assets/PackagePage-B-ruDCyR.js +0 -1
  26. package/dist/app/assets/ToggleButtonGroup-Bwj7gIJm.js +0 -1
  27. package/dist/app/assets/documentRoutes-DGm_-EUy.js +0 -1
  28. package/dist/app/assets/index-hnA8HjeH.js +0 -484
  29. package/dist/app/assets/index.es-B2kJpnhe.js +0 -195
Binary file
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "snowflake"
20
20
  ],
21
21
  "homepage": "https://docs.malloydata.dev/documentation/user_guides/publishing/mcp_agents",
22
- "version": "0.9.7",
22
+ "version": "0.9.8",
23
23
  "main": "dist/server.mjs",
24
24
  "bin": {
25
25
  "malloy-publisher": "dist/server.mjs"
@@ -1 +0,0 @@
1
- import{q as r,E as t,j as e,a5 as i,am as o}from"./index-hnA8HjeH.js";function c(){const s=r(),{environmentName:n}=t();if(n){const a=i({environmentName:n});return e.jsx(o,{onSelectPackage:s,resourceUri:a})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{c as default};
@@ -1 +0,0 @@
1
- import{c as g,j as t,s as E,B as Se,m as Q,e as le,g as he,a as xe,r as u,u as me,b as Me,d as V,f as fe,T as G,h as K,i as Ce,k as Pe,l as Ee,o as ge,n as ze,p as Ie,t as ce,v as De,w as Te,x as N,y as $,M as Re,P as Be,z as Le,S as He,A as Z,C as $e,D as Oe,I as de,E as ye,q as J,F as p,G as Ne,H as Y,K as W,L as ee,N as Ae,O as Ve,Q as pe,R as We,U as te,V as re,W as ne,X as Fe,Y as Ue,Z as _e,_ as Xe}from"./index-hnA8HjeH.js";import{e as Ye,s as qe}from"./documentRoutes-DGm_-EUy.js";const Qe=g(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Ge=E(Se,{name:"MuiBreadcrumbCollapsed"})(Q(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:le(e.palette.grey[200],.12)}:{backgroundColor:le(e.palette.grey[600],.12)}}}))),Ke=E(Qe)({width:24,height:16});function Ze(e){const{slots:r={},slotProps:o={},...n}=e,s=e;return t.jsx("li",{children:t.jsx(Ge,{focusRipple:!0,...n,ownerState:s,children:t.jsx(Ke,{as:r.CollapsedIcon,ownerState:s,...o.collapsedIcon})})})}function Je(e){return he("MuiBreadcrumbs",e)}const et=xe("MuiBreadcrumbs",["root","ol","li","separator"]),tt=e=>{const{classes:r}=e;return fe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Je,r)},rt=E(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${et.li}`]:r.li},r.root]})({}),nt=E("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ot=E("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function st(e,r,o,n){return e.reduce((s,l,i)=>(i<e.length-1?s=s.concat(l,t.jsx(ot,{"aria-hidden":!0,className:r,ownerState:n,children:o},`separator-${i}`)):s.push(l),s),[])}const at=u.forwardRef(function(r,o){const n=me({props:r,name:"MuiBreadcrumbs"}),{children:s,className:l,component:i="nav",slots:d={},slotProps:f={},expandText:h="Show path",itemsAfterCollapse:m=1,itemsBeforeCollapse:v=1,maxItems:y=8,separator:z="/",...H}=n,[I,M]=u.useState(!1),j={...n,component:i,expanded:I,expandText:h,itemsAfterCollapse:m,itemsBeforeCollapse:v,maxItems:y,separator:z},C=tt(j),D=Me({elementType:d.CollapsedIcon,externalSlotProps:f.collapsedIcon,ownerState:j}),k=u.useRef(null),w=c=>{const S=()=>{M(!0);const b=k.current.querySelector("a[href],button,[tabindex]");b&&b.focus()};return v+m>=c.length?c:[...c.slice(0,v),t.jsx(Ze,{"aria-label":h,slots:{CollapsedIcon:d.CollapsedIcon},slotProps:{collapsedIcon:D},onClick:S},"ellipsis"),...c.slice(c.length-m,c.length)]},T=u.Children.toArray(s).filter(c=>u.isValidElement(c)).map((c,S)=>t.jsx("li",{className:C.li,children:c},`child-${S}`));return t.jsx(rt,{ref:o,component:i,color:"textSecondary",className:V(C.root,l),ownerState:j,...H,children:t.jsx(nt,{className:C.ol,ref:k,ownerState:j,children:st(I||y&&T.length<=y?T:w(T),C.separator,z,j)})})});function it(e,r,o){const n=r.getBoundingClientRect(),s=o&&o.getBoundingClientRect(),l=ge(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const h=l.getComputedStyle(r);i=h.getPropertyValue("-webkit-transform")||h.getPropertyValue("transform")}let d=0,f=0;if(i&&i!=="none"&&typeof i=="string"){const h=i.split("(")[1].split(")")[0].split(",");d=parseInt(h[4],10),f=parseInt(h[5],10)}return e==="left"?s?`translateX(${s.right+d-n.left}px)`:`translateX(${l.innerWidth+d-n.left}px)`:e==="right"?s?`translateX(-${n.right-s.left-d}px)`:`translateX(-${n.left+n.width-d}px)`:e==="up"?s?`translateY(${s.bottom+f-n.top}px)`:`translateY(${l.innerHeight+f-n.top}px)`:s?`translateY(-${n.top-s.top+n.height-f}px)`:`translateY(-${n.top+n.height-f}px)`}function lt(e){return typeof e=="function"?e():e}function A(e,r,o){const n=lt(o),s=it(e,r,n);s&&(r.style.webkitTransform=s,r.style.transform=s)}const ct=u.forwardRef(function(r,o){const n=K(),s={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},l={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:d=!0,children:f,container:h,direction:m="down",easing:v=s,in:y,onEnter:z,onEntered:H,onEntering:I,onExit:M,onExited:j,onExiting:C,style:D,timeout:k=l,TransitionComponent:w=Ce,...T}=r,c=u.useRef(null),S=Pe(Ee(f),c,o),b=a=>x=>{a&&(x===void 0?a(c.current):a(c.current,x))},F=b((a,x)=>{A(m,a,h),Ie(a),z&&z(a,x)}),se=b((a,x)=>{const L=ce({timeout:k,style:D,easing:v},{mode:"enter"});a.style.webkitTransition=n.transitions.create("-webkit-transform",{...L}),a.style.transition=n.transitions.create("transform",{...L}),a.style.webkitTransform="none",a.style.transform="none",I&&I(a,x)}),R=b(H),B=b(C),P=b(a=>{const x=ce({timeout:k,style:D,easing:v},{mode:"exit"});a.style.webkitTransition=n.transitions.create("-webkit-transform",x),a.style.transition=n.transitions.create("transform",x),A(m,a,h),M&&M(a)}),U=b(a=>{a.style.webkitTransition="",a.style.transition="",j&&j(a)}),_=a=>{i&&i(c.current,a)},O=u.useCallback(()=>{c.current&&A(m,c.current,h)},[m,h]);return u.useEffect(()=>{if(y||m==="down"||m==="right")return;const a=ze(()=>{c.current&&A(m,c.current,h)}),x=ge(c.current);return x.addEventListener("resize",a),()=>{a.clear(),x.removeEventListener("resize",a)}},[m,y,h]),u.useEffect(()=>{y||O()},[y,O]),t.jsx(w,{nodeRef:c,onEnter:F,onEntered:R,onEntering:se,onExit:P,onExited:U,onExiting:B,addEndListener:_,appear:d,in:y,timeout:k,...T,children:(a,{ownerState:x,...L})=>u.cloneElement(f,{ref:S,style:{visibility:a==="exited"&&!y?"hidden":void 0,...D,...f.props.style},...L})})});function dt(e){return he("MuiDrawer",e)}xe("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const be=(e,r)=>{const{ownerState:o}=e;return[r.root,(o.variant==="permanent"||o.variant==="persistent")&&r.docked,r.modal]},pt=e=>{const{classes:r,anchor:o,variant:n}=e,s={root:["root",`anchor${$(o)}`],docked:[(n==="permanent"||n==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$(o)}`,n!=="temporary"&&`paperAnchorDocked${$(o)}`]};return fe(s,dt,r)},ut=E(Re,{name:"MuiDrawer",slot:"Root",overridesResolver:be})(Q(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),ht=E("div",{shouldForwardProp:Le,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:be})({flex:"0 0 auto"}),xt=E(Be,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[r.paper,r[`paperAnchor${$(o.anchor)}`],o.variant!=="temporary"&&r[`paperAnchorDocked${$(o.anchor)}`]]}})(Q(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:r})=>r.anchor==="left"&&r.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="top"&&r.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="right"&&r.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="bottom"&&r.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),je={left:"right",right:"left",top:"down",bottom:"up"};function mt(e){return["left","right"].includes(e)}function ft({direction:e},r){return e==="rtl"&&mt(r)?je[r]:r}const gt=u.forwardRef(function(r,o){const n=me({props:r,name:"MuiDrawer"}),s=K(),l=De(),i={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:d="left",BackdropProps:f,children:h,className:m,elevation:v=16,hideBackdrop:y=!1,ModalProps:{BackdropProps:z,...H}={},onClose:I,open:M=!1,PaperProps:j={},SlideProps:C,TransitionComponent:D,transitionDuration:k=i,variant:w="temporary",slots:T={},slotProps:c={},...S}=n,b=u.useRef(!1);u.useEffect(()=>{b.current=!0},[]);const F=ft({direction:l?"rtl":"ltr"},d),R={...n,anchor:d,elevation:v,open:M,variant:w,...S},B=pt(R),P={slots:{transition:D,...T},slotProps:{paper:j,transition:C,...c,backdrop:Te(c.backdrop||{...f,...z},{transitionDuration:k})}},[U,_]=N("root",{ref:o,elementType:ut,className:V(B.root,B.modal,m),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...P,...S,...H},additionalProps:{open:M,onClose:I,hideBackdrop:y,slots:{backdrop:P.slots.backdrop},slotProps:{backdrop:P.slotProps.backdrop}}}),[O,a]=N("paper",{elementType:xt,shouldForwardComponentProp:!0,className:V(B.paper,j.className),ownerState:R,externalForwardedProps:P,additionalProps:{elevation:w==="temporary"?v:0,square:!0,...w==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[x,L]=N("docked",{elementType:ht,ref:o,className:V(B.root,B.docked,m),ownerState:R,externalForwardedProps:P,additionalProps:S}),[ke,we]=N("transition",{elementType:ct,ownerState:R,externalForwardedProps:P,additionalProps:{in:M,direction:je[F],timeout:k,appear:b.current}}),ae=t.jsx(O,{...a,children:h});if(w==="permanent")return t.jsx(x,{...L,children:ae});const ie=t.jsx(ke,{...we,children:ae});return w==="persistent"?t.jsx(x,{...L,children:ie}):t.jsx(U,{..._,children:ie})}),yt=g([t.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),t.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),bt=g(t.jsx("path",{d:"M10.85 12.65h2.3L12 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM14.3 16l-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9z"})),jt=g(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),vt=g(t.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),kt=g(t.jsx("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),wt=g(t.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"})),St=g(t.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),Mt=g(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),Ct=g(t.jsx("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"})),Pt=g(t.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"})),Et=g([t.jsx("path",{d:"M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-.28 0-.5.22-.5.5 0 .12.05.23.13.33.41.47.64 1.06.64 1.67 0 1.38-1.12 2.5-2.5 2.5m0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c.28 0 .5-.22.5-.5 0-.16-.08-.28-.14-.35-.41-.46-.63-1.05-.63-1.65 0-1.38 1.12-2.5 2.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7"},"0"),t.jsx("circle",{cx:"6.5",cy:"11.5",r:"1.5"},"1"),t.jsx("circle",{cx:"9.5",cy:"7.5",r:"1.5"},"2"),t.jsx("circle",{cx:"14.5",cy:"7.5",r:"1.5"},"3"),t.jsx("circle",{cx:"17.5",cy:"11.5",r:"1.5"},"4")]),zt=g(t.jsx("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7"}));function q(e){return t.jsxs(He,{...e,viewBox:"0 0 24 24",sx:{fill:"none",...e.sx},children:[t.jsx("rect",{x:"3.25",y:"4.75",width:"17.5",height:"14.5",rx:"2.25",stroke:"currentColor",strokeWidth:"1.5"}),t.jsx("line",{x1:"8.5",y1:"5",x2:"8.5",y2:"19",stroke:"currentColor",strokeWidth:"1.5"})]})}const It=/^(.*\/[^/]+\/[^/]+\/(?:dashboards|notebooks)\/([^/]+?))(\/edit)?\/?$/,Dt=/\.malloy(nb)?$/;function Tt(){const{pathname:e}=Z(),r=$e(),o=Oe(),n=It.exec(e);if(!n||o)return null;const[,s,l,i]=n;return Dt.test(l)?null:i?t.jsx(de,{label:"View",icon:t.jsx(zt,{}),onClick:()=>r(s)}):t.jsx(de,{label:"Edit",icon:t.jsx(wt,{}),onClick:()=>r(Ye(s))})}function X({label:e,onClick:r}){return t.jsx(Ne,{clickable:!0,onClick:r,label:e,size:"small","aria-label":`Navigate to ${e}`,sx:o=>({backgroundColor:"transparent",border:`1px solid ${o.palette.divider}`,color:"text.primary",fontWeight:500,fontSize:"0.875rem",height:32,cursor:"pointer",borderRadius:"4px",maxWidth:320,"& .MuiChip-label":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"&:hover":{backgroundColor:o.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"grey.100"}})})}function Rt(){const e=ye(),r=e["*"]?qe(e["*"]).path:void 0,o=J();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(p,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(at,{"aria-label":"breadcrumb",separator:t.jsx(jt,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(X,{label:e.environmentName,onClick:n=>o(`/${e.environmentName}/`,n)}),e.packageName&&t.jsx(X,{label:e.packageName,onClick:n=>o(`/${e.environmentName}/${e.packageName}/`,n)}),r&&t.jsx(X,{label:r,onClick:n=>o(`/${e.environmentName}/${e.packageName}/${r}`,n)})]})})}const Bt=260,Lt=64;function ve({isCollapsed:e,onToggleCollapse:r,logoHeader:o}){return t.jsxs(p,{sx:{height:"100dvh",width:e?Lt:Bt,flexShrink:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",transition:"width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[t.jsx(Ht,{isCollapsed:e,onToggleCollapse:r,logoHeader:o}),t.jsxs(p,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx($t,{isCollapsed:e}),t.jsx(Ot,{isCollapsed:e})]}),t.jsx(Nt,{isCollapsed:e})]})}function Ht({isCollapsed:e,onToggleCollapse:r,logoHeader:o}){const n=J();return o?t.jsxs(p,{sx:{height:56,display:"flex",alignItems:"center",justifyContent:"space-between",px:e?0:2,flexShrink:0},children:[o,t.jsx(Y,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(q,{fontSize:"small"})})]}):t.jsxs(p,{sx:{minHeight:56,display:"flex",flexDirection:e?"column":"row",alignItems:"center",justifyContent:e?"center":"space-between",gap:e?.5:0,py:e?1:0,px:e?0:2,flexShrink:0},children:[t.jsxs(p,{onClick:s=>n("/",s),sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",minWidth:0},children:[t.jsx(p,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:24,height:24,flexShrink:0}}),!e&&t.jsx(G,{variant:"subtitle1",sx:{color:"text.primary",fontWeight:500,letterSpacing:"-0.025em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:"Malloy Publisher"})]}),t.jsx(W,{title:e?"Expand sidebar":"Collapse sidebar",placement:"right",children:t.jsx(Y,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(q,{fontSize:"small"})})})]})}function $t({isCollapsed:e}){const o=Z().pathname==="/";return t.jsx(ee,{sx:{py:0},children:t.jsx(oe,{icon:t.jsx(Mt,{fontSize:"small"}),label:"Home",to:"/",selected:o,isCollapsed:e})})}function Ot({isCollapsed:e}){const{apiClients:r}=Ae(),o=ye(),{data:n}=Ve({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=n?.data??[];return s.length===0?null:t.jsxs(p,{sx:{mt:1},children:[!e&&t.jsx(G,{variant:"caption",sx:{display:"block",px:3,py:1,color:"text.secondary",fontWeight:500,textTransform:"uppercase",fontSize:"0.6875rem",letterSpacing:"0.5px"},children:"Environments"}),t.jsx(ee,{sx:{py:0},children:s.map(l=>{const i=l.name??"";return t.jsx(oe,{icon:t.jsx(St,{fontSize:"small"}),label:i,to:`/${i}`,selected:o.environmentName===i,isCollapsed:e},i)})})]})}function Nt({isCollapsed:e}){const{pathname:r}=Z(),o=[{label:"Malloy Docs",href:pe.docsHome,icon:t.jsx(yt,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:pe.publishing,icon:t.jsx(Pt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(vt,{fontSize:"small"}),external:!1}];return t.jsxs(ee,{sx:{py:1},children:[t.jsx(oe,{icon:t.jsx(Et,{fontSize:"small"}),label:"Theme",to:"/settings/theme",selected:r.startsWith("/settings/theme"),isCollapsed:e}),t.jsx(Ft,{isCollapsed:e}),o.map(n=>t.jsx(At,{label:n.label,href:n.href,icon:n.icon,external:n.external,isCollapsed:e},n.label))]})}function oe({icon:e,label:r,to:o,selected:n,isCollapsed:s}){const l=J(),i=t.jsxs(te,{selected:n,onClick:d=>l(o,d),sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(re,{sx:{minWidth:s?0:36,justifyContent:"center",color:n?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(ne,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(W,{title:r,placement:"right",children:t.jsx(p,{children:i})}):i}function At({label:e,href:r,icon:o,external:n,isCollapsed:s}){const l=t.jsxs(te,{component:"a",href:r,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(re,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:o}),!s&&t.jsx(ne,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(W,{title:e,placement:"right",children:t.jsx(p,{children:l})}):l}const Vt={light:"dark",dark:"auto",auto:"light"},Wt={light:"Light mode",dark:"Dark mode",auto:"Auto mode"},ue={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Ft({isCollapsed:e}){const{mode:r,userChoice:o,setMode:n,allowUserToggle:s}=We();if(!s)return null;const l=o??r,i=l==="auto"?bt:l==="dark"?kt:Ct,d=t.jsxs(te,{"aria-label":ue[l],onClick:()=>n(Vt[l]),sx:{justifyContent:e?"center":"flex-start",px:e?0:2},children:[t.jsx(re,{sx:{minWidth:e?0:36,justifyContent:"center",color:"text.secondary"},children:t.jsx(i,{fontSize:"small"})}),!e&&t.jsx(ne,{primary:Wt[l],primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",whiteSpace:"nowrap"}}})]});return t.jsx(W,{title:ue[l],placement:"right",disableHoverListener:!e,children:t.jsx(p,{children:d})})}function Ut({open:e,onClose:r,logoHeader:o}){return t.jsx(gt,{anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:260}},children:t.jsx(ve,{isCollapsed:!1,onToggleCollapse:r,logoHeader:o})})}function Yt({headerProps:e}){const r=K(),o=Fe(r.breakpoints.up("md")),[n,s]=u.useState(!1),[l,i]=u.useState(!1);return u.useEffect(()=>{o&&n&&s(!1)},[o,n]),t.jsxs(p,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[o&&t.jsx(ve,{isCollapsed:l,onToggleCollapse:()=>i(d=>!d),logoHeader:e?.logoHeader}),t.jsxs(p,{component:"main",sx:{flex:1,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs(p,{sx:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",height:Ue.headerHeight,px:{xs:1,md:3},backgroundColor:"background.default"},children:[t.jsx(p,{sx:{display:{xs:"flex",md:"none"},alignItems:"center",mr:1},children:t.jsx(Y,{size:"small",onClick:()=>s(!0),"aria-label":"Open navigation",children:t.jsx(q,{fontSize:"small"})})}),t.jsx(p,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center"},children:t.jsx(Rt,{})}),t.jsxs(p,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Tt,{}),e?.endCap]})]}),t.jsx(p,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Xe,{}),children:t.jsx(_e,{})})})]}),t.jsx(Ut,{open:n,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{Yt as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-B2kJpnhe.js","assets/index-hnA8HjeH.js","assets/index-DUqldpo0.css","assets/ToggleButtonGroup-Bwj7gIJm.js"])))=>i.map(i=>d[i]);
2
- import{g as B,a as q,$ as f,a0 as G,r as d,u as O,h as H,j as o,d as K,y as P,f as J,s as Q,T as b,m as X,a1 as Y,a2 as L,q as S,a3 as C,D as _,F as m,a4 as Z,a5 as g,a6 as w,a7 as ee,a8 as ne,a9 as T,aa as te,ab as oe,_ as U,ac as F,ad as se,ae,af as re,E as ie,N as le,ag as ce,ah as ue,ai as de,aj as x}from"./index-hnA8HjeH.js";import{s as R}from"./documentRoutes-DGm_-EUy.js";function pe(e){return B("MuiLink",e)}const me=q("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),he=({theme:e,ownerState:n})=>{const t=n.color;if("colorSpace"in e&&e.colorSpace){const a=f(e,`palette.${t}.main`)||f(e,`palette.${t}`)||n.color;return e.alpha(a,.4)}const s=f(e,`palette.${t}.main`,!1)||f(e,`palette.${t}`,!1)||n.color,l=f(e,`palette.${t}.mainChannel`)||f(e,`palette.${t}Channel`);return"vars"in e&&l?`rgba(${l} / 0.4)`:G(s,.4)},$={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},xe=e=>{const{classes:n,component:t,focusVisible:s,underline:l}=e,a={root:["root",`underline${P(l)}`,t==="button"&&"button",s&&"focusVisible"]};return J(a,pe,n)},fe=Q(b,{name:"MuiLink",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,n[`underline${P(t.underline)}`],t.component==="button"&&n.button]}})(X(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:n,ownerState:t})=>n==="always"&&t.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:n,ownerState:t})=>n==="always"&&t.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(Y()).map(([n])=>({props:{underline:"always",color:n},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[n].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${me.focusVisible}`]:{outline:"auto"}}}]}))),ye=d.forwardRef(function(n,t){const s=O({props:n,name:"MuiLink"}),l=H(),{className:a,color:r="primary",component:u="a",onBlur:i,onFocus:c,TypographyClasses:p,underline:h="always",variant:v="inherit",sx:k,...D}=s,[M,E]=d.useState(!1),N=y=>{L(y.target)||E(!1),i&&i(y)},I=y=>{L(y.target)&&E(!0),c&&c(y)},j={...s,color:r,component:u,focusVisible:M,underline:h,variant:v},z=xe(j);return o.jsx(fe,{color:r,className:K(z.root,a),classes:p,component:u,onBlur:N,onFocus:I,ref:t,ownerState:j,variant:v,...D,sx:[...$[r]===void 0?[{color:r}]:[],...Array.isArray(k)?k:[k]],style:{...D.style,...h==="always"&&r!=="inherit"&&!$[r]&&{"--Link-underlineColor":he({theme:l,ownerState:j})}}})});function V(e,n){const t=S();return d.useCallback((s,l)=>{const a=new URLSearchParams(s.givens).toString(),r=encodeURIComponent(e),u=encodeURIComponent(n),i=encodeURIComponent(s.dashboard);t(`/${r}/${u}/dashboards/${i}`+(a?`?${a}`:""),l)},[t,e,n])}function A({environmentName:e,packageName:n,notebookPath:t}){const{params:s,onGivensChange:l}=C(),a=V(e,n),r=S(),u=t.endsWith(".malloy"),i=_();return d.useEffect(()=>{if(!u||i)return;const c=()=>void w(()=>import("./index.es-B2kJpnhe.js"),__vite__mapDeps([0,1,2,3])),p=window.requestIdleCallback;if(p){const v=p(c);return()=>window.cancelIdleCallback?.(v)}const h=setTimeout(c,1500);return()=>clearTimeout(h)},[u,i]),o.jsx(m,{sx:{p:3,maxWidth:1600,mx:"auto"},children:o.jsx(Z,{resourceUri:g({environmentName:e,packageName:n,modelPath:t}),maxResultSize:1024*1024,givens:s,onGivensChange:l,onNavigate:r,onDrillNavigate:a})})}function be(){const[e,n]=d.useState(!1),t=d.useRef(!1),s=d.useRef(!1),l=d.useCallback(i=>{t.current=i,n(i)},[]),a=d.useCallback(()=>{s.current=!0},[]),r=ee(d.useCallback(({currentLocation:i,nextLocation:c})=>t.current&&!s.current&&i.pathname!==c.pathname,[]));d.useEffect(()=>{if(!e)return;const i=c=>{c.preventDefault(),c.returnValue=""};return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[e]);const u=o.jsx(ne,{open:r.state==="blocked",canSave:!1,onKeepEditing:()=>r.reset?.(),onDiscard:()=>r.proceed?.()});return{onDirtyChange:l,leaving:a,dialog:u}}const ge=se.lazy(()=>w(()=>import("./index.es-B2kJpnhe.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.DashboardEditor})));function ve({environmentName:e,packageName:n,dashboardName:t,kind:s="dashboard",path:l}){const a=be(),r=d.useMemo(()=>s==="dashboard"?T({environmentName:e,packageName:n,dashboardName:t}):te({environmentName:e,packageName:n,notebookName:t}),[s,e,n,t]);return o.jsxs(m,{sx:{p:3,maxWidth:1600,mx:"auto"},children:[o.jsx(oe,{children:o.jsx(d.Suspense,{fallback:o.jsx(U,{text:F.opening("builder")}),children:o.jsx(ge,{resourceUri:g({environmentName:e,packageName:n}),dashboard:t,kind:s,path:l,onDirtyChange:a.onDirtyChange,onEvent:r},`${e}/${n}/${s}/${t}`)})}),a.dialog]})}function ke({environmentName:e,packageName:n,dashboardName:t}){const{params:s,onGivensChange:l}=C(),a=V(e,n),r=d.useMemo(()=>T({environmentName:e,packageName:n,dashboardName:t}),[e,n,t]),u=_();return d.useEffect(()=>{if(u)return;const i=()=>void w(()=>import("./index.es-B2kJpnhe.js"),__vite__mapDeps([0,1,2,3])),c=window.requestIdleCallback;if(c){const h=c(i);return()=>window.cancelIdleCallback?.(h)}const p=setTimeout(i,1500);return()=>clearTimeout(p)},[u]),o.jsx(m,{sx:{p:3,maxWidth:1600,mx:"auto"},children:o.jsx(ae,{resourceUri:g({environmentName:e,packageName:n}),dashboard:t,givens:s,onGivensChange:l,onNavigate:a,onEvent:r,maxResultSize:1024*1024})})}function W({environmentName:e,packageName:n,routeKind:t,slug:s,edit:l}){const{location:a,settled:r}=re(e,n,t,s);if(!r)return o.jsx(U,{text:F.opening()});const u=a?.kind??t;return l?o.jsx(ve,{environmentName:e,packageName:n,dashboardName:s,kind:u,...a?{path:a.path}:{}}):u==="dashboard"?o.jsx(ke,{environmentName:e,packageName:n,dashboardName:s}):o.jsx(A,{environmentName:e,packageName:n,notebookPath:a?.path??`notebooks/${s}.malloy`})}function we(){const e=ie(),n=e["*"],{server:t}=le(),{params:s,onGivensChange:l}=C();if(!e.environmentName)return o.jsx("div",{children:o.jsx("h2",{children:"Missing environment name"})});if(!e.packageName)return o.jsx("div",{children:o.jsx("h2",{children:"Missing package name"})});const a={p:3,maxWidth:1200,mx:"auto"};if(n?.startsWith("dashboards/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const c=n.slice(11),{path:p,edit:h}=R(c);return o.jsx(W,{environmentName:e.environmentName,packageName:e.packageName,routeKind:"dashboard",slug:p,edit:h})}if(n?.startsWith("notebooks/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const c=n.slice(10),{path:p,edit:h}=R(c);return o.jsx(W,{environmentName:e.environmentName,packageName:e.packageName,routeKind:"notebook",slug:p,edit:h})}if(n?.startsWith("data-apps/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const c=n.slice(10),p=g({environmentName:e.environmentName,packageName:e.packageName,modelPath:c});return o.jsx(ce,{resourceUri:p})}const r=g({environmentName:e.environmentName,packageName:e.packageName,modelPath:n});if(n?.endsWith(".malloy"))return o.jsx(m,{sx:a,children:o.jsx(ue,{resourceUri:r,runOnDemand:!0,maxResultSize:512*1024,givens:s,onGivensChange:l})});if(n?.endsWith(".malloynb"))return o.jsx(A,{environmentName:e.environmentName,packageName:e.packageName,notebookPath:n});const u=/\.[^./]+$/.test(n??""),i=de({server:t,environmentName:e.environmentName,packageName:e.packageName,path:n??""});return o.jsxs(m,{sx:a,children:[o.jsx(b,{variant:"h6",sx:{fontWeight:"fontWeightMedium"},children:"Nothing to open at this path"}),o.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[o.jsx(m,{component:"span",sx:{fontFamily:x},children:n})," ","does not name a"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloy"})," ","or"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloynb"})," ","file in package"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:e.packageName}),". This address opens"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloy"})," ","and"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:".malloynb"})," ","files."]}),u&&o.jsxs(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",o.jsx(m,{component:"span",sx:{fontFamily:x},children:"public/"})," ","directory is served at ",o.jsx(ye,{href:i,children:i}),"."]}),o.jsx(b,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"The package lists its models, notebooks, and data apps."})]})}export{we as default};
@@ -1 +0,0 @@
1
- import{E as m,q as u,j as e,a5 as d,ak as l}from"./index-hnA8HjeH.js";import{d as g}from"./documentRoutes-DGm_-EUy.js";function h(){const{environmentName:n,packageName:a}=m(),s=u();if(n)if(a){const i=d({environmentName:n,packageName:a});return e.jsx(l,{onClickPackageFile:s,onOpenDocument:({kind:r,slug:t,mode:o},c)=>s(g(n,a,r,t,o),c),resourceUri:i})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{h as default};
@@ -1 +0,0 @@
1
- import{r as l,a as w,g as N,c9 as A,u as P,j as G,d as S,y as W,f as h,s as j,B as D,m as U,a1 as F}from"./index-hnA8HjeH.js";function H(t){return l.Children.toArray(t).filter(o=>l.isValidElement(o))}function q(t){return N("MuiToggleButton",t)}const f=w("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),E=l.createContext({}),V=l.createContext(void 0);function I(t,o){return o===void 0||t===void 0?!1:Array.isArray(o)?o.includes(t):t===o}const J=t=>{const{classes:o,fullWidth:a,selected:i,disabled:d,size:g,color:B}=t,u={root:["root",i&&"selected",d&&"disabled",a&&"fullWidth",`size${W(g)}`,B]};return h(u,q,o)},K=j(D,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:a}=t;return[o.root,o[`size${W(a.size)}`]]}})(U(({theme:t})=>({...t.typography.button,borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active,[`&.${f.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${f.selected}`]:{color:(t.vars||t).palette.text.primary,backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.text.primary,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.selectedOpacity)}}}}},...Object.entries(t.palette).filter(F()).map(([o])=>({props:{color:o},style:{[`&.${f.selected}`]:{color:(t.vars||t).palette[o].main,backgroundColor:t.alpha((t.vars||t).palette[o].main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette[o].main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette[o].main,(t.vars||t).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:t.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:t.typography.pxToRem(15)}}]}))),_=l.forwardRef(function(o,a){const{value:i,...d}=l.useContext(E),g=l.useContext(V),B=A({...d,selected:I(o.value,i)},o),u=P({props:B,name:"MuiToggleButton"}),{children:R,className:$,color:p="standard",disabled:z=!1,disableFocusRipple:v=!1,fullWidth:s=!1,onChange:C,onClick:x,selected:c,size:k="medium",value:b,...L}=u,y={...u,color:p,disabled:z,disableFocusRipple:v,fullWidth:s,size:k},O=J(y),M=r=>{x&&(x(r,b),r.defaultPrevented)||C&&C(r,b)},n=g||"";return G.jsx(K,{className:S(d.className,O.root,$,n),disabled:z,focusRipple:!v,ref:a,onClick:M,onChange:C,value:b,ownerState:y,"aria-pressed":c,...L,children:R})});function Q(t){return N("MuiToggleButtonGroup",t)}const e=w("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),X=t=>{const{classes:o,orientation:a,fullWidth:i,disabled:d}=t,g={root:["root",a,i&&"fullWidth"],grouped:["grouped",`grouped${W(a)}`,d&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return h(g,Q,o)},Y=j("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:a}=t;return[{[`& .${e.grouped}`]:o.grouped},{[`& .${e.grouped}`]:o[`grouped${W(a.orientation)}`]},{[`& .${e.firstButton}`]:o.firstButton},{[`& .${e.lastButton}`]:o.lastButton},{[`& .${e.middleButton}`]:o.middleButton},o.root,a.orientation==="vertical"&&o.vertical,a.fullWidth&&o.fullWidth]}})(U(({theme:t})=>({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${e.grouped}`]:{[`&.${e.selected} + .${e.grouped}.${e.selected}`]:{borderTop:0,marginTop:0}},[`& .${e.firstButton},& .${e.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${e.lastButton},& .${e.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${e.lastButton}.${f.disabled},& .${e.middleButton}.${f.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${e.grouped}`]:{[`&.${e.selected} + .${e.grouped}.${e.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${e.firstButton},& .${e.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${e.lastButton},& .${e.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${e.lastButton}.${f.disabled},& .${e.middleButton}.${f.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),tt=l.forwardRef(function(o,a){const i=P({props:o,name:"MuiToggleButtonGroup"}),{children:d,className:g,color:B="standard",disabled:u=!1,exclusive:R=!1,fullWidth:$=!1,onChange:p,orientation:z="horizontal",size:v="medium",value:s,...C}=i,x={...i,disabled:u,fullWidth:$,orientation:z,size:v},c=X(x),k=l.useCallback((n,r)=>{if(!p)return;const T=s&&s.indexOf(r);let m;s&&T>=0?(m=s.slice(),m.splice(T,1)):m=s?s.concat(r):[r],p(n,m)},[p,s]),b=l.useCallback((n,r)=>{p&&p(n,s===r?null:r)},[p,s]),L=l.useMemo(()=>({className:c.grouped,onChange:R?b:k,value:s,size:v,fullWidth:$,color:B,disabled:u}),[c.grouped,R,b,k,s,v,$,B,u]),y=H(d),O=y.length,M=n=>{const r=n===0,T=n===O-1;return r&&T?"":r?c.firstButton:T?c.lastButton:c.middleButton};return G.jsx(Y,{role:"group",className:S(c.root,g),ref:a,ownerState:x,...C,children:G.jsx(E.Provider,{value:L,children:y.map((n,r)=>G.jsx(V.Provider,{value:M(r),children:n},r))})})});export{tt as T,_ as a};
@@ -1 +0,0 @@
1
- import{al as o}from"./index-hnA8HjeH.js";const s="/edit",c=(t,e,a,i,d)=>`${o(t,e,a,i)}${d==="edit"?s:""}`,r=t=>{const e=t.replace(/\/$/,"");return e.endsWith(s)?{path:e.slice(0,-s.length),edit:!0}:{path:e,edit:!1}},h=t=>`${t}${s}`;export{c as d,h as e,r as s};