@tileflow/dev 0.1.0-alpha.24 → 0.1.0-alpha.26

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.
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createTileflowArtifactSession,
3
3
  tileflowArtifactSessionSchemaVersion
4
- } from "./chunk-XXVI42UZ.js";
4
+ } from "./chunk-QAMFAM3S.js";
5
5
  import {
6
6
  normalizeTileflowBasePath
7
- } from "./chunk-RSBV4L2Y.js";
7
+ } from "./chunk-UTRO4IBQ.js";
8
8
  import {
9
9
  TileflowStyleValidationError
10
10
  } from "./chunk-KDFTE4Q5.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TileflowAssetDirectoryError,
3
3
  resolveTileflowAssetDirectories
4
- } from "./chunk-BL3FK4GO.js";
4
+ } from "./chunk-7C4F6GAX.js";
5
5
  import {
6
6
  isPathWithin
7
7
  } from "./chunk-D4OE4ITL.js";
@@ -6,6 +6,7 @@ import {
6
6
  import { realpathSync } from "fs";
7
7
  import { isAbsolute, relative, resolve, sep, win32 } from "path";
8
8
  import { compareCodeUnits } from "@tileflow/core";
9
+ import { TileflowNativeCompatibilityError } from "@tileflow/core/native-profile";
9
10
  var tileflowCommandDocumentSchemaVersion = 1;
10
11
  function createTileflowCommandSummary(input) {
11
12
  return {
@@ -21,6 +22,9 @@ function createTileflowCommandSummary(input) {
21
22
  };
22
23
  }
23
24
  function createTileflowStructuredDiagnostics(error, cwd, defaults) {
25
+ if (error instanceof TileflowNativeCompatibilityError) {
26
+ return error.issues.map((issue) => ({ ...issue }));
27
+ }
24
28
  const inheritedCode = optionalField(error, "code");
25
29
  const inheritedDomain = optionalField(error, "domain") ?? optionalField(error, "owner") ?? optionalNestedField(error, "domain") ?? optionalNestedField(error, "owner");
26
30
  const inheritedLevel = optionalField(error, "level") ?? optionalNestedField(error, "level");
@@ -85,7 +89,8 @@ function createTileflowCommandFailureDocument(command, error, cwd, defaults) {
85
89
  severity: primary.severity,
86
90
  message: primary.message,
87
91
  suggestion: primary.suggestion,
88
- diagnostics
92
+ diagnostics,
93
+ ...primary.renderer ? { renderer: primary.renderer, profile: primary.profile } : {}
89
94
  };
90
95
  }
91
96
  function serializeTileflowCommandDocument(value) {
package/dist/fonts.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { TileflowFontBundleManifest, MapLibreStyle } from '@tileflow/core';
2
2
  import { TileflowEffectiveFontSourceIdentity, TileflowBuildStyles, TileflowBuildCatalog } from '@tileflow/core/build';
3
- import { e as TileflowBuildAsset } from './icons-CkLVtaP-.js';
3
+ import { TileflowBuildAsset } from './icons.js';
4
4
 
5
5
  type TileflowFontCompilationTarget = 'hosted' | 'local';
6
6
  type TileflowFontCompilationIssue = {
package/dist/fonts.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  getTileflowFontWatchPaths,
5
5
  prepareTileflowStyleFonts,
6
6
  replaceTileflowStyleFontSources
7
- } from "./chunk-RSBV4L2Y.js";
8
- import "./chunk-BL3FK4GO.js";
7
+ } from "./chunk-UTRO4IBQ.js";
8
+ import "./chunk-7C4F6GAX.js";
9
9
  import "./chunk-D4OE4ITL.js";
10
10
  export {
11
11
  TileflowFontCompilationError,
package/dist/icons.d.ts CHANGED
@@ -1,3 +1,337 @@
1
- import '@tileflow/core';
2
- export { b as CompileTileflowIconPackagesResult, C as CompiledTileflowIconPackage, c as CompiledTileflowIconPackageFile, I as InspectTileflowIconCatalogsOptions, P as PreparedTileflowBuildCatalog, d as PreparedTileflowCatalog, e as TileflowBuildAsset, f as TileflowIconCatalog, g as TileflowIconCatalogAtlasRectangle, h as TileflowIconCatalogIcon, i as TileflowIconCatalogInspection, j as TileflowIconCatalogMap, k as TileflowIconCatalogRenderedDensity, l as TileflowIconCatalogSourceFormat, m as TileflowIconCompilationError, n as TileflowIconCompilationIssue, a as TileflowIconCompilationTarget, o as TileflowIconReplacement, p as TileflowMapIconPackageBinding, r as TileflowSourceCatalog, s as compileTileflowIconPackages, t as getTileflowIconWatchPaths, u as iconFileExtensions, v as inspectTileflowIconCatalogs, x as prepareTileflowCatalogIcons, y as readTileflowIconDirectory } from './icons-CkLVtaP-.js';
3
- import '@tileflow/core/build';
1
+ import { TileflowIconAppearance, TileflowIconLayoutMetadata, TileflowIconSetPin, TileflowIconSpriteIndex, TileflowIconSource, TileflowIconsLockfileV1, TileflowIconCompositionV1, TileflowIconPackageFileName, TileflowIconPackageManifest, TileflowIconDirectory } from '@tileflow/core';
2
+ import { 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
+ /** Render a report image without changing the immutable generated sprite. */
42
+ declare function renderTileflowIconAtlasPreview(source: Uint8Array, index: TileflowIconSpriteIndex): Promise<Uint8Array>;
43
+
44
+ /**
45
+ * Read the exact current lock bytes for a compare-and-swap update.
46
+ *
47
+ * `null` means no lock exists yet. The returned text is the only valid `expectedContents` for a
48
+ * later `writeTileflowIconsLockfile` call, so a concurrent writer can never be silently lost.
49
+ */
50
+ declare function readTileflowIconsLockfileText(baseDirectory: string): Promise<string | null>;
51
+ declare function readTileflowIconsLockfile(baseDirectory: string, sources?: readonly TileflowIconSource[]): Promise<TileflowIconsLockfileV1>;
52
+ /** Compare-and-swap the whole lock. Never rewrite executable config or lose another writer's pin. */
53
+ declare function writeTileflowIconsLockfile(baseDirectory: string, input: TileflowIconsLockfileV1, expectedContents: string | null): Promise<void>;
54
+
55
+ type ComposeTileflowIconSourcesOptions = TileflowIconCacheOptions & {
56
+ cwd: string;
57
+ baseDirectory?: string;
58
+ /** Trusted caller-owned diagnostic prefix, such as `maps.main.icons`. */
59
+ configPath?: string;
60
+ lock?: unknown;
61
+ target?: TileflowIconCompilationTarget;
62
+ };
63
+ /** One declared contributor, retained even when later contributors shadow all of its exports. */
64
+ type TileflowComposedIconContributor = {
65
+ /** Ordered declared entries, before later contributors replace any of them. */
66
+ entries: readonly TileflowIconDirectoryEntry[];
67
+ iconIds: readonly string[];
68
+ insideWorkingTree: boolean;
69
+ kind: 'local' | 'package';
70
+ label: string;
71
+ } | {
72
+ iconIds: readonly string[];
73
+ kind: 'icon-set';
74
+ /** Canonical `@team/set` reference; the exact revision lives in the receipt. */
75
+ label: string;
76
+ packageId: string;
77
+ reference: string;
78
+ setId: string;
79
+ version: number;
80
+ versionId: string;
81
+ };
82
+ /** One effective icon after ordered last-wins replacement has completed. */
83
+ type TileflowComposedIconWinner = {
84
+ contributor: number;
85
+ id: string;
86
+ identity: TileflowEffectiveIconSourceIdentity;
87
+ /** Present only for filesystem-backed winners; verified shared cells expose no original. */
88
+ source: TileflowIconDirectorySourceFile | null;
89
+ };
90
+ type TileflowComposedIconSources = {
91
+ package: CompiledTileflowIconPackage | null;
92
+ composition: TileflowIconCompositionV1 | null;
93
+ contributors: TileflowComposedIconContributor[];
94
+ sourceIdentities: TileflowEffectiveIconSourceIdentity[];
95
+ replacements: Array<{
96
+ id: string;
97
+ replaced: number;
98
+ winner: number;
99
+ }>;
100
+ /** Exact files whose contents select this composition, such as the icon lock. */
101
+ watchFiles: string[];
102
+ /** Local directories whose children can change the composition without a config edit. */
103
+ watchPaths: string[];
104
+ winners: TileflowComposedIconWinner[];
105
+ };
106
+ /** The single normal icon-preparation path for declared local, package and shared contributors. */
107
+ declare function composeTileflowIconSources(input: readonly TileflowIconSource[], options: ComposeTileflowIconSourcesOptions): Promise<TileflowComposedIconSources>;
108
+
109
+ type TileflowBuildAsset = {
110
+ contentType: string;
111
+ fileName: string;
112
+ source: string | Uint8Array;
113
+ };
114
+ /** Executable authoring input before local sources have been resolved into runtime URLs. */
115
+ type TileflowSourceCatalog = TileflowBuildCatalog;
116
+ declare const preparedTileflowBuildCatalog: unique symbol;
117
+ /** A validated catalog paired with build-owned portable assets. */
118
+ type PreparedTileflowBuildCatalog = TileflowBuildCatalog & {
119
+ readonly [preparedTileflowBuildCatalog]: true;
120
+ };
121
+ type PreparedTileflowCatalog = {
122
+ assets: TileflowBuildAsset[];
123
+ baseDirectory: string;
124
+ cwd: string;
125
+ mapAssets: Record<string, TileflowPreparedMapAssets>;
126
+ /** Ordered shared dependency receipts, present only for maps that declare an Icon Set. */
127
+ mapIconCompositions: Record<string, TileflowIconCompositionV1>;
128
+ mapIconSources: Record<string, readonly TileflowEffectiveIconSourceIdentity[]>;
129
+ project: PreparedTileflowBuildCatalog;
130
+ sourceProject: TileflowSourceCatalog;
131
+ /** Exact files whose contents select the composition, such as the icon lock. */
132
+ watchFiles: string[];
133
+ watchPaths: string[];
134
+ };
135
+ /**
136
+ * Explicit, trusted resolution settings for declared shared Icon Sets.
137
+ *
138
+ * These are supplied by the calling command or adapter. A lock file can never widen them, and no
139
+ * ambient process state selects a cache, an origin, or a transport.
140
+ */
141
+ type TileflowIconResolutionOptions = TileflowIconCacheOptions;
142
+ type TileflowIconCompilationTarget = 'hosted' | 'local';
143
+ type TileflowIconCompilationIssue = {
144
+ message: string;
145
+ path: string;
146
+ };
147
+ type CompiledTileflowIconPackageFile = {
148
+ contentType: 'application/json' | 'image/png';
149
+ fileName: TileflowIconPackageFileName;
150
+ source: Uint8Array;
151
+ };
152
+ type CompiledTileflowIconPackage = {
153
+ contentHash: string;
154
+ files: CompiledTileflowIconPackageFile[];
155
+ manifest: TileflowIconPackageManifest;
156
+ };
157
+ type TileflowMapIconPackageBinding = {
158
+ appearances?: Record<string, TileflowIconAppearance>;
159
+ iconIds: readonly string[];
160
+ label: string;
161
+ mapName: string;
162
+ packageHash: string;
163
+ };
164
+ type CompileTileflowIconPackagesOptions = {
165
+ baseDirectory?: string;
166
+ cwd: string;
167
+ /** Trusted shared-set resolution settings; omitted means the default verified cache. */
168
+ icons?: TileflowIconResolutionOptions;
169
+ target: TileflowIconCompilationTarget;
170
+ };
171
+ type CompileTileflowIconPackagesResult = {
172
+ bindings: TileflowMapIconPackageBinding[];
173
+ /** Exact ordered dependency receipts, keyed by map, for maps that declare an Icon Set. */
174
+ compositions: Record<string, TileflowIconCompositionV1>;
175
+ packages: CompiledTileflowIconPackage[];
176
+ sourceIdentities: Record<string, readonly TileflowEffectiveIconSourceIdentity[]>;
177
+ /** Exact files whose contents select the composition, such as the icon lock. */
178
+ watchFiles: string[];
179
+ watchPaths: string[];
180
+ };
181
+ type InspectTileflowIconCatalogsOptions = {
182
+ baseDirectory?: string;
183
+ cwd: string;
184
+ icons?: TileflowIconResolutionOptions;
185
+ mapNames?: readonly string[];
186
+ };
187
+ type TileflowIconCatalogSourceFormat = 'jpeg' | 'png' | 'svg' | 'webp';
188
+ type TileflowIconCatalogAtlasRectangle = {
189
+ height: number;
190
+ width: number;
191
+ x: number;
192
+ y: number;
193
+ };
194
+ type TileflowIconCatalogRenderedDensity = {
195
+ atlas: TileflowIconCatalogAtlasRectangle;
196
+ height: number;
197
+ pixelRatio: 1 | 2;
198
+ pixelSha256: string;
199
+ width: number;
200
+ };
201
+ /** One winning icon's origin: a repository/package original, or an exact shared revision cell. */
202
+ type TileflowIconCatalogIconSource = {
203
+ byteLength: number;
204
+ contributor: number;
205
+ dimensions: {
206
+ height: number;
207
+ width: number;
208
+ } | null;
209
+ format: TileflowIconCatalogSourceFormat;
210
+ kind: 'file';
211
+ path: string;
212
+ } | {
213
+ contributor: number;
214
+ kind: 'icon-set';
215
+ reference: string;
216
+ version: number;
217
+ };
218
+ type TileflowIconCatalogIcon = {
219
+ appearance?: TileflowIconAppearance;
220
+ layout?: TileflowIconLayoutMetadata;
221
+ id: string;
222
+ rendered: {
223
+ oneX: TileflowIconCatalogRenderedDensity;
224
+ twoX: TileflowIconCatalogRenderedDensity;
225
+ };
226
+ source: TileflowIconCatalogIconSource;
227
+ };
228
+ /** One declared contributor in authoring order, retained even when fully shadowed. */
229
+ type TileflowIconCatalogContributor = {
230
+ iconIds: string[];
231
+ insideWorkingTree: boolean;
232
+ kind: 'local' | 'package';
233
+ label: string;
234
+ } | {
235
+ iconIds: string[];
236
+ kind: 'icon-set';
237
+ label: string;
238
+ reference: string;
239
+ version: number;
240
+ };
241
+ type TileflowIconCatalog = {
242
+ compiledPackage: CompiledTileflowIconPackage;
243
+ composition: TileflowIconCompositionV1 | null;
244
+ contributors: TileflowIconCatalogContributor[];
245
+ icons: TileflowIconCatalogIcon[];
246
+ insideWorkingTree: boolean;
247
+ replacements: TileflowIconReplacement[];
248
+ };
249
+ type TileflowIconReplacement = {
250
+ id: string;
251
+ replaced: string;
252
+ winner: string;
253
+ };
254
+ type TileflowIconCatalogMap = {
255
+ name: string;
256
+ icons: {
257
+ composition: TileflowIconCompositionV1 | null;
258
+ contributors: TileflowIconCatalogContributor[];
259
+ iconIds: string[];
260
+ kind: 'sources';
261
+ label: string;
262
+ packageHash: string;
263
+ } | {
264
+ kind: 'none';
265
+ };
266
+ };
267
+ type TileflowIconCatalogInspection = {
268
+ catalogs: TileflowIconCatalog[];
269
+ maps: TileflowIconCatalogMap[];
270
+ };
271
+ declare class TileflowIconCompilationError extends Error {
272
+ readonly code: "ICON_INVALID";
273
+ readonly issues: TileflowIconCompilationIssue[];
274
+ readonly phase: "icon-compilation";
275
+ constructor(issues: TileflowIconCompilationIssue[]);
276
+ }
277
+ type DecodedIconDimensions = {
278
+ height: number;
279
+ width: number;
280
+ };
281
+ declare const iconFileExtensions: Set<string>;
282
+ declare function compileTileflowIconPackages(project: TileflowBuildCatalog, options: CompileTileflowIconPackagesOptions): Promise<CompileTileflowIconPackagesResult>;
283
+ declare function inspectTileflowIconCatalogs(project: TileflowBuildCatalog, options: InspectTileflowIconCatalogsOptions): Promise<TileflowIconCatalogInspection>;
284
+ declare function prepareTileflowCatalogIcons(project: TileflowBuildCatalog, options: {
285
+ assetBaseUrl: string;
286
+ baseDirectory?: string;
287
+ cwd: string;
288
+ icons?: TileflowIconResolutionOptions;
289
+ }): Promise<PreparedTileflowCatalog>;
290
+ /**
291
+ * Report the exact filesystem inputs that can change the composed sprite.
292
+ *
293
+ * The lock beside the selected config is one of them; a lock edit rebuilds from its new exact
294
+ * pins. Catalog heads are never polled, so a newly published revision changes nothing here.
295
+ */
296
+ declare function getTileflowIconWatchPaths(project: TileflowBuildCatalog, cwd: string, baseDirectory?: string): Promise<string[]>;
297
+
298
+ /** One declared icon file, including entries a later contributor eventually replaces. */
299
+ type TileflowIconDirectoryEntry = {
300
+ byteLength: number;
301
+ format: TileflowIconCatalogSourceFormat;
302
+ id: string;
303
+ kind: 'icon' | 'pattern';
304
+ /** Authoring-relative display path. Absolute filesystem paths never leave this module. */
305
+ path: string;
306
+ };
307
+ /** The decoded original behind one effective local winner. */
308
+ type TileflowIconDirectorySourceFile = TileflowIconDirectoryEntry & {
309
+ dimensions: DecodedIconDimensions;
310
+ };
311
+ type ReadTileflowIconDirectoryResult = {
312
+ containmentRoot: string;
313
+ entries: TileflowIconDirectoryEntry[];
314
+ iconIds: string[];
315
+ /** Authoring label: a config-relative directory or a safe `npm:<package>/<path>` descriptor. */
316
+ label: string;
317
+ realPath: string;
318
+ render: (ids: readonly string[]) => Promise<Array<{
319
+ icon: TileflowRenderedIcon;
320
+ identity: TileflowEffectiveIconSourceIdentity;
321
+ source: TileflowIconDirectorySourceFile;
322
+ sourceBytes: number;
323
+ }>>;
324
+ watchPath?: string;
325
+ };
326
+ /** A bounded local source snapshot used by the explicit shared-composition build port. */
327
+ declare function readTileflowIconDirectory(source: TileflowIconDirectory, options: {
328
+ baseDirectory: string;
329
+ /** Trusted caller-owned diagnostic prefix, such as `maps.main.icons`. */
330
+ configPath?: string;
331
+ cwd: string;
332
+ /** Ordinal of this directory inside the declared contributor sequence. */
333
+ ordinal?: number;
334
+ target: TileflowIconCompilationTarget;
335
+ }): Promise<ReadTileflowIconDirectoryResult>;
336
+
337
+ export { type CompileTileflowIconPackagesOptions, type CompileTileflowIconPackagesResult, type CompiledTileflowIconPackage, type CompiledTileflowIconPackageFile, type ComposeTileflowIconSourcesOptions, type InspectTileflowIconCatalogsOptions, type PreparedTileflowBuildCatalog, type PreparedTileflowCatalog, type ReadTileflowIconDirectoryResult, type TileflowBuildAsset, type TileflowComposedIconContributor, type TileflowComposedIconSources, type TileflowComposedIconWinner, type TileflowIconCacheOptions, type TileflowIconCatalog, type TileflowIconCatalogAtlasRectangle, type TileflowIconCatalogContributor, type TileflowIconCatalogIcon, type TileflowIconCatalogIconSource, type TileflowIconCatalogInspection, type TileflowIconCatalogMap, type TileflowIconCatalogRenderedDensity, type TileflowIconCatalogSourceFormat, TileflowIconCompilationError, type TileflowIconCompilationIssue, type TileflowIconCompilationTarget, type TileflowIconDirectoryEntry, type TileflowIconDirectorySourceFile, type TileflowIconReplacement, type TileflowIconResolutionOptions, type TileflowMapIconPackageBinding, type TileflowRenderedIcon, type TileflowRenderedIconCell, type TileflowSourceCatalog, type VerifiedTileflowIconArtifact, compileTileflowIconPackages, composeTileflowIconSources, getTileflowIconCacheDirectory, getTileflowIconWatchPaths, iconFileExtensions, inspectTileflowIconCatalogs, loadTileflowIconSetArtifact, packTileflowRenderedIcons, prepareTileflowCatalogIcons, readTileflowIconDirectory, readTileflowIconsLockfile, readTileflowIconsLockfileText, renderTileflowIconAtlasPreview, storeTileflowIconSetArtifact, verifyTileflowIconArtifact, writeTileflowIconsLockfile };
package/dist/icons.js CHANGED
@@ -1,19 +1,39 @@
1
1
  import {
2
2
  TileflowIconCompilationError,
3
3
  compileTileflowIconPackages,
4
+ composeTileflowIconSources,
5
+ getTileflowIconCacheDirectory,
4
6
  getTileflowIconWatchPaths,
5
7
  iconFileExtensions,
6
8
  inspectTileflowIconCatalogs,
9
+ loadTileflowIconSetArtifact,
10
+ packTileflowRenderedIcons,
7
11
  prepareTileflowCatalogIcons,
8
- readTileflowIconDirectory
9
- } from "./chunk-NUHSYLLS.js";
10
- import "./chunk-BL3FK4GO.js";
12
+ readTileflowIconDirectory,
13
+ readTileflowIconsLockfile,
14
+ readTileflowIconsLockfileText,
15
+ renderTileflowIconAtlasPreview,
16
+ storeTileflowIconSetArtifact,
17
+ verifyTileflowIconArtifact,
18
+ writeTileflowIconsLockfile
19
+ } from "./chunk-EJPVUSX4.js";
20
+ import "./chunk-7C4F6GAX.js";
11
21
  export {
12
22
  TileflowIconCompilationError,
13
23
  compileTileflowIconPackages,
24
+ composeTileflowIconSources,
25
+ getTileflowIconCacheDirectory,
14
26
  getTileflowIconWatchPaths,
15
27
  iconFileExtensions,
16
28
  inspectTileflowIconCatalogs,
29
+ loadTileflowIconSetArtifact,
30
+ packTileflowRenderedIcons,
17
31
  prepareTileflowCatalogIcons,
18
- readTileflowIconDirectory
32
+ readTileflowIconDirectory,
33
+ readTileflowIconsLockfile,
34
+ readTileflowIconsLockfileText,
35
+ renderTileflowIconAtlasPreview,
36
+ storeTileflowIconSetArtifact,
37
+ verifyTileflowIconArtifact,
38
+ writeTileflowIconsLockfile
19
39
  };
package/dist/index.d.ts CHANGED
@@ -1,62 +1,14 @@
1
- export { CreateTileflowArtifactPlanOptions, TileflowArtifactAcquisition, TileflowArtifactDiagnostic, TileflowArtifactFile, TileflowArtifactInputGraph, TileflowArtifactPlan, TileflowArtifactSession, TileflowArtifactSessionOptions, TileflowArtifactSessionState, TileflowBuildArtifacts, TileflowBuildArtifactsOptions, TileflowBuildStyleInspections, TileflowHostedManifestOverwriteError, TileflowLocalTilesetFile, TileflowLocalTilesetProductionError, TileflowManifestOptions, WriteTileflowArtifactPlanOptions, WriteTileflowBuildArtifactsOptions, assertNoLocalTilesetsForProduction, assertTileflowSelfHostedManifestTarget, createTileflowArtifactDiagnostics, createTileflowArtifactPlan, createTileflowArtifactSession, createTileflowBuildArtifacts, createTileflowBuildProvenance, createTileflowManifest, createTileflowStyle, createTileflowStyles, disposeTileflowBuildArtifacts, getTileflowArtifactFiles, getTileflowAssetBasePath, getTileflowAssetFileName, getTileflowWatchPaths, isTileflowArtifactInputPath, joinTileflowPublicUrl, normalizeTileflowBasePath, prepareTileflowLocalTilesets, refreshTileflowArtifactSession, resolveTileflowArtifactPublicUrls, tileflowArtifactInventoryFileName, tileflowArtifactPlanSchemaVersion, tileflowArtifactSessionSchemaVersion, writeTileflowArtifactPlan, writeTileflowBuildArtifacts } from './artifacts.js';
1
+ export { CreateTileflowArtifactPlanOptions, TileflowArtifactAcquisition, TileflowArtifactDiagnostic, TileflowArtifactFile, TileflowArtifactInputGraph, TileflowArtifactPlan, TileflowArtifactSession, TileflowArtifactSessionOptions, TileflowArtifactSessionState, TileflowBuildArtifacts, TileflowBuildArtifactsOptions, TileflowBuildStyleInspections, TileflowHostedManifestOverwriteError, TileflowLocalTilesetFile, TileflowLocalTilesetProductionError, TileflowManifestOptions, WriteTileflowArtifactPlanOptions, WriteTileflowBuildArtifactsOptions, assertNoLocalTilesetsForProduction, assertTileflowSelfHostedManifestTarget, createTileflowArtifactDiagnostics, createTileflowArtifactPlan, createTileflowArtifactSession, createTileflowBuildArtifacts, createTileflowBuildProvenance, createTileflowManifest, createTileflowStyle, createTileflowStyles, disposeTileflowBuildArtifacts, getTileflowArtifactFiles, getTileflowAssetBasePath, getTileflowAssetFileName, getTileflowWatchPaths, isTileflowArtifactInputPath, joinTileflowPublicUrl, normalizeTileflowBasePath, prepareTileflowHostedNativeDeployment, prepareTileflowLocalTilesets, refreshTileflowArtifactSession, resolveTileflowArtifactPublicUrls, tileflowArtifactInventoryFileName, tileflowArtifactPlanSchemaVersion, tileflowArtifactSessionSchemaVersion, writeTileflowArtifactPlan, writeTileflowBuildArtifacts } from './artifacts.js';
2
2
  export { LoadTileflowConfigOptions, LoadedTileflowConfig, TileflowValidationError, assertValidTileflowConfig, defaultTileflowApiUrl, defaultTileflowConfigPath, defaultTileflowManifestPath, getFirstTileflowMapName, getTileflowMapNames, loadTileflowConfig, loadTileflowConfigWithInputs, loadValidTileflowConfig, loadValidTileflowConfigWithInputs } from './config.js';
3
3
  export { CompiledTileflowFontBundle, PrepareTileflowStyleFontsOptions, PreparedTileflowStyleFonts, TileflowFontCompilationError, TileflowFontCompilationIssue, TileflowFontCompilationTarget, bindTileflowStyleFontBundle, getTileflowFontWatchPaths, prepareTileflowStyleFonts, replaceTileflowStyleFontSources } from './fonts.js';
4
- import { C as CompiledTileflowIconPackage, T as TileflowRenderedIcon, a as TileflowIconCompilationTarget } from './icons-CkLVtaP-.js';
5
- export { b as CompileTileflowIconPackagesResult, c as CompiledTileflowIconPackageFile, I as InspectTileflowIconCatalogsOptions, P as PreparedTileflowBuildCatalog, d as PreparedTileflowCatalog, e as TileflowBuildAsset, f as TileflowIconCatalog, g as TileflowIconCatalogAtlasRectangle, h as TileflowIconCatalogIcon, i as TileflowIconCatalogInspection, j as TileflowIconCatalogMap, k as TileflowIconCatalogRenderedDensity, l as TileflowIconCatalogSourceFormat, m as TileflowIconCompilationError, n as TileflowIconCompilationIssue, o as TileflowIconReplacement, p as TileflowMapIconPackageBinding, q as TileflowRenderedIconCell, r as TileflowSourceCatalog, s as compileTileflowIconPackages, t as getTileflowIconWatchPaths, u as iconFileExtensions, v as inspectTileflowIconCatalogs, w as packTileflowRenderedIcons, x as prepareTileflowCatalogIcons, y as readTileflowIconDirectory } from './icons-CkLVtaP-.js';
4
+ export { CompileTileflowIconPackagesOptions, CompileTileflowIconPackagesResult, CompiledTileflowIconPackage, CompiledTileflowIconPackageFile, ComposeTileflowIconSourcesOptions, InspectTileflowIconCatalogsOptions, PreparedTileflowBuildCatalog, PreparedTileflowCatalog, ReadTileflowIconDirectoryResult, TileflowBuildAsset, TileflowComposedIconContributor, TileflowComposedIconSources, TileflowComposedIconWinner, TileflowIconCacheOptions, TileflowIconCatalog, TileflowIconCatalogAtlasRectangle, TileflowIconCatalogContributor, TileflowIconCatalogIcon, TileflowIconCatalogIconSource, TileflowIconCatalogInspection, TileflowIconCatalogMap, TileflowIconCatalogRenderedDensity, TileflowIconCatalogSourceFormat, TileflowIconCompilationError, TileflowIconCompilationIssue, TileflowIconCompilationTarget, TileflowIconDirectoryEntry, TileflowIconDirectorySourceFile, TileflowIconReplacement, TileflowIconResolutionOptions, TileflowMapIconPackageBinding, TileflowRenderedIcon, TileflowRenderedIconCell, TileflowSourceCatalog, VerifiedTileflowIconArtifact, compileTileflowIconPackages, composeTileflowIconSources, getTileflowIconCacheDirectory, getTileflowIconWatchPaths, iconFileExtensions, inspectTileflowIconCatalogs, loadTileflowIconSetArtifact, packTileflowRenderedIcons, prepareTileflowCatalogIcons, readTileflowIconDirectory, readTileflowIconsLockfile, readTileflowIconsLockfileText, renderTileflowIconAtlasPreview, storeTileflowIconSetArtifact, verifyTileflowIconArtifact, writeTileflowIconsLockfile } from './icons.js';
6
5
  export { TileflowConfigInspection, TileflowConfigInspectionError, TileflowConfigInspectionOptions, TileflowFeatureInspection, TileflowFeatureInspectionOptions, TileflowInspectedFeature, TileflowInspectedProperty, TileflowMapLineageInspection, TileflowMapMergeProvenance, TileflowResolvedMapInspection, TileflowThemeContractInspection, TileflowThemeDifferenceInspection, TileflowThemeInspection, inspectLoadedTileflowConfig, inspectTileflowConfig, inspectTileflowFeatures, sanitizeTileflowInspectableValue } from './inspect.js';
7
6
  export { ResolvedTileflowPreview, TileflowLandmark, TileflowLandmarkArchive, TileflowLandmarkAxisConvention, TileflowLandmarkManifestV2, TileflowLandmarkModel, TileflowPreviewSelection, TileflowPreviewSelectionError, normalizeTileflowLandmarkManifest, readBoundedTileflowJsonResponse, readBoundedTileflowResponse, renderTileflowPreviewHtml, resolveTileflowPreview } from './preview.js';
8
7
  export { TileflowComparisonMode, TileflowComparisonOptions, TileflowComparisonRequestHandler, TileflowComparisonSide, TileflowDevRequestHandler, TileflowDevRequestHandlerOptions, createTileflowArtifactStatus, createTileflowComparisonRequestHandler, createTileflowDevRequestHandler, createTileflowNodeRequest, getTileflowRequestPath, getTileflowStyleInspectionSelection, getTileflowStyleSelection, isTileflowRequestUrl, tileflowComparisonSchemaVersion, writeTileflowNodeResponse } from './server.js';
9
8
  export { T as TileflowLocalTilesetInspection, a as TileflowTilesetInspectionV1, b as TileflowTilesetInspectionWarning, i as inspectTileflowPmtiles, c as inspectTileflowPmtilesForLocalUse } from './tilesets-C0tGeenP.js';
10
9
  export { TileflowCommandFailureDocument, TileflowCommandSummary, TileflowDiagnosticSeverity, TileflowStructuredDiagnostic, TileflowStyleValidationError, TileflowStyleValidationIssue, assertValidTileflowStyle, createTileflowCommandFailureDocument, createTileflowCommandSummary, createTileflowStructuredDiagnostics, sanitizeDiagnosticSecrets, serializeTileflowCommandDocument, tileflowCommandDocumentSchemaVersion, validateTileflowStyle } from './validation.js';
11
- import { TileflowIconSetPin, TileflowIconCompositionV1, TileflowIconSource, TileflowIconsLockfileV1 } from '@tileflow/core';
12
- import { TileflowEffectiveIconSourceIdentity } from '@tileflow/core/build';
10
+ import '@tileflow/core';
11
+ import '@tileflow/core/build';
13
12
  import '@tileflow/core/manifest';
13
+ import '@tileflow/core/native-profile';
14
14
  import 'node:http';
15
-
16
- type VerifiedTileflowIconArtifact = {
17
- package: CompiledTileflowIconPackage;
18
- icons: TileflowRenderedIcon[];
19
- };
20
- /** Verify exact compressed bytes and independently decode/hash every cell at both densities. */
21
- declare function verifyTileflowIconArtifact(input: CompiledTileflowIconPackage): Promise<VerifiedTileflowIconArtifact>;
22
-
23
- type TileflowIconCacheOptions = {
24
- /** Parent of the versioned tileflow/icons/v1 cache, not a serialized lock setting. */
25
- cacheRoot?: string;
26
- offline?: boolean;
27
- /** Trusted application configuration. A lock cannot extend this allowlist. */
28
- deliveryOrigins?: readonly string[];
29
- fetch?: typeof globalThis.fetch;
30
- signal?: AbortSignal;
31
- };
32
- declare function getTileflowIconCacheDirectory(options?: Pick<TileflowIconCacheOptions, 'cacheRoot'>): string;
33
- /** Read and verify an exact pin; a cache miss never resolves a newer version. */
34
- declare function loadTileflowIconSetArtifact(input: TileflowIconSetPin, options?: TileflowIconCacheOptions): Promise<VerifiedTileflowIconArtifact>;
35
- /** Seed or repair a disposable cache using verified generated bytes, never original artwork. */
36
- declare function storeTileflowIconSetArtifact(input: TileflowIconSetPin, artifact: CompiledTileflowIconPackage, options?: Pick<TileflowIconCacheOptions, 'cacheRoot'>): Promise<VerifiedTileflowIconArtifact>;
37
-
38
- type ComposeTileflowIconSourcesOptions = TileflowIconCacheOptions & {
39
- cwd: string;
40
- baseDirectory?: string;
41
- lock?: unknown;
42
- target?: TileflowIconCompilationTarget;
43
- };
44
- type TileflowComposedIconSources = {
45
- package: CompiledTileflowIconPackage | null;
46
- composition: TileflowIconCompositionV1 | null;
47
- sourceIdentities: TileflowEffectiveIconSourceIdentity[];
48
- replacements: Array<{
49
- id: string;
50
- replaced: number;
51
- winner: number;
52
- }>;
53
- watchPaths: string[];
54
- };
55
- /** Foundational build port. Registry and command integration are intentionally separate. */
56
- declare function composeTileflowIconSources(input: readonly TileflowIconSource[], options: ComposeTileflowIconSourcesOptions): Promise<TileflowComposedIconSources>;
57
-
58
- declare function readTileflowIconsLockfile(baseDirectory: string, sources?: readonly TileflowIconSource[]): Promise<TileflowIconsLockfileV1>;
59
- /** Compare-and-swap the whole lock. Never rewrite executable config or lose another writer's pin. */
60
- declare function writeTileflowIconsLockfile(baseDirectory: string, input: TileflowIconsLockfileV1, expectedContents: string | null): Promise<void>;
61
-
62
- export { CompiledTileflowIconPackage, type ComposeTileflowIconSourcesOptions, type TileflowComposedIconSources, type TileflowIconCacheOptions, TileflowIconCompilationTarget, TileflowRenderedIcon, type VerifiedTileflowIconArtifact, composeTileflowIconSources, getTileflowIconCacheDirectory, loadTileflowIconSetArtifact, readTileflowIconsLockfile, storeTileflowIconSetArtifact, verifyTileflowIconArtifact, writeTileflowIconsLockfile };