@malloy-publisher/server 0.0.165 → 0.0.168
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/.eslintrc.json +9 -1
- package/dist/app/api-doc.yaml +143 -1
- package/dist/app/assets/HomePage-D2tUw_9U.js +1 -0
- package/dist/app/assets/{MainPage-DAyUfYba.js → MainPage-DBQW76L7.js} +2 -2
- package/dist/app/assets/{ModelPage-CrMryV1s.js → ModelPage-BnfOKuhQ.js} +1 -1
- package/dist/app/assets/PackagePage-zPhE-rDg.js +1 -0
- package/dist/app/assets/ProjectPage-BpSTvuW6.js +1 -0
- package/dist/app/assets/RouteError-Cp9-yCK5.js +1 -0
- package/dist/app/assets/{WorkbookPage-DZEVYGW3.js → WorkbookPage-FD_gmxeE.js} +1 -1
- package/dist/app/assets/{index-BvVmB5sv.js → index-D5QBYuLK.js} +150 -150
- package/dist/app/assets/{index-CsC07BYd.js → index-DNCvL_5f.js} +1 -1
- package/dist/app/assets/{index-DWhjtyBB.js → index-x9S1fsYn.js} +1 -1
- package/dist/app/assets/{index.umd-DvM-lTQa.js → index.umd-CTYdFEHH.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/instrumentation.js +85955 -88560
- package/dist/server.js +197441 -106276
- package/package.json +2 -1
- package/src/controller/compile.controller.ts +35 -0
- package/src/controller/connection.controller.ts +22 -2
- package/src/controller/model.controller.ts +20 -9
- package/src/health.ts +8 -0
- package/src/instrumentation.ts +123 -34
- package/src/server.ts +49 -3
- package/src/service/connection.spec.ts +1331 -0
- package/src/service/connection.ts +407 -29
- package/src/service/db_utils.ts +104 -45
- package/src/service/gcs_s3_utils.ts +115 -40
- package/src/service/model.ts +5 -5
- package/src/service/project.ts +140 -4
- package/src/service/project_compile.spec.ts +197 -0
- package/src/service/project_store.ts +49 -21
- package/src/storage/StorageManager.ts +4 -3
- package/src/storage/duckdb/schema.ts +6 -5
- package/tests/harness/e2e.ts +4 -0
- package/tests/harness/mcp_test_setup.ts +172 -28
- package/tests/unit/duckdb/attached_databases.test.ts +61 -3
- package/tests/unit/ducklake/ducklake.test.ts +950 -0
- package/dist/app/assets/HomePage-QekMXs8r.js +0 -1
- package/dist/app/assets/PackagePage-DDaABD2A.js +0 -1
- package/dist/app/assets/ProjectPage-FAYUFGhL.js +0 -1
- package/dist/app/assets/RouteError-BKYctANX.js +0 -1
package/.eslintrc.json
CHANGED
|
@@ -31,6 +31,14 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"rules": {
|
|
34
|
-
"react/react-in-jsx-scope": "off"
|
|
34
|
+
"react/react-in-jsx-scope": "off",
|
|
35
|
+
"@typescript-eslint/no-unused-vars": [
|
|
36
|
+
"error",
|
|
37
|
+
{
|
|
38
|
+
"argsIgnorePattern": "^_",
|
|
39
|
+
"varsIgnorePattern": "^_",
|
|
40
|
+
"caughtErrorsIgnorePattern": "^_"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
35
43
|
}
|
|
36
44
|
}
|
package/dist/app/api-doc.yaml
CHANGED
|
@@ -399,6 +399,8 @@ paths:
|
|
|
399
399
|
$ref: "#/components/schemas/MotherDuckConnection"
|
|
400
400
|
trinoConnection:
|
|
401
401
|
$ref: "#/components/schemas/TrinoConnection"
|
|
402
|
+
ducklakeConnection:
|
|
403
|
+
$ref: "#/components/schemas/DucklakeConnection"
|
|
402
404
|
responses:
|
|
403
405
|
"200":
|
|
404
406
|
description: Connection updated successfully
|
|
@@ -1318,6 +1320,57 @@ paths:
|
|
|
1318
1320
|
"503":
|
|
1319
1321
|
$ref: "#/components/responses/ServiceUnavailable"
|
|
1320
1322
|
|
|
1323
|
+
/projects/{projectName}/packages/{packageName}/models/{path}/compile:
|
|
1324
|
+
post:
|
|
1325
|
+
tags:
|
|
1326
|
+
- models
|
|
1327
|
+
operationId: compile-model-source
|
|
1328
|
+
summary: Compile Malloy source code
|
|
1329
|
+
description: |
|
|
1330
|
+
Compiles Malloy source code in the context of a specific model's directory,
|
|
1331
|
+
allowing relative imports to resolve correctly against sibling model files.
|
|
1332
|
+
Returns compilation status and any problems (errors or warnings) found.
|
|
1333
|
+
parameters:
|
|
1334
|
+
- name: projectName
|
|
1335
|
+
in: path
|
|
1336
|
+
description: Name of the project
|
|
1337
|
+
required: true
|
|
1338
|
+
schema:
|
|
1339
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
1340
|
+
- name: packageName
|
|
1341
|
+
in: path
|
|
1342
|
+
description: Name of the package
|
|
1343
|
+
required: true
|
|
1344
|
+
schema:
|
|
1345
|
+
type: string
|
|
1346
|
+
- name: path
|
|
1347
|
+
in: path
|
|
1348
|
+
description: Path to the model within the package (used to resolve relative imports)
|
|
1349
|
+
required: true
|
|
1350
|
+
schema:
|
|
1351
|
+
$ref: "#/components/schemas/PathPattern"
|
|
1352
|
+
requestBody:
|
|
1353
|
+
required: true
|
|
1354
|
+
content:
|
|
1355
|
+
application/json:
|
|
1356
|
+
schema:
|
|
1357
|
+
$ref: "#/components/schemas/CompileRequest"
|
|
1358
|
+
responses:
|
|
1359
|
+
"200":
|
|
1360
|
+
description: Compilation result with status and any problems
|
|
1361
|
+
content:
|
|
1362
|
+
application/json:
|
|
1363
|
+
schema:
|
|
1364
|
+
$ref: "#/components/schemas/CompileResult"
|
|
1365
|
+
"400":
|
|
1366
|
+
$ref: "#/components/responses/BadRequest"
|
|
1367
|
+
"404":
|
|
1368
|
+
$ref: "#/components/responses/NotFound"
|
|
1369
|
+
"500":
|
|
1370
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1371
|
+
"503":
|
|
1372
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1373
|
+
|
|
1321
1374
|
/projects/{projectName}/packages/{packageName}/notebooks:
|
|
1322
1375
|
get:
|
|
1323
1376
|
tags:
|
|
@@ -2006,7 +2059,7 @@ components:
|
|
|
2006
2059
|
type: string
|
|
2007
2060
|
description: Type of database connection
|
|
2008
2061
|
enum:
|
|
2009
|
-
[postgres, bigquery, snowflake, trino, mysql, duckdb, motherduck]
|
|
2062
|
+
[postgres, bigquery, snowflake, trino, mysql, duckdb, motherduck, ducklake]
|
|
2010
2063
|
attributes:
|
|
2011
2064
|
$ref: "#/components/schemas/ConnectionAttributes"
|
|
2012
2065
|
postgresConnection:
|
|
@@ -2023,6 +2076,8 @@ components:
|
|
|
2023
2076
|
$ref: "#/components/schemas/DuckdbConnection"
|
|
2024
2077
|
motherduckConnection:
|
|
2025
2078
|
$ref: "#/components/schemas/MotherDuckConnection"
|
|
2079
|
+
ducklakeConnection:
|
|
2080
|
+
$ref: "#/components/schemas/DucklakeConnection"
|
|
2026
2081
|
|
|
2027
2082
|
ConnectionAttributes:
|
|
2028
2083
|
type: object
|
|
@@ -2122,6 +2177,37 @@ components:
|
|
|
2122
2177
|
- accessKeyId
|
|
2123
2178
|
- secretAccessKey
|
|
2124
2179
|
|
|
2180
|
+
DucklakeConnection:
|
|
2181
|
+
type: object
|
|
2182
|
+
description: DuckLake lakehouse connection configuration
|
|
2183
|
+
properties:
|
|
2184
|
+
storage:
|
|
2185
|
+
type: object
|
|
2186
|
+
description: Data storage connection configuration (S3 or GCS)
|
|
2187
|
+
properties:
|
|
2188
|
+
bucketUrl:
|
|
2189
|
+
type: string
|
|
2190
|
+
description: URL of the storage bucket (e.g. s3://my-bucket/path or gs://my-bucket/path)
|
|
2191
|
+
s3Connection:
|
|
2192
|
+
$ref: "#/components/schemas/S3Connection"
|
|
2193
|
+
description: AWS S3 connection configuration for data storage
|
|
2194
|
+
gcsConnection:
|
|
2195
|
+
$ref: "#/components/schemas/GCSConnection"
|
|
2196
|
+
description: Google Cloud Storage connection configuration for data storage
|
|
2197
|
+
required:
|
|
2198
|
+
- bucketUrl
|
|
2199
|
+
catalog:
|
|
2200
|
+
type: object
|
|
2201
|
+
description: Catalog metadata connection configuration
|
|
2202
|
+
properties:
|
|
2203
|
+
postgresConnection:
|
|
2204
|
+
$ref: "#/components/schemas/PostgresConnection"
|
|
2205
|
+
description: PostgreSQL connection for DuckLake metadata catalog
|
|
2206
|
+
required:
|
|
2207
|
+
- postgresConnection
|
|
2208
|
+
required:
|
|
2209
|
+
- storage
|
|
2210
|
+
- catalog
|
|
2125
2211
|
BigqueryConnection:
|
|
2126
2212
|
type: object
|
|
2127
2213
|
description: Google BigQuery database connection configuration
|
|
@@ -2390,3 +2476,59 @@ components:
|
|
|
2390
2476
|
errorMessage:
|
|
2391
2477
|
type: string
|
|
2392
2478
|
description: Error message if the connection test failed, null if successful
|
|
2479
|
+
|
|
2480
|
+
CompileRequest:
|
|
2481
|
+
type: object
|
|
2482
|
+
description: Request body for compiling Malloy source code
|
|
2483
|
+
properties:
|
|
2484
|
+
source:
|
|
2485
|
+
type: string
|
|
2486
|
+
description: Malloy source code to compile
|
|
2487
|
+
includeSql:
|
|
2488
|
+
type: boolean
|
|
2489
|
+
default: false
|
|
2490
|
+
description: If true, returns the generated SQL alongside compilation results (only available when compilation succeeds and the source contains a runnable query).
|
|
2491
|
+
required:
|
|
2492
|
+
- source
|
|
2493
|
+
|
|
2494
|
+
CompileResult:
|
|
2495
|
+
type: object
|
|
2496
|
+
description: Result of a Malloy source compilation check
|
|
2497
|
+
properties:
|
|
2498
|
+
status:
|
|
2499
|
+
type: string
|
|
2500
|
+
description: Overall compilation status — "error" if any problems have error severity
|
|
2501
|
+
enum: ["success", "error"]
|
|
2502
|
+
problems:
|
|
2503
|
+
type: array
|
|
2504
|
+
description: List of compilation problems (errors and warnings)
|
|
2505
|
+
items:
|
|
2506
|
+
$ref: "#/components/schemas/CompileProblem"
|
|
2507
|
+
sql:
|
|
2508
|
+
type: string
|
|
2509
|
+
description: Generated SQL for the compiled query. Only present when includeSql is true and compilation succeeds with a runnable query.
|
|
2510
|
+
|
|
2511
|
+
CompileProblem:
|
|
2512
|
+
type: object
|
|
2513
|
+
description: A compilation problem reported by the Malloy compiler
|
|
2514
|
+
properties:
|
|
2515
|
+
message:
|
|
2516
|
+
type: string
|
|
2517
|
+
description: Human-readable problem description
|
|
2518
|
+
severity:
|
|
2519
|
+
type: string
|
|
2520
|
+
description: Severity level of the problem
|
|
2521
|
+
enum: ["error", "warn", "debug"]
|
|
2522
|
+
code:
|
|
2523
|
+
type: string
|
|
2524
|
+
description: Machine-readable error code
|
|
2525
|
+
at:
|
|
2526
|
+
type: object
|
|
2527
|
+
description: Source location of the problem
|
|
2528
|
+
properties:
|
|
2529
|
+
url:
|
|
2530
|
+
type: string
|
|
2531
|
+
description: URL of the source file
|
|
2532
|
+
range:
|
|
2533
|
+
type: object
|
|
2534
|
+
description: Character range within the source file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,j as r,r as a}from"./index-D5QBYuLK.js";function s(){const t=o();return r.jsx(a,{onClickProject:t})}export{s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as V,g as F,
|
|
2
|
-
`)),(L!==void 0?go:po)(l,p,u,d,c)}}O();function xo(o){return S("MuiAppBar",o)}M("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const mo=o=>{const{color:e,position:r,classes:s}=o,n={root:["root",`color${v(e)}`,`position${v(r)}`]};return I(n,xo,s)},D=(o,e)=>o?`${o?.replace(")","")}, ${e})`:e,bo=m(Y,{name:"MuiAppBar",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:r}=o;return[e.root,e[`position${v(r.position)}`],e[`color${v(r.color)}`]]}})(R(({theme:o})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":o.vars?o.vars.palette.AppBar.defaultBg:o.palette.grey[100],"--AppBar-color":o.vars?o.vars.palette.text.primary:o.palette.getContrastText(o.palette.grey[100]),...o.applyStyles("dark",{"--AppBar-background":o.vars?o.vars.palette.AppBar.defaultBg:o.palette.grey[900],"--AppBar-color":o.vars?o.vars.palette.text.primary:o.palette.getContrastText(o.palette.grey[900])})}},...Object.entries(o.palette).filter(J(["contrastText"])).map(([e])=>({props:{color:e},style:{"--AppBar-background":(o.vars??o).palette[e].main,"--AppBar-color":(o.vars??o).palette[e].contrastText}})),{props:e=>e.enableColorOnDark===!0&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>e.enableColorOnDark===!1&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...o.applyStyles("dark",{backgroundColor:o.vars?D(o.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:o.vars?D(o.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...o.applyStyles("dark",{backgroundImage:"none"})}}]}))),fo=g.forwardRef(function(e,r){const s=A({props:e,name:"MuiAppBar"}),{className:n,color:a="primary",enableColorOnDark:i=!1,position:p="fixed",...u}=s,d={...s,color:a,position:p,enableColorOnDark:i},c=mo(d);return t.jsx(bo,{square:!0,component:"header",ownerState:d,elevation:4,className:w(c.root,n,p==="fixed"&&"mui-fixed"),ref:r,...u})}),ho=z(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"})),yo=m(K,{name:"MuiBreadcrumbCollapsed"})(R(({theme:o})=>({display:"flex",marginLeft:`calc(${o.spacing(1)} * 0.5)`,marginRight:`calc(${o.spacing(1)} * 0.5)`,...o.palette.mode==="light"?{backgroundColor:o.palette.grey[100],color:o.palette.grey[700]}:{backgroundColor:o.palette.grey[700],color:o.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...o.palette.mode==="light"?{backgroundColor:o.palette.grey[200]}:{backgroundColor:o.palette.grey[600]}},"&:active":{boxShadow:o.shadows[0],...o.palette.mode==="light"?{backgroundColor:
|
|
1
|
+
import{u as V,g as F,a as g,R as _,b as X,c as S,d as M,e as A,j as t,s as m,f as w,h as v,i as I,P as Y,m as R,k as J,n as z,B as K,o as N,p as Z,T as U,q,t as oo,l as eo,v as b,C as j,w as ro,x as to,I as so,M as ao,y as $,S as no,z as lo,A as io,O as co}from"./index-D5QBYuLK.js";function po(o,e,r,s,n){const[a,i]=g.useState(()=>n&&r?r(o).matches:s?s(o).matches:e);return X(()=>{if(!r)return;const p=r(o),u=()=>{i(p.matches)};return u(),p.addEventListener("change",u),()=>{p.removeEventListener("change",u)}},[o,r]),a}const uo={..._},L=uo.useSyncExternalStore;function go(o,e,r,s,n){const a=g.useCallback(()=>e,[e]),i=g.useMemo(()=>{if(n&&r)return()=>r(o).matches;if(s!==null){const{matches:c}=s(o);return()=>c}return a},[a,o,s,n,r]),[p,u]=g.useMemo(()=>{if(r===null)return[a,()=>()=>{}];const c=r(o);return[()=>c.matches,l=>(c.addEventListener("change",l),()=>{c.removeEventListener("change",l)})]},[a,r,o]);return L(u,p,i)}function O(o={}){const{themeId:e}=o;return function(s,n={}){let a=V();a&&e&&(a=a[e]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:p=!1,matchMedia:u=i?window.matchMedia:null,ssrMatchMedia:d=null,noSsr:c=!1}=F({name:"MuiUseMediaQuery",props:n,theme:a});let l=typeof s=="function"?s(a):s;return l=l.replace(/^@media( ?)/m,""),l.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
|
+
`)),(L!==void 0?go:po)(l,p,u,d,c)}}O();function xo(o){return S("MuiAppBar",o)}M("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const mo=o=>{const{color:e,position:r,classes:s}=o,n={root:["root",`color${v(e)}`,`position${v(r)}`]};return I(n,xo,s)},D=(o,e)=>o?`${o?.replace(")","")}, ${e})`:e,bo=m(Y,{name:"MuiAppBar",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:r}=o;return[e.root,e[`position${v(r.position)}`],e[`color${v(r.color)}`]]}})(R(({theme:o})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":o.vars?o.vars.palette.AppBar.defaultBg:o.palette.grey[100],"--AppBar-color":o.vars?o.vars.palette.text.primary:o.palette.getContrastText(o.palette.grey[100]),...o.applyStyles("dark",{"--AppBar-background":o.vars?o.vars.palette.AppBar.defaultBg:o.palette.grey[900],"--AppBar-color":o.vars?o.vars.palette.text.primary:o.palette.getContrastText(o.palette.grey[900])})}},...Object.entries(o.palette).filter(J(["contrastText"])).map(([e])=>({props:{color:e},style:{"--AppBar-background":(o.vars??o).palette[e].main,"--AppBar-color":(o.vars??o).palette[e].contrastText}})),{props:e=>e.enableColorOnDark===!0&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>e.enableColorOnDark===!1&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...o.applyStyles("dark",{backgroundColor:o.vars?D(o.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:o.vars?D(o.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...o.applyStyles("dark",{backgroundImage:"none"})}}]}))),fo=g.forwardRef(function(e,r){const s=A({props:e,name:"MuiAppBar"}),{className:n,color:a="primary",enableColorOnDark:i=!1,position:p="fixed",...u}=s,d={...s,color:a,position:p,enableColorOnDark:i},c=mo(d);return t.jsx(bo,{square:!0,component:"header",ownerState:d,elevation:4,className:w(c.root,n,p==="fixed"&&"mui-fixed"),ref:r,...u})}),ho=z(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"})),yo=m(K,{name:"MuiBreadcrumbCollapsed"})(R(({theme:o})=>({display:"flex",marginLeft:`calc(${o.spacing(1)} * 0.5)`,marginRight:`calc(${o.spacing(1)} * 0.5)`,...o.palette.mode==="light"?{backgroundColor:o.palette.grey[100],color:o.palette.grey[700]}:{backgroundColor:o.palette.grey[700],color:o.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...o.palette.mode==="light"?{backgroundColor:o.palette.grey[200]}:{backgroundColor:o.palette.grey[600]}},"&:active":{boxShadow:o.shadows[0],...o.palette.mode==="light"?{backgroundColor:N(o.palette.grey[200],.12)}:{backgroundColor:N(o.palette.grey[600],.12)}}}))),vo=m(ho)({width:24,height:16});function Bo(o){const{slots:e={},slotProps:r={},...s}=o,n=o;return t.jsx("li",{children:t.jsx(yo,{focusRipple:!0,...s,ownerState:n,children:t.jsx(vo,{as:e.CollapsedIcon,ownerState:n,...r.collapsedIcon})})})}function ko(o){return S("MuiBreadcrumbs",o)}const Co=M("MuiBreadcrumbs",["root","ol","li","separator"]),jo=o=>{const{classes:e}=o;return I({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},ko,e)},So=m(U,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(o,e)=>[{[`& .${Co.li}`]:e.li},e.root]})({}),Mo=m("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Ao=m("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function wo(o,e,r,s){return o.reduce((n,a,i)=>(i<o.length-1?n=n.concat(a,t.jsx(Ao,{"aria-hidden":!0,className:e,ownerState:s,children:r},`separator-${i}`)):n.push(a),n),[])}const Io=g.forwardRef(function(e,r){const s=A({props:e,name:"MuiBreadcrumbs"}),{children:n,className:a,component:i="nav",slots:p={},slotProps:u={},expandText:d="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:l=1,maxItems:h=8,separator:B="/",...Q}=s,[T,W]=g.useState(!1),f={...s,component:i,expanded:T,expandText:d,itemsAfterCollapse:c,itemsBeforeCollapse:l,maxItems:h,separator:B},y=jo(f),H=Z({elementType:p.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:f}),P=g.useRef(null),G=x=>{const C=()=>{W(!0);const E=P.current.querySelector("a[href],button,[tabindex]");E&&E.focus()};return l+c>=x.length?x:[...x.slice(0,l),t.jsx(Bo,{"aria-label":d,slots:{CollapsedIcon:p.CollapsedIcon},slotProps:{collapsedIcon:H},onClick:C},"ellipsis"),...x.slice(x.length-c,x.length)]},k=g.Children.toArray(n).filter(x=>g.isValidElement(x)).map((x,C)=>t.jsx("li",{className:y.li,children:x},`child-${C}`));return t.jsx(So,{ref:r,component:i,color:"textSecondary",className:w(y.root,a),ownerState:f,...Q,children:t.jsx(Mo,{className:y.ol,ref:P,ownerState:f,children:wo(T||h&&k.length<=h?k:G(k),y.separator,B,f)})})});function Ro(o){return S("MuiToolbar",o)}M("MuiToolbar",["root","gutters","regular","dense"]);const zo=o=>{const{classes:e,disableGutters:r,variant:s}=o;return I({root:["root",!r&&"gutters",s]},Ro,e)},To=m("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:r}=o;return[e.root,!r.disableGutters&&e.gutters,e[r.variant]]}})(R(({theme:o})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:o.spacing(2),paddingRight:o.spacing(2),[o.breakpoints.up("sm")]:{paddingLeft:o.spacing(3),paddingRight:o.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:o.mixins.toolbar}]}))),Po=g.forwardRef(function(e,r){const s=A({props:e,name:"MuiToolbar"}),{className:n,component:a="div",disableGutters:i=!1,variant:p="regular",...u}=s,d={...s,component:a,disableGutters:i,variant:p},c=zo(d);return t.jsx(To,{as:a,className:w(c.root,n),ref:r,ownerState:d,...u})}),Eo=O({themeId:q}),No=z(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),$o=z(t.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}));function Do(){const o=oo(),e=o["*"],r=eo();return t.jsx(b,{sx:{display:"flex",alignItems:"center"},children:t.jsxs(Io,{"aria-label":"breadcrumb",separator:t.jsx(No,{sx:{fontSize:14,color:"text.secondary"}}),sx:{"& .MuiBreadcrumbs-separator":{margin:"0 6px"}},children:[o.projectName&&t.jsx(j,{onClick:s=>r(`/${o.projectName}/`,s),label:o.projectName,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"1rem",cursor:"pointer","&:hover":{backgroundColor:"primary.100"}}}),o.packageName&&t.jsx(j,{onClick:s=>r(`/${o.projectName}/${o.packageName}/`,s),label:o.packageName,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"1rem",cursor:"pointer","&:hover":{backgroundColor:"secondary.100"}}}),e&&t.jsx(j,{onClick:s=>r(`/${o.projectName}/${o.packageName}/${e}`,s),label:e,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"1rem",cursor:"pointer","&:hover":{backgroundColor:"grey.200"}}})]})})}function Uo({logoHeader:o,endCap:e}){const r=ro(),s=to(),n=Eo(s.breakpoints.down("sm")),[a,i]=g.useState(null),p=!!a,u=l=>{i(l.currentTarget)},d=()=>i(null),c=[{label:"Malloy Docs",link:"https://docs.malloydata.dev/documentation/",sx:{color:"#14b3cb"}},{label:"Publisher Docs",link:"https://github.com/malloydata/publisher/blob/main/README.md",sx:{color:"#14b3cb"}},{label:"Publisher API",link:"/api-doc.html",sx:{color:"#14b3cb"}}];return t.jsxs(fo,{position:"sticky",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:[t.jsxs(Po,{sx:{justifyContent:"space-between",flexWrap:"nowrap",minHeight:44},children:[o||t.jsxs(b,{sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer"},onClick:()=>r("/"),children:[t.jsx(b,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:28,height:28}}),t.jsx(U,{variant:"h6",sx:{color:"text.primary",fontWeight:700,letterSpacing:"-0.025em",fontSize:{xs:"1.1rem",sm:"1.25rem"}},children:"Malloy Publisher"})]}),n?t.jsxs(t.Fragment,{children:[t.jsx(so,{color:"inherit",onClick:u,children:t.jsx($o,{})}),t.jsxs(ao,{anchorEl:a,open:p,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:[c.map(l=>t.jsx($,{onClick:()=>{d(),window.location.href=l.link},sx:l.sx,children:l.label},l.label)),e&&t.jsx($,{children:e})]})]}):t.jsxs(no,{direction:"row",spacing:2,alignItems:"center",children:[c.map(l=>t.jsx(lo,{href:l.link,sx:l.sx,children:l.label},l.label)),e]})]}),t.jsx(b,{sx:{borderTop:"1px solid white",paddingLeft:"16px",paddingRight:"16px",marginBottom:"1px",overflowX:"auto"},children:t.jsx(Do,{})})]})}function Oo({headerProps:o}){return t.jsxs(b,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[t.jsx(Uo,{...o}),t.jsx(io,{maxWidth:"xl",component:"main",sx:{flex:1,display:"flex",flexDirection:"column",py:2,gap:2},children:t.jsx(b,{sx:{flex:1},children:t.jsx(co,{})})})]})}export{Oo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as n,j as e,D as i,E as t,F as c}from"./index-D5QBYuLK.js";function o(){const a=n(),r=a["*"];if(!a.projectName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})});if(!a.packageName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});const s=i({projectName:a.projectName,packageName:a.packageName,modelPath:r});return r?.endsWith(".malloy")?e.jsx(t,{resourceUri:s,runOnDemand:!0,maxResultSize:512*1024}):r?.endsWith(".malloynb")?e.jsx(c,{resourceUri:s,maxResultSize:1024*1024}):e.jsx("div",{children:e.jsxs("h2",{children:["Unrecognized file type: ",r]})})}export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as n,l as c,j as e,D as t,G as o}from"./index-D5QBYuLK.js";function j(){const{projectName:s,packageName:a}=n(),i=c();if(s)if(a){const r=t({projectName:s,packageName:a});return e.jsx(o,{onClickPackageFile:i,resourceUri:r})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})})}export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as a,t as n,j as e,D as c,H as o}from"./index-D5QBYuLK.js";function j(){const r=a(),{projectName:s}=n();if(s){const t=c({projectName:s});return e.jsx(o,{onSelectPackage:r,resourceUri:t})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})})}export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{J as o,j as r,A as s,S as n,v as t,T as a}from"./index-D5QBYuLK.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 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as a,j as e,D as t,K as c}from"./index-D5QBYuLK.js";function d(){const{workspace:r,workbookPath:s,projectName:i,packageName:n}=a();if(r)if(s)if(i)if(n){const o=t({projectName:i,packageName:n});return e.jsx(c,{workbookPath:{path:s,workspace:r},resourceUri:o},`${s}`)}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing workbook path"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing workspace"})})}export{d as default};
|