@malloy-publisher/sdk 0.0.219 → 0.0.220

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 (60) hide show
  1. package/dist/ServerProvider-C5fRNp_p.cjs.js +1 -0
  2. package/dist/{ServerProvider-DaYKdCxq.es.js → ServerProvider-DP5VyYD-.es.js} +1419 -924
  3. package/dist/client/api.d.ts +365 -12
  4. package/dist/client/index.cjs.js +1 -1
  5. package/dist/client/index.es.js +22 -21
  6. package/dist/components/Materializations/ManifestView.d.ts +1 -1
  7. package/dist/components/ServerProvider.d.ts +12 -0
  8. package/dist/components/highlighter.d.ts +6 -1
  9. package/dist/{core-BiGj7BML.es.js → core-DFvqRVqM.es.js} +1 -1
  10. package/dist/{core-CnTkTGYk.cjs.js → core-Dqqyj1Tc.cjs.js} +1 -1
  11. package/dist/github-dark-BKL9xNgN.cjs.js +1 -0
  12. package/dist/github-dark-DenFmJkN.es.js +4 -0
  13. package/dist/index-BG4wWx4I.cjs.js +307 -0
  14. package/dist/{index-BTfp6uRs.es.js → index-fSSQGelK.es.js} +13617 -13497
  15. package/dist/index.cjs.js +1 -1
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.es.js +46 -37
  18. package/dist/theme/ThemeContext.d.ts +45 -0
  19. package/dist/theme/buildMalloyExplicitTheme.d.ts +34 -0
  20. package/dist/theme/buildTableCssVars.d.ts +25 -0
  21. package/dist/theme/buildVegaThemeOverride.d.ts +16 -0
  22. package/dist/theme/defaults.d.ts +7 -0
  23. package/dist/theme/index.d.ts +8 -0
  24. package/dist/theme/keys.d.ts +20 -0
  25. package/dist/theme/readChartAnnotations.d.ts +23 -0
  26. package/dist/theme/resolveTheme.d.ts +22 -0
  27. package/dist/theme/types.d.ts +61 -0
  28. package/package.json +7 -5
  29. package/src/components/AnalyzePackageButton.tsx +6 -3
  30. package/src/components/Environment/Packages.tsx +6 -3
  31. package/src/components/Home/AddEnvironmentDialog.tsx +1 -1
  32. package/src/components/Home/Home.tsx +6 -3
  33. package/src/components/Materializations/ManifestView.tsx +4 -4
  34. package/src/components/Materializations/MaterializationDetailDialog.tsx +2 -2
  35. package/src/components/Model/ModelCell.tsx +4 -2
  36. package/src/components/Notebook/NotebookCell.tsx +36 -18
  37. package/src/components/Package/Package.tsx +8 -3
  38. package/src/components/RenderedResult/RenderedResult.tsx +253 -31
  39. package/src/components/ServerProvider.tsx +142 -46
  40. package/src/components/Workbook/MutableCell.tsx +7 -5
  41. package/src/components/Workbook/Workbook.tsx +1 -1
  42. package/src/components/highlighter.ts +19 -5
  43. package/src/components/styles.ts +19 -18
  44. package/src/index.ts +1 -0
  45. package/src/theme/ThemeContext.tsx +83 -0
  46. package/src/theme/buildMalloyExplicitTheme.ts +58 -0
  47. package/src/theme/buildTableCssVars.spec.ts +64 -0
  48. package/src/theme/buildTableCssVars.ts +60 -0
  49. package/src/theme/buildVegaThemeOverride.spec.ts +53 -0
  50. package/src/theme/buildVegaThemeOverride.ts +44 -0
  51. package/src/theme/defaults.ts +75 -0
  52. package/src/theme/index.ts +8 -0
  53. package/src/theme/keys.ts +29 -0
  54. package/src/theme/readChartAnnotations.spec.ts +55 -0
  55. package/src/theme/readChartAnnotations.ts +66 -0
  56. package/src/theme/resolveTheme.spec.ts +144 -0
  57. package/src/theme/resolveTheme.ts +115 -0
  58. package/src/theme/types.ts +67 -0
  59. package/dist/ServerProvider-RXwIqb5f.cjs.js +0 -1
  60. package/dist/index-CQMDeQ_C.cjs.js +0 -235
@@ -194,13 +194,13 @@ export interface BuildGraph {
194
194
  */
195
195
  export interface BuildInstruction {
196
196
  /**
197
- * Identifies which planned source this instruction is for (matches PersistSourcePlan.buildId).
197
+ * Identifies which planned source this instruction is for (matches PersistSourcePlan.sourceEntityId).
198
198
  * @type {string}
199
199
  * @memberof BuildInstruction
200
200
  */
201
- 'buildId': string;
201
+ 'sourceEntityId': string;
202
202
  /**
203
- * Optional convenience echo of \"sourceName@modelURL\"; buildId is authoritative.
203
+ * Optional convenience echo of \"sourceName@modelURL\"; sourceEntityId is authoritative.
204
204
  * @type {string}
205
205
  * @memberof BuildInstruction
206
206
  */
@@ -212,7 +212,7 @@ export interface BuildInstruction {
212
212
  */
213
213
  'materializedTableId': string;
214
214
  /**
215
- * Logical, fully-qualified (but unquoted) table name to create — an optional dialect container path plus the table name, e.g. `mydataset.engaged_events_<buildId>_v0`. The publisher dialect-quotes each segment when it emits the DDL, so quote-requiring names (a hyphenated BigQuery project id, a container path) are valid, and echoes this logical name back in the manifest.
215
+ * Logical, fully-qualified (but unquoted) table name to create — an optional dialect container path plus the table name, e.g. `mydataset.engaged_events_<sourceEntityId>_v0`. The publisher dialect-quotes each segment when it emits the DDL, so quote-requiring names (a hyphenated BigQuery project id, a container path) are valid, and echoes this logical name back in the manifest.
216
216
  * @type {string}
217
217
  * @memberof BuildInstruction
218
218
  */
@@ -238,7 +238,7 @@ export interface BuildInstructions {
238
238
  'sources': Array<BuildInstruction>;
239
239
  }
240
240
  /**
241
- * Build output. Maps each buildId a build produced to its physical table. Returned inline; the caller persists it.
241
+ * Build output. Maps each sourceEntityId a build produced to its physical table. Returned inline; the caller persists it.
242
242
  * @export
243
243
  * @interface BuildManifest
244
244
  */
@@ -250,7 +250,7 @@ export interface BuildManifest {
250
250
  */
251
251
  'builtAt'?: string;
252
252
  /**
253
- * Map of buildId to manifest entry.
253
+ * Map of sourceEntityId to manifest entry.
254
254
  * @type {{ [key: string]: ManifestEntry; }}
255
255
  * @memberof BuildManifest
256
256
  */
@@ -521,6 +521,12 @@ export interface Connection {
521
521
  * @memberof Connection
522
522
  */
523
523
  'type'?: ConnectionTypeEnum;
524
+ /**
525
+ * Optional, opaque, stable fingerprint of this connection\'s data identity. It is a hash of the configuration that determines *which data* the connection reaches (its data-locating settings), and deliberately excludes credentials and other secret values, so it stays constant across credential rotation and changes only when the connection is pointed at different data. When present, it is used as this connection\'s contribution to content-addressed build identifiers so that builds re-address only when the underlying data identity actually changes; consumers should treat it as an opaque token and use the supplied value verbatim rather than deriving their own. This field is optional — when omitted, a connection identity is derived locally instead.
526
+ * @type {string}
527
+ * @memberof Connection
528
+ */
529
+ 'fingerprint'?: string;
524
530
  /**
525
531
  *
526
532
  * @type {ConnectionAttributes}
@@ -724,7 +730,7 @@ export interface CreateMaterializationRequest {
724
730
  */
725
731
  'buildInstructions'?: BuildInstructions | null;
726
732
  /**
727
- * Build a new table even when a source\'s buildId is unchanged.
733
+ * Build a new table even when a source\'s sourceEntityId is unchanged.
728
734
  * @type {boolean}
729
735
  * @memberof CreateMaterializationRequest
730
736
  */
@@ -939,6 +945,12 @@ export interface Environment {
939
945
  * @memberof Environment
940
946
  */
941
947
  'packages'?: Array<Package>;
948
+ /**
949
+ * Reserved for a per-environment theme override. Not yet populated by the server or applied by the client; viewers currently use the instance-level theme only.
950
+ * @type {Theme}
951
+ * @memberof Environment
952
+ */
953
+ 'theme'?: Theme;
942
954
  }
943
955
  /**
944
956
  * **DEPRECATED**: Use the `Given` schema (native Malloy runtime parameters) instead. See docs/givens.md for migration recipes. A filter declared via #(filter) annotation on a Malloy source.
@@ -1128,7 +1140,7 @@ export interface ManifestEntry {
1128
1140
  * @type {string}
1129
1141
  * @memberof ManifestEntry
1130
1142
  */
1131
- 'buildId': string;
1143
+ 'sourceEntityId': string;
1132
1144
  /**
1133
1145
  *
1134
1146
  * @type {string}
@@ -1516,7 +1528,7 @@ export interface Package {
1516
1528
  */
1517
1529
  'queryableSources'?: PackageQueryableSourcesEnum;
1518
1530
  /**
1519
- * URI (gs:// or s3://) of the externally-computed manifest for this package. On (re)load the publisher reads it and binds persist references (buildId -> physicalTableName). Null = serve live.
1531
+ * URI (gs:// or s3://) of the externally-computed manifest for this package. On (re)load the publisher reads it and binds persist references (sourceEntityId -> physicalTableName). Null = serve live.
1520
1532
  * @type {string}
1521
1533
  * @memberof Package
1522
1534
  */
@@ -1534,7 +1546,7 @@ export interface Package {
1534
1546
  */
1535
1547
  'manifestBindingStatus'?: PackageManifestBindingStatusEnum;
1536
1548
  /**
1537
- * Server-computed, read-only: number of buildId -> physical-table entries currently bound (0 when unbound or on live fallback).
1549
+ * Server-computed, read-only: number of sourceEntityId -> physical-table entries currently bound (0 when unbound or on live fallback).
1538
1550
  * @type {number}
1539
1551
  * @memberof Package
1540
1552
  */
@@ -1684,11 +1696,11 @@ export interface PersistSourcePlan {
1684
1696
  */
1685
1697
  'dialect'?: string;
1686
1698
  /**
1687
- * hash(connectionDigest + canonical logical SQL).
1699
+ * Stable, content-addressed identity of this persisted source. A deterministic UUID5 derived from the source\'s scope, its connection `fingerprint`, and its canonical compiled SQL — deliberately independent of package version, so it changes only when the source\'s data identity changes. Consumers treat it as an opaque token and use the supplied value verbatim.
1688
1700
  * @type {string}
1689
1701
  * @memberof PersistSourcePlan
1690
1702
  */
1691
- 'buildId': string;
1703
+ 'sourceEntityId': string;
1692
1704
  /**
1693
1705
  * The source\'s build SQL (with the build manifest applied for upstream rewrites).
1694
1706
  * @type {string}
@@ -2115,6 +2127,12 @@ export interface ServerStatus {
2115
2127
  * @memberof ServerStatus
2116
2128
  */
2117
2129
  'frozenConfig'?: boolean;
2130
+ /**
2131
+ * Instance-wide default theme for the Malloy renderer and the Publisher app shell.
2132
+ * @type {Theme}
2133
+ * @memberof ServerStatus
2134
+ */
2135
+ 'theme'?: Theme;
2118
2136
  }
2119
2137
  export declare const ServerStatusOperationalStateEnum: {
2120
2138
  readonly Initializing: "initializing";
@@ -2377,6 +2395,250 @@ export interface TemporaryTable {
2377
2395
  */
2378
2396
  'table'?: string;
2379
2397
  }
2398
+ /**
2399
+ * Visual theme applied to Malloy renderer output (chart palette, fonts, table chrome) and to the Publisher app shell. Cascade order is instance → per-chart Malloy annotation, with later layers overriding earlier ones for the keys they set. (A per-environment layer is reserved but not yet applied by the client.)
2400
+ * @export
2401
+ * @interface Theme
2402
+ */
2403
+ export interface Theme {
2404
+ /**
2405
+ * Initial color mode for new viewers. \"auto\" follows the browser\'s prefers-color-scheme until the viewer overrides.
2406
+ * @type {string}
2407
+ * @memberof Theme
2408
+ */
2409
+ 'defaultMode'?: ThemeDefaultModeEnum;
2410
+ /**
2411
+ * When true, the Publisher app renders a light/dark toggle and persists the viewer\'s choice to localStorage. When false, the defaultMode is enforced.
2412
+ * @type {boolean}
2413
+ * @memberof Theme
2414
+ */
2415
+ 'allowUserToggle'?: boolean;
2416
+ /**
2417
+ *
2418
+ * @type {ThemePalette}
2419
+ * @memberof Theme
2420
+ */
2421
+ 'palette'?: ThemePalette;
2422
+ /**
2423
+ *
2424
+ * @type {ThemeFont}
2425
+ * @memberof Theme
2426
+ */
2427
+ 'font'?: ThemeFont;
2428
+ }
2429
+ export declare const ThemeDefaultModeEnum: {
2430
+ readonly Light: "light";
2431
+ readonly Dark: "dark";
2432
+ readonly Auto: "auto";
2433
+ };
2434
+ export type ThemeDefaultModeEnum = typeof ThemeDefaultModeEnum[keyof typeof ThemeDefaultModeEnum];
2435
+ /**
2436
+ * Typography overrides applied to both the app shell and the Malloy renderer (Vega text marks). Shared across light and dark modes because font choice is a brand decision, not a mode-specific one.
2437
+ * @export
2438
+ * @interface ThemeFont
2439
+ */
2440
+ export interface ThemeFont {
2441
+ /**
2442
+ * CSS font-family stack.
2443
+ * @type {string}
2444
+ * @memberof ThemeFont
2445
+ */
2446
+ 'family'?: string;
2447
+ /**
2448
+ * Base font size in pixels for renderer text.
2449
+ * @type {number}
2450
+ * @memberof ThemeFont
2451
+ */
2452
+ 'size'?: number;
2453
+ }
2454
+ /**
2455
+ * Color tokens consumed by the Malloy renderer and the app shell.
2456
+ * @export
2457
+ * @interface ThemePalette
2458
+ */
2459
+ export interface ThemePalette {
2460
+ /**
2461
+ * Ordered list of hex colors used by multi-series charts (passed to Vega\'s `range.category`). Shared across light and dark modes so the brand palette stays consistent when viewers switch modes.
2462
+ * @type {Array<string>}
2463
+ * @memberof ThemePalette
2464
+ */
2465
+ 'series'?: Array<string>;
2466
+ /**
2467
+ *
2468
+ * @type {ThemePaletteBackground}
2469
+ * @memberof ThemePalette
2470
+ */
2471
+ 'background'?: ThemePaletteBackground;
2472
+ /**
2473
+ *
2474
+ * @type {ThemePaletteTableHeader}
2475
+ * @memberof ThemePalette
2476
+ */
2477
+ 'tableHeader'?: ThemePaletteTableHeader;
2478
+ /**
2479
+ *
2480
+ * @type {ThemePaletteTableHeaderBackground}
2481
+ * @memberof ThemePalette
2482
+ */
2483
+ 'tableHeaderBackground'?: ThemePaletteTableHeaderBackground;
2484
+ /**
2485
+ *
2486
+ * @type {ThemePaletteTableBody}
2487
+ * @memberof ThemePalette
2488
+ */
2489
+ 'tableBody'?: ThemePaletteTableBody;
2490
+ /**
2491
+ *
2492
+ * @type {ThemePaletteTile}
2493
+ * @memberof ThemePalette
2494
+ */
2495
+ 'tile'?: ThemePaletteTile;
2496
+ /**
2497
+ *
2498
+ * @type {ThemePaletteTileTitle}
2499
+ * @memberof ThemePalette
2500
+ */
2501
+ 'tileTitle'?: ThemePaletteTileTitle;
2502
+ /**
2503
+ *
2504
+ * @type {ThemePaletteMapColor}
2505
+ * @memberof ThemePalette
2506
+ */
2507
+ 'mapColor'?: ThemePaletteMapColor;
2508
+ }
2509
+ /**
2510
+ * Page and chart background per mode.
2511
+ * @export
2512
+ * @interface ThemePaletteBackground
2513
+ */
2514
+ export interface ThemePaletteBackground {
2515
+ /**
2516
+ *
2517
+ * @type {string}
2518
+ * @memberof ThemePaletteBackground
2519
+ */
2520
+ 'light'?: string;
2521
+ /**
2522
+ *
2523
+ * @type {string}
2524
+ * @memberof ThemePaletteBackground
2525
+ */
2526
+ 'dark'?: string;
2527
+ }
2528
+ /**
2529
+ * Saturated end of the gradient used by choropleth maps and other sequential color scales. The renderer pairs it with a near-neutral low end so the operator only picks the brand-saturated colour.
2530
+ * @export
2531
+ * @interface ThemePaletteMapColor
2532
+ */
2533
+ export interface ThemePaletteMapColor {
2534
+ /**
2535
+ *
2536
+ * @type {string}
2537
+ * @memberof ThemePaletteMapColor
2538
+ */
2539
+ 'light'?: string;
2540
+ /**
2541
+ *
2542
+ * @type {string}
2543
+ * @memberof ThemePaletteMapColor
2544
+ */
2545
+ 'dark'?: string;
2546
+ }
2547
+ /**
2548
+ * Foreground color for table body cells per mode.
2549
+ * @export
2550
+ * @interface ThemePaletteTableBody
2551
+ */
2552
+ export interface ThemePaletteTableBody {
2553
+ /**
2554
+ *
2555
+ * @type {string}
2556
+ * @memberof ThemePaletteTableBody
2557
+ */
2558
+ 'light'?: string;
2559
+ /**
2560
+ *
2561
+ * @type {string}
2562
+ * @memberof ThemePaletteTableBody
2563
+ */
2564
+ 'dark'?: string;
2565
+ }
2566
+ /**
2567
+ * Foreground color for the table header per mode.
2568
+ * @export
2569
+ * @interface ThemePaletteTableHeader
2570
+ */
2571
+ export interface ThemePaletteTableHeader {
2572
+ /**
2573
+ *
2574
+ * @type {string}
2575
+ * @memberof ThemePaletteTableHeader
2576
+ */
2577
+ 'light'?: string;
2578
+ /**
2579
+ *
2580
+ * @type {string}
2581
+ * @memberof ThemePaletteTableHeader
2582
+ */
2583
+ 'dark'?: string;
2584
+ }
2585
+ /**
2586
+ * Background color for the table header row, per mode. Distinct from `tile` (the dashboard tile container that wraps each chart / table) so operators can theme the header band independently from the padding around the table.
2587
+ * @export
2588
+ * @interface ThemePaletteTableHeaderBackground
2589
+ */
2590
+ export interface ThemePaletteTableHeaderBackground {
2591
+ /**
2592
+ *
2593
+ * @type {string}
2594
+ * @memberof ThemePaletteTableHeaderBackground
2595
+ */
2596
+ 'light'?: string;
2597
+ /**
2598
+ *
2599
+ * @type {string}
2600
+ * @memberof ThemePaletteTableHeaderBackground
2601
+ */
2602
+ 'dark'?: string;
2603
+ }
2604
+ /**
2605
+ * Background color of the dashboard tile (the padded container that wraps each chart / table) per mode.
2606
+ * @export
2607
+ * @interface ThemePaletteTile
2608
+ */
2609
+ export interface ThemePaletteTile {
2610
+ /**
2611
+ *
2612
+ * @type {string}
2613
+ * @memberof ThemePaletteTile
2614
+ */
2615
+ 'light'?: string;
2616
+ /**
2617
+ *
2618
+ * @type {string}
2619
+ * @memberof ThemePaletteTile
2620
+ */
2621
+ 'dark'?: string;
2622
+ }
2623
+ /**
2624
+ * Foreground color for the title text that sits in the dashboard tile padding (e.g. the \"by_month\" label above a chart) per mode.
2625
+ * @export
2626
+ * @interface ThemePaletteTileTitle
2627
+ */
2628
+ export interface ThemePaletteTileTitle {
2629
+ /**
2630
+ *
2631
+ * @type {string}
2632
+ * @memberof ThemePaletteTileTitle
2633
+ */
2634
+ 'light'?: string;
2635
+ /**
2636
+ *
2637
+ * @type {string}
2638
+ * @memberof ThemePaletteTileTitle
2639
+ */
2640
+ 'dark'?: string;
2641
+ }
2380
2642
  /**
2381
2643
  * Trino database connection configuration
2382
2644
  * @export
@@ -4517,6 +4779,13 @@ export declare class PagesApi extends BaseAPI {
4517
4779
  * @export
4518
4780
  */
4519
4781
  export declare const PublisherApiAxiosParamCreator: (configuration?: Configuration) => {
4782
+ /**
4783
+ * Drops the saved theme from the server. The next GET returns either the publisher.config.json boot seed (if present) or an empty object. Rejected with 403 when publisher.config.json has frozenConfig=true.
4784
+ * @summary Reset the instance theme to the boot seed or default
4785
+ * @param {*} [options] Override http request option.
4786
+ * @throws {RequiredError}
4787
+ */
4788
+ deleteTheme: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4520
4789
  /**
4521
4790
  * Returns the current status of the Malloy Publisher server, including initialization state, available environments, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
4522
4791
  * @summary Get server status and health information
@@ -4524,12 +4793,34 @@ export declare const PublisherApiAxiosParamCreator: (configuration?: Configurati
4524
4793
  * @throws {RequiredError}
4525
4794
  */
4526
4795
  getStatus: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4796
+ /**
4797
+ * Returns the theme used by the Malloy renderer for charts/tables/dashboards. Reflects edits made via the in-app Theme Editor (persisted to the server\'s internal DuckDB metadata store via the shared StorageManager). Empty object when no theme has been configured.
4798
+ * @summary Get the active instance theme
4799
+ * @param {*} [options] Override http request option.
4800
+ * @throws {RequiredError}
4801
+ */
4802
+ getTheme: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4803
+ /**
4804
+ * Persists the supplied theme as the new instance theme. Returns the saved theme. Rejected with 403 when publisher.config.json has frozenConfig=true.
4805
+ * @summary Save the instance theme
4806
+ * @param {Theme} theme
4807
+ * @param {*} [options] Override http request option.
4808
+ * @throws {RequiredError}
4809
+ */
4810
+ updateTheme: (theme: Theme, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4527
4811
  };
4528
4812
  /**
4529
4813
  * PublisherApi - functional programming interface
4530
4814
  * @export
4531
4815
  */
4532
4816
  export declare const PublisherApiFp: (configuration?: Configuration) => {
4817
+ /**
4818
+ * Drops the saved theme from the server. The next GET returns either the publisher.config.json boot seed (if present) or an empty object. Rejected with 403 when publisher.config.json has frozenConfig=true.
4819
+ * @summary Reset the instance theme to the boot seed or default
4820
+ * @param {*} [options] Override http request option.
4821
+ * @throws {RequiredError}
4822
+ */
4823
+ deleteTheme(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Theme>>;
4533
4824
  /**
4534
4825
  * Returns the current status of the Malloy Publisher server, including initialization state, available environments, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
4535
4826
  * @summary Get server status and health information
@@ -4537,12 +4828,34 @@ export declare const PublisherApiFp: (configuration?: Configuration) => {
4537
4828
  * @throws {RequiredError}
4538
4829
  */
4539
4830
  getStatus(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerStatus>>;
4831
+ /**
4832
+ * Returns the theme used by the Malloy renderer for charts/tables/dashboards. Reflects edits made via the in-app Theme Editor (persisted to the server\'s internal DuckDB metadata store via the shared StorageManager). Empty object when no theme has been configured.
4833
+ * @summary Get the active instance theme
4834
+ * @param {*} [options] Override http request option.
4835
+ * @throws {RequiredError}
4836
+ */
4837
+ getTheme(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Theme>>;
4838
+ /**
4839
+ * Persists the supplied theme as the new instance theme. Returns the saved theme. Rejected with 403 when publisher.config.json has frozenConfig=true.
4840
+ * @summary Save the instance theme
4841
+ * @param {Theme} theme
4842
+ * @param {*} [options] Override http request option.
4843
+ * @throws {RequiredError}
4844
+ */
4845
+ updateTheme(theme: Theme, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Theme>>;
4540
4846
  };
4541
4847
  /**
4542
4848
  * PublisherApi - factory interface
4543
4849
  * @export
4544
4850
  */
4545
4851
  export declare const PublisherApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
4852
+ /**
4853
+ * Drops the saved theme from the server. The next GET returns either the publisher.config.json boot seed (if present) or an empty object. Rejected with 403 when publisher.config.json has frozenConfig=true.
4854
+ * @summary Reset the instance theme to the boot seed or default
4855
+ * @param {*} [options] Override http request option.
4856
+ * @throws {RequiredError}
4857
+ */
4858
+ deleteTheme(options?: RawAxiosRequestConfig): AxiosPromise<Theme>;
4546
4859
  /**
4547
4860
  * Returns the current status of the Malloy Publisher server, including initialization state, available environments, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
4548
4861
  * @summary Get server status and health information
@@ -4550,6 +4863,21 @@ export declare const PublisherApiFactory: (configuration?: Configuration, basePa
4550
4863
  * @throws {RequiredError}
4551
4864
  */
4552
4865
  getStatus(options?: RawAxiosRequestConfig): AxiosPromise<ServerStatus>;
4866
+ /**
4867
+ * Returns the theme used by the Malloy renderer for charts/tables/dashboards. Reflects edits made via the in-app Theme Editor (persisted to the server\'s internal DuckDB metadata store via the shared StorageManager). Empty object when no theme has been configured.
4868
+ * @summary Get the active instance theme
4869
+ * @param {*} [options] Override http request option.
4870
+ * @throws {RequiredError}
4871
+ */
4872
+ getTheme(options?: RawAxiosRequestConfig): AxiosPromise<Theme>;
4873
+ /**
4874
+ * Persists the supplied theme as the new instance theme. Returns the saved theme. Rejected with 403 when publisher.config.json has frozenConfig=true.
4875
+ * @summary Save the instance theme
4876
+ * @param {Theme} theme
4877
+ * @param {*} [options] Override http request option.
4878
+ * @throws {RequiredError}
4879
+ */
4880
+ updateTheme(theme: Theme, options?: RawAxiosRequestConfig): AxiosPromise<Theme>;
4553
4881
  };
4554
4882
  /**
4555
4883
  * PublisherApi - object-oriented interface
@@ -4558,6 +4886,14 @@ export declare const PublisherApiFactory: (configuration?: Configuration, basePa
4558
4886
  * @extends {BaseAPI}
4559
4887
  */
4560
4888
  export declare class PublisherApi extends BaseAPI {
4889
+ /**
4890
+ * Drops the saved theme from the server. The next GET returns either the publisher.config.json boot seed (if present) or an empty object. Rejected with 403 when publisher.config.json has frozenConfig=true.
4891
+ * @summary Reset the instance theme to the boot seed or default
4892
+ * @param {*} [options] Override http request option.
4893
+ * @throws {RequiredError}
4894
+ * @memberof PublisherApi
4895
+ */
4896
+ deleteTheme(options?: RawAxiosRequestConfig): Promise< AxiosResponse<Theme, any, {}>>;
4561
4897
  /**
4562
4898
  * Returns the current status of the Malloy Publisher server, including initialization state, available environments, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
4563
4899
  * @summary Get server status and health information
@@ -4566,6 +4902,23 @@ export declare class PublisherApi extends BaseAPI {
4566
4902
  * @memberof PublisherApi
4567
4903
  */
4568
4904
  getStatus(options?: RawAxiosRequestConfig): Promise< AxiosResponse<ServerStatus, any, {}>>;
4905
+ /**
4906
+ * Returns the theme used by the Malloy renderer for charts/tables/dashboards. Reflects edits made via the in-app Theme Editor (persisted to the server\'s internal DuckDB metadata store via the shared StorageManager). Empty object when no theme has been configured.
4907
+ * @summary Get the active instance theme
4908
+ * @param {*} [options] Override http request option.
4909
+ * @throws {RequiredError}
4910
+ * @memberof PublisherApi
4911
+ */
4912
+ getTheme(options?: RawAxiosRequestConfig): Promise< AxiosResponse<Theme, any, {}>>;
4913
+ /**
4914
+ * Persists the supplied theme as the new instance theme. Returns the saved theme. Rejected with 403 when publisher.config.json has frozenConfig=true.
4915
+ * @summary Save the instance theme
4916
+ * @param {Theme} theme
4917
+ * @param {*} [options] Override http request option.
4918
+ * @throws {RequiredError}
4919
+ * @memberof PublisherApi
4920
+ */
4921
+ updateTheme(theme: Theme, options?: RawAxiosRequestConfig): Promise< AxiosResponse<Theme, any, {}>>;
4569
4922
  }
4570
4923
  /**
4571
4924
  * WatchModeApi - axios parameter creator
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ServerProvider-RXwIqb5f.cjs.js");exports.AttachedDatabaseTypeEnum=e.AttachedDatabaseTypeEnum;exports.AzureConnectionAuthTypeEnum=e.AzureConnectionAuthTypeEnum;exports.CompileProblemSeverityEnum=e.CompileProblemSeverityEnum;exports.CompileResultStatusEnum=e.CompileResultStatusEnum;exports.Configuration=e.Configuration;exports.ConnectionProxyTypeEnum=e.ConnectionProxyTypeEnum;exports.ConnectionStatusStatusEnum=e.ConnectionStatusStatusEnum;exports.ConnectionTypeEnum=e.ConnectionTypeEnum;exports.ConnectionsApi=e.ConnectionsApi;exports.ConnectionsApiAxiosParamCreator=e.ConnectionsApiAxiosParamCreator;exports.ConnectionsApiFactory=e.ConnectionsApiFactory;exports.ConnectionsApiFp=e.ConnectionsApiFp;exports.ConnectionsTestApi=e.ConnectionsTestApi;exports.ConnectionsTestApiAxiosParamCreator=e.ConnectionsTestApiAxiosParamCreator;exports.ConnectionsTestApiFactory=e.ConnectionsTestApiFactory;exports.ConnectionsTestApiFp=e.ConnectionsTestApiFp;exports.DatabaseTypeEnum=e.DatabaseTypeEnum;exports.DatabasesApi=e.DatabasesApi;exports.DatabasesApiAxiosParamCreator=e.DatabasesApiAxiosParamCreator;exports.DatabasesApiFactory=e.DatabasesApiFactory;exports.DatabasesApiFp=e.DatabasesApiFp;exports.EnvironmentsApi=e.EnvironmentsApi;exports.EnvironmentsApiAxiosParamCreator=e.EnvironmentsApiAxiosParamCreator;exports.EnvironmentsApiFactory=e.EnvironmentsApiFactory;exports.EnvironmentsApiFp=e.EnvironmentsApiFp;exports.ExecuteNotebookCellBypassFiltersEnum=e.ExecuteNotebookCellBypassFiltersEnum;exports.FilterTypeEnum=e.FilterTypeEnum;exports.LogMessageSeverityEnum=e.LogMessageSeverityEnum;exports.MaterializationActionActionEnum=e.MaterializationActionActionEnum;exports.MaterializationStatus=e.MaterializationStatus;exports.MaterializationsApi=e.MaterializationsApi;exports.MaterializationsApiAxiosParamCreator=e.MaterializationsApiAxiosParamCreator;exports.MaterializationsApiFactory=e.MaterializationsApiFactory;exports.MaterializationsApiFp=e.MaterializationsApiFp;exports.ModelsApi=e.ModelsApi;exports.ModelsApiAxiosParamCreator=e.ModelsApiAxiosParamCreator;exports.ModelsApiFactory=e.ModelsApiFactory;exports.ModelsApiFp=e.ModelsApiFp;exports.NotebookCellResultTypeEnum=e.NotebookCellResultTypeEnum;exports.NotebookCellTypeEnum=e.NotebookCellTypeEnum;exports.NotebooksApi=e.NotebooksApi;exports.NotebooksApiAxiosParamCreator=e.NotebooksApiAxiosParamCreator;exports.NotebooksApiFactory=e.NotebooksApiFactory;exports.NotebooksApiFp=e.NotebooksApiFp;exports.PackageManifestBindingStatusEnum=e.PackageManifestBindingStatusEnum;exports.PackageQueryableSourcesEnum=e.PackageQueryableSourcesEnum;exports.PackageWarningsInnerSeverityEnum=e.PackageWarningsInnerSeverityEnum;exports.PackagesApi=e.PackagesApi;exports.PackagesApiAxiosParamCreator=e.PackagesApiAxiosParamCreator;exports.PackagesApiFactory=e.PackagesApiFactory;exports.PackagesApiFp=e.PackagesApiFp;exports.PageFitEnum=e.PageFitEnum;exports.PagesApi=e.PagesApi;exports.PagesApiAxiosParamCreator=e.PagesApiAxiosParamCreator;exports.PagesApiFactory=e.PagesApiFactory;exports.PagesApiFp=e.PagesApiFp;exports.PostgresConnectionSslmodeEnum=e.PostgresConnectionSslmodeEnum;exports.PublisherApi=e.PublisherApi;exports.PublisherApiAxiosParamCreator=e.PublisherApiAxiosParamCreator;exports.PublisherApiFactory=e.PublisherApiFactory;exports.PublisherApiFp=e.PublisherApiFp;exports.Realization=e.Realization;exports.ServerProvider=e.ServerProvider;exports.ServerStatusOperationalStateEnum=e.ServerStatusOperationalStateEnum;exports.WatchModeApi=e.WatchModeApi;exports.WatchModeApiAxiosParamCreator=e.WatchModeApiAxiosParamCreator;exports.WatchModeApiFactory=e.WatchModeApiFactory;exports.WatchModeApiFp=e.WatchModeApiFp;exports.globalQueryClient=e.globalQueryClient;exports.useServer=e.useServer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ServerProvider-C5fRNp_p.cjs.js");exports.AttachedDatabaseTypeEnum=e.AttachedDatabaseTypeEnum;exports.AzureConnectionAuthTypeEnum=e.AzureConnectionAuthTypeEnum;exports.CompileProblemSeverityEnum=e.CompileProblemSeverityEnum;exports.CompileResultStatusEnum=e.CompileResultStatusEnum;exports.Configuration=e.Configuration;exports.ConnectionProxyTypeEnum=e.ConnectionProxyTypeEnum;exports.ConnectionStatusStatusEnum=e.ConnectionStatusStatusEnum;exports.ConnectionTypeEnum=e.ConnectionTypeEnum;exports.ConnectionsApi=e.ConnectionsApi;exports.ConnectionsApiAxiosParamCreator=e.ConnectionsApiAxiosParamCreator;exports.ConnectionsApiFactory=e.ConnectionsApiFactory;exports.ConnectionsApiFp=e.ConnectionsApiFp;exports.ConnectionsTestApi=e.ConnectionsTestApi;exports.ConnectionsTestApiAxiosParamCreator=e.ConnectionsTestApiAxiosParamCreator;exports.ConnectionsTestApiFactory=e.ConnectionsTestApiFactory;exports.ConnectionsTestApiFp=e.ConnectionsTestApiFp;exports.DatabaseTypeEnum=e.DatabaseTypeEnum;exports.DatabasesApi=e.DatabasesApi;exports.DatabasesApiAxiosParamCreator=e.DatabasesApiAxiosParamCreator;exports.DatabasesApiFactory=e.DatabasesApiFactory;exports.DatabasesApiFp=e.DatabasesApiFp;exports.EnvironmentsApi=e.EnvironmentsApi;exports.EnvironmentsApiAxiosParamCreator=e.EnvironmentsApiAxiosParamCreator;exports.EnvironmentsApiFactory=e.EnvironmentsApiFactory;exports.EnvironmentsApiFp=e.EnvironmentsApiFp;exports.ExecuteNotebookCellBypassFiltersEnum=e.ExecuteNotebookCellBypassFiltersEnum;exports.FilterTypeEnum=e.FilterTypeEnum;exports.LogMessageSeverityEnum=e.LogMessageSeverityEnum;exports.MaterializationActionActionEnum=e.MaterializationActionActionEnum;exports.MaterializationStatus=e.MaterializationStatus;exports.MaterializationsApi=e.MaterializationsApi;exports.MaterializationsApiAxiosParamCreator=e.MaterializationsApiAxiosParamCreator;exports.MaterializationsApiFactory=e.MaterializationsApiFactory;exports.MaterializationsApiFp=e.MaterializationsApiFp;exports.ModelsApi=e.ModelsApi;exports.ModelsApiAxiosParamCreator=e.ModelsApiAxiosParamCreator;exports.ModelsApiFactory=e.ModelsApiFactory;exports.ModelsApiFp=e.ModelsApiFp;exports.NotebookCellResultTypeEnum=e.NotebookCellResultTypeEnum;exports.NotebookCellTypeEnum=e.NotebookCellTypeEnum;exports.NotebooksApi=e.NotebooksApi;exports.NotebooksApiAxiosParamCreator=e.NotebooksApiAxiosParamCreator;exports.NotebooksApiFactory=e.NotebooksApiFactory;exports.NotebooksApiFp=e.NotebooksApiFp;exports.PackageManifestBindingStatusEnum=e.PackageManifestBindingStatusEnum;exports.PackageQueryableSourcesEnum=e.PackageQueryableSourcesEnum;exports.PackageWarningsInnerSeverityEnum=e.PackageWarningsInnerSeverityEnum;exports.PackagesApi=e.PackagesApi;exports.PackagesApiAxiosParamCreator=e.PackagesApiAxiosParamCreator;exports.PackagesApiFactory=e.PackagesApiFactory;exports.PackagesApiFp=e.PackagesApiFp;exports.PageFitEnum=e.PageFitEnum;exports.PagesApi=e.PagesApi;exports.PagesApiAxiosParamCreator=e.PagesApiAxiosParamCreator;exports.PagesApiFactory=e.PagesApiFactory;exports.PagesApiFp=e.PagesApiFp;exports.PostgresConnectionSslmodeEnum=e.PostgresConnectionSslmodeEnum;exports.PublisherApi=e.PublisherApi;exports.PublisherApiAxiosParamCreator=e.PublisherApiAxiosParamCreator;exports.PublisherApiFactory=e.PublisherApiFactory;exports.PublisherApiFp=e.PublisherApiFp;exports.Realization=e.Realization;exports.ServerProvider=e.ServerProvider;exports.ServerStatusOperationalStateEnum=e.ServerStatusOperationalStateEnum;exports.ThemeDefaultModeEnum=e.ThemeDefaultModeEnum;exports.WatchModeApi=e.WatchModeApi;exports.WatchModeApiAxiosParamCreator=e.WatchModeApiAxiosParamCreator;exports.WatchModeApiFactory=e.WatchModeApiFactory;exports.WatchModeApiFp=e.WatchModeApiFp;exports.globalQueryClient=e.globalQueryClient;exports.useServer=e.useServer;
@@ -1,4 +1,4 @@
1
- import { A as e, a as o, C as i, b as t, af as n, d as r, e as p, c as A, p as c, m, o as u, n as l, t as C, q as P, s as y, r as E, D as F, y as b, v as g, x as M, w as S, G as k, E as x, B as d, z as T, _ as v, F as h, L as z, O as N, M as D, K as W, H as f, J as R, I as B, V as Q, Q as I, U as L, T as O, f as j, N as q, Z as w, W as G, Y as H, X as J, h as K, P as U, i as V, a2 as X, $ as Y, a1 as Z, a0 as _, j as $, a6 as aa, a3 as sa, a5 as ea, a4 as oa, k as ia, aa as ta, a7 as na, a9 as ra, a8 as pa, R as Aa, S as ca, l as ma, ae as ua, ab as la, ad as Ca, ac as Pa, g as ya, u as Ea } from "../ServerProvider-DaYKdCxq.es.js";
1
+ import { A as e, a as o, C as i, b as t, ag as n, d as r, e as p, c as A, p as m, m as u, o as c, n as l, t as C, q as P, s as y, r as E, D as F, y as b, v as g, x as M, w as S, G as d, E as k, B as x, z as T, $ as h, F as v, L as z, O as D, M as N, K as f, H as W, J as R, I as B, W as Q, Q as I, V as L, U as O, f as j, N as q, _ as w, X as G, Z as H, Y as J, h as K, P as U, i as V, a3 as X, a0 as Y, a2 as Z, a1 as _, j as $, a7 as aa, a4 as sa, a6 as ea, a5 as oa, k as ia, ab as ta, a8 as na, aa as ra, a9 as pa, R as Aa, S as ma, l as ua, T as ca, af as la, ac as Ca, ae as Pa, ad as ya, g as Ea, u as Fa } from "../ServerProvider-DP5VyYD-.es.js";
2
2
  export {
3
3
  e as AttachedDatabaseTypeEnum,
4
4
  o as AzureConnectionAuthTypeEnum,
@@ -8,9 +8,9 @@ export {
8
8
  r as ConnectionProxyTypeEnum,
9
9
  p as ConnectionStatusStatusEnum,
10
10
  A as ConnectionTypeEnum,
11
- c as ConnectionsApi,
12
- m as ConnectionsApiAxiosParamCreator,
13
- u as ConnectionsApiFactory,
11
+ m as ConnectionsApi,
12
+ u as ConnectionsApiAxiosParamCreator,
13
+ c as ConnectionsApiFactory,
14
14
  l as ConnectionsApiFp,
15
15
  C as ConnectionsTestApi,
16
16
  P as ConnectionsTestApiAxiosParamCreator,
@@ -21,17 +21,17 @@ export {
21
21
  g as DatabasesApiAxiosParamCreator,
22
22
  M as DatabasesApiFactory,
23
23
  S as DatabasesApiFp,
24
- k as EnvironmentsApi,
25
- x as EnvironmentsApiAxiosParamCreator,
26
- d as EnvironmentsApiFactory,
24
+ d as EnvironmentsApi,
25
+ k as EnvironmentsApiAxiosParamCreator,
26
+ x as EnvironmentsApiFactory,
27
27
  T as EnvironmentsApiFp,
28
- v as ExecuteNotebookCellBypassFiltersEnum,
29
- h as FilterTypeEnum,
28
+ h as ExecuteNotebookCellBypassFiltersEnum,
29
+ v as FilterTypeEnum,
30
30
  z as LogMessageSeverityEnum,
31
- N as MaterializationActionActionEnum,
32
- D as MaterializationStatus,
33
- W as MaterializationsApi,
34
- f as MaterializationsApiAxiosParamCreator,
31
+ D as MaterializationActionActionEnum,
32
+ N as MaterializationStatus,
33
+ f as MaterializationsApi,
34
+ W as MaterializationsApiAxiosParamCreator,
35
35
  R as MaterializationsApiFactory,
36
36
  B as MaterializationsApiFp,
37
37
  Q as ModelsApi,
@@ -62,12 +62,13 @@ export {
62
62
  ra as PublisherApiFactory,
63
63
  pa as PublisherApiFp,
64
64
  Aa as Realization,
65
- ca as ServerProvider,
66
- ma as ServerStatusOperationalStateEnum,
67
- ua as WatchModeApi,
68
- la as WatchModeApiAxiosParamCreator,
69
- Ca as WatchModeApiFactory,
70
- Pa as WatchModeApiFp,
71
- ya as globalQueryClient,
72
- Ea as useServer
65
+ ma as ServerProvider,
66
+ ua as ServerStatusOperationalStateEnum,
67
+ ca as ThemeDefaultModeEnum,
68
+ la as WatchModeApi,
69
+ Ca as WatchModeApiAxiosParamCreator,
70
+ Pa as WatchModeApiFactory,
71
+ ya as WatchModeApiFp,
72
+ Ea as globalQueryClient,
73
+ Fa as useServer
73
74
  };
@@ -1,7 +1,7 @@
1
1
  import { ManifestEntry } from '../../client';
2
2
  type ManifestViewProps = {
3
3
  entries: {
4
- [buildId: string]: ManifestEntry;
4
+ [sourceEntityId: string]: ManifestEntry;
5
5
  } | undefined;
6
6
  builtAt?: string;
7
7
  };
@@ -1,11 +1,18 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { ConnectionsApi, DatabasesApi, EnvironmentsApi, MaterializationsApi, ModelsApi, NotebooksApi, PackagesApi, PagesApi, PublisherApi, WatchModeApi } from '../client';
3
+ import { Theme } from '../theme/types';
3
4
  export interface ServerContextValue {
4
5
  server: string;
5
6
  getAccessToken?: () => Promise<string>;
6
7
  apiClients: ApiClients;
7
8
  mutable: boolean;
8
9
  isLoadingStatus: boolean;
10
+ /**
11
+ * Instance-wide default theme, pulled from the `/api/v0/status` response.
12
+ * `undefined` while loading, or when the operator has not configured a
13
+ * theme in `publisher.config.json`.
14
+ */
15
+ instanceTheme?: Theme;
9
16
  }
10
17
  export interface ServerProviderProps {
11
18
  children: ReactNode;
@@ -39,6 +46,11 @@ declare const getApiClients: (baseURL?: string, accessToken?: () => Promise<stri
39
46
  watchMode: WatchModeApi;
40
47
  };
41
48
  export type ApiClients = ReturnType<typeof getApiClients>;
49
+ /**
50
+ * Outer wrapper that owns the QueryClient. The inner component runs
51
+ * react-query hooks for /status, so it has to live below the
52
+ * QueryClientProvider.
53
+ */
42
54
  export declare const ServerProvider: React.FC<ServerProviderProps>;
43
55
  export declare const useServer: () => ServerContextValue;
44
56
  export {};
@@ -1 +1,6 @@
1
- export declare function highlight(code: string, lang: string): Promise<string>;
1
+ /**
2
+ * Render `code` (of language `lang`) to HTML with shiki's syntax
3
+ * highlighter. `mode` controls which github theme is used so the code
4
+ * block blends with the page chrome on both light and dark surfaces.
5
+ */
6
+ export declare function highlight(code: string, lang: string, mode?: "light" | "dark"): Promise<string>;
@@ -1,5 +1,5 @@
1
1
  import { createOnigurumaEngine as vt, getDefaultWasmLoader as Pr, loadWasm as Or } from "./engine-oniguruma-C4vnmooL.es.js";
2
- import { w as At, s as wn, f as Mr, a as Fr, b as Br, c as Dt, z as jr, h as Dr, d as Ur } from "./index-BTfp6uRs.es.js";
2
+ import { w as At, s as wn, f as Mr, a as Fr, b as Br, c as Dt, z as jr, h as Dr, d as Ur } from "./index-fSSQGelK.es.js";
3
3
  let V = class extends Error {
4
4
  constructor(e) {
5
5
  super(e), this.name = "ShikiError";