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

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.
package/README.md CHANGED
@@ -120,15 +120,28 @@ Invalid compiled styles throw `TileflowStyleValidationError` with bounded issues
120
120
  structured; do not return executable config, local paths, credentials, or complete generated byte
121
121
  arrays from a public endpoint.
122
122
 
123
- ## Locked Icon Set composition foundations
123
+ ## Locked Icon Set composition
124
124
 
125
125
  `composeTileflowIconSources(sources, {cwd, lock, cacheRoot, offline: true})` combines local/package
126
126
  directories and `iconSet('@team/set')` contributors into one effective sprite. Without an explicit
127
127
  lock object, it reads `tileflow.icons.lock.json` beside `baseDirectory` (default: `cwd`). It never
128
128
  resolves latest or writes the lock. The result contains the generated `package`, ordered
129
- `composition` receipt, effective `sourceIdentities`, replacement ordinals, and local watch paths.
129
+ `composition` receipt, effective `sourceIdentities`, declared `contributors`, effective `winners`,
130
+ replacement ordinals, local `watchPaths`, and the exact `watchFiles` that select the composition.
130
131
  Pass both the source identities and receipt to Core map-revision hashing.
131
132
 
133
+ This is the one normal icon-preparation path. `compileTileflowIconPackages`,
134
+ `prepareTileflowCatalogIcons`, `inspectTileflowIconCatalogs` and `getTileflowIconWatchPaths` all use
135
+ it, so `createTileflowBuildArtifacts`, `createTileflowArtifactSession`, and every adapter that
136
+ enters them accept the same explicit `icons` resolution options: `cacheRoot`, `offline`,
137
+ `deliveryOrigins`, `fetch` and `signal`. Nothing selects a cache, an origin, or a transport from
138
+ implicit process state, and no build or watch polls a catalog head. `prepareTileflowCatalogIcons`
139
+ returns `mapIconCompositions` alongside `mapIconSources`, and build-manifest entries carry the
140
+ receipt as `sourceAssets.iconComposition` with `mapRevisionSchemaVersion: 2`.
141
+
142
+ A map whose contributors are all local or package directories keeps its existing generated bytes,
143
+ manifest and content hash, and its build-manifest entry stays on the legacy v1 contract.
144
+
132
145
  The reader verifies each file length/checksum, PNG/index geometry, names, density pairing, and both
133
146
  per-icon pixel hashes. It copies decoded 1x and 2x cells independently, without resampling either.
134
147
  The existing directory compiler and this port share the same sprite packer. A sole shared set reuses
@@ -149,6 +162,8 @@ retirement support concurrent writers and corruption repair. Symlink entries are
149
162
  a disposable cache, not a security sandbox against another process controlling the same user
150
163
  account. Incomplete temporary entries are never accepted as published cache entries.
151
164
 
165
+ `readTileflowIconsLockfileText(directory)` returns the exact current lock bytes, or `null` when no
166
+ lock exists; those bytes are the only valid `expectedContents` for the next write.
152
167
  `writeTileflowIconsLockfile(directory, lock, expectedContents)` uses a whole-file compare-and-swap
153
168
  and atomic rename. A conflicting writer fails without overwriting pins. An interrupted writer leaves
154
169
  the previous complete lock intact; remove a stale `.writing` guard only after confirming that its
@@ -157,8 +172,9 @@ writer has exited. Ordinary reads and Core validation never acquire write guards
157
172
  The existing 256-effective-icon, 2048-atlas-dimension, 4 MiB/file, and 8 MiB/package bounds still
158
173
  apply. Several individually valid sets can exceed the effective map limit; composition fails
159
174
  explicitly instead of clipping. Cache and composition do not create Team resources or publish
160
- anything. Normal CLI/build/framework and Hosted command integration follows separately; those
161
- existing entry points currently reject shared descriptors rather than silently dropping them.
175
+ anything. Every normal entry point composes declared shared descriptors through this path; catalog
176
+ publication and lock maintenance stay in the `tileflow` CLI, which is the only writer of
177
+ `tileflow.icons.lock.json` and the only caller that resolves `latest`.
162
178
 
163
179
  ## Detailed guides
164
180
 
@@ -1,7 +1,7 @@
1
1
  import { TileflowStyleOptions, MapLibreStyle } from '@tileflow/core';
2
2
  import { TileflowBuildCatalog, TileflowBuildStyles, TileflowMapBuildManifestV1, TileflowStyleInspection, TileflowMapBuildProvenanceV1, TileflowPreparedMapAssets } from '@tileflow/core/build';
3
3
  import { TileflowRuntimeManifest } from '@tileflow/core/manifest';
4
- import { e as TileflowBuildAsset, P as PreparedTileflowBuildCatalog, r as TileflowSourceCatalog, d as PreparedTileflowCatalog } from './icons-CkLVtaP-.js';
4
+ import { TileflowIconResolutionOptions, TileflowBuildAsset, PreparedTileflowBuildCatalog, TileflowSourceCatalog, PreparedTileflowCatalog } from './icons.js';
5
5
  export { defaultTileflowConfigPath } from './config.js';
6
6
 
7
7
  type TileflowLocalTilesetFile = Readonly<{
@@ -98,6 +98,13 @@ type TileflowBuildArtifactsOptions = {
98
98
  assetBaseUrl?: string;
99
99
  config?: string;
100
100
  cwd?: string;
101
+ /**
102
+ * Explicit shared Icon Set resolution settings for this build.
103
+ *
104
+ * Builds never resolve a catalog head. These options only choose the verified cache root,
105
+ * offline behavior, trusted delivery origins and the transport used to hydrate exact pins.
106
+ */
107
+ icons?: TileflowIconResolutionOptions;
101
108
  /** Build a memory-only compiler sidecar for local authoring tools. */
102
109
  inspection?: boolean;
103
110
  styleBaseUrl?: string;
@@ -188,4 +195,4 @@ declare function assertTileflowSelfHostedManifestTarget(manifestPath: string, op
188
195
  overwriteHostedManifest?: boolean;
189
196
  }): Promise<void>;
190
197
 
191
- export { type CreateTileflowArtifactPlanOptions, PreparedTileflowBuildCatalog, PreparedTileflowCatalog, type TileflowArtifactAcquisition, type TileflowArtifactDiagnostic, type TileflowArtifactFile, type TileflowArtifactInputGraph, type TileflowArtifactPlan, type TileflowArtifactSession, type TileflowArtifactSessionOptions, type TileflowArtifactSessionState, type TileflowBuildArtifacts, type TileflowBuildArtifactsOptions, TileflowBuildAsset, type TileflowBuildStyleInspections, TileflowHostedManifestOverwriteError, type TileflowLocalTilesetFile, TileflowLocalTilesetProductionError, type TileflowManifestOptions, TileflowSourceCatalog, type WriteTileflowArtifactPlanOptions, type 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 };
198
+ export { type CreateTileflowArtifactPlanOptions, PreparedTileflowBuildCatalog, PreparedTileflowCatalog, type TileflowArtifactAcquisition, type TileflowArtifactDiagnostic, type TileflowArtifactFile, type TileflowArtifactInputGraph, type TileflowArtifactPlan, type TileflowArtifactSession, type TileflowArtifactSessionOptions, type TileflowArtifactSessionState, type TileflowBuildArtifacts, type TileflowBuildArtifactsOptions, TileflowBuildAsset, type TileflowBuildStyleInspections, TileflowHostedManifestOverwriteError, TileflowIconResolutionOptions, type TileflowLocalTilesetFile, TileflowLocalTilesetProductionError, type TileflowManifestOptions, TileflowSourceCatalog, type WriteTileflowArtifactPlanOptions, type 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 };
package/dist/artifacts.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  tileflowArtifactSessionSchemaVersion,
23
23
  writeTileflowArtifactPlan,
24
24
  writeTileflowBuildArtifacts
25
- } from "./chunk-XXVI42UZ.js";
25
+ } from "./chunk-W3X2JXYS.js";
26
26
  import "./chunk-ONYQNLNA.js";
27
27
  import {
28
28
  getTileflowAssetBasePath,
@@ -30,9 +30,9 @@ import {
30
30
  joinTileflowPublicUrl,
31
31
  normalizeTileflowBasePath,
32
32
  resolveTileflowArtifactPublicUrls
33
- } from "./chunk-RSBV4L2Y.js";
34
- import "./chunk-NUHSYLLS.js";
35
- import "./chunk-BL3FK4GO.js";
33
+ } from "./chunk-UTRO4IBQ.js";
34
+ import "./chunk-D2QWYYIF.js";
35
+ import "./chunk-7C4F6GAX.js";
36
36
  import "./chunk-KDFTE4Q5.js";
37
37
  import {
38
38
  defaultTileflowConfigPath
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createTileflowArtifactSession,
3
3
  tileflowArtifactSessionSchemaVersion
4
- } from "./chunk-XXVI42UZ.js";
4
+ } from "./chunk-W3X2JXYS.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";
@@ -52,7 +52,7 @@ async function resolveTileflowAssetDirectories(directories, options) {
52
52
  const result = [];
53
53
  const seen = /* @__PURE__ */ new Map();
54
54
  for (const [index, directory] of directories.entries()) {
55
- const configPath = `${options.configPath}.${index}`;
55
+ const configPath = `${options.configPath}.${index + (options.ordinalOffset ?? 0)}`;
56
56
  let candidate;
57
57
  let containmentRoot;
58
58
  let packageOwned = false;