@malloy-publisher/app 0.0.219 → 0.0.221

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 (27) hide show
  1. package/dist/api-doc.yaml +291 -20
  2. package/dist/assets/{EnvironmentPage-gehnjfC6.js → EnvironmentPage-D6G5n6mY.js} +1 -1
  3. package/dist/assets/{HomePage-8LQBytE4.js → HomePage-DgZluD8u.js} +1 -1
  4. package/dist/assets/LightMode-w9v0pEbg.js +1 -0
  5. package/dist/assets/MainPage-Bi_Tukvr.js +2 -0
  6. package/dist/assets/{MaterializationsPage-D7P1Kp6O.js → MaterializationsPage-BVERjnmG.js} +1 -1
  7. package/dist/assets/ModelPage-2OjS259-.js +1 -0
  8. package/dist/assets/{PackagePage-Cz9fVwSG.js → PackagePage-C8L2On4z.js} +1 -1
  9. package/dist/assets/{RouteError-UONCloyN.js → RouteError-DJoNC_Vl.js} +1 -1
  10. package/dist/assets/ThemeEditorPage-B-hJ1zgd.js +1 -0
  11. package/dist/assets/{WorkbookPage-Bhzqvbq_.js → WorkbookPage-CTbDgGeJ.js} +1 -1
  12. package/dist/assets/{core-BiGj7BML.es-kMHAa8tP.js → core-D9Hl0IDY.es-CmgzHn4c.js} +1 -1
  13. package/dist/assets/github-dark-DenFmJkN.es-DHJKELXO.js +1 -0
  14. package/dist/assets/index-8E2uLeV9.js +2541 -0
  15. package/dist/assets/index-BEjJCJjX.js +1761 -0
  16. package/dist/assets/index-BF8PkFm8.js +1 -0
  17. package/dist/assets/index-Cr-asgoV.js +527 -0
  18. package/dist/assets/index-DcCw_qxr.js +18 -0
  19. package/dist/assets/index-w_0OQJgZ.js +23 -0
  20. package/dist/index.html +1 -1
  21. package/package.json +3 -2
  22. package/dist/assets/MainPage-DDaZLJw-.js +0 -2
  23. package/dist/assets/ModelPage-Do_vhxOc.js +0 -1
  24. package/dist/assets/index-VzRbxcF7.js +0 -455
  25. package/dist/assets/index-ddq4-5hu.js +0 -1760
  26. package/dist/assets/index-qOQF9CXq.js +0 -40
  27. package/dist/assets/index.umd-B2kmxDh7.js +0 -2467
package/dist/api-doc.yaml CHANGED
@@ -82,6 +82,85 @@ paths:
82
82
  $ref: "#/components/schemas/ServerStatus"
83
83
  "503":
84
84
  $ref: "#/components/responses/ServiceUnavailable"
85
+ /theme:
86
+ get:
87
+ tags:
88
+ - publisher
89
+ operationId: get-theme
90
+ summary: Get the active instance theme
91
+ description: |
92
+ Returns the theme used by the Malloy renderer for charts/tables/dashboards.
93
+ Reflects edits made via the in-app Theme Editor (persisted to the
94
+ server's internal DuckDB metadata store via the shared StorageManager).
95
+ Empty object when no theme has been configured.
96
+ responses:
97
+ "200":
98
+ description: Active theme.
99
+ content:
100
+ application/json:
101
+ schema:
102
+ $ref: "#/components/schemas/Theme"
103
+ "401":
104
+ $ref: "#/components/responses/Unauthorized"
105
+ "500":
106
+ $ref: "#/components/responses/InternalServerError"
107
+ "503":
108
+ $ref: "#/components/responses/ServiceUnavailable"
109
+ put:
110
+ tags:
111
+ - publisher
112
+ operationId: update-theme
113
+ summary: Save the instance theme
114
+ description: |
115
+ Persists the supplied theme as the new instance theme. Returns the saved
116
+ theme. Rejected with 403 when publisher.config.json has frozenConfig=true.
117
+ requestBody:
118
+ required: true
119
+ content:
120
+ application/json:
121
+ schema:
122
+ $ref: "#/components/schemas/Theme"
123
+ responses:
124
+ "200":
125
+ description: Saved theme.
126
+ content:
127
+ application/json:
128
+ schema:
129
+ $ref: "#/components/schemas/Theme"
130
+ "400":
131
+ $ref: "#/components/responses/BadRequest"
132
+ "401":
133
+ $ref: "#/components/responses/Unauthorized"
134
+ "403":
135
+ $ref: "#/components/responses/Forbidden"
136
+ "500":
137
+ $ref: "#/components/responses/InternalServerError"
138
+ "503":
139
+ $ref: "#/components/responses/ServiceUnavailable"
140
+ delete:
141
+ tags:
142
+ - publisher
143
+ operationId: delete-theme
144
+ summary: Reset the instance theme to the boot seed or default
145
+ description: |
146
+ Drops the saved theme from the server. The next GET returns either the
147
+ publisher.config.json boot seed (if present) or an empty object.
148
+ Rejected with 403 when publisher.config.json has frozenConfig=true.
149
+ responses:
150
+ "200":
151
+ description: Theme after reset (boot seed or empty).
152
+ content:
153
+ application/json:
154
+ schema:
155
+ $ref: "#/components/schemas/Theme"
156
+ "401":
157
+ $ref: "#/components/responses/Unauthorized"
158
+ "403":
159
+ $ref: "#/components/responses/Forbidden"
160
+ "500":
161
+ $ref: "#/components/responses/InternalServerError"
162
+ "503":
163
+ $ref: "#/components/responses/ServiceUnavailable"
85
164
  /environments:
86
165
  get:
87
166
  tags:
@@ -2337,6 +2416,119 @@ components:
2337
2416
  description:
2338
2417
  Whether the server configuration is frozen (read-only mode). When
2339
2418
  true, all mutation operations are disabled.
2419
+ theme:
2420
+ $ref: "#/components/schemas/Theme"
2421
+ description: Instance-wide default theme for the Malloy renderer and the
2422
+ Publisher app shell.
2423
+
2424
+ Theme:
2425
+ type: object
2426
+ description: Visual theme applied to Malloy renderer output (chart palette,
2427
+ fonts, table chrome) and to the Publisher app shell. Cascade order is
2428
+ instance → per-chart Malloy annotation, with later layers overriding
2429
+ earlier ones for the keys they set. (A per-environment layer is reserved
2430
+ but not yet applied by the client.)
2431
+ properties:
2432
+ defaultMode:
2433
+ type: string
2434
+ enum: [ "light", "dark", "auto" ]
2435
+ description: Initial color mode for new viewers. "auto" follows the
2436
+ browser's prefers-color-scheme until the viewer overrides.
2437
+ allowUserToggle:
2438
+ type: boolean
2439
+ description: When true, the Publisher app renders a light/dark toggle and
2440
+ persists the viewer's choice to localStorage. When false, the
2441
+ defaultMode is enforced.
2442
+ palette:
2443
+ type: object
2444
+ description: Color tokens consumed by the Malloy renderer and the app shell.
2445
+ properties:
2446
+ series:
2447
+ type: array
2448
+ description: Ordered list of hex colors used by multi-series charts
2449
+ (passed to Vega's `range.category`). Shared across light
2450
+ and dark modes so the brand palette stays consistent
2451
+ when viewers switch modes.
2452
+ items:
2453
+ type: string
2454
+ background:
2455
+ type: object
2456
+ description: Page and chart background per mode.
2457
+ properties:
2458
+ light:
2459
+ type: string
2460
+ dark:
2461
+ type: string
2462
+ tableHeader:
2463
+ type: object
2464
+ description: Foreground color for the table header per mode.
2465
+ properties:
2466
+ light:
2467
+ type: string
2468
+ dark:
2469
+ type: string
2470
+ tableHeaderBackground:
2471
+ type: object
2472
+ description: Background color for the table header row, per mode.
2473
+ Distinct from `tile` (the dashboard tile container that wraps
2474
+ each chart / table) so operators can theme the header band
2475
+ independently from the padding around the table.
2476
+ properties:
2477
+ light:
2478
+ type: string
2479
+ dark:
2480
+ type: string
2481
+ tableBody:
2482
+ type: object
2483
+ description: Foreground color for table body cells per mode.
2484
+ properties:
2485
+ light:
2486
+ type: string
2487
+ dark:
2488
+ type: string
2489
+ tile:
2490
+ type: object
2491
+ description: Background color of the dashboard tile (the padded
2492
+ container that wraps each chart / table) per mode.
2493
+ properties:
2494
+ light:
2495
+ type: string
2496
+ dark:
2497
+ type: string
2498
+ tileTitle:
2499
+ type: object
2500
+ description: Foreground color for the title text that sits in the
2501
+ dashboard tile padding (e.g. the "by_month" label above a
2502
+ chart) per mode.
2503
+ properties:
2504
+ light:
2505
+ type: string
2506
+ dark:
2507
+ type: string
2508
+ mapColor:
2509
+ type: object
2510
+ description: Saturated end of the gradient used by choropleth maps
2511
+ and other sequential color scales. The renderer pairs it
2512
+ with a near-neutral low end so the operator only picks
2513
+ the brand-saturated colour.
2514
+ properties:
2515
+ light:
2516
+ type: string
2517
+ dark:
2518
+ type: string
2519
+ font:
2520
+ type: object
2521
+ description: Typography overrides applied to both the app shell and the
2522
+ Malloy renderer (Vega text marks). Shared across light and
2523
+ dark modes because font choice is a brand decision, not a
2524
+ mode-specific one.
2525
+ properties:
2526
+ family:
2527
+ type: string
2528
+ description: CSS font-family stack.
2529
+ size:
2530
+ type: number
2531
+ description: Base font size in pixels for renderer text.
2340
2532
 
2341
2533
  Environment:
2342
2534
  type: object
@@ -2368,6 +2560,11 @@ components:
2368
2560
  description: List of Malloy packages in this environment
2369
2561
  items:
2370
2562
  $ref: "#/components/schemas/Package"
2563
+ theme:
2564
+ $ref: "#/components/schemas/Theme"
2565
+ description: Reserved for a per-environment theme override. Not yet
2566
+ populated by the server or applied by the client; viewers currently
2567
+ use the instance-level theme only.
2371
2568
 
2372
2569
  Package:
2373
2570
  type: object
@@ -2472,7 +2669,7 @@ components:
2472
2669
  description: |
2473
2670
  URI (gs:// or s3://) of the externally-computed manifest for this package.
2474
2671
  On (re)load the publisher reads it and binds persist references
2475
- (buildId -> physicalTableName). Null = serve live.
2672
+ (sourceEntityId -> physicalTableName). Null = serve live.
2476
2673
  materialization:
2477
2674
  oneOf:
2478
2675
  - $ref: "#/components/schemas/PackageMaterializationConfig"
@@ -2507,7 +2704,7 @@ components:
2507
2704
  type: integer
2508
2705
  readOnly: true
2509
2706
  description: >-
2510
- Server-computed, read-only: number of buildId -> physical-table
2707
+ Server-computed, read-only: number of sourceEntityId -> physical-table
2511
2708
  entries currently bound (0 when unbound or on live fallback).
2512
2709
  boundManifestUri:
2513
2710
  type: ["string", "null"]
@@ -2524,8 +2721,9 @@ components:
2524
2721
  readOnly: true
2525
2722
  description: >-
2526
2723
  Server-computed, read-only: the persist build plan for this package
2527
- version (per-source buildId, output columns, build SQL, dependency
2528
- graphs), exposed as a deterministic property of the compiled package.
2724
+ version (per-source sourceEntityId, output columns, build SQL,
2725
+ dependency graphs), exposed as a deterministic property of the
2726
+ compiled package.
2529
2727
  A caller reads it directly off the load/get-package response, assigns
2530
2728
  physical names/identity per source, and issues a single build call
2531
2729
  (see `CreateMaterializationRequest.buildInstructions`) — no separate
@@ -2551,7 +2749,42 @@ components:
2551
2749
  5-field UNIX cron controlling how often the control plane
2552
2750
  re-materializes this package's published versions. Null = no
2553
2751
  scheduled re-materialization declared in the manifest (publish /
2554
- on-demand only).
2752
+ on-demand only). A cron is the power tier of artifact-anchored
2753
+ scheduling: it is valid only when every persist source in the
2754
+ package resolves to an explicit `sharing=private`; a cron on a
2755
+ package with any shared/unset persist source is rejected at
2756
+ publish (declare `materialization.freshness.window` instead).
2757
+ freshness:
2758
+ oneOf:
2759
+ - $ref: "#/components/schemas/Freshness"
2760
+ - type: "null"
2761
+ description: >-
2762
+ The manifest's `materialization.freshness` block, verbatim. Null =
2763
+ no freshness policy declared. `window` is the control plane's
2764
+ refresh objective for the package's materialized sources;
2765
+ `fallback` is the declared query-time behavior when the objective
2766
+ is missed. The publisher only surfaces the values — the control
2767
+ plane owns the scheduling and gating logic.
2768
+
2769
+ Freshness:
2770
+ type: object
2771
+ description: >-
2772
+ Freshness policy declared in malloy-publisher.json's
2773
+ `materialization.freshness` block. Fields are surfaced verbatim;
2774
+ invalid values are dropped (reported as absent), never defaulted.
2775
+ properties:
2776
+ window:
2777
+ type: string
2778
+ description: >-
2779
+ Maximum acceptable staleness of the package's materialized
2780
+ sources, as a duration string (e.g. "24h"). The control plane
2781
+ schedules refreshes to meet it.
2782
+ fallback:
2783
+ type: string
2784
+ enum: [live, stale_ok, fail]
2785
+ description: >-
2786
+ Declared query-time behavior when the freshness window is missed:
2787
+ serve live, serve the stale table, or fail the query.
2555
2788
 
2556
2789
  Model:
2557
2790
  type: object
@@ -3053,6 +3286,21 @@ components:
3053
3286
  ducklake,
3054
3287
  publisher,
3055
3288
  ]
3289
+ fingerprint:
3290
+ type: string
3291
+ description: >
3292
+ Optional, opaque, stable fingerprint of this connection's data
3293
+ identity. It is a hash of the configuration that determines *which
3294
+ data* the connection reaches (its data-locating settings), and
3295
+ deliberately excludes credentials and other secret values, so it
3296
+ stays constant across credential rotation and changes only when the
3297
+ connection is pointed at different data. When present, it is used as
3298
+ this connection's contribution to content-addressed build identifiers
3299
+ so that builds re-address only when the underlying data identity
3300
+ actually changes; consumers should treat it as an opaque token and
3301
+ use the supplied value verbatim rather than deriving their own. This
3302
+ field is optional — when omitted, a connection identity is derived
3303
+ locally instead.
3056
3304
  attributes:
3057
3305
  $ref: "#/components/schemas/ConnectionAttributes"
3058
3306
  proxy:
@@ -3728,7 +3976,8 @@ components:
3728
3976
  forceRefresh:
3729
3977
  type: boolean
3730
3978
  default: false
3731
- description: Build a new table even when a source's buildId is unchanged.
3979
+ description:
3980
+ Build a new table even when a source's sourceEntityId is unchanged.
3732
3981
  sourceNames:
3733
3982
  type: array
3734
3983
  items:
@@ -3836,7 +4085,7 @@ components:
3836
4085
 
3837
4086
  PersistSourcePlan:
3838
4087
  type: object
3839
- required: [name, sourceID, connectionName, buildId, sql, columns]
4088
+ required: [name, sourceID, connectionName, sourceEntityId, sql, columns]
3840
4089
  properties:
3841
4090
  name:
3842
4091
  type: string
@@ -3846,14 +4095,35 @@ components:
3846
4095
  type: string
3847
4096
  dialect:
3848
4097
  type: string
3849
- buildId:
4098
+ sourceEntityId:
3850
4099
  type: string
3851
- description: hash(connectionDigest + canonical logical SQL).
4100
+ description: >-
4101
+ Stable, content-addressed identity of this persisted source. A
4102
+ deterministic UUID5 derived from the source's scope, its connection
4103
+ `fingerprint`, and its canonical compiled SQL — deliberately
4104
+ independent of package version, so it changes only when the source's
4105
+ data identity changes. Consumers treat it as an opaque token and use
4106
+ the supplied value verbatim.
3852
4107
  sql:
3853
4108
  type: string
3854
4109
  description:
3855
4110
  The source's build SQL (with the build manifest applied for upstream
3856
4111
  rewrites).
4112
+ sharing:
4113
+ type: ["string", "null"]
4114
+ description: >-
4115
+ The source's declared `#@ persist ... sharing=...` value
4116
+ ("private" | "shared"), reported verbatim. Null = unset — the
4117
+ publisher never substitutes the platform default, so the control
4118
+ plane can distinguish unset from an explicit `shared` and apply
4119
+ the default (unset => shared) itself. The publisher reports the
4120
+ most-specific declaration (the source's own persist annotation).
4121
+ refresh:
4122
+ type: ["string", "null"]
4123
+ description: >-
4124
+ The source's declared `#@ persist ... refresh=...` value
4125
+ ("full" | "incremental"), reported verbatim; null = unset.
4126
+ Metadata pass-through — inert to the publisher today.
3857
4127
  columns:
3858
4128
  type: array
3859
4129
  description: Output schema of the source.
@@ -3895,17 +4165,18 @@ components:
3895
4165
 
3896
4166
  BuildInstruction:
3897
4167
  type: object
3898
- required: [buildId, materializedTableId, physicalTableName, realization]
4168
+ required:
4169
+ [sourceEntityId, materializedTableId, physicalTableName, realization]
3899
4170
  properties:
3900
- buildId:
4171
+ sourceEntityId:
3901
4172
  type: string
3902
4173
  description: Identifies which planned source this instruction is for
3903
- (matches PersistSourcePlan.buildId).
4174
+ (matches PersistSourcePlan.sourceEntityId).
3904
4175
  sourceID:
3905
4176
  type: string
3906
4177
  description:
3907
- Optional convenience echo of "sourceName@modelURL"; buildId is
3908
- authoritative.
4178
+ Optional convenience echo of "sourceName@modelURL"; sourceEntityId
4179
+ is authoritative.
3909
4180
  materializedTableId:
3910
4181
  type: string
3911
4182
  description:
@@ -3916,7 +4187,7 @@ components:
3916
4187
  description:
3917
4188
  Logical, fully-qualified (but unquoted) table name to create — an
3918
4189
  optional dialect container path plus the table name, e.g.
3919
- `mydataset.engaged_events_<buildId>_v0`. The publisher dialect-quotes
4190
+ `mydataset.engaged_events_<sourceEntityId>_v0`. The publisher dialect-quotes
3920
4191
  each segment when it emits the DDL, so quote-requiring names (a
3921
4192
  hyphenated BigQuery project id, a container path) are valid, and
3922
4193
  echoes this logical name back in the manifest.
@@ -3926,8 +4197,8 @@ components:
3926
4197
  BuildManifest:
3927
4198
  type: object
3928
4199
  description:
3929
- Build output. Maps each buildId a build produced to its physical table.
3930
- Returned inline; the caller persists it.
4200
+ Build output. Maps each sourceEntityId a build produced to its physical
4201
+ table. Returned inline; the caller persists it.
3931
4202
  properties:
3932
4203
  builtAt:
3933
4204
  type: string
@@ -3936,7 +4207,7 @@ components:
3936
4207
  type: object
3937
4208
  additionalProperties:
3938
4209
  $ref: "#/components/schemas/ManifestEntry"
3939
- description: Map of buildId to manifest entry.
4210
+ description: Map of sourceEntityId to manifest entry.
3940
4211
  strict:
3941
4212
  type: boolean
3942
4213
  description: Whether unresolved references should error.
@@ -3944,9 +4215,9 @@ components:
3944
4215
  ManifestEntry:
3945
4216
  type: object
3946
4217
  description: A single entry in the build manifest.
3947
- required: [buildId, physicalTableName]
4218
+ required: [sourceEntityId, physicalTableName]
3948
4219
  properties:
3949
- buildId:
4220
+ sourceEntityId:
3950
4221
  type: string
3951
4222
  sourceName:
3952
4223
  type: string
@@ -1 +1 @@
1
- import{H as r,F as t,j as e,_ as i,a4 as o}from"./index-VzRbxcF7.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{W as r,H as t,j as e,$ as i,a5 as o}from"./index-Cr-asgoV.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{H as t,j as o,p as a}from"./index-VzRbxcF7.js";function s(){const n=t();return o.jsx(a,{onClickEnvironment:n})}export{s as default};
1
+ import{W as t,j as o,S as a}from"./index-Cr-asgoV.js";function s(){const n=t();return o.jsx(a,{onClickEnvironment:n})}export{s as default};
@@ -0,0 +1 @@
1
+ import{c,j as s}from"./index-Cr-asgoV.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};
@@ -0,0 +1,2 @@
1
+ import{u as Se,g as Ee,r as u,R as Pe,a as Ce,c as S,j as t,s as M,B as Ie,m as J,e as oe,b as ie,d as le,f as ce,h as Me,i as O,k as de,T as U,l as Z,n as ze,o as Te,p as De,q as pe,t as Re,v as se,w as Be,x as Le,y as He,z as A,A as $,M as $e,P as Ne,C as Ae,D as We,E as Oe,F as Ve,G as Q,I as V,H as ue,W as q,J as f,K as Ue,L as he,N as F,_ as Qe,O as Fe,Q as xe,U as fe,V as me,X as _e,Y as Xe,Z as Ye}from"./index-Cr-asgoV.js";import{D as Ke,L as Ge}from"./LightMode-w9v0pEbg.js";function Je(e,r,n,o,s){const[a,i]=u.useState(()=>s&&n?n(e).matches:o?o(e).matches:r);return Ce(()=>{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 Ze={...Pe},ge=Ze.useSyncExternalStore;function qe(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,m=>(p.addEventListener("change",m),()=>{p.removeEventListener("change",m)})]},[a,n,e]);return ge(h,c,i)}function ye(e={}){const{themeId:r}=e;return function(o,s={}){let a=Se();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:x=null,noSsr:p=!1}=Ee({name:"MuiUseMediaQuery",props:s,theme:a});let m=typeof o=="function"?o(a):o;return m=m.replace(/^@media( ?)/m,""),m.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
+ `)),(ge!==void 0?qe:Je)(m,c,h,x,p)}}ye();const et=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"})),tt=M(Ie,{name:"MuiBreadcrumbCollapsed"})(J(({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)}}}))),rt=M(et)({width:24,height:16});function nt(e){const{slots:r={},slotProps:n={},...o}=e,s=e;return t.jsx("li",{children:t.jsx(tt,{focusRipple:!0,...o,ownerState:s,children:t.jsx(rt,{as:r.CollapsedIcon,ownerState:s,...n.collapsedIcon})})})}function ot(e){return le("MuiBreadcrumbs",e)}const st=ie("MuiBreadcrumbs",["root","ol","li","separator"]),at=e=>{const{classes:r}=e;return de({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},ot,r)},it=M(U,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${st.li}`]:r.li},r.root]})({}),lt=M("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ct=M("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function dt(e,r,n,o){return e.reduce((s,a,i)=>(i<e.length-1?s=s.concat(a,t.jsx(ct,{"aria-hidden":!0,className:r,ownerState:o,children:n},`separator-${i}`)):s.push(a),s),[])}const pt=u.forwardRef(function(r,n){const o=ce({props:r,name:"MuiBreadcrumbs"}),{children:s,className:a,component:i="nav",slots:c={},slotProps:h={},expandText:x="Show path",itemsAfterCollapse:p=1,itemsBeforeCollapse:m=1,maxItems:y=8,separator:E="/",...H}=o,[z,P]=u.useState(!1),v={...o,component:i,expanded:z,expandText:x,itemsAfterCollapse:p,itemsBeforeCollapse:m,maxItems:y,separator:E},C=at(v),T=Me({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 m+p>=d.length?d:[...d.slice(0,m),t.jsx(nt,{"aria-label":x,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(it,{ref:n,component:i,color:"textSecondary",className:O(C.root,a),ownerState:v,...H,children:t.jsx(lt,{className:C.ol,ref:j,ownerState:v,children:dt(z||y&&D.length<=y?D:k(D),C.separator,E,v)})})});function ut(e,r,n){const o=r.getBoundingClientRect(),s=n&&n.getBoundingClientRect(),a=pe(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const x=a.getComputedStyle(r);i=x.getPropertyValue("-webkit-transform")||x.getPropertyValue("transform")}let c=0,h=0;if(i&&i!=="none"&&typeof i=="string"){const x=i.split("(")[1].split(")")[0].split(",");c=parseInt(x[4],10),h=parseInt(x[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 ht(e){return typeof e=="function"?e():e}function W(e,r,n){const o=ht(n),s=ut(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:x,direction:p="down",easing:m=s,in:y,onEnter:E,onEntered:H,onEntering:z,onExit:P,onExited:v,onExiting:C,style:T,timeout:j=a,TransitionComponent:k=ze,...D}=r,d=u.useRef(null),w=Te(De(h),d,n),b=l=>g=>{l&&(g===void 0?l(d.current):l(d.current,g))},_=b((l,g)=>{W(p,l,x),Be(l),E&&E(l,g)}),te=b((l,g)=>{const L=se({timeout:j,style:T,easing:m},{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:m},{mode:"exit"});l.style.webkitTransition=o.transitions.create("-webkit-transform",g),l.style.transition=o.transitions.create("transform",g),W(p,l,x),P&&P(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&&W(p,d.current,x)},[p,x]);return u.useEffect(()=>{if(y||p==="down"||p==="right")return;const l=Re(()=>{d.current&&W(p,d.current,x)}),g=pe(d.current);return g.addEventListener("resize",l),()=>{l.clear(),g.removeEventListener("resize",l)}},[p,y,x]),u.useEffect(()=>{y||N()},[y,N]),t.jsx(k,{nodeRef:d,onEnter:_,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 ft(e){return le("MuiDrawer",e)}ie("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const be=(e,r)=>{const{ownerState:n}=e;return[r.root,(n.variant==="permanent"||n.variant==="persistent")&&r.docked,r.modal]},mt=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 de(s,ft,r)},gt=M($e,{name:"MuiDrawer",slot:"Root",overridesResolver:be})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),yt=M("div",{shouldForwardProp:Ae,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:be})({flex:"0 0 auto"}),bt=M(Ne,{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)}`]]}})(J(({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}`}}]}))),ve={left:"right",right:"left",top:"down",bottom:"up"};function vt(e){return["left","right"].includes(e)}function jt({direction:e},r){return e==="rtl"&&vt(r)?ve[r]:r}const kt=u.forwardRef(function(r,n){const o=ce({props:r,name:"MuiDrawer"}),s=Z(),a=Le(),i={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:c="left",BackdropProps:h,children:x,className:p,elevation:m=16,hideBackdrop:y=!1,ModalProps:{BackdropProps:E,...H}={},onClose:z,open:P=!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 _=jt({direction:a?"rtl":"ltr"},c),R={...o,anchor:c,elevation:m,open:P,variant:k,...w},B=mt(R),I={slots:{transition:T,...D},slotProps:{paper:v,transition:C,...d,backdrop:He(d.backdrop||{...h,...E},{transitionDuration:j})}},[X,Y]=A("root",{ref:n,elementType:gt,className:O(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:bt,shouldForwardComponentProp:!0,className:O(B.paper,v.className),ownerState:R,externalForwardedProps:I,additionalProps:{elevation:k==="temporary"?m:0,square:!0,...k==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[g,L]=A("docked",{elementType:yt,ref:n,className:O(B.root,B.docked,p),ownerState:R,externalForwardedProps:I,additionalProps:w}),[ke,we]=A("transition",{elementType:xt,ownerState:R,externalForwardedProps:I,additionalProps:{in:P,direction:ve[_],timeout:j,appear:b.current}}),re=t.jsx(N,{...l,children:x});if(k==="permanent")return t.jsx(g,{...L,children:re});const ne=t.jsx(ke,{...we,children:re});return k==="persistent"?t.jsx(g,{...L,children:ne}):t.jsx(X,{...Y,children:ne})}),wt=ye({themeId:We}),St=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"})),Pt=S(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Ct=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"})),It=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"})),Mt=S(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),zt=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 G(e){return t.jsxs(Oe,{...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 Dt={light:"dark",dark:"auto",auto:"light"},ae={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Rt(){const{mode:e,userChoice:r,setMode:n,allowUserToggle:o}=Ve();if(!o)return null;const s=r??e,a=Dt[s],i=s==="auto"?Et:s==="dark"?Ke:Ge;return t.jsx(Q,{title:ae[s],children:t.jsx(V,{"aria-label":ae[s],onClick:()=>n(a),size:"small",children:t.jsx(i,{fontSize:"small"})})})}function K({label:e,onClick:r}){return t.jsx(Ue,{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 Bt(){const e=ue(),r=e["*"],n=q();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(f,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(pt,{"aria-label":"breadcrumb",separator:t.jsx(Pt,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(K,{label:e.environmentName,onClick:o=>n(`/${e.environmentName}/`,o)}),e.packageName&&t.jsx(K,{label:e.packageName,onClick:o=>n(`/${e.environmentName}/${e.packageName}/`,o)}),r&&t.jsx(K,{label:r,onClick:o=>n(`/${e.environmentName}/${e.packageName}/${r}`,o)})]})})}const Lt=260,Ht=64;function je({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){return t.jsxs(f,{sx:{height:"100dvh",width:e?Ht:Lt,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($t,{isCollapsed:e,onToggleCollapse:r,logoHeader:n}),t.jsxs(f,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx(Nt,{isCollapsed:e}),t.jsx(At,{isCollapsed:e}),t.jsx(Wt,{isCollapsed:e})]}),t.jsx(Ot,{isCollapsed:e})]})}function $t({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){const o=q();return n?t.jsxs(f,{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(G,{fontSize:"small"})})]}):t.jsxs(f,{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(f,{onClick:s=>o("/",s),sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",minWidth:0},children:[t.jsx(f,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:24,height:24,flexShrink:0}}),!e&&t.jsx(U,{variant:"subtitle1",sx:{color:"text.primary",fontWeight:500,letterSpacing:"-0.025em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:"Malloy Publisher"})]}),t.jsx(Q,{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(G,{fontSize:"small"})})})]})}function Nt({isCollapsed:e}){const n=he().pathname==="/";return t.jsx(F,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(Mt,{fontSize:"small"}),label:"Home",to:"/",selected:n,isCollapsed:e})})}function At({isCollapsed:e}){const{apiClients:r}=Qe(),n=ue(),{data:o}=Fe({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=o?.data??[];return s.length===0?null:t.jsxs(f,{sx:{mt:1},children:[!e&&t.jsx(U,{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(It,{fontSize:"small"}),label:i,to:`/${i}`,selected:n.environmentName===i,isCollapsed:e},i)})})]})}function Wt({isCollapsed:e}){const n=he().pathname.startsWith("/settings/theme");return t.jsxs(f,{sx:{mt:1},children:[!e&&t.jsx(U,{variant:"caption",sx:{display:"block",px:3,py:1,color:"text.secondary",fontWeight:500,textTransform:"uppercase",fontSize:"0.6875rem",letterSpacing:"0.5px"},children:"Settings"}),t.jsx(F,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(Tt,{fontSize:"small"}),label:"Visualization theme",to:"/settings/theme",selected:n,isCollapsed:e})})]})}function Ot({isCollapsed:e}){const r=[{label:"Malloy Docs",href:"https://docs.malloydata.dev/documentation/",icon:t.jsx(St,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:"https://github.com/malloydata/publisher/blob/main/README.md",icon:t.jsx(zt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(Ct,{fontSize:"small"}),external:!1}];return t.jsx(F,{sx:{py:1},children:r.map(n=>t.jsx(Vt,{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(fe,{sx:{minWidth:s?0:36,justifyContent:"center",color:o?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(me,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(Q,{title:r,placement:"right",children:t.jsx(f,{children:i})}):i}function Vt({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(fe,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:n}),!s&&t.jsx(me,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(Q,{title:e,placement:"right",children:t.jsx(f,{children:a})}):a}function Ut({open:e,onClose:r,logoHeader:n}){return t.jsx(kt,{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(je,{isCollapsed:!1,onToggleCollapse:r,logoHeader:n})})}function _t({headerProps:e}){const r=Z(),n=wt(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(f,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[n&&t.jsx(je,{isCollapsed:a,onToggleCollapse:()=>i(c=>!c),logoHeader:e?.logoHeader}),t.jsxs(f,{component:"main",sx:{flex:1,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs(f,{sx:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",height:_e.headerHeight,px:{xs:1,md:3},backgroundColor:"background.default"},children:[t.jsx(f,{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(G,{fontSize:"small"})})}),t.jsx(f,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center"},children:t.jsx(Bt,{})}),t.jsxs(f,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Rt,{}),e?.endCap]})]}),t.jsx(f,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Ye,{}),children:t.jsx(Xe,{})})})]}),t.jsx(Ut,{open:o,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{_t as default};
@@ -1 +1 @@
1
- import{F as r,H as t,j as e,_ as c,a3 as o}from"./index-VzRbxcF7.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{H as r,W as t,j as e,$ as c,a4 as o}from"./index-Cr-asgoV.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 @@
1
+ import{H as c,j as e,$ as t,a0 as l,J as r,a1 as x,a2 as d}from"./index-Cr-asgoV.js";function u(){const n=c(),a=n["*"];if(!n.environmentName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})});if(!n.packageName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});const s={p:3,maxWidth:1200,mx:"auto"};if(a?.startsWith("pages/")&&!a.endsWith(".malloy")&&!a.endsWith(".malloynb")){const m=a.slice(6),o=t({environmentName:n.environmentName,packageName:n.packageName,modelPath:m});return e.jsx(l,{resourceUri:o})}const i=t({environmentName:n.environmentName,packageName:n.packageName,modelPath:a});return a?.endsWith(".malloy")?e.jsx(r,{sx:s,children:e.jsx(x,{resourceUri:i,runOnDemand:!0,maxResultSize:512*1024})}):a?.endsWith(".malloynb")?e.jsx(r,{sx:s,children:e.jsx(d,{resourceUri:i,maxResultSize:1024*1024})}):e.jsx(r,{sx:s,children:e.jsxs("h2",{children:["Unrecognized file type: ",a]})})}export{u as default};
@@ -1 +1 @@
1
- import{F as r,H as t,j as e,_ as c,a2 as o}from"./index-VzRbxcF7.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{H as r,W as t,j as e,$ as c,a3 as o}from"./index-Cr-asgoV.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 +1 @@
1
- import{a5 as o,j as r,a6 as s,a7 as n,G as t,T as a}from"./index-VzRbxcF7.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{a6 as o,j as r,a7 as s,a8 as n,J as t,T as a}from"./index-Cr-asgoV.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};