@ggui-ai/preview-a2ui 0.2.0-alpha.4 → 0.3.0-rc.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.
|
@@ -18,10 +18,10 @@ type JsonPayload = string | number | boolean | null | JsonPayload[] | JsonPayloa
|
|
|
18
18
|
*/
|
|
19
19
|
export interface DeterministicPreviewContext {
|
|
20
20
|
/**
|
|
21
|
-
* A2UI surface id. Defaults to `ctx.
|
|
21
|
+
* A2UI surface id. Defaults to `ctx.sessionId` when
|
|
22
22
|
* {@link DeterministicPreviewOptions.surfaceId} is absent.
|
|
23
23
|
*/
|
|
24
|
-
readonly
|
|
24
|
+
readonly sessionId: string;
|
|
25
25
|
/**
|
|
26
26
|
* Push story. `intent` is the primary signal the producer reads;
|
|
27
27
|
* additional fields are accepted but ignored.
|
|
@@ -45,9 +45,9 @@ export interface DeterministicPreviewContext {
|
|
|
45
45
|
}
|
|
46
46
|
export interface DeterministicPreviewOptions {
|
|
47
47
|
/**
|
|
48
|
-
* Override the surface id. Defaults to `ctx.
|
|
49
|
-
* surface id aligned with the
|
|
50
|
-
*
|
|
48
|
+
* Override the surface id. Defaults to `ctx.sessionId` — keeping the
|
|
49
|
+
* surface id aligned with the sessionId makes the registry's
|
|
50
|
+
* sessionId-keyed cancellation reach the right client surface when
|
|
51
51
|
* the renderer buffers on `createSurface.surfaceId`.
|
|
52
52
|
*/
|
|
53
53
|
readonly surfaceId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deterministic.d.ts","sourceRoot":"","sources":["../../src/emitters/deterministic.ts"],"names":[],"mappings":"AAuCA;;;;;;;;GAQG;AACH,UAAU,iBAAiB;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;CACxC;AACD,KAAK,WAAW,GACZ,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,WAAW,EAAE,GACb,iBAAiB,CAAC;AAEt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O,CAAC,IAAI,CAAC,CAAA;CAAE,CAI9D"}
|
|
@@ -35,7 +35,7 @@ const _CATALOG_ID_PARITY = DEFAULT_CATALOG_ID;
|
|
|
35
35
|
* channel as drained without affecting the rendered surface.
|
|
36
36
|
*/
|
|
37
37
|
export async function produceDeterministicPreview(ctx, options) {
|
|
38
|
-
const surfaceId = options?.surfaceId ?? ctx.
|
|
38
|
+
const surfaceId = options?.surfaceId ?? ctx.sessionId;
|
|
39
39
|
const catalogId = options?.catalogId ?? DEFAULT_CATALOG_ID;
|
|
40
40
|
// Frame 1 — surface creation.
|
|
41
41
|
await ctx.emit({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/preview-a2ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-rc.0",
|
|
4
4
|
"description": "Narrow A2UI boundary for ggui's provisional UI assembly channel. Framework-neutral types and validators for the server-write subset (createSurface / updateComponents / deleteSurface) used to paint shimmering placeholder UI before the final generated interface arrives.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ggui",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"author": "ggui contributors <hello@ggui.ai>",
|
|
55
55
|
"scripts": {
|
|
56
|
-
"build": "tsc && node ../scripts/fix-esm-imports.mjs dist",
|
|
56
|
+
"build": "tsc -p tsconfig.build.json && node ../scripts/fix-esm-imports.mjs dist",
|
|
57
57
|
"dev": "tsc --watch",
|
|
58
58
|
"typecheck": "tsc --noEmit",
|
|
59
59
|
"test": "vitest run",
|