@tileflow/dev 0.1.0-alpha.4 → 0.1.0-alpha.41

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.
Files changed (45) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +264 -5
  3. package/THIRD_PARTY_NOTICES.md +309 -0
  4. package/dist/artifacts.d.ts +269 -0
  5. package/dist/artifacts.js +98 -0
  6. package/dist/chunk-AQUGMUZW.js +324 -0
  7. package/dist/chunk-C4VPHZ3F.js +4062 -0
  8. package/dist/chunk-D4OE4ITL.js +13 -0
  9. package/dist/chunk-FOMTSCOP.js +671 -0
  10. package/dist/chunk-GXLY73PD.js +3199 -0
  11. package/dist/chunk-KDFTE4Q5.js +156 -0
  12. package/dist/chunk-ONYQNLNA.js +1108 -0
  13. package/dist/chunk-RTU7TD4M.js +172 -0
  14. package/dist/chunk-XHJBCVBB.js +241 -0
  15. package/dist/config.d.ts +33 -0
  16. package/dist/config.js +27 -0
  17. package/dist/fonts.d.ts +47 -0
  18. package/dist/fonts.js +16 -0
  19. package/dist/icons-BIHpw5Zy.d.ts +417 -0
  20. package/dist/icons.d.ts +3 -0
  21. package/dist/icons.js +41 -0
  22. package/dist/inspect.d.ts +149 -0
  23. package/dist/inspect.js +805 -0
  24. package/dist/inspector-browser.js +16955 -0
  25. package/dist/inspector-observer.js +95 -0
  26. package/dist/preview-assets-ATLLYY72.js +103 -0
  27. package/dist/preview.d.ts +31 -0
  28. package/dist/preview.js +1974 -0
  29. package/dist/server.d.ts +89 -0
  30. package/dist/server.js +3662 -0
  31. package/dist/tilesets.d.ts +89 -0
  32. package/dist/tilesets.js +6 -0
  33. package/dist/validation.d.ts +65 -0
  34. package/dist/validation.js +24 -0
  35. package/package.json +77 -13
  36. package/ui-fonts/hubot-sans-OFL.txt +93 -0
  37. package/ui-fonts/hubot-sans.woff2 +0 -0
  38. package/ui-fonts/inter-OFL.txt +92 -0
  39. package/ui-fonts/inter.woff2 +0 -0
  40. package/ui-fonts/jetbrains-mono-OFL.txt +93 -0
  41. package/ui-fonts/jetbrains-mono.woff2 +0 -0
  42. package/ui-fonts/mona-sans-OFL.txt +93 -0
  43. package/ui-fonts/mona-sans.woff2 +0 -0
  44. package/dist/index.d.ts +0 -54
  45. package/dist/index.js +0 -314
@@ -0,0 +1,417 @@
1
+ import { TileflowIconAppearance, TileflowIconLayoutMetadata, TileflowIconSetPin, TileflowLandmarkRegion, TileflowLandmarkFootprint, TileflowModelDirectory, TileflowTreeModel, TileflowIconSpriteIndex, TileflowIconSource, TileflowIconsLockfileV1, TileflowIconCompositionV1, TileflowIconPackageFileName, TileflowIconPackageManifest, TileflowIconDirectory } from '@tileflow/core';
2
+ import { TileflowEffectiveModelSourceIdentity, TileflowEffectiveIconSourceIdentity, TileflowBuildCatalog, TileflowPreparedMapAssets } from '@tileflow/core/build';
3
+
4
+ type TileflowRenderedIconCell = {
5
+ height: number;
6
+ width: number;
7
+ rgba: Uint8Array;
8
+ };
9
+ type TileflowRenderedIcon = {
10
+ id: string;
11
+ appearance?: TileflowIconAppearance;
12
+ layout?: TileflowIconLayoutMetadata;
13
+ oneX: TileflowRenderedIconCell;
14
+ twoX: TileflowRenderedIconCell;
15
+ };
16
+ /** Pack independently rendered densities without scaling or re-rasterizing either input. */
17
+ declare function packTileflowRenderedIcons(input: readonly TileflowRenderedIcon[]): Promise<CompiledTileflowIconPackage>;
18
+
19
+ type VerifiedTileflowIconArtifact = {
20
+ package: CompiledTileflowIconPackage;
21
+ icons: TileflowRenderedIcon[];
22
+ };
23
+ /** Verify exact compressed bytes and independently decode/hash every cell at both densities. */
24
+ declare function verifyTileflowIconArtifact(input: CompiledTileflowIconPackage): Promise<VerifiedTileflowIconArtifact>;
25
+
26
+ type TileflowIconCacheOptions = {
27
+ /** Parent of the versioned tileflow/icons/v1 cache, not a serialized lock setting. */
28
+ cacheRoot?: string;
29
+ offline?: boolean;
30
+ /** Trusted application configuration. A lock cannot extend this allowlist. */
31
+ deliveryOrigins?: readonly string[];
32
+ fetch?: typeof globalThis.fetch;
33
+ signal?: AbortSignal;
34
+ };
35
+ declare function getTileflowIconCacheDirectory(options?: Pick<TileflowIconCacheOptions, 'cacheRoot'>): string;
36
+ /** Read and verify an exact pin; a cache miss never resolves a newer version. */
37
+ declare function loadTileflowIconSetArtifact(input: TileflowIconSetPin, options?: TileflowIconCacheOptions): Promise<VerifiedTileflowIconArtifact>;
38
+ /** Seed or repair a disposable cache using verified generated bytes, never original artwork. */
39
+ declare function storeTileflowIconSetArtifact(input: TileflowIconSetPin, artifact: CompiledTileflowIconPackage, options?: Pick<TileflowIconCacheOptions, 'cacheRoot'>): Promise<VerifiedTileflowIconArtifact>;
40
+
41
+ /** A building model file, prepared for the build to write beside the style. */
42
+ type PreparedTileflowBuildingModel = {
43
+ /** Its file name, content-addressed: `<id>-<first 16 hex of its SHA-256>.glb`. */
44
+ fileName: string;
45
+ bytes: Uint8Array;
46
+ sha256: string;
47
+ /** The glTF binaries it was prepared from, nearest level first. */
48
+ sources: readonly Readonly<{
49
+ level: 'near' | 'mid' | 'far';
50
+ sha256: string;
51
+ byteLength: number;
52
+ }>[];
53
+ };
54
+ /** A building model's glTF binaries, nearest level first. */
55
+ type TileflowBuildingModelLevels = Readonly<{
56
+ near: Uint8Array;
57
+ mid?: Uint8Array;
58
+ far?: Uint8Array;
59
+ }>;
60
+ /**
61
+ * Prepares one building model from its glTF binaries into the file a build writes beside the
62
+ * style: a glTF binary compressed with meshoptimizer. Its footprint is the near level's `footprint`
63
+ * mesh, or else its outline on the ground. Throws `TileflowGltfError` or `RangeError` with words an
64
+ * author can act on.
65
+ */
66
+ declare function prepareTileflowBuildingModel(id: string, levels: TileflowBuildingModelLevels): Promise<{
67
+ bytes: Uint8Array;
68
+ sha256: string;
69
+ }>;
70
+ /** A landmark to package: a building model and where it stands. */
71
+ type TileflowLandmarkSource = Readonly<{
72
+ id: string;
73
+ /** Longitude and latitude of its origin. */
74
+ at: readonly [number, number];
75
+ /** Degrees clockwise from north its own north is turned to, from 0 to 360. */
76
+ heading: number;
77
+ levels: TileflowBuildingModelLevels;
78
+ }>;
79
+ /**
80
+ * Packages the landmarks standing in one tile of a landmarks tileset into that tile's prepared
81
+ * model file, the landmarks in the order of their ids. Every landmark's origin must fall in the
82
+ * same zoom-14 tile. It also returns each landmark's place and footprint, as the region's index
83
+ * names them. The result depends only on its input.
84
+ */
85
+ declare function packageTileflowLandmarkTile(landmarks: readonly TileflowLandmarkSource[]): Promise<{
86
+ x: number;
87
+ y: number;
88
+ bytes: Uint8Array;
89
+ sha256: string;
90
+ landmarks: readonly TileflowLandmarkFootprint[];
91
+ }>;
92
+ /**
93
+ * Writes the index of one region of a landmarks tileset, `{region: [x, y], tiles: [[x, y, sha256,
94
+ * landmarks], ...]}`, as the bytes the tileset serves, with their SHA-256. A tile's `landmarks` are
95
+ * the ones `packageTileflowLandmarkTile` returned for it, or `readTileflowLandmarkTileFootprints`
96
+ * reads back from its bytes.
97
+ */
98
+ declare function encodeTileflowLandmarkRegion(region: TileflowLandmarkRegion): {
99
+ bytes: Uint8Array;
100
+ sha256: string;
101
+ };
102
+ type PreparedTileflowTreeModels = {
103
+ /** The prepared tree models by id. */
104
+ models: Record<string, TileflowTreeModel>;
105
+ /** The prepared building models by id. */
106
+ buildings: Record<string, PreparedTileflowBuildingModel>;
107
+ identities: TileflowEffectiveModelSourceIdentity[];
108
+ /** Directories to watch for changes. */
109
+ watchPaths: string[];
110
+ };
111
+ /** Reads, checks and prepares one map's model directories. */
112
+ declare function prepareTileflowMapTreeModels(directories: readonly TileflowModelDirectory[], options: {
113
+ baseDirectory: string;
114
+ configPath: string;
115
+ cwd: string;
116
+ target: 'hosted' | 'local';
117
+ }): Promise<PreparedTileflowTreeModels>;
118
+
119
+ /** Render a report image without changing the immutable generated sprite. */
120
+ declare function renderTileflowIconAtlasPreview(source: Uint8Array, index: TileflowIconSpriteIndex): Promise<Uint8Array>;
121
+
122
+ /**
123
+ * Read the exact current lock bytes for a compare-and-swap update.
124
+ *
125
+ * `null` means no lock exists yet. The returned text is the only valid `expectedContents` for a
126
+ * later `writeTileflowIconsLockfile` call, so a concurrent writer can never be silently lost.
127
+ */
128
+ declare function readTileflowIconsLockfileText(baseDirectory: string): Promise<string | null>;
129
+ declare function readTileflowIconsLockfile(baseDirectory: string, sources?: readonly TileflowIconSource[]): Promise<TileflowIconsLockfileV1>;
130
+ /** Compare-and-swap the whole lock. Never rewrite executable config or lose another writer's pin. */
131
+ declare function writeTileflowIconsLockfile(baseDirectory: string, input: TileflowIconsLockfileV1, expectedContents: string | null): Promise<void>;
132
+
133
+ type ComposeTileflowIconSourcesOptions = TileflowIconCacheOptions & {
134
+ cwd: string;
135
+ baseDirectory?: string;
136
+ /** Trusted caller-owned diagnostic prefix, such as `maps.main.icons`. */
137
+ configPath?: string;
138
+ lock?: unknown;
139
+ target?: TileflowIconCompilationTarget;
140
+ };
141
+ /** One declared contributor, retained even when later contributors shadow all of its exports. */
142
+ type TileflowComposedIconContributor = {
143
+ /** Ordered declared entries, before later contributors replace any of them. */
144
+ entries: readonly TileflowIconDirectoryEntry[];
145
+ iconIds: readonly string[];
146
+ insideWorkingTree: boolean;
147
+ kind: 'local' | 'package';
148
+ label: string;
149
+ } | {
150
+ iconIds: readonly string[];
151
+ kind: 'icon-set';
152
+ /** Canonical `@team/set` reference; the exact revision lives in the receipt. */
153
+ label: string;
154
+ packageId: string;
155
+ reference: string;
156
+ setId: string;
157
+ version: number;
158
+ versionId: string;
159
+ };
160
+ /** One effective icon after ordered last-wins replacement has completed. */
161
+ type TileflowComposedIconWinner = {
162
+ contributor: number;
163
+ id: string;
164
+ identity: TileflowEffectiveIconSourceIdentity;
165
+ /** Present only for filesystem-backed winners; verified shared cells expose no original. */
166
+ source: TileflowIconDirectorySourceFile | null;
167
+ };
168
+ type TileflowComposedIconSources = {
169
+ package: CompiledTileflowIconPackage | null;
170
+ composition: TileflowIconCompositionV1 | null;
171
+ contributors: TileflowComposedIconContributor[];
172
+ sourceIdentities: TileflowEffectiveIconSourceIdentity[];
173
+ replacements: Array<{
174
+ id: string;
175
+ replaced: number;
176
+ winner: number;
177
+ }>;
178
+ /** Exact files whose contents select this composition, such as the icon lock. */
179
+ watchFiles: string[];
180
+ /** Local directories whose children can change the composition without a config edit. */
181
+ watchPaths: string[];
182
+ winners: TileflowComposedIconWinner[];
183
+ };
184
+ /** The single normal icon-preparation path for declared local, package and shared contributors. */
185
+ declare function composeTileflowIconSources(input: readonly TileflowIconSource[], options: ComposeTileflowIconSourcesOptions): Promise<TileflowComposedIconSources>;
186
+
187
+ type TileflowBuildAsset = {
188
+ contentType: string;
189
+ fileName: string;
190
+ source: string | Uint8Array;
191
+ };
192
+ /** Executable authoring input before local sources have been resolved into runtime URLs. */
193
+ type TileflowSourceCatalog = TileflowBuildCatalog;
194
+ declare const preparedTileflowBuildCatalog: unique symbol;
195
+ /** A validated catalog paired with build-owned portable assets. */
196
+ type PreparedTileflowBuildCatalog = TileflowBuildCatalog & {
197
+ readonly [preparedTileflowBuildCatalog]: true;
198
+ };
199
+ type PreparedTileflowCatalog = {
200
+ assets: TileflowBuildAsset[];
201
+ baseDirectory: string;
202
+ cwd: string;
203
+ mapAssets: Record<string, TileflowPreparedMapAssets>;
204
+ /** Ordered shared dependency receipts, present only for maps that declare an Icon Set. */
205
+ mapIconCompositions: Record<string, TileflowIconCompositionV1>;
206
+ mapIconSources: Record<string, readonly TileflowEffectiveIconSourceIdentity[]>;
207
+ /** The files of each map's own 3D models, for its revision. */
208
+ mapModelSources?: Record<string, readonly TileflowEffectiveModelSourceIdentity[]>;
209
+ project: PreparedTileflowBuildCatalog;
210
+ sourceProject: TileflowSourceCatalog;
211
+ /** Exact files whose contents select the composition, such as the icon lock. */
212
+ watchFiles: string[];
213
+ watchPaths: string[];
214
+ };
215
+ /**
216
+ * Explicit, trusted resolution settings for declared shared Icon Sets.
217
+ *
218
+ * These are supplied by the calling command or adapter. A lock file can never widen them, and no
219
+ * ambient process state selects a cache, an origin, or a transport.
220
+ */
221
+ type TileflowIconResolutionOptions = TileflowIconCacheOptions;
222
+ type TileflowIconCompilationTarget = 'hosted' | 'local';
223
+ type TileflowIconCompilationIssue = {
224
+ message: string;
225
+ path: string;
226
+ };
227
+ type CompiledTileflowIconPackageFile = {
228
+ contentType: 'application/json' | 'image/png';
229
+ fileName: TileflowIconPackageFileName;
230
+ source: Uint8Array;
231
+ };
232
+ type CompiledTileflowIconPackage = {
233
+ contentHash: string;
234
+ files: CompiledTileflowIconPackageFile[];
235
+ manifest: TileflowIconPackageManifest;
236
+ };
237
+ type TileflowMapIconPackageBinding = {
238
+ appearances?: Record<string, TileflowIconAppearance>;
239
+ iconIds: readonly string[];
240
+ label: string;
241
+ mapName: string;
242
+ packageHash: string;
243
+ };
244
+ type CompileTileflowIconPackagesOptions = {
245
+ baseDirectory?: string;
246
+ cwd: string;
247
+ /** Trusted shared-set resolution settings; omitted means the default verified cache. */
248
+ icons?: TileflowIconResolutionOptions;
249
+ target: TileflowIconCompilationTarget;
250
+ };
251
+ type CompileTileflowIconPackagesResult = {
252
+ bindings: TileflowMapIconPackageBinding[];
253
+ /** Exact ordered dependency receipts, keyed by map, for maps that declare an Icon Set. */
254
+ compositions: Record<string, TileflowIconCompositionV1>;
255
+ packages: CompiledTileflowIconPackage[];
256
+ sourceIdentities: Record<string, readonly TileflowEffectiveIconSourceIdentity[]>;
257
+ /** Exact files whose contents select the composition, such as the icon lock. */
258
+ watchFiles: string[];
259
+ watchPaths: string[];
260
+ };
261
+ type InspectTileflowIconCatalogsOptions = {
262
+ baseDirectory?: string;
263
+ cwd: string;
264
+ icons?: TileflowIconResolutionOptions;
265
+ mapNames?: readonly string[];
266
+ };
267
+ type TileflowIconCatalogSourceFormat = 'jpeg' | 'png' | 'svg' | 'webp';
268
+ type TileflowIconCatalogAtlasRectangle = {
269
+ height: number;
270
+ width: number;
271
+ x: number;
272
+ y: number;
273
+ };
274
+ type TileflowIconCatalogRenderedDensity = {
275
+ atlas: TileflowIconCatalogAtlasRectangle;
276
+ height: number;
277
+ pixelRatio: 1 | 2;
278
+ pixelSha256: string;
279
+ width: number;
280
+ };
281
+ /** One winning icon's origin: a repository/package original, or an exact shared revision cell. */
282
+ type TileflowIconCatalogIconSource = {
283
+ byteLength: number;
284
+ contributor: number;
285
+ dimensions: {
286
+ height: number;
287
+ width: number;
288
+ } | null;
289
+ format: TileflowIconCatalogSourceFormat;
290
+ kind: 'file';
291
+ path: string;
292
+ } | {
293
+ contributor: number;
294
+ kind: 'icon-set';
295
+ reference: string;
296
+ version: number;
297
+ };
298
+ type TileflowIconCatalogIcon = {
299
+ appearance?: TileflowIconAppearance;
300
+ layout?: TileflowIconLayoutMetadata;
301
+ id: string;
302
+ rendered: {
303
+ oneX: TileflowIconCatalogRenderedDensity;
304
+ twoX: TileflowIconCatalogRenderedDensity;
305
+ };
306
+ source: TileflowIconCatalogIconSource;
307
+ };
308
+ /** One declared contributor in authoring order, retained even when fully shadowed. */
309
+ type TileflowIconCatalogContributor = {
310
+ iconIds: string[];
311
+ insideWorkingTree: boolean;
312
+ kind: 'local' | 'package';
313
+ label: string;
314
+ } | {
315
+ iconIds: string[];
316
+ kind: 'icon-set';
317
+ label: string;
318
+ reference: string;
319
+ version: number;
320
+ };
321
+ type TileflowIconCatalog = {
322
+ compiledPackage: CompiledTileflowIconPackage;
323
+ composition: TileflowIconCompositionV1 | null;
324
+ contributors: TileflowIconCatalogContributor[];
325
+ icons: TileflowIconCatalogIcon[];
326
+ insideWorkingTree: boolean;
327
+ replacements: TileflowIconReplacement[];
328
+ };
329
+ type TileflowIconReplacement = {
330
+ id: string;
331
+ replaced: string;
332
+ winner: string;
333
+ };
334
+ type TileflowIconCatalogMap = {
335
+ name: string;
336
+ icons: {
337
+ composition: TileflowIconCompositionV1 | null;
338
+ contributors: TileflowIconCatalogContributor[];
339
+ iconIds: string[];
340
+ kind: 'sources';
341
+ label: string;
342
+ packageHash: string;
343
+ } | {
344
+ kind: 'none';
345
+ };
346
+ };
347
+ type TileflowIconCatalogInspection = {
348
+ catalogs: TileflowIconCatalog[];
349
+ maps: TileflowIconCatalogMap[];
350
+ };
351
+ declare class TileflowIconCompilationError extends Error {
352
+ readonly code: "ICON_INVALID";
353
+ readonly issues: TileflowIconCompilationIssue[];
354
+ readonly phase: "icon-compilation";
355
+ constructor(issues: TileflowIconCompilationIssue[]);
356
+ }
357
+ type DecodedIconDimensions = {
358
+ height: number;
359
+ width: number;
360
+ };
361
+ declare const iconFileExtensions: Set<string>;
362
+ declare function compileTileflowIconPackages(project: TileflowBuildCatalog, options: CompileTileflowIconPackagesOptions): Promise<CompileTileflowIconPackagesResult>;
363
+ declare function inspectTileflowIconCatalogs(project: TileflowBuildCatalog, options: InspectTileflowIconCatalogsOptions): Promise<TileflowIconCatalogInspection>;
364
+ declare function prepareTileflowCatalogIcons(project: TileflowBuildCatalog, options: {
365
+ assetBaseUrl: string;
366
+ baseDirectory?: string;
367
+ cwd: string;
368
+ icons?: TileflowIconResolutionOptions;
369
+ }): Promise<PreparedTileflowCatalog>;
370
+ /**
371
+ * Report the exact filesystem inputs that can change the composed sprite.
372
+ *
373
+ * The lock beside the selected config is one of them; a lock edit rebuilds from its new exact
374
+ * pins. Catalog heads are never polled, so a newly published revision changes nothing here.
375
+ */
376
+ declare function getTileflowIconWatchPaths(project: TileflowBuildCatalog, cwd: string, baseDirectory?: string): Promise<string[]>;
377
+
378
+ /** One declared icon file, including entries a later contributor eventually replaces. */
379
+ type TileflowIconDirectoryEntry = {
380
+ byteLength: number;
381
+ format: TileflowIconCatalogSourceFormat;
382
+ id: string;
383
+ kind: 'icon' | 'pattern';
384
+ /** Authoring-relative display path. Absolute filesystem paths never leave this module. */
385
+ path: string;
386
+ };
387
+ /** The decoded original behind one effective local winner. */
388
+ type TileflowIconDirectorySourceFile = TileflowIconDirectoryEntry & {
389
+ dimensions: DecodedIconDimensions;
390
+ };
391
+ type ReadTileflowIconDirectoryResult = {
392
+ containmentRoot: string;
393
+ entries: TileflowIconDirectoryEntry[];
394
+ iconIds: string[];
395
+ /** Authoring label: a config-relative directory or a safe `npm:<package>/<path>` descriptor. */
396
+ label: string;
397
+ realPath: string;
398
+ render: (ids: readonly string[]) => Promise<Array<{
399
+ icon: TileflowRenderedIcon;
400
+ identity: TileflowEffectiveIconSourceIdentity;
401
+ source: TileflowIconDirectorySourceFile;
402
+ sourceBytes: number;
403
+ }>>;
404
+ watchPath?: string;
405
+ };
406
+ /** A bounded local source snapshot used by the explicit shared-composition build port. */
407
+ declare function readTileflowIconDirectory(source: TileflowIconDirectory, options: {
408
+ baseDirectory: string;
409
+ /** Trusted caller-owned diagnostic prefix, such as `maps.main.icons`. */
410
+ configPath?: string;
411
+ cwd: string;
412
+ /** Ordinal of this directory inside the declared contributor sequence. */
413
+ ordinal?: number;
414
+ target: TileflowIconCompilationTarget;
415
+ }): Promise<ReadTileflowIconDirectoryResult>;
416
+
417
+ export { readTileflowIconsLockfileText as $, TileflowIconCompilationError as A, type TileflowIconCompilationIssue as B, type CompileTileflowIconPackagesOptions as C, type TileflowIconCompilationTarget as D, type TileflowIconDirectoryEntry as E, type TileflowIconDirectorySourceFile as F, type TileflowIconReplacement as G, type TileflowMapIconPackageBinding as H, type InspectTileflowIconCatalogsOptions as I, type TileflowRenderedIcon as J, type TileflowRenderedIconCell as K, compileTileflowIconPackages as L, composeTileflowIconSources as M, getTileflowIconCacheDirectory as N, getTileflowIconWatchPaths as O, type PreparedTileflowBuildCatalog as P, iconFileExtensions as Q, type ReadTileflowIconDirectoryResult as R, inspectTileflowIconCatalogs as S, type TileflowBuildAsset as T, loadTileflowIconSetArtifact as U, type VerifiedTileflowIconArtifact as V, packTileflowRenderedIcons as W, prepareTileflowCatalogIcons as X, prepareTileflowMapTreeModels as Y, readTileflowIconDirectory as Z, readTileflowIconsLockfile as _, type TileflowIconResolutionOptions as a, renderTileflowIconAtlasPreview as a0, storeTileflowIconSetArtifact as a1, verifyTileflowIconArtifact as a2, writeTileflowIconsLockfile as a3, type TileflowSourceCatalog as b, type PreparedTileflowCatalog as c, type TileflowBuildingModelLevels as d, type TileflowLandmarkSource as e, encodeTileflowLandmarkRegion as f, prepareTileflowBuildingModel as g, type CompileTileflowIconPackagesResult as h, type CompiledTileflowIconPackage as i, type CompiledTileflowIconPackageFile as j, type ComposeTileflowIconSourcesOptions as k, type PreparedTileflowBuildingModel as l, type TileflowComposedIconContributor as m, type TileflowComposedIconSources as n, type TileflowComposedIconWinner as o, packageTileflowLandmarkTile as p, type TileflowIconCacheOptions as q, type TileflowIconCatalog as r, type TileflowIconCatalogAtlasRectangle as s, type TileflowIconCatalogContributor as t, type TileflowIconCatalogIcon as u, type TileflowIconCatalogIconSource as v, type TileflowIconCatalogInspection as w, type TileflowIconCatalogMap as x, type TileflowIconCatalogRenderedDensity as y, type TileflowIconCatalogSourceFormat as z };
@@ -0,0 +1,3 @@
1
+ import '@tileflow/core';
2
+ import '@tileflow/core/build';
3
+ export { C as CompileTileflowIconPackagesOptions, h as CompileTileflowIconPackagesResult, i as CompiledTileflowIconPackage, j as CompiledTileflowIconPackageFile, k as ComposeTileflowIconSourcesOptions, I as InspectTileflowIconCatalogsOptions, P as PreparedTileflowBuildCatalog, l as PreparedTileflowBuildingModel, c as PreparedTileflowCatalog, R as ReadTileflowIconDirectoryResult, T as TileflowBuildAsset, m as TileflowComposedIconContributor, n as TileflowComposedIconSources, o as TileflowComposedIconWinner, q as TileflowIconCacheOptions, r as TileflowIconCatalog, s as TileflowIconCatalogAtlasRectangle, t as TileflowIconCatalogContributor, u as TileflowIconCatalogIcon, v as TileflowIconCatalogIconSource, w as TileflowIconCatalogInspection, x as TileflowIconCatalogMap, y as TileflowIconCatalogRenderedDensity, z as TileflowIconCatalogSourceFormat, A as TileflowIconCompilationError, B as TileflowIconCompilationIssue, D as TileflowIconCompilationTarget, E as TileflowIconDirectoryEntry, F as TileflowIconDirectorySourceFile, G as TileflowIconReplacement, a as TileflowIconResolutionOptions, H as TileflowMapIconPackageBinding, J as TileflowRenderedIcon, K as TileflowRenderedIconCell, b as TileflowSourceCatalog, V as VerifiedTileflowIconArtifact, L as compileTileflowIconPackages, M as composeTileflowIconSources, N as getTileflowIconCacheDirectory, O as getTileflowIconWatchPaths, Q as iconFileExtensions, S as inspectTileflowIconCatalogs, U as loadTileflowIconSetArtifact, W as packTileflowRenderedIcons, X as prepareTileflowCatalogIcons, Y as prepareTileflowMapTreeModels, Z as readTileflowIconDirectory, _ as readTileflowIconsLockfile, $ as readTileflowIconsLockfileText, a0 as renderTileflowIconAtlasPreview, a1 as storeTileflowIconSetArtifact, a2 as verifyTileflowIconArtifact, a3 as writeTileflowIconsLockfile } from './icons-BIHpw5Zy.js';
package/dist/icons.js ADDED
@@ -0,0 +1,41 @@
1
+ import {
2
+ TileflowIconCompilationError,
3
+ compileTileflowIconPackages,
4
+ composeTileflowIconSources,
5
+ getTileflowIconCacheDirectory,
6
+ getTileflowIconWatchPaths,
7
+ iconFileExtensions,
8
+ inspectTileflowIconCatalogs,
9
+ loadTileflowIconSetArtifact,
10
+ packTileflowRenderedIcons,
11
+ prepareTileflowCatalogIcons,
12
+ prepareTileflowMapTreeModels,
13
+ readTileflowIconDirectory,
14
+ readTileflowIconsLockfile,
15
+ readTileflowIconsLockfileText,
16
+ renderTileflowIconAtlasPreview,
17
+ storeTileflowIconSetArtifact,
18
+ verifyTileflowIconArtifact,
19
+ writeTileflowIconsLockfile
20
+ } from "./chunk-C4VPHZ3F.js";
21
+ import "./chunk-RTU7TD4M.js";
22
+ export {
23
+ TileflowIconCompilationError,
24
+ compileTileflowIconPackages,
25
+ composeTileflowIconSources,
26
+ getTileflowIconCacheDirectory,
27
+ getTileflowIconWatchPaths,
28
+ iconFileExtensions,
29
+ inspectTileflowIconCatalogs,
30
+ loadTileflowIconSetArtifact,
31
+ packTileflowRenderedIcons,
32
+ prepareTileflowCatalogIcons,
33
+ prepareTileflowMapTreeModels,
34
+ readTileflowIconDirectory,
35
+ readTileflowIconsLockfile,
36
+ readTileflowIconsLockfileText,
37
+ renderTileflowIconAtlasPreview,
38
+ storeTileflowIconSetArtifact,
39
+ verifyTileflowIconArtifact,
40
+ writeTileflowIconsLockfile
41
+ };
@@ -0,0 +1,149 @@
1
+ import { TileflowThemeAuditDiagnostic, TileflowThemeColorScheme } from '@tileflow/core';
2
+ import { LoadTileflowConfigOptions, LoadedTileflowConfig } from './config.js';
3
+ import { TileflowCommandSummary, TileflowStructuredDiagnostic } from './validation.js';
4
+ import { TileflowPreparedMapAssets, TileflowBuildCatalog } from '@tileflow/core/build';
5
+
6
+ type TileflowFeatureInspectionOptions = {
7
+ apiBaseUrl?: string;
8
+ center: readonly [number, number];
9
+ fetch?: typeof fetch;
10
+ height?: number;
11
+ limit?: number;
12
+ properties?: readonly string[];
13
+ /** Build-owned assets required to compile the selected map exactly. */
14
+ preparedAssets?: TileflowPreparedMapAssets;
15
+ signal?: AbortSignal;
16
+ sourceLayers: readonly string[];
17
+ timeoutMs?: number;
18
+ width?: number;
19
+ zoom: number;
20
+ };
21
+ type TileflowInspectedProperty = boolean | number | string;
22
+ type TileflowInspectedFeature = {
23
+ sourceLayer: string;
24
+ id: number | null;
25
+ geometry: {
26
+ type: string;
27
+ center: [number, number];
28
+ bounds: [number, number, number, number];
29
+ };
30
+ properties: Record<string, TileflowInspectedProperty>;
31
+ };
32
+ type TileflowFeatureInspection = {
33
+ schemaVersion: 1;
34
+ map: string;
35
+ camera: {
36
+ center: [number, number];
37
+ zoom: number;
38
+ viewport: {
39
+ width: number;
40
+ height: number;
41
+ };
42
+ };
43
+ source: {
44
+ id: string;
45
+ origin: string;
46
+ tileJsonPath: string | null;
47
+ tileOrigins: string[];
48
+ version: string | null;
49
+ };
50
+ sourceLayers: string[];
51
+ properties: string[];
52
+ tileZoom: number;
53
+ tilesRead: number;
54
+ scannedFeatures: number;
55
+ truncated: boolean;
56
+ features: TileflowInspectedFeature[];
57
+ };
58
+ declare function inspectTileflowFeatures(project: TileflowBuildCatalog, mapName: string, input: TileflowFeatureInspectionOptions): Promise<TileflowFeatureInspection>;
59
+
60
+ type TileflowConfigInspectionOptions = LoadTileflowConfigOptions & {
61
+ config?: string;
62
+ map?: string;
63
+ };
64
+ type TileflowMapLineageInspection = {
65
+ depth: number;
66
+ declaredPaths: string[];
67
+ id: string;
68
+ version: number;
69
+ };
70
+ type TileflowMapMergeProvenance = {
71
+ declared: boolean;
72
+ inherited: boolean;
73
+ operation: 'defined' | 'overridden';
74
+ path: string;
75
+ /** Stable root-to-leaf lineage depth; disambiguates repeated map ids. */
76
+ sourceDepth: number;
77
+ sourceMap: string;
78
+ };
79
+ type TileflowResolvedMapInspection = {
80
+ id: string;
81
+ lineage: TileflowMapLineageInspection[];
82
+ provenance: TileflowMapMergeProvenance[];
83
+ resolved: Record<string, unknown>;
84
+ themeContract: TileflowThemeContractInspection;
85
+ };
86
+ type TileflowThemeDifferenceInspection = {
87
+ from: unknown;
88
+ path: string;
89
+ to: unknown;
90
+ };
91
+ type TileflowThemeInspection = {
92
+ colorScheme: TileflowThemeColorScheme;
93
+ differencesFromDefault: TileflowThemeDifferenceInspection[];
94
+ id: string;
95
+ isDefault: boolean;
96
+ lighting: Record<string, unknown>;
97
+ name: string;
98
+ systemFor: TileflowThemeColorScheme[];
99
+ tokens: {
100
+ color: Record<string, string>;
101
+ font: Record<string, string>;
102
+ image: Record<string, string>;
103
+ number: Record<string, number>;
104
+ };
105
+ typography: Record<string, unknown>;
106
+ version: number;
107
+ };
108
+ type TileflowThemeContractInspection = {
109
+ audit: TileflowThemeAuditDiagnostic[];
110
+ defaultTheme: string;
111
+ systemThemes?: {
112
+ dark: string;
113
+ light: string;
114
+ };
115
+ themes: Record<string, TileflowThemeInspection>;
116
+ tokenSchema: {
117
+ color: string[];
118
+ font: string[];
119
+ image: string[];
120
+ number: string[];
121
+ };
122
+ };
123
+ type TileflowConfigInspection = TileflowCommandSummary & {
124
+ command: 'inspect';
125
+ ok: true;
126
+ maps: TileflowResolvedMapInspection[];
127
+ diagnostics: TileflowStructuredDiagnostic[];
128
+ };
129
+ /** Resolve a config once and expose only deterministic, secret-free authoring information. */
130
+ declare function inspectTileflowConfig(options?: TileflowConfigInspectionOptions): Promise<TileflowConfigInspection>;
131
+ declare function inspectLoadedTileflowConfig(loaded: LoadedTileflowConfig, options: {
132
+ cwd: string;
133
+ map?: string;
134
+ }): TileflowConfigInspection;
135
+ declare class TileflowConfigInspectionError extends Error {
136
+ readonly code: string;
137
+ readonly phase: "config-inspection";
138
+ readonly issues: Array<{
139
+ code: string;
140
+ message: string;
141
+ path: string;
142
+ phase: string;
143
+ }>;
144
+ constructor(code: string, message: string, path: string);
145
+ }
146
+ /** Sanitize a deterministic JSON-like authoring value for machine-facing CLI output. */
147
+ declare function sanitizeTileflowInspectableValue(value: unknown, cwd: string): unknown;
148
+
149
+ export { type TileflowConfigInspection, TileflowConfigInspectionError, type TileflowConfigInspectionOptions, type TileflowFeatureInspection, type TileflowFeatureInspectionOptions, type TileflowInspectedFeature, type TileflowInspectedProperty, type TileflowMapLineageInspection, type TileflowMapMergeProvenance, type TileflowResolvedMapInspection, type TileflowThemeContractInspection, type TileflowThemeDifferenceInspection, type TileflowThemeInspection, inspectLoadedTileflowConfig, inspectTileflowConfig, inspectTileflowFeatures, sanitizeTileflowInspectableValue };