tileflow 0.1.0-alpha.8 → 0.1.0-alpha.9

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.
@@ -30,8 +30,10 @@ Each sorted map entry has one `id` and an `icons` value. `icons.kind` is `none`
30
30
  byte length and intrinsic dimensions; an `icon-set` entry carries the exact `reference` and
31
31
  `version` and deliberately has no path, because a shared revision publishes verified generated
32
32
  cells rather than original artwork. Both carry the winning `contributor` ordinal.
33
- - `composition`, the exact ordered `tileflow-icon-composition-v1` receipt when the map declares a
34
- shared set, and `null` otherwise; and
33
+ - `composition`, the exact ordered receipt when the map declares a shared set, and `null`
34
+ otherwise. It uses `tileflow-icon-composition-v2` when an effective winner has SDF appearance
35
+ or stretch/content layout; metadata-free compositions retain v1;
36
+ - optional `appearances` and `layouts`, keyed by effective icon ID; and
35
37
  - `insideWorkingTree` and the deterministic generated `packageHash`.
36
38
 
37
39
  Listing reads the exact `tileflow.icons.lock.json` beside the selected config. It never resolves a
@@ -51,9 +53,11 @@ uses `../` and `insideWorkingTree: false`; no absolute path is emitted. Listing
51
53
  authoring semantics. Run `npx tileflow validate --target hosted` separately before a
52
54
  hosted deploy to check containment, portable IDs, SVG safety, and hosted limits.
53
55
 
54
- The Tileflow command performs no authentication, browser/server launch, or file write. It performs
55
- no network request when every locked artifact is already in the verified cache, and `--offline`
56
- forbids hydration entirely. It removes an ambient `TILEFLOW_API_KEY` before importing config. As with every config-aware
56
+ The Tileflow command performs no authentication or browser/server launch and never writes config,
57
+ repository locks or frontend manifests. A cold cache can download and store the exact public
58
+ sprite artifacts. It performs no network request when every locked artifact is already in the
59
+ verified cache, and `--offline` forbids hydration entirely. `--json` is required; use `--config`
60
+ (or `-c`) to select another config file. It removes an ambient `TILEFLOW_API_KEY` before importing config. As with every config-aware
57
61
  command, loading `tileflow.config.ts` executes repository code and is not a sandbox; side effects in
58
62
  that code remain the repository's responsibility. Success emits no ANSI or progress prose. Usage,
59
63
  config, source, decode, and render failures exit 1, write diagnostics to stderr, and leave stdout
@@ -21,8 +21,10 @@ Metro remains the React Native JavaScript development server. See
21
21
  boundary.
22
22
 
23
23
  `icon-set` and `icons` are deliberately separate. `icon-set` needs Team authority and changes the
24
- remote catalog. `icons list` and `icons diff` are keyless local inspection, and
25
- `icons install|update|pin` are the only commands that resolve `latest` or write
24
+ remote catalog. `icons list --json` needs no credential; a cold cache may download exact public
25
+ artifacts. `icons diff` requires a managed `--map-id`, the configured map ID in `--against`, and
26
+ `status:read` authority for its hosted baseline. `icons install|update|pin` use Team `icons:read`
27
+ authority when resolving revisions and are the only commands that select revisions or write
26
28
  `tileflow.icons.lock.json`. See the
27
29
  [Team Icon Set workflow](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/docs/team-icon-sets.md).
28
30
 
@@ -2,17 +2,20 @@
2
2
 
3
3
  Start with the [tileflow guide](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/README.md) for installation and a complete first example.
4
4
 
5
- Compare the exported map with its active hosted revision before deciding whether to deploy:
5
+ Compare the exported map with its active hosted revision before deciding whether to deploy.
6
+ These examples assume the configured map ID is `madrid`; replace the sample managed Map ID with
7
+ your Dashboard destination and use personal CLI login or a credential with `status:read`.
8
+ `--against` selects the exact map ID in the configuration, not a deployment-stage keyword:
6
9
 
7
10
  ```sh
8
- npx tileflow icons diff --map-id map_AbCdEfGhIjKlMnOp --against production
9
- npx tileflow icons diff --map-id map_AbCdEfGhIjKlMnOp --against production --json
10
- npx tileflow icons diff --map-id map_AbCdEfGhIjKlMnOp --against production --report ./icon-diff.html
11
+ npx tileflow icons diff --map-id map_AbCdEfGhIjKlMnOp --against madrid
12
+ npx tileflow icons diff --map-id map_AbCdEfGhIjKlMnOp --against madrid --json
13
+ npx tileflow icons diff --map-id map_AbCdEfGhIjKlMnOp --against madrid --report ./icon-diff.html
11
14
  ```
12
15
 
13
16
  The command compiles only the exported map, performs authenticated read-only control-plane
14
17
  requests, and never uploads a package, creates a deployment, or writes the frontend manifest.
15
- Plain and JSON modes create no files. A requested HTML report adds reads of the baseline's four
18
+ Plain and JSON modes write no report; preparing locked inputs may download and write cache entries. A requested HTML report adds reads of the baseline's four
16
19
  public sprite files and
17
20
  embeds verified old/new images in one self-contained file. The report groups exact-cell icon
18
21
  previews under `Added`, `Modified`, and `Removed`. Added and removed cards show only the affected
@@ -24,9 +27,15 @@ implementation UI and contains no API key, remote runtime dependency, original i
24
27
  local source path. Use `--force` to replace different existing report bytes and `--open` only
25
28
  together with `--report`.
26
29
 
27
- Visual modification means that normalized rendered RGBA pixels changed at 1x or 2x. Fully
28
- transparent RGB is ignored. The manifest also hashes the four encoded artifacts, so an artifact can
29
- change while its per-icon pixel list remains unchanged. The report and digest analysis operate on
30
+ An icon is `modified` when its rendered record changes: normalized 1x/2x pixel hashes, dimensions,
31
+ SDF defaults or stretch/content layout. Fully transparent RGB is ignored in pixel hashes. Metadata
32
+ edits can therefore mark an icon modified even when its pixel hashes are unchanged. Reports render
33
+ SDF with asset defaults; raw downloadable PNGs still encode distance fields.
34
+
35
+ `hasChanges` compares effective package content hashes. The manifest also hashes the four encoded
36
+ artifacts, so a package can change while its per-icon list remains unchanged. Conversely, a fully
37
+ shadowed dependency can change the map's composition receipt without changing its effective sprite.
38
+ A clean icon diff is not evidence that the whole map needs no deployment. The report and digest analysis operate on
30
39
  generated sprite data; SVG, raster source files, and absolute paths stay on the local machine.
31
40
 
32
41
  `--json` writes exactly one deterministic schema-version-1 document plus a trailing newline. Its
@@ -35,7 +44,7 @@ stable top-level fields, in order, are:
35
44
  ```json
36
45
  {
37
46
  "schemaVersion": 1,
38
- "environment": "production",
47
+ "environment": "madrid",
39
48
  "baseline": {"deploymentId": "dep_...", "package": null, "version": 7},
40
49
  "proposed": {"package": null},
41
50
  "icons": {"added": [], "removed": [], "modified": [], "unchangedCount": 0},
@@ -47,17 +56,20 @@ stable top-level fields, in order, are:
47
56
 
48
57
  Package summaries, when present, contain `contentHash`, `iconCount`, `label`, and `totalBytes`.
49
58
  A missing hosted baseline is an initial comparison against an empty package. The command compares
50
- only delivered icon pixels, canonical package manifests, and generated bytes; config-directory
59
+ delivered icon records, canonical package manifests, and generated bytes; config-directory
51
60
  provenance and style-reference analysis belong to `icons list` and final style validation.
52
61
 
53
62
  Normal differences exit 0. Config, compilation, credential, network, response, and report errors
54
- exit 1.
63
+ exit 1 with diagnostics on stderr, even with `--json`. Invalid or unauthorized baselines are errors,
64
+ not empty packages. `--config` selects a config file; `--api-url` and `--api-key` override hosted
65
+ connection settings. `--cache-dir` selects the artifact cache and `--offline` disables only icon
66
+ hydration: the authenticated hosted baseline request still occurs.
55
67
 
56
68
  This workflow does not provide OIDC, automatic secret installation, an official
57
69
  GitHub Action, an atomic multi-map deploy set, or a Tileflow-hosted remote
58
70
  builder.
59
71
 
60
- Docs: https://tileflow.dev/docs/deploy
72
+ Docs: https://tileflow.dev/docs/development-and-deployment/icon-inspection-and-diffs
61
73
 
62
74
  ### Team credentials and explicit Map targets
63
75
 
@@ -8,8 +8,9 @@ independently pinned revisions through `iconSet('@acme/brand')` without copying
8
8
 
9
9
  Two command families cover this, and the split is deliberate. `icon-set` is a networked Team
10
10
  authority that changes the catalog. `icons list` stays local and needs no credential. `icons diff`
11
- compares prepared output with an active Hosted Map baseline, so it requires `--map-id` and a Map
12
- credential but never mutates that Map. `install`, `update` and `pin` maintain the exact
11
+ compares prepared output with an active Hosted Map baseline, so it requires `--map-id`, the
12
+ configured map ID in `--against`, and `status:read` authority through personal login or a scoped
13
+ credential, but never mutates that Map. `install`, `update` and `pin` maintain the exact
13
14
  `tileflow.icons.lock.json` beside the selected config.
14
15
 
15
16
  Availability depends on your deployment and your Team's enabled features. Check
@@ -89,7 +90,9 @@ npx tileflow icons pin @acme/brand --version 3 --team @acme --json
89
90
  ```
90
91
 
91
92
  These commands read the `iconSet()` references your config declares. `install` resolves the current
92
- latest revision for every declared reference that has no pin yet and leaves existing pins alone.
93
+ latest revision for declared references that have no pin yet and leaves existing pins alone.
94
+ Both `install [references...]` and `update [references...]` accept an optional subset; omitted
95
+ selection means every declared reference.
93
96
  `update` moves the selected references to their current latest revision; omit the references to
94
97
  select every declared one. `pin` selects one exact revision and never resolves a head.
95
98
 
@@ -97,7 +100,10 @@ They are the only build-adjacent commands that resolve `latest` or write the loc
97
100
  reference is resolved before a single compare-and-swap write of the whole snapshot, so a partial
98
101
  lock is never produced and a concurrent writer fails the command rather than losing its pins. An
99
102
  undeclared reference is rejected before any request. No lock command rewrites `tileflow.config.ts`;
100
- add `iconSet('@team/set')` to your config first.
103
+ add `iconSet('@team/set')` to your config first. Lock commands do not hydrate sprite files.
104
+ Serialization retains pins for other declared references and removes stale undeclared references.
105
+ They accept `--config` (or `-c`), `--team`, `--api-url`, `--api-key` and `--json`.
106
+ Do not combine `--team` with an explicit or ambient `TILEFLOW_API_KEY`.
101
107
 
102
108
  The JSON receipt lists each locked reference with its revision, version ID, package identity and
103
109
  content hash, plus any declared reference that is still missing a pin.
@@ -107,7 +113,10 @@ content hash, plus any declared reference that is still missing a pin.
107
113
  `validate`, `build`, `preview`, `deploy`, `icons list` and `icons diff` read the lock and compose
108
114
  one effective sprite. They never resolve a catalog head, so publishing a newer revision changes
109
115
  nothing in a repository until an explicit lock command runs. `--cache-dir` chooses the verified
110
- artifact cache root; `--offline` fails a cache miss instead of hydrating it.
116
+ artifact cache root on commands that expose it (including `icons list` and `icons diff`);
117
+ `--offline` fails a cache miss instead of hydrating it. These flags are not universal CLI options.
118
+ Other entry points use their documented icon-resolution options or `TILEFLOW_ICON_CACHE_DIR`.
119
+ Offline diff still needs its hosted baseline request.
111
120
 
112
121
  Hydration downloads only the four public files of the exact pinned artifact, from the trusted
113
122
  delivery origin, without credentials and without following redirects. Every file's length,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tileflow",
3
- "version": "0.1.0-alpha.8",
3
+ "version": "0.1.0-alpha.9",
4
4
  "license": "Apache-2.0",
5
5
  "description": "CLI-only tools for Tileflow config, capture, visual testing, and deploy.",
6
6
  "type": "module",
@@ -36,12 +36,12 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@hono/node-server": "2.0.10",
39
- "@tileflow/capture": ">=0.1.0-alpha.25 <0.1.0-beta.0",
39
+ "@tileflow/capture": ">=0.1.0-alpha.28 <0.1.0-beta.0",
40
40
  "@tileflow/coordinates": ">=0.1.0-alpha.1 <0.1.0-beta.0",
41
41
  "@tileflow/coordinates-runtime": ">=0.1.0-alpha.4 <0.1.0-beta.0",
42
- "@tileflow/core": ">=0.1.0-alpha.27 <0.1.0-beta.0",
43
- "@tileflow/dev": ">=0.1.0-alpha.26 <0.1.0-beta.0",
44
- "@tileflow/maps": ">=0.1.0-alpha.5 <0.1.0-beta.0",
42
+ "@tileflow/core": ">=0.1.0-alpha.30 <0.1.0-beta.0",
43
+ "@tileflow/dev": ">=0.1.0-alpha.28 <0.1.0-beta.0",
44
+ "@tileflow/maps": ">=0.1.0-alpha.7 <0.1.0-beta.0",
45
45
  "commander": "^15.0.0",
46
46
  "hono": "4.13.5",
47
47
  "picocolors": "^1.1.1",