@reticlehq/engine 3.8.2 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/disagreement/body-failures.js +16 -2
  2. package/dist/disagreement/contradiction-evidence.d.ts +119 -0
  3. package/dist/disagreement/contradiction-evidence.js +360 -48
  4. package/dist/disagreement/contradiction-types.d.ts +25 -0
  5. package/dist/disagreement/contradictions.d.ts +17 -1
  6. package/dist/disagreement/contradictions.js +146 -78
  7. package/dist/disagreement/echo-mismatch.js +205 -32
  8. package/dist/disagreement/stale-response.d.ts +10 -1
  9. package/dist/disagreement/stale-response.js +122 -47
  10. package/dist/evidence/already-true.d.ts +1 -1
  11. package/dist/evidence/already-true.js +13 -7
  12. package/dist/evidence/baseline.d.ts +1 -0
  13. package/dist/evidence/baseline.js +28 -12
  14. package/dist/evidence/blind-spots.d.ts +20 -3
  15. package/dist/evidence/blind-spots.js +127 -21
  16. package/dist/evidence/step-effect.d.ts +5 -0
  17. package/dist/evidence/step-effect.js +5 -2
  18. package/dist/evidence/verified.d.ts +23 -0
  19. package/dist/evidence/verified.js +53 -2
  20. package/dist/question/declared.d.ts +27 -0
  21. package/dist/question/declared.js +64 -13
  22. package/dist/question/predicate/net-blind-spots.d.ts +40 -1
  23. package/dist/question/predicate/net-blind-spots.js +110 -1
  24. package/dist/question/predicate/predicate-animation.d.ts +52 -0
  25. package/dist/question/predicate/predicate-animation.js +258 -0
  26. package/dist/question/predicate/predicate-compare.js +53 -26
  27. package/dist/question/predicate/predicate-element.d.ts +20 -2
  28. package/dist/question/predicate/predicate-element.js +207 -45
  29. package/dist/question/predicate/predicate-eval-kit.d.ts +2 -0
  30. package/dist/question/predicate/predicate-eval-kit.js +19 -0
  31. package/dist/question/predicate/predicate-eval.d.ts +1 -4
  32. package/dist/question/predicate/predicate-eval.js +41 -47
  33. package/dist/question/predicate/predicate-parse.js +132 -4
  34. package/dist/question/predicate/predicate-route.js +81 -27
  35. package/dist/question/predicate/predicate-schema.js +84 -34
  36. package/dist/question/predicate/predicate-session.d.ts +5 -0
  37. package/dist/question/predicate/predicate.js +119 -50
  38. package/dist/question/predicate/truncated-body-advice.d.ts +5 -0
  39. package/dist/question/predicate/truncated-body-advice.js +25 -0
  40. package/dist/state-bookkeeping.d.ts +24 -0
  41. package/dist/state-bookkeeping.js +31 -0
  42. package/dist/window/event-filters.d.ts +64 -0
  43. package/dist/window/event-filters.js +149 -20
  44. package/dist/window/network-detail-merge.d.ts +6 -0
  45. package/dist/window/network-detail-merge.js +43 -2
  46. package/package.json +3 -3
@@ -34,6 +34,8 @@ interface DeclaredExpectations {
34
34
  netFailures: readonly DeclaredNetFailure[];
35
35
  /** The caller required something to be ON SCREEN — an element or text, present rather than absent. */
36
36
  rendersContent: boolean;
37
+ /** The caller required the page to be on a route. Read like `rendersContent`: top level and `allOf`. */
38
+ declaresRoute: boolean;
37
39
  /**
38
40
  * The `urlContains` of every net clause the predicate carries, failure or not.
39
41
  *
@@ -50,7 +52,32 @@ interface DeclaredExpectations {
50
52
  * `urlContains` is never here: the schema refuses it, and it would excuse every request.
51
53
  */
52
54
  repeatableNetUrls: readonly DeclaredRead[];
55
+ /**
56
+ * The `path` of every state clause, and the `name` of every signal clause (#1531).
57
+ *
58
+ * A store change or a signal the caller named is the consequence they expected, so it ties that
59
+ * change to the action. `action-had-no-effect` reads it to tell the click's own effect from
60
+ * background churn in the same window.
61
+ */
62
+ statePaths: readonly string[];
63
+ signalNames: readonly string[];
53
64
  }
65
+ /** The store paths and signals `until` named, which tie their changes to the action (#1531). */
66
+ export declare function namedReactions(declared: DeclaredExpectations): {
67
+ namedStatePaths: readonly string[];
68
+ namedSignals: readonly string[];
69
+ };
70
+ /**
71
+ * What a held declaration proves, for the contradiction rules that infer from absence.
72
+ *
73
+ * `held` is the verdict passed AND the consequence was not already true before the action. A
74
+ * consequence that was already true proves nothing about the action. The act path and the assert
75
+ * path both call this, so the two cannot drift apart.
76
+ */
77
+ export declare function provedConsequences(declared: DeclaredExpectations, held: boolean): {
78
+ renderProved: boolean;
79
+ routeProved: boolean;
80
+ };
54
81
  export declare function declaredExpectations(predicate: Predicate | undefined): DeclaredExpectations;
55
82
  /**
56
83
  * Did the caller name a consequence that does not depend on the response body?
@@ -18,6 +18,23 @@
18
18
  * something that never happened. Pure: a predicate in, a description out.
19
19
  */
20
20
  import { PredicateKind, QueryBy, compareSourceClauses } from '@reticlehq/core';
21
+ /** The store paths and signals `until` named, which tie their changes to the action (#1531). */
22
+ export function namedReactions(declared) {
23
+ return { namedStatePaths: declared.statePaths, namedSignals: declared.signalNames };
24
+ }
25
+ /**
26
+ * What a held declaration proves, for the contradiction rules that infer from absence.
27
+ *
28
+ * `held` is the verdict passed AND the consequence was not already true before the action. A
29
+ * consequence that was already true proves nothing about the action. The act path and the assert
30
+ * path both call this, so the two cannot drift apart.
31
+ */
32
+ export function provedConsequences(declared, held) {
33
+ return {
34
+ renderProved: held && declared.rendersContent,
35
+ routeProved: held && declared.declaresRoute,
36
+ };
37
+ }
21
38
  /** Below this, a status is a success or a redirect: not a declared failure. */
22
39
  const FAILURE_STATUS_MIN = 400;
23
40
  /** Statuses that mean the caller was refused — the proof of an auth/authz denial, not a fault. */
@@ -49,14 +66,16 @@ function isDenialRole(role) {
49
66
  return DENIAL_ROLES.has(role.toLowerCase());
50
67
  }
51
68
  function isDenialQuery(query) {
52
- if (undefined !== query.role && isDenialRole(query.role))
69
+ if (undefined !== query.role && isDenialRole(query.role)) {
53
70
  return true;
71
+ }
54
72
  if (QueryBy.ROLE === query.by && undefined !== query.value && isDenialRole(query.value)) {
55
73
  return true;
56
74
  }
57
75
  for (const field of [query.name, query.text, query.value, query.label]) {
58
- if ('string' === typeof field && isDenialPhrase(field))
76
+ if ('string' === typeof field && isDenialPhrase(field)) {
59
77
  return true;
78
+ }
60
79
  }
61
80
  return false;
62
81
  }
@@ -69,16 +88,21 @@ export function declaredExpectations(predicate) {
69
88
  const netFailures = [];
70
89
  const netUrls = [];
71
90
  const repeatableNetUrls = [];
91
+ const statePaths = [];
92
+ const signalNames = [];
72
93
  let rendersContent = false;
94
+ let declaresRoute = false;
73
95
  const walk = (p) => {
74
96
  switch (p.kind) {
75
97
  case PredicateKind.ALL_OF:
76
- for (const child of p.predicates)
98
+ for (const child of p.predicates) {
77
99
  walk(child);
100
+ }
78
101
  return;
79
102
  case PredicateKind.COMPARE:
80
- for (const child of compareSourceClauses(p))
103
+ for (const child of compareSourceClauses(p)) {
81
104
  walk(child);
105
+ }
82
106
  return;
83
107
  case PredicateKind.NET: {
84
108
  netUrls.push(p.urlContains ?? '');
@@ -89,8 +113,9 @@ export function declaredExpectations(predicate) {
89
113
  });
90
114
  }
91
115
  const declaredFailure = false === p.ok || (p.status !== undefined && p.status >= FAILURE_STATUS_MIN);
92
- if (!declaredFailure)
116
+ if (!declaredFailure) {
93
117
  return;
118
+ }
94
119
  netFailures.push({
95
120
  ...(p.method === undefined ? {} : { method: p.method }),
96
121
  ...(p.urlContains === undefined ? {} : { urlContains: p.urlContains }),
@@ -101,8 +126,20 @@ export function declaredExpectations(predicate) {
101
126
  case PredicateKind.ELEMENT:
102
127
  if (true !== p.absent) {
103
128
  rendersContent = true;
104
- if (isDenialQuery(p.query))
129
+ if (isDenialQuery(p.query)) {
105
130
  pushAuthDenialStatuses(netFailures);
131
+ }
132
+ }
133
+ return;
134
+ case PredicateKind.ROUTE:
135
+ declaresRoute = true;
136
+ return;
137
+ case PredicateKind.STATE:
138
+ statePaths.push(p.path);
139
+ return;
140
+ case PredicateKind.SIGNAL:
141
+ if (p.name !== undefined) {
142
+ signalNames.push(p.name);
106
143
  }
107
144
  return;
108
145
  case PredicateKind.TEXT:
@@ -117,9 +154,18 @@ export function declaredExpectations(predicate) {
117
154
  return;
118
155
  }
119
156
  };
120
- if (predicate !== undefined)
157
+ if (predicate !== undefined) {
121
158
  walk(predicate);
122
- return { netFailures, rendersContent, netUrls, repeatableNetUrls };
159
+ }
160
+ return {
161
+ netFailures,
162
+ rendersContent,
163
+ declaresRoute,
164
+ netUrls,
165
+ repeatableNetUrls,
166
+ statePaths,
167
+ signalNames,
168
+ };
123
169
  }
124
170
  /**
125
171
  * Did the caller name a consequence that does not depend on the response body?
@@ -137,8 +183,9 @@ export function declaredExpectations(predicate) {
137
183
  * own.
138
184
  */
139
185
  export function declaresBodyIndependentChannel(predicate) {
140
- if (predicate === undefined)
186
+ if (predicate === undefined) {
141
187
  return false;
188
+ }
142
189
  const walk = (p) => {
143
190
  switch (p.kind) {
144
191
  case PredicateKind.ALL_OF:
@@ -177,13 +224,16 @@ export function declaresBodyIndependentChannel(predicate) {
177
224
  */
178
225
  export function matchesDeclaredFailure(call, declared) {
179
226
  return declared.some((d) => {
180
- if (d.method !== undefined && d.method.toUpperCase() !== call.method.toUpperCase())
227
+ if (d.method !== undefined && d.method.toUpperCase() !== call.method.toUpperCase()) {
181
228
  return false;
229
+ }
182
230
  const haystack = call.matchUrl ?? call.url;
183
- if (d.urlContains !== undefined && !haystack.includes(d.urlContains))
231
+ if (d.urlContains !== undefined && !haystack.includes(d.urlContains)) {
184
232
  return false;
185
- if (d.status !== undefined && d.status !== call.status)
233
+ }
234
+ if (d.status !== undefined && d.status !== call.status) {
186
235
  return false;
236
+ }
187
237
  return true;
188
238
  });
189
239
  }
@@ -193,8 +243,9 @@ export function matchesDeclaredFailure(call, declared) {
193
243
  * excuses a POST to the same endpoint (#1353).
194
244
  */
195
245
  export function isDeclaredRead(call, reads) {
196
- if (reads === undefined)
246
+ if (reads === undefined) {
197
247
  return false;
248
+ }
198
249
  const haystack = call.matchUrl ?? call.url;
199
250
  return reads.some((r) => haystack.includes(r.urlContains) &&
200
251
  (r.method === undefined || r.method.toUpperCase() === call.method.toUpperCase()));
@@ -6,8 +6,11 @@
6
6
  * zero-match `net` verdict says "not observable" or names its blind stretch, instead of "never
7
7
  * happened". Split from `predicate-eval.ts`, which decides the verdict; this only knows the channel.
8
8
  *
9
- * Takes the filter's parts rather than the predicate, so it needs nothing from the contract.
9
+ * Takes the filter's parts rather than the predicate, so it needs nothing from the contract. The
10
+ * one exception is `unrecordedCallMiss`, which builds the whole `unknown` result for a net clause.
10
11
  */
12
+ import { unpatchedInWindow } from '../../window/event-filters.js';
13
+ import { describeNetFilter, type EvalResult } from './predicate-eval-kit.js';
11
14
  /**
12
15
  * Does this filter target a class of request the observer cannot see?
13
16
  *
@@ -17,6 +20,9 @@
17
20
  */
18
21
  export declare function targetsUnobservedChannel(url: string | undefined): boolean;
19
22
  export declare function targetsNativeDownload(url: string | undefined): boolean;
23
+ export declare function targetsMediaLoad(url: string | undefined): boolean;
24
+ /** `filter` is the net clause as applied — `describeNetFilter` of it. */
25
+ export declare function mediaLoadReason(filter: string): string;
20
26
  /** `filter` is the net clause as applied — `describeNetFilter` of it. */
21
27
  export declare function nativeDownloadReason(filter: string): string;
22
28
  /** The sentence both zero-match branches hand to `inconclusive`; `filter` as `nativeDownloadReason`. */
@@ -47,3 +53,36 @@ export declare function unobservedChannelReason(filter: string): string;
47
53
  * that can settle it, because the state such a request produces IS observable after attach.
48
54
  */
49
55
  export declare const PRE_ATTACH_CAVEAT: string;
56
+ /** `filter` is the net clause as applied — `describeNetFilter` of it. */
57
+ export declare function earlierMediaReason(filter: string): string;
58
+ /** The oracle that reports a miss over a request sent through an unpatched `fetch`. */
59
+ export declare const UNPATCHED_FETCH_ASSERTION = "net.unpatched-fetch";
60
+ /**
61
+ * Why a `net` miss is unknown when the browser recorded a matching request that no patched
62
+ * transport saw. `filter` is the net clause as applied — `describeNetFilter` of it.
63
+ *
64
+ * A client library can store `window.fetch` when its module loads, before Reticle patches it. A
65
+ * call through the stored function makes no `net.request`, so "no call matched" is false: the
66
+ * server got the request (#1660).
67
+ */
68
+ export declare function unpatchedFetchReason(filter: string): string;
69
+ /** The oracle that reports a miss over a request whose page unloaded before its answer (#1944). */
70
+ export declare const PAGE_UNLOADED_ASSERTION = "net.page-unloaded";
71
+ /**
72
+ * Why a `net` miss is unknown when the page sent a matching request and then unloaded before the
73
+ * answer arrived. `filter` is the net clause as applied — `describeNetFilter` of it.
74
+ *
75
+ * A click can send a POST and then load a new document. Nobody records an answer that comes after
76
+ * the unload. The daemon carries the request into the new session marked `pageUnloaded`, so the
77
+ * record says the page sent it. "No call matched" would say it never did (#1944).
78
+ */
79
+ export declare function pageUnloadedReason(filter: string): string;
80
+ /** The net clause a miss is judged against, as `describeNetFilter` takes it. */
81
+ type NetClause = Parameters<typeof describeNetFilter>[0];
82
+ /**
83
+ * `unknown` when a matching call happened and its record cannot answer: no patched transport saw it
84
+ * (#1660), or its page unloaded before the answer arrived (#1944). Else `undefined`. `observed` is
85
+ * read only when the miss is reported.
86
+ */
87
+ export declare function unrecordedCallMiss(events: Parameters<typeof unpatchedInWindow>[0], p: NetClause, observed: () => string): EvalResult | undefined;
88
+ export {};
@@ -6,8 +6,11 @@
6
6
  * zero-match `net` verdict says "not observable" or names its blind stretch, instead of "never
7
7
  * happened". Split from `predicate-eval.ts`, which decides the verdict; this only knows the channel.
8
8
  *
9
- * Takes the filter's parts rather than the predicate, so it needs nothing from the contract.
9
+ * Takes the filter's parts rather than the predicate, so it needs nothing from the contract. The
10
+ * one exception is `unrecordedCallMiss`, which builds the whole `unknown` result for a net clause.
10
11
  */
12
+ import { unloadedInWindow, unpatchedInWindow } from '../../window/event-filters.js';
13
+ import { describeNetFilter } from './predicate-eval-kit.js';
11
14
  /**
12
15
  * URL suffixes only the DOCUMENT fetches, which the network observer therefore never records.
13
16
  *
@@ -78,6 +81,30 @@ const NATIVE_DOWNLOAD_SUFFIXES = [
78
81
  '.7z',
79
82
  '.rar',
80
83
  ];
84
+ /**
85
+ * File suffixes a media element (`<video>`, `<audio>`, `<track>`) loads.
86
+ *
87
+ * Unlike DOCUMENT_ONLY_SUFFIXES this is not gated on a live resource-timing observer: Chromium does
88
+ * not report media element loads as `resource` entries, so a page that plays the file leaves no
89
+ * record however live the observer is. A miss over one of these says nothing about the file.
90
+ */
91
+ const MEDIA_LOAD_SUFFIXES = [
92
+ '.mp4',
93
+ '.m4v',
94
+ '.webm',
95
+ '.mov',
96
+ '.ogv',
97
+ '.m3u8',
98
+ '.mp3',
99
+ '.m4a',
100
+ '.ogg',
101
+ '.oga',
102
+ '.wav',
103
+ '.aac',
104
+ '.flac',
105
+ '.opus',
106
+ '.vtt',
107
+ ];
81
108
  /**
82
109
  * Does this filter target a class of request the observer cannot see?
83
110
  *
@@ -105,6 +132,20 @@ export function targetsNativeDownload(url) {
105
132
  return false;
106
133
  return NATIVE_DOWNLOAD_SUFFIXES.some((suffix) => filterPath(url).endsWith(suffix));
107
134
  }
135
+ export function targetsMediaLoad(url) {
136
+ if (undefined === url) {
137
+ return false;
138
+ }
139
+ return MEDIA_LOAD_SUFFIXES.some((suffix) => filterPath(url).endsWith(suffix));
140
+ }
141
+ /** `filter` is the net clause as applied — `describeNetFilter` of it. */
142
+ export function mediaLoadReason(filter) {
143
+ return (`no fetch or XHR matched ${filter}. A media element (<video>, <audio>, <track>) loads its ` +
144
+ `source itself: the load goes through neither fetch nor XMLHttpRequest, and the browser does ` +
145
+ `not report it as a resource timing entry, so media element loads are not observed and an ` +
146
+ `empty net window is not evidence the file failed to load. Assert something that proves ` +
147
+ `playback instead, for example an element check on the <video> or <audio>`);
148
+ }
108
149
  /** `filter` is the net clause as applied — `describeNetFilter` of it. */
109
150
  export function nativeDownloadReason(filter) {
110
151
  return (`no fetch or XHR matched ${filter}. A native download or document navigation ` +
@@ -151,3 +192,71 @@ export function unobservedChannelReason(filter) {
151
192
  export const PRE_ATTACH_CAVEAT = ' — note that this window starts where the SDK attached, and requests made before that are never ' +
152
193
  'captured, so a miss here cannot tell a call that was never made apart from one made before the ' +
153
194
  'page connected; if the call is expected during startup, assert on the state it produces instead';
195
+ /** `filter` is the net clause as applied — `describeNetFilter` of it. */
196
+ export function earlierMediaReason(filter) {
197
+ return (`no fetch or XHR matched ${filter}, and the one media load that did match it was recorded ` +
198
+ `before this window opened. The network observer reports only the first resource timing ` +
199
+ `entry for a URL, and a media element load leaves no other record, so a repeat load inside ` +
200
+ `this window is not reported either: the empty window cannot show the file did not load in ` +
201
+ `it. Assert something that proves playback instead, for example an element check on the ` +
202
+ `<video> or <audio>`);
203
+ }
204
+ /** The oracle that reports a miss over a request sent through an unpatched `fetch`. */
205
+ export const UNPATCHED_FETCH_ASSERTION = 'net.unpatched-fetch';
206
+ /**
207
+ * Why a `net` miss is unknown when the browser recorded a matching request that no patched
208
+ * transport saw. `filter` is the net clause as applied — `describeNetFilter` of it.
209
+ *
210
+ * A client library can store `window.fetch` when its module loads, before Reticle patches it. A
211
+ * call through the stored function makes no `net.request`, so "no call matched" is false: the
212
+ * server got the request (#1660).
213
+ */
214
+ export function unpatchedFetchReason(filter) {
215
+ return (`no recorded call matched ${filter}, but the browser recorded a request to a matching URL ` +
216
+ `that Reticle did not see. The request went through a fetch saved before Reticle connected ` +
217
+ `(a client library that stores window.fetch when it loads does this). Its method, status and ` +
218
+ `body are not known, so this clause cannot be judged. Connect Reticle earlier: add the build ` +
219
+ `plugin (@reticlehq/vite-plugin or @reticlehq/next), which runs connect() before the app code`);
220
+ }
221
+ /** The oracle that reports a miss over a request whose page unloaded before its answer (#1944). */
222
+ export const PAGE_UNLOADED_ASSERTION = 'net.page-unloaded';
223
+ /**
224
+ * Why a `net` miss is unknown when the page sent a matching request and then unloaded before the
225
+ * answer arrived. `filter` is the net clause as applied — `describeNetFilter` of it.
226
+ *
227
+ * A click can send a POST and then load a new document. Nobody records an answer that comes after
228
+ * the unload. The daemon carries the request into the new session marked `pageUnloaded`, so the
229
+ * record says the page sent it. "No call matched" would say it never did (#1944).
230
+ */
231
+ export function pageUnloadedReason(filter) {
232
+ return (`the page sent a request matching ${filter}, and then its document unloaded before the answer ` +
233
+ 'arrived. Nothing recorded the answer, so its status and body are unknown. This is not a ' +
234
+ 'missing request. To prove the outcome, assert the state the request makes on the new page, ' +
235
+ 'or make the request finish before the page navigates');
236
+ }
237
+ /**
238
+ * `unknown` when a matching call happened and its record cannot answer: no patched transport saw it
239
+ * (#1660), or its page unloaded before the answer arrived (#1944). Else `undefined`. `observed` is
240
+ * read only when the miss is reported.
241
+ */
242
+ export function unrecordedCallMiss(events, p, observed) {
243
+ const since = p.since ?? 0;
244
+ const filter = describeNetFilter(p);
245
+ let reason = unpatchedFetchReason(filter);
246
+ let assertion = UNPATCHED_FETCH_ASSERTION;
247
+ if (!unpatchedInWindow(events, since, p.urlContains)) {
248
+ if (!unloadedInWindow(events, since, p.method, p.urlContains)) {
249
+ return undefined;
250
+ }
251
+ reason = pageUnloadedReason(filter);
252
+ assertion = PAGE_UNLOADED_ASSERTION;
253
+ }
254
+ return {
255
+ pass: false,
256
+ failureReason: reason,
257
+ inconclusive: reason,
258
+ observed: observed(),
259
+ expected: `a recorded call matching ${filter}`,
260
+ assertion,
261
+ };
262
+ }
@@ -0,0 +1,52 @@
1
+ import { type EvalResult } from './predicate-eval-kit.js';
2
+ import type { PredicateSession } from './predicate-session.js';
3
+ export interface AnimationRuntime {
4
+ readonly startEventType: string;
5
+ readonly endEventType: string;
6
+ readonly animationsCommand: string;
7
+ readonly targetArg: string;
8
+ }
9
+ interface AnimationInputEvent {
10
+ type: string;
11
+ data: Record<string, unknown>;
12
+ ref?: string | undefined;
13
+ }
14
+ export interface AnimationEvent {
15
+ completed: boolean;
16
+ data: Record<string, unknown>;
17
+ ref?: string;
18
+ }
19
+ export interface AnimationPredicate {
20
+ name?: string;
21
+ target?: string;
22
+ completed?: boolean;
23
+ since?: number;
24
+ }
25
+ interface AnimationTargetDescriptor {
26
+ ref?: string;
27
+ role?: string;
28
+ name?: string;
29
+ text?: string;
30
+ }
31
+ export interface AnimationObservation {
32
+ name?: string;
33
+ playState?: string;
34
+ target?: AnimationTargetDescriptor | null;
35
+ targetMatches?: boolean;
36
+ }
37
+ export interface AnimationTargetResolution {
38
+ target?: string;
39
+ matched?: boolean;
40
+ refs?: readonly string[];
41
+ count?: number;
42
+ invalid?: boolean;
43
+ truncated?: boolean;
44
+ }
45
+ export interface AnimationSnapshot {
46
+ animations: readonly AnimationObservation[];
47
+ target?: AnimationTargetResolution;
48
+ }
49
+ export declare function animationSnapshotFrom(value: unknown): AnimationSnapshot | undefined;
50
+ export declare function evalAnimation(events: readonly AnimationEvent[], p: AnimationPredicate, live?: AnimationSnapshot): EvalResult;
51
+ export declare function evalAnimationPredicate(session: PredicateSession, events: AnimationInputEvent[], predicate: AnimationPredicate, floor: number, runtime: AnimationRuntime): Promise<EvalResult>;
52
+ export {};