@elaraai/e3-ui 1.0.11 → 1.0.12

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.
@@ -0,0 +1,640 @@
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
+ /**
6
+ * `Experiment` component — an interactive causal-experiment surface.
7
+ *
8
+ * @remarks
9
+ * `Experiment` lets a domain expert ask *"did X change Y?"* against a dataset
10
+ * and trust the answer, without meeting a statistician's vocabulary. It is a
11
+ * registered extension component (architecturally like {@link Ontology}): the
12
+ * author writes one tag, `Experiment.Root({ … })`; the React renderer lives in
13
+ * `@elaraai/e3-ui-components` and is wired via
14
+ * `implementUIComponent(Experiment.Component, EastChakraExperiment)`.
15
+ *
16
+ * **Generic over the input row, like `Table`.** The author binds the input
17
+ * dataset (`data: BoundValue<ArrayType<Row>>`); the renderer introspects its
18
+ * row struct to drive the treatment / outcome / confounder pickers, so the
19
+ * **end user** re-frames the experiment from the dataset's own columns.
20
+ *
21
+ * **The user adjusts → results go stale → Run re-computes.** Editing a picker
22
+ * stages a new {@link ExperimentSpecType} and marks the result stale; **Run**
23
+ * calls the author-supplied estimator functions ({@link Func.bind} handles) and
24
+ * the answer arrives reactively; **Commit** appends to the journal. The causal
25
+ * compute (DoWhy / EconML) lives entirely in those function bodies, so `e3-ui`
26
+ * never imports `east-py-datascience`.
27
+ *
28
+ * **Visual-first and derived.** Because the user frames an arbitrary
29
+ * experiment, nothing on the result side is hand-authored — every word is a
30
+ * column name the user picked, a number an estimator returned, or a status
31
+ * derived by rule (interval clears zero → HIGHER / LOWER; spans zero → NO CLEAR
32
+ * EFFECT; raw and adjusted disagree in sign → the "misleading" banner). The
33
+ * contract types ({@link ExperimentSpecType}, {@link ExperimentResultType}, …)
34
+ * live in {@link "./experiment/types"} and are reached via `Experiment.Types.*`.
35
+ *
36
+ * @packageDocumentation
37
+ */
38
+ import { NullType, BooleanType, StringType, ArrayType, StructType, VariantType, OptionType, type ExprType, type SubtypeExprOrValue } from '@elaraai/east';
39
+ import { type UIComponentType } from '@elaraai/east-ui';
40
+ import { type BoundValue } from '../data.js';
41
+ import { type BoundFunc } from '../func.js';
42
+ import { ExperimentSpecType, ExperimentResultType, RefuteResultType, DoseResultType, JournalType } from './types.js';
43
+ export { WeightingSchemeType, EstimatorType, TargetUnitsType, TrimType, ExperimentSpecType, CiType, BalanceRowType, ExperimentResultType, RefuteKindType, RefuteCheckType, RefuteResultType, DoseSegmentType, DoseResultType, JournalRowType, JournalType, ColumnMetaType, } from './types.js';
44
+ /**
45
+ * The `estimate` function signature: `(rows, spec) → ExperimentResult`. The
46
+ * renderer calls this on **Run** with the bound `data` and the staged spec.
47
+ *
48
+ * @typeParam Row - The input dataset's row struct.
49
+ */
50
+ export type EstimateFunc<Row extends StructType> = BoundFunc<[ArrayType<Row>, ExperimentSpecType], ExperimentResultType>;
51
+ /**
52
+ * The optional `refute` function signature: `(rows, spec) → RefuteResult` — the
53
+ * robustness battery shown in the "Can we trust it?" tab.
54
+ *
55
+ * @typeParam Row - The input dataset's row struct.
56
+ */
57
+ export type RefuteFunc<Row extends StructType> = BoundFunc<[ArrayType<Row>, ExperimentSpecType], RefuteResultType>;
58
+ /**
59
+ * The optional `dose` function signature: `(rows, spec, feature) → DoseResult` —
60
+ * the ALE dose-response curve for the chosen `feature` column shown in the "How
61
+ * much?" tab.
62
+ *
63
+ * @typeParam Row - The input dataset's row struct.
64
+ */
65
+ export type DoseFunc<Row extends StructType> = BoundFunc<[ArrayType<Row>, ExperimentSpecType, StringType], DoseResultType>;
66
+ /** Initial result tab variant — `answer` (default), `trust`, or `dose`. */
67
+ export declare const ExperimentTabType: VariantType<{
68
+ readonly answer: NullType;
69
+ readonly trust: NullType;
70
+ readonly dose: NullType;
71
+ }>;
72
+ /** Type alias for {@link ExperimentTabType}. */
73
+ export type ExperimentTabType = typeof ExperimentTabType;
74
+ /**
75
+ * The `Experiment` component payload — binding descriptors + options. Renderers
76
+ * decode this and resolve each binding to a live, reactive value / call handle.
77
+ *
78
+ * @property data - {@link DiffBindingType} for the input dataset — the renderer
79
+ * introspects its row struct for the pickers and passes it to the functions.
80
+ * @property spec - {@link DiffBindingType} for the staged {@link ExperimentSpecType}.
81
+ * @property estimate - {@link FuncBindingType} for the `estimate` function.
82
+ * @property refute - Optional {@link FuncBindingType} for the `refute` function.
83
+ * @property dose - Optional {@link FuncBindingType} for the `dose` function.
84
+ * @property journal - Optional {@link DiffBindingType} for the committed-experiment journal.
85
+ * @property columnMeta - Optional per-column display metadata.
86
+ * @property readonly - Render without the Run / Commit / edit affordances.
87
+ * @property defaultTab - Initial result tab ({@link ExperimentTabType}).
88
+ */
89
+ export declare const ExperimentPayloadType: StructType<{
90
+ readonly data: StructType<{
91
+ readonly source: ArrayType<VariantType<{
92
+ readonly field: StringType;
93
+ }>>;
94
+ readonly patch: OptionType<ArrayType<VariantType<{
95
+ readonly field: StringType;
96
+ }>>>;
97
+ readonly mode: VariantType<{
98
+ readonly staged: NullType;
99
+ readonly direct: NullType;
100
+ }>;
101
+ }>;
102
+ readonly spec: StructType<{
103
+ readonly source: ArrayType<VariantType<{
104
+ readonly field: StringType;
105
+ }>>;
106
+ readonly patch: OptionType<ArrayType<VariantType<{
107
+ readonly field: StringType;
108
+ }>>>;
109
+ readonly mode: VariantType<{
110
+ readonly staged: NullType;
111
+ readonly direct: NullType;
112
+ }>;
113
+ }>;
114
+ readonly estimate: StructType<{
115
+ readonly name: StringType;
116
+ }>;
117
+ readonly refute: OptionType<StructType<{
118
+ readonly name: StringType;
119
+ }>>;
120
+ readonly dose: OptionType<StructType<{
121
+ readonly name: StringType;
122
+ }>>;
123
+ readonly journal: OptionType<StructType<{
124
+ readonly source: ArrayType<VariantType<{
125
+ readonly field: StringType;
126
+ }>>;
127
+ readonly patch: OptionType<ArrayType<VariantType<{
128
+ readonly field: StringType;
129
+ }>>>;
130
+ readonly mode: VariantType<{
131
+ readonly staged: NullType;
132
+ readonly direct: NullType;
133
+ }>;
134
+ }>>;
135
+ readonly columnMeta: OptionType<import("@elaraai/east").DictType<StringType, StructType<{
136
+ readonly label: OptionType<StringType>;
137
+ readonly unit: OptionType<StringType>;
138
+ readonly higherIsBetter: OptionType<BooleanType>;
139
+ }>>>;
140
+ readonly readonly: OptionType<BooleanType>;
141
+ readonly defaultTab: OptionType<VariantType<{
142
+ readonly answer: NullType;
143
+ readonly trust: NullType;
144
+ readonly dose: NullType;
145
+ }>>;
146
+ }>;
147
+ /** Type alias for {@link ExperimentPayloadType}. */
148
+ export type ExperimentPayloadType = typeof ExperimentPayloadType;
149
+ /** Initial result tab as a string literal. */
150
+ export type ExperimentTabLiteral = 'answer' | 'trust' | 'dose';
151
+ /**
152
+ * Internal {@link EastUI.component} carrier. The React renderer registers
153
+ * against this in `@elaraai/e3-ui-components`.
154
+ */
155
+ export declare const ExperimentComponent: import("@elaraai/east-ui").UIComponentDef<StructType<{
156
+ readonly data: StructType<{
157
+ readonly source: ArrayType<VariantType<{
158
+ readonly field: StringType;
159
+ }>>;
160
+ readonly patch: OptionType<ArrayType<VariantType<{
161
+ readonly field: StringType;
162
+ }>>>;
163
+ readonly mode: VariantType<{
164
+ readonly staged: NullType;
165
+ readonly direct: NullType;
166
+ }>;
167
+ }>;
168
+ readonly spec: StructType<{
169
+ readonly source: ArrayType<VariantType<{
170
+ readonly field: StringType;
171
+ }>>;
172
+ readonly patch: OptionType<ArrayType<VariantType<{
173
+ readonly field: StringType;
174
+ }>>>;
175
+ readonly mode: VariantType<{
176
+ readonly staged: NullType;
177
+ readonly direct: NullType;
178
+ }>;
179
+ }>;
180
+ readonly estimate: StructType<{
181
+ readonly name: StringType;
182
+ }>;
183
+ readonly refute: OptionType<StructType<{
184
+ readonly name: StringType;
185
+ }>>;
186
+ readonly dose: OptionType<StructType<{
187
+ readonly name: StringType;
188
+ }>>;
189
+ readonly journal: OptionType<StructType<{
190
+ readonly source: ArrayType<VariantType<{
191
+ readonly field: StringType;
192
+ }>>;
193
+ readonly patch: OptionType<ArrayType<VariantType<{
194
+ readonly field: StringType;
195
+ }>>>;
196
+ readonly mode: VariantType<{
197
+ readonly staged: NullType;
198
+ readonly direct: NullType;
199
+ }>;
200
+ }>>;
201
+ readonly columnMeta: OptionType<import("@elaraai/east").DictType<StringType, StructType<{
202
+ readonly label: OptionType<StringType>;
203
+ readonly unit: OptionType<StringType>;
204
+ readonly higherIsBetter: OptionType<BooleanType>;
205
+ }>>>;
206
+ readonly readonly: OptionType<BooleanType>;
207
+ readonly defaultTab: OptionType<VariantType<{
208
+ readonly answer: NullType;
209
+ readonly trust: NullType;
210
+ readonly dose: NullType;
211
+ }>>;
212
+ }>>;
213
+ /**
214
+ * Options for {@link Experiment.Root}, generic over the input row struct.
215
+ *
216
+ * @typeParam Row - The input dataset's row struct — inferred from `data`.
217
+ *
218
+ * @property data - The {@link Data.bind} handle for the input dataset.
219
+ * @property spec - The {@link Data.bind} handle for the staged experiment spec.
220
+ * @property estimate - The {@link Func.bind} handle for the estimator.
221
+ * @property refute - Optional {@link Func.bind} handle for the robustness battery.
222
+ * @property dose - Optional {@link Func.bind} handle for the dose-response curve.
223
+ * @property journal - Optional {@link Data.bind} handle for the committed-experiment journal.
224
+ * @property columnMeta - Optional per-column display metadata.
225
+ * @property readonly - Render without mutation affordances.
226
+ * @property defaultTab - Initial result tab.
227
+ */
228
+ /**
229
+ * Per-column display config — the friendly label, unit suffix, and good
230
+ * direction the surface uses to phrase results ("worse" instead of "lower").
231
+ */
232
+ export interface ExperimentColumnConfig {
233
+ /** Friendly label shown instead of the raw column name. */
234
+ label?: string;
235
+ /** Unit suffix ("MPa", "$", …). */
236
+ unit?: string;
237
+ /** Whether a larger value is the good direction (flips "lower" → "worse"). */
238
+ higherIsBetter?: boolean;
239
+ }
240
+ /**
241
+ * Type-safe per-column config, keyed by the bound dataset's field names (the
242
+ * `Table` columns pattern) — only real columns are accepted as keys.
243
+ *
244
+ * @typeParam Row - The input dataset's row struct.
245
+ */
246
+ export type ExperimentColumns<Row extends StructType> = {
247
+ [K in Extract<keyof Row['fields'], string>]?: ExperimentColumnConfig;
248
+ };
249
+ export interface ExperimentOptions<Row extends StructType> {
250
+ data: BoundValue<ArrayType<Row>>;
251
+ spec: BoundValue<ExperimentSpecType>;
252
+ estimate: EstimateFunc<Row>;
253
+ refute?: RefuteFunc<Row>;
254
+ dose?: DoseFunc<Row>;
255
+ journal?: BoundValue<JournalType>;
256
+ /** Per-column display config, keyed by the data row's fields (like `Table`). */
257
+ columns?: ExperimentColumns<Row>;
258
+ readonly?: SubtypeExprOrValue<OptionType<BooleanType>>;
259
+ defaultTab?: ExperimentTabLiteral;
260
+ }
261
+ /**
262
+ * Build an Experiment surface bound to an input dataset + estimator functions.
263
+ *
264
+ * @typeParam Row - The input dataset's row struct, inferred from `data`.
265
+ * @param options - {@link ExperimentOptions}. `data`, `spec` and `estimate` are
266
+ * required; the rest are optional.
267
+ * @returns An East expression of {@link UIComponentType}.
268
+ */
269
+ declare function createExperiment<Row extends StructType>(options: ExperimentOptions<Row>): ExprType<UIComponentType>;
270
+ /**
271
+ * The Experiment component namespace. Surfaces an interactive causal-experiment
272
+ * over a bound input dataset + estimator functions, generic over the row struct
273
+ * (the `Table` pattern), with the staged-binding machinery the rest of e3-ui
274
+ * uses.
275
+ *
276
+ * @remarks
277
+ * Use `Experiment.Root({ data, spec, estimate, refute, dose, journal })` inside
278
+ * a `Reactive` block. The `Component` property is the {@link EastUI.component}
279
+ * carrier the renderer registers against; `Types` exposes the render-contract
280
+ * value types (`Spec`, `Result`, `Refute`, `Dose`, `Journal`, …).
281
+ */
282
+ export declare const Experiment: {
283
+ readonly Root: typeof createExperiment;
284
+ /** The internal {@link EastUI.component} carrier renderers register against. */
285
+ readonly Component: import("@elaraai/east-ui").UIComponentDef<StructType<{
286
+ readonly data: StructType<{
287
+ readonly source: ArrayType<VariantType<{
288
+ readonly field: StringType;
289
+ }>>;
290
+ readonly patch: OptionType<ArrayType<VariantType<{
291
+ readonly field: StringType;
292
+ }>>>;
293
+ readonly mode: VariantType<{
294
+ readonly staged: NullType;
295
+ readonly direct: NullType;
296
+ }>;
297
+ }>;
298
+ readonly spec: StructType<{
299
+ readonly source: ArrayType<VariantType<{
300
+ readonly field: StringType;
301
+ }>>;
302
+ readonly patch: OptionType<ArrayType<VariantType<{
303
+ readonly field: StringType;
304
+ }>>>;
305
+ readonly mode: VariantType<{
306
+ readonly staged: NullType;
307
+ readonly direct: NullType;
308
+ }>;
309
+ }>;
310
+ readonly estimate: StructType<{
311
+ readonly name: StringType;
312
+ }>;
313
+ readonly refute: OptionType<StructType<{
314
+ readonly name: StringType;
315
+ }>>;
316
+ readonly dose: OptionType<StructType<{
317
+ readonly name: StringType;
318
+ }>>;
319
+ readonly journal: OptionType<StructType<{
320
+ readonly source: ArrayType<VariantType<{
321
+ readonly field: StringType;
322
+ }>>;
323
+ readonly patch: OptionType<ArrayType<VariantType<{
324
+ readonly field: StringType;
325
+ }>>>;
326
+ readonly mode: VariantType<{
327
+ readonly staged: NullType;
328
+ readonly direct: NullType;
329
+ }>;
330
+ }>>;
331
+ readonly columnMeta: OptionType<import("@elaraai/east").DictType<StringType, StructType<{
332
+ readonly label: OptionType<StringType>;
333
+ readonly unit: OptionType<StringType>;
334
+ readonly higherIsBetter: OptionType<BooleanType>;
335
+ }>>>;
336
+ readonly readonly: OptionType<BooleanType>;
337
+ readonly defaultTab: OptionType<VariantType<{
338
+ readonly answer: NullType;
339
+ readonly trust: NullType;
340
+ readonly dose: NullType;
341
+ }>>;
342
+ }>>;
343
+ readonly Types: {
344
+ /** Rendered payload struct (bindings + options). */
345
+ readonly Payload: StructType<{
346
+ readonly data: StructType<{
347
+ readonly source: ArrayType<VariantType<{
348
+ readonly field: StringType;
349
+ }>>;
350
+ readonly patch: OptionType<ArrayType<VariantType<{
351
+ readonly field: StringType;
352
+ }>>>;
353
+ readonly mode: VariantType<{
354
+ readonly staged: NullType;
355
+ readonly direct: NullType;
356
+ }>;
357
+ }>;
358
+ readonly spec: StructType<{
359
+ readonly source: ArrayType<VariantType<{
360
+ readonly field: StringType;
361
+ }>>;
362
+ readonly patch: OptionType<ArrayType<VariantType<{
363
+ readonly field: StringType;
364
+ }>>>;
365
+ readonly mode: VariantType<{
366
+ readonly staged: NullType;
367
+ readonly direct: NullType;
368
+ }>;
369
+ }>;
370
+ readonly estimate: StructType<{
371
+ readonly name: StringType;
372
+ }>;
373
+ readonly refute: OptionType<StructType<{
374
+ readonly name: StringType;
375
+ }>>;
376
+ readonly dose: OptionType<StructType<{
377
+ readonly name: StringType;
378
+ }>>;
379
+ readonly journal: OptionType<StructType<{
380
+ readonly source: ArrayType<VariantType<{
381
+ readonly field: StringType;
382
+ }>>;
383
+ readonly patch: OptionType<ArrayType<VariantType<{
384
+ readonly field: StringType;
385
+ }>>>;
386
+ readonly mode: VariantType<{
387
+ readonly staged: NullType;
388
+ readonly direct: NullType;
389
+ }>;
390
+ }>>;
391
+ readonly columnMeta: OptionType<import("@elaraai/east").DictType<StringType, StructType<{
392
+ readonly label: OptionType<StringType>;
393
+ readonly unit: OptionType<StringType>;
394
+ readonly higherIsBetter: OptionType<BooleanType>;
395
+ }>>>;
396
+ readonly readonly: OptionType<BooleanType>;
397
+ readonly defaultTab: OptionType<VariantType<{
398
+ readonly answer: NullType;
399
+ readonly trust: NullType;
400
+ readonly dose: NullType;
401
+ }>>;
402
+ }>;
403
+ /** The experiment-spec value type (what the pickers stage). */
404
+ readonly Spec: StructType<{
405
+ readonly treatment: StringType;
406
+ readonly outcome: StringType;
407
+ readonly confounders: ArrayType<StringType>;
408
+ readonly categorical: ArrayType<StringType>;
409
+ readonly population: OptionType<ArrayType<VariantType<{
410
+ readonly string: import("@elaraai/east").StructType<{
411
+ readonly fieldId: import("@elaraai/east").StringType;
412
+ readonly op: import("@elaraai/east").VariantType<{
413
+ readonly eq: import("@elaraai/east").StringType;
414
+ readonly neq: import("@elaraai/east").StringType;
415
+ readonly in: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
416
+ readonly notIn: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
417
+ readonly contains: import("@elaraai/east").StringType;
418
+ readonly matches: import("@elaraai/east").StringType;
419
+ }>;
420
+ }>;
421
+ readonly integer: import("@elaraai/east").StructType<{
422
+ readonly fieldId: import("@elaraai/east").StringType;
423
+ readonly op: import("@elaraai/east").VariantType<{
424
+ readonly eq: import("@elaraai/east").IntegerType;
425
+ readonly neq: import("@elaraai/east").IntegerType;
426
+ readonly lt: import("@elaraai/east").IntegerType;
427
+ readonly lte: import("@elaraai/east").IntegerType;
428
+ readonly gt: import("@elaraai/east").IntegerType;
429
+ readonly gte: import("@elaraai/east").IntegerType;
430
+ readonly in: import("@elaraai/east").SetType<import("@elaraai/east").IntegerType>;
431
+ }>;
432
+ }>;
433
+ readonly float: import("@elaraai/east").StructType<{
434
+ readonly fieldId: import("@elaraai/east").StringType;
435
+ readonly op: import("@elaraai/east").VariantType<{
436
+ readonly lt: import("@elaraai/east").FloatType;
437
+ readonly lte: import("@elaraai/east").FloatType;
438
+ readonly gt: import("@elaraai/east").FloatType;
439
+ readonly gte: import("@elaraai/east").FloatType;
440
+ }>;
441
+ }>;
442
+ readonly datetime: import("@elaraai/east").StructType<{
443
+ readonly fieldId: import("@elaraai/east").StringType;
444
+ readonly op: import("@elaraai/east").VariantType<{
445
+ readonly before: import("@elaraai/east").DateTimeType;
446
+ readonly after: import("@elaraai/east").DateTimeType;
447
+ readonly between: import("@elaraai/east").StructType<{
448
+ readonly from: import("@elaraai/east").DateTimeType;
449
+ readonly to: import("@elaraai/east").DateTimeType;
450
+ }>;
451
+ }>;
452
+ }>;
453
+ readonly boolean: import("@elaraai/east").StructType<{
454
+ readonly fieldId: import("@elaraai/east").StringType;
455
+ readonly op: import("@elaraai/east").VariantType<{
456
+ readonly is: import("@elaraai/east").BooleanType;
457
+ }>;
458
+ }>;
459
+ }>>>;
460
+ readonly method: OptionType<VariantType<{
461
+ readonly linear_regression: NullType;
462
+ readonly propensity_score_weighting: StructType<{
463
+ readonly weighting_scheme: OptionType<VariantType<{
464
+ readonly ips_weight: NullType;
465
+ readonly ips_stabilized_weight: NullType;
466
+ readonly ips_normalized_weight: NullType;
467
+ }>>;
468
+ }>;
469
+ }>>;
470
+ readonly targetUnits: OptionType<VariantType<{
471
+ readonly ate: NullType;
472
+ readonly att: NullType;
473
+ readonly atc: NullType;
474
+ }>>;
475
+ readonly trim: OptionType<VariantType<{
476
+ readonly overlap: NullType;
477
+ readonly bounds: StructType<{
478
+ readonly lower: import("@elaraai/east").FloatType;
479
+ readonly upper: import("@elaraai/east").FloatType;
480
+ }>;
481
+ }>>;
482
+ }>;
483
+ /** The estimator answer value type. */
484
+ readonly Result: StructType<{
485
+ readonly effect: import("@elaraai/east").FloatType;
486
+ readonly ci: OptionType<StructType<{
487
+ readonly lower: import("@elaraai/east").FloatType;
488
+ readonly upper: import("@elaraai/east").FloatType;
489
+ }>>;
490
+ readonly naive: import("@elaraai/east").FloatType;
491
+ readonly naiveCi: OptionType<StructType<{
492
+ readonly lower: import("@elaraai/east").FloatType;
493
+ readonly upper: import("@elaraai/east").FloatType;
494
+ }>>;
495
+ readonly nTotal: import("@elaraai/east").IntegerType;
496
+ readonly nTreated: import("@elaraai/east").IntegerType;
497
+ readonly nControl: import("@elaraai/east").IntegerType;
498
+ readonly nDropped: import("@elaraai/east").IntegerType;
499
+ readonly balance: ArrayType<StructType<{
500
+ readonly column: StringType;
501
+ readonly treatedMean: import("@elaraai/east").FloatType;
502
+ readonly controlMean: import("@elaraai/east").FloatType;
503
+ readonly stdDiff: import("@elaraai/east").FloatType;
504
+ }>>;
505
+ }>;
506
+ /** The robustness-battery value type. */
507
+ readonly Refute: StructType<{
508
+ readonly checks: ArrayType<StructType<{
509
+ readonly kind: VariantType<{
510
+ readonly placebo: NullType;
511
+ readonly random_common_cause: NullType;
512
+ readonly data_subset: NullType;
513
+ readonly unobserved: NullType;
514
+ }>;
515
+ readonly estimatedEffect: import("@elaraai/east").FloatType;
516
+ readonly newEffects: import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>;
517
+ readonly strengths: OptionType<import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>>;
518
+ readonly pValue: OptionType<import("@elaraai/east").FloatType>;
519
+ }>>;
520
+ }>;
521
+ /** The dose-response value type. */
522
+ readonly Dose: StructType<{
523
+ readonly feature: StringType;
524
+ readonly grid: import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>;
525
+ readonly effect: import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>;
526
+ readonly lower: OptionType<import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>>;
527
+ readonly upper: OptionType<import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>>;
528
+ readonly size: import("@elaraai/east").VectorType<import("@elaraai/east").IntegerType>;
529
+ readonly segments: OptionType<ArrayType<StructType<{
530
+ readonly label: StringType;
531
+ readonly grid: import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>;
532
+ readonly effect: import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>;
533
+ readonly lower: OptionType<import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>>;
534
+ readonly upper: OptionType<import("@elaraai/east").VectorType<import("@elaraai/east").FloatType>>;
535
+ }>>>;
536
+ }>;
537
+ /** The committed-experiment journal value type. */
538
+ readonly Journal: ArrayType<StructType<{
539
+ readonly spec: StructType<{
540
+ readonly treatment: StringType;
541
+ readonly outcome: StringType;
542
+ readonly confounders: ArrayType<StringType>;
543
+ readonly categorical: ArrayType<StringType>;
544
+ readonly population: OptionType<ArrayType<VariantType<{
545
+ readonly string: import("@elaraai/east").StructType<{
546
+ readonly fieldId: import("@elaraai/east").StringType;
547
+ readonly op: import("@elaraai/east").VariantType<{
548
+ readonly eq: import("@elaraai/east").StringType;
549
+ readonly neq: import("@elaraai/east").StringType;
550
+ readonly in: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
551
+ readonly notIn: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
552
+ readonly contains: import("@elaraai/east").StringType;
553
+ readonly matches: import("@elaraai/east").StringType;
554
+ }>;
555
+ }>;
556
+ readonly integer: import("@elaraai/east").StructType<{
557
+ readonly fieldId: import("@elaraai/east").StringType;
558
+ readonly op: import("@elaraai/east").VariantType<{
559
+ readonly eq: import("@elaraai/east").IntegerType;
560
+ readonly neq: import("@elaraai/east").IntegerType;
561
+ readonly lt: import("@elaraai/east").IntegerType;
562
+ readonly lte: import("@elaraai/east").IntegerType;
563
+ readonly gt: import("@elaraai/east").IntegerType;
564
+ readonly gte: import("@elaraai/east").IntegerType;
565
+ readonly in: import("@elaraai/east").SetType<import("@elaraai/east").IntegerType>;
566
+ }>;
567
+ }>;
568
+ readonly float: import("@elaraai/east").StructType<{
569
+ readonly fieldId: import("@elaraai/east").StringType;
570
+ readonly op: import("@elaraai/east").VariantType<{
571
+ readonly lt: import("@elaraai/east").FloatType;
572
+ readonly lte: import("@elaraai/east").FloatType;
573
+ readonly gt: import("@elaraai/east").FloatType;
574
+ readonly gte: import("@elaraai/east").FloatType;
575
+ }>;
576
+ }>;
577
+ readonly datetime: import("@elaraai/east").StructType<{
578
+ readonly fieldId: import("@elaraai/east").StringType;
579
+ readonly op: import("@elaraai/east").VariantType<{
580
+ readonly before: import("@elaraai/east").DateTimeType;
581
+ readonly after: import("@elaraai/east").DateTimeType;
582
+ readonly between: import("@elaraai/east").StructType<{
583
+ readonly from: import("@elaraai/east").DateTimeType;
584
+ readonly to: import("@elaraai/east").DateTimeType;
585
+ }>;
586
+ }>;
587
+ }>;
588
+ readonly boolean: import("@elaraai/east").StructType<{
589
+ readonly fieldId: import("@elaraai/east").StringType;
590
+ readonly op: import("@elaraai/east").VariantType<{
591
+ readonly is: import("@elaraai/east").BooleanType;
592
+ }>;
593
+ }>;
594
+ }>>>;
595
+ readonly method: OptionType<VariantType<{
596
+ readonly linear_regression: NullType;
597
+ readonly propensity_score_weighting: StructType<{
598
+ readonly weighting_scheme: OptionType<VariantType<{
599
+ readonly ips_weight: NullType;
600
+ readonly ips_stabilized_weight: NullType;
601
+ readonly ips_normalized_weight: NullType;
602
+ }>>;
603
+ }>;
604
+ }>>;
605
+ readonly targetUnits: OptionType<VariantType<{
606
+ readonly ate: NullType;
607
+ readonly att: NullType;
608
+ readonly atc: NullType;
609
+ }>>;
610
+ readonly trim: OptionType<VariantType<{
611
+ readonly overlap: NullType;
612
+ readonly bounds: StructType<{
613
+ readonly lower: import("@elaraai/east").FloatType;
614
+ readonly upper: import("@elaraai/east").FloatType;
615
+ }>;
616
+ }>>;
617
+ }>;
618
+ readonly effect: import("@elaraai/east").FloatType;
619
+ readonly ci: OptionType<StructType<{
620
+ readonly lower: import("@elaraai/east").FloatType;
621
+ readonly upper: import("@elaraai/east").FloatType;
622
+ }>>;
623
+ readonly committedAt: import("@elaraai/east").DateTimeType;
624
+ readonly committedBy: StringType;
625
+ }>>;
626
+ /** Optional per-column display metadata. */
627
+ readonly ColumnMeta: import("@elaraai/east").DictType<StringType, StructType<{
628
+ readonly label: OptionType<StringType>;
629
+ readonly unit: OptionType<StringType>;
630
+ readonly higherIsBetter: OptionType<BooleanType>;
631
+ }>>;
632
+ /** Initial result tab variant. */
633
+ readonly Tab: VariantType<{
634
+ readonly answer: NullType;
635
+ readonly trust: NullType;
636
+ readonly dose: NullType;
637
+ }>;
638
+ };
639
+ };
640
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/experiment/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAEH,QAAQ,EACR,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,UAAU,EAIV,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAC1B,MAAM,eAAe,CAAC;AACv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