@malloy-publisher/sdk 0.9.8 → 0.9.10

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 (36) hide show
  1. package/dist/{RenderedResult-BrvrMDAP.cjs.js → RenderedResult-BcgYjkZ0.cjs.js} +1 -1
  2. package/dist/{RenderedResult-DZj-FnOJ.es.js → RenderedResult-Dp1Qdajz.es.js} +2 -2
  3. package/dist/ServerProvider-B0dUY8be.cjs.js +1 -0
  4. package/dist/{ServerProvider-B_bPAsu2.es.js → ServerProvider-CQy4jVYK.es.js} +1394 -1051
  5. package/dist/builder/index.cjs.js +61 -61
  6. package/dist/builder/index.es.js +783 -794
  7. package/dist/client/api.d.ts +412 -1
  8. package/dist/client/index.cjs.js +1 -1
  9. package/dist/client/index.es.js +125 -114
  10. package/dist/components/Dashboard/DashboardView.d.ts +11 -0
  11. package/dist/components/Dashboard/useStuck.d.ts +14 -0
  12. package/dist/components/DocumentCreate/newNotebook.d.ts +9 -5
  13. package/dist/components/Package/ContentTypeIcon.d.ts +3 -3
  14. package/dist/components/ReportBuilder/FilterStrip.d.ts +3 -1
  15. package/dist/components/ReportBuilder/TileMenu.d.ts +7 -2
  16. package/dist/index.cjs.js +9 -9
  17. package/dist/index.es.js +2112 -2063
  18. package/dist/{useCompiledDocument-x0B2RAH3.es.js → useCompiledDocument-BMPDvdFx.es.js} +2348 -2310
  19. package/dist/{useCompiledDocument-oocN5cGE.cjs.js → useCompiledDocument-UY28ITET.cjs.js} +34 -34
  20. package/package.json +1 -1
  21. package/src/components/Dashboard/DashboardView.tsx +62 -13
  22. package/src/components/Dashboard/useStuck.ts +38 -0
  23. package/src/components/DocumentCreate/newNotebook.spec.ts +8 -6
  24. package/src/components/DocumentCreate/newNotebook.ts +26 -12
  25. package/src/components/Package/ContentTypeIcon.tsx +16 -3
  26. package/src/components/Package/Package.agents.spec.tsx +76 -0
  27. package/src/components/Package/Package.tsx +44 -1
  28. package/src/components/ReportBuilder/BuilderDialogs.tsx +5 -3
  29. package/src/components/ReportBuilder/BuilderGrid.tsx +13 -3
  30. package/src/components/ReportBuilder/FilterStrip.tsx +118 -118
  31. package/src/components/ReportBuilder/ReportBuilder.inline.spec.tsx +0 -1
  32. package/src/components/ReportBuilder/ReportBuilder.spec.tsx +5 -6
  33. package/src/components/ReportBuilder/ReportBuilder.tsx +1 -0
  34. package/src/components/ReportBuilder/TileMenu.tsx +8 -3
  35. package/src/components/ReportBuilder/newDashboard.spec.ts +2 -3
  36. package/dist/ServerProvider-DuEOzwPc.cjs.js +0 -1
@@ -1,116 +1,127 @@
1
- import { A as e, a as o, C as n, b as t, c as i, d as r, e as p, f as u, g as m, h as A, i as E, j as c, k as l, l as d, m as C, n as y, o as P, p as b, q as F, D as g, r as S, s as k, t as M, u as R, v as h, w as D, x, y as T, z as v, B as f, E as N, F as z, G as L, H as K, I as Q, J as I, K as W, L as O, M as B, N as w, O as q, P as G, Q as U, R as j, S as H, T as J, U as V, V as X, W as Y, X as Z, Y as _, Z as $, _ as aa, $ as sa, a0 as ea, a1 as oa, a2 as na, a3 as ta, a4 as ia, a5 as ra, a6 as pa, a7 as ua, a8 as ma, a9 as Aa, aa as Ea, ab as ca, ac as la, ad as da, ae as Ca, af as ya, ag as Pa, ah as ba, ai as Fa, aj as ga, ak as Sa, al as ka, am as Ma, an as Ra, ao as ha, ap as Da, aq as xa, ar as Ta, as as va, at as fa, au as Na, av as za, aw as La, ax as Ka, ay as Qa, az as Ia, aA as Wa, aB as Oa, aC as Ba, aD as wa, aE as qa, aF as Ga, aG as Ua, aH as ja, aI as Ha, aJ as Ja, aK as Va, aL as Xa, aM as Ya, aN as Za, aO as _a, aP as $a, aQ as as, aR as ss, aS as es, aT as os, aU as ns, aV as ts, aW as is } from "../ServerProvider-B_bPAsu2.es.js";
1
+ import { A as e, a as i, b as o, c as n, d as t, e as r, C as p, f as u, g as m, h as A, i as l, j as E, k as c, l as y, m as C, n as d, o as b, p as F, q as g, r as P, s as S, t as k, u as M, D as R, v as h, w as x, x as D, y as T, z as v, B as f, E as N, F as z, G as L, H as K, I as O, J as Q, K as I, L as W, M as B, N as w, O as G, P as q, Q as U, R as j, S as H, T as J, U as V, V as X, W as Y, X as Z, Y as _, Z as $, _ as aa, $ as sa, a0 as ea, a1 as ia, a2 as oa, a3 as na, a4 as ta, a5 as ra, a6 as pa, a7 as ua, a8 as ma, a9 as Aa, aa as la, ab as Ea, ac as ca, ad as ya, ae as Ca, af as da, ag as ba, ah as Fa, ai as ga, aj as Pa, ak as Sa, al as ka, am as Ma, an as Ra, ao as ha, ap as xa, aq as Da, ar as Ta, as as va, at as fa, au as Na, av as za, aw as La, ax as Ka, ay as Oa, az as Qa, aA as Ia, aB as Wa, aC as Ba, aD as wa, aE as Ga, aF as qa, aG as Ua, aH as ja, aI as Ha, aJ as Ja, aK as Va, aL as Xa, aM as Ya, aN as Za, aO as _a, aP as $a, aQ as as, aR as ss, aS as es, aT as is, aU as os, aV as ns, aW as ts, aX as rs, aY as ps, aZ as us, a_ as ms, a$ as As, b0 as ls, b1 as Es, b2 as cs, b3 as ys, b4 as Cs, b5 as ds } from "../ServerProvider-CQy4jVYK.es.js";
2
2
  export {
3
- e as AttachedDatabaseTypeEnum,
4
- o as AzureConnectionAuthTypeEnum,
5
- n as CompileProblemSeverityEnum,
6
- t as CompileRequestScopeEnum,
7
- i as CompileResultStatusEnum,
8
- r as CompiledDocumentKindEnum,
9
- p as CompiledDocumentLayoutEnum,
10
- u as Configuration,
11
- m as ConnectionProxyTypeEnum,
12
- A as ConnectionStatusStatusEnum,
13
- E as ConnectionTypeEnum,
14
- c as ConnectionsApi,
15
- l as ConnectionsApiAxiosParamCreator,
16
- d as ConnectionsApiFactory,
17
- C as ConnectionsApiFp,
18
- y as ConnectionsTestApi,
19
- P as ConnectionsTestApiAxiosParamCreator,
20
- b as ConnectionsTestApiFactory,
21
- F as ConnectionsTestApiFp,
22
- g as DashboardManifestKindEnum,
23
- S as DashboardManifestLayoutEnum,
24
- k as DashboardTileKindEnum,
25
- M as DashboardsApi,
26
- R as DashboardsApiAxiosParamCreator,
27
- h as DashboardsApiFactory,
28
- D as DashboardsApiFp,
29
- x as DataAppFitEnum,
30
- T as DataAppsApi,
31
- v as DataAppsApiAxiosParamCreator,
32
- f as DataAppsApiFactory,
33
- N as DataAppsApiFp,
34
- z as DatabaseTypeEnum,
35
- L as DatabasesApi,
36
- K as DatabasesApiAxiosParamCreator,
37
- Q as DatabasesApiFactory,
38
- I as DatabasesApiFp,
39
- W as EnvironmentsApi,
40
- O as EnvironmentsApiAxiosParamCreator,
41
- B as EnvironmentsApiFactory,
42
- w as EnvironmentsApiFp,
43
- q as ExecuteNotebookCellBypassFiltersEnum,
44
- G as FilterTypeEnum,
45
- U as FreshnessFallbackEnum,
46
- j as GivenControlEnum,
47
- H as LedgerEntryStrategyEnum,
48
- J as LogMessageSeverityEnum,
49
- V as ManifestEntryFreshnessFallbackEnum,
50
- X as ManifestEntryOriginEnum,
51
- Y as ManifestEntryRefreshEnum,
52
- Z as ManifestEntryUpstreamReuseEnum,
53
- _ as MaterializationActionActionEnum,
54
- $ as MaterializationStatus,
55
- aa as MaterializationsApi,
56
- sa as MaterializationsApiAxiosParamCreator,
57
- ea as MaterializationsApiFactory,
58
- oa as MaterializationsApiFp,
59
- na as ModelsApi,
60
- ta as ModelsApiAxiosParamCreator,
61
- ia as ModelsApiFactory,
62
- ra as ModelsApiFp,
63
- pa as NotebookCellKindEnum,
64
- ua as NotebookCellResultKindEnum,
65
- ma as NotebookCellResultTypeEnum,
66
- Aa as NotebookCellTypeEnum,
67
- Ea as NotebooksApi,
68
- ca as NotebooksApiAxiosParamCreator,
69
- la as NotebooksApiFactory,
70
- da as NotebooksApiFp,
71
- Ca as PackageEmbeddingIndexReasonEnum,
72
- ya as PackageEmbeddingIndexStageEnum,
73
- Pa as PackageEmbeddingIndexStatusEnum,
74
- ba as PackageManifestBindingStatusEnum,
75
- Fa as PackageQueryableSourcesEnum,
76
- ga as PackageScopeEnum,
77
- Sa as PackageStorageServeBindingsInnerOriginEnum,
78
- ka as PackageWarningsInnerSeverityEnum,
79
- Ma as PackagesApi,
80
- Ra as PackagesApiAxiosParamCreator,
81
- ha as PackagesApiFactory,
82
- Da as PackagesApiFp,
83
- xa as PersistSourcePlanOriginEnum,
84
- Ta as PostgresConnectionSslmodeEnum,
85
- va as PublisherApi,
86
- fa as PublisherApiAxiosParamCreator,
87
- Na as PublisherApiFactory,
88
- za as PublisherApiFp,
89
- La as QueryClass,
90
- Ka as QueryResultQueryRowLimitSourceEnum,
91
- Qa as QueryResultServedFromEnum,
92
- Ia as RawNotebookFormatEnum,
93
- Wa as Realization,
94
- Oa as RefusedSourceReasonEnum,
95
- Ba as RefusedSourceTierEnum,
96
- wa as ReportCellsFormatEnum,
97
- qa as ReportLayoutEnum,
98
- Ga as ReportManifestLayoutEnum,
99
- Ua as ReportTileKindEnum,
100
- ja as ReportsApi,
101
- Ha as ReportsApiAxiosParamCreator,
102
- Ja as ReportsApiFactory,
103
- Va as ReportsApiFp,
104
- Xa as RunContextTriggerEnum,
105
- Ya as S3ConnectionProviderEnum,
106
- Za as ServerProvider,
107
- _a as ServerStatusOperationalStateEnum,
108
- $a as ThemeDefaultModeEnum,
109
- as as WatchModeApi,
110
- ss as WatchModeApiAxiosParamCreator,
111
- es as WatchModeApiFactory,
112
- os as WatchModeApiFp,
113
- ns as globalQueryClient,
114
- ts as usePublisherTheme,
115
- is as useServer
3
+ e as AgentsApi,
4
+ i as AgentsApiAxiosParamCreator,
5
+ o as AgentsApiFactory,
6
+ n as AgentsApiFp,
7
+ t as AttachedDatabaseTypeEnum,
8
+ r as AzureConnectionAuthTypeEnum,
9
+ p as CompileProblemSeverityEnum,
10
+ u as CompileRequestScopeEnum,
11
+ m as CompileResultStatusEnum,
12
+ A as CompiledDocumentKindEnum,
13
+ l as CompiledDocumentLayoutEnum,
14
+ E as Configuration,
15
+ c as ConnectionProxyTypeEnum,
16
+ y as ConnectionStatusStatusEnum,
17
+ C as ConnectionTypeEnum,
18
+ d as ConnectionsApi,
19
+ b as ConnectionsApiAxiosParamCreator,
20
+ F as ConnectionsApiFactory,
21
+ g as ConnectionsApiFp,
22
+ P as ConnectionsTestApi,
23
+ S as ConnectionsTestApiAxiosParamCreator,
24
+ k as ConnectionsTestApiFactory,
25
+ M as ConnectionsTestApiFp,
26
+ R as DashboardManifestKindEnum,
27
+ h as DashboardManifestLayoutEnum,
28
+ x as DashboardTileKindEnum,
29
+ D as DashboardsApi,
30
+ T as DashboardsApiAxiosParamCreator,
31
+ v as DashboardsApiFactory,
32
+ f as DashboardsApiFp,
33
+ N as DataAppFitEnum,
34
+ z as DataAppsApi,
35
+ L as DataAppsApiAxiosParamCreator,
36
+ K as DataAppsApiFactory,
37
+ O as DataAppsApiFp,
38
+ Q as DatabaseTypeEnum,
39
+ I as DatabasesApi,
40
+ W as DatabasesApiAxiosParamCreator,
41
+ B as DatabasesApiFactory,
42
+ w as DatabasesApiFp,
43
+ G as EnvironmentsApi,
44
+ q as EnvironmentsApiAxiosParamCreator,
45
+ U as EnvironmentsApiFactory,
46
+ j as EnvironmentsApiFp,
47
+ H as ExecuteNotebookCellBypassFiltersEnum,
48
+ J as FilterTypeEnum,
49
+ V as FreshnessFallbackEnum,
50
+ X as GetAgentSkillsEnum,
51
+ Y as GivenControlEnum,
52
+ Z as LedgerEntryStrategyEnum,
53
+ _ as LogMessageSeverityEnum,
54
+ $ as ManifestEntryFreshnessFallbackEnum,
55
+ aa as ManifestEntryOriginEnum,
56
+ sa as ManifestEntryRefreshEnum,
57
+ ea as ManifestEntryUpstreamReuseEnum,
58
+ ia as MaterializationActionActionEnum,
59
+ oa as MaterializationStatus,
60
+ na as MaterializationsApi,
61
+ ta as MaterializationsApiAxiosParamCreator,
62
+ ra as MaterializationsApiFactory,
63
+ pa as MaterializationsApiFp,
64
+ ua as ModelsApi,
65
+ ma as ModelsApiAxiosParamCreator,
66
+ Aa as ModelsApiFactory,
67
+ la as ModelsApiFp,
68
+ Ea as NotebookCellKindEnum,
69
+ ca as NotebookCellResultKindEnum,
70
+ ya as NotebookCellResultTypeEnum,
71
+ Ca as NotebookCellTypeEnum,
72
+ da as NotebooksApi,
73
+ ba as NotebooksApiAxiosParamCreator,
74
+ Fa as NotebooksApiFactory,
75
+ ga as NotebooksApiFp,
76
+ Pa as PackageEmbeddingIndexReasonEnum,
77
+ Sa as PackageEmbeddingIndexStageEnum,
78
+ ka as PackageEmbeddingIndexStatusEnum,
79
+ Ma as PackageManifestBindingStatusEnum,
80
+ Ra as PackageQueryableSourcesEnum,
81
+ ha as PackageScopeEnum,
82
+ xa as PackageStorageServeBindingsInnerOriginEnum,
83
+ Da as PackageWarningsInnerSeverityEnum,
84
+ Ta as PackagesApi,
85
+ va as PackagesApiAxiosParamCreator,
86
+ fa as PackagesApiFactory,
87
+ Na as PackagesApiFp,
88
+ za as PersistSourcePlanOriginEnum,
89
+ La as PostgresConnectionSslmodeEnum,
90
+ Ka as PublisherApi,
91
+ Oa as PublisherApiAxiosParamCreator,
92
+ Qa as PublisherApiFactory,
93
+ Ia as PublisherApiFp,
94
+ Wa as QueryClass,
95
+ Ba as QueryResultQueryRowLimitSourceEnum,
96
+ wa as QueryResultServedFromEnum,
97
+ Ga as RawNotebookFormatEnum,
98
+ qa as Realization,
99
+ Ua as RefusedSourceReasonEnum,
100
+ ja as RefusedSourceTierEnum,
101
+ Ha as ReportCellsFormatEnum,
102
+ Ja as ReportLayoutEnum,
103
+ Va as ReportManifestLayoutEnum,
104
+ Xa as ReportTileKindEnum,
105
+ Ya as ReportsApi,
106
+ Za as ReportsApiAxiosParamCreator,
107
+ _a as ReportsApiFactory,
108
+ $a as ReportsApiFp,
109
+ as as RunContextTriggerEnum,
110
+ ss as S3ConnectionProviderEnum,
111
+ es as ServerProvider,
112
+ is as ServerStatusOperationalStateEnum,
113
+ os as SkillOriginEnum,
114
+ ns as SkillSummaryOriginEnum,
115
+ ts as SkillsApi,
116
+ rs as SkillsApiAxiosParamCreator,
117
+ ps as SkillsApiFactory,
118
+ us as SkillsApiFp,
119
+ ms as ThemeDefaultModeEnum,
120
+ As as WatchModeApi,
121
+ ls as WatchModeApiAxiosParamCreator,
122
+ Es as WatchModeApiFactory,
123
+ cs as WatchModeApiFp,
124
+ ys as globalQueryClient,
125
+ Cs as usePublisherTheme,
126
+ ds as useServer
116
127
  };
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { DashboardManifest } from '../../client';
2
3
  import { HostGivenValue } from '../../hooks/givenValue';
3
4
  import { DrillNavigation } from '../drill';
@@ -67,3 +68,13 @@ export declare function DashboardProse({ title, description, chrome, }: {
67
68
  /** The chrome the document's tiles take, which the description matches. */
68
69
  chrome?: TileChrome;
69
70
  }): import("react/jsx-runtime").JSX.Element;
71
+ /**
72
+ * A control row that pins to the top of the scroller and, while pinned, draws
73
+ * a hairline under itself, so tiles scrolling beneath read as passing under a
74
+ * bar rather than being cut off by nothing. Shared by the reader and the
75
+ * builder so both pin the same way.
76
+ */
77
+ export declare function StickyControls({ sticky, children, }: {
78
+ sticky?: boolean;
79
+ children: ReactNode;
80
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Whether a `position: sticky` bar is currently pinned, so it can draw an edge
3
+ * only while content scrolls under it. Unpinned, the bar sits in the flow and
4
+ * an edge would be a stray line between it and the first tile.
5
+ *
6
+ * Watches a zero-height sentinel placed directly before the bar: once the
7
+ * sentinel has scrolled out through the top, the bar is pinned. No explicit
8
+ * root, so it works whichever ancestor scrolls — an observer with the implicit
9
+ * root counts clipping by every scrolling ancestor, not just the viewport.
10
+ */
11
+ export declare function useStuck(): {
12
+ sentinelRef: (node: HTMLElement | null) => void;
13
+ stuck: boolean;
14
+ };
@@ -2,11 +2,15 @@ import { ReportLayout } from '../Package/documentLocation';
2
2
  import { NewDocument } from './guards';
3
3
  /**
4
4
  * A new report file, in the format the builder writes: the givens flag, the
5
- * artifact tag (a block, a tile per line) listing an intro text tile and one
6
- * query tile, a named import of the one source it runs (written relative to
7
- * where the report sits, so a report at the root imports `"<model>"`), the
8
- * intro block, and one extension of the source (`<source>_tiles`, the
9
- * builder's naming) holding the picked view as the query tile.
5
+ * artifact tag (a block, a tile per line) listing one query tile, a named
6
+ * import of the one source it runs (written relative to where the report
7
+ * sits, so a report at the root imports `"<model>"`), and one extension of the
8
+ * source (`<source>_tiles`, the builder's naming) holding the picked view as
9
+ * the query tile, labelled with the view's own title.
10
+ *
11
+ * No intro text tile: the page already shows the title, and offers the
12
+ * description in place, so a generated `# <title>` and a line asking for a
13
+ * description said both twice on the first screen of every new report.
10
14
  *
11
15
  * The two layouts differ only in `layout=` and the grid tag a grid carries.
12
16
  * `layout=` is always written, so the file never depends on the reading rule.
@@ -1,11 +1,11 @@
1
1
  import { SvgIconProps } from '@mui/material/SvgIcon';
2
- export type ContentType = "report" | "model" | "data" | "materialization" | "dataApp" | "dashboard";
2
+ export type ContentType = "report" | "model" | "data" | "materialization" | "dataApp" | "dashboard" | "agent";
3
3
  /**
4
4
  * The backplate color behind each icon. One per content type and no repeats: on
5
- * a page that lists all six, a shared color reads as a shared kind, and the
5
+ * a page that lists all seven, a shared color reads as a shared kind, and the
6
6
  * glyphs are small enough that color does most of the telling apart.
7
7
  *
8
- * Six hues from `PALETTE`, spaced far enough apart to survive being 18px of
8
+ * Seven hues from `PALETTE`, spaced far enough apart to survive being 18px of
9
9
  * white on a 32px plate, and disjoint from the three `SURFACE_TINT` uses so a
10
10
  * colour means one kind of thing everywhere in the Console.
11
11
  *
@@ -5,7 +5,7 @@ import { BuilderControl } from './controls';
5
5
  * chip per control opens its window, and "Add filter" beside them declares a
6
6
  * new one. The live control row the host renders sits under it.
7
7
  */
8
- export declare function FilterStrip({ controls: controlList, tileCount, unknownFieldsOf, onEdit, onAdd, addDisabledReason, onRemove, children, }: {
8
+ export declare function FilterStrip({ controls: controlList, tileCount, unknownFieldsOf, onEdit, onAdd, addDisabledReason, onRemove, sticky, children, }: {
9
9
  controls: BuilderControl[];
10
10
  tileCount: number;
11
11
  /** Bindings a control has that its tiles' sources cannot take. */
@@ -16,6 +16,8 @@ export declare function FilterStrip({ controls: controlList, tileCount, unknownF
16
16
  addDisabledReason?: string;
17
17
  /** Take a control off the dashboard, as its window's Remove does. */
18
18
  onRemove: (name: string) => void;
19
+ /** Pin the strip to the top of the scroller: a grid's, not a linear report's. */
20
+ sticky?: boolean;
19
21
  /** The host's live control row. */
20
22
  children?: ReactNode;
21
23
  }): import("react/jsx-runtime").JSX.Element;
@@ -22,8 +22,13 @@ export interface TileMenuProps {
22
22
  onRemove: () => void;
23
23
  /** Why removing is refused, shown beside a Remove that stays focusable; absent when it is allowed. */
24
24
  removeBlocked?: string;
25
- /** Open the clickable-cells window for this tile's source. */
26
- onDrills: () => void;
25
+ /**
26
+ * Open the clickable-cells window for this tile's source. Absent when the
27
+ * source declares no dimension in this file, so there is nothing a drill
28
+ * could go on: the menu then offers no Drill, rather than a window that
29
+ * explains why its own Apply is off.
30
+ */
31
+ onDrills?: () => void;
27
32
  /** The catalog's view the tile shows, when the catalog knows it: what decides which charts are offered. */
28
33
  view?: Pick<CatalogView, "chart" | "aggregateOnly">;
29
34
  }