@malloy-publisher/sdk 0.9.11 → 0.9.13

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 (74) hide show
  1. package/README.md +5 -7
  2. package/dist/{RenderedResult-Cmx8sX8d.es.js → RenderedResult-DnBtf-cI.es.js} +2 -2
  3. package/dist/{RenderedResult-BlNoIiSi.cjs.js → RenderedResult-DtQtNV0d.cjs.js} +1 -1
  4. package/dist/ServerProvider-BIFPCzTD.cjs.js +1 -0
  5. package/dist/{ServerProvider-azXLkk1q.es.js → ServerProvider-BV7IoDMR.es.js} +808 -607
  6. package/dist/builder/index.cjs.js +72 -72
  7. package/dist/builder/index.es.js +4156 -4219
  8. package/dist/builder-entry.d.ts +1 -0
  9. package/dist/client/api.d.ts +224 -1
  10. package/dist/client/index.cjs.js +1 -1
  11. package/dist/client/index.es.js +41 -37
  12. package/dist/components/Connections/common.d.ts +11 -3
  13. package/dist/components/Report/telemetry.d.ts +0 -5
  14. package/dist/components/ReportBuilder/BuilderBar.d.ts +1 -1
  15. package/dist/components/ReportBuilder/BuilderToolbar.d.ts +14 -10
  16. package/dist/components/ReportBuilder/EditorSurface.d.ts +1 -2
  17. package/dist/components/ReportBuilder/ReportBuilder.d.ts +3 -10
  18. package/dist/components/ReportBuilder/ReportEditor.d.ts +2 -9
  19. package/dist/components/ReportBuilder/SaveStatus.d.ts +16 -0
  20. package/dist/components/ReportBuilder/TileFrame.d.ts +9 -2
  21. package/dist/components/ReportBuilder/builderControls.d.ts +14 -6
  22. package/dist/components/ReportBuilder/useBuilderSession.d.ts +1 -1
  23. package/dist/components/ReportBuilder/useReportDraft.d.ts +6 -2
  24. package/dist/components/given/GivenInput.d.ts +18 -1
  25. package/dist/components/given/GivensPanel.d.ts +12 -1
  26. package/dist/components/given/useOptionSearch.d.ts +30 -0
  27. package/dist/hooks/index.d.ts +1 -1
  28. package/dist/hooks/useDocumentControls.d.ts +5 -0
  29. package/dist/hooks/useGivensState.d.ts +7 -0
  30. package/dist/hooks/useSuggestOptions.d.ts +60 -4
  31. package/dist/index.cjs.js +9 -9
  32. package/dist/index.es.js +2541 -2400
  33. package/dist/{useCompiledDocument-7j5cBjQd.es.js → useCompiledDocument-B4QF1mIl.es.js} +6912 -6759
  34. package/dist/useCompiledDocument-D0OAMejE.cjs.js +142 -0
  35. package/package.json +1 -1
  36. package/src/builder-entry.ts +1 -0
  37. package/src/components/Connections/AddConnectionDialog.tsx +34 -2
  38. package/src/components/Connections/EditConnectionDialog.tsx +45 -3
  39. package/src/components/Connections/common.spec.ts +69 -0
  40. package/src/components/Connections/common.ts +132 -0
  41. package/src/components/Environment/Connections.tsx +1 -0
  42. package/src/components/Report/ReportPage.tsx +5 -1
  43. package/src/components/Report/telemetry.ts +0 -6
  44. package/src/components/ReportBuilder/AddTileDialog.tsx +2 -2
  45. package/src/components/ReportBuilder/BuilderBar.tsx +5 -256
  46. package/src/components/ReportBuilder/BuilderHeader.tsx +9 -3
  47. package/src/components/ReportBuilder/BuilderToolbar.tsx +15 -38
  48. package/src/components/ReportBuilder/EditorSurface.tsx +0 -3
  49. package/src/components/ReportBuilder/FilterDialog.tsx +1 -1
  50. package/src/components/ReportBuilder/ReportBuilder.controls.spec.tsx +210 -24
  51. package/src/components/ReportBuilder/ReportBuilder.tsx +43 -85
  52. package/src/components/ReportBuilder/ReportEditor.package.spec.tsx +0 -36
  53. package/src/components/ReportBuilder/ReportEditor.tsx +2 -13
  54. package/src/components/ReportBuilder/SaveStatus.tsx +271 -0
  55. package/src/components/ReportBuilder/TileFrame.spec.ts +34 -0
  56. package/src/components/ReportBuilder/TileFrame.tsx +10 -3
  57. package/src/components/ReportBuilder/builderControls.ts +39 -13
  58. package/src/components/ReportBuilder/emptyStart.spec.ts +1 -1
  59. package/src/components/ReportBuilder/useReportDraft.ts +38 -4
  60. package/src/components/given/GivenInput.tsx +219 -104
  61. package/src/components/given/GivensPanel.spec.tsx +19 -0
  62. package/src/components/given/GivensPanel.tsx +31 -1
  63. package/src/components/given/useOptionSearch.spec.tsx +218 -0
  64. package/src/components/given/useOptionSearch.ts +100 -0
  65. package/src/hooks/index.ts +5 -1
  66. package/src/hooks/useDocumentControls.ts +12 -1
  67. package/src/hooks/useGivensState.spec.ts +54 -0
  68. package/src/hooks/useGivensState.ts +21 -1
  69. package/src/hooks/useSuggestOptions.dom.spec.ts +125 -4
  70. package/src/hooks/useSuggestOptions.spec.ts +73 -2
  71. package/src/hooks/useSuggestOptions.ts +234 -62
  72. package/dist/ServerProvider-BOgiW8MX.cjs.js +0 -1
  73. package/dist/useCompiledDocument-B21sVbb4.cjs.js +0 -141
  74. package/src/components/ReportBuilder/ReportBuilder.layoutSwitch.spec.tsx +0 -145
@@ -71,7 +71,7 @@ export type ReportEditorProps = ({
71
71
  * report's copy is read back only from an authoritative store) and is what
72
72
  * a save records until the text says otherwise; once open, the document's
73
73
  * own tag decides how it is drawn, what a save records and which events it
74
- * reports, and the layout switch changes that.
74
+ * reports.
75
75
  */
76
76
  layout?: ReportLayout;
77
77
  /** @deprecated Pass `layout`: `dashboard` is grid, `notebook` linear. */
@@ -104,7 +104,7 @@ export type ReportEditorProps = ({
104
104
  onOpenModel?: (modelPath: string) => void;
105
105
  /**
106
106
  * Take over the builder's page-level controls (save status and Save, undo
107
- * and redo, the layout switch, Add): handed over as `BuilderControls`
107
+ * and redo, Add): handed over as `BuilderControls`
108
108
  * whenever they change, with no toolbar drawn on the page. Draw them with
109
109
  * `BuilderBar` in the host's header, or place each in its own chrome.
110
110
  */
@@ -118,13 +118,6 @@ export type ReportEditorProps = ({
118
118
  keepDraft?: boolean;
119
119
  /** Edit a document held as text; see {@link TextSourceOptions}. */
120
120
  textSource?: TextSourceOptions;
121
- /**
122
- * Whether the toolbar offers the Linear / Grid layout switch. Default
123
- * true. A host that files a report by its layout passes false, so an
124
- * author cannot change a layout the host files by. A document held as text
125
- * never gets the switch.
126
- */
127
- allowLayoutChange?: boolean;
128
121
  };
129
122
  /**
130
123
  * Open a document the host keeps as TEXT, rather than a file in a package.
@@ -0,0 +1,16 @@
1
+ import { BuilderControls } from './builderControls';
2
+ /** What the status reads: a slice of the builder's controls. */
3
+ export type SaveStatusProps = Pick<BuilderControls, "status" | "saveTarget" | "draftKeptAt" | "discard" | "restored" | "dismissRestored">;
4
+ /**
5
+ * Where the edits stand: saved, saving, kept in this browser, or (with no
6
+ * draft) unsaved. While there are edits to drop, it opens a menu offering
7
+ * Discard edits, which is one undoable edit back to the saved report.
8
+ *
9
+ * Edits put back from this browser on opening are said here, not in a banner
10
+ * over the page: the dot takes the accent, and the menu's first line says when
11
+ * the edits are from, until the menu has been opened once or the author edits
12
+ * again.
13
+ */
14
+ export declare function SaveStatus(props: SaveStatusProps): import("react/jsx-runtime").JSX.Element;
15
+ /** A time of day, or a date and time when not today: when a draft was kept. */
16
+ export declare function clockTime(at: number): string;
@@ -59,8 +59,15 @@ export declare const selectionSx: (theme: ResolvedTheme, { selected, flash, bare
59
59
  selected: boolean;
60
60
  flash?: boolean;
61
61
  bare?: boolean;
62
- /** How far a bare ring stands off its prose. Only content outside the grid may go wider than the grid's own. */
63
- ringOffset?: number;
62
+ /**
63
+ * How far a bare ring stands off its prose: one distance, or one across
64
+ * and one above and below. Only content outside the grid may go wider
65
+ * than the grid's own.
66
+ */
67
+ ringOffset?: number | {
68
+ x: number;
69
+ y: number;
70
+ };
64
71
  }) => SystemStyleObject<Theme>;
65
72
  /**
66
73
  * No host-supplied tile: say what this one will run, so the surface is still
@@ -1,4 +1,4 @@
1
- import { ReportLayout } from '../Package/documentLocation';
1
+ import { RestoredDraft } from './useReportDraft';
2
2
  /**
3
3
  * The builder's page-level controls, as state and actions rather than as a
4
4
  * toolbar, so a host can put each one where its own chrome has room: in its
@@ -20,11 +20,6 @@ export interface BuilderControls {
20
20
  undo: () => void;
21
21
  canRedo: boolean;
22
22
  redo: () => void;
23
- /** The layout and its switch. Absent when the layout cannot be changed here. */
24
- layout?: {
25
- value: ReportLayout;
26
- set: (layout: ReportLayout) => void;
27
- };
28
23
  /** What can be added to the page. A missing entry is not offered. */
29
24
  add: {
30
25
  /** Open the picker of views for a query tile. */
@@ -48,6 +43,19 @@ export interface BuilderControls {
48
43
  draftKeptAt?: number;
49
44
  /** Put the report back to the file's, as one undoable edit, and drop the draft. Absent with nothing to discard. */
50
45
  discard?: () => void;
46
+ /**
47
+ * Edits kept in this browser that the builder found on opening. Not
48
+ * `pending`: they were put back, which is news for the save status (the
49
+ * SDK's says when they are from in its menu) until `dismissRestored`, or
50
+ * the next edit. `pending`: the report changed since they were kept, so
51
+ * they are offered, not applied; the page asks the author to choose, and
52
+ * `restore` and `discard` are the two answers.
53
+ */
54
+ restored?: RestoredDraft;
55
+ /** Apply an offered (stale) draft, replacing the current version. Present while `restored.pending`. */
56
+ restore?: () => void;
57
+ /** The author has seen the restored edits: `restored` goes. Present while `restored` is, and not pending. */
58
+ dismissRestored?: () => void;
51
59
  }
52
60
  /** What a host passes to take over the builder's page-level controls. */
53
61
  export type BuilderControlsHandler = (controls: BuilderControls | undefined) => void;
@@ -76,7 +76,7 @@ export declare function useBuilderSession<D, L extends LastSave & {
76
76
  undoSave: () => Promise<void> | void;
77
77
  canUndoSave: boolean;
78
78
  lastSave: L;
79
- toolbarProps: Pick<BuilderToolbarProps, "onExit" | "onSave" | "dirty" | "canUndo" | "canRedo" | "onUndo" | "onRedo" | "saving" | "saveButton">;
79
+ toolbarProps: Pick<BuilderToolbarProps, "onExit" | "onSave" | "dirty" | "saving" | "canUndo" | "canRedo" | "onUndo" | "onRedo" | "saveButton">;
80
80
  done?: () => void;
81
81
  saving: boolean;
82
82
  save: () => Promise<void> | void;
@@ -3,7 +3,11 @@ import { ReportEditorHandle } from './useReportEditor';
3
3
  export declare const draftStore: {
4
4
  storage: () => Storage;
5
5
  };
6
- /** What the builder found on opening, for the notice that says so. */
6
+ /**
7
+ * What the builder found on opening. A draft put back is said in the save
8
+ * status (its menu names when the edits are from) until the author has seen it
9
+ * or edits again; a stale one is a choice the page asks for.
10
+ */
7
11
  export interface RestoredDraft {
8
12
  savedAt: number;
9
13
  /**
@@ -54,7 +58,7 @@ export declare function useReportDraft(key: string | undefined, editor: ReportEd
54
58
  opened: string): {
55
59
  /** When unsaved edits were last kept in this browser; undefined when none are. */
56
60
  keptAt: number | undefined;
57
- /** The draft the builder opened with, until the notice is dismissed. */
61
+ /** The draft the builder opened with: until it is seen, or edited over; a stale one until the author chooses. */
58
62
  restored: RestoredDraft | undefined;
59
63
  dismissRestored: () => void;
60
64
  /** Put the document back to the file's, as one undoable edit; the draft goes with the edits. */
@@ -1,5 +1,7 @@
1
1
  import { Given } from '../../client';
2
2
  import { GivenValue } from '../../hooks/givenValue';
3
+ import { OptionSearch } from '../../hooks/useSuggestOptions';
4
+ import { OptionSearchState } from './useOptionSearch';
3
5
  export interface GivenInputProps {
4
6
  /**
5
7
  * The declaration, which carries its own presentation (`label`, `control`,
@@ -28,6 +30,16 @@ export interface GivenInputProps {
28
30
  * Free text still works, so the control degrades rather than locking up.
29
31
  */
30
32
  optionsFailed?: boolean;
33
+ /**
34
+ * The option list was cut off: more values exist than `options` holds. The
35
+ * dropdown says so, since a value missing from it may still be in the data.
36
+ */
37
+ optionsTruncated?: boolean;
38
+ /**
39
+ * Search the whole dimension on the server as the reader types, for a list
40
+ * that was cut off. Absent, typing filters `options` in the browser.
41
+ */
42
+ optionSearch?: OptionSearch;
31
43
  }
32
44
  /**
33
45
  * Renders an input widget appropriate for the declared given type.
@@ -49,4 +61,9 @@ export interface GivenInputProps {
49
61
  * `Default: …` helper line on every widget — including the boolean checkbox,
50
62
  * which gets a wrapping FormControl for the slot.
51
63
  */
52
- export declare function GivenInput({ given, value, onChange, options, optionsLoading, optionsFailed, }: GivenInputProps): import("react/jsx-runtime").JSX.Element;
64
+ export declare function GivenInput({ given, value, onChange, options, optionsLoading, optionsFailed, optionsTruncated, optionSearch, }: GivenInputProps): import("react/jsx-runtime").JSX.Element;
65
+ /**
66
+ * What the dropdown says about its options, if anything. Only a cut-off list
67
+ * has something to say: a whole list needs no footnote.
68
+ */
69
+ export declare function optionHint(search: OptionSearchState, truncated: boolean | undefined, searchable: OptionSearch | undefined): string | undefined;
@@ -1,5 +1,6 @@
1
1
  import { Given } from '../../client';
2
2
  import { GivenValue } from '../../hooks/givenValue';
3
+ import { OptionSearch } from '../../hooks/useSuggestOptions';
3
4
  /**
4
5
  * How the control row is laid out.
5
6
  *
@@ -17,12 +18,22 @@ export interface GivensPanelProps {
17
18
  values: Map<string, GivenValue>;
18
19
  onChange: (name: string, value: GivenValue) => void;
19
20
  onReset: () => void;
21
+ /**
22
+ * Whether Reset would change anything: the controls differ from where the
23
+ * document starts them (`useGivensState`'s `atStart`). Absent, Reset is
24
+ * offered whenever a value is set, as before.
25
+ */
26
+ canReset?: boolean;
20
27
  layout?: GivensLayout;
21
28
  /** Resolved `suggest` options per given name. */
22
29
  options?: Map<string, string[]>;
23
30
  optionsLoading?: boolean;
24
31
  /** Givens whose `suggest` query failed, from `useSuggestOptions.failed`. */
25
32
  optionsFailed?: ReadonlySet<string>;
33
+ /** Givens whose option list was cut off, from `useSuggestOptions.truncated`. */
34
+ optionsTruncated?: ReadonlySet<string>;
35
+ /** Server search for a cut-off list, per given, from `useSuggestOptions.search`. */
36
+ optionSearch?: ReadonlyMap<string, OptionSearch>;
26
37
  /**
27
38
  * Set to render an Apply button, for `autorun=false`. Absent means controls
28
39
  * take effect as they change, which is the default everywhere.
@@ -45,4 +56,4 @@ export interface GivensPanelProps {
45
56
  * puts the document's starting values back rather than emptying the row, so the
46
57
  * button and the state agree on what "Reset" means.
47
58
  */
48
- export declare function GivensPanel({ givens, values, onChange, onReset, layout, options, optionsLoading, optionsFailed, apply, title, }: GivensPanelProps): import("react/jsx-runtime").JSX.Element;
59
+ export declare function GivensPanel({ givens, values, onChange, onReset, canReset, layout, options, optionsLoading, optionsFailed, optionsTruncated, optionSearch, apply, title, }: GivensPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { OptionPage, OptionSearch } from '../../hooks/useSuggestOptions';
2
+ /** How long typing has to pause before the server is asked. */
3
+ export declare const OPTION_SEARCH_DEBOUNCE_MS = 250;
4
+ export interface OptionSearchState {
5
+ /** Text is typed and the list is cut off, so what is offered comes from the server. */
6
+ active: boolean;
7
+ /** Waiting on the server for the text as it is now: still debouncing, or in flight. */
8
+ searching: boolean;
9
+ /** The server's answer for exactly the text as it is now. Undefined until it has one. */
10
+ page: OptionPage | undefined;
11
+ /** The search for the text as it is now failed. */
12
+ failed: boolean;
13
+ }
14
+ /**
15
+ * Search a cut-off option list on the server as the reader types.
16
+ *
17
+ * Without `search` (a list that was not cut off, or a named query that cannot
18
+ * be searched) this is inert and sends nothing: the picker filters the list it
19
+ * has in the browser, as before.
20
+ *
21
+ * Each search is cached under the suggest's key plus the text, in the page's
22
+ * query client, so typing back to an earlier text reuses its answer. An answer
23
+ * is shown only for the text it was asked for: one arriving after the reader
24
+ * has typed on is dropped, never shown over the newer text's.
25
+ *
26
+ * Reads the query client from context rather than requiring one: a picker
27
+ * rendered outside a provider (a test, a host without react-query) has no
28
+ * cache, and gets no server search rather than an error.
29
+ */
30
+ export declare function useOptionSearch(search: OptionSearch | undefined, typed: string): OptionSearchState;
@@ -5,7 +5,7 @@ export { useDimensionalFilterRangeData, getDimensionKey, type DimensionalFilterR
5
5
  export { useModelGivens } from './useModelGivens';
6
6
  export { type GivenValue } from './givenValue';
7
7
  export { useGivensState, type UseGivensStateOptions, type UseGivensStateResult, } from './useGivensState';
8
- export { useSuggestOptions } from './useSuggestOptions';
8
+ export { type OptionPage, type OptionSearch, useSuggestOptions, } from './useSuggestOptions';
9
9
  export { useCompiledDocument, type CompiledDocumentSpec, } from './useCompiledDocument';
10
10
  export { queryResultKey, useQueryResult, type QueryRequestSpec, type QueryResultState, } from './useQueryResult';
11
11
  export { useDocumentControls, type DocumentControls, type UseDocumentControlsOptions, } from './useDocumentControls';
@@ -2,6 +2,7 @@ import { Given } from '../client';
2
2
  import { HostGivenValue } from './givenValue';
3
3
  import { GivensPanelProps } from '../components/given/GivensPanel';
4
4
  import { UseGivensStateResult } from './useGivensState';
5
+ import { OptionSearch } from './useSuggestOptions';
5
6
  /**
6
7
  * Everything a document's control row needs, from what the document declares.
7
8
  *
@@ -65,6 +66,10 @@ export interface DocumentControls extends UseGivensStateResult {
65
66
  options: Map<string, string[]>;
66
67
  optionsLoading: boolean;
67
68
  optionsFailed: ReadonlySet<string>;
69
+ /** Givens whose option list was cut off; see `useSuggestOptions`. */
70
+ optionsTruncated: ReadonlySet<string>;
71
+ /** Server search for a truncated list, per given. */
72
+ optionSearch: ReadonlyMap<string, OptionSearch>;
68
73
  /** For `useDrill`: whether a `to=self` on this given can be honoured. */
69
74
  canSelf: (given: string) => boolean;
70
75
  /** For `useDrill`: set the given to the clicked value, encoded for its type. */
@@ -60,5 +60,12 @@ export interface UseGivensStateResult {
60
60
  apply: () => void;
61
61
  /** Whether the draft differs from what is applied. */
62
62
  pending: boolean;
63
+ /**
64
+ * Whether the controls, shown and applied, are already where Reset would
65
+ * put them. A surface offers Reset only when this is false: a report that
66
+ * saves a starting value showed Reset beside it, and pressing it set the
67
+ * controls to what they already were, so the button looked broken.
68
+ */
69
+ atStart: boolean;
63
70
  }
64
71
  export declare function useGivensState({ declaredTypes, startingValues, params, onParamsChange, documentKey, autorun, }: UseGivensStateOptions): UseGivensStateResult;
@@ -7,11 +7,39 @@ import { GivenValue, HostGivenValue } from './givenValue';
7
7
  * is also 1000 but caps silently and in whatever order the warehouse returns.
8
8
  * An explicit limit with an explicit order makes a truncated list the same list
9
9
  * every time, and makes the cap something a reader of this file can see.
10
- * A dimension with more distinct values than this needs a hand-written
11
- * `suggest { query=… }`: a picker over thousands of options is the wrong
12
- * control anyway.
10
+ * The query asks for one row more than this, so a list that was cut off is
11
+ * known to be (`truncated`), not guessed from a count that happens to land on
12
+ * the limit. Past the limit, typing in the picker searches the whole dimension
13
+ * on the server instead of filtering the first thousand: see
14
+ * {@link OptionSearch}.
13
15
  */
14
16
  export declare const SUGGEST_OPTION_LIMIT = 1000;
17
+ /** How many matches a search of the server returns: enough to scan, and the hint says to keep typing past it. */
18
+ export declare const SUGGEST_SEARCH_LIMIT = 200;
19
+ /** One fetch of options: the values, and whether there were more than it holds. */
20
+ export interface OptionPage {
21
+ values: string[];
22
+ /** More rows matched than the page holds, so values past it are not offered. */
23
+ truncated: boolean;
24
+ }
25
+ /**
26
+ * Search a truncated option list on the server: for a control whose suggest
27
+ * came back cut off at {@link SUGGEST_OPTION_LIMIT}, so filtering in the
28
+ * browser would only ever find values in the first thousand.
29
+ *
30
+ * `key` identifies the suggest (its report, version, source, dimension, the
31
+ * givens it carries and a text source's definitions); a caller caches each
32
+ * search under it plus the text searched for. `run` sends the same suggest with
33
+ * a case-insensitive "contains" on the dimension.
34
+ *
35
+ * Only a suggest over a dimension has one: a named `suggest { query=… }` is a
36
+ * whole query, with nowhere to add a condition, so its list is filtered in the
37
+ * browser and says it was cut off.
38
+ */
39
+ export interface OptionSearch {
40
+ key: readonly unknown[];
41
+ run: (text: string, signal?: AbortSignal) => Promise<OptionPage>;
42
+ }
15
43
  /**
16
44
  * The query a `suggest { source=… dimension=… }` runs.
17
45
  *
@@ -20,7 +48,17 @@ export declare const SUGGEST_OPTION_LIMIT = 1000;
20
48
  * itself, and this text has already been wrong once: `order_by` takes an output
21
49
  * field name, not a path, so a joined dimension failed the query outright.
22
50
  */
23
- export declare function buildSuggestQuery(source: string, dimension: string): string;
51
+ export declare function buildSuggestQuery(source: string, dimension: string,
52
+ /** Text the values must contain, ignoring case: a search of a truncated list. */
53
+ search?: string): string;
54
+ /**
55
+ * Text as a Malloy string literal, whatever it holds: a backslash and a
56
+ * single quote escaped, in that order, so neither can end the literal early.
57
+ * Control characters are dropped: a search box has no use for them, and a raw
58
+ * newline is not legal inside a literal. Nothing else is special inside
59
+ * single quotes, so `%`, `_`, `{`, `$` and the rest stay literal text.
60
+ */
61
+ export declare function malloyStringLiteral(text: string): string;
24
62
  /**
25
63
  * Resolve the option lists behind `select` / `multiselect` controls.
26
64
  *
@@ -84,7 +122,25 @@ preamble?: string): {
84
122
  * an empty picker has no way to tell which they are looking at.
85
123
  */
86
124
  failed: Set<string>;
125
+ /**
126
+ * Givens whose list was cut off: more values exist than were fetched. For
127
+ * a suggest over a dimension, `search` can find the rest; for a named
128
+ * query it cannot, and the picker says the list is partial.
129
+ */
130
+ truncated: Set<string>;
131
+ /** Server search, per given, for a truncated suggest over a dimension. */
132
+ search: Map<string, OptionSearch>;
87
133
  };
134
+ /**
135
+ * One fetch's options and whether it was cut off. `limit` is what the page
136
+ * holds; a generated query asked for one row more, so a row past it means
137
+ * more exist. `cutOffAt` instead marks a page as cut off once it reaches that
138
+ * many rows, for a named query whose own limit is unknown.
139
+ */
140
+ export declare function readOptionPage(result: string | undefined, dimension: string | undefined, { limit, cutOffAt }: {
141
+ limit: number;
142
+ cutOffAt?: number;
143
+ }): OptionPage;
88
144
  /**
89
145
  * Pull the option strings out of a compact-JSON result.
90
146
  *