@tileflow/capture 0.1.0-alpha.29 → 0.1.0-alpha.31

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.
@@ -127,5 +127,96 @@ declare function createTileflowCaptureReceipt(input: CreateTileflowCaptureReceip
127
127
  declare function serializeTileflowCaptureReceipt(receipt: TileflowCaptureReceipt): string;
128
128
  declare function parseTileflowCaptureReceipt(source: string | Uint8Array): TileflowCaptureReceipt;
129
129
  declare function validateTileflowCaptureReceipt(value: unknown): TileflowCaptureReceipt;
130
+ declare const tileflowShotReceiptSchemaVersion: 1;
131
+ declare const tileflowShotReceiptLimits: Readonly<{
132
+ maximumBytes: number;
133
+ }>;
134
+ /**
135
+ * Durable evidence for one rendered shot. Frames are deterministic, so `frames.sha256` identifies
136
+ * the pixels; `output.sha256` identifies the written video or frame set, whose encoder bytes may
137
+ * differ between runs.
138
+ */
139
+ type TileflowShotReceiptV1 = {
140
+ schemaVersion: 1;
141
+ kind: 'shot';
142
+ shot: {
143
+ name: string;
144
+ map: string;
145
+ theme: string;
146
+ sha256: string;
147
+ };
148
+ /** The compiled style of the shot's theme. */
149
+ style: {
150
+ sha256: string;
151
+ };
152
+ /** Present when the shot blends themes: each blended theme's compiled style, in blend order. */
153
+ blend?: {
154
+ themes: Array<{
155
+ name: string;
156
+ styleSha256: string;
157
+ }>;
158
+ };
159
+ timing: {
160
+ fps: 24 | 25 | 30 | 50 | 60;
161
+ frameCount: number;
162
+ durationMs: number;
163
+ };
164
+ image: {
165
+ cssWidth: number;
166
+ cssHeight: number;
167
+ physicalWidth: number;
168
+ physicalHeight: number;
169
+ dpr: 1 | 2;
170
+ };
171
+ /** SHA-256 of each frame's PNG SHA-256 in lowercase hex, one per line, in frame order. */
172
+ frames: {
173
+ sha256: string;
174
+ };
175
+ output: {
176
+ kind: 'frames';
177
+ sha256: string;
178
+ } | {
179
+ kind: 'webm';
180
+ codec: 'vp8' | 'vp9';
181
+ sha256: string;
182
+ };
183
+ renderer: TileflowCaptureRendererIdentity;
184
+ platform: {
185
+ os: string;
186
+ architecture: string;
187
+ };
188
+ data: TileflowCaptureDataIdentity;
189
+ verification: {
190
+ data: 'rendered';
191
+ style: 'rendered';
192
+ };
193
+ networkDependent: boolean;
194
+ };
195
+ type CreateTileflowShotReceiptInput = {
196
+ blend?: Array<{
197
+ name: string;
198
+ styleSha256: string;
199
+ }>;
200
+ data: TileflowCaptureDataInput;
201
+ dpr: 1 | 2;
202
+ durationMs: number;
203
+ fps: 24 | 25 | 30 | 50 | 60;
204
+ frameCount: number;
205
+ framesSha256: string;
206
+ height: number;
207
+ map: string;
208
+ networkDependent: boolean;
209
+ output: TileflowShotReceiptV1['output'];
210
+ renderer: TileflowCaptureRendererIdentity;
211
+ shot: string;
212
+ shotSha256: string;
213
+ styleSha256: string;
214
+ theme: string;
215
+ width: number;
216
+ };
217
+ declare function createTileflowShotReceipt(input: CreateTileflowShotReceiptInput): TileflowShotReceiptV1;
218
+ declare function serializeTileflowShotReceipt(receipt: TileflowShotReceiptV1): string;
219
+ declare function parseTileflowShotReceipt(source: string | Uint8Array): TileflowShotReceiptV1;
220
+ declare function validateTileflowShotReceipt(value: unknown): TileflowShotReceiptV1;
130
221
 
131
- export { type CreateTileflowCaptureReceiptInput as C, type TileflowCaptureRendererIdentity as T, type TileflowCaptureReceipt as a, type TileflowCaptureDataInput as b, type TileflowCaptureWorldIdentity as c, type TileflowCaptureDataBindings as d, type TileflowCaptureDataCapabilities as e, type TileflowCaptureDataIdentity as f, type TileflowCaptureDataSemantics as g, type TileflowCaptureDataSource as h, type TileflowCaptureVectorIdentity as i, type TileflowCaptureVerification as j, createTileflowCaptureReceipt as k, createTileflowCaptureRendererIdentity as l, tileflowCaptureReceiptSchemaVersion as m, tileflowCaptureRuntime as n, parseTileflowCaptureReceipt as p, serializeTileflowCaptureReceipt as s, tileflowCaptureReceiptLimits as t, validateTileflowCaptureReceipt as v };
222
+ export { type CreateTileflowCaptureReceiptInput as C, type TileflowCaptureRendererIdentity as T, type TileflowShotReceiptV1 as a, type TileflowCaptureReceipt as b, type TileflowCaptureDataInput as c, type TileflowCaptureWorldIdentity as d, type CreateTileflowShotReceiptInput as e, type TileflowCaptureDataBindings as f, type TileflowCaptureDataCapabilities as g, type TileflowCaptureDataIdentity as h, type TileflowCaptureDataSemantics as i, type TileflowCaptureDataSource as j, type TileflowCaptureVectorIdentity as k, type TileflowCaptureVerification as l, createTileflowCaptureReceipt as m, createTileflowCaptureRendererIdentity as n, createTileflowShotReceipt as o, parseTileflowCaptureReceipt as p, parseTileflowShotReceipt as q, serializeTileflowShotReceipt as r, serializeTileflowCaptureReceipt as s, tileflowCaptureReceiptLimits as t, tileflowCaptureReceiptSchemaVersion as u, tileflowCaptureRuntime as v, tileflowShotReceiptLimits as w, tileflowShotReceiptSchemaVersion as x, validateTileflowCaptureReceipt as y, validateTileflowShotReceipt as z };
package/dist/receipt.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CreateTileflowCaptureReceiptInput, d as TileflowCaptureDataBindings, e as TileflowCaptureDataCapabilities, f as TileflowCaptureDataIdentity, b as TileflowCaptureDataInput, g as TileflowCaptureDataSemantics, h as TileflowCaptureDataSource, a as TileflowCaptureReceipt, i as TileflowCaptureVectorIdentity, j as TileflowCaptureVerification, c as TileflowCaptureWorldIdentity, k as createTileflowCaptureReceipt, p as parseTileflowCaptureReceipt, s as serializeTileflowCaptureReceipt, t as tileflowCaptureReceiptLimits, m as tileflowCaptureReceiptSchemaVersion, v as validateTileflowCaptureReceipt } from './receipt-DhFOATRO.js';
1
+ export { C as CreateTileflowCaptureReceiptInput, e as CreateTileflowShotReceiptInput, f as TileflowCaptureDataBindings, g as TileflowCaptureDataCapabilities, h as TileflowCaptureDataIdentity, c as TileflowCaptureDataInput, i as TileflowCaptureDataSemantics, j as TileflowCaptureDataSource, b as TileflowCaptureReceipt, k as TileflowCaptureVectorIdentity, l as TileflowCaptureVerification, d as TileflowCaptureWorldIdentity, a as TileflowShotReceiptV1, m as createTileflowCaptureReceipt, o as createTileflowShotReceipt, p as parseTileflowCaptureReceipt, q as parseTileflowShotReceipt, s as serializeTileflowCaptureReceipt, r as serializeTileflowShotReceipt, t as tileflowCaptureReceiptLimits, u as tileflowCaptureReceiptSchemaVersion, w as tileflowShotReceiptLimits, x as tileflowShotReceiptSchemaVersion, y as validateTileflowCaptureReceipt, z as validateTileflowShotReceipt } from './receipt-CfZkzyXd.js';
2
2
  import 'playwright';
package/dist/receipt.js CHANGED
@@ -1,16 +1,28 @@
1
1
  import {
2
2
  createTileflowCaptureReceipt,
3
+ createTileflowShotReceipt,
3
4
  parseTileflowCaptureReceipt,
5
+ parseTileflowShotReceipt,
4
6
  serializeTileflowCaptureReceipt,
7
+ serializeTileflowShotReceipt,
5
8
  tileflowCaptureReceiptLimits,
6
9
  tileflowCaptureReceiptSchemaVersion,
7
- validateTileflowCaptureReceipt
8
- } from "./chunk-VNDAYGXY.js";
10
+ tileflowShotReceiptLimits,
11
+ tileflowShotReceiptSchemaVersion,
12
+ validateTileflowCaptureReceipt,
13
+ validateTileflowShotReceipt
14
+ } from "./chunk-BI5PWIH4.js";
9
15
  export {
10
16
  createTileflowCaptureReceipt,
17
+ createTileflowShotReceipt,
11
18
  parseTileflowCaptureReceipt,
19
+ parseTileflowShotReceipt,
12
20
  serializeTileflowCaptureReceipt,
21
+ serializeTileflowShotReceipt,
13
22
  tileflowCaptureReceiptLimits,
14
23
  tileflowCaptureReceiptSchemaVersion,
15
- validateTileflowCaptureReceipt
24
+ tileflowShotReceiptLimits,
25
+ tileflowShotReceiptSchemaVersion,
26
+ validateTileflowCaptureReceipt,
27
+ validateTileflowShotReceipt
16
28
  };
@@ -24,6 +24,14 @@ than normalize uppercase, whitespace, another generation, or an incomplete bound
24
24
  Receipt-only tooling can import these contracts from `@tileflow/capture/receipt` without loading the
25
25
  Playwright capture runtime.
26
26
 
27
+ `createTileflowShotReceipt`, `parseTileflowShotReceipt`, `validateTileflowShotReceipt`, and
28
+ `serializeTileflowShotReceipt` implement the separate schema-version-1 shot receipt, identified by
29
+ `kind: "shot"` and bounded to 64 KiB. It records the shot and its theme and blend styles, timing,
30
+ dimensions, renderer, platform, data identity, and two hashes: `frames.sha256`, computed from every
31
+ frame's PNG SHA-256 in order, identifies the rendered pixels, and `output.sha256` identifies the
32
+ written WebM file or, for the `frames` output, equals `frames.sha256`. The still-receipt parser
33
+ rejects shot receipts, and the shot-receipt parser rejects still receipts.
34
+
27
35
  The following comparison fragments assume captures and PNG/receipt bytes that the caller has
28
36
  already loaded and validated. See the package README for a complete baseline-file example.
29
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/capture",
3
- "version": "0.1.0-alpha.29",
3
+ "version": "0.1.0-alpha.31",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Deterministic local visual capture and comparison for Tileflow maps.",
6
6
  "engines": {
@@ -48,8 +48,8 @@
48
48
  "access": "public"
49
49
  },
50
50
  "dependencies": {
51
- "@tileflow/core": ">=0.1.0-alpha.32 <0.1.0-beta.0",
52
- "@tileflow/dev": ">=0.1.0-alpha.30 <0.1.0-beta.0",
51
+ "@tileflow/core": ">=0.1.0-alpha.35 <0.1.0-beta.0",
52
+ "@tileflow/dev": ">=0.1.0-alpha.32 <0.1.0-beta.0",
53
53
  "maplibre-gl": "6.13.0",
54
54
  "pixelmatch": "7.2.0",
55
55
  "playwright": "1.62.1",
@@ -68,12 +68,12 @@
68
68
  "vite": "^8.0.16",
69
69
  "vue": "^3.5.43",
70
70
  "webpack": "5.108.3",
71
- "@tileflow/maps": "0.1.0-alpha.8",
71
+ "@tileflow/react": "0.1.0-alpha.30",
72
72
  "@tileflow/next": "0.1.0-alpha.25",
73
- "@tileflow/vue": "0.1.0-alpha.28",
74
- "@tileflow/svelte": "0.1.0-alpha.28",
73
+ "@tileflow/svelte": "0.1.0-alpha.29",
74
+ "@tileflow/maps": "0.1.0-alpha.9",
75
+ "@tileflow/vue": "0.1.0-alpha.29",
75
76
  "@tileflow/vite": "0.1.0-alpha.25",
76
- "@tileflow/react": "0.1.0-alpha.29",
77
77
  "@tileflow/webpack": "0.1.0-alpha.25"
78
78
  },
79
79
  "scripts": {