@tileflow/dev 0.1.0-alpha.30 → 0.1.0-alpha.32

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,102 @@
1
+ # Beacon map audits
2
+
3
+ Open `tileflow preview`, select **Beacon**, choose **Desktop** or **Mobile** and
4
+ **Active tour** (default), **Quick check** or **All zooms**, then **Run audit**. The report includes 48 checks grouped into Rendering (9), Loading
5
+ (8), Legibility (8), Accessibility (8), Cartography (7) and Integrity (8). Expand a result for its
6
+ measured value, target, evidence and suggested fix. Findings open Layers, Tiles or Debug. **Copy
7
+ context for agent** copies the bounded report; it does not upload it.
8
+
9
+ ## Scope and restoration
10
+
11
+ Active tour follows a deterministic route through the current view, London, New York, Tokyo,
12
+ Nairobi and São Paulo. Each location has an overview and a detailed view, with zoom, bearing and
13
+ pitch changes within the map's camera limits. Destinations outside explicit map bounds are skipped
14
+ and listed in coverage. The current theme stays active; this route does not cover every theme.
15
+
16
+ The tour has a 60-second budget: up to 55 seconds for navigation and sampling, with the remainder
17
+ reserved for diagnostics. Each stop measures a 1.2-second flight, waits up to two seconds for tiles,
18
+ then samples up to 2.4 seconds of continuous settled repaints. On a responsive map the run usually
19
+ takes 45–60 seconds. Slow loading can exhaust the budget: remaining views are explicitly unmeasured,
20
+ not passed. Synchronous analysis and restoration may add a small overhead. Reduced-motion settings
21
+ replace flights with jumps; the report does not claim an animated navigation measurement then.
22
+
23
+ **Tour measurements** lists the actual camera, moving/settled p95 frame intervals, sample counts and
24
+ readiness for each view. A p95 requires at least 30 intervals; coverage flags fewer than 60 settled
25
+ intervals. A view that did not finish loading before sampling receives no settled performance score.
26
+ The rendering check uses the worst qualifying per-view p95, so a slow location is not hidden by an
27
+ average across fast locations. Long stalls are retained. These measurements include browser
28
+ scheduling and other work on the machine, rather than isolated GPU execution time.
29
+
30
+ Quick check samples the current camera and concrete theme for about three seconds. It is useful
31
+ for static style checks and a short settled rendering sample. All zooms visits each integer zoom
32
+ from 0 through 22 within map limits at the same geographic centre, for every registered palette and
33
+ time-of-day variant. It waits up to five seconds for readiness and samples 150 ms per view. This
34
+ exhaustive scope can take several minutes; it is not the one-minute navigation benchmark. Use
35
+ **New audit** from a result to change scope or viewport.
36
+
37
+ Desktop uses an actual 1280×800 CSS iframe viewport; Mobile uses 390×844. The iframe is scaled to
38
+ fit the workspace. CPU, GPU and network are those of the current computer: this is not phone
39
+ hardware emulation. No cache clearing, network throttling or cold navigation occurs.
40
+
41
+ Camera, viewport, pixel ratio, overlays and scene are restored after completion or cancellation.
42
+ Moving the map interrupts the audit and keeps the user's camera. Leaving Beacon cancels the run.
43
+ A map replacement invalidates the run. Reports and preview changes stay local and in memory.
44
+
45
+ ## Measurements and limits
46
+
47
+ - **Rendering:** inter-render p95 during continuous repaints (moving and settled windows for Active tour), native overdraw samples (saturating at
48
+ 8 passes), eligible layer count, intercepted WebGL draw calls, CPU placement time, data-driven
49
+ paint-rule count, custom-renderer CPU submission time, and an observable GPU allocation estimate.
50
+ CPU submission is not GPU execution time. Readbacks and feature inspection are outside the frame
51
+ sample. GPU memory excludes inaccessible allocations; a low estimate is informational.
52
+ - **Loading:** unused source-layer MVT message bytes, original map-load event time, individual tile
53
+ sizes when exposed, view readiness, per-view transfer and request counts, compression and cache
54
+ observations. PMTiles archive ranges are not individual tile sizes. Resource Timing cannot prove
55
+ Cache-Control policy. Cached audit views are not a fresh visitor estimate.
56
+ - **Legibility:** observed text-placement rejections, line-label candidates, nearby repeated label
57
+ anchors, minimum evaluated size, approximate density, halos, configured line curvature and
58
+ requested language-field coverage. Rejections can result from collisions, offscreen placement or
59
+ line fit; the report does not pretend to know the renderer's exact rejection cause.
60
+ - **Accessibility:** sampled text contrast in current/night/other themes, color-vision simulation
61
+ heuristics, static non-text contrast, categorical color-only rules, the system motion preference,
62
+ and sampled label retention after temporarily setting the real canvas ratio to 3×. Contrast uses
63
+ evaluated colors and supported flat fill/halo backgrounds. Raster, 3D and unresolved backgrounds
64
+ are excluded. This is diagnostic evidence, not accessibility certification.
65
+ - **Cartography:** enabled zoom-range gaps, potential abrupt layer entry, road and place hierarchy
66
+ heuristics, adjacent-zoom size changes, unchanged eligible-layer counts and sampled fill coverage.
67
+ Naming-based hierarchy checks explicitly identify their inferred roles and exclude unmatched IDs.
68
+ - **Integrity:** missing icon references, actual theme coverage, hidden-layer source residency,
69
+ cached missing glyphs, unresolved expressions, locally unmatched filters, style-spec validation
70
+ and retained runtime/resource errors. Resident data is bounded; zero local matches does not mean
71
+ a filter never matches globally.
72
+
73
+ Samples are bounded to 4,000 rendered query results, 100 labels and 64 resident vector tiles per
74
+ view; feature expression checks use up to 24 candidates per layer. Geometry is discarded after
75
+ observation. All-zoom style snapshots are shared per theme. Custom renderer and private MapLibre
76
+ observations are version-isolated and can be unavailable on unsupported renderers.
77
+
78
+ ## Scores and useful comparisons
79
+
80
+ Category scores average checks with a measured score. Overall score averages measured categories.
81
+ Informational and unavailable checks are excluded; an unmeasured category shows **—**. For numeric
82
+ budgets, meeting the displayed target scores 100; exceeding it by up to 1.5× scores 70, by up to 2×
83
+ scores 45, and beyond that scores 0. Minimum targets invert the ratio. Diagnostic findings may use
84
+ review scores rather than numeric budgets. A high score does not establish global map quality.
85
+
86
+ Repeat with the same view, scope, device, cache conditions and browser load when comparing changes.
87
+ Review the evidence before acting on a warning. Copying findings supplies an agent with concrete
88
+ layer IDs, camera context, measured values, coverage limits and suggested investigation steps.
89
+
90
+ ## Reproducible reports and future automation
91
+
92
+ Reports use `version: 3` and identify the deterministic tour as `protocol: "active-tour-v1"`.
93
+ Scenarios carry stable IDs, location, actual camera, theme, frame sample counts, p95, long-frame
94
+ fraction, maximum frame interval, readiness and observed network transfer. `plannedViews` and
95
+ `budgetExhausted` distinguish completed coverage from a partial run. Camera, viewport, DPR, duration
96
+ and warnings accompany the scores. Change the protocol identifier when its itinerary or sampling
97
+ rules change. There is no CI runner or GitHub integration in this feature.
98
+
99
+ For future comparisons, keep protocol, map revision, initial view, browser/device, viewport, theme,
100
+ DPR and cache conditions fixed. A single one-minute run is a diagnostic sample; repeated runs on a
101
+ controlled worker are needed before setting regression gates. The tour does not clear caches,
102
+ emulate mobile hardware, or prove worldwide coverage from six locations.
@@ -0,0 +1,87 @@
1
+ # Layers inspection
2
+
3
+ Open the local preview and select **Layers**. The panel inspects the current map without changing its
4
+ authored style. **By module** groups physical layers using compiler contributions; shared layers retain
5
+ every owner. **Draw order** lists the renderer's public layer sequence, latest draw calls first.
6
+ Custom runtime layers are included even though they are absent from Style JSON. DevTools overlays
7
+ are excluded. Unknown ownership is labeled **Unattributed**, rather than guessed from an ID.
8
+
9
+ Press **I** or the element-picker icon and click an element on the map. Its layer becomes selected in
10
+ Layers and **Rules**, the first detail tab, opens with values evaluated for the picked feature. The
11
+ picked feature is a snapshot from that click; changing the layer or artifact/scene revision clears it.
12
+ Inspect no longer has a separate top-level tab. Legacy `tab=inspect` links resolve to Layers.
13
+
14
+ Enable **Visible only** beside the organization buttons to hide hidden/out-of-zoom layers and vector
15
+ layers with no rendered features in the current viewport. The filter combines with search and both
16
+ organization modes, and refreshes after camera movement, style changes and tile loading. One viewport
17
+ query serves the whole list after a 250 ms pause. During movement the last result remains stable;
18
+ failed queries do not classify layers as empty. Custom, raster and background layers remain listed
19
+ when their visibility cannot be measured; explicit hidden runtime state is excluded. This is a
20
+ rendered-feature filter, not a measurement of final pixels, transparency or occlusion.
21
+
22
+ Search by ID, semantic target, module, type, source or source-layer. Click anywhere on a row, or use
23
+ Up/Down and Home/End from a focused row. Selection stays in Layers and is retained in the `layer` URL
24
+ parameter. If a selected ID disappears, its detail shows that absence and keeps the ID for when it
25
+ returns. The Layers tab remains in the existing `tab=layers` parameter.
26
+
27
+ ## Read the evidence
28
+
29
+ - **Diagnosis** reports presence, declared visibility, the inclusive minimum/exclusive maximum zoom
30
+ range, source loading, shared source tiles and viewport-query observations. Pixel visibility,
31
+ occlusion, transparency and depth are explicitly unmeasured. Later draw calls do not necessarily
32
+ cover every earlier layer. Runtime 3D controllers report only the state and statistics they expose.
33
+ - **Rules** shows paint and layout values inline, without expandable rows, alongside their zoom,
34
+ feature, feature-state, global-state and image dependencies. Values use the current zoom and the
35
+ picked feature or selected data sample. Edit a value and press Enter or leave the field to preview
36
+ it; color pickers update live while open. Enumerations and booleans use selectors. Invalid values
37
+ show an error and leave the map unchanged. Edits override the entire physical layer across zooms,
38
+ including when a picked feature supplied the evaluated value. Each modified rule has a reset
39
+ button that restores its original expression or renderer default. Paint checkboxes temporarily
40
+ remove a declaration from the renderer so its default applies. The disabled row stays visible and
41
+ crossed out, showing its retained value at the current view; re-enabling restores the exact saved
42
+ expression or override. Toggles share edit history and appear in copied context. Implicit defaults
43
+ cannot be disabled; edit one to create an explicit rule first. **Undo** and **Redo** beside the
44
+ three-dot menu share the temporary style history. **Reset all changes** in that menu restores
45
+ temporary style and geometry edits and clears their history. Reload clears temporary edits;
46
+ config, source data and build artifacts stay unchanged. Filters remain read-only. Copy context includes the raw rules and temporary edits.
47
+ Evaluation does not reproduce placement, transitions or final pixel colors.
48
+ - **Data** queries only the selected layer after the viewport settles. At most 80 returned fragments
49
+ are retained; the renderer's query itself may return more. Fragments can duplicate logical features
50
+ across tile boundaries or world copies. Zero results are not proof that a filter excluded all data.
51
+ Unsupported custom/raster/background queries are unavailable, not zero. Choose an actual sample
52
+ to inspect its properties, or use **Use for rules** to evaluate that fragment in Rules. Inline
53
+ source data is excluded from source details.
54
+ - **Origin** preserves sidecar owners, targets, slots and operations. Semantic module paths do not
55
+ establish exact source-file or line provenance; token paths appear only if explicitly supplied.
56
+
57
+ ## Follow a layer through the map
58
+
59
+ Hover or keyboard-focus a layer row to highlight its sampled geometry live in the current map view.
60
+ Click a row to keep that layer highlighted. Hovering another row temporarily replaces the highlight;
61
+ leaving restores the clicked layer, or clears the preview when no row was clicked. Closing the panel
62
+ clears both previews. Hover and click work with the element-picker mode on or off. The camera stays unchanged. The preview refreshes when map movement settles or source tiles
63
+ change, even when the hovered layer differs from the selected layer. Hover is coalesced over 80 ms;
64
+ queries are cached for the current view. There is no separate **Highlight on map** button.
65
+
66
+ Overlays retain at most 30 fragments and 25,000 vertices. They use separate scratch sources and never
67
+ change original paint, layout, source data or feature state. A highlight outlines queried geometry;
68
+ it is not a reconstruction of glyphs, symbols or 3D meshes. Hidden, out-of-zoom, custom and raster
69
+ layers without queryable rendered geometry report that limitation instead of moving the camera.
70
+
71
+ **Source tiles** opens Network filtered by source. Tile costs belong to the shared source, not to a
72
+ single style layer. Sprite and font links in Rules open Assets. Other inspection tabs remain usable
73
+ while compilation or tile loading continues; obsolete scheduled measurements are discarded.
74
+
75
+ ## Give an agent context
76
+
77
+ **Copy context** opens a frozen preview in Markdown or JSON. Add an optional investigation question,
78
+ then copy it. The packet includes the selected ID, map/theme, generation, scene revision, camera,
79
+ viewport, rules, provenance, diagnostic evidence, source, runtime state, recent changes and temporary
80
+ edits. It retains at most eight feature property samples, excludes their geometries and inline source
81
+ data, removes credentials and query strings from source URLs, and reports projection omissions.
82
+ Nothing is sent to an agent automatically.
83
+
84
+ While Layers is active, the same observation replaces stale feature selection in the local
85
+ `tileflow inspect session --url http://127.0.0.1:3333 --json` context. The CLI applies an additional
86
+ bounded projection and reports omitted paths. Temporary edits are observations; capture commands
87
+ still use the compiled map rather than reproducing scratch edits.
@@ -1,10 +1,17 @@
1
- # Local comparison workbench and compiler inspection
1
+ # Map DevTools and compiler inspection
2
2
 
3
3
  Start with the [@tileflow/dev guide](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/README.md) for installation and a complete first example.
4
4
 
5
- The CLI exposes the complete authoring surface through `tileflow preview --against-map ...` or
6
- `--against-config ...`. Custom local servers can compose the same shell around two existing dev
7
- handlers:
5
+ The CLI opens Map DevTools through `tileflow preview`. It uses one map and one watched artifact
6
+ session by default. A developer-tools panel groups Map, Layers, Tiles, Assets, Debug and Beacon. Camera controls
7
+ occupy a separate row below the navigation. Use the three-dot menu to dock left, right or below
8
+ the map and choose System, Light or Dark appearance. Drag the divider to resize it; focused dividers
9
+ also support arrow keys. Dock position and dimensions persist locally. Layer observations and highlights stay local to the preview. The map fills the remaining
10
+ workspace without brand headers or map-status badges. Closing the panel leaves a small **DevTools**
11
+ button to reopen it; capture and comparison controls are absent from the interface.
12
+
13
+ Add `--against-map ...` or `--against-config ...` for synchronized comparison. Custom local servers
14
+ can compose the same shell around existing dev handlers; omit `right` for a single-map session:
8
15
 
9
16
  ```ts
10
17
  import {createTileflowComparisonRequestHandler} from '@tileflow/dev/server';
@@ -27,11 +34,22 @@ const fetch = createTileflowComparisonRequestHandler({
27
34
  });
28
35
  ```
29
36
 
37
+ Set `fitViewport: true` on each dev handler embedded in a resizable Map DevTools pane. Scene previews
38
+ then fit their pane while captures retain the scene's declared frame. Standalone dev handlers keep
39
+ the fixed scene viewport by default.
40
+
30
41
  Each side handler retains ownership of its styles, fonts, sprites, events, diagnostics, and
31
- last-known-good artifact generation. The comparison router only owns the root HTML and strict
32
- dispatch to two disjoint same-origin route prefixes. Its synchronized camera, URL state,
33
- side-by-side/split/overlay/blink modes, rendered-feature inspector, zoom-curve sampling, sprite
34
- atlas, and scene/capture-command copying require no hosted service.
42
+ last-known-good artifact generation. The comparison router owns the shell, its bundled UI fonts and
43
+ strict dispatch to disjoint same-origin route prefixes. An optional `workbench: {url, handle}`
44
+ adapter enables palette selection and browser context. Existing CLI capture-record and comparison
45
+ APIs remain separate from this interface. Custom servers that omit the adapter retain inspection,
46
+ zoom-curve sampling and the sprite atlas. Explicit two-map server configurations retain synchronized
47
+ cameras and URL-driven side-by-side/split/overlay/blink layouts without comparison controls.
48
+
49
+ See the [human/agent workflow](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/docs/map-authoring.md#work-with-a-person-and-an-agent)
50
+ for retained evidence, context bounds and `inspect session`. Browser context reports the observed
51
+ camera and viewport; capture commands render compiled source without temporary preview edits. The rendered feature summary shows available semantic paths and
52
+ keeps raw feature data in a disclosure. It does not infer exact source lines or token ownership.
35
53
 
36
54
  Set `inspection: true` on `createTileflowBuildArtifacts` or
37
55
  `createTileflowArtifactSession` to compute `artifacts.styleInspections[map][theme]`. A dev handler
@@ -62,188 +80,51 @@ prepared local-font bundle before authentication until managed font storage is a
62
80
  map that declares `glyphs` replaces the inherited local provider atomically; the URL-backed map is
63
81
  complete as declared and independent of its World selection.
64
82
 
65
- For Streets styles whose vegetation layer declares `tileflow:vegetation-mode = 3d`, the built-in
66
- preview uses the same portable circle fallback as capture and the published framework adapters by
67
- default. This makes an ordinary `tileflow preview` session WYSIWYG with production and visual
68
- baselines. Append `?treeRenderer=simple` or `?treeRenderer=complex` to opt into the experimental,
69
- preview-only instanced renderer described below; that explicit mode is not capture evidence.
70
-
71
- The experimental renderer uses source height and crown diameter when present, distinguishes palms,
72
- columnar cypresses, conifers, and three broadleaf silhouettes from the bound botanical fields, and
73
- falls back to deterministic broadleaf variety and dimensions when tags are missing. Bark color,
74
- crown palettes, height scale, and crown scale come from `vegetation.threeDimensional`; the preview
75
- does not maintain a second hard-coded appearance contract. During camera
76
- gestures the existing 3D batch remains visible while native circles cover newly arriving tiles; the
77
- batch refreshes when movement ends without waiting for the whole map to become idle. Source-tile
78
- events are rate-limited and unchanged instance selections do not upload new GPU buffers. The
79
- preview caps one view at 3,000 trees and uses zoom-dependent density. Both detailed modes use thin,
80
- tapered trunks, branches that enter the crown, softly shaded overlapping ellipsoids, and stable
81
- per-tree scale and rotation. `simple` reduces lobe and segment counts; `complex` keeps the complete
82
- round, open, avenue, pine, cypress, and palm silhouettes. Each archetype remains fused into one
83
- reusable geometry and every complete tree remains
84
- one GPU instance, so the additional detail introduces no extra draw calls. The experimental
85
- renderer defaults to its WebGL2 backend, which
86
- draws those instances directly without a Three.js scene traversal; append `&treeBackend=three` for
87
- the compatibility backend. Use `?treeRenderer=circle`, `?treeRenderer=simple`, or
88
- `?treeRenderer=complex&treeBenchmark=1` to compare identical scenes; the benchmark reports frame
89
- p95, query, selection, build and render time, draw calls, and triangle count in the tree status badge.
90
- Visible candidates come from MapLibre's worker-built tile index instead of a second copy of the
91
- vector source. Terrain height is sampled on a fixed 5-by-5 viewport grid and interpolated per tree,
92
- avoiding hundreds of synchronous terrain queries when a new batch first appears.
93
- The separate `TREES ON/OFF` control sits below the building `3D ON/OFF` control and pauses tree
94
- refresh work while disabled. Both choices survive reloads and shared links through the
95
- `buildings3d=on|off` and `trees3d=on|off` URL parameters.
96
-
97
- Detailed trees retain the compiler's scene order: they render above road and pedestrian surfaces,
98
- ordinary building geometry, and detailed landmark models. Map labels and other annotations remain
99
- above the physical scene, while road names and route references stay attached to the carriageway
100
- below buildings and trees.
101
-
102
- The same control toggles any compiled layer whose metadata contains
103
- `tileflow:3d-toggle = building`. It switches the building volumes independently from the camera,
104
- so enabling 3D never changes the pitch and users remain free to tilt the map with pointer controls.
105
-
106
- ### Detailed landmark models
107
-
108
- A hidden style layer can opt the Streets preview into detailed GLB landmarks by setting
109
- `tileflow:landmark-manifest-url` in its metadata. The bounded version-2 manifest indexes GLB entries
110
- inside one or more PMTiles archives and is fetched only when the 3D building control is enabled near
111
- the landmark runtime zoom. Archive URLs may be absolute or relative to the manifest URL.
112
-
113
- ```json
114
- {
115
- "schemaVersion": 2,
116
- "id": "madrid-landmarks-2026-08-19",
117
- "minzoom": 16,
118
- "maximumVisibleModels": 8,
119
- "maximumCachedModels": 16,
120
- "archives": [
121
- {
122
- "id": "madrid-v1",
123
- "url": "./madrid-landmarks-v1.pmtiles",
124
- "bytes": 14832912,
125
- "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
126
- }
127
- ],
128
- "landmarks": [
129
- {
130
- "id": "palacio-cibeles",
131
- "center": [-3.6921, 40.4193],
132
- "bounds": [-3.693, 40.4186, -3.6912, 40.42],
133
- "priority": 100,
134
- "models": [
135
- {
136
- "minzoom": 16,
137
- "archiveId": "madrid-v1",
138
- "z": 0,
139
- "x": 0,
140
- "y": 0,
141
- "bytes": 481024,
142
- "sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
143
- "axisConvention": "EUN_Y_UP"
144
- },
145
- {
146
- "minzoom": 18,
147
- "archiveId": "madrid-v1",
148
- "z": 1,
149
- "x": 0,
150
- "y": 0,
151
- "bytes": 1276416,
152
- "sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
153
- "axisConvention": "EUN_Y_UP"
154
- }
155
- ]
156
- }
157
- ]
158
- }
159
- ```
160
-
161
- `maximumVisibleModels` is bounded to 1–64. `maximumCachedModels` defaults to twice that value,
162
- must be at least the visible limit, and is bounded to 128. Higher `priority` values win when more
163
- landmarks intersect the viewport than can be shown. `models[0]` is the base LOD and must start at the
164
- manifest `minzoom`; later entries replace it at their distinct `minzoom`. The parser bounds manifest,
165
- archive, landmark, model and GLB-entry sizes, rejects credential-bearing or non-HTTP archive URLs,
166
- and verifies each extracted entry's declared byte length and SHA-256 before parsing it.
167
-
168
- The preview starts the Three.js runtime and manifest request together one zoom before the landmark
169
- layer becomes visible. A landmark entering directly at a close zoom always displays its base LOD
170
- first and upgrades in place. Nearby base LODs are warmed in the parsed-model cache. Style layers
171
- marked with `tileflow:landmark-fallback = true` remain visible until the corresponding active GLB is
172
- ready, so a cold request never leaves an empty building volume.
173
-
174
- Embedded Streets previews also accept a same-origin parent command without reloading the document:
175
-
176
- ```js
177
- iframe.contentWindow.postMessage(
178
- {
179
- type: 'tileflow:set-map-state',
180
- schemaVersion: 1,
181
- state: {
182
- center: [-3.688344, 40.453053],
183
- zoom: 17.75,
184
- bearing: -24,
185
- pitch: 58,
186
- buildings3d: true,
187
- trees3d: false,
188
- visibleLayerGroups: ['labels', 'roads', 'buildings', 'landuse', 'water'],
189
- },
190
- },
191
- location.origin,
192
- );
193
- ```
194
-
195
- The command is applied atomically only for the embedding parent, with exact same-origin and numeric
196
- range checks. `visibleLayerGroups` is optional and accepts only `labels`, `pois`, `roads`, `transit`,
197
- `buildings`, `landuse`, and `water`; omitted groups are hidden while base background and attribution
198
- remain. Camera and toggle state continue to be written to the preview URL after application.
199
-
200
- GLB base colors, textures, emissive values, metalness, and roughness are authoritative and are not
201
- rewritten by the preview. Models outside the active selection remain hidden in a least-recently-used
202
- cache; leaving the cache disposes their geometry, materials, and textures.
203
-
204
- The vector building represented by a detailed model must carry `hide_3d = true`. The ordinary
205
- building extrusion and both screen-space shadow passes filter on that field, preventing the coarse
206
- volume from intersecting the GLB while retaining the flat footprint below it. This flag belongs in
207
- the vector-tile dataset; the landmark endpoint cannot substitute for it. Version model and GLB URLs
208
- so they can be served with immutable caching. Cross-origin endpoints must allow credentialed GETs
209
- because the development renderer requests the manifest and models with credentials.
210
-
211
- If a map uses `icons: ['./icons/brand']`, build artifacts include the generated MapLibre
212
- `sprite.json`, `sprite.png`, `sprite@2x.json`, and `sprite@2x.png` beside its style. Ordinary sources
213
- are normalized into 24 px icon cells. A source named `<id>.pattern.svg` (or another supported raster
214
- format with the same marker) instead keeps its intrinsic dimensions and is published as `<id>`.
215
- This provides calibrated, non-square textures for line and fill patterns while the runtime still
216
- consumes only the generated PNG sprite. Pattern widths must be a power of two from 2 through 512
217
- pixels, matching MapLibre's seamless line-pattern contract.
218
-
219
- `icons` is one ordered array. Omitting it inherits the parent's exact array, declaring it replaces
220
- the array atomically, and `[]` means no icons. Use a spread to preserve imported directories while
221
- adding or replacing files:
222
-
223
- ```ts
224
- import {defineMap} from '@tileflow/core';
225
- import {streets} from '@tileflow/maps';
226
-
227
- export default defineMap({
228
- id: 'brand-map',
229
- version: 1,
230
- extends: streets,
231
- icons: [...streets.icons, './icons/brand'],
232
- });
233
- ```
234
-
235
- Directories apply left to right. `<id>.<ext>` publishes an icon as `<id>`;
236
- `<id>.pattern.<ext>` publishes the intrinsic-size pattern as `<id>`. The published ID must already
237
- be canonical lower-kebab-case. A later file replaces an earlier file only for the same exact ID;
238
- case-only collisions fail. Package maps export `streetsIcons`, `baedekerIcons`, `civicaIcons`,
239
- `ferrarisIcons`, `haradIcons`, `siegfriedIcons`, `soundingsIcons`, `blueprintIcons` directory descriptors from
240
- `@tileflow/maps`. Baedeker, Cívica, and Siegfried also export
241
- `baedekerFonts`, `civicaFonts`, and `siegfriedFonts`. Preparation
242
- resolves package descriptors inside their owning package, checks real-path containment, and
243
- compiles them through the same pipeline as a config-relative directory. There are no
244
- built-in/source/sprite selectors, mappings, icon-specific inheritance, or compatibility aliases.
245
-
246
- Local directories resolve from the directory containing the selected `tileflow.config.ts`, while
247
- the workspace `cwd` remains their containment boundary. Canonical local syntax starts with `./` or
248
- one or more leading `../` segments and then uses only non-empty segments other than `.` or `..`;
249
- trailing or repeated slashes, backslashes, controls, and paths longer than 512 characters fail.
83
+ ### Pick an element in Layers
84
+
85
+ Press **I** or the element-picker icon, hover for a layer/type/ID hint, then click the map.
86
+ The clicked element selects its physical layer in **Layers** and opens **Rules**, the first detail tab.
87
+ Expression values use that picked feature, rather than an arbitrary viewport sample. **Data** shows
88
+ its properties and additional viewport samples; **Use for rules** chooses a different sample.
89
+ There is no separate Inspect tab. Legacy `tab=inspect` links open Layers.
90
+
91
+ Selecting another layer clears the picked-feature context. Compiler and scene revisions invalidate
92
+ old feature snapshots. The renderer's layer ID remains selected across reloads through the `layer`
93
+ URL parameter; missing IDs are reported explicitly. Rules expose inline temporary paint/layout
94
+ editors for the entire physical layer, with per-rule reset and shared undo history. Preview edits do
95
+ not write config, source data or build artifacts. See [Layers inspection](./layers-inspection.md) for diagnostic limits,
96
+ map highlighting, provenance and agent context.
97
+
98
+ ### Tiles
99
+
100
+ **Tiles** shows in-view resident tiles in a spatial grid and source-grouped list, with canonical
101
+ `z/x/y`, display zoom, state and raw tile bytes where available. Filter by source or coordinates.
102
+ Select a tile to outline its bounds and inspect **Source layers**, **Features** and **Info**.
103
+ Source-layer rows link to consuming style layers. Features are paginated in groups of 50 and can
104
+ be copied as real GeoJSON. Counts describe tile fragments, including buffer geometry, rather than
105
+ unique objects across tiles. **Show on map** fits the selected bounds.
106
+
107
+ Raster DEM tiles show decoded grid dimensions and elevation statistics. Raster imagery has no
108
+ vector features. Eviction, unavailable internals and unsupported MLT decoding are reported explicitly.
109
+ Inspection decodes resident MVT buffers on demand without requesting tiles.
110
+
111
+ The view reads the pinned MapLibre renderer's tile managers through an isolated adapter. A resident
112
+ tile can come from cache and need not have a new HTTP request. Unsupported renderer internals
113
+ produce an unavailable state. Network does not list application scripts, development-server
114
+ traffic or other HTTP resources. Sprite and font sources remain in **Assets**.
115
+
116
+ ### Assets and debug overlays
117
+
118
+ **Assets** separates Icons, 3D models and Fonts. Icons lists registered images, including runtime
119
+ additions, with lazy thumbnails and searchable IDs. Palette and time filters load the actual
120
+ registered theme atlases; the selected icon's sidebar compares its day/night variants and links to
121
+ consuming layers. Missing variants are marked, never synthesized from a naming convention.
122
+
123
+ 3D models previews bounded samples of the actual loaded building and vegetation meshes. Counts,
124
+ bytes, LODs and available instance counts describe controller data. The wire geometry preview is
125
+ not the map's lighting renderer. Fonts renders editable specimens from the actual font or glyph
126
+ provider and shows observed glyph ranges and consuming layers. Pending requests are cancelled
127
+ when leaving the panel; unavailable sources do not silently use a fallback font.
128
+
129
+ **Debug** offers collision boxes, overdraw with a color legend, tile boundaries and real pixel-ratio
130
+ controls. **Beacon** provides controlled map audits; see [Beacon map audits](./beacon-map-audits.md).
@@ -202,7 +202,7 @@ pnpm exec tsx scripts/native-lowering-audit.ts > native-lowering-audit.json
202
202
  ```
203
203
 
204
204
  This diagnostic report compiles the unchanged full Streets family through the web preparation
205
- path, then measures the native representation for **both** dark and light before applying output
205
+ path, then measures the native representation for **all twelve** themes before applying output
206
206
  budget assertions. It writes no native artifact generation and is not a compatibility verdict.
207
207
  Each theme includes layer counts, visited JSON nodes, UTF-8 bytes and maximum depth before/after;
208
208
  every transformed layer is listed with its ID, physical span, branch count and zoom intervals,
@@ -214,7 +214,7 @@ cap/dash decisions. They identify whether predicate expansion or repetition of o
214
214
  dominates; they are not an additive byte decomposition. The counters include array keys, matching
215
215
  the profile's existing node convention. Retain the report with the checkout SHA. An over-budget
216
216
  result must not be treated as a successful native build or fixed by dropping layers or weakening
217
- validation. The test suite prints the two-theme size summary even when a budget assertion fails.
217
+ validation. The test suite prints the full theme size summary even when a budget assertion fails.
218
218
 
219
219
  ## Prepare Streets for a directed native check
220
220
 
@@ -251,7 +251,7 @@ actually contains features for the transformed layers listed in
251
251
  `/tmp/native-lowering-audit.json`. Use the audit's exact physical IDs, source layers, branch counts
252
252
  and zoom intervals rather than assuming that a map location exercises every branch.
253
253
 
254
- Check both themes at the same center, viewport, pitch 0 and bearing 0. Exercise at least one cap
254
+ Check all themes at the same center, viewport, pitch 0 and bearing 0. Exercise at least one cap
255
255
  partition, one dashed/solid partition and an overlap between simultaneously active branches. Pan
256
256
  slightly and inspect just below/at/above the relevant audit zoom cuts (for example 15.99/16/16.01
257
257
  when a selected interval changes at 16). Check that caps and dash patterns are visible, layers do
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/dev",
3
- "version": "0.1.0-alpha.30",
3
+ "version": "0.1.0-alpha.32",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Node development utilities for Tileflow configs and builds.",
6
6
  "type": "module",
@@ -26,6 +26,7 @@
26
26
  },
27
27
  "files": [
28
28
  "dist",
29
+ "ui-fonts",
29
30
  "docs",
30
31
  "THIRD_PARTY_NOTICES.md",
31
32
  "LICENSE"
@@ -82,26 +83,27 @@
82
83
  },
83
84
  "dependencies": {
84
85
  "@mapbox/vector-tile": "3.0.0",
85
- "@maplibre/maplibre-gl-style-spec": "24.8.5",
86
- "@tileflow/core": ">=0.1.0-alpha.32 <0.1.0-beta.0",
86
+ "@maplibre/maplibre-gl-style-spec": "26.4.4",
87
+ "@tileflow/core": ">=0.1.0-alpha.35 <0.1.0-beta.0",
87
88
  "chokidar": "4.0.3",
88
89
  "fflate": "0.8.3",
89
90
  "fontkit": "2.0.4",
90
91
  "jiti": "^2.7.0",
91
92
  "maplibre-gl": "6.13.0",
93
+ "meshoptimizer": "1.3.0",
92
94
  "pbf": "5.1.2",
93
95
  "pmtiles": "4.5.0",
94
96
  "saxes": "6.0.0",
95
97
  "three": "0.185.1"
96
98
  },
97
99
  "devDependencies": {
98
- "@tileflow/maps": "0.1.0-alpha.8"
100
+ "@tileflow/maps": "0.1.0-alpha.9"
99
101
  },
100
102
  "optionalDependencies": {
101
103
  "sharp": "0.35.5"
102
104
  },
103
105
  "scripts": {
104
- "build": "tsup src/artifacts.ts src/config.ts src/fonts.ts src/icons.ts src/inspect.ts src/preview.ts src/server.ts src/tilesets.ts src/validation.ts --format esm --dts --clean --platform node --external sharp",
106
+ "build": "tsup src/artifacts.ts src/config.ts src/fonts.ts src/icons.ts src/inspect.ts src/preview.ts src/server.ts src/tilesets.ts src/validation.ts --format esm --dts --clean --platform node --external sharp && tsup --config tsup.devtools.config.ts",
105
107
  "test": "tsx --test test/*.test.ts",
106
108
  "typecheck": "tsc -p tsconfig.json --noEmit",
107
109
  "lint": "tsc -p tsconfig.json --noEmit",