@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.
- package/dist/src/experiment/index.d.ts +640 -0
- package/dist/src/experiment/index.d.ts.map +1 -0
- package/dist/src/experiment/index.js +148 -0
- package/dist/src/experiment/index.js.map +1 -0
- package/dist/src/experiment/types.d.ts +611 -0
- package/dist/src/experiment/types.d.ts.map +1 -0
- package/dist/src/experiment/types.js +330 -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 +535 -0
- package/dist/test/experiment/experiment.examples.d.ts.map +1 -0
- package/dist/test/experiment/experiment.examples.js +177 -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,330 @@
|
|
|
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 — the **e3-ui-owned** boundary types the
|
|
7
|
+
* component reads and the developer's bound functions return.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* These are *not* causal-library types: `e3-ui` never imports
|
|
11
|
+
* `east-py-datascience`. They are the small contract a sign-flip experiment
|
|
12
|
+
* surface needs — the causal quantities (`effect` / `ci` / the ALE vectors /
|
|
13
|
+
* the refuter numbers) plus the two additions the surface requires (`naive`
|
|
14
|
+
* for the raw-vs-adjusted comparison and `balance` for the confounder table).
|
|
15
|
+
*
|
|
16
|
+
* The split follows the **string-vs-variant rule** ({@link ExperimentSpecType}):
|
|
17
|
+
*
|
|
18
|
+
* - **Closed choices are variants** — the user's Advanced estimator / target /
|
|
19
|
+
* trim selections ({@link EstimatorType}, {@link TargetUnitsType},
|
|
20
|
+
* {@link TrimType}). They mirror the causal vocabulary *structurally*, so the
|
|
21
|
+
* developer's ~10-line `spec → CausalEffectConfig` bridge is an identity map
|
|
22
|
+
* on these fields — but the type lives here, owned by the surface.
|
|
23
|
+
* - **Column references are strings** — `treatment` / `outcome` / `confounders`
|
|
24
|
+
* are field names introspected from the bound dataset's row struct (the
|
|
25
|
+
* `Table` pattern), so they are open over whatever columns the data has.
|
|
26
|
+
* - **Presentation is derived, never stored** — no `tone` / bar width / label /
|
|
27
|
+
* sentence appears here. The renderer composes every word and colour from the
|
|
28
|
+
* numbers + the user's chosen column names.
|
|
29
|
+
*
|
|
30
|
+
* Where a shape overlaps the library (`Ci`, the ALE vectors) it is
|
|
31
|
+
* **structurally identical**, so values unify by shape across the package
|
|
32
|
+
* boundary with no shared package and no conversion.
|
|
33
|
+
*
|
|
34
|
+
* Reached via `Experiment.Types.*` (like `Table.Types.*`), not public named
|
|
35
|
+
* exports — users only touch them to type the bound functions / seed datasets.
|
|
36
|
+
*
|
|
37
|
+
* @packageDocumentation
|
|
38
|
+
*/
|
|
39
|
+
import { StringType, FloatType, IntegerType, BooleanType, NullType, DateTimeType, ArrayType, StructType, VariantType, OptionType, DictType, VectorType, } from '@elaraai/east';
|
|
40
|
+
import { Slice } from '@elaraai/east-ui';
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// Advanced choices — closed vocabularies → variants (mirror the causal terms).
|
|
43
|
+
// ============================================================================
|
|
44
|
+
/**
|
|
45
|
+
* Inverse-propensity weighting scheme for the
|
|
46
|
+
* {@link EstimatorType | propensity-weighting} estimator. Structurally mirrors
|
|
47
|
+
* the causal library's weighting-scheme variant.
|
|
48
|
+
*
|
|
49
|
+
* @property ips_weight - Raw inverse propensity weights.
|
|
50
|
+
* @property ips_stabilized_weight - Stabilised weights (recommended; lower variance).
|
|
51
|
+
* @property ips_normalized_weight - Normalised inverse propensity weights.
|
|
52
|
+
*/
|
|
53
|
+
export const WeightingSchemeType = VariantType({
|
|
54
|
+
ips_weight: NullType,
|
|
55
|
+
ips_stabilized_weight: NullType,
|
|
56
|
+
ips_normalized_weight: NullType,
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* How the like-for-like comparison is estimated — the user's "method" choice in
|
|
60
|
+
* the Advanced panel. Closed set, so a variant; structurally mirrors the causal
|
|
61
|
+
* estimator vocabulary.
|
|
62
|
+
*
|
|
63
|
+
* @property linear_regression - Regress the outcome on treatment + confounders.
|
|
64
|
+
* @property propensity_score_weighting - Re-weight rows by treatment
|
|
65
|
+
* propensity (binary treatment); carries the optional
|
|
66
|
+
* {@link WeightingSchemeType}.
|
|
67
|
+
*/
|
|
68
|
+
export const EstimatorType = VariantType({
|
|
69
|
+
linear_regression: NullType,
|
|
70
|
+
propensity_score_weighting: StructType({
|
|
71
|
+
weighting_scheme: OptionType(WeightingSchemeType),
|
|
72
|
+
}),
|
|
73
|
+
});
|
|
74
|
+
/**
|
|
75
|
+
* Which population the effect is reported for — the user's "who" choice. Closed
|
|
76
|
+
* set, so a variant; structurally mirrors the causal target-units vocabulary.
|
|
77
|
+
*
|
|
78
|
+
* @property ate - Everyone (average treatment effect).
|
|
79
|
+
* @property att - The treated group (average effect on the treated).
|
|
80
|
+
* @property atc - The untreated group (average effect on the controls).
|
|
81
|
+
*/
|
|
82
|
+
export const TargetUnitsType = VariantType({
|
|
83
|
+
ate: NullType,
|
|
84
|
+
att: NullType,
|
|
85
|
+
atc: NullType,
|
|
86
|
+
});
|
|
87
|
+
/**
|
|
88
|
+
* Whether un-matchable rows are dropped before estimating — the user's "trim"
|
|
89
|
+
* choice. Closed set, so a variant; structurally mirrors the causal
|
|
90
|
+
* propensity-trim vocabulary.
|
|
91
|
+
*
|
|
92
|
+
* @property overlap - Keep only the common-support overlap of the two groups.
|
|
93
|
+
* @property bounds - Keep rows whose propensity is inside explicit `lower` /
|
|
94
|
+
* `upper` bounds.
|
|
95
|
+
*/
|
|
96
|
+
export const TrimType = VariantType({
|
|
97
|
+
overlap: NullType,
|
|
98
|
+
bounds: StructType({
|
|
99
|
+
lower: FloatType,
|
|
100
|
+
upper: FloatType,
|
|
101
|
+
}),
|
|
102
|
+
});
|
|
103
|
+
// ============================================================================
|
|
104
|
+
// The experiment the user framed — column refs are strings.
|
|
105
|
+
// ============================================================================
|
|
106
|
+
/**
|
|
107
|
+
* The experiment the user framed in the set-up rail — the staged value the
|
|
108
|
+
* pickers write and **Run** feeds to the bound `estimate` function.
|
|
109
|
+
*
|
|
110
|
+
* @remarks
|
|
111
|
+
* `treatment` / `outcome` / `confounders` / `categorical` are **column names**
|
|
112
|
+
* introspected from the bound dataset's row struct, so the surface re-frames
|
|
113
|
+
* over whatever columns the data has (the `Table` pattern). The Advanced
|
|
114
|
+
* choices ({@link EstimatorType}, {@link TargetUnitsType}, {@link TrimType}) are
|
|
115
|
+
* variants. `population` is an optional Slice-style predicate set that narrows
|
|
116
|
+
* the rows before estimating.
|
|
117
|
+
*
|
|
118
|
+
* @property treatment - The column whose change might cause the effect.
|
|
119
|
+
* @property outcome - The column it might move.
|
|
120
|
+
* @property confounders - The backdoor set — columns to adjust for.
|
|
121
|
+
* @property categorical - Which of the confounders hold category codes (one-hot
|
|
122
|
+
* encoded by the estimator).
|
|
123
|
+
* @property population - Optional row narrowing (AND-ed Slice predicates).
|
|
124
|
+
* @property method - Optional estimator override (default: linear regression).
|
|
125
|
+
* @property targetUnits - Optional population override (default: everyone).
|
|
126
|
+
* @property trim - Optional un-matchable-row trimming (propensity weighting only).
|
|
127
|
+
*/
|
|
128
|
+
export const ExperimentSpecType = StructType({
|
|
129
|
+
treatment: StringType,
|
|
130
|
+
outcome: StringType,
|
|
131
|
+
confounders: ArrayType(StringType),
|
|
132
|
+
categorical: ArrayType(StringType),
|
|
133
|
+
population: OptionType(ArrayType(Slice.Types.Predicate)),
|
|
134
|
+
method: OptionType(EstimatorType),
|
|
135
|
+
targetUnits: OptionType(TargetUnitsType),
|
|
136
|
+
trim: OptionType(TrimType),
|
|
137
|
+
});
|
|
138
|
+
// ============================================================================
|
|
139
|
+
// Shared — a confidence interval.
|
|
140
|
+
// ============================================================================
|
|
141
|
+
/**
|
|
142
|
+
* A confidence interval. Structurally identical to the causal library's `ci`,
|
|
143
|
+
* so it unifies by shape across the package boundary.
|
|
144
|
+
*
|
|
145
|
+
* @property lower - Lower bound.
|
|
146
|
+
* @property upper - Upper bound.
|
|
147
|
+
*/
|
|
148
|
+
export const CiType = StructType({
|
|
149
|
+
lower: FloatType,
|
|
150
|
+
upper: FloatType,
|
|
151
|
+
});
|
|
152
|
+
// ============================================================================
|
|
153
|
+
// What `estimate` returns — causal quantities packaged for the surface.
|
|
154
|
+
// ============================================================================
|
|
155
|
+
/**
|
|
156
|
+
* One confounder's before-adjustment imbalance — the two group means and the
|
|
157
|
+
* standardised difference. The renderer derives the bar width, tone and "6.1 vs
|
|
158
|
+
* 8.0" label from these numbers.
|
|
159
|
+
*
|
|
160
|
+
* @property column - The confounder column.
|
|
161
|
+
* @property treatedMean - Mean of the column in the treated group.
|
|
162
|
+
* @property controlMean - Mean of the column in the control group.
|
|
163
|
+
* @property stdDiff - Standardised mean difference (the imbalance magnitude).
|
|
164
|
+
*/
|
|
165
|
+
export const BalanceRowType = StructType({
|
|
166
|
+
column: StringType,
|
|
167
|
+
treatedMean: FloatType,
|
|
168
|
+
controlMean: FloatType,
|
|
169
|
+
stdDiff: FloatType,
|
|
170
|
+
});
|
|
171
|
+
/**
|
|
172
|
+
* The `estimate` answer — the adjusted (like-for-like) effect, the naive (raw)
|
|
173
|
+
* effect for the sign-flip comparison, the sample accounting, and the
|
|
174
|
+
* confounder balance. Every word and colour on the surface is derived from
|
|
175
|
+
* these numbers.
|
|
176
|
+
*
|
|
177
|
+
* @property effect - The adjusted (like-for-like) effect estimate.
|
|
178
|
+
* @property ci - Optional confidence interval for `effect`.
|
|
179
|
+
* @property naive - The raw (unadjusted) mean difference.
|
|
180
|
+
* @property naiveCi - Optional confidence interval for `naive`.
|
|
181
|
+
* @property nTotal - Rows in the framed population.
|
|
182
|
+
* @property nTreated - Treated rows used.
|
|
183
|
+
* @property nControl - Control rows used.
|
|
184
|
+
* @property nDropped - Rows dropped by trimming / missing data.
|
|
185
|
+
* @property balance - Per-confounder before-adjustment imbalance, most
|
|
186
|
+
* imbalanced first.
|
|
187
|
+
*/
|
|
188
|
+
export const ExperimentResultType = StructType({
|
|
189
|
+
effect: FloatType,
|
|
190
|
+
ci: OptionType(CiType),
|
|
191
|
+
naive: FloatType,
|
|
192
|
+
naiveCi: OptionType(CiType),
|
|
193
|
+
nTotal: IntegerType,
|
|
194
|
+
nTreated: IntegerType,
|
|
195
|
+
nControl: IntegerType,
|
|
196
|
+
nDropped: IntegerType,
|
|
197
|
+
balance: ArrayType(BalanceRowType),
|
|
198
|
+
});
|
|
199
|
+
// ============================================================================
|
|
200
|
+
// What `refute` returns — the trust checks.
|
|
201
|
+
// ============================================================================
|
|
202
|
+
/**
|
|
203
|
+
* Which robustness check a {@link RefuteCheckType} row is. Closed set → variant;
|
|
204
|
+
* the renderer derives the check's name, description and pass/fail from the kind
|
|
205
|
+
* plus the numbers.
|
|
206
|
+
*
|
|
207
|
+
* @property placebo - Fake treatment — the effect should vanish.
|
|
208
|
+
* @property random_common_cause - Inject a random cause — the effect should hold.
|
|
209
|
+
* @property data_subset - Re-estimate on subsets — the effect should be stable.
|
|
210
|
+
* @property unobserved - Simulated hidden confounder — a sensitivity curve.
|
|
211
|
+
*/
|
|
212
|
+
export const RefuteKindType = VariantType({
|
|
213
|
+
placebo: NullType,
|
|
214
|
+
random_common_cause: NullType,
|
|
215
|
+
data_subset: NullType,
|
|
216
|
+
unobserved: NullType,
|
|
217
|
+
});
|
|
218
|
+
/**
|
|
219
|
+
* One robustness check — the real refuter numbers. The renderer turns these
|
|
220
|
+
* into the pass/fail row and (for `unobserved`) the sensitivity curve.
|
|
221
|
+
*
|
|
222
|
+
* @property kind - Which check this is ({@link RefuteKindType}).
|
|
223
|
+
* @property estimatedEffect - The original effect being challenged.
|
|
224
|
+
* @property newEffects - Effect(s) under the refutation — one entry for
|
|
225
|
+
* placebo / random-cause / subset; one per simulated strength for unobserved.
|
|
226
|
+
* @property strengths - For `unobserved` only: the simulated confounder
|
|
227
|
+
* strengths paired with `newEffects` (the sensitivity-curve x-axis). `none`
|
|
228
|
+
* for the single-shot checks.
|
|
229
|
+
* @property pValue - Refuter p-value where the check provides one.
|
|
230
|
+
*/
|
|
231
|
+
export const RefuteCheckType = StructType({
|
|
232
|
+
kind: RefuteKindType,
|
|
233
|
+
estimatedEffect: FloatType,
|
|
234
|
+
newEffects: VectorType(FloatType),
|
|
235
|
+
strengths: OptionType(VectorType(FloatType)),
|
|
236
|
+
pValue: OptionType(FloatType),
|
|
237
|
+
});
|
|
238
|
+
/**
|
|
239
|
+
* The `refute` answer — the battery of robustness checks shown in the "Can we
|
|
240
|
+
* trust it?" tab.
|
|
241
|
+
*
|
|
242
|
+
* @property checks - The checks that were run.
|
|
243
|
+
*/
|
|
244
|
+
export const RefuteResultType = StructType({
|
|
245
|
+
checks: ArrayType(RefuteCheckType),
|
|
246
|
+
});
|
|
247
|
+
// ============================================================================
|
|
248
|
+
// What `dose` returns — the ALE dose-response curve.
|
|
249
|
+
// ============================================================================
|
|
250
|
+
/**
|
|
251
|
+
* A per-segment dose-response sub-curve (e.g. one production line). The grid /
|
|
252
|
+
* effect / CI vectors mirror the top-level {@link DoseResultType} curve shape.
|
|
253
|
+
*
|
|
254
|
+
* @property label - Segment label ("Line A", "Acme", …).
|
|
255
|
+
* @property grid - Feature grid values.
|
|
256
|
+
* @property effect - Centered ALE effect at each grid value.
|
|
257
|
+
* @property lower - Optional lower CI at each grid value.
|
|
258
|
+
* @property upper - Optional upper CI at each grid value.
|
|
259
|
+
*/
|
|
260
|
+
export const DoseSegmentType = StructType({
|
|
261
|
+
label: StringType,
|
|
262
|
+
grid: VectorType(FloatType),
|
|
263
|
+
effect: VectorType(FloatType),
|
|
264
|
+
lower: OptionType(VectorType(FloatType)),
|
|
265
|
+
upper: OptionType(VectorType(FloatType)),
|
|
266
|
+
});
|
|
267
|
+
/**
|
|
268
|
+
* The `dose` answer — an ALE dose-response curve for a chosen feature, plus the
|
|
269
|
+
* optional per-segment breakdown. The grid / effect / CI / size vectors are
|
|
270
|
+
* structurally identical to the causal library's ALE result.
|
|
271
|
+
*
|
|
272
|
+
* @property feature - The dose feature column.
|
|
273
|
+
* @property grid - Feature grid values (interval edges).
|
|
274
|
+
* @property effect - Centered ALE effect at each grid value (outcome units).
|
|
275
|
+
* @property lower - Optional lower CI at each grid value.
|
|
276
|
+
* @property upper - Optional upper CI at each grid value.
|
|
277
|
+
* @property size - Number of samples in each grid interval.
|
|
278
|
+
* @property segments - Optional per-segment sub-curves ({@link DoseSegmentType}).
|
|
279
|
+
*/
|
|
280
|
+
export const DoseResultType = StructType({
|
|
281
|
+
feature: StringType,
|
|
282
|
+
grid: VectorType(FloatType),
|
|
283
|
+
effect: VectorType(FloatType),
|
|
284
|
+
lower: OptionType(VectorType(FloatType)),
|
|
285
|
+
upper: OptionType(VectorType(FloatType)),
|
|
286
|
+
size: VectorType(IntegerType),
|
|
287
|
+
segments: OptionType(ArrayType(DoseSegmentType)),
|
|
288
|
+
});
|
|
289
|
+
// ============================================================================
|
|
290
|
+
// The journal — committed experiments.
|
|
291
|
+
// ============================================================================
|
|
292
|
+
/**
|
|
293
|
+
* A committed experiment in the journal — the framed spec + the headline effect
|
|
294
|
+
* + who committed it when. The renderer derives the verdict words and colour
|
|
295
|
+
* from `effect` / `ci`.
|
|
296
|
+
*
|
|
297
|
+
* @property spec - The experiment that was committed ({@link ExperimentSpecType}).
|
|
298
|
+
* @property effect - The adjusted effect at commit time.
|
|
299
|
+
* @property ci - Optional confidence interval at commit time.
|
|
300
|
+
* @property committedAt - When it was committed.
|
|
301
|
+
* @property committedBy - Who committed it.
|
|
302
|
+
*/
|
|
303
|
+
export const JournalRowType = StructType({
|
|
304
|
+
spec: ExperimentSpecType,
|
|
305
|
+
effect: FloatType,
|
|
306
|
+
ci: OptionType(CiType),
|
|
307
|
+
committedAt: DateTimeType,
|
|
308
|
+
committedBy: StringType,
|
|
309
|
+
});
|
|
310
|
+
/** The journal dataset — committed experiments, newest first. */
|
|
311
|
+
export const JournalType = ArrayType(JournalRowType);
|
|
312
|
+
// ============================================================================
|
|
313
|
+
// Optional per-column metadata.
|
|
314
|
+
// ============================================================================
|
|
315
|
+
/**
|
|
316
|
+
* Optional per-column metadata the developer supplies once. Lets the derived
|
|
317
|
+
* prose read "worse" instead of "lower" and show friendly labels / units.
|
|
318
|
+
* Keyed by column name.
|
|
319
|
+
*
|
|
320
|
+
* @property label - Friendly display label for the column.
|
|
321
|
+
* @property unit - Unit suffix ("MPa", "$", …).
|
|
322
|
+
* @property higherIsBetter - Whether a larger value is the good direction —
|
|
323
|
+
* flips "lower" → "worse" in the derived words.
|
|
324
|
+
*/
|
|
325
|
+
export const ColumnMetaType = DictType(StringType, StructType({
|
|
326
|
+
label: OptionType(StringType),
|
|
327
|
+
unit: OptionType(StringType),
|
|
328
|
+
higherIsBetter: OptionType(BooleanType),
|
|
329
|
+
}));
|
|
330
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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UAAU,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7B,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;CACnD,CAAC,CAAC;AAIH,+EAA+E;AAC/E,uCAAuC;AACvC,+EAA+E;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,SAAS;IACjB,EAAE,EAAE,UAAU,CAAC,MAAM,CAAC;IACtB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,UAAU;CAC1B,CAAC,CAAC;AAIH,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;AAIrD,+EAA+E;AAC/E,gCAAgC;AAChC,+EAA+E;AAE/E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAC1D,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC;IAC5B,cAAc,EAAE,UAAU,CAAC,WAAW,CAAC;CAC1C,CAAC,CAAC,CAAC"}
|
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,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,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAG7B,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACH,eAAe,EACf,aAAa,EACb,KAAK,WAAW,GACnB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACH,mBA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AACrD,OAAO,EACH,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC5B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,KAAK,cAAc,EACnB,eAAe,EACf,KAAK,kBAAkB,EACvB,YAAY,EACZ,UAAU,EACV,KAAK,aAAa,EAClB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,mBAAmB,GAC3B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,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
|
+
// (Spec / Result / Refute / Dose / Journal …) are intentionally NOT public
|
|
40
|
+
// named exports — reach them via `Experiment.Types.Spec`, `.Result`, … (like
|
|
41
|
+
// `Table.Types.*`), since users only touch them to type the bound functions /
|
|
42
|
+
// 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;AACnB,OAAO,EAAE,gBAAgB,EAAqB,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,8BAA8B;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACH,eAAe,EACf,aAAa,GAEhB,MAAM,WAAW,CAAC;AAEnB,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACH,mBAAmB,EACnB,iBAAiB,EAEjB,YAAY,EACZ,YAAY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AAM,mBAAmB,CAAC;AACzC,OAAO,EACH,eAAe,EACf,aAAa,GAEhB,MAAM,WAAW,CAAC;AAEnB,kCAAkC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACH,mBAAmB,EACnB,iBAAiB,EAEjB,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,YAAY,EAEZ,gBAAgB,GAEnB,MAAM,eAAe,CAAC;AAEvB,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,8EAA8E;AAC9E,wBAAwB;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EACH,qBAAqB,GAGxB,MAAM,uBAAuB,CAAC;AAE/B,oCAAoC;AACpC,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,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,EAC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B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,KAAK,cAAc,EACnB,eAAe,EACf,KAAK,kBAAkB,EACvB,YAAY,EACZ,UAAU,EACV,KAAK,aAAa,EAClB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,mBAAmB,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,aAAa,EACb,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,KAAK,oBAAoB,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,KAAK,sBAAsB,GAC9B,MAAM,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,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,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,U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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"}
|