@tileflow/dev 0.1.0-alpha.31 → 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.
- package/README.md +59 -2
- package/THIRD_PARTY_NOTICES.md +225 -3
- package/dist/artifacts.d.ts +6 -2
- package/dist/artifacts.js +17 -2
- package/dist/{chunk-2QXKVQ6O.js → chunk-CM6ZTYDJ.js} +45 -5
- package/dist/{chunk-IR22ZTQW.js → chunk-F4PLTZS4.js} +447 -27
- package/dist/devtools-browser.js +17353 -0
- package/dist/devtools-observer.js +95 -0
- package/dist/fonts.d.ts +1 -1
- package/dist/icons-B84H8Ymu.d.ts +406 -0
- package/dist/icons.d.ts +3 -339
- package/dist/icons.js +3 -1
- package/dist/{preview-assets-MVUJJ5XR.js → preview-assets-KGUICQHG.js} +6 -0
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +206 -98
- package/dist/server.d.ts +11 -4
- package/dist/server.js +1594 -277
- package/docs/beacon-map-audits.md +102 -0
- package/docs/layers-inspection.md +87 -0
- package/docs/local-comparison-workbench-and-compiler-inspection.md +74 -171
- package/docs/native-artifacts.md +3 -3
- package/package.json +7 -5
- package/ui-fonts/hubot-sans-OFL.txt +93 -0
- package/ui-fonts/hubot-sans.woff2 +0 -0
- package/ui-fonts/inter-OFL.txt +92 -0
- package/ui-fonts/inter.woff2 +0 -0
- package/ui-fonts/jetbrains-mono-OFL.txt +93 -0
- package/ui-fonts/jetbrains-mono.woff2 +0 -0
- package/ui-fonts/mona-sans-OFL.txt +93 -0
- package/ui-fonts/mona-sans.woff2 +0 -0
|
@@ -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
|
-
#
|
|
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
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
32
|
-
dispatch to
|
|
33
|
-
|
|
34
|
-
|
|
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,166 +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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
"minzoom": 16,
|
|
115
|
-
"archiveId": "madrid-v1",
|
|
116
|
-
"z": 0,
|
|
117
|
-
"x": 0,
|
|
118
|
-
"y": 0,
|
|
119
|
-
"bytes": 481024,
|
|
120
|
-
"sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
121
|
-
"axisConvention": "EUN_Y_UP"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"minzoom": 18,
|
|
125
|
-
"archiveId": "madrid-v1",
|
|
126
|
-
"z": 1,
|
|
127
|
-
"x": 0,
|
|
128
|
-
"y": 0,
|
|
129
|
-
"bytes": 1276416,
|
|
130
|
-
"sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
|
|
131
|
-
"axisConvention": "EUN_Y_UP"
|
|
132
|
-
}
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
`maximumVisibleModels` is bounded to 1–64. `maximumCachedModels` defaults to twice that value,
|
|
140
|
-
must be at least the visible limit, and is bounded to 128. Higher `priority` values win when more
|
|
141
|
-
landmarks intersect the viewport than can be shown. `models[0]` is the base LOD and must start at the
|
|
142
|
-
manifest `minzoom`; later entries replace it at their distinct `minzoom`. The parser bounds manifest,
|
|
143
|
-
archive, landmark, model and GLB-entry sizes, rejects credential-bearing or non-HTTP archive URLs,
|
|
144
|
-
and verifies each extracted entry's declared byte length and SHA-256 before parsing it.
|
|
145
|
-
|
|
146
|
-
The preview starts the Three.js runtime and manifest request together one zoom before the landmark
|
|
147
|
-
layer becomes visible. A landmark entering directly at a close zoom always displays its base LOD
|
|
148
|
-
first and upgrades in place. Nearby base LODs are warmed in the parsed-model cache. Style layers
|
|
149
|
-
marked with `tileflow:landmark-fallback = true` remain visible until the corresponding active GLB is
|
|
150
|
-
ready, so a cold request never leaves an empty building volume.
|
|
151
|
-
|
|
152
|
-
Embedded Streets previews also accept a same-origin parent command without reloading the document:
|
|
153
|
-
|
|
154
|
-
```js
|
|
155
|
-
iframe.contentWindow.postMessage(
|
|
156
|
-
{
|
|
157
|
-
type: 'tileflow:set-map-state',
|
|
158
|
-
schemaVersion: 1,
|
|
159
|
-
state: {
|
|
160
|
-
center: [-3.688344, 40.453053],
|
|
161
|
-
zoom: 17.75,
|
|
162
|
-
bearing: -24,
|
|
163
|
-
pitch: 58,
|
|
164
|
-
buildings3d: true,
|
|
165
|
-
trees3d: false,
|
|
166
|
-
visibleLayerGroups: ['labels', 'roads', 'buildings', 'landuse', 'water'],
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
location.origin,
|
|
170
|
-
);
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
The command is applied atomically only for the embedding parent, with exact same-origin and numeric
|
|
174
|
-
range checks. `visibleLayerGroups` is optional and accepts only `labels`, `pois`, `roads`, `transit`,
|
|
175
|
-
`buildings`, `landuse`, and `water`; omitted groups are hidden while base background and attribution
|
|
176
|
-
remain. Camera and toggle state continue to be written to the preview URL after application.
|
|
177
|
-
|
|
178
|
-
GLB base colors, textures, emissive values, metalness, and roughness are authoritative and are not
|
|
179
|
-
rewritten by the preview. Models outside the active selection remain hidden in a least-recently-used
|
|
180
|
-
cache; leaving the cache disposes their geometry, materials, and textures.
|
|
181
|
-
|
|
182
|
-
The vector building represented by a detailed model must carry `hide_3d = true`. The ordinary
|
|
183
|
-
building extrusion and both screen-space shadow passes filter on that field, preventing the coarse
|
|
184
|
-
volume from intersecting the GLB while retaining the flat footprint below it. This flag belongs in
|
|
185
|
-
the vector-tile dataset; the landmark endpoint cannot substitute for it. Version model and GLB URLs
|
|
186
|
-
so they can be served with immutable caching. Cross-origin endpoints must allow credentialed GETs
|
|
187
|
-
because the development renderer requests the manifest and models with credentials.
|
|
188
|
-
|
|
189
|
-
If a map uses `icons: ['./icons/brand']`, build artifacts include the generated MapLibre
|
|
190
|
-
`sprite.json`, `sprite.png`, `sprite@2x.json`, and `sprite@2x.png` beside its style. Ordinary sources
|
|
191
|
-
are normalized into 24 px icon cells. A source named `<id>.pattern.svg` (or another supported raster
|
|
192
|
-
format with the same marker) instead keeps its intrinsic dimensions and is published as `<id>`.
|
|
193
|
-
This provides calibrated, non-square textures for line and fill patterns while the runtime still
|
|
194
|
-
consumes only the generated PNG sprite. Pattern widths must be a power of two from 2 through 512
|
|
195
|
-
pixels, matching MapLibre's seamless line-pattern contract.
|
|
196
|
-
|
|
197
|
-
`icons` is one ordered array. Omitting it inherits the parent's exact array, declaring it replaces
|
|
198
|
-
the array atomically, and `[]` means no icons. Use a spread to preserve imported directories while
|
|
199
|
-
adding or replacing files:
|
|
200
|
-
|
|
201
|
-
```ts
|
|
202
|
-
import {defineMap} from '@tileflow/core';
|
|
203
|
-
import {streets} from '@tileflow/maps';
|
|
204
|
-
|
|
205
|
-
export default defineMap({
|
|
206
|
-
id: 'brand-map',
|
|
207
|
-
version: 1,
|
|
208
|
-
extends: streets,
|
|
209
|
-
icons: [...streets.icons, './icons/brand'],
|
|
210
|
-
});
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
Directories apply left to right. `<id>.<ext>` publishes an icon as `<id>`;
|
|
214
|
-
`<id>.pattern.<ext>` publishes the intrinsic-size pattern as `<id>`. The published ID must already
|
|
215
|
-
be canonical lower-kebab-case. A later file replaces an earlier file only for the same exact ID;
|
|
216
|
-
case-only collisions fail. Package maps export `streetsIcons`, `baedekerIcons`, `civicaIcons`,
|
|
217
|
-
`ferrarisIcons`, `haradIcons`, `siegfriedIcons`, `soundingsIcons`, `blueprintIcons` directory descriptors from
|
|
218
|
-
`@tileflow/maps`. Baedeker, Cívica, and Siegfried also export
|
|
219
|
-
`baedekerFonts`, `civicaFonts`, and `siegfriedFonts`. Preparation
|
|
220
|
-
resolves package descriptors inside their owning package, checks real-path containment, and
|
|
221
|
-
compiles them through the same pipeline as a config-relative directory. There are no
|
|
222
|
-
built-in/source/sprite selectors, mappings, icon-specific inheritance, or compatibility aliases.
|
|
223
|
-
|
|
224
|
-
Local directories resolve from the directory containing the selected `tileflow.config.ts`, while
|
|
225
|
-
the workspace `cwd` remains their containment boundary. Canonical local syntax starts with `./` or
|
|
226
|
-
one or more leading `../` segments and then uses only non-empty segments other than `.` or `..`;
|
|
227
|
-
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).
|
package/docs/native-artifacts.md
CHANGED
|
@@ -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 **
|
|
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
|
|
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
|
|
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.
|
|
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": "
|
|
86
|
-
"@tileflow/core": ">=0.1.0-alpha.
|
|
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.
|
|
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",
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2021 The Hubot Sans Project Authors (https://github.com/github/hubot-sans), with Reserved Font Name "Hubot"
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|