@malloy-publisher/server 0.0.236 → 0.0.238
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/app/api-doc.yaml +221 -64
- package/dist/app/assets/{EnvironmentPage-BsAnavYN.js → EnvironmentPage-2oMC3DUO.js} +1 -1
- package/dist/app/assets/{HomePage-CADE138j.js → HomePage-DmgHdpH6.js} +1 -1
- package/dist/app/assets/{LightMode-Cfh7KzN8.js → LightMode-BNaG4oAx.js} +1 -1
- package/dist/app/assets/{MainPage-CO3pRlnV.js → MainPage-Dje9yqIp.js} +2 -2
- package/dist/app/assets/{MaterializationsPage-p9YjkRXZ.js → MaterializationsPage-D4jCpScu.js} +1 -1
- package/dist/app/assets/ModelPage-oI3O6TwY.js +1 -0
- package/dist/app/assets/{PackagePage-e4kN75YR.js → PackagePage-DlO2UBEI.js} +1 -1
- package/dist/app/assets/RouteError-B5MgkwXx.js +1 -0
- package/dist/app/assets/{ThemeEditorPage-CciagFTq.js → ThemeEditorPage-DZzT5zt4.js} +1 -1
- package/dist/app/assets/{WorkbookPage-DNWmkCXa.js → WorkbookPage-CfDz8XAp.js} +1 -1
- package/dist/app/assets/{core-Rj_4rRnA.es-BZyvITuO.js → core-BGHaIj_q.es-BeNX3GvK.js} +1 -1
- package/dist/app/assets/{index-DQpV7MyA.js → index-BeZphO3v.js} +1 -1
- package/dist/app/assets/{index-VBbcc8s6.js → index-BfV8vaZu.js} +1 -1
- package/dist/app/assets/{index-CH2AcDzc.js → index-ByceOJbS.js} +15 -15
- package/dist/app/assets/{index-DQa463gC.js → index-DXjc2oZx.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/package_load_worker.mjs +79 -21
- package/dist/server.mjs +1658 -658
- package/package.json +4 -1
- package/dist/app/assets/ModelPage-C1OSTv-x.js +0 -1
- package/dist/app/assets/RouteError-CzbfOkng.js +0 -1
package/dist/app/api-doc.yaml
CHANGED
|
@@ -2,32 +2,43 @@ openapi: 3.1.0
|
|
|
2
2
|
info:
|
|
3
3
|
title: Malloy Publisher - Semantic Model Serving API
|
|
4
4
|
description: |
|
|
5
|
-
The Malloy Publisher - Semantic Model Serving API provides
|
|
6
|
-
A Malloy package is a directory
|
|
7
|
-
(
|
|
5
|
+
The Malloy Publisher - Semantic Model Serving API provides access to Malloy packages and everything they contain.
|
|
6
|
+
A Malloy package is a directory with a `publisher.json` manifest at its root, holding Malloy models (`.malloy` files),
|
|
7
|
+
notebooks (`.malloynb` files), embedded data (`.parquet`, `.csv`, and `.xlsx` files), and optionally an HTML data app
|
|
8
|
+
under `public/`.
|
|
8
9
|
|
|
9
10
|
## Key Features
|
|
10
11
|
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **Watch Mode**:
|
|
12
|
+
- **Discovery**: List environments, packages, and the models, notebooks, pages, and data a package contains
|
|
13
|
+
- **Query Execution**: Run queries against models, execute notebooks a cell at a time, and compile-check Malloy without running it
|
|
14
|
+
- **Pages**: In-package HTML data apps served from a package's `public/` directory
|
|
15
|
+
- **Materializations**: Persist Malloy sources as tables, on a schedule or on demand
|
|
16
|
+
- **Connection Management**: Configure and test warehouse connections, and browse their schemas and tables
|
|
17
|
+
- **Watch Mode**: File watching, and a change-event stream for development workflows
|
|
17
18
|
|
|
18
19
|
## Resource Hierarchy
|
|
19
20
|
|
|
20
21
|
The API follows a hierarchical resource structure:
|
|
21
22
|
```
|
|
22
|
-
|
|
23
|
-
├──
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
Server
|
|
24
|
+
├── /status, /theme server state, and the UI theme
|
|
25
|
+
├── /connections/test validate a connection config
|
|
26
|
+
├── /watch-mode/… development file watching
|
|
27
|
+
└── Environments
|
|
28
|
+
├── Connections schemas, tables, and ad-hoc SQL
|
|
29
|
+
└── Packages
|
|
30
|
+
├── Models query and compile
|
|
31
|
+
├── Notebooks execute a cell at a time
|
|
32
|
+
├── Pages static HTML data apps from public/
|
|
33
|
+
├── Databases embedded data files
|
|
34
|
+
├── Materializations persisted sources
|
|
35
|
+
├── Connections package-scoped connection access
|
|
36
|
+
└── Events SSE stream of file changes
|
|
28
37
|
```
|
|
29
38
|
|
|
30
|
-
For examples, see the
|
|
39
|
+
For worked examples, see the packages this server bundles
|
|
40
|
+
(https://github.com/malloydata/publisher/tree/main/examples); the package format is documented in
|
|
41
|
+
docs/packages.md (https://github.com/malloydata/publisher/blob/main/docs/packages.md).
|
|
31
42
|
version: v0
|
|
32
43
|
|
|
33
44
|
servers:
|
|
@@ -1861,7 +1872,12 @@ paths:
|
|
|
1861
1872
|
- "false"
|
|
1862
1873
|
- name: givens
|
|
1863
1874
|
in: query
|
|
1864
|
-
description:
|
|
1875
|
+
description:
|
|
1876
|
+
A `GivenValues` object, JSON-encoded so it can travel in a query
|
|
1877
|
+
string. Values are typed as `GivenValues` describes them, not
|
|
1878
|
+
string-encoded as `EncodedGivenValues` would be. The parameter keeps
|
|
1879
|
+
its name for compatibility; the schema it carries is the one named
|
|
1880
|
+
here.
|
|
1865
1881
|
required: false
|
|
1866
1882
|
schema:
|
|
1867
1883
|
type: string
|
|
@@ -2425,16 +2441,26 @@ components:
|
|
|
2425
2441
|
$ref: "#/components/schemas/Error"
|
|
2426
2442
|
PayloadTooLarge:
|
|
2427
2443
|
description: |
|
|
2428
|
-
The request was well-formed but the response
|
|
2429
|
-
|
|
2430
|
-
* PUBLISHER_MAX_QUERY_ROWS (default 100000)
|
|
2431
|
-
* PUBLISHER_MAX_RESPONSE_BYTES (default 50 MB)
|
|
2432
|
-
response
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2444
|
+
The request was well-formed but the response is too large to return.
|
|
2445
|
+
Three cases, and the message says which:
|
|
2446
|
+
* PUBLISHER_MAX_QUERY_ROWS (default 100000) exceeded: too many rows.
|
|
2447
|
+
* PUBLISHER_MAX_RESPONSE_BYTES (default 50 MB) exceeded: the
|
|
2448
|
+
JSON-serialized response measured over the cap. What is measured is
|
|
2449
|
+
the shape the request asked for, so on the model-query endpoint two
|
|
2450
|
+
requests differing only in compactJson reach this cap at different
|
|
2451
|
+
result sizes.
|
|
2452
|
+
* The response could not be serialized at all, past the JavaScript
|
|
2453
|
+
engine's own limit (V8 refuses the string; JSC fails the
|
|
2454
|
+
allocation). No cap was necessarily exceeded here, and raising one
|
|
2455
|
+
does not help. This third case applies to the model-query and
|
|
2456
|
+
notebook-cell endpoints; the connection SQL endpoints have no such
|
|
2457
|
+
guard and answer 500.
|
|
2458
|
+
In every case, refine the query (add a LIMIT, a more selective WHERE,
|
|
2459
|
+
project fewer columns, or filter out wide values); retrying unchanged
|
|
2460
|
+
will not succeed. Raising the relevant cap is an option for the first
|
|
2461
|
+
two only. The rejection counter is exported as
|
|
2462
|
+
publisher_query_cap_exceeded_total{cap_type, source}, where cap_type is
|
|
2463
|
+
rows, bytes, or unserializable.
|
|
2438
2464
|
content:
|
|
2439
2465
|
application/json:
|
|
2440
2466
|
schema:
|
|
@@ -2734,7 +2760,7 @@ components:
|
|
|
2734
2760
|
default: package
|
|
2735
2761
|
description: >-
|
|
2736
2762
|
Package-level Malloy Persistence scope mode, declared once at the
|
|
2737
|
-
|
|
2763
|
+
publisher.json root and applied uniformly to every persist
|
|
2738
2764
|
source and index in the package. `package` (the default) =
|
|
2739
2765
|
persisted artifacts are package-scoped: reused across the package's
|
|
2740
2766
|
published versions whenever they still satisfy freshness. `version`
|
|
@@ -2775,28 +2801,35 @@ components:
|
|
|
2775
2801
|
type: array
|
|
2776
2802
|
readOnly: true
|
|
2777
2803
|
description: >-
|
|
2778
|
-
Non-fatal
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2804
|
+
Non-fatal findings collected when the package loaded, none of which
|
|
2805
|
+
stop the model compiling or the package loading. Render-tag
|
|
2806
|
+
findings: a render annotation (e.g. `# big_value` or `# currency`)
|
|
2807
|
+
misconfigured for the field it sits on, so it renders as
|
|
2808
|
+
"[object Object]" or an inline error at query time. Materialization
|
|
2809
|
+
findings: a `storage=` source not served from storage, a `#@ persist`
|
|
2810
|
+
source that was not recognized as materializable, a persist-target
|
|
2811
|
+
collision, and materialization-config problems that degrade
|
|
2812
|
+
attribution. Server-computed and read-only: ignored on create/update
|
|
2813
|
+
requests and only returned in responses. Present only when there are
|
|
2814
|
+
such findings.
|
|
2785
2815
|
items:
|
|
2786
2816
|
type: object
|
|
2787
2817
|
properties:
|
|
2788
2818
|
model:
|
|
2789
2819
|
type: string
|
|
2790
2820
|
description: >-
|
|
2791
|
-
Package-relative path of the model the finding is on.
|
|
2792
|
-
|
|
2821
|
+
Package-relative path of the model the finding is on. Absent
|
|
2822
|
+
for a package-wide finding.
|
|
2823
|
+
subject:
|
|
2793
2824
|
type: string
|
|
2794
2825
|
description: >-
|
|
2795
|
-
|
|
2796
|
-
`flights -> by_carrier
|
|
2826
|
+
What the finding is about: the query or view a render finding
|
|
2827
|
+
sits on (`by_carrier`, `flights -> by_carrier`), or the source
|
|
2828
|
+
a materialization finding belongs to. Absent when a finding
|
|
2829
|
+
spans several, in which case the message names them.
|
|
2797
2830
|
message:
|
|
2798
2831
|
type: string
|
|
2799
|
-
description:
|
|
2832
|
+
description: A description of the problem.
|
|
2800
2833
|
severity:
|
|
2801
2834
|
type: string
|
|
2802
2835
|
enum:
|
|
@@ -2835,7 +2868,7 @@ components:
|
|
|
2835
2868
|
- type: "null"
|
|
2836
2869
|
description: |
|
|
2837
2870
|
Package-level Malloy Persistence policy declared in
|
|
2838
|
-
|
|
2871
|
+
publisher.json. The control plane reads it to drive scheduled
|
|
2839
2872
|
re-materialization. The object is present whenever the package has
|
|
2840
2873
|
loaded — with `schedule: null` when the manifest declares no
|
|
2841
2874
|
schedule — so the caller can treat object-present as the
|
|
@@ -2921,7 +2954,7 @@ components:
|
|
|
2921
2954
|
PackageMaterializationConfig:
|
|
2922
2955
|
type: object
|
|
2923
2956
|
description: >-
|
|
2924
|
-
Package-level Malloy Persistence policy from
|
|
2957
|
+
Package-level Malloy Persistence policy from publisher.json's
|
|
2925
2958
|
`materialization` block. Surfaced verbatim so the control plane can drive
|
|
2926
2959
|
scheduled version-level re-materialization without re-reading the package
|
|
2927
2960
|
files. The object is emitted whenever the package is loaded, even when no
|
|
@@ -2967,7 +3000,7 @@ components:
|
|
|
2967
3000
|
Freshness:
|
|
2968
3001
|
type: object
|
|
2969
3002
|
description: >-
|
|
2970
|
-
Freshness policy declared in
|
|
3003
|
+
Freshness policy declared in publisher.json's
|
|
2971
3004
|
`materialization.freshness` block. Fields are surfaced verbatim;
|
|
2972
3005
|
invalid values are dropped (reported as absent), never defaulted.
|
|
2973
3006
|
properties:
|
|
@@ -3054,18 +3087,22 @@ components:
|
|
|
3054
3087
|
type: object
|
|
3055
3088
|
description: Raw Malloy notebook with unexecuted cell contents
|
|
3056
3089
|
properties:
|
|
3057
|
-
|
|
3090
|
+
type:
|
|
3058
3091
|
type: string
|
|
3059
|
-
description:
|
|
3092
|
+
description: Always `notebook`. Distinguishes the payload from the
|
|
3093
|
+
compiled-model shape returned by the model endpoint.
|
|
3060
3094
|
packageName:
|
|
3061
3095
|
type: string
|
|
3062
3096
|
description: Name of the package containing this notebook
|
|
3063
|
-
|
|
3097
|
+
modelPath:
|
|
3064
3098
|
type: string
|
|
3065
3099
|
description: Relative path to the notebook file within its package directory
|
|
3066
3100
|
malloyVersion:
|
|
3067
3101
|
type: string
|
|
3068
3102
|
description: Version of the Malloy compiler used to generate the notebook data
|
|
3103
|
+
modelInfo:
|
|
3104
|
+
type: string
|
|
3105
|
+
description: JSON string containing model metadata and structure information
|
|
3069
3106
|
notebookCells:
|
|
3070
3107
|
type: array
|
|
3071
3108
|
description: Array of notebook cells containing raw markdown and code content
|
|
@@ -3076,11 +3113,23 @@ components:
|
|
|
3076
3113
|
description: Array of file-level (##) annotations attached to the notebook
|
|
3077
3114
|
items:
|
|
3078
3115
|
type: string
|
|
3116
|
+
startingGivens:
|
|
3117
|
+
allOf:
|
|
3118
|
+
- $ref: "#/components/schemas/EncodedGivenValues"
|
|
3119
|
+
description:
|
|
3120
|
+
Starting values for the notebook's controls, declared at its file
|
|
3121
|
+
level. URL parameters override these, which is why the two share a
|
|
3122
|
+
shape. Omitted when the notebook declares none.
|
|
3079
3123
|
sources:
|
|
3080
3124
|
type: array
|
|
3081
3125
|
description: Sources defined in the notebook's model
|
|
3082
3126
|
items:
|
|
3083
3127
|
$ref: "#/components/schemas/Source"
|
|
3128
|
+
queries:
|
|
3129
|
+
type: array
|
|
3130
|
+
description: Named queries defined in the notebook's model
|
|
3131
|
+
items:
|
|
3132
|
+
$ref: "#/components/schemas/Query"
|
|
3084
3133
|
|
|
3085
3134
|
CompiledModel:
|
|
3086
3135
|
type: object
|
|
@@ -3193,10 +3242,22 @@ components:
|
|
|
3193
3242
|
|
|
3194
3243
|
Given:
|
|
3195
3244
|
type: object
|
|
3196
|
-
description:
|
|
3245
|
+
description: |
|
|
3197
3246
|
A given (runtime parameter) declared on a Malloy model via the
|
|
3198
3247
|
`given:` keyword. Surfaced on `CompiledModel.givens` and `Source.givens`
|
|
3199
3248
|
so callers can introspect what runtime values a model accepts.
|
|
3249
|
+
|
|
3250
|
+
`givens` always names a collection of these declarations. Values keyed
|
|
3251
|
+
by given name are `GivenValues` (or `EncodedGivenValues` in the form
|
|
3252
|
+
that survives a URL), and a bare list of names is spelled `givenNames`.
|
|
3253
|
+
|
|
3254
|
+
It also carries how the given should be presented as an input control
|
|
3255
|
+
(`label`, `control`, `rangeMin`, `rangeMax`, `suggest`), derived from
|
|
3256
|
+
the declaration's own tags. That contract belongs to the given rather
|
|
3257
|
+
than to any one surface, which is what lets a notebook and an SDK host
|
|
3258
|
+
render the same control without restating it. Those five fields describe
|
|
3259
|
+
the contract a renderer implements; no endpoint populates them yet, so
|
|
3260
|
+
they are absent from every response today.
|
|
3200
3261
|
properties:
|
|
3201
3262
|
name:
|
|
3202
3263
|
type: string
|
|
@@ -3217,15 +3278,85 @@ components:
|
|
|
3217
3278
|
the model. Omitted when the given declares no default. Consumers
|
|
3218
3279
|
render or prefill it per the given's `type` (e.g. unquote a string
|
|
3219
3280
|
literal for a text input).
|
|
3281
|
+
label:
|
|
3282
|
+
type: string
|
|
3283
|
+
description: Display label from the declaration's `# label=` tag
|
|
3284
|
+
control:
|
|
3285
|
+
type: string
|
|
3286
|
+
enum:
|
|
3287
|
+
- select
|
|
3288
|
+
- multiselect
|
|
3289
|
+
description:
|
|
3290
|
+
How the control renders when the choice is between a single-pick and
|
|
3291
|
+
a multi-pick list. Omitted means infer from the given's type. A
|
|
3292
|
+
slider is not one of these values; it is signalled by `rangeMin` and
|
|
3293
|
+
`rangeMax` instead, per the rule on those fields.
|
|
3294
|
+
rangeMin:
|
|
3295
|
+
type: number
|
|
3296
|
+
description:
|
|
3297
|
+
Slider lower bound from `# range_min=`. The two bounds are what
|
|
3298
|
+
signal a slider, so a `number` or `filter<number>` given renders as
|
|
3299
|
+
one when BOTH are present and as a plain number input otherwise, so
|
|
3300
|
+
a lone bound changes nothing about the control.
|
|
3301
|
+
rangeMax:
|
|
3302
|
+
type: number
|
|
3303
|
+
description:
|
|
3304
|
+
Slider upper bound from `# range_max=`. See `rangeMin` for the rule
|
|
3305
|
+
that turns the pair into a slider.
|
|
3306
|
+
suggest:
|
|
3307
|
+
$ref: "#/components/schemas/GivenSuggest"
|
|
3308
|
+
|
|
3309
|
+
GivenSuggest:
|
|
3310
|
+
type: object
|
|
3311
|
+
description: |
|
|
3312
|
+
Where a select or multiselect control gets its options: a named `query`,
|
|
3313
|
+
a `source` + `dimension` pair, or a `query` with a `dimension` naming
|
|
3314
|
+
which of its columns to read. All three run through the ordinary query
|
|
3315
|
+
endpoint.
|
|
3316
|
+
|
|
3317
|
+
With `query` alone the first column of each row is used, so a
|
|
3318
|
+
single-column `group_by` needs no `dimension`. Give `dimension`
|
|
3319
|
+
alongside `query` when the query returns more than one column.
|
|
3320
|
+
properties:
|
|
3321
|
+
query:
|
|
3322
|
+
type: string
|
|
3323
|
+
source:
|
|
3324
|
+
type: string
|
|
3325
|
+
dimension:
|
|
3326
|
+
type: string
|
|
3220
3327
|
|
|
3221
|
-
|
|
3328
|
+
GivenValues:
|
|
3222
3329
|
type: object
|
|
3223
|
-
description:
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3330
|
+
description: |
|
|
3331
|
+
Given *values* keyed by given name: what a caller sends, as distinct
|
|
3332
|
+
from `Given`, which describes what the model *accepts*. A collection of
|
|
3333
|
+
declarations is a plain array of `Given`, never this.
|
|
3334
|
+
|
|
3335
|
+
Values are decoded and must match the declared type: a `number` given
|
|
3336
|
+
takes a JSON number, a `date` takes a bare `YYYY-MM-DD` string, a
|
|
3337
|
+
`timestamp` an ISO string with no zone, a `timestamptz` a full ISO
|
|
3338
|
+
string. `EncodedGivenValues` is the string-encoded counterpart.
|
|
3227
3339
|
additionalProperties: true
|
|
3228
3340
|
|
|
3341
|
+
EncodedGivenValues:
|
|
3342
|
+
type: object
|
|
3343
|
+
description: |
|
|
3344
|
+
The same values as `GivenValues`, string-encoded: the form that survives
|
|
3345
|
+
a URL. Every value is a string regardless of the given's declared type,
|
|
3346
|
+
and a `filter<…>` value is the filter body rather than the `f'…'`
|
|
3347
|
+
literal.
|
|
3348
|
+
|
|
3349
|
+
The role it names: a surface's URL parameters and the starting values a
|
|
3350
|
+
document declares share this shape, so the two can merge and then be
|
|
3351
|
+
decoded once against the declarations and sent as `GivenValues`. No
|
|
3352
|
+
endpoint returns it yet. `RawNotebook.startingGivens` is the first field
|
|
3353
|
+
typed as it, and nothing populates that field so far, so today this
|
|
3354
|
+
schema documents the contract rather than describing live traffic. The
|
|
3355
|
+
`givens` query parameter is not an instance of it: that carries a
|
|
3356
|
+
JSON-encoded `GivenValues`, with values typed rather than stringified.
|
|
3357
|
+
additionalProperties:
|
|
3358
|
+
type: string
|
|
3359
|
+
|
|
3229
3360
|
Source:
|
|
3230
3361
|
type: object
|
|
3231
3362
|
description: A Malloy source defined in a model
|
|
@@ -3260,14 +3391,27 @@ components:
|
|
|
3260
3391
|
authorize:
|
|
3261
3392
|
type: array
|
|
3262
3393
|
description: >-
|
|
3263
|
-
Effective authorize expressions
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3394
|
+
Effective authorize expressions gating this source via `#(authorize)`
|
|
3395
|
+
/ `##(authorize)` annotations — file-level expressions first, then the
|
|
3396
|
+
source's own, or, when it declares none, the nearest source it extends
|
|
3397
|
+
that does. Each is a Malloy boolean expression over declared givens,
|
|
3398
|
+
evaluated as a disjunction (OR) and enforced at query time. A request
|
|
3399
|
+
that reads this source is denied with HTTP 403 unless at least one
|
|
3400
|
+
expression evaluates true for the supplied givens; an empty or absent
|
|
3401
|
+
list means unrestricted.
|
|
3402
|
+
|
|
3403
|
+
IMPORTANT for anything re-implementing the decision: this flat list
|
|
3404
|
+
cannot always express the predicate. Expressions from one source are
|
|
3405
|
+
OR-ed, but when more than one source gates the entry point (its own
|
|
3406
|
+
gate plus one carried from the source it derives from) those sources
|
|
3407
|
+
are AND-ed, and both sets appear here as one list. So a list of two
|
|
3408
|
+
expressions may mean "either" or "both". Treat it as "at least these
|
|
3409
|
+
constraints apply" — use it to decide THAT a source is gated, not to
|
|
3410
|
+
recompute WHETHER a given caller passes. Reading it as a pure
|
|
3411
|
+
disjunction grants where Publisher denies.
|
|
3412
|
+
|
|
3413
|
+
Givens are caller-asserted, so this is a boundary only behind a
|
|
3414
|
+
trusted tier — see docs/authorize.md.
|
|
3271
3415
|
items:
|
|
3272
3416
|
type: string
|
|
3273
3417
|
|
|
@@ -3282,15 +3426,28 @@ components:
|
|
|
3282
3426
|
set, the queryName parameter must be empty.
|
|
3283
3427
|
sourceName:
|
|
3284
3428
|
type: string
|
|
3285
|
-
description:
|
|
3429
|
+
description: |
|
|
3286
3430
|
Name of the source in the model to use for queryName, search, and
|
|
3287
3431
|
topValue requests.
|
|
3432
|
+
|
|
3433
|
+
A NAME, not Malloy code: a single source name exactly as the model
|
|
3434
|
+
response's `sources` listing returns it. The server quotes it as a
|
|
3435
|
+
Malloy identifier, so a name that needs quoting (a hyphen, a space,
|
|
3436
|
+
a reserved word, a leading digit) works as-is and must be sent bare
|
|
3437
|
+
— do not add backticks of your own. Anything richer than one name
|
|
3438
|
+
(a parameterized source, an inline extension, a second statement)
|
|
3439
|
+
belongs in `query`, and here is refused as an unresolvable name.
|
|
3288
3440
|
queryName:
|
|
3289
3441
|
type: string
|
|
3290
|
-
description:
|
|
3442
|
+
description: |
|
|
3291
3443
|
Name of a query to execute on a source in the model. Requires the
|
|
3292
3444
|
sourceName parameter is set. If the queryName parameter is set, the
|
|
3293
3445
|
query parameter must be empty.
|
|
3446
|
+
|
|
3447
|
+
A NAME, not Malloy code, on the same terms as `sourceName`: one
|
|
3448
|
+
view name as the model response lists it, quoted for you, sent
|
|
3449
|
+
bare. A dotted path, a refinement (`by_carrier + { limit: 10 }`),
|
|
3450
|
+
or any additional statement belongs in `query`.
|
|
3294
3451
|
compactJson:
|
|
3295
3452
|
type: boolean
|
|
3296
3453
|
default: false
|
|
@@ -3323,7 +3480,7 @@ components:
|
|
|
3323
3480
|
|
|
3324
3481
|
When true, skip server-side `#(filter)` injection entirely.
|
|
3325
3482
|
givens:
|
|
3326
|
-
$ref: "#/components/schemas/
|
|
3483
|
+
$ref: "#/components/schemas/GivenValues"
|
|
3327
3484
|
queryMetadata:
|
|
3328
3485
|
$ref: "#/components/schemas/QueryMetadata"
|
|
3329
3486
|
description: >-
|
|
@@ -4279,7 +4436,7 @@ components:
|
|
|
4279
4436
|
(only available when compilation succeeds and the source contains a
|
|
4280
4437
|
runnable query).
|
|
4281
4438
|
givens:
|
|
4282
|
-
$ref: "#/components/schemas/
|
|
4439
|
+
$ref: "#/components/schemas/GivenValues"
|
|
4283
4440
|
required:
|
|
4284
4441
|
- source
|
|
4285
4442
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as r,F as t,j as e,a0 as i,
|
|
1
|
+
import{$ as r,F as t,j as e,a0 as i,a9 as o}from"./index-ByceOJbS.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{$ as t,j as o,
|
|
1
|
+
import{$ as t,j as o,J as a}from"./index-ByceOJbS.js";function s(){const n=t();return o.jsx(a,{onClickEnvironment:n})}export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,j as s}from"./index-
|
|
1
|
+
import{c,j as s}from"./index-ByceOJbS.js";const t=c(s.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),a=c(s.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}));export{t as D,a as L};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as Pe,g as Ee,r as u,R as Ce,a as Ie,c as S,j as t,s as M,B as Me,m as
|
|
2
|
-
`)),(ye!==void 0?et:qe)(m,c,h,x,p)}}be();const tt=S(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),rt=M(Me,{name:"MuiBreadcrumbCollapsed"})(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)}}}))),nt=M(tt)({width:24,height:16});function ot(e){const{slots:r={},slotProps:n={},...o}=e,s=e;return t.jsx("li",{children:t.jsx(rt,{focusRipple:!0,...o,ownerState:s,children:t.jsx(nt,{as:r.CollapsedIcon,ownerState:s,...n.collapsedIcon})})})}function st(e){return ce("MuiBreadcrumbs",e)}const at=le("MuiBreadcrumbs",["root","ol","li","separator"]),it=e=>{const{classes:r}=e;return pe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,r)},lt=M(U,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${at.li}`]:r.li},r.root]})({}),ct=M("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),dt=M("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,r,n,o){return e.reduce((s,a,i)=>(i<e.length-1?s=s.concat(a,t.jsx(dt,{"aria-hidden":!0,className:r,ownerState:o,children:n},`separator-${i}`)):s.push(a),s),[])}const ut=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiBreadcrumbs"}),{children:s,className:a,component:i="nav",slots:c={},slotProps:h={},expandText:x="Show path",itemsAfterCollapse:p=1,itemsBeforeCollapse:m=1,maxItems:y=8,separator:P="/",...H}=o,[z,E]=u.useState(!1),v={...o,component:i,expanded:z,expandText:x,itemsAfterCollapse:p,itemsBeforeCollapse:m,maxItems:y,separator:P},C=it(v),T=ze({elementType:c.CollapsedIcon,externalSlotProps:h.collapsedIcon,ownerState:v}),j=u.useRef(null),k=d=>{const w=()=>{E(!0);const b=j.current.querySelector("a[href],button,[tabindex]");b&&b.focus()};return m+p>=d.length?d:[...d.slice(0,m),t.jsx(ot,{"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(lt,{ref:n,component:i,color:"textSecondary",className:O(C.root,a),ownerState:v,...H,children:t.jsx(ct,{className:C.ol,ref:j,ownerState:v,children:pt(z||y&&D.length<=y?D:k(D),C.separator,P,v)})})});function ht(e,r,n){const o=r.getBoundingClientRect(),s=n&&n.getBoundingClientRect(),a=ue(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const 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 xt(e){return typeof e=="function"?e():e}function W(e,r,n){const o=xt(n),s=ht(e,r,o);s&&(r.style.webkitTransform=s,r.style.transform=s)}const ft=u.forwardRef(function(r,n){const o=q(),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:P,onEntered:H,onEntering:z,onExit:E,onExited:v,onExiting:C,style:T,timeout:j=a,TransitionComponent:k=Te,...D}=r,d=u.useRef(null),w=De(Re(h),d,n),b=l=>g=>{l&&(g===void 0?l(d.current):l(d.current,g))},X=b((l,g)=>{W(p,l,x),Le(l),P&&P(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),E&&E(l)}),Y=b(l=>{l.style.webkitTransition="",l.style.transition="",v&&v(l)}),_=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=Be(()=>{d.current&&W(p,d.current,x)}),g=ue(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:X,onEntered:R,onEntering:te,onExit:I,onExited:Y,onExiting:B,addEndListener:_,appear:c,in:y,timeout:j,...D,children:(l,{ownerState:g,...L})=>u.cloneElement(h,{ref:w,style:{visibility:l==="exited"&&!y?"hidden":void 0,...T,...h.props.style},...L})})});function mt(e){return ce("MuiDrawer",e)}le("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ve=(e,r)=>{const{ownerState:n}=e;return[r.root,(n.variant==="permanent"||n.variant==="persistent")&&r.docked,r.modal]},gt=e=>{const{classes:r,anchor:n,variant:o}=e,s={root:["root",`anchor${$(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$(n)}`,o!=="temporary"&&`paperAnchorDocked${$(n)}`]};return pe(s,mt,r)},yt=M(Ne,{name:"MuiDrawer",slot:"Root",overridesResolver:ve})(J(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),bt=M("div",{shouldForwardProp:We,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ve})({flex:"0 0 auto"}),vt=M(Ae,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.paper,r[`paperAnchor${$(n.anchor)}`],n.variant!=="temporary"&&r[`paperAnchorDocked${$(n.anchor)}`]]}})(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}`}}]}))),je={left:"right",right:"left",top:"down",bottom:"up"};function jt(e){return["left","right"].includes(e)}function kt({direction:e},r){return e==="rtl"&&jt(r)?je[r]:r}const wt=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiDrawer"}),s=q(),a=He(),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:P,...H}={},onClose:z,open:E=!1,PaperProps:v={},SlideProps:C,TransitionComponent:T,transitionDuration:j=i,variant:k="temporary",slots:D={},slotProps:d={},...w}=o,b=u.useRef(!1);u.useEffect(()=>{b.current=!0},[]);const X=kt({direction:a?"rtl":"ltr"},c),R={...o,anchor:c,elevation:m,open:E,variant:k,...w},B=gt(R),I={slots:{transition:T,...D},slotProps:{paper:v,transition:C,...d,backdrop:$e(d.backdrop||{...h,...P},{transitionDuration:j})}},[Y,_]=A("root",{ref:n,elementType:yt,className:O(B.root,B.modal,p),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...I,...w,...H},additionalProps:{open:E,onClose:z,hideBackdrop:y,slots:{backdrop:I.slots.backdrop},slotProps:{backdrop:I.slotProps.backdrop}}}),[N,l]=A("paper",{elementType:vt,shouldForwardComponentProp:!0,className: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:bt,ref:n,className:O(B.root,B.docked,p),ownerState:R,externalForwardedProps:I,additionalProps:w}),[we,Se]=A("transition",{elementType:ft,ownerState:R,externalForwardedProps:I,additionalProps:{in:E,direction:je[X],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(we,{...Se,children:re});return k==="persistent"?t.jsx(g,{...L,children:ne}):t.jsx(Y,{..._,children:ne})}),St=be({themeId:Oe}),Pt=S([t.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),t.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Et=S(t.jsx("path",{d:"M10.85 12.65h2.3L12 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM14.3 16l-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9z"})),Ct=S(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),It=S(t.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),Mt=S(t.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),zt=S(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),Tt=S(t.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"})),Dt=S([t.jsx("path",{d:"M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-.28 0-.5.22-.5.5 0 .12.05.23.13.33.41.47.64 1.06.64 1.67 0 1.38-1.12 2.5-2.5 2.5m0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c.28 0 .5-.22.5-.5 0-.16-.08-.28-.14-.35-.41-.46-.63-1.05-.63-1.65 0-1.38 1.12-2.5 2.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7"},"0"),t.jsx("circle",{cx:"6.5",cy:"11.5",r:"1.5"},"1"),t.jsx("circle",{cx:"9.5",cy:"7.5",r:"1.5"},"2"),t.jsx("circle",{cx:"14.5",cy:"7.5",r:"1.5"},"3"),t.jsx("circle",{cx:"17.5",cy:"11.5",r:"1.5"},"4")]);function G(e){return t.jsxs(Ve,{...e,viewBox:"0 0 24 24",sx:{fill:"none",...e.sx},children:[t.jsx("rect",{x:"3.25",y:"4.75",width:"17.5",height:"14.5",rx:"2.25",stroke:"currentColor",strokeWidth:"1.5"}),t.jsx("line",{x1:"8.5",y1:"5",x2:"8.5",y2:"19",stroke:"currentColor",strokeWidth:"1.5"})]})}const Rt={light:"dark",dark:"auto",auto:"light"},ie={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Bt(){const{mode:e,userChoice:r,setMode:n,allowUserToggle:o}=Ue();if(!o)return null;const s=r??e,a=Rt[s],i=s==="auto"?Et:s==="dark"?Ge:Je;return t.jsx(Q,{title:ie[s],children:t.jsx(V,{"aria-label":ie[s],onClick:()=>n(a),size:"small",children:t.jsx(i,{fontSize:"small"})})})}function K({label:e,onClick:r}){return t.jsx(Qe,{clickable:!0,onClick:r,label:e,size:"small","aria-label":`Navigate to ${e}`,sx:n=>({backgroundColor:"background.paper",color:"text.primary",fontWeight:500,fontSize:"0.875rem",height:32,cursor:"pointer",borderRadius:"4px",maxWidth:320,"& .MuiChip-label":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"&:hover":{backgroundColor:n.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"grey.100"}})})}function Lt(){const e=he(),r=e["*"],n=Z();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(f,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(ut,{"aria-label":"breadcrumb",separator:t.jsx(Ct,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(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 Ht=260,$t=64;function ke({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){return t.jsxs(f,{sx:{height:"100dvh",width:e?$t:Ht,flexShrink:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",transition:"width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[t.jsx(Nt,{isCollapsed:e,onToggleCollapse:r,logoHeader:n}),t.jsxs(f,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx(At,{isCollapsed:e}),t.jsx(Wt,{isCollapsed:e}),t.jsx(Ot,{isCollapsed:e})]}),t.jsx(Vt,{isCollapsed:e})]})}function Nt({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){const o=Z();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 At({isCollapsed:e}){const n=xe().pathname==="/";return t.jsx(F,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(zt,{fontSize:"small"}),label:"Home",to:"/",selected:n,isCollapsed:e})})}function Wt({isCollapsed:e}){const{apiClients:r}=Fe(),n=he(),{data:o}=Xe({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=o?.data??[];return s.length===0?null:t.jsxs(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(Mt,{fontSize:"small"}),label:i,to:`/${i}`,selected:n.environmentName===i,isCollapsed:e},i)})})]})}function Ot({isCollapsed:e}){const n=xe().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(Dt,{fontSize:"small"}),label:"Visualization theme",to:"/settings/theme",selected:n,isCollapsed:e})})]})}function Vt({isCollapsed:e}){const r=[{label:"Malloy Docs",href:ae.docsHome,icon:t.jsx(Pt,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:ae.publishing,icon:t.jsx(Tt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(It,{fontSize:"small"}),external:!1}];return t.jsx(F,{sx:{py:1},children:r.map(n=>t.jsx(Ut,{label:n.label,href:n.href,icon:n.icon,external:n.external,isCollapsed:e},n.label))})}function ee({icon:e,label:r,to:n,selected:o,isCollapsed:s}){const a=Z(),i=t.jsxs(fe,{selected:o,onClick:c=>a(n,c),sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:o?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(ge,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(Q,{title:r,placement:"right",children:t.jsx(f,{children:i})}):i}function Ut({label:e,href:r,icon:n,external:o,isCollapsed:s}){const a=t.jsxs(fe,{component:"a",href:r,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:n}),!s&&t.jsx(ge,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(Q,{title:e,placement:"right",children:t.jsx(f,{children:a})}):a}function Qt({open:e,onClose:r,logoHeader:n}){return t.jsx(wt,{anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:260}},children:t.jsx(ke,{isCollapsed:!1,onToggleCollapse:r,logoHeader:n})})}function Yt({headerProps:e}){const r=q(),n=St(r.breakpoints.up("md")),[o,s]=u.useState(!1),[a,i]=u.useState(!1);return u.useEffect(()=>{n&&o&&s(!1)},[n,o]),t.jsxs(f,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[n&&t.jsx(ke,{isCollapsed:a,onToggleCollapse:()=>i(c=>!c),logoHeader:e?.logoHeader}),t.jsxs(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:Ye.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(Lt,{})}),t.jsxs(f,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Bt,{}),e?.endCap]})]}),t.jsx(f,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Ke,{}),children:t.jsx(_e,{})})})]}),t.jsx(Qt,{open:o,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{Yt as default};
|
|
1
|
+
import{u as Pe,g as Ee,r as u,R as Ce,a as Ie,c as S,j as t,s as M,B as Me,m as G,e as oe,b as le,d as ce,f as de,h as ze,i as O,k as pe,T as U,l as q,n as Te,o as De,p as Re,q as ue,t as Be,v as se,w as Le,x as He,y as $e,z as A,A as $,M as Ne,P as Ae,C as We,D as Oe,S as Ve,Z as Ue,E as Q,I as V,F as he,$ as J,G as f,H as Qe,K as xe,L as F,N as Fe,O as Xe,Q as ae,U as fe,V as me,W as ge,X as Ye,Y as _e,_ as Ke}from"./index-ByceOJbS.js";import{D as Ze,L as Ge}from"./LightMode-BNaG4oAx.js";function qe(e,r,n,o,s){const[a,i]=u.useState(()=>s&&n?n(e).matches:o?o(e).matches:r);return Ie(()=>{if(!n)return;const c=n(e),h=()=>{i(c.matches)};return h(),c.addEventListener("change",h),()=>{c.removeEventListener("change",h)}},[e,n]),a}const Je={...Ce},ye=Je.useSyncExternalStore;function et(e,r,n,o,s){const a=u.useCallback(()=>r,[r]),i=u.useMemo(()=>{if(s&&n)return()=>n(e).matches;if(o!==null){const{matches:p}=o(e);return()=>p}return a},[a,e,o,s,n]),[c,h]=u.useMemo(()=>{if(n===null)return[a,()=>()=>{}];const p=n(e);return[()=>p.matches,m=>(p.addEventListener("change",m),()=>{p.removeEventListener("change",m)})]},[a,n,e]);return ye(h,c,i)}function be(e={}){const{themeId:r}=e;return function(o,s={}){let a=Pe();a&&r&&(a=a[r]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:c=!1,matchMedia:h=i?window.matchMedia:null,ssrMatchMedia: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
|
+
`)),(ye!==void 0?et:qe)(m,c,h,x,p)}}be();const tt=S(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),rt=M(Me,{name:"MuiBreadcrumbCollapsed"})(G(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:oe(e.palette.grey[200],.12)}:{backgroundColor:oe(e.palette.grey[600],.12)}}}))),nt=M(tt)({width:24,height:16});function ot(e){const{slots:r={},slotProps:n={},...o}=e,s=e;return t.jsx("li",{children:t.jsx(rt,{focusRipple:!0,...o,ownerState:s,children:t.jsx(nt,{as:r.CollapsedIcon,ownerState:s,...n.collapsedIcon})})})}function st(e){return ce("MuiBreadcrumbs",e)}const at=le("MuiBreadcrumbs",["root","ol","li","separator"]),it=e=>{const{classes:r}=e;return pe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,r)},lt=M(U,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,r)=>[{[`& .${at.li}`]:r.li},r.root]})({}),ct=M("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),dt=M("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,r,n,o){return e.reduce((s,a,i)=>(i<e.length-1?s=s.concat(a,t.jsx(dt,{"aria-hidden":!0,className:r,ownerState:o,children:n},`separator-${i}`)):s.push(a),s),[])}const ut=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiBreadcrumbs"}),{children:s,className:a,component:i="nav",slots:c={},slotProps:h={},expandText:x="Show path",itemsAfterCollapse:p=1,itemsBeforeCollapse:m=1,maxItems:y=8,separator:P="/",...H}=o,[z,E]=u.useState(!1),v={...o,component:i,expanded:z,expandText:x,itemsAfterCollapse:p,itemsBeforeCollapse:m,maxItems:y,separator:P},C=it(v),T=ze({elementType:c.CollapsedIcon,externalSlotProps:h.collapsedIcon,ownerState:v}),j=u.useRef(null),k=d=>{const w=()=>{E(!0);const b=j.current.querySelector("a[href],button,[tabindex]");b&&b.focus()};return m+p>=d.length?d:[...d.slice(0,m),t.jsx(ot,{"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(lt,{ref:n,component:i,color:"textSecondary",className:O(C.root,a),ownerState:v,...H,children:t.jsx(ct,{className:C.ol,ref:j,ownerState:v,children:pt(z||y&&D.length<=y?D:k(D),C.separator,P,v)})})});function ht(e,r,n){const o=r.getBoundingClientRect(),s=n&&n.getBoundingClientRect(),a=ue(r);let i;if(r.fakeTransform)i=r.fakeTransform;else{const 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 xt(e){return typeof e=="function"?e():e}function W(e,r,n){const o=xt(n),s=ht(e,r,o);s&&(r.style.webkitTransform=s,r.style.transform=s)}const ft=u.forwardRef(function(r,n){const o=q(),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:P,onEntered:H,onEntering:z,onExit:E,onExited:v,onExiting:C,style:T,timeout:j=a,TransitionComponent:k=Te,...D}=r,d=u.useRef(null),w=De(Re(h),d,n),b=l=>g=>{l&&(g===void 0?l(d.current):l(d.current,g))},X=b((l,g)=>{W(p,l,x),Le(l),P&&P(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),E&&E(l)}),Y=b(l=>{l.style.webkitTransition="",l.style.transition="",v&&v(l)}),_=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=Be(()=>{d.current&&W(p,d.current,x)}),g=ue(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:X,onEntered:R,onEntering:te,onExit:I,onExited:Y,onExiting:B,addEndListener:_,appear:c,in:y,timeout:j,...D,children:(l,{ownerState:g,...L})=>u.cloneElement(h,{ref:w,style:{visibility:l==="exited"&&!y?"hidden":void 0,...T,...h.props.style},...L})})});function mt(e){return ce("MuiDrawer",e)}le("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ve=(e,r)=>{const{ownerState:n}=e;return[r.root,(n.variant==="permanent"||n.variant==="persistent")&&r.docked,r.modal]},gt=e=>{const{classes:r,anchor:n,variant:o}=e,s={root:["root",`anchor${$(n)}`],docked:[(o==="permanent"||o==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${$(n)}`,o!=="temporary"&&`paperAnchorDocked${$(n)}`]};return pe(s,mt,r)},yt=M(Ne,{name:"MuiDrawer",slot:"Root",overridesResolver:ve})(G(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),bt=M("div",{shouldForwardProp:We,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ve})({flex:"0 0 auto"}),vt=M(Ae,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.paper,r[`paperAnchor${$(n.anchor)}`],n.variant!=="temporary"&&r[`paperAnchorDocked${$(n.anchor)}`]]}})(G(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:r})=>r.anchor==="left"&&r.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="top"&&r.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="right"&&r.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:r})=>r.anchor==="bottom"&&r.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),je={left:"right",right:"left",top:"down",bottom:"up"};function jt(e){return["left","right"].includes(e)}function kt({direction:e},r){return e==="rtl"&&jt(r)?je[r]:r}const wt=u.forwardRef(function(r,n){const o=de({props:r,name:"MuiDrawer"}),s=q(),a=He(),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:P,...H}={},onClose:z,open:E=!1,PaperProps:v={},SlideProps:C,TransitionComponent:T,transitionDuration:j=i,variant:k="temporary",slots:D={},slotProps:d={},...w}=o,b=u.useRef(!1);u.useEffect(()=>{b.current=!0},[]);const X=kt({direction:a?"rtl":"ltr"},c),R={...o,anchor:c,elevation:m,open:E,variant:k,...w},B=gt(R),I={slots:{transition:T,...D},slotProps:{paper:v,transition:C,...d,backdrop:$e(d.backdrop||{...h,...P},{transitionDuration:j})}},[Y,_]=A("root",{ref:n,elementType:yt,className:O(B.root,B.modal,p),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...I,...w,...H},additionalProps:{open:E,onClose:z,hideBackdrop:y,slots:{backdrop:I.slots.backdrop},slotProps:{backdrop:I.slotProps.backdrop}}}),[N,l]=A("paper",{elementType:vt,shouldForwardComponentProp:!0,className: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:bt,ref:n,className:O(B.root,B.docked,p),ownerState:R,externalForwardedProps:I,additionalProps:w}),[we,Se]=A("transition",{elementType:ft,ownerState:R,externalForwardedProps:I,additionalProps:{in:E,direction:je[X],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(we,{...Se,children:re});return k==="persistent"?t.jsx(g,{...L,children:ne}):t.jsx(Y,{..._,children:ne})}),St=be({themeId:Oe}),Pt=S([t.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),t.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Et=S(t.jsx("path",{d:"M10.85 12.65h2.3L12 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM14.3 16l-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9z"})),Ct=S(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),It=S(t.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),Mt=S(t.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),zt=S(t.jsx("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81zM12 3 2 12h3v8h6v-6h2v6h6v-8h3z"})),Tt=S(t.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"})),Dt=S([t.jsx("path",{d:"M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-.28 0-.5.22-.5.5 0 .12.05.23.13.33.41.47.64 1.06.64 1.67 0 1.38-1.12 2.5-2.5 2.5m0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c.28 0 .5-.22.5-.5 0-.16-.08-.28-.14-.35-.41-.46-.63-1.05-.63-1.65 0-1.38 1.12-2.5 2.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7"},"0"),t.jsx("circle",{cx:"6.5",cy:"11.5",r:"1.5"},"1"),t.jsx("circle",{cx:"9.5",cy:"7.5",r:"1.5"},"2"),t.jsx("circle",{cx:"14.5",cy:"7.5",r:"1.5"},"3"),t.jsx("circle",{cx:"17.5",cy:"11.5",r:"1.5"},"4")]);function Z(e){return t.jsxs(Ve,{...e,viewBox:"0 0 24 24",sx:{fill:"none",...e.sx},children:[t.jsx("rect",{x:"3.25",y:"4.75",width:"17.5",height:"14.5",rx:"2.25",stroke:"currentColor",strokeWidth:"1.5"}),t.jsx("line",{x1:"8.5",y1:"5",x2:"8.5",y2:"19",stroke:"currentColor",strokeWidth:"1.5"})]})}const Rt={light:"dark",dark:"auto",auto:"light"},ie={light:"Light mode (click for dark)",dark:"Dark mode (click for auto)",auto:"Auto mode (follows OS, click for light)"};function Bt(){const{mode:e,userChoice:r,setMode:n,allowUserToggle:o}=Ue();if(!o)return null;const s=r??e,a=Rt[s],i=s==="auto"?Et:s==="dark"?Ze:Ge;return t.jsx(Q,{title:ie[s],children:t.jsx(V,{"aria-label":ie[s],onClick:()=>n(a),size:"small",children:t.jsx(i,{fontSize:"small"})})})}function K({label:e,onClick:r}){return t.jsx(Qe,{clickable:!0,onClick:r,label:e,size:"small","aria-label":`Navigate to ${e}`,sx:n=>({backgroundColor:"background.paper",color:"text.primary",fontWeight:500,fontSize:"0.875rem",height:32,cursor:"pointer",borderRadius:"4px",maxWidth:320,"& .MuiChip-label":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"&:hover":{backgroundColor:n.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"grey.100"}})})}function Lt(){const e=he(),r=e["*"],n=J();return!e.environmentName&&!e.packageName&&!r?null:t.jsx(f,{sx:{display:"flex",alignItems:"center",minWidth:0},children:t.jsxs(ut,{"aria-label":"breadcrumb",separator:t.jsx(Ct,{sx:{fontSize:14,color:"text.secondary"}}),children:[e.environmentName&&t.jsx(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 Ht=260,$t=64;function ke({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){return t.jsxs(f,{sx:{height:"100dvh",width:e?$t:Ht,flexShrink:0,display:"flex",flexDirection:"column",backgroundColor:"background.paper",transition:"width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[t.jsx(Nt,{isCollapsed:e,onToggleCollapse:r,logoHeader:n}),t.jsxs(f,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",py:1},children:[t.jsx(At,{isCollapsed:e}),t.jsx(Wt,{isCollapsed:e}),t.jsx(Ot,{isCollapsed:e})]}),t.jsx(Vt,{isCollapsed:e})]})}function Nt({isCollapsed:e,onToggleCollapse:r,logoHeader:n}){const o=J();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(Z,{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(Z,{fontSize:"small"})})})]})}function At({isCollapsed:e}){const n=xe().pathname==="/";return t.jsx(F,{sx:{py:0},children:t.jsx(ee,{icon:t.jsx(zt,{fontSize:"small"}),label:"Home",to:"/",selected:n,isCollapsed:e})})}function Wt({isCollapsed:e}){const{apiClients:r}=Fe(),n=he(),{data:o}=Xe({queryKey:["environments"],queryFn:()=>r.environments.listEnvironments()}),s=o?.data??[];return s.length===0?null:t.jsxs(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(Mt,{fontSize:"small"}),label:i,to:`/${i}`,selected:n.environmentName===i,isCollapsed:e},i)})})]})}function Ot({isCollapsed:e}){const n=xe().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(Dt,{fontSize:"small"}),label:"Visualization theme",to:"/settings/theme",selected:n,isCollapsed:e})})]})}function Vt({isCollapsed:e}){const r=[{label:"Malloy Docs",href:ae.docsHome,icon:t.jsx(Pt,{fontSize:"small"}),external:!0},{label:"Publisher Docs",href:ae.publishing,icon:t.jsx(Tt,{fontSize:"small"}),external:!0},{label:"Publisher API",href:"/api-doc.html",icon:t.jsx(It,{fontSize:"small"}),external:!1}];return t.jsx(F,{sx:{py:1},children:r.map(n=>t.jsx(Ut,{label:n.label,href:n.href,icon:n.icon,external:n.external,isCollapsed:e},n.label))})}function ee({icon:e,label:r,to:n,selected:o,isCollapsed:s}){const a=J(),i=t.jsxs(fe,{selected:o,onClick:c=>a(n,c),sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:o?"text.primary":"text.secondary"},children:e}),!s&&t.jsx(ge,{primary:r,primaryTypographyProps:{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(Q,{title:r,placement:"right",children:t.jsx(f,{children:i})}):i}function Ut({label:e,href:r,icon:n,external:o,isCollapsed:s}){const a=t.jsxs(fe,{component:"a",href:r,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,sx:{justifyContent:s?"center":"flex-start",px:s?0:2},children:[t.jsx(me,{sx:{minWidth:s?0:36,justifyContent:"center",color:"text.secondary"},children:n}),!s&&t.jsx(ge,{primary:e,primaryTypographyProps:{variant:"body2",sx:{color:"text.secondary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})]});return s?t.jsx(Q,{title:e,placement:"right",children:t.jsx(f,{children:a})}):a}function Qt({open:e,onClose:r,logoHeader:n}){return t.jsx(wt,{anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:260}},children:t.jsx(ke,{isCollapsed:!1,onToggleCollapse:r,logoHeader:n})})}function Yt({headerProps:e}){const r=q(),n=St(r.breakpoints.up("md")),[o,s]=u.useState(!1),[a,i]=u.useState(!1);return u.useEffect(()=>{n&&o&&s(!1)},[n,o]),t.jsxs(f,{sx:{height:"100dvh",display:"flex",flexDirection:"row",bgcolor:"background.default"},children:[n&&t.jsx(ke,{isCollapsed:a,onToggleCollapse:()=>i(c=>!c),logoHeader:e?.logoHeader}),t.jsxs(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:Ye.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(Z,{fontSize:"small"})})}),t.jsx(f,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center"},children:t.jsx(Lt,{})}),t.jsxs(f,{id:"header-actions-portal",sx:{display:"flex",alignItems:"center",flexShrink:0,gap:1},children:[t.jsx(Bt,{}),e?.endCap]})]}),t.jsx(f,{sx:{flex:1,overflow:"auto",minWidth:320,minHeight:0},children:t.jsx(u.Suspense,{fallback:t.jsx(Ke,{}),children:t.jsx(_e,{})})})]}),t.jsx(Qt,{open:o,onClose:()=>s(!1),logoHeader:e?.logoHeader})]})}export{Yt as default};
|
package/dist/app/assets/{MaterializationsPage-p9YjkRXZ.js → MaterializationsPage-D4jCpScu.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as r,$ as t,j as e,a0 as c,
|
|
1
|
+
import{F as r,$ as t,j as e,a0 as c,a8 as o}from"./index-ByceOJbS.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{F as j,$ as y,N,j as e,a0 as c,a1 as f,G as s,a2 as k,a3 as u,a4 as v,T as o,a5 as t,a6 as l}from"./index-ByceOJbS.js";function b(){const a=j(),n=a["*"],d=y(),{server:p}=N();if(!a.environmentName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})});if(!a.packageName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});const i={p:3,maxWidth:1200,mx:"auto"};if(n?.startsWith("pages/")&&!n.endsWith(".malloy")&&!n.endsWith(".malloynb")){const h=n.slice(6),g=c({environmentName:a.environmentName,packageName:a.packageName,modelPath:h});return e.jsx(f,{resourceUri:g})}const r=c({environmentName:a.environmentName,packageName:a.packageName,modelPath:n});if(n?.endsWith(".malloy"))return e.jsx(s,{sx:i,children:e.jsx(k,{resourceUri:r,runOnDemand:!0,maxResultSize:512*1024})});if(n?.endsWith(".malloynb"))return e.jsx(s,{sx:i,children:e.jsx(u,{resourceUri:r,maxResultSize:1024*1024,onNavigate:d})});const x=/\.[^./]+$/.test(n??""),m=v({server:p,environmentName:a.environmentName,packageName:a.packageName,path:n??""});return e.jsxs(s,{sx:i,children:[e.jsx(o,{variant:"h6",sx:{fontWeight:600},children:"Nothing to open at this path"}),e.jsxs(o,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsx(s,{component:"span",sx:{fontFamily:t},children:n})," ","does not name a"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloy"})," ","or"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloynb"})," ","file in package"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:a.packageName}),". This address opens"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloy"})," ","and"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:".malloynb"})," ","files."]}),x&&e.jsxs(o,{variant:"body2",color:"text.secondary",sx:{mt:1},children:["A file from the package's"," ",e.jsx(s,{component:"span",sx:{fontFamily:t},children:"public/"})," ","directory is served at ",e.jsx(l,{href:m,children:m}),"."]}),e.jsxs(o,{variant:"body2",color:"text.secondary",sx:{mt:1},children:[e.jsxs(l,{href:`/${encodeURIComponent(a.environmentName)}/${encodeURIComponent(a.packageName)}`,children:["Back to ",a.packageName]})," ","lists this package's models, notebooks, and pages."]})]})}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as r,$ as t,j as e,a0 as c,
|
|
1
|
+
import{F as r,$ as t,j as e,a0 as c,a7 as o}from"./index-ByceOJbS.js";function l(){const{environmentName:a,packageName:n}=r(),s=t();if(a)if(n){const i=c({environmentName:a,packageName:n});return e.jsx(o,{onClickPackageFile:s,resourceUri:i})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing environment name"})})}export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aa as o,j as r,ab as s,ac as a,G as n,T as t}from"./index-ByceOJbS.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(a,{sx:{m:"auto",flexDirection:"column"},children:[r.jsx(n,{sx:{height:"300px"}}),r.jsx("img",{src:"/error.png"}),r.jsx(t,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}export{x as default};
|