@getuserfeedback/protocol 3.0.9 → 3.0.11
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/host/index.d.ts +1 -0
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.js +1 -0
- package/dist/host/widget-layout-transition-plan.d.ts +24 -0
- package/dist/host/widget-layout-transition-plan.d.ts.map +1 -0
- package/dist/host/widget-layout-transition-plan.js +60 -0
- package/package.json +1 -1
- package/src/host/index.ts +1 -0
- package/src/host/widget-layout-transition-plan.test.ts +182 -0
- package/src/host/widget-layout-transition-plan.ts +107 -0
package/dist/host/index.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export { createCommandRequestId } from "./request-id.js";
|
|
|
12
12
|
export * from "./sdk-types.js";
|
|
13
13
|
export { createUniqueId } from "./unique-id.js";
|
|
14
14
|
export * from "./widget-layout-size-update.js";
|
|
15
|
+
export * from "./widget-layout-transition-plan.js";
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/host/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,cAAc,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC"}
|
package/dist/host/index.js
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { WidgetLayoutSize, WidgetLayoutSizeUpdate, WidgetLayoutTimedSizeUpdate } from "./widget-layout-size-update.js";
|
|
2
|
+
export type WidgetLayoutComparableSizeUpdate = WidgetLayoutSizeUpdate | WidgetLayoutTimedSizeUpdate;
|
|
3
|
+
export type WidgetLayoutUnchangedTransitionPlan = {
|
|
4
|
+
kind: "unchanged";
|
|
5
|
+
size: WidgetLayoutSize;
|
|
6
|
+
update: WidgetLayoutSizeUpdate;
|
|
7
|
+
observedAtMs: number;
|
|
8
|
+
};
|
|
9
|
+
export type WidgetLayoutInstantTransitionPlan = {
|
|
10
|
+
kind: "instant";
|
|
11
|
+
size: WidgetLayoutSize;
|
|
12
|
+
update: WidgetLayoutSizeUpdate;
|
|
13
|
+
startedAtMs: number;
|
|
14
|
+
settledAtMs: number;
|
|
15
|
+
};
|
|
16
|
+
export type WidgetLayoutTransitionPlan = WidgetLayoutUnchangedTransitionPlan | WidgetLayoutInstantTransitionPlan;
|
|
17
|
+
export declare function getWidgetLayoutPlanNowMs(): number;
|
|
18
|
+
export declare function areWidgetLayoutSizeUpdatesEqual(left: WidgetLayoutComparableSizeUpdate | undefined, right: WidgetLayoutComparableSizeUpdate): boolean;
|
|
19
|
+
export declare function planWidgetLayoutTransition(input: {
|
|
20
|
+
previous?: WidgetLayoutSizeUpdate;
|
|
21
|
+
next: WidgetLayoutSizeUpdate;
|
|
22
|
+
nowMs: number;
|
|
23
|
+
}): WidgetLayoutTransitionPlan;
|
|
24
|
+
//# sourceMappingURL=widget-layout-transition-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-layout-transition-plan.d.ts","sourceRoot":"","sources":["../../src/host/widget-layout-transition-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,MAAM,gCAAgC,CAAC;AAExC,MAAM,MAAM,gCAAgC,GACzC,sBAAsB,GACtB,2BAA2B,CAAC;AAE/B,MAAM,MAAM,mCAAmC,GAAG;IACjD,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC/C,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GACnC,mCAAmC,GACnC,iCAAiC,CAAC;AAErC,wBAAgB,wBAAwB,IAAI,MAAM,CAQjD;AAED,wBAAgB,+BAA+B,CAC9C,IAAI,EAAE,gCAAgC,GAAG,SAAS,EAClD,KAAK,EAAE,gCAAgC,GACrC,OAAO,CAiCT;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IACjD,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;CACd,GAAG,0BAA0B,CAyB7B"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export function getWidgetLayoutPlanNowMs() {
|
|
2
|
+
const performanceNow = typeof globalThis.performance?.now === "function"
|
|
3
|
+
? globalThis.performance.now()
|
|
4
|
+
: undefined;
|
|
5
|
+
return typeof performanceNow === "number" && Number.isFinite(performanceNow)
|
|
6
|
+
? performanceNow
|
|
7
|
+
: Date.now();
|
|
8
|
+
}
|
|
9
|
+
export function areWidgetLayoutSizeUpdatesEqual(left, right) {
|
|
10
|
+
if (left?.size.width !== right.size.width ||
|
|
11
|
+
left.size.height !== right.size.height ||
|
|
12
|
+
left.transition.kind !== right.transition.kind ||
|
|
13
|
+
left.transition.durationMs !== right.transition.durationMs) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const leftTransition = left.transition;
|
|
17
|
+
const rightTransition = right.transition;
|
|
18
|
+
switch (rightTransition.kind) {
|
|
19
|
+
case "instant":
|
|
20
|
+
return true;
|
|
21
|
+
case "timed":
|
|
22
|
+
if (leftTransition.kind !== "timed") {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return (leftTransition.easing.kind === rightTransition.easing.kind &&
|
|
26
|
+
leftTransition.easing.points.length ===
|
|
27
|
+
rightTransition.easing.points.length &&
|
|
28
|
+
leftTransition.easing.points.every((point, index) => point === rightTransition.easing.points[index]));
|
|
29
|
+
default: {
|
|
30
|
+
const unreachable = rightTransition;
|
|
31
|
+
throw new Error(`Unsupported widget layout transition: ${JSON.stringify(unreachable)}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export function planWidgetLayoutTransition(input) {
|
|
36
|
+
if (!Number.isFinite(input.nowMs)) {
|
|
37
|
+
throw new RangeError("Widget layout transition plans require finite nowMs");
|
|
38
|
+
}
|
|
39
|
+
if (areWidgetLayoutSizeUpdatesEqual(input.previous, input.next)) {
|
|
40
|
+
return {
|
|
41
|
+
kind: "unchanged",
|
|
42
|
+
size: { ...input.next.size },
|
|
43
|
+
update: {
|
|
44
|
+
size: { ...input.next.size },
|
|
45
|
+
transition: { ...input.next.transition },
|
|
46
|
+
},
|
|
47
|
+
observedAtMs: input.nowMs,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
kind: "instant",
|
|
52
|
+
size: { ...input.next.size },
|
|
53
|
+
update: {
|
|
54
|
+
size: { ...input.next.size },
|
|
55
|
+
transition: { ...input.next.transition },
|
|
56
|
+
},
|
|
57
|
+
startedAtMs: input.nowMs,
|
|
58
|
+
settledAtMs: input.nowMs,
|
|
59
|
+
};
|
|
60
|
+
}
|
package/package.json
CHANGED
package/src/host/index.ts
CHANGED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import {
|
|
3
|
+
toInstantWidgetLayoutSizeUpdate,
|
|
4
|
+
toTimedWidgetLayoutSizeUpdate,
|
|
5
|
+
} from "./widget-layout-size-update.js";
|
|
6
|
+
import {
|
|
7
|
+
areWidgetLayoutSizeUpdatesEqual,
|
|
8
|
+
getWidgetLayoutPlanNowMs,
|
|
9
|
+
planWidgetLayoutTransition,
|
|
10
|
+
} from "./widget-layout-transition-plan.js";
|
|
11
|
+
|
|
12
|
+
describe("widget layout transition plan", () => {
|
|
13
|
+
test("uses the browser monotonic clock for layout plan timestamps", () => {
|
|
14
|
+
const originalPerformanceDescriptor = Object.getOwnPropertyDescriptor(
|
|
15
|
+
globalThis,
|
|
16
|
+
"performance",
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
Object.defineProperty(globalThis, "performance", {
|
|
21
|
+
configurable: true,
|
|
22
|
+
value: {
|
|
23
|
+
now: () => 123.45,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
expect(getWidgetLayoutPlanNowMs()).toBe(123.45);
|
|
28
|
+
} finally {
|
|
29
|
+
if (originalPerformanceDescriptor) {
|
|
30
|
+
Object.defineProperty(
|
|
31
|
+
globalThis,
|
|
32
|
+
"performance",
|
|
33
|
+
originalPerformanceDescriptor,
|
|
34
|
+
);
|
|
35
|
+
} else {
|
|
36
|
+
Reflect.deleteProperty(globalThis, "performance");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test("falls back to Date.now when the monotonic clock is unavailable", () => {
|
|
42
|
+
const originalNow = Date.now;
|
|
43
|
+
const originalPerformanceDescriptor = Object.getOwnPropertyDescriptor(
|
|
44
|
+
globalThis,
|
|
45
|
+
"performance",
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
Date.now = () => 1_700;
|
|
50
|
+
Object.defineProperty(globalThis, "performance", {
|
|
51
|
+
configurable: true,
|
|
52
|
+
value: {
|
|
53
|
+
now: () => Number.NaN,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
expect(getWidgetLayoutPlanNowMs()).toBe(1_700);
|
|
58
|
+
} finally {
|
|
59
|
+
Date.now = originalNow;
|
|
60
|
+
if (originalPerformanceDescriptor) {
|
|
61
|
+
Object.defineProperty(
|
|
62
|
+
globalThis,
|
|
63
|
+
"performance",
|
|
64
|
+
originalPerformanceDescriptor,
|
|
65
|
+
);
|
|
66
|
+
} else {
|
|
67
|
+
Reflect.deleteProperty(globalThis, "performance");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test("plans the first instant layout update at the requested time", () => {
|
|
73
|
+
const next = toInstantWidgetLayoutSizeUpdate({ width: 320, height: 240 });
|
|
74
|
+
|
|
75
|
+
expect(
|
|
76
|
+
planWidgetLayoutTransition({
|
|
77
|
+
next,
|
|
78
|
+
nowMs: 1_000,
|
|
79
|
+
}),
|
|
80
|
+
).toEqual({
|
|
81
|
+
kind: "instant",
|
|
82
|
+
size: { width: 320, height: 240 },
|
|
83
|
+
update: {
|
|
84
|
+
size: { width: 320, height: 240 },
|
|
85
|
+
transition: {
|
|
86
|
+
kind: "instant",
|
|
87
|
+
durationMs: 0,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
startedAtMs: 1_000,
|
|
91
|
+
settledAtMs: 1_000,
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test("keeps repeated identical instant updates explicit as unchanged", () => {
|
|
96
|
+
const previous = toInstantWidgetLayoutSizeUpdate({
|
|
97
|
+
width: 320,
|
|
98
|
+
height: 240,
|
|
99
|
+
});
|
|
100
|
+
const next = toInstantWidgetLayoutSizeUpdate({ width: 320, height: 240 });
|
|
101
|
+
|
|
102
|
+
expect(
|
|
103
|
+
planWidgetLayoutTransition({
|
|
104
|
+
previous,
|
|
105
|
+
next,
|
|
106
|
+
nowMs: 1_250,
|
|
107
|
+
}),
|
|
108
|
+
).toMatchObject({
|
|
109
|
+
kind: "unchanged",
|
|
110
|
+
observedAtMs: 1_250,
|
|
111
|
+
});
|
|
112
|
+
expect(areWidgetLayoutSizeUpdatesEqual(previous, next)).toBe(true);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test("compares the full timed transition shape before it is live", () => {
|
|
116
|
+
const base = {
|
|
117
|
+
size: { width: 320, height: 240 },
|
|
118
|
+
durationMs: 180,
|
|
119
|
+
} as const;
|
|
120
|
+
|
|
121
|
+
expect(
|
|
122
|
+
areWidgetLayoutSizeUpdatesEqual(
|
|
123
|
+
toTimedWidgetLayoutSizeUpdate({ ...base, easing: [0.2, 0, 0, 1] }),
|
|
124
|
+
toTimedWidgetLayoutSizeUpdate({ ...base, easing: [0.2, 0, 0, 1] }),
|
|
125
|
+
),
|
|
126
|
+
).toBe(true);
|
|
127
|
+
expect(
|
|
128
|
+
areWidgetLayoutSizeUpdatesEqual(
|
|
129
|
+
toTimedWidgetLayoutSizeUpdate({ ...base, easing: [0.2, 0, 0, 1] }),
|
|
130
|
+
toTimedWidgetLayoutSizeUpdate({ ...base, easing: [0.3, 0, 0, 1] }),
|
|
131
|
+
),
|
|
132
|
+
).toBe(false);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
test("treats size changes as instant while the live protocol is instant-only", () => {
|
|
136
|
+
const previous = toInstantWidgetLayoutSizeUpdate({
|
|
137
|
+
width: 320,
|
|
138
|
+
height: 240,
|
|
139
|
+
});
|
|
140
|
+
const next = toInstantWidgetLayoutSizeUpdate({ width: 320, height: 360 });
|
|
141
|
+
|
|
142
|
+
expect(
|
|
143
|
+
planWidgetLayoutTransition({
|
|
144
|
+
previous,
|
|
145
|
+
next,
|
|
146
|
+
nowMs: 1_500,
|
|
147
|
+
}),
|
|
148
|
+
).toMatchObject({
|
|
149
|
+
kind: "instant",
|
|
150
|
+
size: { width: 320, height: 360 },
|
|
151
|
+
startedAtMs: 1_500,
|
|
152
|
+
settledAtMs: 1_500,
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
test("does not leak mutable references from the next update", () => {
|
|
157
|
+
const next = {
|
|
158
|
+
size: { width: 320, height: 240 },
|
|
159
|
+
transition: { kind: "instant", durationMs: 0 },
|
|
160
|
+
} as const;
|
|
161
|
+
const plan = planWidgetLayoutTransition({
|
|
162
|
+
next,
|
|
163
|
+
nowMs: 1_000,
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
(next.size as { height: number }).height = 360;
|
|
167
|
+
(next.transition as { durationMs: number }).durationMs = 1;
|
|
168
|
+
|
|
169
|
+
expect(plan.size).toEqual({ width: 320, height: 240 });
|
|
170
|
+
expect(plan.update.size).toEqual({ width: 320, height: 240 });
|
|
171
|
+
expect(plan.update.transition.durationMs).toBe(0);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
test("rejects non-finite plan time", () => {
|
|
175
|
+
expect(() =>
|
|
176
|
+
planWidgetLayoutTransition({
|
|
177
|
+
next: toInstantWidgetLayoutSizeUpdate({ width: 320, height: 240 }),
|
|
178
|
+
nowMs: Number.NaN,
|
|
179
|
+
}),
|
|
180
|
+
).toThrow(RangeError);
|
|
181
|
+
});
|
|
182
|
+
});
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
WidgetLayoutSize,
|
|
3
|
+
WidgetLayoutSizeUpdate,
|
|
4
|
+
WidgetLayoutTimedSizeUpdate,
|
|
5
|
+
} from "./widget-layout-size-update.js";
|
|
6
|
+
|
|
7
|
+
export type WidgetLayoutComparableSizeUpdate =
|
|
8
|
+
| WidgetLayoutSizeUpdate
|
|
9
|
+
| WidgetLayoutTimedSizeUpdate;
|
|
10
|
+
|
|
11
|
+
export type WidgetLayoutUnchangedTransitionPlan = {
|
|
12
|
+
kind: "unchanged";
|
|
13
|
+
size: WidgetLayoutSize;
|
|
14
|
+
update: WidgetLayoutSizeUpdate;
|
|
15
|
+
observedAtMs: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type WidgetLayoutInstantTransitionPlan = {
|
|
19
|
+
kind: "instant";
|
|
20
|
+
size: WidgetLayoutSize;
|
|
21
|
+
update: WidgetLayoutSizeUpdate;
|
|
22
|
+
startedAtMs: number;
|
|
23
|
+
settledAtMs: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type WidgetLayoutTransitionPlan =
|
|
27
|
+
| WidgetLayoutUnchangedTransitionPlan
|
|
28
|
+
| WidgetLayoutInstantTransitionPlan;
|
|
29
|
+
|
|
30
|
+
export function getWidgetLayoutPlanNowMs(): number {
|
|
31
|
+
const performanceNow =
|
|
32
|
+
typeof globalThis.performance?.now === "function"
|
|
33
|
+
? globalThis.performance.now()
|
|
34
|
+
: undefined;
|
|
35
|
+
return typeof performanceNow === "number" && Number.isFinite(performanceNow)
|
|
36
|
+
? performanceNow
|
|
37
|
+
: Date.now();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function areWidgetLayoutSizeUpdatesEqual(
|
|
41
|
+
left: WidgetLayoutComparableSizeUpdate | undefined,
|
|
42
|
+
right: WidgetLayoutComparableSizeUpdate,
|
|
43
|
+
): boolean {
|
|
44
|
+
if (
|
|
45
|
+
left?.size.width !== right.size.width ||
|
|
46
|
+
left.size.height !== right.size.height ||
|
|
47
|
+
left.transition.kind !== right.transition.kind ||
|
|
48
|
+
left.transition.durationMs !== right.transition.durationMs
|
|
49
|
+
) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
const leftTransition = left.transition;
|
|
53
|
+
const rightTransition = right.transition;
|
|
54
|
+
switch (rightTransition.kind) {
|
|
55
|
+
case "instant":
|
|
56
|
+
return true;
|
|
57
|
+
case "timed":
|
|
58
|
+
if (leftTransition.kind !== "timed") {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
return (
|
|
62
|
+
leftTransition.easing.kind === rightTransition.easing.kind &&
|
|
63
|
+
leftTransition.easing.points.length ===
|
|
64
|
+
rightTransition.easing.points.length &&
|
|
65
|
+
leftTransition.easing.points.every(
|
|
66
|
+
(point, index) => point === rightTransition.easing.points[index],
|
|
67
|
+
)
|
|
68
|
+
);
|
|
69
|
+
default: {
|
|
70
|
+
const unreachable: never = rightTransition;
|
|
71
|
+
throw new Error(
|
|
72
|
+
`Unsupported widget layout transition: ${JSON.stringify(unreachable)}`,
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function planWidgetLayoutTransition(input: {
|
|
79
|
+
previous?: WidgetLayoutSizeUpdate;
|
|
80
|
+
next: WidgetLayoutSizeUpdate;
|
|
81
|
+
nowMs: number;
|
|
82
|
+
}): WidgetLayoutTransitionPlan {
|
|
83
|
+
if (!Number.isFinite(input.nowMs)) {
|
|
84
|
+
throw new RangeError("Widget layout transition plans require finite nowMs");
|
|
85
|
+
}
|
|
86
|
+
if (areWidgetLayoutSizeUpdatesEqual(input.previous, input.next)) {
|
|
87
|
+
return {
|
|
88
|
+
kind: "unchanged",
|
|
89
|
+
size: { ...input.next.size },
|
|
90
|
+
update: {
|
|
91
|
+
size: { ...input.next.size },
|
|
92
|
+
transition: { ...input.next.transition },
|
|
93
|
+
},
|
|
94
|
+
observedAtMs: input.nowMs,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
kind: "instant",
|
|
99
|
+
size: { ...input.next.size },
|
|
100
|
+
update: {
|
|
101
|
+
size: { ...input.next.size },
|
|
102
|
+
transition: { ...input.next.transition },
|
|
103
|
+
},
|
|
104
|
+
startedAtMs: input.nowMs,
|
|
105
|
+
settledAtMs: input.nowMs,
|
|
106
|
+
};
|
|
107
|
+
}
|