@malloy-publisher/app 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -16,7 +16,7 @@ SPDX-License-Identifier: MIT
16
16
  href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
17
17
  />
18
18
  <title>Malloy Publisher</title>
19
- <script type="module" crossorigin src="/assets/index-C1qGlR2a.js"></script>
19
+ <script type="module" crossorigin src="/assets/index-CSUU2t5Q.js"></script>
20
20
  <link rel="stylesheet" crossorigin href="/assets/index-DUqldpo0.css">
21
21
  </head>
22
22
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@malloy-publisher/app",
3
3
  "description": "Malloy Publisher Console (the built-in web UI)",
4
- "version": "0.8.0",
4
+ "version": "0.8.2",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",
@@ -41,7 +41,7 @@
41
41
  "test:playwright:headed": "bunx playwright test --config=playwright.config.ts --headed"
42
42
  },
43
43
  "dependencies": {
44
- "@malloy-publisher/sdk": "^0.8.0",
44
+ "@malloy-publisher/sdk": "^0.8.2",
45
45
  "@mui/icons-material": "^7.0.2",
46
46
  "@mui/material": "^7.0.2",
47
47
  "@tanstack/react-query": "^5.59.16",
@@ -1 +0,0 @@
1
- import{t,L as r,j as e,a7 as i,ai as o}from"./index-C1qGlR2a.js";function m(){const s=t(),{environmentName:n}=r();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 +0,0 @@
1
- import{t as n,j as o,p as a}from"./index-C1qGlR2a.js";function s(){const t=n();return o.jsx(a,{onClickEnvironment:t})}export{s as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-BlAu_Rj1.js","assets/index-C1qGlR2a.js","assets/index-DUqldpo0.css","assets/ToggleButtonGroup-Dl_oTC8r.js"])))=>i.map(i=>d[i]);
2
- import{c as W,j as a,t as f,r as x,a1 as v,J as b,K as $,a2 as k,N as i,a3 as m,a4 as y,a5 as _,a6 as L,a7 as p,a8 as N,a9 as U,aa as R,a0 as D,ab as F,L as I,U as S,ac as T,ad as M,ae as O,T as j,af as h,ag as w}from"./index-C1qGlR2a.js";const A=W(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"}));function E(e,s){const n=f();return x.useCallback((t,r)=>{const l=new URLSearchParams(t.givens).toString(),c=encodeURIComponent(e),d=encodeURIComponent(s),o=encodeURIComponent(t.dashboard);n(`/${c}/${d}/dashboards/${o}`+(l?`?${l}`:""),r)},[n,e,s])}function z({environmentName:e,packageName:s,dashboardName:n}){const{params:t,onGivensChange:r}=v(),l=E(e,s),c=b(),{pathname:d}=$(),o=x.useMemo(()=>k({environmentName:e,packageName:s,dashboardName:n}),[e,s,n]);return x.useEffect(()=>{const u=()=>void N(()=>import("./index.es-BlAu_Rj1.js"),__vite__mapDeps([0,1,2,3])),g=window.requestIdleCallback;if(g){const P=g(u);return()=>window.cancelIdleCallback?.(P)}const C=setTimeout(u,1500);return()=>clearTimeout(C)},[]),a.jsxs(i,{sx:{p:3,maxWidth:1600,mx:"auto"},children:[a.jsx(m,{label:s,href:`/${e}/${s}`,onClick:()=>c(`/${e}/${s}`)}),a.jsx(y,{children:a.jsx(_,{label:"Edit",icon:a.jsx(A,{}),onClick:()=>c(`${d.replace(/\/$/,"")}/edit`)})}),a.jsx(L,{resourceUri:p({environmentName:e,packageName:s}),dashboard:n,givens:t,onGivensChange:r,onNavigate:l,onEvent:o,maxResultSize:1024*1024})]})}const G=U.lazy(()=>N(()=>import("./index.es-BlAu_Rj1.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.DashboardEditor})));function V({environmentName:e,packageName:s,dashboardName:n}){const t=b(),{pathname:r}=$(),l=r.replace(/\/edit\/?$/,""),c=x.useMemo(()=>k({environmentName:e,packageName:s,dashboardName:n}),[e,s,n]);return a.jsxs(i,{sx:{p:3,maxWidth:1600,mx:"auto"},children:[a.jsx(m,{label:s,href:`/${e}/${s}`,onClick:()=>t(`/${e}/${s}`)}),a.jsx(x.Suspense,{fallback:a.jsxs(R,{sx:{gap:2},children:[a.jsx(y,{}),a.jsx(D,{text:"Opening the builder…"})]}),children:a.jsx(G,{resourceUri:p({environmentName:e,packageName:s}),dashboard:n,onExit:()=>t(l),onEvent:c})})]})}function q({environmentName:e,packageName:s,notebookPath:n}){const{params:t,onGivensChange:r}=v(),l=E(e,s),c=f();return a.jsxs(i,{sx:{p:3,maxWidth:1200,mx:"auto"},children:[a.jsx(m,{label:s,href:`/${e}/${s}`,onClick:d=>c(`/${e}/${s}`,d)}),a.jsx(F,{resourceUri:p({environmentName:e,packageName:s,modelPath:n}),maxResultSize:1024*1024,givens:t,onGivensChange:r,onNavigate:c,onDrillNavigate:l})]})}function H(){const e=I(),s=e["*"],{server:n}=S(),t=f();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 r={p:3,maxWidth:1200,mx:"auto"};if(s?.startsWith("dashboards/")&&!s.endsWith(".malloy")&&!s.endsWith(".malloynb")){const o=s.slice(11);return o.endsWith("/edit")?a.jsx(V,{environmentName:e.environmentName,packageName:e.packageName,dashboardName:o.slice(0,-5)}):a.jsx(z,{environmentName:e.environmentName,packageName:e.packageName,dashboardName:o})}if(s?.startsWith("data-apps/")&&!s.endsWith(".malloy")&&!s.endsWith(".malloynb")){const o=s.slice(10),u=p({environmentName:e.environmentName,packageName:e.packageName,modelPath:o});return a.jsxs(i,{sx:r,children:[a.jsx(m,{label:e.packageName,href:`/${e.environmentName}/${e.packageName}`,onClick:g=>t(`/${e.environmentName}/${e.packageName}`,g)}),a.jsx(T,{resourceUri:u})]})}const l=p({environmentName:e.environmentName,packageName:e.packageName,modelPath:s});if(s?.endsWith(".malloy"))return a.jsxs(i,{sx:r,children:[a.jsx(m,{label:e.packageName,href:`/${e.environmentName}/${e.packageName}`,onClick:o=>t(`/${e.environmentName}/${e.packageName}`,o)}),a.jsx(M,{resourceUri:l,runOnDemand:!0,maxResultSize:512*1024})]});if(s?.endsWith(".malloynb"))return a.jsx(q,{environmentName:e.environmentName,packageName:e.packageName,notebookPath:s});const c=/\.[^./]+$/.test(s??""),d=O({server:n,environmentName:e.environmentName,packageName:e.packageName,path:s??""});return a.jsxs(i,{sx:r,children:[a.jsx(m,{label:e.packageName,href:`/${e.environmentName}/${e.packageName}`,onClick:o=>t(`/${e.environmentName}/${e.packageName}`,o)}),a.jsx(j,{variant:"h6",sx:{fontWeight:600},children:"Nothing to open at this path"}),a.jsxs(j,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[a.jsx(i,{component:"span",sx:{fontFamily:h},children:s})," ","does not name a"," ",a.jsx(i,{component:"span",sx:{fontFamily:h},children:".malloy"})," ","or"," ",a.jsx(i,{component:"span",sx:{fontFamily:h},children:".malloynb"})," ","file in package"," ",a.jsx(i,{component:"span",sx:{fontFamily:h},children:e.packageName}),". This address opens"," ",a.jsx(i,{component:"span",sx:{fontFamily:h},children:".malloy"})," ","and"," ",a.jsx(i,{component:"span",sx:{fontFamily:h},children:".malloynb"})," ","files."]}),c&&a.jsxs(j,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",a.jsx(i,{component:"span",sx:{fontFamily:h},children:"public/"})," ","directory is served at ",a.jsx(w,{href:d,children:d}),"."]}),a.jsx(j,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"The package lists its models, notebooks, and data apps."})]})}export{H as default};
@@ -1 +0,0 @@
1
- import{L as r,t,j as e,a7 as c,ah as o}from"./index-C1qGlR2a.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};