@elaraai/e3-ui-components 1.0.83 → 1.0.85
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/README.md +113 -6
- package/dist/components/DataTaskPreview.d.ts +35 -1
- package/dist/components/DataTaskPreview.d.ts.map +1 -1
- package/dist/components/DatasetPreview.d.ts +16 -0
- package/dist/components/DatasetPreview.d.ts.map +1 -1
- package/dist/components/InputPreview.d.ts +12 -0
- package/dist/components/InputPreview.d.ts.map +1 -1
- package/dist/components/PagedDatasetPreview.d.ts +15 -0
- package/dist/components/PagedDatasetPreview.d.ts.map +1 -1
- package/dist/components/TaskLogs.d.ts +19 -0
- package/dist/components/TaskLogs.d.ts.map +1 -1
- package/dist/components/TaskPreview.d.ts +24 -0
- package/dist/components/TaskPreview.d.ts.map +1 -1
- package/dist/components/UITaskPreview.d.ts +4 -1
- package/dist/components/UITaskPreview.d.ts.map +1 -1
- package/dist/components/VirtualizedLogViewer.d.ts +29 -1
- package/dist/components/VirtualizedLogViewer.d.ts.map +1 -1
- package/dist/components/controlled-search.d.ts +22 -0
- package/dist/components/controlled-search.d.ts.map +1 -0
- package/dist/components/preview-controls.d.ts +73 -0
- package/dist/components/preview-controls.d.ts.map +1 -0
- package/dist/diff/index.d.ts.map +1 -1
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/hooks/executions.d.ts +17 -0
- package/dist/hooks/executions.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useDatasetValue.d.ts +19 -1
- package/dist/hooks/useDatasetValue.d.ts.map +1 -1
- package/dist/hooks/useTaskLogsHook.d.ts +67 -3
- package/dist/hooks/useTaskLogsHook.d.ts.map +1 -1
- package/dist/in-memory-call-7_3frW52.js +615 -0
- package/dist/in-memory-call-7_3frW52.js.map +1 -0
- package/dist/in-memory-call-_r5DJotS.cjs +614 -0
- package/dist/in-memory-call-_r5DJotS.cjs.map +1 -0
- package/dist/index.cjs +25860 -5731
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28383 -8253
- package/dist/index.js.map +1 -1
- package/dist/platform/bind-runtime.d.ts +18 -3
- package/dist/platform/bind-runtime.d.ts.map +1 -1
- package/dist/platform/dataset-hooks.d.ts +15 -3
- package/dist/platform/dataset-hooks.d.ts.map +1 -1
- package/dist/platform/dataset-store.d.ts +35 -7
- package/dist/platform/dataset-store.d.ts.map +1 -1
- package/dist/platform/e3-config.d.ts +26 -2
- package/dist/platform/e3-config.d.ts.map +1 -1
- package/dist/platform/func-runtime.d.ts +11 -5
- package/dist/platform/func-runtime.d.ts.map +1 -1
- package/dist/platform/index.d.ts +2 -2
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/paged-runtime.d.ts +46 -9
- package/dist/platform/paged-runtime.d.ts.map +1 -1
- package/dist/platform/record-runtime.d.ts +45 -7
- package/dist/platform/record-runtime.d.ts.map +1 -1
- package/dist/platform/recovery.d.ts +44 -0
- package/dist/platform/recovery.d.ts.map +1 -0
- package/dist/platform/staged-store.d.ts +16 -0
- package/dist/platform/staged-store.d.ts.map +1 -1
- package/dist/platform/tracked-channel.d.ts +12 -0
- package/dist/platform/tracked-channel.d.ts.map +1 -1
- package/dist/query/about.d.ts +50 -0
- package/dist/query/about.d.ts.map +1 -0
- package/dist/query/autocomplete.d.ts +112 -0
- package/dist/query/autocomplete.d.ts.map +1 -0
- package/dist/query/builder.d.ts +29 -0
- package/dist/query/builder.d.ts.map +1 -0
- package/dist/query/calls.d.ts +46 -0
- package/dist/query/calls.d.ts.map +1 -0
- package/dist/query/datasets-tab.d.ts +52 -0
- package/dist/query/datasets-tab.d.ts.map +1 -0
- package/dist/query/downloads.d.ts +29 -0
- package/dist/query/downloads.d.ts.map +1 -0
- package/dist/query/drops.d.ts +28 -0
- package/dist/query/drops.d.ts.map +1 -0
- package/dist/query/foot.d.ts +22 -0
- package/dist/query/foot.d.ts.map +1 -0
- package/dist/query/hooks.d.ts +265 -0
- package/dist/query/hooks.d.ts.map +1 -0
- package/dist/query/in-memory-call.d.ts +150 -0
- package/dist/query/in-memory-call.d.ts.map +1 -0
- package/dist/query/jq-editor.d.ts +34 -0
- package/dist/query/jq-editor.d.ts.map +1 -0
- package/dist/query/library-tab.d.ts +33 -0
- package/dist/query/library-tab.d.ts.map +1 -0
- package/dist/query/library.d.ts +20 -0
- package/dist/query/library.d.ts.map +1 -0
- package/dist/query/model/cards.d.ts +179 -0
- package/dist/query/model/cards.d.ts.map +1 -0
- package/dist/query/model/index.d.ts +19 -0
- package/dist/query/model/index.d.ts.map +1 -0
- package/dist/query/model/messages.d.ts +1253 -0
- package/dist/query/model/messages.d.ts.map +1 -0
- package/dist/query/model/refs.d.ts +92 -0
- package/dist/query/model/refs.d.ts.map +1 -0
- package/dist/query/model/slots.d.ts +213 -0
- package/dist/query/model/slots.d.ts.map +1 -0
- package/dist/query/model/summaries.d.ts +104 -0
- package/dist/query/model/summaries.d.ts.map +1 -0
- package/dist/query/model/words.d.ts +331 -0
- package/dist/query/model/words.d.ts.map +1 -0
- package/dist/query/one-shot.d.ts +266 -0
- package/dist/query/one-shot.d.ts.map +1 -0
- package/dist/query/open-query.d.ts +214 -0
- package/dist/query/open-query.d.ts.map +1 -0
- package/dist/query/parts.d.ts +115 -0
- package/dist/query/parts.d.ts.map +1 -0
- package/dist/query/plan-popover.d.ts +22 -0
- package/dist/query/plan-popover.d.ts.map +1 -0
- package/dist/query/plan.d.ts +353 -0
- package/dist/query/plan.d.ts.map +1 -0
- package/dist/query/query-east.d.ts +21 -0
- package/dist/query/query-east.d.ts.map +1 -0
- package/dist/query/query-tab.d.ts +21 -0
- package/dist/query/query-tab.d.ts.map +1 -0
- package/dist/query/results-table.d.ts +153 -0
- package/dist/query/results-table.d.ts.map +1 -0
- package/dist/query/results.d.ts +137 -0
- package/dist/query/results.d.ts.map +1 -0
- package/dist/query/run.d.ts +199 -0
- package/dist/query/run.d.ts.map +1 -0
- package/dist/query/save-popover.d.ts +29 -0
- package/dist/query/save-popover.d.ts.map +1 -0
- package/dist/query/session.d.ts +409 -0
- package/dist/query/session.d.ts.map +1 -0
- package/dist/query/shape-line.d.ts +21 -0
- package/dist/query/shape-line.d.ts.map +1 -0
- package/dist/query/source.d.ts +21 -0
- package/dist/query/source.d.ts.map +1 -0
- package/dist/query/status-line.d.ts +48 -0
- package/dist/query/status-line.d.ts.map +1 -0
- package/dist/query/step-card.d.ts +30 -0
- package/dist/query/step-card.d.ts.map +1 -0
- package/dist/query/steps/check.d.ts +162 -0
- package/dist/query/steps/check.d.ts.map +1 -0
- package/dist/query/steps/count.d.ts +49 -0
- package/dist/query/steps/count.d.ts.map +1 -0
- package/dist/query/steps/edit.d.ts +108 -0
- package/dist/query/steps/edit.d.ts.map +1 -0
- package/dist/query/steps/fields.d.ts +101 -0
- package/dist/query/steps/fields.d.ts.map +1 -0
- package/dist/query/steps/index.d.ts +22 -0
- package/dist/query/steps/index.d.ts.map +1 -0
- package/dist/query/steps/jq.d.ts +188 -0
- package/dist/query/steps/jq.d.ts.map +1 -0
- package/dist/query/steps/parse.d.ts +38 -0
- package/dist/query/steps/parse.d.ts.map +1 -0
- package/dist/query/steps/print.d.ts +195 -0
- package/dist/query/steps/print.d.ts.map +1 -0
- package/dist/query/steps/shape.d.ts +90 -0
- package/dist/query/steps/shape.d.ts.map +1 -0
- package/dist/query/steps/values.d.ts +85 -0
- package/dist/query/steps/values.d.ts.map +1 -0
- package/dist/query/toolbar.d.ts +56 -0
- package/dist/query/toolbar.d.ts.map +1 -0
- package/dist/query/use-query-editor.d.ts +153 -0
- package/dist/query/use-query-editor.d.ts.map +1 -0
- package/dist/query/use-query-session.d.ts +55 -0
- package/dist/query/use-query-session.d.ts.map +1 -0
- package/dist/query/words.d.ts +60 -0
- package/dist/query/words.d.ts.map +1 -0
- package/dist/query.cjs +16 -0
- package/dist/query.cjs.map +1 -0
- package/dist/query.js +16 -0
- package/dist/query.js.map +1 -0
- package/dist/shared/name-popover.d.ts +38 -0
- package/dist/shared/name-popover.d.ts.map +1 -0
- package/dist/studio/builder.d.ts +20 -0
- package/dist/studio/builder.d.ts.map +1 -0
- package/dist/studio/inspector.d.ts +18 -0
- package/dist/studio/inspector.d.ts.map +1 -0
- package/dist/studio/library.d.ts +20 -0
- package/dist/studio/library.d.ts.map +1 -0
- package/dist/studio/messages.d.ts +318 -0
- package/dist/studio/messages.d.ts.map +1 -0
- package/dist/studio/open-page.d.ts +13 -0
- package/dist/studio/open-page.d.ts.map +1 -0
- package/dist/studio/page.d.ts +61 -0
- package/dist/studio/page.d.ts.map +1 -0
- package/dist/studio/palette.d.ts +41 -0
- package/dist/studio/palette.d.ts.map +1 -0
- package/dist/studio/publish.d.ts +21 -0
- package/dist/studio/publish.d.ts.map +1 -0
- package/dist/studio/save-template.d.ts +18 -0
- package/dist/studio/save-template.d.ts.map +1 -0
- package/dist/studio/studio-east.d.ts +45 -0
- package/dist/studio/studio-east.d.ts.map +1 -0
- package/package.json +19 -14
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { ArrayType, OptionType, StringType, StructType, VariantType, EastType, ValueTypeOf, option } from '@elaraai/east';
|
|
2
|
+
import { Editing } from '@elaraai/east-ui/internal';
|
|
3
|
+
import { SavedQueriesType, SavedQueryType, QueriesHandleType } from '@elaraai/e3-ui/internal';
|
|
4
|
+
import { BatchReadiness, EditSession, EntryVersion, Origin, UIStoreInterface } from '@elaraai/east-ui-components';
|
|
5
|
+
import { CheckedSteps } from './steps/check.js';
|
|
6
|
+
import { Step, StepQuery } from './steps/values.js';
|
|
7
|
+
import { SavedOffer } from './model/slots.js';
|
|
8
|
+
import { QueryWords } from './model/words.js';
|
|
9
|
+
import { QueryRoot } from './one-shot.js';
|
|
10
|
+
import { QueryOpen } from './open-query.js';
|
|
11
|
+
/** The header entry's id. */
|
|
12
|
+
export declare const QUERY_HEADER_ID = "$query";
|
|
13
|
+
/**
|
|
14
|
+
* A query's header, as its editing session drafts it.
|
|
15
|
+
*
|
|
16
|
+
* @property id - Always {@link QUERY_HEADER_ID}
|
|
17
|
+
* @property name - Its name: its key in the saved queries, once saved
|
|
18
|
+
* @property description - Its description; `none` shows the generated sentence
|
|
19
|
+
* @property source - The data source its steps start from
|
|
20
|
+
* @property jq - The program as jq, when it is not steps — a program that
|
|
21
|
+
* does not start from a data source; its steps are then empty
|
|
22
|
+
*/
|
|
23
|
+
export declare const QueryHeaderType: StructType<{
|
|
24
|
+
readonly id: StringType;
|
|
25
|
+
readonly name: StringType;
|
|
26
|
+
readonly description: OptionType<StringType>;
|
|
27
|
+
readonly source: StringType;
|
|
28
|
+
readonly jq: OptionType<StringType>;
|
|
29
|
+
}>;
|
|
30
|
+
/** A query's header. */
|
|
31
|
+
export type QueryHeader = ValueTypeOf<typeof QueryHeaderType>;
|
|
32
|
+
/**
|
|
33
|
+
* One entry of a query's editing session.
|
|
34
|
+
*
|
|
35
|
+
* @property header - Its header
|
|
36
|
+
* @property step - One of its steps
|
|
37
|
+
*/
|
|
38
|
+
export declare const QueryEntryType: VariantType<{
|
|
39
|
+
readonly header: StructType<{
|
|
40
|
+
readonly id: StringType;
|
|
41
|
+
readonly name: StringType;
|
|
42
|
+
readonly description: OptionType<StringType>;
|
|
43
|
+
readonly source: StringType;
|
|
44
|
+
readonly jq: OptionType<StringType>;
|
|
45
|
+
}>;
|
|
46
|
+
readonly step: VariantType<{
|
|
47
|
+
readonly filter: StructType<{
|
|
48
|
+
readonly id: StringType;
|
|
49
|
+
readonly match: VariantType<{
|
|
50
|
+
readonly all: import('@elaraai/east').NullType;
|
|
51
|
+
readonly any: import('@elaraai/east').NullType;
|
|
52
|
+
}>;
|
|
53
|
+
readonly conds: ArrayType<import('@elaraai/east').RecursiveType<VariantType<{
|
|
54
|
+
readonly test: StructType<{
|
|
55
|
+
readonly id: StringType;
|
|
56
|
+
readonly field: OptionType<StringType>;
|
|
57
|
+
readonly cmp: OptionType<VariantType<{
|
|
58
|
+
readonly eq: import('@elaraai/east').NullType;
|
|
59
|
+
readonly ne: import('@elaraai/east').NullType;
|
|
60
|
+
readonly ge: import('@elaraai/east').NullType;
|
|
61
|
+
readonly le: import('@elaraai/east').NullType;
|
|
62
|
+
readonly gt: import('@elaraai/east').NullType;
|
|
63
|
+
readonly lt: import('@elaraai/east').NullType;
|
|
64
|
+
readonly contains: import('@elaraai/east').NullType;
|
|
65
|
+
readonly startsWith: import('@elaraai/east').NullType;
|
|
66
|
+
readonly missing: import('@elaraai/east').NullType;
|
|
67
|
+
readonly present: import('@elaraai/east').NullType;
|
|
68
|
+
readonly yes: import('@elaraai/east').NullType;
|
|
69
|
+
readonly no: import('@elaraai/east').NullType;
|
|
70
|
+
readonly inYear: import('@elaraai/east').NullType;
|
|
71
|
+
readonly inMonth: import('@elaraai/east').NullType;
|
|
72
|
+
readonly onOrAfter: import('@elaraai/east').NullType;
|
|
73
|
+
readonly before: import('@elaraai/east').NullType;
|
|
74
|
+
readonly lengthAtLeast: import('@elaraai/east').NullType;
|
|
75
|
+
readonly anyWhere: import('@elaraai/east').NullType;
|
|
76
|
+
}>>;
|
|
77
|
+
readonly value: OptionType<VariantType<{
|
|
78
|
+
readonly text: StringType;
|
|
79
|
+
readonly number: import('@elaraai/east').FloatType;
|
|
80
|
+
readonly boolean: import('@elaraai/east').BooleanType;
|
|
81
|
+
readonly null: import('@elaraai/east').NullType;
|
|
82
|
+
}>>;
|
|
83
|
+
readonly inner: OptionType<import('@elaraai/east').RecursiveTypeMarker>;
|
|
84
|
+
readonly whole: import('@elaraai/east').BooleanType;
|
|
85
|
+
}>;
|
|
86
|
+
readonly group: StructType<{
|
|
87
|
+
readonly id: StringType;
|
|
88
|
+
readonly match: VariantType<{
|
|
89
|
+
readonly all: import('@elaraai/east').NullType;
|
|
90
|
+
readonly any: import('@elaraai/east').NullType;
|
|
91
|
+
}>;
|
|
92
|
+
readonly conds: ArrayType<import('@elaraai/east').RecursiveTypeMarker>;
|
|
93
|
+
}>;
|
|
94
|
+
}>>>;
|
|
95
|
+
}>;
|
|
96
|
+
readonly lookup: StructType<{
|
|
97
|
+
readonly id: StringType;
|
|
98
|
+
readonly dataset: OptionType<StringType>;
|
|
99
|
+
readonly key: OptionType<StringType>;
|
|
100
|
+
readonly fields: ArrayType<StringType>;
|
|
101
|
+
}>;
|
|
102
|
+
readonly group: StructType<{
|
|
103
|
+
readonly id: StringType;
|
|
104
|
+
readonly by: OptionType<VariantType<{
|
|
105
|
+
readonly field: StringType;
|
|
106
|
+
readonly all: import('@elaraai/east').NullType;
|
|
107
|
+
}>>;
|
|
108
|
+
readonly aggs: ArrayType<StructType<{
|
|
109
|
+
readonly id: StringType;
|
|
110
|
+
readonly fn: VariantType<{
|
|
111
|
+
readonly count: import('@elaraai/east').NullType;
|
|
112
|
+
readonly sum: import('@elaraai/east').NullType;
|
|
113
|
+
readonly mean: import('@elaraai/east').NullType;
|
|
114
|
+
readonly min: import('@elaraai/east').NullType;
|
|
115
|
+
readonly max: import('@elaraai/east').NullType;
|
|
116
|
+
readonly distinct: import('@elaraai/east').NullType;
|
|
117
|
+
}>;
|
|
118
|
+
readonly field: OptionType<StringType>;
|
|
119
|
+
readonly as: StringType;
|
|
120
|
+
}>>;
|
|
121
|
+
}>;
|
|
122
|
+
readonly sort: StructType<{
|
|
123
|
+
readonly id: StringType;
|
|
124
|
+
readonly field: OptionType<StringType>;
|
|
125
|
+
readonly dir: VariantType<{
|
|
126
|
+
readonly asc: import('@elaraai/east').NullType;
|
|
127
|
+
readonly desc: import('@elaraai/east').NullType;
|
|
128
|
+
}>;
|
|
129
|
+
}>;
|
|
130
|
+
readonly limit: StructType<{
|
|
131
|
+
readonly id: StringType;
|
|
132
|
+
readonly n: VariantType<{
|
|
133
|
+
readonly number: import('@elaraai/east').FloatType;
|
|
134
|
+
readonly text: StringType;
|
|
135
|
+
}>;
|
|
136
|
+
}>;
|
|
137
|
+
readonly count: StructType<{
|
|
138
|
+
readonly id: StringType;
|
|
139
|
+
}>;
|
|
140
|
+
readonly pick: StructType<{
|
|
141
|
+
readonly id: StringType;
|
|
142
|
+
readonly fields: ArrayType<StructType<{
|
|
143
|
+
readonly id: StringType;
|
|
144
|
+
readonly field: OptionType<StringType>;
|
|
145
|
+
readonly as: StringType;
|
|
146
|
+
}>>;
|
|
147
|
+
}>;
|
|
148
|
+
readonly fill: StructType<{
|
|
149
|
+
readonly id: StringType;
|
|
150
|
+
readonly field: OptionType<StringType>;
|
|
151
|
+
readonly value: OptionType<VariantType<{
|
|
152
|
+
readonly text: StringType;
|
|
153
|
+
readonly number: import('@elaraai/east').FloatType;
|
|
154
|
+
readonly boolean: import('@elaraai/east').BooleanType;
|
|
155
|
+
readonly null: import('@elaraai/east').NullType;
|
|
156
|
+
}>>;
|
|
157
|
+
}>;
|
|
158
|
+
readonly drill: StructType<{
|
|
159
|
+
readonly id: StringType;
|
|
160
|
+
readonly field: OptionType<StringType>;
|
|
161
|
+
}>;
|
|
162
|
+
readonly datepart: StructType<{
|
|
163
|
+
readonly id: StringType;
|
|
164
|
+
readonly field: OptionType<StringType>;
|
|
165
|
+
readonly part: VariantType<{
|
|
166
|
+
readonly year: import('@elaraai/east').NullType;
|
|
167
|
+
readonly month: import('@elaraai/east').NullType;
|
|
168
|
+
readonly weekday: import('@elaraai/east').NullType;
|
|
169
|
+
}>;
|
|
170
|
+
readonly as: StringType;
|
|
171
|
+
}>;
|
|
172
|
+
readonly walk: StructType<{
|
|
173
|
+
readonly id: StringType;
|
|
174
|
+
readonly via: OptionType<StringType>;
|
|
175
|
+
}>;
|
|
176
|
+
readonly tabulate: StructType<{
|
|
177
|
+
readonly id: StringType;
|
|
178
|
+
readonly over: StringType;
|
|
179
|
+
readonly from: VariantType<{
|
|
180
|
+
readonly number: import('@elaraai/east').FloatType;
|
|
181
|
+
readonly text: StringType;
|
|
182
|
+
}>;
|
|
183
|
+
readonly to: VariantType<{
|
|
184
|
+
readonly number: import('@elaraai/east').FloatType;
|
|
185
|
+
readonly text: StringType;
|
|
186
|
+
}>;
|
|
187
|
+
readonly step: VariantType<{
|
|
188
|
+
readonly number: import('@elaraai/east').FloatType;
|
|
189
|
+
readonly text: StringType;
|
|
190
|
+
}>;
|
|
191
|
+
readonly fixed: import('@elaraai/east').DictType<StringType, VariantType<{
|
|
192
|
+
readonly text: StringType;
|
|
193
|
+
readonly number: import('@elaraai/east').FloatType;
|
|
194
|
+
readonly boolean: import('@elaraai/east').BooleanType;
|
|
195
|
+
readonly null: import('@elaraai/east').NullType;
|
|
196
|
+
}>>;
|
|
197
|
+
readonly as: StringType;
|
|
198
|
+
}>;
|
|
199
|
+
readonly jq: StructType<{
|
|
200
|
+
readonly id: StringType;
|
|
201
|
+
readonly text: StringType;
|
|
202
|
+
}>;
|
|
203
|
+
}>;
|
|
204
|
+
}>;
|
|
205
|
+
/** One entry of a query's editing session. */
|
|
206
|
+
export type QueryEntry = ValueTypeOf<typeof QueryEntryType>;
|
|
207
|
+
/** The session's entry schema, as its wire names it. */
|
|
208
|
+
export declare const QUERY_ENTRY_TYPE: import('@elaraai/east').EastTypeValue;
|
|
209
|
+
/** The session's draft schema: each entry drafted whole. */
|
|
210
|
+
export declare const QUERY_DRAFT_TYPE: import('@elaraai/east').EastTypeValue;
|
|
211
|
+
/** The session's answer to a batch. */
|
|
212
|
+
type ApplyResult = ValueTypeOf<typeof Editing.Types.ApplyResult>;
|
|
213
|
+
/** A saved query. */
|
|
214
|
+
export type SavedQuery = ValueTypeOf<typeof SavedQueryType>;
|
|
215
|
+
/** The saved queries record. */
|
|
216
|
+
export type SavedQueries = ValueTypeOf<typeof SavedQueriesType>;
|
|
217
|
+
/** The bound saved queries record. */
|
|
218
|
+
export type QueriesHandle = ValueTypeOf<typeof QueriesHandleType>;
|
|
219
|
+
/**
|
|
220
|
+
* The id an entry has in the session.
|
|
221
|
+
*
|
|
222
|
+
* @param entry - The entry
|
|
223
|
+
* @returns Its id: `$query` for the header, a step's own
|
|
224
|
+
*/
|
|
225
|
+
export declare function entryId(entry: QueryEntry): string;
|
|
226
|
+
/**
|
|
227
|
+
* A query as entries: its header, then its steps.
|
|
228
|
+
*
|
|
229
|
+
* @param header - Its header
|
|
230
|
+
* @param steps - Its steps, in order
|
|
231
|
+
* @returns The entries
|
|
232
|
+
*/
|
|
233
|
+
export declare function queryEntries(header: QueryHeader, steps: readonly Step[]): QueryEntry[];
|
|
234
|
+
/**
|
|
235
|
+
* The query a session's entries make.
|
|
236
|
+
*
|
|
237
|
+
* @param entries - The entries
|
|
238
|
+
* @returns The header, and the steps as a query on its data source
|
|
239
|
+
* @throws {Error} When the entries hold no header
|
|
240
|
+
*/
|
|
241
|
+
export declare function entriesQuery(entries: readonly QueryEntry[]): {
|
|
242
|
+
header: QueryHeader;
|
|
243
|
+
query: StepQuery;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* The program a query's entries make: its jq when it is not steps, else its
|
|
247
|
+
* steps printed as canonical jq.
|
|
248
|
+
*
|
|
249
|
+
* @param header - Its header
|
|
250
|
+
* @param query - Its steps
|
|
251
|
+
* @param root - The root's type
|
|
252
|
+
* @returns The program's text
|
|
253
|
+
*/
|
|
254
|
+
export declare function queryProgram(header: QueryHeader, query: StepQuery, root: EastType): string;
|
|
255
|
+
/**
|
|
256
|
+
* What a query's session begins from: the saved entry, and its entries.
|
|
257
|
+
*
|
|
258
|
+
* @property saved - The saved query the entries are of; `undefined` for a query never saved
|
|
259
|
+
* @property entries - The header and the steps
|
|
260
|
+
*/
|
|
261
|
+
export interface QueryBase {
|
|
262
|
+
readonly saved: SavedQuery | undefined;
|
|
263
|
+
readonly entries: readonly QueryEntry[];
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* A saved query's entries: its header, and its steps parsed from its
|
|
267
|
+
* program — or, for a program that is not steps, its jq.
|
|
268
|
+
*
|
|
269
|
+
* @param saved - The saved query
|
|
270
|
+
* @param root - The root's type
|
|
271
|
+
* @returns The entries; the steps' ids are fresh
|
|
272
|
+
*/
|
|
273
|
+
export declare function savedEntries(saved: SavedQuery, root: EastType): QueryEntry[];
|
|
274
|
+
/**
|
|
275
|
+
* The base the open query's session begins from: a save it committed; else
|
|
276
|
+
* the base it was given last, while the record still holds the entry it is
|
|
277
|
+
* of; else the saved query's entries, parsed once; else a new query's header
|
|
278
|
+
* alone — or, for a new query begun as a run never saved, the run's entries,
|
|
279
|
+
* its name and description with them.
|
|
280
|
+
*
|
|
281
|
+
* @remarks
|
|
282
|
+
* A save the session committed is its base from the moment it commits, while
|
|
283
|
+
* the record has not read it back yet — the session acknowledges its own
|
|
284
|
+
* request by it, whichever comes first, its answer or the record's re-read —
|
|
285
|
+
* and its base for good once the record holds it. A record that holds another
|
|
286
|
+
* entry under its name has moved on since: the record's entry is the base
|
|
287
|
+
* again.
|
|
288
|
+
*
|
|
289
|
+
* @param store - The UI store the sessions live in
|
|
290
|
+
* @param sourceId - The open query's session's source id
|
|
291
|
+
* @param open - The open query
|
|
292
|
+
* @param record - The saved queries
|
|
293
|
+
* @param root - The root's type
|
|
294
|
+
* @param untitled - A new query's name on a data source
|
|
295
|
+
* @returns The base, or `undefined` when the open saved query is not in the record
|
|
296
|
+
*/
|
|
297
|
+
export declare function queryBase(store: UIStoreInterface, sourceId: string, open: QueryOpen, record: SavedQueries, root: EastType, untitled: (source: string) => string): QueryBase | undefined;
|
|
298
|
+
/**
|
|
299
|
+
* Remembers a save a session's Apply committed, as the base it continues
|
|
300
|
+
* from: the saved entry it wrote, and the entries it applied — for the session
|
|
301
|
+
* that applied them, and for the saved query's own, which a new query and a
|
|
302
|
+
* rename open next ({@link queryBase}).
|
|
303
|
+
*
|
|
304
|
+
* @param store - The UI store the sessions live in
|
|
305
|
+
* @param sourceIds - The source ids to remember it under
|
|
306
|
+
* @param base - The saved entry and the entries
|
|
307
|
+
*/
|
|
308
|
+
export declare function rememberSave(store: UIStoreInterface, sourceIds: readonly string[], base: QueryBase): void;
|
|
309
|
+
/**
|
|
310
|
+
* The snapshot a base is, as the session's wire carries it.
|
|
311
|
+
*
|
|
312
|
+
* @param base - The base
|
|
313
|
+
* @returns Its entries, encoded
|
|
314
|
+
*/
|
|
315
|
+
export declare function encodeBase(base: QueryBase): Uint8Array;
|
|
316
|
+
/**
|
|
317
|
+
* One entry of a base, by id, as the session's wire carries it.
|
|
318
|
+
*
|
|
319
|
+
* @param base - The base
|
|
320
|
+
* @param id - The entry's id
|
|
321
|
+
* @returns The entry, encoded, or `none` when the base has no entry of that id
|
|
322
|
+
*/
|
|
323
|
+
export declare function readBaseEntry(base: QueryBase, id: string): option<Uint8Array>;
|
|
324
|
+
/**
|
|
325
|
+
* The saved queries a builder offers to start from, as the add-step list of a
|
|
326
|
+
* query with no steps offers them (#934): each whose data sources are all
|
|
327
|
+
* bound here, by the same name and at the same path (`QueryInternal.rootBound`),
|
|
328
|
+
* with the data source its steps start from.
|
|
329
|
+
*
|
|
330
|
+
* @param record - The saved queries
|
|
331
|
+
* @param root - The root the builder's data sources make
|
|
332
|
+
* @returns The offers, in name order
|
|
333
|
+
*/
|
|
334
|
+
export declare function savedOffers(record: SavedQueries, root: QueryRoot): SavedOffer[];
|
|
335
|
+
/**
|
|
336
|
+
* Why a saved query — or a recent run — can't open here, in the builder's
|
|
337
|
+
* words (`Query Editor Spec.md` §4.10): a data source it reads that no binding
|
|
338
|
+
* here has the name of, or one bound here at another path
|
|
339
|
+
* (`QueryInternal.rootBound`).
|
|
340
|
+
*
|
|
341
|
+
* @param saved - The saved query, or the run
|
|
342
|
+
* @param root - The root the builder's data sources make
|
|
343
|
+
* @param words - The words
|
|
344
|
+
* @returns The reason — "Reads customers, which isn't here", "Reads
|
|
345
|
+
* .inputs.archive.orders, not this builder's orders" — or `undefined` when
|
|
346
|
+
* it can open
|
|
347
|
+
*/
|
|
348
|
+
export declare function rootRefusal(saved: SavedQuery, root: QueryRoot, words: QueryWords): string | undefined;
|
|
349
|
+
/**
|
|
350
|
+
* The query's problems as the session's readiness: each error an `invalid`
|
|
351
|
+
* issue, each unfinished slot an `incomplete` one, in plain words, on the step
|
|
352
|
+
* and the slot they are about.
|
|
353
|
+
*
|
|
354
|
+
* @param header - The query's header
|
|
355
|
+
* @param query - Its steps
|
|
356
|
+
* @param root - The root, or a reason it cannot be queried
|
|
357
|
+
* @param words - The words
|
|
358
|
+
* @returns The readiness, and the check it was made from
|
|
359
|
+
*/
|
|
360
|
+
export declare function queryReadiness(header: QueryHeader, query: StepQuery, root: QueryRoot | string, words: QueryWords): {
|
|
361
|
+
readiness: BatchReadiness;
|
|
362
|
+
checked: CheckedSteps | undefined;
|
|
363
|
+
};
|
|
364
|
+
/** What a query's Apply needs. */
|
|
365
|
+
export interface QueryApplyContext {
|
|
366
|
+
/** The saved queries record, bound with its patch. */
|
|
367
|
+
readonly handle: QueriesHandle;
|
|
368
|
+
/** The open query. */
|
|
369
|
+
readonly open: QueryOpen;
|
|
370
|
+
/** The base its session began from. */
|
|
371
|
+
readonly base: QueryBase;
|
|
372
|
+
/** The root. */
|
|
373
|
+
readonly root: QueryRoot;
|
|
374
|
+
/** The UI store the sessions live in. */
|
|
375
|
+
readonly store: UIStoreInterface;
|
|
376
|
+
/** The session's own source id. */
|
|
377
|
+
readonly sourceId: string;
|
|
378
|
+
/** The source id a query of a name has. */
|
|
379
|
+
readonly sourceIdOf: (name: string) => string;
|
|
380
|
+
/** What a refused write says, in the builder's words. */
|
|
381
|
+
readonly refused: (outcome: "changed" | "renamed", name: string, by: string | undefined) => string;
|
|
382
|
+
/** Told the name a commit saved the query under, once its save is remembered: the base is the save's from then on. */
|
|
383
|
+
readonly onSaved: (name: string) => void;
|
|
384
|
+
/** The clock a save is stamped with. */
|
|
385
|
+
readonly now?: () => Date;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* A query's `onApply`: the batch applied to the base, the program printed,
|
|
389
|
+
* checked and prepared over the root, and the query committed as one patch.
|
|
390
|
+
*
|
|
391
|
+
* @param ctx - The record, the open query, its base and root, and the words
|
|
392
|
+
* @returns The session's async apply, over the batch's bytes
|
|
393
|
+
*/
|
|
394
|
+
export declare function queryApply(ctx: QueryApplyContext): (bytes: Uint8Array) => Promise<ApplyResult>;
|
|
395
|
+
/**
|
|
396
|
+
* Records one gesture: the query as it was and as the gesture leaves it, as
|
|
397
|
+
* one undoable transaction of every entry it changed, added, removed or moved.
|
|
398
|
+
*
|
|
399
|
+
* @param session - The open query's session
|
|
400
|
+
* @param original - An entry's version before any draft of it
|
|
401
|
+
* @param current - The entries as the drafts stand
|
|
402
|
+
* @param next - The entries after the gesture
|
|
403
|
+
* @param origin - The gesture
|
|
404
|
+
* @param label - Its label in the history
|
|
405
|
+
* @returns Whether anything changed
|
|
406
|
+
*/
|
|
407
|
+
export declare function recordGesture(session: EditSession<QueryEntry>, original: (id: string) => EntryVersion<QueryEntry>, current: readonly QueryEntry[], next: readonly QueryEntry[], origin: Origin, label: string): boolean;
|
|
408
|
+
export {};
|
|
409
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/query/session.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACH,SAAS,EAAQ,UAAU,EAAa,UAAU,EAAE,UAAU,EAAE,WAAW,EAE3E,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,KAAK,MAAM,EAC/C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAyB,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAiB,gBAAgB,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAElH,OAAO,KAAK,EAAE,cAAc,EAAa,WAAW,EAAE,YAAY,EAAE,MAAM,EAAa,MAAM,6BAA6B,CAAC;AAC3H,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAc,KAAK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D,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,CAAC;IACnG,sHAAsH;IACtH,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,wCAAwC;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAID;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,WAAW,CAAC,CAkD9F;AA0DD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CACzB,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,EAChC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,YAAY,CAAC,UAAU,CAAC,EAClD,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,IAAI,EAAE,SAAS,UAAU,EAAE,EAC3B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACd,OAAO,CAmBT"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ShapeLine } from './model/cards.js';
|
|
2
|
+
import { PartActions, PartStyles } from './parts.js';
|
|
3
|
+
/** Props of {@link ShapeLineView}. */
|
|
4
|
+
export interface ShapeLineViewProps {
|
|
5
|
+
/** The shape. */
|
|
6
|
+
readonly shape: ShapeLine;
|
|
7
|
+
/** Where Insert adds a step: before the step at this index. */
|
|
8
|
+
readonly at: number;
|
|
9
|
+
/** The parts' styles, and the words. */
|
|
10
|
+
readonly ps: PartStyles;
|
|
11
|
+
/** What Insert asks: the add-step list, hanging from it. */
|
|
12
|
+
readonly onSlot: PartActions["onSlot"];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders the line after the source or a step — see the module docs.
|
|
16
|
+
*
|
|
17
|
+
* @param props - The shape, Insert's place, and what it asks ({@link ShapeLineViewProps})
|
|
18
|
+
* @returns The line
|
|
19
|
+
*/
|
|
20
|
+
export declare const ShapeLineView: import('react').NamedExoticComponent<ShapeLineViewProps>;
|
|
21
|
+
//# sourceMappingURL=shape-line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape-line.d.ts","sourceRoot":"","sources":["../../src/query/shape-line.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAgB,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7E,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IAC/B,iBAAiB;IACjB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;CAC1C;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,0DAmBxB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SourceCard } from './model/cards.js';
|
|
2
|
+
import { PartStyles } from './parts.js';
|
|
3
|
+
/** Props of {@link SourceCardView}. */
|
|
4
|
+
export interface SourceCardViewProps {
|
|
5
|
+
/** The card. */
|
|
6
|
+
readonly card: SourceCard;
|
|
7
|
+
/** The data source's name. */
|
|
8
|
+
readonly source: string;
|
|
9
|
+
/** The workspace it is read in, when the builder knows it. */
|
|
10
|
+
readonly workspace: string | undefined;
|
|
11
|
+
/** The parts' styles, and the words. */
|
|
12
|
+
readonly ps: PartStyles;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders the source's card — see the module docs.
|
|
16
|
+
*
|
|
17
|
+
* @param props - The card, the source, the workspace and the styles ({@link SourceCardViewProps})
|
|
18
|
+
* @returns The card
|
|
19
|
+
*/
|
|
20
|
+
export declare const SourceCardView: import('react').NamedExoticComponent<SourceCardViewProps>;
|
|
21
|
+
//# sourceMappingURL=source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/query/source.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,uCAAuC;AACvC,MAAM,WAAW,mBAAmB;IAChC,gBAAgB;IAChB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,8BAA8B;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;CAC3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,2DAYzB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/** The check, as the status line says it. */
|
|
6
|
+
export interface QueryCheckLine {
|
|
7
|
+
/** Its dot's tone. */
|
|
8
|
+
readonly tone: "success" | "warning" | "danger";
|
|
9
|
+
/** Its word: "Checks clean", "2 to finish", "1 problem". */
|
|
10
|
+
readonly word: string;
|
|
11
|
+
}
|
|
12
|
+
/** The shape the query gives, as the status line says it. */
|
|
13
|
+
export interface QueryGivesLine {
|
|
14
|
+
/** "Gives up to 10 shipped orders". */
|
|
15
|
+
readonly text: string;
|
|
16
|
+
/** Its East type and multiplicity, on hover. */
|
|
17
|
+
readonly hover: string;
|
|
18
|
+
/** Its fields: "· order, customer, total". */
|
|
19
|
+
readonly fields: string;
|
|
20
|
+
}
|
|
21
|
+
/** The save state, as the status line says it. */
|
|
22
|
+
export interface QuerySaveLine {
|
|
23
|
+
/** Saved, drafts not yet saved, or never saved. */
|
|
24
|
+
readonly state: "saved" | "unsaved" | "new";
|
|
25
|
+
/** Whether it saved just now: its dot is the success ink for a moment, then quiet. */
|
|
26
|
+
readonly fresh: boolean;
|
|
27
|
+
/** Its word. */
|
|
28
|
+
readonly word: string;
|
|
29
|
+
}
|
|
30
|
+
/** Props of {@link QueryStatusLine}. */
|
|
31
|
+
export interface QueryStatusLineProps {
|
|
32
|
+
/** The check. */
|
|
33
|
+
readonly check: QueryCheckLine;
|
|
34
|
+
/** The shape the query gives, when it is known. */
|
|
35
|
+
readonly gives: QueryGivesLine | undefined;
|
|
36
|
+
/** The save state. */
|
|
37
|
+
readonly save: QuerySaveLine;
|
|
38
|
+
/** The query's name. */
|
|
39
|
+
readonly name: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Renders the status line — see the module docs.
|
|
43
|
+
*
|
|
44
|
+
* @param props - The check, the shape, the save state and the name ({@link QueryStatusLineProps})
|
|
45
|
+
* @returns The status line
|
|
46
|
+
*/
|
|
47
|
+
export declare const QueryStatusLine: import('react').NamedExoticComponent<QueryStatusLineProps>;
|
|
48
|
+
//# sourceMappingURL=status-line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-line.d.ts","sourceRoot":"","sources":["../../src/query/status-line.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC3B,sBAAsB;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IAChD,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAED,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC3B,uCAAuC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B;AAED,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IAC5C,sFAAsF;IACtF,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,gBAAgB;IAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAED,wCAAwC;AACxC,MAAM,WAAW,oBAAoB;IACjC,iBAAiB;IACjB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,mDAAmD;IACnD,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,CAAC;IAC3C,sBAAsB;IACtB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,wBAAwB;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAWD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,4DA+B1B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Card } from './model/cards.js';
|
|
2
|
+
import { PartActions, PartStyles } from './parts.js';
|
|
3
|
+
/** What a card asks of the Query tab, besides its parts'. */
|
|
4
|
+
export interface CardActions extends PartActions {
|
|
5
|
+
/** Moves a step up (`-1`) or down (`1`). */
|
|
6
|
+
readonly onMove: (stepId: string, by: -1 | 1) => void;
|
|
7
|
+
/** Takes a step out. */
|
|
8
|
+
readonly onRemoveStep: (stepId: string) => void;
|
|
9
|
+
}
|
|
10
|
+
/** Props of {@link StepCard}. */
|
|
11
|
+
export interface StepCardProps {
|
|
12
|
+
/** The card. */
|
|
13
|
+
readonly card: Card;
|
|
14
|
+
/** How many steps the query has. */
|
|
15
|
+
readonly count: number;
|
|
16
|
+
/** Whether an issue the history item went to is on it. */
|
|
17
|
+
readonly focused: boolean;
|
|
18
|
+
/** The parts' styles, and the words. */
|
|
19
|
+
readonly ps: PartStyles;
|
|
20
|
+
/** What its parts and its buttons ask. */
|
|
21
|
+
readonly actions: CardActions;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders a step's card — see the module docs.
|
|
25
|
+
*
|
|
26
|
+
* @param props - The card, the step count, and what it asks ({@link StepCardProps})
|
|
27
|
+
* @returns The card
|
|
28
|
+
*/
|
|
29
|
+
export declare const StepCard: import('react').NamedExoticComponent<StepCardProps>;
|
|
30
|
+
//# sourceMappingURL=step-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-card.d.ts","sourceRoot":"","sources":["../../src/query/step-card.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAA0B,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAEvF,6DAA6D;AAC7D,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC5C,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACtD,wBAAwB;IACxB,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AAED,iCAAiC;AACjC,MAAM,WAAW,aAAa;IAC1B,gBAAgB;IAChB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,oCAAoC;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CACjC;AAED;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,qDA2BnB,CAAC"}
|