@elaraai/e3-ui 1.0.11 → 1.0.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.
- package/dist/src/experiment/index.d.ts +694 -0
- package/dist/src/experiment/index.d.ts.map +1 -0
- package/dist/src/experiment/index.js +147 -0
- package/dist/src/experiment/index.js.map +1 -0
- package/dist/src/experiment/types.d.ts +575 -0
- package/dist/src/experiment/types.d.ts.map +1 -0
- package/dist/src/experiment/types.js +292 -0
- package/dist/src/experiment/types.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +1 -0
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +3 -0
- package/dist/src/internal.js.map +1 -1
- package/dist/src/runtime/experiment.d.ts +48 -0
- package/dist/src/runtime/experiment.d.ts.map +1 -0
- package/dist/src/runtime/experiment.js +10 -0
- package/dist/src/runtime/experiment.js.map +1 -0
- package/dist/src/runtime/index.d.ts +1 -0
- package/dist/src/runtime/index.d.ts.map +1 -1
- package/dist/src/runtime/index.js +1 -0
- package/dist/src/runtime/index.js.map +1 -1
- package/dist/test/experiment/experiment.examples.d.ts +294 -0
- package/dist/test/experiment/experiment.examples.d.ts.map +1 -0
- package/dist/test/experiment/experiment.examples.js +208 -0
- package/dist/test/experiment/experiment.examples.js.map +1 -0
- package/package.json +7 -7
- package/dist/src/buttons.d.ts +0 -2
- package/dist/src/buttons.d.ts.map +0 -1
- package/dist/src/buttons.js +0 -2
- package/dist/src/buttons.js.map +0 -1
|
@@ -0,0 +1,292 @@
|
|
|
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
|
+
* The `Experiment` render contract.
|
|
7
|
+
*
|
|
8
|
+
* These types are **replicated verbatim (snake_case)** from
|
|
9
|
+
* `east-py-datascience`'s `Causal.Types.*`, so the engine's `Causal.experiment`
|
|
10
|
+
* result unifies **structurally** with the component's binding — replicate, don't
|
|
11
|
+
* share (East type equality is structural; `e3-ui` never imports
|
|
12
|
+
* `east-py-datascience`). Keep these byte-identical to the datascience
|
|
13
|
+
* definitions — they are kept in sync by hand.
|
|
14
|
+
*
|
|
15
|
+
* The user edits an {@link ExperimentConfigType} (the staged "question + method")
|
|
16
|
+
* and **Apply** runs the one bound `experiment` function, which returns an
|
|
17
|
+
* {@link ExperimentResultType} — the naive vs adjusted effect, confounder
|
|
18
|
+
* balance, propensity overlap, a robustness summary, and an honesty
|
|
19
|
+
* {@link ExperimentVerdictType}. `adjusted` is `none` when the engine refuses.
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
import { StructType, VariantType, OptionType, ArrayType, DictType, FloatType, IntegerType, BooleanType, StringType, NullType, DateTimeType, VectorType, } from '@elaraai/east';
|
|
24
|
+
import { Slice } from '@elaraai/east-ui';
|
|
25
|
+
// ============================================================================
|
|
26
|
+
// Shared vocabulary (= Causal.Types.*)
|
|
27
|
+
// ============================================================================
|
|
28
|
+
/** A confidence interval. */
|
|
29
|
+
export const CiType = StructType({ lower: FloatType, upper: FloatType });
|
|
30
|
+
/** Inverse-propensity weighting scheme. */
|
|
31
|
+
export const WeightingSchemeType = VariantType({
|
|
32
|
+
ips_weight: NullType,
|
|
33
|
+
ips_stabilized_weight: NullType,
|
|
34
|
+
ips_normalized_weight: NullType,
|
|
35
|
+
});
|
|
36
|
+
/** Backdoor-adjusted effect estimator. */
|
|
37
|
+
export const EstimatorType = VariantType({
|
|
38
|
+
linear_regression: NullType,
|
|
39
|
+
propensity_score_weighting: StructType({
|
|
40
|
+
weighting_scheme: OptionType(WeightingSchemeType),
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
/** Population the effect is reported for. */
|
|
44
|
+
export const TargetUnitsType = VariantType({
|
|
45
|
+
ate: NullType,
|
|
46
|
+
att: NullType,
|
|
47
|
+
atc: NullType,
|
|
48
|
+
});
|
|
49
|
+
/** Bootstrap confidence-interval configuration. */
|
|
50
|
+
export const BootstrapConfigType = StructType({
|
|
51
|
+
reps: IntegerType,
|
|
52
|
+
cluster_column: OptionType(StringType),
|
|
53
|
+
confidence_level: OptionType(FloatType),
|
|
54
|
+
});
|
|
55
|
+
/** Which robustness checks to run. */
|
|
56
|
+
export const RefuteSpecType = StructType({
|
|
57
|
+
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
58
|
+
placebo: BooleanType,
|
|
59
|
+
/** Inject an independent random common cause — the effect should hold. */
|
|
60
|
+
random_common_cause: BooleanType,
|
|
61
|
+
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
62
|
+
data_subset: BooleanType,
|
|
63
|
+
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
64
|
+
sensitivity: OptionType(ArrayType(FloatType)),
|
|
65
|
+
});
|
|
66
|
+
// ============================================================================
|
|
67
|
+
// The config the user edits (= CausalExperimentConfigType)
|
|
68
|
+
// ============================================================================
|
|
69
|
+
/**
|
|
70
|
+
* The experiment the user framed — the staged value the pickers write and
|
|
71
|
+
* **Apply** feeds to the bound `experiment` function.
|
|
72
|
+
*
|
|
73
|
+
* `treatment` / `outcome` / `common_causes` / `categorical` are **column names**
|
|
74
|
+
* introspected from the bound dataset's row struct (the `Table` pattern). The
|
|
75
|
+
* `method` / `estimand` advanced choices and the `min_*` guard thresholds are
|
|
76
|
+
* optional developer-defaulted, user-adjustable knobs.
|
|
77
|
+
*/
|
|
78
|
+
export const ExperimentConfigType = StructType({
|
|
79
|
+
treatment: StringType,
|
|
80
|
+
outcome: StringType,
|
|
81
|
+
common_causes: ArrayType(StringType),
|
|
82
|
+
categorical: OptionType(ArrayType(StringType)),
|
|
83
|
+
method: OptionType(EstimatorType),
|
|
84
|
+
estimand: OptionType(TargetUnitsType),
|
|
85
|
+
refute: OptionType(RefuteSpecType),
|
|
86
|
+
/** Continuous column for the ALE dose-response curve (the "How much?" view). */
|
|
87
|
+
dose_feature: OptionType(StringType),
|
|
88
|
+
min_overlap: OptionType(FloatType),
|
|
89
|
+
min_treatment_variation: OptionType(FloatType),
|
|
90
|
+
bootstrap: OptionType(BootstrapConfigType),
|
|
91
|
+
random_state: OptionType(IntegerType),
|
|
92
|
+
});
|
|
93
|
+
// ============================================================================
|
|
94
|
+
// The result the engine returns (= CausalExperimentResultType)
|
|
95
|
+
// ============================================================================
|
|
96
|
+
/** One confounder's before-adjustment imbalance (categoricals → one row per level). */
|
|
97
|
+
export const BalanceRowType = StructType({
|
|
98
|
+
column: StringType,
|
|
99
|
+
/** The original confounder this row belongs to — equals `column` for a numeric
|
|
100
|
+
* confounder; the base confounder for a one-hot categorical level. */
|
|
101
|
+
base_column: StringType,
|
|
102
|
+
treated_mean: FloatType,
|
|
103
|
+
control_mean: FloatType,
|
|
104
|
+
std_diff: FloatType,
|
|
105
|
+
});
|
|
106
|
+
/** Positivity / common-support diagnostic (binary treatment). */
|
|
107
|
+
export const OverlapDiagnosticType = StructType({
|
|
108
|
+
treated_propensity: VectorType(FloatType),
|
|
109
|
+
control_propensity: VectorType(FloatType),
|
|
110
|
+
common_support_frac: FloatType,
|
|
111
|
+
positivity_ok: BooleanType,
|
|
112
|
+
});
|
|
113
|
+
/** The robustness summary the verdict + trust tab consume. */
|
|
114
|
+
export const RefutationType = StructType({
|
|
115
|
+
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
116
|
+
placebo_effect: OptionType(FloatType),
|
|
117
|
+
/** Whether the placebo effect vanished. */
|
|
118
|
+
placebo_passes: OptionType(BooleanType),
|
|
119
|
+
/** Whether a decoy random common cause left the estimate inside its CI. */
|
|
120
|
+
random_cc_within_ci: OptionType(BooleanType),
|
|
121
|
+
/** Mean effect across data subsamples (stability). */
|
|
122
|
+
data_subset_effect: OptionType(FloatType),
|
|
123
|
+
/** Std of the effect across data subsamples. */
|
|
124
|
+
data_subset_std: OptionType(FloatType),
|
|
125
|
+
/** Closed-form E-value — confounder strength needed to explain the effect away. */
|
|
126
|
+
robustness_value: OptionType(FloatType),
|
|
127
|
+
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
128
|
+
sensitivity: OptionType(StructType({
|
|
129
|
+
strengths: VectorType(FloatType),
|
|
130
|
+
effects: VectorType(FloatType),
|
|
131
|
+
})),
|
|
132
|
+
});
|
|
133
|
+
/** A dose-response (ALE) curve of a continuous feature on the outcome. */
|
|
134
|
+
export const DoseResponseType = StructType({
|
|
135
|
+
feature: StringType,
|
|
136
|
+
grid: VectorType(FloatType),
|
|
137
|
+
effect: VectorType(FloatType),
|
|
138
|
+
lower: OptionType(VectorType(FloatType)),
|
|
139
|
+
upper: OptionType(VectorType(FloatType)),
|
|
140
|
+
/** Rows per dose bin — drives the surface's "you are here" (busiest bin) marker. */
|
|
141
|
+
size: VectorType(IntegerType),
|
|
142
|
+
});
|
|
143
|
+
/**
|
|
144
|
+
* The honesty verdict — a thin tag; the numbers live top-level on the result.
|
|
145
|
+
* Only `not_estimable` carries a human-readable reason.
|
|
146
|
+
*/
|
|
147
|
+
export const ExperimentVerdictType = VariantType({
|
|
148
|
+
causal: NullType,
|
|
149
|
+
modest: NullType,
|
|
150
|
+
adjustment_insufficient: NullType,
|
|
151
|
+
non_identifiable_positivity: NullType,
|
|
152
|
+
not_estimable: StringType,
|
|
153
|
+
});
|
|
154
|
+
/**
|
|
155
|
+
* The complete, honest result. `adjusted` is `none` when the engine refuses
|
|
156
|
+
* (positivity / no-variation); the `verdict` tag carries the headline; every
|
|
157
|
+
* word/colour on the surface is derived from these numbers.
|
|
158
|
+
*/
|
|
159
|
+
export const ExperimentResultType = StructType({
|
|
160
|
+
naive: FloatType,
|
|
161
|
+
naive_ci: OptionType(CiType),
|
|
162
|
+
adjusted: OptionType(StructType({ effect: FloatType, ci: OptionType(CiType) })),
|
|
163
|
+
n_total: IntegerType,
|
|
164
|
+
n_treated: IntegerType,
|
|
165
|
+
n_control: IntegerType,
|
|
166
|
+
n_dropped: IntegerType,
|
|
167
|
+
balance: ArrayType(BalanceRowType),
|
|
168
|
+
overlap: OverlapDiagnosticType,
|
|
169
|
+
refutation: OptionType(RefutationType),
|
|
170
|
+
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
171
|
+
dose_response: OptionType(DoseResponseType),
|
|
172
|
+
verdict: ExperimentVerdictType,
|
|
173
|
+
});
|
|
174
|
+
// ============================================================================
|
|
175
|
+
// Validation-design contract (= Causal.Types.ExperimentDesign*)
|
|
176
|
+
//
|
|
177
|
+
// `Causal.designValidation(data, config, result, design_config)` turns a finished
|
|
178
|
+
// experiment into the recipe for a REAL controlled trial that would confirm the
|
|
179
|
+
// effect — how many units, the split, and which categories to match the groups
|
|
180
|
+
// on — or, when a plain trial can't be run, what to change so one can. There is
|
|
181
|
+
// ONE design family (a randomised controlled trial); the framing, the size
|
|
182
|
+
// `basis`, and the visuals vary with the verdict. The renderer's "Validate" tab
|
|
183
|
+
// paints it from these numbers (KPI + split meter + match chips + power curve).
|
|
184
|
+
// Mirrors `Causal.Types.*` in east-py-datascience — kept in sync by hand.
|
|
185
|
+
// ============================================================================
|
|
186
|
+
/**
|
|
187
|
+
* Why the trial is sized the way it is — set from the verdict, so the tab's
|
|
188
|
+
* headline + visuals change with the result rather than reading the same twice.
|
|
189
|
+
*/
|
|
190
|
+
export const DesignBasisType = VariantType({
|
|
191
|
+
/** Clear effect → power the trial to detect the *observed* effect. */
|
|
192
|
+
detect_observed: NullType,
|
|
193
|
+
/** Fuzzy / maybe-nothing → power to the smallest effect worth acting on. */
|
|
194
|
+
resolve_vs_null: NullType,
|
|
195
|
+
/** A trust check failed → randomise to remove the bias adjustment couldn't. */
|
|
196
|
+
de_bias: NullType,
|
|
197
|
+
/** No overlap → randomise within the comparable range. */
|
|
198
|
+
restrict_to_overlap: NullType,
|
|
199
|
+
/** No control group exists → hold back a random sample next time. */
|
|
200
|
+
create_control: NullType,
|
|
201
|
+
});
|
|
202
|
+
/** One sizing option — a split and the head-count it needs (even split first). */
|
|
203
|
+
export const TrialOptionType = StructType({
|
|
204
|
+
/** Plain label, e.g. "Even split" / "Treat fewer". */
|
|
205
|
+
label: StringType,
|
|
206
|
+
/** Fraction assigned to the treatment (0..1; 0.5 = even). */
|
|
207
|
+
treated_share: FloatType,
|
|
208
|
+
n_treated: IntegerType,
|
|
209
|
+
n_control: IntegerType,
|
|
210
|
+
n_total: IntegerType,
|
|
211
|
+
});
|
|
212
|
+
/** The "chance of detecting it" curve — total head-count → power (0..1). */
|
|
213
|
+
export const PowerCurveType = StructType({
|
|
214
|
+
n: VectorType(IntegerType),
|
|
215
|
+
power: VectorType(FloatType),
|
|
216
|
+
});
|
|
217
|
+
/**
|
|
218
|
+
* The validation-trial recipe — a randomised controlled trial sized from the
|
|
219
|
+
* observed effect (or the materiality threshold) and the outcome spread, with
|
|
220
|
+
* the groups matched on the confounders that were most imbalanced. Everything
|
|
221
|
+
* the "Validate" tab paints is derived from these fields.
|
|
222
|
+
*/
|
|
223
|
+
export const ExperimentDesignType = StructType({
|
|
224
|
+
/** The verdict that drove the recommendation (echoed for framing). */
|
|
225
|
+
verdict: ExperimentVerdictType,
|
|
226
|
+
basis: DesignBasisType,
|
|
227
|
+
/** The effect size the trial is powered to detect (observed, or materiality). */
|
|
228
|
+
target_effect: FloatType,
|
|
229
|
+
/** Outcome spread (pooled SD) used to size it. */
|
|
230
|
+
outcome_sd: FloatType,
|
|
231
|
+
target_power: FloatType,
|
|
232
|
+
alpha: FloatType,
|
|
233
|
+
/** Chance the CURRENT sample would already detect `target_effect` (the "you're here" marker); `none` when there's no comparison group. */
|
|
234
|
+
current_power: OptionType(FloatType),
|
|
235
|
+
/** Categories both groups must be matched on (the most-imbalanced confounders). */
|
|
236
|
+
match_on: ArrayType(StringType),
|
|
237
|
+
/** Ranked split options (even split first; cost-saving alternates). */
|
|
238
|
+
options: ArrayType(TrialOptionType),
|
|
239
|
+
/** The detect-chance curve for the chart. */
|
|
240
|
+
power_curve: PowerCurveType,
|
|
241
|
+
/** One generated, plain-language sentence framing the recipe. */
|
|
242
|
+
rationale: StringType,
|
|
243
|
+
});
|
|
244
|
+
/** Optional knobs `Causal.designValidation` accepts (all developer-defaulted). */
|
|
245
|
+
export const DesignConfigType = StructType({
|
|
246
|
+
/** Significance level (default 0.05). */
|
|
247
|
+
alpha: OptionType(FloatType),
|
|
248
|
+
/** Target chance of detecting the effect (default 0.8). */
|
|
249
|
+
target_power: OptionType(FloatType),
|
|
250
|
+
/** Smallest effect worth acting on — sizes the trial to this when set / when there's no trustworthy observed effect. */
|
|
251
|
+
materiality: OptionType(FloatType),
|
|
252
|
+
/** Treatment shares to offer as options (default [0.5]). */
|
|
253
|
+
treated_shares: OptionType(ArrayType(FloatType)),
|
|
254
|
+
});
|
|
255
|
+
// ============================================================================
|
|
256
|
+
// UI-only types (not part of the engine contract)
|
|
257
|
+
// ============================================================================
|
|
258
|
+
/**
|
|
259
|
+
* The UI-side population filter — a set of {@link Slice} predicates the Step-4
|
|
260
|
+
* rail edits. It narrows the rows **client-side, before** the `experiment` call,
|
|
261
|
+
* so it is deliberately **not** a field of {@link ExperimentConfigType} (the
|
|
262
|
+
* bound function never sees it; the config stays byte-identical to the causal
|
|
263
|
+
* library's contract). Bound as its own optional staged dataset so a surface can
|
|
264
|
+
* seed / persist / commit the framing filters.
|
|
265
|
+
*/
|
|
266
|
+
export const PopulationType = ArrayType(Slice.Types.Predicate);
|
|
267
|
+
/**
|
|
268
|
+
* Optional per-column display metadata the developer supplies once. Keyed by
|
|
269
|
+
* column name. Lets the derived prose read "worse" instead of "lower" and show
|
|
270
|
+
* friendly labels / units.
|
|
271
|
+
*/
|
|
272
|
+
export const ColumnMetaType = DictType(StringType, StructType({
|
|
273
|
+
label: OptionType(StringType),
|
|
274
|
+
unit: OptionType(StringType),
|
|
275
|
+
higherIsBetter: OptionType(BooleanType),
|
|
276
|
+
}));
|
|
277
|
+
/**
|
|
278
|
+
* A committed experiment in the journal — the framed config + the verdict +
|
|
279
|
+
* headline effect + who committed it when. The renderer derives the verdict
|
|
280
|
+
* words and colour from `verdict` / `adjusted`.
|
|
281
|
+
*/
|
|
282
|
+
export const JournalRowType = StructType({
|
|
283
|
+
config: ExperimentConfigType,
|
|
284
|
+
verdict: ExperimentVerdictType,
|
|
285
|
+
naive: FloatType,
|
|
286
|
+
adjusted: OptionType(FloatType),
|
|
287
|
+
committed_at: DateTimeType,
|
|
288
|
+
committed_by: StringType,
|
|
289
|
+
});
|
|
290
|
+
/** The journal dataset — committed experiments, newest first. */
|
|
291
|
+
export const JournalType = ArrayType(JournalRowType);
|
|
292
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/experiment/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACH,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,+EAA+E;AAC/E,uCAAuC;AACvC,+EAA+E;AAE/E,6BAA6B;AAC7B,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAIzE,2CAA2C;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC3C,UAAU,EAAE,QAAQ;IACpB,qBAAqB,EAAE,QAAQ;IAC/B,qBAAqB,EAAE,QAAQ;CAClC,CAAC,CAAC;AAIH,0CAA0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"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export { Diff } from './runtime/diff.js';
|
|
|
33
33
|
export { DiffPayloadType, DiffStyleType, type DiffOptions, } from './diff.js';
|
|
34
34
|
export { Ontology } from './runtime/ontology.js';
|
|
35
35
|
export { OntologyPayloadType, OntologyStyleType, type OntologyOptions, NodeKindType, LinkKindType, NodeType, LinkType, OntologyMetadataType, OntologyType, type OntologyStructType, OntologyViewType, type OntologyViewLiteral, } from './ontology.js';
|
|
36
|
+
export { Experiment } from './runtime/experiment.js';
|
|
37
|
+
export { ExperimentPayloadType, type ExperimentOptions, type ExperimentTabLiteral, } from './experiment/index.js';
|
|
36
38
|
export { Decision } from './decision/index.js';
|
|
37
39
|
export { DecisionType, DecisionOptionType, UrgencyType, type UrgencyLiteral, StakesLevelType, type StakesLevelLiteral, EvidenceType, AnswerType, type AnswerLiteral, VerdictType, ReferenceType, JudgementInputType, DecisionConstraintType, PromptType, LeverType, judgementInputType, type PromptInput, type LeverInput, type DecisionInput, type DecisionOptionInput, type EvidenceInput, type DecisionReferenceInput, type DecisionJudgementInput, } from './decision/types.js';
|
|
38
40
|
export { decisionBind, decisionBindPlatformFn, DecisionHandleType, DecisionHandleRefType, CommitStateType, JudgementsType, type DecisionHandle, type DecisionBindOptions, } from './decision/bind.js';
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACH,IAAI,EACJ,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,eAAe,EACf,KAAK,UAAU,EACf,kBAAkB,EAClB,KAAK,eAAe,EACpB,cAAc,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,IAAI,EACJ,cAAc,EACd,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,KAAK,SAA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AChE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -35,6 +35,13 @@ export { DiffPayloadType, DiffStyleType, } from './diff.js';
|
|
|
35
35
|
// e3 `<Ontology>` tag + its types
|
|
36
36
|
export { Ontology } from './runtime/ontology.js';
|
|
37
37
|
export { OntologyPayloadType, OntologyStyleType, NodeKindType, LinkKindType, NodeType, LinkType, OntologyMetadataType, OntologyType, OntologyViewType, } from './ontology.js';
|
|
38
|
+
// e3 `<Experiment>` tag + its payload/options. The render-contract value types
|
|
39
|
+
// (Config / Result / DoseResponse / Journal …) are intentionally NOT public
|
|
40
|
+
// named exports — reach them via `Experiment.Types.Config`, `.Result`, … (like
|
|
41
|
+
// `Table.Types.*`), since users only touch them to type the bound `experiment`
|
|
42
|
+
// function / seed result datasets.
|
|
43
|
+
export { Experiment } from './runtime/experiment.js';
|
|
44
|
+
export { ExperimentPayloadType, } from './experiment/index.js';
|
|
38
45
|
// Decision platform types + factory
|
|
39
46
|
export { Decision } from './decision/index.js';
|
|
40
47
|
export { DecisionType, DecisionOptionType, UrgencyType, StakesLevelType, EvidenceType, AnswerType, VerdictType, ReferenceType, JudgementInputType, DecisionConstraintType, PromptType, LeverType, judgementInputType, } from './decision/types.js';
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACH,IAAI,EACJ,gBAAgB,EAEhB,eAAe,EAEf,kBAAkB,EAElB,cAAc,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,IAAI,EACJ,cAAc,EACd,aAAa,EACb,eAAe,EACf,kBAAkB,EAElB,kBAAkB,GACrB,MAAM,WAAW,CAAC;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kB,EAClB,qBAAqB,EACrB,eAAe,EACf,cAAc,GAGjB,MAAM,oBAAoB,CAAC;AAC5B,0DAA0D;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAA6B,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAA+B,MAAM,uBAAuB,CAAC"}
|
package/dist/src/internal.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export { DataManifestType, type DataManifest, encodeManifest, decodeManifest } f
|
|
|
21
21
|
export { deriveManifest } from './derive.js';
|
|
22
22
|
export { Diff, DiffComponent, DiffPayloadType, DiffStyleType, type DiffOptions, } from './diff.js';
|
|
23
23
|
export { Ontology, OntologyComponent, OntologyPayloadType, OntologyStyleType, type OntologyOptions, NodeKindType, LinkKindType, NodeType, LinkType, OntologyMetadataType, OntologyType, type OntologyStructType, OntologyViewType, type OntologyViewLiteral, } from './ontology.js';
|
|
24
|
+
export { Experiment, ExperimentComponent } from './experiment/index.js';
|
|
24
25
|
export { Decision } from './decision/index.js';
|
|
25
26
|
export { DecisionType, DecisionOptionType, UrgencyType, type UrgencyLiteral, StakesLevelType, type StakesLevelLiteral, EvidenceType, AnswerType, type AnswerLiteral, VerdictType, ReferenceType, JudgementInputType, DecisionConstraintType, PromptType, LeverType, judgementInputType, type PromptInput, type LeverInput, type DecisionInput, type DecisionOptionInput, type EvidenceInput, type DecisionReferenceInput, type DecisionJudgementInput, } from './decision/types.js';
|
|
26
27
|
export { decisionBind, decisionBindPlatformFn, DecisionHandleType, DecisionHandleRefType, CommitStateType, JudgementsType, type DecisionHandle, type DecisionBindOptions, } from './decision/bind.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/internal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EACH,IAAI,EACJ,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,eAAe,EACf,KAAK,UAAU,EACf,kBAAkB,EAClB,KAAK,eAAe,EACpB,cAAc,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,IAAI,EACJ,cAAc,EACd,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,KAAK,SAAS,EACd,kBAAkB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACH,IAAI,EACJ,aAAa,EACb,eAAe,EACf,aAAa,EACb,KAAK,WAAW,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,KAAK,eAAe,EACpB,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,YAAY,EACZ,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,KAAK,mBAAmB,GAC3B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/internal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EACH,IAAI,EACJ,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,eAAe,EACf,KAAK,UAAU,EACf,kBAAkB,EAClB,KAAK,eAAe,EACpB,cAAc,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,IAAI,EACJ,cAAc,EACd,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,KAAK,SAAS,EACd,kBAAkB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,E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M,uBAAuB,CAAC"}
|
package/dist/src/internal.js
CHANGED
|
@@ -21,6 +21,9 @@ export { DataManifestType, encodeManifest, decodeManifest } from './manifest.js'
|
|
|
21
21
|
export { deriveManifest } from './derive.js';
|
|
22
22
|
export { Diff, DiffComponent, DiffPayloadType, DiffStyleType, } from './diff.js';
|
|
23
23
|
export { Ontology, OntologyComponent, OntologyPayloadType, OntologyStyleType, NodeKindType, LinkKindType, NodeType, LinkType, OntologyMetadataType, OntologyType, OntologyViewType, } from './ontology.js';
|
|
24
|
+
// Experiment factory + component carrier for renderers/tests. The value types
|
|
25
|
+
// ride on `Experiment.Types`, so they are not re-exported individually here.
|
|
26
|
+
export { Experiment, ExperimentComponent } from './experiment/index.js';
|
|
24
27
|
export { Decision } from './decision/index.js';
|
|
25
28
|
export { DecisionType, DecisionOptionType, UrgencyType, StakesLevelType, EvidenceType, AnswerType, VerdictType, ReferenceType, JudgementInputType, DecisionConstraintType, PromptType, LeverType, judgementInputType, } from './decision/types.js';
|
|
26
29
|
export { decisionBind, decisionBindPlatformFn, DecisionHandleType, DecisionHandleRefType, CommitStateType, JudgementsType, } from './decision/bind.js';
|
package/dist/src/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/internal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EACH,IAAI,EACJ,gBAAgB,EAEhB,eAAe,EAEf,kBAAkB,EAElB,cAAc,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,IAAI,EACJ,cAAc,EACd,aAAa,EACb,eAAe,EACf,kBAAkB,EAElB,kBAAkB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAqB,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACH,IAAI,EACJ,a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OAAO,EACH,IAAI,EACJ,aAAa,EACb,eAAe,EACf,aAAa,GAEhB,MAAM,WAAW,CAAC;AACnB,OAAO,EACH,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EAEjB,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,YAAY,EAEZ,gBAAgB,GAEnB,MAAM,eAAe,CAAC;AACvB,8EAA8E;AAC9E,6EAA6E;AAC7E,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,kBAAkB,EAClB,WAAW,EAEX,eAAe,EAEf,YAAY,EACZ,UAAU,EAEV,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,UAAU,EACV,SAAS,EACT,kBAAkB,GAQrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,cAAc,GAGjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,aAAa,EACb,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,eAAe,EACf,wBAAwB,EACxB,0BAA0B,GAE7B,MAAM,uBAAuB,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
|
+
/** `<Experiment>` tag — see the export's JSDoc. */
|
|
6
|
+
import { type StructType } from "@elaraai/east";
|
|
7
|
+
import { type UIElement } from "@elaraai/east-ui";
|
|
8
|
+
import { Experiment as ExperimentFactory, type ExperimentOptions } from "../experiment/index.js";
|
|
9
|
+
/**
|
|
10
|
+
* Interactive causal-experiment surface — binds an input dataset + a staged spec
|
|
11
|
+
* + estimator functions and renders a picture-and-colour answer to *"did
|
|
12
|
+
* {treatment} change {outcome}?"*.
|
|
13
|
+
*
|
|
14
|
+
* Generic over the bound dataset's row struct (like `<Table>`): `Row` is
|
|
15
|
+
* inferred from `data`, which types the `estimate` / `refute` / `dose` function
|
|
16
|
+
* signatures. The result side is derived, not authored — status words, the
|
|
17
|
+
* sign-flip banner and the bars are computed from the bound numbers; only the
|
|
18
|
+
* column names the user picked appear as text.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
|
|
23
|
+
* import { East } from "@elaraai/east";
|
|
24
|
+
* import { Reactive, UIComponentType } from "@elaraai/east-ui";
|
|
25
|
+
* import { Data, Experiment, Func } from "@elaraai/e3-ui";
|
|
26
|
+
*
|
|
27
|
+
* const surface = East.function([], UIComponentType, _$ => (
|
|
28
|
+
* <Reactive>{$ => {
|
|
29
|
+
* const data = $.let(Data.bind(batchesInput));
|
|
30
|
+
* const spec = $.let(Data.bind(specInput, { mode: "staged" }));
|
|
31
|
+
* const estimate = $.let(Func.bind(estimateFn));
|
|
32
|
+
* return <Experiment data={data} spec={spec} estimate={estimate} />;
|
|
33
|
+
* }}</Reactive>
|
|
34
|
+
* ));
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Carries `Experiment.Types` (the spec / result / refute / dose / journal value
|
|
39
|
+
* types). Desugars to `Experiment.Root(options)`. The renderer registers against
|
|
40
|
+
* `Experiment.Component` (from `@elaraai/e3-ui/internal`).
|
|
41
|
+
*/
|
|
42
|
+
/** The generic `<Experiment>` tag: `Row` is inferred from the `data` prop. */
|
|
43
|
+
export type ExperimentTag = {
|
|
44
|
+
<Row extends StructType>(props: ExperimentOptions<Row>): UIElement;
|
|
45
|
+
Types: typeof ExperimentFactory.Types;
|
|
46
|
+
};
|
|
47
|
+
export declare const Experiment: ExperimentTag;
|
|
48
|
+
//# sourceMappingURL=experiment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experiment.d.ts","sourceRoot":"","sources":["../../../src/runtime/experiment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mDAAmD;AAEnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG;IACxB,CAAC,GAAG,SAAS,UAAU,EAAE,KAAK,EAAE,iBAAiB,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACnE,KAAK,EAAE,OAAO,iBAAiB,CAAC,KAAK,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,aAGI,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
/** `<Experiment>` tag — see the export's JSDoc. */
|
|
6
|
+
import {} from "@elaraai/east";
|
|
7
|
+
import { optionsTag } from "@elaraai/east-ui";
|
|
8
|
+
import { Experiment as ExperimentFactory } from "../experiment/index.js";
|
|
9
|
+
export const Experiment = Object.assign(optionsTag(ExperimentFactory.Root), { Types: ExperimentFactory.Types });
|
|
10
|
+
//# sourceMappingURL=experiment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experiment.js","sourceRoot":"","sources":["../../../src/runtime/experiment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mDAAmD;AAEnD,OAAO,EAAmB,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAA0B,MAAM,wBAAwB,CAAC;AAyCjG,MAAM,CAAC,MAAM,UAAU,GAAkB,MAAM,CAAC,MAAM,CAClD,UAAU,CAAC,iBAAiB,CAAC,IAA6D,CAAC,EAC3F,EAAE,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAAE,CACT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|