@tileflow/dev 0.1.0-alpha.3 → 0.1.0-alpha.31

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.
Files changed (41) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +201 -5
  3. package/THIRD_PARTY_NOTICES.md +87 -0
  4. package/dist/artifacts.d.ts +265 -0
  5. package/dist/artifacts.js +81 -0
  6. package/dist/chunk-2QXKVQ6O.js +3062 -0
  7. package/dist/chunk-7C4F6GAX.js +170 -0
  8. package/dist/chunk-AQUGMUZW.js +324 -0
  9. package/dist/chunk-D4OE4ITL.js +13 -0
  10. package/dist/chunk-IR22ZTQW.js +2392 -0
  11. package/dist/chunk-KDFTE4Q5.js +156 -0
  12. package/dist/chunk-ONYQNLNA.js +1108 -0
  13. package/dist/chunk-UTRO4IBQ.js +671 -0
  14. package/dist/chunk-XHJBCVBB.js +241 -0
  15. package/dist/config.d.ts +33 -0
  16. package/dist/config.js +27 -0
  17. package/dist/fonts.d.ts +47 -0
  18. package/dist/fonts.js +16 -0
  19. package/dist/icons.d.ts +339 -0
  20. package/dist/icons.js +39 -0
  21. package/dist/inspect.d.ts +149 -0
  22. package/dist/inspect.js +805 -0
  23. package/dist/preview-assets-MVUJJ5XR.js +148 -0
  24. package/dist/preview.d.ts +71 -0
  25. package/dist/preview.js +2574 -0
  26. package/dist/server.d.ts +82 -0
  27. package/dist/server.js +2094 -0
  28. package/dist/tilesets.d.ts +89 -0
  29. package/dist/tilesets.js +6 -0
  30. package/dist/validation.d.ts +65 -0
  31. package/dist/validation.js +24 -0
  32. package/docs/artifact-lifecycle.md +152 -0
  33. package/docs/bounded-pmtiles-resource-inspection.md +21 -0
  34. package/docs/bounded-vector-feature-inspection.md +100 -0
  35. package/docs/local-comparison-workbench-and-compiler-inspection.md +227 -0
  36. package/docs/native-artifacts.md +285 -0
  37. package/docs/native-icons.md +129 -0
  38. package/docs/structured-config-inspection-and-diagnostics.md +39 -0
  39. package/package.json +77 -13
  40. package/dist/index.d.ts +0 -54
  41. package/dist/index.js +0 -314
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,13 +1,209 @@
1
1
  # @tileflow/dev
2
2
 
3
- Node utilities used by the Tileflow CLI and build integrations.
3
+ Node.js utilities for custom Tileflow build tools and development servers. Load a trusted
4
+ `tileflow.config.ts`, prepare its assets, and produce a validated artifact generation.
5
+
6
+ Most applications should use the [CLI](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/README.md)
7
+ or the [Vite](https://github.com/tileflow/tileflow-sdk/blob/main/packages/vite/README.md),
8
+ [Next.js](https://github.com/tileflow/tileflow-sdk/blob/main/packages/next/README.md), or
9
+ [Webpack](https://github.com/tileflow/tileflow-sdk/blob/main/packages/webpack/README.md) integration.
10
+ This package is for implementing an integration, not for browser rendering.
11
+
12
+ > Related packages and guides: [documentation index](https://raw.githubusercontent.com/tileflow/tileflow-sdk/main/llms.txt).
13
+
14
+ ## Install
15
+
16
+ Use Node.js 22 or newer:
17
+
18
+ ```sh
19
+ npm install --save-dev @tileflow/dev@alpha @tileflow/core@alpha @tileflow/maps@alpha
20
+ ```
21
+
22
+ Create a trusted `tileflow.config.ts` in the working directory:
23
+
24
+ <!-- docs:check -->
25
+
26
+ ```ts
27
+ import {defineMap} from '@tileflow/core';
28
+ import {streets} from '@tileflow/maps';
29
+
30
+ export default defineMap({id: 'madrid', version: 1, extends: streets});
31
+ ```
32
+
33
+ Loading the config executes its imports. It is not a sandbox for untrusted code. Local preparation
34
+ needs no API key, but serving a map can still cause requests to its remote data or font providers.
35
+
36
+ ## Prepare a generation
37
+
38
+ <!-- docs:check -->
4
39
 
5
40
  ```ts
6
- import { createTileflowBuildArtifacts } from "@tileflow/dev";
41
+ import {createTileflowBuildArtifacts} from '@tileflow/dev/artifacts';
42
+
43
+ const artifacts = await createTileflowBuildArtifacts({config: 'tileflow.config.ts'});
44
+
45
+ try {
46
+ console.log(artifacts.manifest);
47
+ console.log(Object.keys(artifacts.styles.madrid));
48
+ } finally {
49
+ await artifacts.dispose?.();
50
+ }
51
+ ```
52
+
53
+ The artifact plan exposes files and observed inputs from the same generation. Styles are keyed as
54
+ `styles[map][theme]`, never as an implicit default-theme alias. Keep that generation alive for the
55
+ whole operation, then release it. Do not reconstruct its asset list from directory guesses.
56
+
57
+ To write production output rather than manage it in memory:
7
58
 
8
- const artifacts = await createTileflowBuildArtifacts({
9
- config: "tileflow.config.ts",
59
+ <!-- docs:check -->
60
+
61
+ ```ts
62
+ import {writeTileflowBuildArtifacts} from '@tileflow/dev/artifacts';
63
+
64
+ await writeTileflowBuildArtifacts({
65
+ config: 'tileflow.config.ts',
66
+ outDir: 'public/tileflow',
10
67
  });
11
68
  ```
12
69
 
13
- Docs: https://tileflow.dev/docs
70
+ Serve the complete output. The writer installs immutable generation assets before changing the
71
+ manifest pointer, tracks its own files, and refuses to replace a hosted manifest by default.
72
+ `overwriteHostedManifest: true` is an explicit migration option, not a normal build setting.
73
+ Production rejects unresolved local PMTiles; publish data explicitly or provide an application-owned
74
+ production source. Local development snapshots do not publish or redistribute the original dataset.
75
+
76
+ Maps whose labels use a line-fitted `text.background` draw text with derived glyph stacks. Local
77
+ previews and captures route such a map's glyph URL through `__glyphs/<map>/…`. Ordinary stacks pass
78
+ through from the declared provider; derived ranges are computed from their source ranges, which are
79
+ cached under `.tileflow/cache/glyphs/v1`. Production output keeps the declared provider, which must
80
+ serve derived stacks.
81
+
82
+ ## Keep a watched request handler
83
+
84
+ Use one session for repeated work and close it when the owning server stops:
85
+
86
+ <!-- docs:check -->
87
+
88
+ ```ts
89
+ import {createTileflowArtifactSession} from '@tileflow/dev/artifacts';
90
+ import {createTileflowDevRequestHandler} from '@tileflow/dev/server';
91
+
92
+ export async function createMapHandler() {
93
+ const session = await createTileflowArtifactSession({
94
+ config: 'tileflow.config.ts',
95
+ watch: true,
96
+ });
97
+ const handler = createTileflowDevRequestHandler({session});
98
+
99
+ return {
100
+ fetch: handler,
101
+ async close() {
102
+ await handler.close();
103
+ await session.close();
104
+ },
105
+ };
106
+ }
107
+ ```
108
+
109
+ The caller mounts `fetch` in its server and calls `close()` on shutdown. This factory does not open
110
+ a listener. Sessions follow config imports and local asset inputs, retain the last good generation
111
+ after invalid edits, and publish structured state changes through `subscribe()`.
112
+ Watching follows aliased working directories, including newly created or removed icon metadata.
113
+ A single startup consistency check complements ordinary watcher notifications; no recurring scan
114
+ is added.
115
+
116
+ `getState()` and `getLastGoodArtifacts()` return borrowed synchronous views. Before asynchronous
117
+ work, call `acquireArtifacts(generation?)` and release the acquisition in `finally`. A replaced
118
+ generation accepts no new acquisitions; closing a session waits for existing acquisitions.
119
+
120
+ ## Choose an entry point
121
+
122
+ Use `/artifacts` for preparation and output, `/server` for HTTP handling, `/config` for trusted config
123
+ loading, `/icons` and `/fonts` for asset preparation, `/inspect` for bounded inspection, `/tilesets`
124
+ for local PMTiles inspection, and `/validation` for diagnostics. `/preview` is the local preview
125
+ contract, including experimental preview-only rendering; it does not promise hosted support.
126
+ The package has no root entry point.
127
+
128
+ Invalid compiled styles throw `TileflowStyleValidationError` with bounded issues. Keep diagnostics
129
+ structured; do not return executable config, local paths, credentials, or complete generated byte
130
+ arrays from a public endpoint.
131
+
132
+ ## Locked Icon Set composition
133
+
134
+ `composeTileflowIconSources(sources, {cwd, lock, cacheRoot, offline: true})` combines local/package
135
+ directories and `iconSet('@team/set')` contributors into one effective sprite. Without an explicit
136
+ lock object, it reads `tileflow.icons.lock.json` beside `baseDirectory` (default: `cwd`). It never
137
+ resolves latest or writes the lock. The result contains the generated `package`, ordered
138
+ `composition` receipt, effective `sourceIdentities`, declared `contributors`, effective `winners`,
139
+ replacement ordinals, local `watchPaths`, and the exact `watchFiles` that select the composition.
140
+ Pass both the source identities and receipt to Core map-revision hashing.
141
+
142
+ This is the one normal icon-preparation path. `compileTileflowIconPackages`,
143
+ `prepareTileflowCatalogIcons`, `inspectTileflowIconCatalogs` and `getTileflowIconWatchPaths` all use
144
+ it, so `createTileflowBuildArtifacts`, `createTileflowArtifactSession`, and every adapter that
145
+ enters them accept the same explicit `icons` resolution options: `cacheRoot`, `offline`,
146
+ `deliveryOrigins`, `fetch` and `signal`. An explicit `cacheRoot` takes precedence over
147
+ `TILEFLOW_ICON_CACHE_DIR`, then the OS cache default. Origins and transport use their documented
148
+ defaults unless supplied explicitly; no build or watch polls a catalog head. `prepareTileflowCatalogIcons`
149
+ returns `mapIconCompositions` alongside `mapIconSources`, and build-manifest entries carry the
150
+ receipt as `sourceAssets.iconComposition` with `mapRevisionSchemaVersion: 2`.
151
+
152
+ A map whose contributors are all local or package directories keeps its existing generated bytes,
153
+ manifest and content hash, and its build-manifest entry stays on the legacy v1 contract.
154
+
155
+ The reader verifies each file length/checksum, PNG/index geometry, names, density pairing, and both
156
+ per-icon pixel hashes. It copies decoded 1x and 2x cells independently, without resampling either.
157
+ The existing directory compiler and this port share the same sprite packer. A sole shared set reuses
158
+ its exact artifact; mixed inputs are packed deterministically. Later contributors win and all
159
+ dependencies remain in the receipt, even when entirely shadowed. Shared inputs never pretend to
160
+ contain original SVG/source identities. Existing local-only compilation remains unchanged.
161
+
162
+ `storeTileflowIconSetArtifact` seeds an exact verified cache entry. `loadTileflowIconSetArtifact`
163
+ uses the cache or hydrates only the selected artifact's four public files. Hydration defaults to the
164
+ trusted `https://api.tileflow.dev` origin, sends no credentials, and follows no redirects.
165
+ Applications may explicitly configure trusted `deliveryOrigins`; locks cannot add them. `offline`
166
+ forbids all fetches and fails on missing or corrupt entries. Complete-map offline rendering still
167
+ depends on unrelated tiles, glyphs, and other external resources.
168
+
169
+ The cache lives under the OS user cache with `tileflow/icons/v1/<contentHash>`. `cacheRoot`, then
170
+ `TILEFLOW_ICON_CACHE_DIR`, overrides its parent. Atomic directory installation and exact-entry
171
+ retirement support concurrent writers and corruption repair. Symlink entries are rejected. This is
172
+ a disposable cache, not a security sandbox against another process controlling the same user
173
+ account. Incomplete temporary entries are never accepted as published cache entries.
174
+
175
+ `readTileflowIconsLockfileText(directory)` returns the exact current lock bytes, or `null` when no
176
+ lock exists; those bytes are the only valid `expectedContents` for the next write.
177
+ `writeTileflowIconsLockfile(directory, lock, expectedContents)` uses a whole-file compare-and-swap
178
+ and atomic rename. A conflicting writer fails without overwriting pins. An interrupted writer leaves
179
+ the previous complete lock intact; remove a stale `.writing` guard only after confirming that its
180
+ writer has exited. Ordinary reads and Core validation never acquire write guards.
181
+
182
+ A package supports up to 1,000 effective icons, subject to a 2,048-pixel atlas dimension,
183
+ 4 MiB per generated file, and 8 MiB per package. Paired densities share a logical layout capped
184
+ at 1,024 pixels per dimension at 1× and 2,048 at 2×. Mixed-size artwork retains matching placements
185
+ without resampling either density. Larger artwork can hit those limits before
186
+ 1,000 icons. Several individually valid sets can exceed the effective map limit; composition
187
+ fails explicitly instead of clipping. Cache and composition do not create Team resources or
188
+ publish anything. Every normal entry point composes declared shared descriptors through this path;
189
+ catalog publication and lock maintenance stay in the `tileflow` CLI, which is the only writer of
190
+ `tileflow.icons.lock.json` and the only caller that resolves `latest`.
191
+
192
+ ## Detailed guides
193
+
194
+ These references are also included under `docs/` in the installed package:
195
+
196
+ - [Native artifact preparation](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/native-artifacts.md): static compatibility, renderer-qualified output, and limitations.
197
+ - [Artifact lifecycle](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/artifact-lifecycle.md): generations, immutable snapshots, provenance, and cleanup.
198
+ - [Local comparison and inspection](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/local-comparison-workbench-and-compiler-inspection.md): workbench controls and preview-only models.
199
+ - [Config diagnostics](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/structured-config-inspection-and-diagnostics.md): bounded, machine-readable inspection.
200
+ - [PMTiles inspection](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/bounded-pmtiles-resource-inspection.md): metadata, sampling limits, and requested properties.
201
+ - [Feature and icon inspection](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/bounded-vector-feature-inspection.md): supported sources, icon compilation, and delivered-pixel hashes.
202
+
203
+ For an installed release, prefer its declarations and packaged guides over newer source on `main`.
204
+
205
+ ## Recolorable icons
206
+
207
+ Declare SDF defaults and optional stretch/content layout in `tileflow.icons.json` beside ordinary artwork. Preparation
208
+ verifies both densities and rejects mixed representations within one symbol layer, including
209
+ fallbacks and local overrides. See [Author recolorable and adaptable icons](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/native-icons.md) for the input profile, diagnostics and recovery.
@@ -0,0 +1,87 @@
1
+ # Third-party notices
2
+
3
+ This file records third-party components used by Node preparation and preview. Official map artwork
4
+ and fonts are owned and published by `@tileflow/maps`; `@tileflow/dev` does not carry an `assets/`
5
+ directory. Runtime dependencies are installed as separate npm packages, and their code and native
6
+ binaries are not copied into the dev package.
7
+
8
+ ## Bitmap distance transform
9
+
10
+ `src/icon-distance.ts` adapts the alpha distance transform from bitmap-sdf 1.0.4 for bounded,
11
+ Node-only sprite preparation. The adaptation removes browser globals and adds input validation.
12
+ Source: <https://github.com/dy/bitmap-sdf>. License: MIT.
13
+
14
+ Copyright 2020 Dmitry Ivanov
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
17
+ associated documentation files (the “Software”), to deal in the Software without restriction,
18
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
19
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all copies or
23
+ substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
26
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
28
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
+
31
+ ## Package-owned map fonts
32
+
33
+ The generic font preparation pipeline reads map-owned TTF, OTF, and WOFF2 directories; it does not
34
+ embed fonts in `@tileflow/dev`. Each source directory must carry its own `LICENSE.txt`, which is
35
+ copied into the deterministic build artifacts whenever that directory contributes a selected face.
36
+
37
+ The source repository's generic font tests retain pinned Oxanium fixtures and their complete
38
+ SIL Open Font License 1.1 notice under `test/fixtures/fonts/oxanium/`. These fixtures are not
39
+ included in the published package. Community map fonts are owned by
40
+ [Community Maps](https://github.com/tileflow/community-maps).
41
+
42
+ ## fontkit 2.0.4
43
+
44
+ Font metadata for TTF, OTF, and WOFF2 inputs is read with the separately installed `fontkit`
45
+ package. fontkit is copyright Devon Govett and contributors and is distributed under the MIT
46
+ License.
47
+
48
+ - Source: <https://github.com/foliojs/fontkit/tree/v2.0.4>
49
+ - License: <https://github.com/foliojs/fontkit/blob/v2.0.4/LICENSE>
50
+
51
+ ## PMTiles JavaScript 4.5.0
52
+
53
+ The local Streets preview loads the separately installed `pmtiles` browser decoder to retrieve
54
+ individual landmark GLB entries with HTTP byte ranges. PMTiles is copyright Protomaps and
55
+ contributors and is distributed under the BSD 3-Clause License. Its `fflate` dependency is
56
+ copyright 2020 Arjun Barrett and is distributed under the MIT License.
57
+
58
+ - PMTiles source and license: <https://github.com/protomaps/PMTiles/tree/v4.5.0/js>
59
+ - fflate source and license: <https://github.com/101arrowz/fflate/tree/v0.8.3>
60
+
61
+ ## sharp 0.35.5
62
+
63
+ `@tileflow/dev` declares `sharp` as an optional dependency and loads it dynamically only when local
64
+ SVG or raster icon sources must be inspected and packed. The Tileflow build externalizes `sharp`
65
+ rather than bundling it. `sharp` is copyright Lovell Fuller and contributors and is distributed under
66
+ the Apache License 2.0.
67
+
68
+ - Source: <https://github.com/lovell/sharp/tree/v0.35.5>
69
+ - License: <https://github.com/lovell/sharp/blob/v0.35.5/LICENSE>
70
+
71
+ ## sharp libvips distributions 1.3.4
72
+
73
+ `sharp` selects a separate optional `@img/sharp-libvips-*` package for the current platform. The
74
+ installed platform-package manifest declares `LGPL-3.0-or-later`; the packaging scripts themselves
75
+ are distributed under Apache-2.0. The packages contain prebuilt libvips and separately licensed
76
+ runtime dependencies. For `sharp` 0.35.5 the selected libvips ABI is 8.18.7.
77
+
78
+ - Packaging source: <https://github.com/lovell/sharp-libvips/tree/v1.3.4>
79
+ - Packaging-script license: <https://github.com/lovell/sharp-libvips/blob/v1.3.4/LICENSE>
80
+ - libvips 8.18.7 source: <https://github.com/libvips/libvips/tree/v8.18.7>
81
+ - libvips 8.18.7 license (LGPL-2.1-or-later):
82
+ <https://github.com/libvips/libvips/blob/v8.18.7/LICENSE>
83
+
84
+ Because `sharp` remains a separately installed optional package, users can install, update, remove,
85
+ or replace it independently of `@tileflow/dev`. Tileflow does not modify libvips and does not place a
86
+ libvips shared library or a `sharp` native addon inside any Tileflow package tarball. Release smoke
87
+ tests enforce that package boundary.