@getuserfeedback/protocol 1.3.0 → 1.3.1
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/host-event-contract.d.ts +2 -0
- package/dist/host/host-event-contract.d.ts.map +1 -1
- package/dist/host/host-event-contract.js +3 -2
- package/dist/webview-transport.d.ts +2 -0
- package/dist/webview-transport.d.ts.map +1 -1
- package/dist/webview-transport.js +4 -1
- package/package.json +2 -1
- package/src/host/host-event-contract.ts +5 -2
- package/src/webview-transport.ts +4 -1
|
@@ -21,6 +21,8 @@ export interface FlowStateChangedDetail extends FlowState {
|
|
|
21
21
|
}
|
|
22
22
|
export interface InstanceFlowStateChangedDetail extends FlowState {
|
|
23
23
|
instanceId: string;
|
|
24
|
+
/** Flow handle for the currently pinned aggregate flow, when known. */
|
|
25
|
+
flowHandleId?: string;
|
|
24
26
|
}
|
|
25
27
|
export interface OpenRequestedDetail {
|
|
26
28
|
instanceId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-event-contract.d.ts","sourceRoot":"","sources":["../../src/host/host-event-contract.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,6FAA6F;AAC7F,MAAM,WAAW,SAAS;IACzB,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA+B,SAAQ,SAAS;IAChE,UAAU,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"host-event-contract.d.ts","sourceRoot":"","sources":["../../src/host/host-event-contract.ts"],"names":[],"mappings":"AA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BAAwB,CAAC;AAElE;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE;IACzD,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,0BAA0B,GAAG,IAAI,CAEpC;AAcD;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE;IACzD,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,wBAAwB,GAAG,IAAI,CAgBlC"}
|
|
@@ -34,12 +34,13 @@ export function isFlowStateChangedDetail(detail) {
|
|
|
34
34
|
export function isInstanceFlowStateChangedDetail(detail) {
|
|
35
35
|
if (!isRecord(detail))
|
|
36
36
|
return false;
|
|
37
|
-
const { instanceId, isOpen, isLoading, width, height } = detail;
|
|
37
|
+
const { instanceId, isOpen, isLoading, width, height, flowHandleId } = detail;
|
|
38
38
|
return (isNonEmptyString(instanceId) &&
|
|
39
39
|
typeof isOpen === "boolean" &&
|
|
40
40
|
typeof isLoading === "boolean" &&
|
|
41
41
|
(typeof width === "undefined" || typeof width === "number") &&
|
|
42
|
-
(typeof height === "undefined" || typeof height === "number")
|
|
42
|
+
(typeof height === "undefined" || typeof height === "number") &&
|
|
43
|
+
(typeof flowHandleId === "undefined" || isNonEmptyString(flowHandleId)));
|
|
43
44
|
}
|
|
44
45
|
export function isOpenRequestedDetail(detail) {
|
|
45
46
|
if (!isRecord(detail))
|
|
@@ -886,6 +886,7 @@ export declare const webViewTransportHostEventSchema: z.ZodMiniDiscriminatedUnio
|
|
|
886
886
|
}, z.core.$strict>, z.ZodMiniObject<{
|
|
887
887
|
name: z.ZodMiniLiteral<"instance:flow:state-changed:instance">;
|
|
888
888
|
detail: z.ZodMiniObject<{
|
|
889
|
+
flowHandleId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
889
890
|
instanceId: z.ZodMiniString<string>;
|
|
890
891
|
isOpen: z.ZodMiniBoolean<boolean>;
|
|
891
892
|
isLoading: z.ZodMiniBoolean<boolean>;
|
|
@@ -1470,6 +1471,7 @@ export declare const webViewTransportWebMessageSchema: z.ZodMiniDiscriminatedUni
|
|
|
1470
1471
|
}, z.core.$strict>, z.ZodMiniObject<{
|
|
1471
1472
|
name: z.ZodMiniLiteral<"instance:flow:state-changed:instance">;
|
|
1472
1473
|
detail: z.ZodMiniObject<{
|
|
1474
|
+
flowHandleId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
1473
1475
|
instanceId: z.ZodMiniString<string>;
|
|
1474
1476
|
isOpen: z.ZodMiniBoolean<boolean>;
|
|
1475
1477
|
isLoading: z.ZodMiniBoolean<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webview-transport.d.ts","sourceRoot":"","sources":["../src/webview-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAgB9B,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOvC,CAAC;
|
|
1
|
+
{"version":3,"file":"webview-transport.d.ts","sourceRoot":"","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAa3C,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,4BAA4B,CACnC,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CACnD,OAAO,mCAAmC,CAC1C,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,+BAA+B,CACtC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,gCAAgC,CACvC,CAAC;AAEF,wBAAgB,kCAAkC,CACjD,KAAK,EAAE,OAAO,GACZ,6BAA6B,CAE/B;AAED,wBAAgB,+BAA+B,CAC9C,KAAK,EAAE,OAAO,GACZ,0BAA0B,CAE5B"}
|
|
@@ -45,7 +45,10 @@ const flowStateChangedDetailSchema = z.strictObject({
|
|
|
45
45
|
...flowStateBase,
|
|
46
46
|
flowHandleId: nonEmptyStringSchema,
|
|
47
47
|
});
|
|
48
|
-
const instanceFlowStateChangedDetailSchema = z.strictObject(
|
|
48
|
+
const instanceFlowStateChangedDetailSchema = z.strictObject({
|
|
49
|
+
...flowStateBase,
|
|
50
|
+
flowHandleId: z.optional(nonEmptyStringSchema),
|
|
51
|
+
});
|
|
49
52
|
const openRequestedDetailSchema = z.strictObject({
|
|
50
53
|
instanceId: nonEmptyStringSchema,
|
|
51
54
|
source: z.enum(["command", "targeting"]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getuserfeedback/protocol",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "getuserfeedback widget protocol — host surface and (later) wire protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"getuserfeedback",
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
"types": "bun ../../scripts/clean-build-output.ts dist tsconfig.tsbuildinfo && tsc -b tsconfig.json --emitDeclarationOnly",
|
|
120
120
|
"typecheck": "tsc -b tsconfig.json",
|
|
121
121
|
"test": "bun test --dots",
|
|
122
|
+
"test:changed": "bun test --changed=${TEST_CHANGED_BASE:-HEAD} --pass-with-no-tests --dots",
|
|
122
123
|
"pack:verify": "node ../../scripts/pack-and-verify.cjs",
|
|
123
124
|
"publish:dry-run": "node ../../scripts/publish-package.cjs . -- --dry-run",
|
|
124
125
|
"publish:npm": "node ../../scripts/publish-package.cjs ."
|
|
@@ -24,6 +24,8 @@ export interface FlowStateChangedDetail extends FlowState {
|
|
|
24
24
|
|
|
25
25
|
export interface InstanceFlowStateChangedDetail extends FlowState {
|
|
26
26
|
instanceId: string;
|
|
27
|
+
/** Flow handle for the currently pinned aggregate flow, when known. */
|
|
28
|
+
flowHandleId?: string;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
export interface OpenRequestedDetail {
|
|
@@ -116,13 +118,14 @@ export function isInstanceFlowStateChangedDetail(
|
|
|
116
118
|
detail: unknown,
|
|
117
119
|
): detail is InstanceFlowStateChangedDetail {
|
|
118
120
|
if (!isRecord(detail)) return false;
|
|
119
|
-
const { instanceId, isOpen, isLoading, width, height } = detail;
|
|
121
|
+
const { instanceId, isOpen, isLoading, width, height, flowHandleId } = detail;
|
|
120
122
|
return (
|
|
121
123
|
isNonEmptyString(instanceId) &&
|
|
122
124
|
typeof isOpen === "boolean" &&
|
|
123
125
|
typeof isLoading === "boolean" &&
|
|
124
126
|
(typeof width === "undefined" || typeof width === "number") &&
|
|
125
|
-
(typeof height === "undefined" || typeof height === "number")
|
|
127
|
+
(typeof height === "undefined" || typeof height === "number") &&
|
|
128
|
+
(typeof flowHandleId === "undefined" || isNonEmptyString(flowHandleId))
|
|
126
129
|
);
|
|
127
130
|
}
|
|
128
131
|
|
package/src/webview-transport.ts
CHANGED
|
@@ -55,7 +55,10 @@ const flowStateChangedDetailSchema = z.strictObject({
|
|
|
55
55
|
flowHandleId: nonEmptyStringSchema,
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
const instanceFlowStateChangedDetailSchema = z.strictObject(
|
|
58
|
+
const instanceFlowStateChangedDetailSchema = z.strictObject({
|
|
59
|
+
...flowStateBase,
|
|
60
|
+
flowHandleId: z.optional(nonEmptyStringSchema),
|
|
61
|
+
});
|
|
59
62
|
|
|
60
63
|
const openRequestedDetailSchema = z.strictObject({
|
|
61
64
|
instanceId: nonEmptyStringSchema,
|