@malloy-publisher/app 0.0.191 → 0.0.193

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/api-doc.yaml CHANGED
@@ -735,6 +735,13 @@ paths:
735
735
  required: true
736
736
  schema:
737
737
  $ref: "#/components/schemas/IdentifierPattern"
738
+ - name: options
739
+ in: query
740
+ description: Options (deprecated; pass in body instead)
741
+ deprecated: true
742
+ required: false
743
+ schema:
744
+ type: string
738
745
  requestBody:
739
746
  description: SQL statement to execute
740
747
  required: true
@@ -914,6 +921,521 @@ paths:
914
921
  "500":
915
922
  $ref: "#/components/responses/InternalServerError"
916
923
 
924
+ # ──────────────────────────────────────────────────────────────────
925
+ # Per-package connection data routes.
926
+ #
927
+ # `duckdb` is a per-package connection (each package has its own
928
+ # `:memory:` DuckDB rooted at the package's path), so any data-plane
929
+ # call against `connectionName="duckdb"` needs a package context.
930
+ # Non-`duckdb` names resolve through the package's MalloyConfig
931
+ # wrapper, which delegates to the project's connection registry, so
932
+ # the same routes also work for project-level connections looked up
933
+ # in a package context.
934
+ # ──────────────────────────────────────────────────────────────────
935
+
936
+ /projects/{projectName}/packages/{packageName}/connections/{connectionName}/schemas:
937
+ get:
938
+ tags:
939
+ - connections
940
+ operationId: list-schemas-in-package
941
+ summary: List database schemas (per-package)
942
+ description: |
943
+ Retrieves a list of all schemas (databases) available in the specified
944
+ connection, resolved in the context of the named package. Required for
945
+ `connectionName="duckdb"`, which is per-package; works for any other
946
+ connection name as well (resolution falls through to the project).
947
+ parameters:
948
+ - name: projectName
949
+ in: path
950
+ description: Name of the project
951
+ required: true
952
+ schema:
953
+ $ref: "#/components/schemas/IdentifierPattern"
954
+ - name: packageName
955
+ in: path
956
+ description: Name of the package whose connection context to use
957
+ required: true
958
+ schema:
959
+ $ref: "#/components/schemas/IdentifierPattern"
960
+ - name: connectionName
961
+ in: path
962
+ description: Name of the connection
963
+ required: true
964
+ schema:
965
+ $ref: "#/components/schemas/IdentifierPattern"
966
+ responses:
967
+ "200":
968
+ description: A list of schemas available in the connection with metadata
969
+ content:
970
+ application/json:
971
+ schema:
972
+ type: array
973
+ items:
974
+ $ref: "#/components/schemas/Schema"
975
+ "401":
976
+ $ref: "#/components/responses/Unauthorized"
977
+ "404":
978
+ $ref: "#/components/responses/NotFound"
979
+ "500":
980
+ $ref: "#/components/responses/InternalServerError"
981
+ "503":
982
+ $ref: "#/components/responses/ServiceUnavailable"
983
+
984
+ /projects/{projectName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables:
985
+ get:
986
+ tags:
987
+ - connections
988
+ operationId: list-tables-in-package
989
+ summary: List tables in database (per-package)
990
+ description: |
991
+ Retrieves a list of all tables and views available in the specified
992
+ database schema, resolved in the context of the named package.
993
+ parameters:
994
+ - name: projectName
995
+ in: path
996
+ description: Name of the project
997
+ required: true
998
+ schema:
999
+ $ref: "#/components/schemas/IdentifierPattern"
1000
+ - name: packageName
1001
+ in: path
1002
+ description: Name of the package whose connection context to use
1003
+ required: true
1004
+ schema:
1005
+ $ref: "#/components/schemas/IdentifierPattern"
1006
+ - name: connectionName
1007
+ in: path
1008
+ description: Name of the connection
1009
+ required: true
1010
+ schema:
1011
+ $ref: "#/components/schemas/IdentifierPattern"
1012
+ - name: schemaName
1013
+ in: path
1014
+ description: Name of the schema
1015
+ required: true
1016
+ schema:
1017
+ $ref: "#/components/schemas/IdentifierPattern"
1018
+ - name: tableNames
1019
+ in: query
1020
+ description: |
1021
+ List of table names to filter results. When provided, only returns metadata
1022
+ for the specified tables. When omitted, returns all tables in the schema.
1023
+ required: false
1024
+ schema:
1025
+ type: array
1026
+ items:
1027
+ type: string
1028
+ responses:
1029
+ "200":
1030
+ description: A list of table names available in the specified schema
1031
+ content:
1032
+ application/json:
1033
+ schema:
1034
+ type: array
1035
+ items:
1036
+ $ref: "#/components/schemas/Table"
1037
+ "401":
1038
+ $ref: "#/components/responses/Unauthorized"
1039
+ "404":
1040
+ $ref: "#/components/responses/NotFound"
1041
+ "500":
1042
+ $ref: "#/components/responses/InternalServerError"
1043
+ "503":
1044
+ $ref: "#/components/responses/ServiceUnavailable"
1045
+
1046
+ /projects/{projectName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}:
1047
+ get:
1048
+ tags:
1049
+ - connections
1050
+ operationId: get-table-in-package
1051
+ summary: Get table details from database (per-package)
1052
+ description: |
1053
+ Retrieves a table from the specified database schema, resolved in
1054
+ the context of the named package.
1055
+ parameters:
1056
+ - name: projectName
1057
+ in: path
1058
+ description: Name of the project
1059
+ required: true
1060
+ schema:
1061
+ $ref: "#/components/schemas/IdentifierPattern"
1062
+ - name: packageName
1063
+ in: path
1064
+ description: Name of the package whose connection context to use
1065
+ required: true
1066
+ schema:
1067
+ $ref: "#/components/schemas/IdentifierPattern"
1068
+ - name: connectionName
1069
+ in: path
1070
+ description: Name of the connection
1071
+ required: true
1072
+ schema:
1073
+ $ref: "#/components/schemas/IdentifierPattern"
1074
+ - name: schemaName
1075
+ in: path
1076
+ description: Name of the schema
1077
+ required: true
1078
+ schema:
1079
+ $ref: "#/components/schemas/IdentifierPattern"
1080
+ - name: tablePath
1081
+ in: path
1082
+ description: Full path to the table
1083
+ required: true
1084
+ schema:
1085
+ $ref: "#/components/schemas/PathPattern"
1086
+ responses:
1087
+ "200":
1088
+ description: Table information
1089
+ content:
1090
+ application/json:
1091
+ schema:
1092
+ $ref: "#/components/schemas/Table"
1093
+ "401":
1094
+ $ref: "#/components/responses/Unauthorized"
1095
+ "404":
1096
+ $ref: "#/components/responses/NotFound"
1097
+ "500":
1098
+ $ref: "#/components/responses/InternalServerError"
1099
+ "503":
1100
+ $ref: "#/components/responses/ServiceUnavailable"
1101
+
1102
+ # TODO: Remove the GET (deprecated) form once clients migrate.
1103
+ /projects/{projectName}/packages/{packageName}/connections/{connectionName}/sqlSource:
1104
+ get:
1105
+ tags:
1106
+ - connections
1107
+ operationId: get-sqlsource-in-package
1108
+ deprecated: true
1109
+ summary: Get SQL source (per-package, deprecated)
1110
+ description: |
1111
+ **DEPRECATED**: Use the POST version instead.
1112
+
1113
+ Creates a Malloy source from a SQL statement using the specified
1114
+ connection, resolved in the context of the named package.
1115
+ parameters:
1116
+ - name: projectName
1117
+ in: path
1118
+ description: Name of the project
1119
+ required: true
1120
+ schema:
1121
+ $ref: "#/components/schemas/IdentifierPattern"
1122
+ - name: packageName
1123
+ in: path
1124
+ description: Name of the package whose connection context to use
1125
+ required: true
1126
+ schema:
1127
+ $ref: "#/components/schemas/IdentifierPattern"
1128
+ - name: connectionName
1129
+ in: path
1130
+ description: Name of the connection
1131
+ required: true
1132
+ schema:
1133
+ $ref: "#/components/schemas/IdentifierPattern"
1134
+ - name: sqlStatement
1135
+ in: query
1136
+ description: SQL statement
1137
+ required: false
1138
+ schema:
1139
+ type: string
1140
+ responses:
1141
+ "200":
1142
+ description: SQL source information
1143
+ content:
1144
+ application/json:
1145
+ schema:
1146
+ $ref: "#/components/schemas/SqlSource"
1147
+ "401":
1148
+ $ref: "#/components/responses/Unauthorized"
1149
+ "404":
1150
+ $ref: "#/components/responses/NotFound"
1151
+ "500":
1152
+ $ref: "#/components/responses/InternalServerError"
1153
+ "503":
1154
+ $ref: "#/components/responses/ServiceUnavailable"
1155
+
1156
+ post:
1157
+ tags:
1158
+ - connections
1159
+ operationId: post-sqlsource-in-package
1160
+ summary: Create SQL source from statement (per-package)
1161
+ description: |
1162
+ Creates a Malloy source from a SQL statement using the specified
1163
+ connection, resolved in the context of the named package.
1164
+ parameters:
1165
+ - name: projectName
1166
+ in: path
1167
+ description: Name of the project
1168
+ required: true
1169
+ schema:
1170
+ $ref: "#/components/schemas/IdentifierPattern"
1171
+ - name: packageName
1172
+ in: path
1173
+ description: Name of the package whose connection context to use
1174
+ required: true
1175
+ schema:
1176
+ $ref: "#/components/schemas/IdentifierPattern"
1177
+ - name: connectionName
1178
+ in: path
1179
+ description: Name of the connection
1180
+ required: true
1181
+ schema:
1182
+ $ref: "#/components/schemas/IdentifierPattern"
1183
+ requestBody:
1184
+ description: SQL statement to fetch the SQL source
1185
+ required: true
1186
+ content:
1187
+ application/json:
1188
+ schema:
1189
+ type: object
1190
+ properties:
1191
+ sqlStatement:
1192
+ type: string
1193
+ responses:
1194
+ "200":
1195
+ description: SQL source information
1196
+ content:
1197
+ application/json:
1198
+ schema:
1199
+ $ref: "#/components/schemas/SqlSource"
1200
+ "401":
1201
+ $ref: "#/components/responses/Unauthorized"
1202
+ "404":
1203
+ $ref: "#/components/responses/NotFound"
1204
+ "500":
1205
+ $ref: "#/components/responses/InternalServerError"
1206
+ "503":
1207
+ $ref: "#/components/responses/ServiceUnavailable"
1208
+
1209
+ /projects/{projectName}/packages/{packageName}/connections/{connectionName}/sqlQuery:
1210
+ post:
1211
+ tags:
1212
+ - connections
1213
+ operationId: post-querydata-in-package
1214
+ summary: Execute SQL query (per-package)
1215
+ description: |
1216
+ Executes a SQL statement against the specified database connection,
1217
+ resolved in the context of the named package, and returns the results.
1218
+ parameters:
1219
+ - name: projectName
1220
+ in: path
1221
+ description: Name of the project
1222
+ required: true
1223
+ schema:
1224
+ $ref: "#/components/schemas/IdentifierPattern"
1225
+ - name: packageName
1226
+ in: path
1227
+ description: Name of the package whose connection context to use
1228
+ required: true
1229
+ schema:
1230
+ $ref: "#/components/schemas/IdentifierPattern"
1231
+ - name: connectionName
1232
+ in: path
1233
+ description: Name of the connection
1234
+ required: true
1235
+ schema:
1236
+ $ref: "#/components/schemas/IdentifierPattern"
1237
+ - name: options
1238
+ in: query
1239
+ description: Options (deprecated; pass in body instead)
1240
+ deprecated: true
1241
+ required: false
1242
+ schema:
1243
+ type: string
1244
+ requestBody:
1245
+ description: SQL statement to execute
1246
+ required: true
1247
+ content:
1248
+ application/json:
1249
+ schema:
1250
+ type: object
1251
+ properties:
1252
+ sqlStatement:
1253
+ type: string
1254
+ options:
1255
+ type: string
1256
+ description: Options
1257
+ responses:
1258
+ "200":
1259
+ description: Query execution results
1260
+ content:
1261
+ application/json:
1262
+ schema:
1263
+ $ref: "#/components/schemas/QueryData"
1264
+ "401":
1265
+ $ref: "#/components/responses/Unauthorized"
1266
+ "404":
1267
+ $ref: "#/components/responses/NotFound"
1268
+ "500":
1269
+ $ref: "#/components/responses/InternalServerError"
1270
+ "503":
1271
+ $ref: "#/components/responses/ServiceUnavailable"
1272
+
1273
+ /projects/{projectName}/packages/{packageName}/connections/{connectionName}/sqlTemporaryTable:
1274
+ post:
1275
+ tags:
1276
+ - connections
1277
+ operationId: post-temporarytable-in-package
1278
+ summary: Create temporary table (per-package)
1279
+ description: |
1280
+ Creates a temporary table from a SQL statement using the specified
1281
+ database connection, resolved in the context of the named package.
1282
+ parameters:
1283
+ - name: projectName
1284
+ in: path
1285
+ description: Name of the project
1286
+ required: true
1287
+ schema:
1288
+ $ref: "#/components/schemas/IdentifierPattern"
1289
+ - name: packageName
1290
+ in: path
1291
+ description: Name of the package whose connection context to use
1292
+ required: true
1293
+ schema:
1294
+ $ref: "#/components/schemas/IdentifierPattern"
1295
+ - name: connectionName
1296
+ in: path
1297
+ description: Name of the connection
1298
+ required: true
1299
+ schema:
1300
+ $ref: "#/components/schemas/IdentifierPattern"
1301
+ requestBody:
1302
+ description: SQL statement to create the temporary table
1303
+ required: true
1304
+ content:
1305
+ application/json:
1306
+ schema:
1307
+ type: object
1308
+ properties:
1309
+ sqlStatement:
1310
+ type: string
1311
+ responses:
1312
+ "200":
1313
+ description: Temporary table information
1314
+ content:
1315
+ application/json:
1316
+ schema:
1317
+ $ref: "#/components/schemas/TemporaryTable"
1318
+ "401":
1319
+ $ref: "#/components/responses/Unauthorized"
1320
+ "404":
1321
+ $ref: "#/components/responses/NotFound"
1322
+ "500":
1323
+ $ref: "#/components/responses/InternalServerError"
1324
+ "503":
1325
+ $ref: "#/components/responses/ServiceUnavailable"
1326
+
1327
+ # TODO: Remove this endpoint.
1328
+ /projects/{projectName}/packages/{packageName}/connections/{connectionName}/temporaryTable:
1329
+ get:
1330
+ tags:
1331
+ - connections
1332
+ operationId: get-temporarytable-in-package
1333
+ deprecated: true
1334
+ summary: Create temporary table (per-package, deprecated)
1335
+ description: |
1336
+ **DEPRECATED**: Use the POST version instead.
1337
+
1338
+ Creates a temporary table from a SQL statement using the specified
1339
+ connection, resolved in the context of the named package.
1340
+ parameters:
1341
+ - name: projectName
1342
+ in: path
1343
+ description: Name of the project
1344
+ required: true
1345
+ schema:
1346
+ $ref: "#/components/schemas/IdentifierPattern"
1347
+ - name: packageName
1348
+ in: path
1349
+ description: Name of the package whose connection context to use
1350
+ required: true
1351
+ schema:
1352
+ $ref: "#/components/schemas/IdentifierPattern"
1353
+ - name: connectionName
1354
+ in: path
1355
+ description: Name of the connection
1356
+ required: true
1357
+ schema:
1358
+ $ref: "#/components/schemas/IdentifierPattern"
1359
+ - name: sqlStatement
1360
+ in: query
1361
+ description: SQL statement
1362
+ required: false
1363
+ schema:
1364
+ type: string
1365
+ responses:
1366
+ "200":
1367
+ description: Temporary table information
1368
+ content:
1369
+ application/json:
1370
+ schema:
1371
+ $ref: "#/components/schemas/TemporaryTable"
1372
+ "401":
1373
+ $ref: "#/components/responses/Unauthorized"
1374
+ "404":
1375
+ $ref: "#/components/responses/NotFound"
1376
+ "500":
1377
+ $ref: "#/components/responses/InternalServerError"
1378
+ "503":
1379
+ $ref: "#/components/responses/ServiceUnavailable"
1380
+
1381
+ # TODO: Remove this endpoint.
1382
+ /projects/{projectName}/packages/{packageName}/connections/{connectionName}/queryData:
1383
+ get:
1384
+ tags:
1385
+ - connections
1386
+ operationId: get-querydata-in-package
1387
+ deprecated: true
1388
+ summary: Execute SQL query (per-package, deprecated)
1389
+ description: |
1390
+ **DEPRECATED**: Use the POST version instead.
1391
+
1392
+ Executes a SQL statement against the specified database connection,
1393
+ resolved in the context of the named package, and returns the results.
1394
+ parameters:
1395
+ - name: projectName
1396
+ in: path
1397
+ description: Name of the project
1398
+ required: true
1399
+ schema:
1400
+ $ref: "#/components/schemas/IdentifierPattern"
1401
+ - name: packageName
1402
+ in: path
1403
+ description: Name of the package whose connection context to use
1404
+ required: true
1405
+ schema:
1406
+ $ref: "#/components/schemas/IdentifierPattern"
1407
+ - name: connectionName
1408
+ in: path
1409
+ description: Name of the connection
1410
+ required: true
1411
+ schema:
1412
+ $ref: "#/components/schemas/IdentifierPattern"
1413
+ - name: sqlStatement
1414
+ in: query
1415
+ description: SQL statement
1416
+ required: false
1417
+ schema:
1418
+ type: string
1419
+ - name: options
1420
+ in: query
1421
+ description: Options
1422
+ required: false
1423
+ schema:
1424
+ type: string
1425
+ responses:
1426
+ "200":
1427
+ description: Query execution results
1428
+ content:
1429
+ application/json:
1430
+ schema:
1431
+ $ref: "#/components/schemas/QueryData"
1432
+ "401":
1433
+ $ref: "#/components/responses/Unauthorized"
1434
+ "404":
1435
+ $ref: "#/components/responses/NotFound"
1436
+ "500":
1437
+ $ref: "#/components/responses/InternalServerError"
1438
+
917
1439
  /projects/{projectName}/packages:
918
1440
  get:
919
1441
  tags:
@@ -2259,7 +2781,8 @@ components:
2259
2781
  filterParams:
2260
2782
  type: object
2261
2783
  description: Filter parameter values keyed by filter name. Used with sources
2262
- that declare \#(filter) annotations. Each value is either a string or an array of strings.
2784
+ that declare \#(filter) annotations. Each value is either a string
2785
+ or an array of strings.
2263
2786
  additionalProperties: true
2264
2787
  bypassFilters:
2265
2788
  type: boolean
@@ -2705,7 +3228,12 @@ components:
2705
3228
 
2706
3229
  DuckdbConnection:
2707
3230
  type: object
2708
- description: DuckDB database connection configuration
3231
+ description: >
3232
+ DuckDB database connection configuration. Publisher intentionally exposes
3233
+ only data-source intent here. Database files, working directories,
3234
+ filesystem/network policy, extension loading, setup SQL, temp directories,
3235
+ and resource knobs are owned by Publisher so project configs cannot widen
3236
+ deployment policy through low-level DuckDB settings.
2709
3237
  properties:
2710
3238
  attachedDatabases:
2711
3239
  type: array
@@ -3033,4 +3561,4 @@ components:
3033
3561
  required: true
3034
3562
  description: ID of the materialization
3035
3563
  schema:
3036
- type: string
3564
+ type: string
@@ -1 +1 @@
1
- import{d as o,j as a,i as e}from"./index-15BOvhp0.js";function i(){const t=o();return a.jsx(e,{onClickProject:t})}export{i as default};
1
+ import{d as o,j as a,i as e}from"./index-CVHzPJwN.js";function i(){const t=o();return a.jsx(e,{onClickProject:t})}export{i as default};
@@ -1,2 +1,2 @@
1
- import{u as V,g as F,r as g,R as _,a as X,b as S,c as M,e as A,j as t,s as m,f as w,h as v,k as I,P as Y,m as R,l as J,n as z,B as K,o as N,p as Z,T as U,q,t as oo,d 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-15BOvhp0.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(`
1
+ import{u as V,g as F,r as g,R as _,a as X,b as S,c as M,e as A,j as t,s as m,f as w,h as v,k as I,P as Y,m as R,l as J,n as z,B as K,o as N,p as Z,T as U,q,t as oo,d 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-CVHzPJwN.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
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{t as n,j as e,D as i,E as t,F as c}from"./index-15BOvhp0.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};
1
+ import{t as n,j as e,D as i,E as t,F as c}from"./index-CVHzPJwN.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};
@@ -1 +1 @@
1
- import{t as n,d as c,j as e,D as t,G as o}from"./index-15BOvhp0.js";function l(){const{projectName:s,packageName:a}=n(),r=c();if(s)if(a){const i=t({projectName:s,packageName:a});return e.jsx(o,{onClickPackageFile:r,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 project name"})})}export{l as default};
1
+ import{t as n,d as c,j as e,D as t,G as o}from"./index-CVHzPJwN.js";function l(){const{projectName:s,packageName:a}=n(),r=c();if(s)if(a){const i=t({projectName:s,packageName:a});return e.jsx(o,{onClickPackageFile:r,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 project name"})})}export{l as default};
@@ -1 +1 @@
1
- import{d as a,t as n,j as e,D as o,H as c}from"./index-15BOvhp0.js";function u(){const r=a(),{projectName:s}=n();if(s){const t=o({projectName:s});return e.jsx(c,{onSelectPackage:r,resourceUri:t})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})})}export{u as default};
1
+ import{d as a,t as n,j as e,D as o,H as c}from"./index-CVHzPJwN.js";function u(){const r=a(),{projectName:s}=n();if(s){const t=o({projectName:s});return e.jsx(c,{onSelectPackage:r,resourceUri:t})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})})}export{u as default};
@@ -1 +1 @@
1
- import{J as o,j as r,A as s,S as n,v as t,T as a}from"./index-15BOvhp0.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{J as o,j as r,A as s,S as n,v as t,T as a}from"./index-CVHzPJwN.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{t as a,j as e,D as t,Z as c}from"./index-15BOvhp0.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};
1
+ import{t as a,j as e,D as t,Z as c}from"./index-CVHzPJwN.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};