@tileflow/capture 0.1.0-alpha.17 → 0.1.0-alpha.18

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.
@@ -0,0 +1,160 @@
1
+ import { Browser } from 'playwright';
2
+
3
+ type TileflowCaptureRendererIdentity = {
4
+ tileflow: string;
5
+ maplibre: string;
6
+ playwright: string;
7
+ chromiumRevision: string;
8
+ chromiumVersion: string;
9
+ };
10
+ declare const tileflowCaptureRuntime: Readonly<{
11
+ tileflow: string;
12
+ maplibre: string;
13
+ playwright: string;
14
+ chromiumRevision: string;
15
+ chromiumVersion: string;
16
+ }>;
17
+ declare function createTileflowCaptureRendererIdentity(browser?: Pick<Browser, 'version'>): TileflowCaptureRendererIdentity;
18
+
19
+ declare const tileflowCaptureReceiptSchemaVersion: 4;
20
+ declare const tileflowCaptureReceiptLimits: Readonly<{
21
+ maximumBytes: number;
22
+ }>;
23
+ type TileflowCaptureDataBindingsV2 = {
24
+ fields: Record<string, string>;
25
+ layers: Record<string, string>;
26
+ };
27
+ type TileflowCaptureDataCapabilitiesV2 = {
28
+ businessCorridor: boolean;
29
+ /** Optional because receipts written before this capability existed remain valid schema v2. */
30
+ bathymetry?: boolean;
31
+ globalLandcover: boolean;
32
+ tree: boolean;
33
+ };
34
+ type TileflowCaptureDataSourceV2 = {
35
+ kind: 'loopback' | 'opaque' | 'remote' | 'root-relative';
36
+ /** SHA-256 of a credential-free, query-free endpoint identity. */
37
+ sha256: string;
38
+ };
39
+ type TileflowCaptureDataSemanticsV2 = {
40
+ parkLayer: 'mixed' | 'protected-only';
41
+ };
42
+ /** Durable schema-v2 data identity owned by capture rather than the live core authoring API. */
43
+ type TileflowCaptureDataIdentityV2 = {
44
+ bindings?: TileflowCaptureDataBindingsV2;
45
+ capabilities?: TileflowCaptureDataCapabilitiesV2;
46
+ generation?: 'v1';
47
+ kind: 'tileflow-world' | 'vector-tiles';
48
+ revision?: string;
49
+ schema: 'openmaptiles';
50
+ schemaVersion: number;
51
+ /** Optional because earlier schema-v2 receipts predate explicit park semantics. */
52
+ semantics?: TileflowCaptureDataSemanticsV2;
53
+ sourceId: 'tileflow';
54
+ source?: TileflowCaptureDataSourceV2;
55
+ };
56
+ type TileflowCaptureWorldIdentityV3 = {
57
+ archiveSha256: string;
58
+ contractSha256: string;
59
+ dataContractSha256: string;
60
+ descriptorSha256: string;
61
+ kind: 'tileflow-world';
62
+ product: 'world-v1';
63
+ releaseId: string;
64
+ schema: 'openmaptiles';
65
+ schemaVersion: number;
66
+ semantics?: TileflowCaptureDataSemanticsV2;
67
+ sourceId: 'tileflow';
68
+ };
69
+ type TileflowCaptureVectorIdentityV3 = {
70
+ bindings?: {
71
+ fields: Readonly<Record<string, string>>;
72
+ layers: Readonly<Record<string, string>>;
73
+ };
74
+ capabilities?: {
75
+ businessCorridor: boolean;
76
+ bathymetry?: boolean;
77
+ globalLandcover: boolean;
78
+ tree: boolean;
79
+ };
80
+ kind: 'vector-tiles';
81
+ revision?: string;
82
+ schema: 'openmaptiles';
83
+ schemaVersion: number;
84
+ semantics?: TileflowCaptureDataSemanticsV2;
85
+ sourceId: 'tileflow';
86
+ /** Accepted only as transient input and converted to `source`; never returned or serialized. */
87
+ url?: string;
88
+ };
89
+ /** Exact data-identity input embedded in every newly written schema-v4 receipt. */
90
+ type TileflowCaptureDataInput = TileflowCaptureVectorIdentityV3 | TileflowCaptureWorldIdentityV3;
91
+ type TileflowCaptureDataIdentityV3 = (Omit<TileflowCaptureVectorIdentityV3, 'url'> & {
92
+ source?: TileflowCaptureDataSourceV2;
93
+ }) | TileflowCaptureWorldIdentityV3;
94
+ type TileflowCaptureVerificationV2 = {
95
+ data: 'expected-unverified' | 'rendered';
96
+ style: 'expected-unverified' | 'rendered';
97
+ };
98
+ type TileflowCaptureReceiptCommon = {
99
+ scene: {
100
+ name: string;
101
+ map: string;
102
+ target: 'map' | 'application';
103
+ sha256: string;
104
+ };
105
+ style: {
106
+ sha256: string;
107
+ };
108
+ image: {
109
+ sha256: string;
110
+ cssWidth: number;
111
+ cssHeight: number;
112
+ physicalWidth: number;
113
+ physicalHeight: number;
114
+ dpr: 1 | 2;
115
+ };
116
+ renderer: TileflowCaptureRendererIdentity;
117
+ platform: {
118
+ os: string;
119
+ architecture: string;
120
+ };
121
+ verification: TileflowCaptureVerificationV2;
122
+ networkDependent: boolean;
123
+ };
124
+ type TileflowCaptureReceiptV2 = TileflowCaptureReceiptCommon & {
125
+ schemaVersion: 2;
126
+ data: TileflowCaptureDataIdentityV2;
127
+ };
128
+ type TileflowCaptureReceiptV3 = TileflowCaptureReceiptCommon & {
129
+ schemaVersion: 3;
130
+ data: TileflowCaptureDataIdentityV3;
131
+ };
132
+ type TileflowCaptureReceiptV4 = Omit<TileflowCaptureReceiptCommon, 'scene'> & {
133
+ schemaVersion: 4;
134
+ data: TileflowCaptureDataIdentityV3;
135
+ scene: TileflowCaptureReceiptCommon['scene'] & {
136
+ theme: string;
137
+ };
138
+ };
139
+ type TileflowCaptureReceipt = TileflowCaptureReceiptV2 | TileflowCaptureReceiptV3 | TileflowCaptureReceiptV4;
140
+ type CreateTileflowCaptureReceiptInput = {
141
+ dpr: 1 | 2;
142
+ data: TileflowCaptureDataInput;
143
+ height: number;
144
+ map: string;
145
+ theme: string;
146
+ networkDependent: boolean;
147
+ pngSha256: string;
148
+ renderer: TileflowCaptureRendererIdentity;
149
+ scene: string;
150
+ sceneSha256: string;
151
+ styleSha256: string;
152
+ target: 'map' | 'application';
153
+ width: number;
154
+ };
155
+ declare function createTileflowCaptureReceipt(input: CreateTileflowCaptureReceiptInput): TileflowCaptureReceiptV4;
156
+ declare function serializeTileflowCaptureReceipt(receipt: TileflowCaptureReceipt): string;
157
+ declare function parseTileflowCaptureReceipt(source: string | Uint8Array): TileflowCaptureReceipt;
158
+ declare function validateTileflowCaptureReceipt(value: unknown): TileflowCaptureReceipt;
159
+
160
+ export { type CreateTileflowCaptureReceiptInput as C, type TileflowCaptureRendererIdentity as T, type TileflowCaptureReceiptV4 as a, type TileflowCaptureDataInput as b, type TileflowCaptureWorldIdentityV3 as c, type TileflowCaptureReceipt as d, type TileflowCaptureDataBindingsV2 as e, type TileflowCaptureDataCapabilitiesV2 as f, type TileflowCaptureDataIdentityV2 as g, type TileflowCaptureDataIdentityV3 as h, type TileflowCaptureDataSemanticsV2 as i, type TileflowCaptureDataSourceV2 as j, type TileflowCaptureReceiptV2 as k, type TileflowCaptureReceiptV3 as l, type TileflowCaptureVectorIdentityV3 as m, type TileflowCaptureVerificationV2 as n, createTileflowCaptureReceipt as o, createTileflowCaptureRendererIdentity as p, parseTileflowCaptureReceipt as q, tileflowCaptureReceiptSchemaVersion as r, serializeTileflowCaptureReceipt as s, tileflowCaptureReceiptLimits as t, tileflowCaptureRuntime as u, validateTileflowCaptureReceipt as v };
@@ -0,0 +1,2 @@
1
+ export { C as CreateTileflowCaptureReceiptInput, e as TileflowCaptureDataBindingsV2, f as TileflowCaptureDataCapabilitiesV2, g as TileflowCaptureDataIdentityV2, h as TileflowCaptureDataIdentityV3, b as TileflowCaptureDataInput, i as TileflowCaptureDataSemanticsV2, j as TileflowCaptureDataSourceV2, d as TileflowCaptureReceipt, k as TileflowCaptureReceiptV2, l as TileflowCaptureReceiptV3, a as TileflowCaptureReceiptV4, m as TileflowCaptureVectorIdentityV3, n as TileflowCaptureVerificationV2, c as TileflowCaptureWorldIdentityV3, o as createTileflowCaptureReceipt, q as parseTileflowCaptureReceipt, s as serializeTileflowCaptureReceipt, t as tileflowCaptureReceiptLimits, r as tileflowCaptureReceiptSchemaVersion, v as validateTileflowCaptureReceipt } from './receipt-Q7wQ68tG.js';
2
+ import 'playwright';
@@ -0,0 +1,16 @@
1
+ import {
2
+ createTileflowCaptureReceipt,
3
+ parseTileflowCaptureReceipt,
4
+ serializeTileflowCaptureReceipt,
5
+ tileflowCaptureReceiptLimits,
6
+ tileflowCaptureReceiptSchemaVersion,
7
+ validateTileflowCaptureReceipt
8
+ } from "./chunk-BSTB4FN6.js";
9
+ export {
10
+ createTileflowCaptureReceipt,
11
+ parseTileflowCaptureReceipt,
12
+ serializeTileflowCaptureReceipt,
13
+ tileflowCaptureReceiptLimits,
14
+ tileflowCaptureReceiptSchemaVersion,
15
+ validateTileflowCaptureReceipt
16
+ };
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@tileflow/capture",
3
- "version": "0.1.0-alpha.17",
3
+ "version": "0.1.0-alpha.18",
4
+ "license": "Apache-2.0",
4
5
  "description": "Deterministic local visual capture and comparison for Tileflow maps.",
6
+ "engines": {
7
+ "node": ">=22"
8
+ },
5
9
  "type": "module",
6
10
  "sideEffects": false,
7
11
  "homepage": "https://tileflow.dev",
@@ -24,42 +28,61 @@
24
28
  "types": "./dist/index.d.ts",
25
29
  "files": [
26
30
  "dist",
27
- "THIRD_PARTY_NOTICES.md"
31
+ "THIRD_PARTY_NOTICES.md",
32
+ "LICENSE",
33
+ "NOTICE",
34
+ "GENERATED_OUTPUT_LICENSE.md",
35
+ "TRADEMARKS.md"
28
36
  ],
29
37
  "exports": {
30
38
  ".": {
31
39
  "types": "./dist/index.d.ts",
32
40
  "import": "./dist/index.js",
33
41
  "default": "./dist/index.js"
42
+ },
43
+ "./receipt": {
44
+ "types": "./dist/receipt.d.ts",
45
+ "import": "./dist/receipt.js",
46
+ "default": "./dist/receipt.js"
34
47
  }
35
48
  },
36
49
  "publishConfig": {
37
50
  "access": "public"
38
51
  },
39
52
  "dependencies": {
40
- "@tileflow/core": ">=0.1.0-alpha.19 <0.1.0-beta.0",
41
- "@tileflow/dev": ">=0.1.0-alpha.18 <0.1.0-beta.0",
53
+ "@tileflow/core": ">=0.1.0-alpha.21 <0.1.0-beta.0",
54
+ "@tileflow/dev": ">=0.1.0-alpha.19 <0.1.0-beta.0",
42
55
  "maplibre-gl": "5.24.0",
43
56
  "pixelmatch": "7.2.0",
44
- "playwright": "1.60.0",
57
+ "playwright": "1.62.1",
45
58
  "pngjs": "7.0.0"
46
59
  },
47
60
  "devDependencies": {
61
+ "@sveltejs/vite-plugin-svelte": "^7.3.0",
48
62
  "@types/node": "^25.9.2",
49
63
  "@types/pngjs": "6.0.5",
50
- "next": "16.3.0",
64
+ "@vitejs/plugin-vue": "^6.0.8",
65
+ "next": "16.3.1",
51
66
  "react": "^19.2.7",
52
67
  "react-dom": "^19.2.7",
68
+ "svelte": "^5.56.4",
53
69
  "vite": "^8.0.16",
70
+ "vue": "^3.5.39",
54
71
  "webpack": "5.108.3",
55
- "@tileflow/react": "0.1.0-alpha.19"
72
+ "@tileflow/maps": "0.1.0-alpha.0",
73
+ "@tileflow/next": "0.1.0-alpha.18",
74
+ "@tileflow/react": "0.1.0-alpha.20",
75
+ "@tileflow/svelte": "0.1.0-alpha.20",
76
+ "@tileflow/vue": "0.1.0-alpha.20",
77
+ "@tileflow/vite": "0.1.0-alpha.18",
78
+ "@tileflow/webpack": "0.1.0-alpha.18"
56
79
  },
57
80
  "scripts": {
58
- "build": "tsup src/index.ts --format esm --dts --clean --platform node",
81
+ "build": "tsup src/index.ts src/receipt.ts --format esm --dts --clean --platform node",
59
82
  "test": "tsx --test --test-concurrency=1 test/*.test.ts",
60
83
  "typecheck": "tsc -p tsconfig.json --noEmit",
61
84
  "lint": "tsc -p tsconfig.json --noEmit",
62
85
  "smoke:browser": "pnpm run test",
63
- "verify": "pnpm run typecheck && pnpm run test"
86
+ "verify": "pnpm run typecheck && pnpm run build && pnpm run test"
64
87
  }
65
88
  }