@malloy-publisher/server 0.2.7 → 0.3.1

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 (33) hide show
  1. package/dist/app/api-doc.yaml +39 -1
  2. package/dist/app/assets/{EnvironmentPage-CKXJ6QGP.js → EnvironmentPage-CMNz23OH.js} +1 -1
  3. package/dist/app/assets/{HomePage-DghEH50P.js → HomePage-CIFBQm1O.js} +1 -1
  4. package/dist/app/assets/{LightMode-DzHSrjJH.js → LightMode-230hA2MG.js} +1 -1
  5. package/dist/app/assets/{MainPage-Cj5zf5FO.js → MainPage-DBgaP8G6.js} +2 -2
  6. package/dist/app/assets/{MaterializationsPage-BzNjmRO4.js → MaterializationsPage-B5tdbpRJ.js} +1 -1
  7. package/dist/app/assets/ModelPage-A6Kd1_wx.js +2 -0
  8. package/dist/app/assets/{PackagePage-C_e4oVtx.js → PackagePage-JUM3EcgJ.js} +1 -1
  9. package/dist/app/assets/RenderedResult-mDE-4u8S.es-s0zwv__L.js +116 -0
  10. package/dist/app/assets/{RouteError-DfNOfBXe.js → RouteError-BJAZkbpg.js} +1 -1
  11. package/dist/app/assets/{ThemeEditorPage-CGkhNJr8.js → ThemeEditorPage-a0QNervK.js} +1 -1
  12. package/dist/app/assets/core-B8oMW4sm.es-hOkwvru5.js +148 -0
  13. package/dist/app/assets/index-B5_U5YBb.js +1 -0
  14. package/dist/app/assets/index-BR3mOYNn.js +1322 -0
  15. package/dist/app/assets/{index-B07Dq5kA.js → index-CNMFq7Ua.js} +1 -1
  16. package/dist/app/assets/index-CRAwrhYM.js +2 -0
  17. package/dist/app/assets/index-DUqldpo0.css +1 -0
  18. package/dist/app/assets/index-DplzDOL2.js +453 -0
  19. package/dist/app/assets/index-JaIfCAcq.js +443 -0
  20. package/dist/app/assets/index.es-CB4dOn75.js +106 -0
  21. package/dist/app/index.html +2 -2
  22. package/dist/instrumentation.mjs +62738 -42960
  23. package/dist/package_load_worker.mjs +78 -3
  24. package/dist/server.mjs +61676 -40040
  25. package/dist/sshcrypto-xqan60jb.node +0 -0
  26. package/package.json +1 -1
  27. package/dist/app/assets/ModelPage-Dl4N2pr_.js +0 -1
  28. package/dist/app/assets/WorkbookPage-WwPVhKNa.js +0 -1
  29. package/dist/app/assets/core-BY7vB5gN.es-BZH9lmb3.js +0 -148
  30. package/dist/app/assets/index-5eLCcNmP.css +0 -1
  31. package/dist/app/assets/index-BW-8erNY.js +0 -632
  32. package/dist/app/assets/index-Ca7nDqKT.js +0 -2
  33. package/dist/app/assets/index-Kff4bm9s.js +0 -1774
@@ -4120,6 +4120,18 @@ components:
4120
4120
  type: string
4121
4121
  dimension:
4122
4122
  type: string
4123
+ givenNames:
4124
+ type: array
4125
+ items:
4126
+ type: string
4127
+ description: |
4128
+ The givens the suggest query needs in its request to run: the ones
4129
+ the source it reads is scoped by (a source-level `where: … ~ $X`)
4130
+ or gated by (an `#(authorize)` reading `$X`), plus, for the `query`
4131
+ form, the named query's own. A client sends the current values of
4132
+ exactly these, so a gated source's options load while the option
4133
+ list still does not depend on the page's other filters. Absent
4134
+ when the query needs none.
4123
4135
 
4124
4136
  GivenValues:
4125
4137
  type: object
@@ -4660,7 +4672,17 @@ components:
4660
4672
 
4661
4673
  Connection:
4662
4674
  type: object
4663
- description: Database connection configuration and metadata
4675
+ description: >
4676
+ Database connection configuration and metadata.
4677
+
4678
+ Credential fields are WRITE-ONLY. They are accepted on create and
4679
+ update and no read returns them, so this one schema describes a
4680
+ request body in full and a response body with its credentials
4681
+ omitted. Omitted rather than masked, so a client cannot round-trip a
4682
+ placeholder back into stored config as a real credential. An update
4683
+ does not have to resend a credential it could not read; a field left
4684
+ out keeps its stored value, a field sent replaces it, and a field sent
4685
+ empty clears it.
4664
4686
  properties:
4665
4687
  resource:
4666
4688
  type: string
@@ -4691,6 +4713,22 @@ components:
4691
4713
  ducklake,
4692
4714
  publisher,
4693
4715
  ]
4716
+ withheldFields:
4717
+ type: array
4718
+ items:
4719
+ type: string
4720
+ description: >
4721
+ Read-only. Dotted paths of the fields this connection has stored
4722
+ that this response does not return. In practice that is its
4723
+ credentials, but it is any stored field the response withholds, so
4724
+ a field the server does not publish appears here too. Names only,
4725
+ never a value.
4726
+
4727
+ It exists because a client otherwise cannot tell a credential that
4728
+ is set from one that is absent, and so cannot tell whether leaving a
4729
+ box empty keeps something or leaves the connection without a
4730
+ credential. An editor should read it to label the boxes that are
4731
+ already filled. Ignored on write.
4694
4732
  fingerprint:
4695
4733
  type: string
4696
4734
  description: >
@@ -1 +1 @@
1
- import{T as r,J as t,j as e,a3 as i,ad as o}from"./index-BW-8erNY.js";function m(){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{m as default};
1
+ import{O as r,G as t,j as e,a5 as i,ag as o}from"./index-JaIfCAcq.js";function m(){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{m as default};
@@ -1 +1 @@
1
- import{T as t,j as o,x as a}from"./index-BW-8erNY.js";function s(){const n=t();return o.jsx(a,{onClickEnvironment:n})}export{s as default};
1
+ import{O as t,j as o,Y as a}from"./index-JaIfCAcq.js";function s(){const n=t();return o.jsx(a,{onClickEnvironment:n})}export{s as default};
@@ -1 +1 @@
1
- import{c,j as s}from"./index-BW-8erNY.js";const t=c(s.jsx("path",{d:"M12 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"})),a=c(s.jsx("path",{d:"M12 7c-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"}));export{t as D,a as L};
1
+ import{c,j as s}from"./index-JaIfCAcq.js";const t=c(s.jsx("path",{d:"M12 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"})),a=c(s.jsx("path",{d:"M12 7c-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"}));export{t as D,a as L};
@@ -1,2 +1,2 @@
1
- import{u as Pe,g as Ee,r as u,R as Ce,a as Ie,c as S,j as t,s as M,B as Me,m as G,e as oe,b as le,d as ce,f as de,h as ze,i as W,k as pe,l as J,n as Z,o as Te,p as De,q as Re,t as ue,v as Be,w as se,y as Le,z as He,A as $e,C as A,D as $,M as Ne,P as Ae,E as Oe,F as We,S as Ve,G as Ue,H as U,I as V,J as he,T as q,K as m,L as Fe,N as fe,O as F,Q as Qe,U as Xe,V as ae,W as xe,X as me,Y as ge,Z as Ye,_ as _e,$ as Ke}from"./index-BW-8erNY.js";import{D as Ge,L as Je}from"./LightMode-DzHSrjJH.js";function Ze(e,r,n,o,s){const[a,i]=u.useState(()=>s&&n?n(e).matches:o?o(e).matches:r);return Ie(()=>{if(!n)return;const c=n(e),h=()=>{i(c.matches)};return h(),c.addEventListener("change",h),()=>{c.removeEventListener("change",h)}},[e,n]),a}const qe={...Ce},ye=qe.useSyncExternalStore;function et(e,r,n,o,s){const a=u.useCallback(()=>r,[r]),i=u.useMemo(()=>{if(s&&n)return()=>n(e).matches;if(o!==null){const{matches:p}=o(e);return()=>p}return a},[a,e,o,s,n]),[c,h]=u.useMemo(()=>{if(n===null)return[a,()=>()=>{}];const p=n(e);return[()=>p.matches,x=>(p.addEventListener("change",x),()=>{p.removeEventListener("change",x)})]},[a,n,e]);return ye(h,c,i)}function be(e={}){const{themeId:r}=e;return function(o,s={}){let a=Pe();a&&r&&(a=a[r]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:c=!1,matchMedia:h=i?window.matchMedia:null,ssrMatchMedia:f=null,noSsr:p=!1}=Ee({name:"MuiUseMediaQuery",props:s,theme:a});let x=typeof o=="function"?o(a):o;return x=x.replace(/^@media( ?)/m,""),x.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
2
- `)),(ye!==void 0?et:Ze)(x,c,h,f,p)}}be();const tt=S(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"})),rt=M(Me,{name:"MuiBreadcrumbCollapsed"})(G(({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:oe(e.palette.grey[200],.12)}:{backgroundColor:oe(e.palette.grey[600],.12)}}}))),nt=M(tt)({width:24,height:16});function ot(e){const{slots:r={},slotProps:n={},...o}=e,s=e;return t.jsx("li",{children:t.jsx(rt,{focusRipple:!0,...o,ownerState:s,children:t.jsx(nt,{as:r.CollapsedIcon,ownerState:s,...n.collapsedIcon})})})}function st(e){return ce("MuiBreadcrumbs",e)}const at=le("MuiBreadcrumbs",["root","ol","li","separator"]),it=e=>{const{classes:r}=e;return pe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,r)},lt=M(J,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${at.li}`]:r.li},r.root]})({}),ct=M("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),dt=M("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,r,n,o){return e.reduce((s,a,i)=>(i<e.length-1?s=s.concat(a,t.jsx(dt,{"aria-hidden":!0,className:r,ownerState:o,children:n},`separator-${i}`)):s.push(a),s),[])}const ut=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiBreadcrumbs"}),{children:s,className:a,component:i="nav",slots:c={},slotProps:h={},expandText:f="Show path",itemsAfterCollapse:p=1,itemsBeforeCollapse:x=1,maxItems:y=8,separator:P="/",...H}=o,[z,E]=u.useState(!1),v={...o,component:i,expanded:z,expandText:f,itemsAfterCollapse:p,itemsBeforeCollapse:x,maxItems:y,separator:P},C=it(v),T=ze({elementType:c.CollapsedIcon,externalSlotProps:h.collapsedIcon,ownerState:v}),j=u.useRef(null),k=d=>{const w=()=>{E(!0);const b=j.current.querySelector("a[href],button,[tabindex]");b&&b.focus()};return x+p>=d.length?d:[...d.slice(0,x),t.jsx(ot,{"aria-label":f,slots:{CollapsedIcon:c.CollapsedIcon},slotProps:{collapsedIcon:T},onClick:w},"ellipsis"),...d.slice(d.length-p,d.length)]},D=u.Children.toArray(s).filter(d=>u.isValidElement(d)).map((d,w)=>t.jsx("li",{className:C.li,children:d},`child-${w}`));return t.jsx(lt,{ref:n,component:i,color:"textSecondary",className:W(C.root,a),ownerState:v,...H,children:t.jsx(ct,{className:C.ol,ref:j,ownerState:v,children:pt(z||y&&D.length<=y?D:k(D),C.separator,P,v)})})});function ht(e,r,n){const o=r.getBoundingClientRect(),s=n&&n.getBoundingClientRect(),a=ue(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const f=a.getComputedStyle(r);i=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}let c=0,h=0;if(i&&i!=="none"&&typeof i=="string"){const f=i.split("(")[1].split(")")[0].split(",");c=parseInt(f[4],10),h=parseInt(f[5],10)}return e==="left"?s?`translateX(${s.right+c-o.left}px)`:`translateX(${a.innerWidth+c-o.left}px)`:e==="right"?s?`translateX(-${o.right-s.left-c}px)`:`translateX(-${o.left+o.width-c}px)`:e==="up"?s?`translateY(${s.bottom+h-o.top}px)`:`translateY(${a.innerHeight+h-o.top}px)`:s?`translateY(-${o.top-s.top+o.height-h}px)`:`translateY(-${o.top+o.height-h}px)`}function ft(e){return typeof e=="function"?e():e}function O(e,r,n){const o=ft(n),s=ht(e,r,o);s&&(r.style.webkitTransform=s,r.style.transform=s)}const xt=u.forwardRef(function(r,n){const o=Z(),s={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:c=!0,children:h,container:f,direction:p="down",easing:x=s,in:y,onEnter:P,onEntered:H,onEntering:z,onExit:E,onExited:v,onExiting:C,style:T,timeout:j=a,TransitionComponent:k=Te,...D}=r,d=u.useRef(null),w=De(Re(h),d,n),b=l=>g=>{l&&(g===void 0?l(d.current):l(d.current,g))},Q=b((l,g)=>{O(p,l,f),Le(l),P&&P(l,g)}),te=b((l,g)=>{const L=se({timeout:j,style:T,easing:x},{mode:"enter"});l.style.webkitTransition=o.transitions.create("-webkit-transform",{...L}),l.style.transition=o.transitions.create("transform",{...L}),l.style.webkitTransform="none",l.style.transform="none",z&&z(l,g)}),R=b(H),B=b(C),I=b(l=>{const g=se({timeout:j,style:T,easing:x},{mode:"exit"});l.style.webkitTransition=o.transitions.create("-webkit-transform",g),l.style.transition=o.transitions.create("transform",g),O(p,l,f),E&&E(l)}),X=b(l=>{l.style.webkitTransition="",l.style.transition="",v&&v(l)}),Y=l=>{i&&i(d.current,l)},N=u.useCallback(()=>{d.current&&O(p,d.current,f)},[p,f]);return u.useEffect(()=>{if(y||p==="down"||p==="right")return;const l=Be(()=>{d.current&&O(p,d.current,f)}),g=ue(d.current);return g.addEventListener("resize",l),()=>{l.clear(),g.removeEventListener("resize",l)}},[p,y,f]),u.useEffect(()=>{y||N()},[y,N]),t.jsx(k,{nodeRef:d,onEnter:Q,onEntered:R,onEntering:te,onExit:I,onExited:X,onExiting:B,addEndListener:Y,appear:c,in:y,timeout:j,...D,children:(l,{ownerState:g,...L})=>u.cloneElement(h,{ref:w,style:{visibility:l==="exited"&&!y?"hidden":void 0,...T,...h.props.style},...L})})});function mt(e){return ce("MuiDrawer",e)}le("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ve=(e,r)=>{const{ownerState:n}=e;return[r.root,(n.variant==="permanent"||n.variant==="persistent")&&r.docked,r.modal]},gt=e=>{const{classes:r,anchor:n,variant:o}=e,s={root:["root",`anchor${$(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$(n)}`,o!=="temporary"&&`paperAnchorDocked${$(n)}`]};return pe(s,mt,r)},yt=M(Ne,{name:"MuiDrawer",slot:"Root",overridesResolver:ve})(G(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),bt=M("div",{shouldForwardProp:Oe,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ve})({flex:"0 0 auto"}),vt=M(Ae,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.paper,r[`paperAnchor${$(n.anchor)}`],n.variant!=="temporary"&&r[`paperAnchorDocked${$(n.anchor)}`]]}})(G(({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 jt(e){return["left","right"].includes(e)}function kt({direction:e},r){return e==="rtl"&&jt(r)?je[r]:r}const wt=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiDrawer"}),s=Z(),a=He(),i={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:c="left",BackdropProps:h,children:f,className:p,elevation:x=16,hideBackdrop:y=!1,ModalProps:{BackdropProps:P,...H}={},onClose:z,open:E=!1,PaperProps:v={},SlideProps:C,TransitionComponent:T,transitionDuration:j=i,variant:k="temporary",slots:D={},slotProps:d={},...w}=o,b=u.useRef(!1);u.useEffect(()=>{b.current=!0},[]);const Q=kt({direction:a?"rtl":"ltr"},c),R={...o,anchor:c,elevation:x,open:E,variant:k,...w},B=gt(R),I={slots:{transition:T,...D},slotProps:{paper:v,transition:C,...d,backdrop:$e(d.backdrop||{...h,...P},{transitionDuration:j})}},[X,Y]=A("root",{ref:n,elementType:yt,className:W(B.root,B.modal,p),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...I,...w,...H},additionalProps:{open:E,onClose:z,hideBackdrop:y,slots:{backdrop:I.slots.backdrop},slotProps:{backdrop:I.slotProps.backdrop}}}),[N,l]=A("paper",{elementType:vt,shouldForwardComponentProp:!0,className:W(B.paper,v.className),ownerState:R,externalForwardedProps:I,additionalProps:{elevation:k==="temporary"?x:0,square:!0,...k==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[g,L]=A("docked",{elementType:bt,ref:n,className:W(B.root,B.docked,p),ownerState:R,externalForwardedProps:I,additionalProps:w}),[we,Se]=A("transition",{elementType:xt,ownerState:R,externalForwardedProps:I,additionalProps:{in:E,direction:je[Q],timeout:j,appear:b.current}}),re=t.jsx(N,{...l,children:f});if(k==="permanent")return t.jsx(g,{...L,children:re});const ne=t.jsx(we,{...Se,children:re});return k==="persistent"?t.jsx(g,{...L,children:ne}):t.jsx(X,{...Y,children:ne})}),St=be({themeId:We}),Pt=S([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")]),Et=S(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"})),Ct=S(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),It=S(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"})),Mt=S(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"})),zt=S(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),Tt=S(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"})),Dt=S([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")]);function K(e){return t.jsxs(Ve,{...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 Rt={light:"dark",dark:"auto",auto:"light"},ie={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Bt(){const{mode:e,userChoice:r,setMode:n,allowUserToggle:o}=Ue();if(!o)return null;const s=r??e,a=Rt[s],i=s==="auto"?Et:s==="dark"?Ge:Je;return t.jsx(U,{title:ie[s],children:t.jsx(V,{"aria-label":ie[s],onClick:()=>n(a),size:"small",children:t.jsx(i,{fontSize:"small"})})})}function _({label:e,onClick:r}){return t.jsx(Fe,{clickable:!0,onClick:r,label:e,size:"small","aria-label":`Navigate to ${e}`,sx:n=>({backgroundColor:"background.paper",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:n.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"grey.100"}})})}function Lt(){const e=he(),r=e["*"],n=q();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(m,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(ut,{"aria-label":"breadcrumb",separator:t.jsx(Ct,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(_,{label:e.environmentName,onClick:o=>n(`/${e.environmentName}/`,o)}),e.packageName&&t.jsx(_,{label:e.packageName,onClick:o=>n(`/${e.environmentName}/${e.packageName}/`,o)}),r&&t.jsx(_,{label:r,onClick:o=>n(`/${e.environmentName}/${e.packageName}/${r}`,o)})]})})}const Ht=260,$t=64;function ke({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){return t.jsxs(m,{sx:{height:"100dvh",width:e?$t:Ht,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(Nt,{isCollapsed:e,onToggleCollapse:r,logoHeader:n}),t.jsxs(m,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx(At,{isCollapsed:e}),t.jsx(Ot,{isCollapsed:e})]}),t.jsx(Wt,{isCollapsed:e}),t.jsx(Vt,{isCollapsed:e})]})}function Nt({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){const o=q();return n?t.jsxs(m,{sx:{height:56,display:"flex",alignItems:"center",justifyContent:"space-between",px:e?0:2,flexShrink:0},children:[n,t.jsx(V,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(K,{fontSize:"small"})})]}):t.jsxs(m,{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(m,{onClick:s=>o("/",s),sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",minWidth:0},children:[t.jsx(m,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:24,height:24,flexShrink:0}}),!e&&t.jsx(J,{variant:"subtitle1",sx:{color:"text.primary",fontWeight:500,letterSpacing:"-0.025em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:"Malloy Publisher"})]}),t.jsx(U,{title:e?"Expand sidebar":"Collapse sidebar",placement:"right",children:t.jsx(V,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(K,{fontSize:"small"})})})]})}function At({isCollapsed:e}){const n=fe().pathname==="/";return t.jsx(F,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(zt,{fontSize:"small"}),label:"Home",to:"/",selected:n,isCollapsed:e})})}function Ot({isCollapsed:e}){const{apiClients:r}=Qe(),n=he(),{data:o}=Xe({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=o?.data??[];return s.length===0?null:t.jsxs(m,{sx:{mt:1},children:[!e&&t.jsx(J,{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(F,{sx:{py:0},children:s.map(a=>{const i=a.name??"";return t.jsx(ee,{icon:t.jsx(Mt,{fontSize:"small"}),label:i,to:`/${i}`,selected:n.environmentName===i,isCollapsed:e},i)})})]})}function Wt({isCollapsed:e}){const n=fe().pathname.startsWith("/settings/theme");return t.jsx(F,{sx:{pt:1,pb:0},children:t.jsx(ee,{icon:t.jsx(Dt,{fontSize:"small"}),label:"Visualization theme",to:"/settings/theme",selected:n,isCollapsed:e})})}function Vt({isCollapsed:e}){const r=[{label:"Malloy Docs",href:ae.docsHome,icon:t.jsx(Pt,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:ae.publishing,icon:t.jsx(Tt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(It,{fontSize:"small"}),external:!1}];return t.jsx(F,{sx:{py:1},children:r.map(n=>t.jsx(Ut,{label:n.label,href:n.href,icon:n.icon,external:n.external,isCollapsed:e},n.label))})}function ee({icon:e,label:r,to:n,selected:o,isCollapsed:s}){const a=q(),i=t.jsxs(xe,{selected:o,onClick:c=>a(n,c),sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:o?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(ge,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(U,{title:r,placement:"right",children:t.jsx(m,{children:i})}):i}function Ut({label:e,href:r,icon:n,external:o,isCollapsed:s}){const a=t.jsxs(xe,{component:"a",href:r,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:n}),!s&&t.jsx(ge,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(U,{title:e,placement:"right",children:t.jsx(m,{children:a})}):a}function Ft({open:e,onClose:r,logoHeader:n}){return t.jsx(wt,{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(ke,{isCollapsed:!1,onToggleCollapse:r,logoHeader:n})})}function Yt({headerProps:e}){const r=Z(),n=St(r.breakpoints.up("md")),[o,s]=u.useState(!1),[a,i]=u.useState(!1);return u.useEffect(()=>{n&&o&&s(!1)},[n,o]),t.jsxs(m,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[n&&t.jsx(ke,{isCollapsed:a,onToggleCollapse:()=>i(c=>!c),logoHeader:e?.logoHeader}),t.jsxs(m,{component:"main",sx:{flex:1,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs(m,{sx:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",height:Ye.headerHeight,px:{xs:1,md:3},backgroundColor:"background.default"},children:[t.jsx(m,{sx:{display:{xs:"flex",md:"none"},alignItems:"center",mr:1},children:t.jsx(V,{size:"small",onClick:()=>s(!0),"aria-label":"Open navigation",children:t.jsx(K,{fontSize:"small"})})}),t.jsx(m,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center"},children:t.jsx(Lt,{})}),t.jsxs(m,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Bt,{}),e?.endCap]})]}),t.jsx(m,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Ke,{}),children:t.jsx(_e,{})})})]}),t.jsx(Ft,{open:o,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{Yt as default};
1
+ import{u as Ee,g as Pe,r as u,R as Ce,a as Ie,c as S,j as t,s as M,B as Me,m as G,e as oe,b as le,d as ce,f as de,h as ze,i as W,k as pe,T as J,l as Z,n as De,o as Te,p as Re,q as ue,t as Be,v as se,w as Le,x as He,y as $e,z as A,A as $,M as Ne,P as Ae,C as Oe,D as We,S as Ve,E as Ue,F as U,I as V,G as he,O as q,H as m,J as Qe,K as fe,L as Q,N as Fe,Q as Xe,U as ae,V as xe,W as me,X as ge,Z as _e,_ as Ye,$ as Ke}from"./index-JaIfCAcq.js";import{D as Ge,L as Je}from"./LightMode-230hA2MG.js";function Ze(e,r,n,o,s){const[a,i]=u.useState(()=>s&&n?n(e).matches:o?o(e).matches:r);return Ie(()=>{if(!n)return;const c=n(e),h=()=>{i(c.matches)};return h(),c.addEventListener("change",h),()=>{c.removeEventListener("change",h)}},[e,n]),a}const qe={...Ce},ye=qe.useSyncExternalStore;function et(e,r,n,o,s){const a=u.useCallback(()=>r,[r]),i=u.useMemo(()=>{if(s&&n)return()=>n(e).matches;if(o!==null){const{matches:p}=o(e);return()=>p}return a},[a,e,o,s,n]),[c,h]=u.useMemo(()=>{if(n===null)return[a,()=>()=>{}];const p=n(e);return[()=>p.matches,x=>(p.addEventListener("change",x),()=>{p.removeEventListener("change",x)})]},[a,n,e]);return ye(h,c,i)}function be(e={}){const{themeId:r}=e;return function(o,s={}){let a=Ee();a&&r&&(a=a[r]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:c=!1,matchMedia:h=i?window.matchMedia:null,ssrMatchMedia:f=null,noSsr:p=!1}=Pe({name:"MuiUseMediaQuery",props:s,theme:a});let x=typeof o=="function"?o(a):o;return x=x.replace(/^@media( ?)/m,""),x.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
2
+ `)),(ye!==void 0?et:Ze)(x,c,h,f,p)}}be();const tt=S(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"})),rt=M(Me,{name:"MuiBreadcrumbCollapsed"})(G(({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:oe(e.palette.grey[200],.12)}:{backgroundColor:oe(e.palette.grey[600],.12)}}}))),nt=M(tt)({width:24,height:16});function ot(e){const{slots:r={},slotProps:n={},...o}=e,s=e;return t.jsx("li",{children:t.jsx(rt,{focusRipple:!0,...o,ownerState:s,children:t.jsx(nt,{as:r.CollapsedIcon,ownerState:s,...n.collapsedIcon})})})}function st(e){return ce("MuiBreadcrumbs",e)}const at=le("MuiBreadcrumbs",["root","ol","li","separator"]),it=e=>{const{classes:r}=e;return pe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,r)},lt=M(J,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${at.li}`]:r.li},r.root]})({}),ct=M("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),dt=M("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,r,n,o){return e.reduce((s,a,i)=>(i<e.length-1?s=s.concat(a,t.jsx(dt,{"aria-hidden":!0,className:r,ownerState:o,children:n},`separator-${i}`)):s.push(a),s),[])}const ut=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiBreadcrumbs"}),{children:s,className:a,component:i="nav",slots:c={},slotProps:h={},expandText:f="Show path",itemsAfterCollapse:p=1,itemsBeforeCollapse:x=1,maxItems:y=8,separator:E="/",...H}=o,[z,P]=u.useState(!1),v={...o,component:i,expanded:z,expandText:f,itemsAfterCollapse:p,itemsBeforeCollapse:x,maxItems:y,separator:E},C=it(v),D=ze({elementType:c.CollapsedIcon,externalSlotProps:h.collapsedIcon,ownerState:v}),j=u.useRef(null),k=d=>{const w=()=>{P(!0);const b=j.current.querySelector("a[href],button,[tabindex]");b&&b.focus()};return x+p>=d.length?d:[...d.slice(0,x),t.jsx(ot,{"aria-label":f,slots:{CollapsedIcon:c.CollapsedIcon},slotProps:{collapsedIcon:D},onClick:w},"ellipsis"),...d.slice(d.length-p,d.length)]},T=u.Children.toArray(s).filter(d=>u.isValidElement(d)).map((d,w)=>t.jsx("li",{className:C.li,children:d},`child-${w}`));return t.jsx(lt,{ref:n,component:i,color:"textSecondary",className:W(C.root,a),ownerState:v,...H,children:t.jsx(ct,{className:C.ol,ref:j,ownerState:v,children:pt(z||y&&T.length<=y?T:k(T),C.separator,E,v)})})});function ht(e,r,n){const o=r.getBoundingClientRect(),s=n&&n.getBoundingClientRect(),a=ue(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const f=a.getComputedStyle(r);i=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}let c=0,h=0;if(i&&i!=="none"&&typeof i=="string"){const f=i.split("(")[1].split(")")[0].split(",");c=parseInt(f[4],10),h=parseInt(f[5],10)}return e==="left"?s?`translateX(${s.right+c-o.left}px)`:`translateX(${a.innerWidth+c-o.left}px)`:e==="right"?s?`translateX(-${o.right-s.left-c}px)`:`translateX(-${o.left+o.width-c}px)`:e==="up"?s?`translateY(${s.bottom+h-o.top}px)`:`translateY(${a.innerHeight+h-o.top}px)`:s?`translateY(-${o.top-s.top+o.height-h}px)`:`translateY(-${o.top+o.height-h}px)`}function ft(e){return typeof e=="function"?e():e}function O(e,r,n){const o=ft(n),s=ht(e,r,o);s&&(r.style.webkitTransform=s,r.style.transform=s)}const xt=u.forwardRef(function(r,n){const o=Z(),s={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:c=!0,children:h,container:f,direction:p="down",easing:x=s,in:y,onEnter:E,onEntered:H,onEntering:z,onExit:P,onExited:v,onExiting:C,style:D,timeout:j=a,TransitionComponent:k=De,...T}=r,d=u.useRef(null),w=Te(Re(h),d,n),b=l=>g=>{l&&(g===void 0?l(d.current):l(d.current,g))},F=b((l,g)=>{O(p,l,f),Le(l),E&&E(l,g)}),te=b((l,g)=>{const L=se({timeout:j,style:D,easing:x},{mode:"enter"});l.style.webkitTransition=o.transitions.create("-webkit-transform",{...L}),l.style.transition=o.transitions.create("transform",{...L}),l.style.webkitTransform="none",l.style.transform="none",z&&z(l,g)}),R=b(H),B=b(C),I=b(l=>{const g=se({timeout:j,style:D,easing:x},{mode:"exit"});l.style.webkitTransition=o.transitions.create("-webkit-transform",g),l.style.transition=o.transitions.create("transform",g),O(p,l,f),P&&P(l)}),X=b(l=>{l.style.webkitTransition="",l.style.transition="",v&&v(l)}),_=l=>{i&&i(d.current,l)},N=u.useCallback(()=>{d.current&&O(p,d.current,f)},[p,f]);return u.useEffect(()=>{if(y||p==="down"||p==="right")return;const l=Be(()=>{d.current&&O(p,d.current,f)}),g=ue(d.current);return g.addEventListener("resize",l),()=>{l.clear(),g.removeEventListener("resize",l)}},[p,y,f]),u.useEffect(()=>{y||N()},[y,N]),t.jsx(k,{nodeRef:d,onEnter:F,onEntered:R,onEntering:te,onExit:I,onExited:X,onExiting:B,addEndListener:_,appear:c,in:y,timeout:j,...T,children:(l,{ownerState:g,...L})=>u.cloneElement(h,{ref:w,style:{visibility:l==="exited"&&!y?"hidden":void 0,...D,...h.props.style},...L})})});function mt(e){return ce("MuiDrawer",e)}le("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ve=(e,r)=>{const{ownerState:n}=e;return[r.root,(n.variant==="permanent"||n.variant==="persistent")&&r.docked,r.modal]},gt=e=>{const{classes:r,anchor:n,variant:o}=e,s={root:["root",`anchor${$(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$(n)}`,o!=="temporary"&&`paperAnchorDocked${$(n)}`]};return pe(s,mt,r)},yt=M(Ne,{name:"MuiDrawer",slot:"Root",overridesResolver:ve})(G(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),bt=M("div",{shouldForwardProp:Oe,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ve})({flex:"0 0 auto"}),vt=M(Ae,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.paper,r[`paperAnchor${$(n.anchor)}`],n.variant!=="temporary"&&r[`paperAnchorDocked${$(n.anchor)}`]]}})(G(({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 jt(e){return["left","right"].includes(e)}function kt({direction:e},r){return e==="rtl"&&jt(r)?je[r]:r}const wt=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiDrawer"}),s=Z(),a=He(),i={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:c="left",BackdropProps:h,children:f,className:p,elevation:x=16,hideBackdrop:y=!1,ModalProps:{BackdropProps:E,...H}={},onClose:z,open:P=!1,PaperProps:v={},SlideProps:C,TransitionComponent:D,transitionDuration:j=i,variant:k="temporary",slots:T={},slotProps:d={},...w}=o,b=u.useRef(!1);u.useEffect(()=>{b.current=!0},[]);const F=kt({direction:a?"rtl":"ltr"},c),R={...o,anchor:c,elevation:x,open:P,variant:k,...w},B=gt(R),I={slots:{transition:D,...T},slotProps:{paper:v,transition:C,...d,backdrop:$e(d.backdrop||{...h,...E},{transitionDuration:j})}},[X,_]=A("root",{ref:n,elementType:yt,className:W(B.root,B.modal,p),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...I,...w,...H},additionalProps:{open:P,onClose:z,hideBackdrop:y,slots:{backdrop:I.slots.backdrop},slotProps:{backdrop:I.slotProps.backdrop}}}),[N,l]=A("paper",{elementType:vt,shouldForwardComponentProp:!0,className:W(B.paper,v.className),ownerState:R,externalForwardedProps:I,additionalProps:{elevation:k==="temporary"?x:0,square:!0,...k==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[g,L]=A("docked",{elementType:bt,ref:n,className:W(B.root,B.docked,p),ownerState:R,externalForwardedProps:I,additionalProps:w}),[we,Se]=A("transition",{elementType:xt,ownerState:R,externalForwardedProps:I,additionalProps:{in:P,direction:je[F],timeout:j,appear:b.current}}),re=t.jsx(N,{...l,children:f});if(k==="permanent")return t.jsx(g,{...L,children:re});const ne=t.jsx(we,{...Se,children:re});return k==="persistent"?t.jsx(g,{...L,children:ne}):t.jsx(X,{..._,children:ne})}),St=be({themeId:We}),Et=S([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")]),Pt=S(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"})),Ct=S(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),It=S(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"})),Mt=S(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"})),zt=S(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),Dt=S(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"})),Tt=S([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")]);function K(e){return t.jsxs(Ve,{...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 Rt={light:"dark",dark:"auto",auto:"light"},ie={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Bt(){const{mode:e,userChoice:r,setMode:n,allowUserToggle:o}=Ue();if(!o)return null;const s=r??e,a=Rt[s],i=s==="auto"?Pt:s==="dark"?Ge:Je;return t.jsx(U,{title:ie[s],children:t.jsx(V,{"aria-label":ie[s],onClick:()=>n(a),size:"small",children:t.jsx(i,{fontSize:"small"})})})}function Y({label:e,onClick:r}){return t.jsx(Qe,{clickable:!0,onClick:r,label:e,size:"small","aria-label":`Navigate to ${e}`,sx:n=>({backgroundColor:"background.paper",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:n.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"grey.100"}})})}function Lt(){const e=he(),r=e["*"],n=q();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(m,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(ut,{"aria-label":"breadcrumb",separator:t.jsx(Ct,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(Y,{label:e.environmentName,onClick:o=>n(`/${e.environmentName}/`,o)}),e.packageName&&t.jsx(Y,{label:e.packageName,onClick:o=>n(`/${e.environmentName}/${e.packageName}/`,o)}),r&&t.jsx(Y,{label:r,onClick:o=>n(`/${e.environmentName}/${e.packageName}/${r}`,o)})]})})}const Ht=260,$t=64;function ke({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){return t.jsxs(m,{sx:{height:"100dvh",width:e?$t:Ht,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(Nt,{isCollapsed:e,onToggleCollapse:r,logoHeader:n}),t.jsxs(m,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx(At,{isCollapsed:e}),t.jsx(Ot,{isCollapsed:e})]}),t.jsx(Wt,{isCollapsed:e}),t.jsx(Vt,{isCollapsed:e})]})}function Nt({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){const o=q();return n?t.jsxs(m,{sx:{height:56,display:"flex",alignItems:"center",justifyContent:"space-between",px:e?0:2,flexShrink:0},children:[n,t.jsx(V,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(K,{fontSize:"small"})})]}):t.jsxs(m,{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(m,{onClick:s=>o("/",s),sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",minWidth:0},children:[t.jsx(m,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:24,height:24,flexShrink:0}}),!e&&t.jsx(J,{variant:"subtitle1",sx:{color:"text.primary",fontWeight:500,letterSpacing:"-0.025em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:"Malloy Publisher"})]}),t.jsx(U,{title:e?"Expand sidebar":"Collapse sidebar",placement:"right",children:t.jsx(V,{size:"small",onClick:r,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:t.jsx(K,{fontSize:"small"})})})]})}function At({isCollapsed:e}){const n=fe().pathname==="/";return t.jsx(Q,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(zt,{fontSize:"small"}),label:"Home",to:"/",selected:n,isCollapsed:e})})}function Ot({isCollapsed:e}){const{apiClients:r}=Fe(),n=he(),{data:o}=Xe({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=o?.data??[];return s.length===0?null:t.jsxs(m,{sx:{mt:1},children:[!e&&t.jsx(J,{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(Q,{sx:{py:0},children:s.map(a=>{const i=a.name??"";return t.jsx(ee,{icon:t.jsx(Mt,{fontSize:"small"}),label:i,to:`/${i}`,selected:n.environmentName===i,isCollapsed:e},i)})})]})}function Wt({isCollapsed:e}){const n=fe().pathname.startsWith("/settings/theme");return t.jsx(Q,{sx:{pt:1,pb:0},children:t.jsx(ee,{icon:t.jsx(Tt,{fontSize:"small"}),label:"Visualization theme",to:"/settings/theme",selected:n,isCollapsed:e})})}function Vt({isCollapsed:e}){const r=[{label:"Malloy Docs",href:ae.docsHome,icon:t.jsx(Et,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:ae.publishing,icon:t.jsx(Dt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(It,{fontSize:"small"}),external:!1}];return t.jsx(Q,{sx:{py:1},children:r.map(n=>t.jsx(Ut,{label:n.label,href:n.href,icon:n.icon,external:n.external,isCollapsed:e},n.label))})}function ee({icon:e,label:r,to:n,selected:o,isCollapsed:s}){const a=q(),i=t.jsxs(xe,{selected:o,onClick:c=>a(n,c),sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:o?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(ge,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(U,{title:r,placement:"right",children:t.jsx(m,{children:i})}):i}function Ut({label:e,href:r,icon:n,external:o,isCollapsed:s}){const a=t.jsxs(xe,{component:"a",href:r,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:n}),!s&&t.jsx(ge,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(U,{title:e,placement:"right",children:t.jsx(m,{children:a})}):a}function Qt({open:e,onClose:r,logoHeader:n}){return t.jsx(wt,{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(ke,{isCollapsed:!1,onToggleCollapse:r,logoHeader:n})})}function _t({headerProps:e}){const r=Z(),n=St(r.breakpoints.up("md")),[o,s]=u.useState(!1),[a,i]=u.useState(!1);return u.useEffect(()=>{n&&o&&s(!1)},[n,o]),t.jsxs(m,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[n&&t.jsx(ke,{isCollapsed:a,onToggleCollapse:()=>i(c=>!c),logoHeader:e?.logoHeader}),t.jsxs(m,{component:"main",sx:{flex:1,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs(m,{sx:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",height:_e.headerHeight,px:{xs:1,md:3},backgroundColor:"background.default"},children:[t.jsx(m,{sx:{display:{xs:"flex",md:"none"},alignItems:"center",mr:1},children:t.jsx(V,{size:"small",onClick:()=>s(!0),"aria-label":"Open navigation",children:t.jsx(K,{fontSize:"small"})})}),t.jsx(m,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center"},children:t.jsx(Lt,{})}),t.jsxs(m,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Bt,{}),e?.endCap]})]}),t.jsx(m,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Ke,{}),children:t.jsx(Ye,{})})})]}),t.jsx(Qt,{open:o,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{_t as default};
@@ -1 +1 @@
1
- import{J as r,T as t,j as e,a3 as c,ac as o}from"./index-BW-8erNY.js";function m(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,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{m as default};
1
+ import{G as r,O as t,j as e,a5 as c,af as o}from"./index-JaIfCAcq.js";function m(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,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{m as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-CB4dOn75.js","assets/index-JaIfCAcq.js","assets/index-DUqldpo0.css"])))=>i.map(i=>d[i]);
2
+ import{c as N,j as a,O as f,r as p,a0 as j,a1 as v,K as y,H as o,a2 as E,a3 as P,a4 as W,a5 as x,a6 as R,$ as U,a7 as I,a8 as S,G as _,N as $,a9 as F,aa as O,ab as C,T as h,ac as d,ad as u}from"./index-JaIfCAcq.js";const D=N(a.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"})),g="[publisher.dashboard]";function b(e){return n=>{const s=n.type.endsWith("_refused")||n.type==="dashboard.rows_shown"&&!n.ok,t={...e,...n,at:new Date().toISOString()};s?console.warn(g,t):console.info(g,t)}}function k(e,n){const s=f();return p.useCallback((t,c)=>{const i=new URLSearchParams(t.givens).toString(),r=encodeURIComponent(e),l=encodeURIComponent(n),m=encodeURIComponent(t.dashboard);s(`/${r}/${l}/dashboards/${m}`+(i?`?${i}`:""),c)},[s,e,n])}function L({environmentName:e,packageName:n,dashboardName:s}){const{params:t,onGivensChange:c}=j(),i=k(e,n),r=v(),{pathname:l}=y(),m=p.useMemo(()=>b({environmentName:e,packageName:n,dashboardName:s}),[e,n,s]);return a.jsxs(o,{sx:{p:3,maxWidth:1600,mx:"auto"},children:[a.jsx(E,{direction:"row",sx:{justifyContent:"flex-end",mb:1},children:a.jsx(P,{size:"small",variant:"outlined",startIcon:a.jsx(D,{fontSize:"small"}),onClick:()=>r(`${l.replace(/\/$/,"")}/edit`),children:"Edit"})}),a.jsx(W,{resourceUri:x({environmentName:e,packageName:n}),dashboard:s,givens:t,onGivensChange:c,onNavigate:i,onEvent:m,maxResultSize:1024*1024})]})}const M=R.lazy(()=>I(()=>import("./index.es-CB4dOn75.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.DashboardEditor})));function z({environmentName:e,packageName:n,dashboardName:s}){const t=v(),{pathname:c}=y(),i=c.replace(/\/edit\/?$/,""),r=p.useMemo(()=>b({environmentName:e,packageName:n,dashboardName:s}),[e,n,s]);return a.jsx(o,{sx:{p:3,maxWidth:1600,mx:"auto"},children:a.jsx(p.Suspense,{fallback:a.jsx(U,{text:"Opening the builder…"}),children:a.jsx(M,{environmentName:e,packageName:n,dashboardName:s,onExit:()=>t(i),onEvent:r})})})}function w({environmentName:e,packageName:n,notebookPath:s}){const{params:t,onGivensChange:c}=j(),i=k(e,n),r=f();return a.jsx(o,{sx:{p:3,maxWidth:1200,mx:"auto"},children:a.jsx(S,{resourceUri:x({environmentName:e,packageName:n,modelPath:s}),maxResultSize:1024*1024,givens:t,onGivensChange:c,onNavigate:r,onDrillNavigate:i})})}function G(){const e=_(),n=e["*"],{server:s}=$();if(!e.environmentName)return a.jsx("div",{children:a.jsx("h2",{children:"Missing environment name"})});if(!e.packageName)return a.jsx("div",{children:a.jsx("h2",{children:"Missing package name"})});const t={p:3,maxWidth:1200,mx:"auto"};if(n?.startsWith("dashboards/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const l=n.slice(11);return l.endsWith("/edit")?a.jsx(z,{environmentName:e.environmentName,packageName:e.packageName,dashboardName:l.slice(0,-5)}):a.jsx(L,{environmentName:e.environmentName,packageName:e.packageName,dashboardName:l})}if(n?.startsWith("data-apps/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const l=n.slice(10),m=x({environmentName:e.environmentName,packageName:e.packageName,modelPath:l});return a.jsx(F,{resourceUri:m})}const c=x({environmentName:e.environmentName,packageName:e.packageName,modelPath:n});if(n?.endsWith(".malloy"))return a.jsx(o,{sx:t,children:a.jsx(O,{resourceUri:c,runOnDemand:!0,maxResultSize:512*1024})});if(n?.endsWith(".malloynb"))return a.jsx(w,{environmentName:e.environmentName,packageName:e.packageName,notebookPath:n});const i=/\.[^./]+$/.test(n??""),r=C({server:s,environmentName:e.environmentName,packageName:e.packageName,path:n??""});return a.jsxs(o,{sx:t,children:[a.jsx(h,{variant:"h6",sx:{fontWeight:600},children:"Nothing to open at this path"}),a.jsxs(h,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[a.jsx(o,{component:"span",sx:{fontFamily:d},children:n})," ","does not name a"," ",a.jsx(o,{component:"span",sx:{fontFamily:d},children:".malloy"})," ","or"," ",a.jsx(o,{component:"span",sx:{fontFamily:d},children:".malloynb"})," ","file in package"," ",a.jsx(o,{component:"span",sx:{fontFamily:d},children:e.packageName}),". This address opens"," ",a.jsx(o,{component:"span",sx:{fontFamily:d},children:".malloy"})," ","and"," ",a.jsx(o,{component:"span",sx:{fontFamily:d},children:".malloynb"})," ","files."]}),i&&a.jsxs(h,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",a.jsx(o,{component:"span",sx:{fontFamily:d},children:"public/"})," ","directory is served at ",a.jsx(u,{href:r,children:r}),"."]}),a.jsxs(h,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[a.jsxs(u,{href:`/${encodeURIComponent(e.environmentName)}/${encodeURIComponent(e.packageName)}`,children:["Back to ",e.packageName]})," ","lists this package's models, notebooks, and data apps."]})]})}export{G as default};
@@ -1 +1 @@
1
- import{J as r,T as t,j as e,a3 as c,ab as o}from"./index-BW-8erNY.js";function l(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,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{l as default};
1
+ import{G as r,O as t,j as e,a5 as c,ae as o}from"./index-JaIfCAcq.js";function l(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,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{l as default};
@@ -0,0 +1,116 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CNMFq7Ua.js","assets/index-JaIfCAcq.js","assets/index-DUqldpo0.css","assets/index-w_0OQJgZ.js"])))=>i.map(i=>d[i]);
2
+ import{j,H as oe,r as p,aD as ce,E as ue,l as he,aE as me,am as be,aF as H,a7 as J,aG as ye,aH as fe,aI as pe,aJ as ge,aK as ae}from"./index-JaIfCAcq.js";const v="publisher-drill";function ve(e,t){const r=new Set;let o;try{o=e.getMetadata()?.getAllFields()??[]}catch{return r}const l=new Set;for(const a of o)!a||t(a)||a.tag?.tag("hidden")===void 0&&l.add(a.tag?.text("label")??a.name);for(const a of o){if(!a||!t(a))continue;const n=a.tag?.text("label")??a.name;l.has(n)||r.add(n)}return r}function T(e){const t=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return t?t[1]:void 0}function we(e,t){if(t.size!==0)for(const r of e.querySelectorAll(".malloy-table")){const o=n=>n.closest(".malloy-table")===r,l=new Set;for(const n of r.querySelectorAll(".column-cell.th")){if(!o(n))continue;const i=(n.textContent??"").replace(/\u200b/g,"").trim(),y=T(n);y&&t.has(i)&&l.add(y)}if(l.size===0)continue;const a=new Set;for(const n of r.querySelectorAll(`.${v}[tabindex="0"]`)){if(!o(n))continue;const i=T(n);i&&(a.has(i)?n.tabIndex=-1:a.add(i))}for(const n of r.querySelectorAll(".column-cell.td")){if(!o(n))continue;const i=T(n),y=!n.querySelector(".value-null")&&(n.textContent??"").trim()!=="";if(i&&y&&l.has(i)&&!n.querySelector(".malloy-table")){if(n.classList.add(v),n.tabIndex===0)a.add(i);else{const h=a.has(i);h||a.add(i),n.tabIndex=h?-1:0}n.setAttribute("role","button")}}}}function ke(e){const t=e.closest(".malloy-table"),r=T(e);return!t||!r?[]:Array.from(t.querySelectorAll(`.${v}`)).filter(o=>o.closest(".malloy-table")===t&&T(o)===r)}function ne(e,t){const r=ke(e),o=r.indexOf(e);if(o===-1)return;const l=t==="first"?r[0]:t==="last"?r[r.length-1]:r[Math.min(Math.max(o+t,0),r.length-1)];if(l){for(const a of r)a.tabIndex=a===l?0:-1;return l}}function xe(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function Ce(e){const{foreground:t,axisFaint:r,font:o}=e,l={background:e.background,font:o.family,title:{color:t,font:o.family},axis:{labelColor:t,titleColor:t,domainColor:r,tickColor:r,gridColor:r,labelFont:o.family,titleFont:o.family},legend:{labelColor:t,titleColor:t,labelFont:o.family,titleFont:o.family},header:{labelColor:t,titleColor:t},range:{category:e.series}};return a=>l}function Ee(e){if(!e)return;const t=e.tag("theme");if(!t)return;const r={},o=t.tag("palette");if(o){const a={},n=o.textArray("series");n&&n.length>0&&(a.series=n);for(const i of ce){const y=o.tag(i);if(!y)continue;const h={},w=y.text("light"),A=y.text("dark");w&&(h.light=w),A&&(h.dark=A),Object.keys(h).length>0&&(a[i]=h)}Object.keys(a).length>0&&(r.palette=a)}const l=t.tag("font");if(l){const a={},n=l.text("family");n&&(a.family=n);const i=l.numeric("size");typeof i=="number"&&Number.isFinite(i)&&(a.size=i),Object.keys(a).length>0&&(r.font=a)}return Object.keys(r).length>0?r:void 0}const Ae=async(e,t)=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:r}=await J(async()=>{const{MalloyRenderer:o}=await import("./index-DSoCUF-f.js");return{MalloyRenderer:o}},[]);return new r({onClick:t,vegaConfigOverride:Ce(e),theme:xe(e),onError:o=>{console.error("Error rendering visualization:",typeof o,o)}}).createViz()};typeof window<"u"&&J(()=>import("./index-DSoCUF-f.js"),[]);async function Se(e){if(!e||typeof e!="object")return;const t=e,r=[...Array.isArray(t.model_annotations)?t.model_annotations:[],...Array.isArray(t.source_annotations)?t.source_annotations:[],...Array.isArray(t.annotations)?t.annotations:[]].map(l=>typeof l?.value=="string"?l.value:void 0).filter(l=>!!l);if(r.length===0)return;let o;try{({parseAnnotation:o}=await J(()=>import("./index-CNMFq7Ua.js").then(l=>l.i),__vite__mapDeps([0,1,2,3])))}catch{return}try{const{tag:l}=o(r);return Ee(l)}catch(l){console.warn("Failed to parse # theme.* annotations; chart will render with the shell theme.",{error:l,lines:r});return}}function _e(e,t,r){const o=ye(t,r);for(const[l,a]of Object.entries(o))e.style.setProperty(l,a)}const Re=`
3
+ /* Card geometry, through the renderer's OWN theme vars rather than over the top
4
+ of them. It declares --malloy-theme--dashboard-* on .malloy-render itself and
5
+ passes each through to the --malloy-render--* the card CSS reads, so a value
6
+ inherited from our wrapper loses to that declaration however early it is set:
7
+ this has to be a rule on the same element, at higher specificity. Doubling the
8
+ class does that, and then no !important is needed — which matters, because
9
+ !important here also lands on .dashboard-item-borderless and repaints a card
10
+ the author asked to have no card. */
11
+ .malloy-render.malloy-render {
12
+ --malloy-theme--dashboard-card-radius: var(--publisher-dashboard-card-radius);
13
+ --malloy-theme--dashboard-card-padding: var(--publisher-dashboard-card-padding);
14
+ }
15
+ /* dashboard.css hardcodes background: #f7f9fc on .malloy-dashboard
16
+ and .dashboard-row-header, which would paint light grey in dark
17
+ mode and also bleed an operator-picked palette.background across
18
+ the panel chrome in light. Both surfaces use
19
+ --malloy-render--background here, which buildMalloyExplicitTheme
20
+ wires to dashboardRoot: a mode-keyed neutral that stays decoupled
21
+ from palette.background (the chart canvas) on purpose. Selectors
22
+ are duplicated at higher specificity to beat the renderer s own
23
+ scoped rules. */
24
+ .malloy-render .malloy-dashboard,
25
+ .malloy-render.malloy-render .malloy-dashboard,
26
+ div.malloy-render .malloy-dashboard {
27
+ /* --publisher-dashboard-root is set on the outer Publisher wrapper
28
+ (see buildTableCssVars) and stays decoupled from
29
+ --malloy-render--background, which gets shadowed inside the
30
+ renderer when a theme.background annotation is present. The
31
+ dedicated var means the panel between tiles always paints the
32
+ operator neutral dashboardRoot regardless of annotations. */
33
+ background: var(--publisher-dashboard-root) !important;
34
+ background-color: var(--publisher-dashboard-root) !important;
35
+ color: var(--malloy-render--table-body-color) !important;
36
+ }
37
+ .malloy-render .malloy-dashboard .dashboard-row,
38
+ .malloy-render .malloy-dashboard .dashboard-row-body,
39
+ .malloy-render .malloy-dashboard .dashboard-row-header,
40
+ .malloy-render.malloy-render .malloy-dashboard .dashboard-row-header,
41
+ div.malloy-render .malloy-dashboard .dashboard-row-header {
42
+ /* Belt + suspenders: dashboard.css hardcodes .dashboard-row-header
43
+ to #f7f9fc, and row / row-body have no explicit background but
44
+ get caught in any annotation-driven inline writes. Force all of
45
+ them to the neutral panel colour. */
46
+ background: var(--publisher-dashboard-root) !important;
47
+ background-color: var(--publisher-dashboard-root) !important;
48
+ }
49
+ .malloy-render .malloy-dashboard .dashboard-item:not(.dashboard-item-borderless) {
50
+ /* Tile padding around each chart / table. Uses our custom
51
+ --malloy-render--tile-background so the operator can theme the
52
+ tile separately from the table header row (which paints from
53
+ --malloy-render--table-pinned-background below).
54
+
55
+ A flat bordered card rather than the renderer's shadow ring, which is what
56
+ makes it match the composite tile's Paper. :not(borderless) because
57
+ # borderless asks for no card at all, and an !important background and
58
+ border drew one anyway. */
59
+ background: var(--malloy-render--tile-background) !important;
60
+ color: var(--malloy-render--table-body-color) !important;
61
+ box-shadow: none !important;
62
+ border: var(--malloy-render--table-border) !important;
63
+ }
64
+ .malloy-render .malloy-dashboard .dashboard-row-header-separator {
65
+ background: var(--malloy-render--table-border) !important;
66
+ }
67
+ .malloy-render .malloy-table .th.column-cell {
68
+ /* Non-pinned tables have no header background in the renderer's
69
+ own CSS (only pinned scrolled tables paint the pinned-header
70
+ with this var). Force the same value here so every table has a
71
+ visible header band reflecting the operator's choice. */
72
+ background: var(--malloy-render--table-pinned-background) !important;
73
+ }
74
+ .malloy-render .dashboard-item-title,
75
+ .malloy-render .dashboard-dimension-name {
76
+ color: var(--malloy-render--label-color) !important;
77
+ }
78
+ .malloy-render .dashboard-item-value,
79
+ .malloy-render .dashboard-item-value-measure,
80
+ .malloy-render .dashboard-dimension-value {
81
+ color: var(--malloy-render--value-color) !important;
82
+ }
83
+ .malloy-render .malloy-table,
84
+ .malloy-render .malloy-list {
85
+ color: var(--malloy-render--table-body-color) !important;
86
+ }
87
+ .malloy-render .column-cell.th,
88
+ .malloy-render .cell-content.header {
89
+ color: var(--malloy-render--table-header-color) !important;
90
+ }
91
+ /* A cell whose column declares a "# drill" this surface can honor, marked
92
+ by markDrillableCells. Ordinary text with a pointer cursor until hovered,
93
+ then it reads as a link: the same affordance Malloyyo gives the same tag,
94
+ and the only thing that tells a reader a cell navigates. Kept off the
95
+ resting state deliberately: a column painted blue competes with the data.
96
+ (No backticks in here: this is inside a template literal.) */
97
+ .malloy-render .${v} {
98
+ cursor: pointer;
99
+ }
100
+ .malloy-render .${v}:hover > .cell-content {
101
+ color: var(--publisher-drill-link) !important;
102
+ text-decoration: underline;
103
+ }
104
+ /* Keyboard focus reads the same as hover, plus a ring: a hover colour is not
105
+ something a keyboard user can produce, and a focus ring is not something a
106
+ mouse user sees. focus-visible rather than focus, so a click does not leave a
107
+ ring behind it. (No backticks in here: this is inside a template literal.) */
108
+ .malloy-render .${v}:focus-visible {
109
+ outline: 2px solid var(--publisher-drill-link);
110
+ outline-offset: -2px;
111
+ }
112
+ .malloy-render .${v}:focus-visible > .cell-content {
113
+ color: var(--publisher-drill-link) !important;
114
+ text-decoration: underline;
115
+ }
116
+ `,le="publisher-malloy-renderer-overrides";function Fe(){if(typeof document>"u"||document.getElementById(le))return;const e=document.createElement("style");e.id=le,e.textContent=Re,document.head.appendChild(e)}function ze({result:e,height:t,drill:r,onSizeChange:o,onSizing:l}){const a=p.useRef(null),n=p.useRef(r);n.current=r;const i=p.useCallback(m=>{n.current?.onClick(m)},[]),y=r!==void 0,h=p.useRef(!1),w=p.useRef(null),A=p.useRef(0),{theme:K,layers:U,mode:G}=ue(),W=he().shape.borderRadius,X=p.useMemo(()=>({radius:`${W}px`,padding:`${me}px`}),[W]);return p.useEffect(()=>()=>{A.current+=1,w.current?.viz.remove(),w.current=null},[]),p.useLayoutEffect(()=>{if(!a.current||!e)return;Fe();const m=a.current,se=A.current+=1;let P=!1;const q=()=>!P&&se===A.current;let d,b,B=null,N=0,L=null,$=null,I=null,z=null,O=null,M=null,Y=null,Q=0,S=null;h.current=!1;let g,_;const V=k=>{if(P||!k.firstElementChild||H(g,_)==="container")return;const D=fe(g,_);if(h.current&&!D)return;const C=pe(k,ae(g));C>0&&(h.current=!0,o&&C!==Q&&(Q=C,o(C)));const f=ge(k,ae(g));D&&f&&Y!==f&&(Y=f,M?.disconnect(),M=new ResizeObserver(()=>V(k)),M.observe(f))};return(async()=>{let k;try{k=JSON.parse(e)}catch(x){console.error("Error parsing visualization result:",x);return}const D=await Se(k),C=D?be([...U,D],G):K;if(!q())return;try{b=await Ae(C,i)}catch(x){console.error("Failed to create renderer:",x);return}if(!q()){b.remove(),b=void 0;return}const f=w.current;d=document.createElement("div"),d.style.width="100%",d.style.height="100%",_e(d,C,X),f&&(m.style.position="relative",d.style.position="absolute",d.style.inset="0",d.style.visibility="hidden"),m.appendChild(d);const u=d;z=new MutationObserver(()=>{O&&clearTimeout(O),O=setTimeout(()=>{V(u),h.current&&z?.disconnect()},100)}),z.observe(d,{childList:!0,subtree:!0,attributes:!0});const ie=b;let Z=!1;const ee=()=>{Z||!q()||(Z=!0,S&&(clearTimeout(S),S=null),f&&(f.viz.remove(),f.node.parentNode===m&&m.removeChild(f.node)),u.style.position="",u.style.inset="",u.style.visibility="",m.style.position="",w.current={viz:ie,node:u},V(u))};try{b.setResult(k);try{const E=b.getMetadata(),R=E?.getRootField();g=R?.renderAs(),_=R?E?.getPluginsForField(R.key)?.[0]?.sizingStrategy:void 0}catch{g=void 0,_=void 0}l?.(H(g,_)),d.dataset.malloyRenderAs=g??"unknown",d.dataset.malloySizing=H(g,_),b.render(d);const x=n.current;try{if(x){const E=ve(b,x.canDrill),R=()=>{try{we(u,E)}catch(s){console.warn("Drill affordance skipped:",s)}};R();const te=s=>{const c=s.querySelector(".cell-content")??s,F=c.getBoundingClientRect();c.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:c.ownerDocument.defaultView,clientX:Math.round(F.left+F.width/2),clientY:Math.round(F.bottom)}))},re=s=>s.target?.closest?.(`.${v}`)??null,de=(s,c)=>{ne(s,c)?.focus()};L=s=>{const c=re(s);if(!c)return;const F=s.key==="ArrowDown"?1:s.key==="ArrowUp"?-1:s.key==="Home"?"first":s.key==="End"?"last":void 0;if(F!==void 0){s.preventDefault(),de(c,F);return}s.key==="Enter"?(s.preventDefault(),te(c)):s.key===" "&&s.preventDefault()},$=s=>{if(s.key!==" ")return;const c=re(s);c&&(s.preventDefault(),te(c))},I=s=>{const c=s.target?.closest?.(`.${v}`);c&&ne(c,0)},u.addEventListener("keydown",L),u.addEventListener("keyup",$),u.addEventListener("focusin",I),E.size>0&&typeof MutationObserver<"u"&&(B=new MutationObserver(()=>{cancelAnimationFrame(N),N=requestAnimationFrame(R)}),B.observe(u,{childList:!0,subtree:!0}))}}catch(E){console.warn("Drill affordance skipped:",E)}b.onReady(ee),S=setTimeout(ee,1e4)}catch(x){console.error("Error rendering visualization:",x),z?.disconnect(),M?.disconnect(),B?.disconnect(),b.remove(),b=void 0,u.parentNode===m&&m.removeChild(u)}})(),()=>{P=!0,z?.disconnect(),M?.disconnect(),O&&clearTimeout(O),S&&clearTimeout(S),d&&w.current?.node!==d&&(L&&d.removeEventListener("keydown",L),$&&d.removeEventListener("keyup",$),I&&d.removeEventListener("focusin",I),B?.disconnect(),cancelAnimationFrame(N),b?.remove(),d.parentNode===m&&m.removeChild(d),m.style.position="")}},[e,i,y,o,l,K,U,G,X]),j.jsx("div",{ref:a,style:{width:"100%",height:t?`${t}px`:"400px"}})}function Oe(e){return typeof window>"u"?j.jsx(oe,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading..."}):j.jsx(p.Suspense,{fallback:j.jsx(oe,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading visualization..."}),children:j.jsx(ze,{...e})})}const De=Object.freeze(Object.defineProperty({__proto__:null,default:Oe},Symbol.toStringTag,{value:"Module"}));export{v as D,Oe as R,Ce as a,xe as b,De as c,ve as d,we as m,Ee as r};
@@ -1 +1 @@
1
- import{ae as o,j as r,af as s,ag as n,K as t,l as a}from"./index-BW-8erNY.js";function x(){const e=o();return console.error(e),r.jsx(s,{maxWidth:"lg",component:"main",sx:{display:"flex",flexDirection:"column",my:2,gap:0},children:r.jsxs(n,{sx:{m:"auto",flexDirection:"column"},children:[r.jsx(t,{sx:{height:"300px"}}),r.jsx("img",{src:"/error.png"}),r.jsx(a,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}export{x as default};
1
+ import{ah as o,j as r,ai as s,a2 as n,H as t,T as a}from"./index-JaIfCAcq.js";function x(){const e=o();return console.error(e),r.jsx(s,{maxWidth:"lg",component:"main",sx:{display:"flex",flexDirection:"column",my:2,gap:0},children:r.jsxs(n,{sx:{m:"auto",flexDirection:"column"},children:[r.jsx(t,{sx:{height:"300px"}}),r.jsx("img",{src:"/error.png"}),r.jsx(a,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}export{x as default};