@tileflow/dev 0.1.0-alpha.25 → 0.1.0-alpha.26
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 +16 -5
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/dist/artifacts.d.ts +32 -5
- package/dist/artifacts.js +4 -2
- package/dist/{chunk-MKPSQSMX.js → chunk-73YPFDPC.js} +1 -1
- package/dist/{chunk-D2QWYYIF.js → chunk-EJPVUSX4.js} +242 -22
- package/dist/{chunk-W3X2JXYS.js → chunk-QAMFAM3S.js} +1168 -35
- package/dist/{chunk-3WCEHA27.js → chunk-UCBGTEQV.js} +1 -1
- package/dist/{chunk-LNCTVFUD.js → chunk-XHJBCVBB.js} +6 -1
- package/dist/icons.d.ts +10 -2
- package/dist/icons.js +3 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +9 -5
- package/dist/inspect.js +2 -2
- package/dist/server.d.ts +1 -0
- package/dist/server.js +3 -3
- package/dist/validation.d.ts +2 -0
- package/dist/validation.js +1 -1
- package/docs/local-comparison-workbench-and-compiler-inspection.md +6 -5
- package/docs/native-artifacts.md +258 -0
- package/docs/native-icons.md +129 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -103,6 +103,9 @@ export async function createMapHandler() {
|
|
|
103
103
|
The caller mounts `fetch` in its server and calls `close()` on shutdown. This factory does not open
|
|
104
104
|
a listener. Sessions follow config imports and local asset inputs, retain the last good generation
|
|
105
105
|
after invalid edits, and publish structured state changes through `subscribe()`.
|
|
106
|
+
Watching follows aliased working directories, including newly created or removed icon metadata.
|
|
107
|
+
A single startup consistency check complements ordinary watcher notifications; no recurring scan
|
|
108
|
+
is added.
|
|
106
109
|
|
|
107
110
|
`getState()` and `getLastGoodArtifacts()` return borrowed synchronous views. Before asynchronous
|
|
108
111
|
work, call `acquireArtifacts(generation?)` and release the acquisition in `finally`. A replaced
|
|
@@ -169,17 +172,19 @@ and atomic rename. A conflicting writer fails without overwriting pins. An inter
|
|
|
169
172
|
the previous complete lock intact; remove a stale `.writing` guard only after confirming that its
|
|
170
173
|
writer has exited. Ordinary reads and Core validation never acquire write guards.
|
|
171
174
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
A package supports up to 1,000 effective icons, subject to a 2,048-pixel atlas dimension,
|
|
176
|
+
4 MiB per generated file, and 8 MiB per package. Larger artwork can hit those limits before
|
|
177
|
+
1,000 icons. Several individually valid sets can exceed the effective map limit; composition
|
|
178
|
+
fails explicitly instead of clipping. Cache and composition do not create Team resources or
|
|
179
|
+
publish anything. Every normal entry point composes declared shared descriptors through this path;
|
|
180
|
+
catalog publication and lock maintenance stay in the `tileflow` CLI, which is the only writer of
|
|
177
181
|
`tileflow.icons.lock.json` and the only caller that resolves `latest`.
|
|
178
182
|
|
|
179
183
|
## Detailed guides
|
|
180
184
|
|
|
181
185
|
These references are also included under `docs/` in the installed package:
|
|
182
186
|
|
|
187
|
+
- [Native artifact preparation](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/native-artifacts.md): static compatibility, renderer-qualified output, and limitations.
|
|
183
188
|
- [Artifact lifecycle](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/artifact-lifecycle.md): generations, immutable snapshots, provenance, and cleanup.
|
|
184
189
|
- [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.
|
|
185
190
|
- [Config diagnostics](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/structured-config-inspection-and-diagnostics.md): bounded, machine-readable inspection.
|
|
@@ -187,3 +192,9 @@ These references are also included under `docs/` in the installed package:
|
|
|
187
192
|
- [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.
|
|
188
193
|
|
|
189
194
|
For an installed release, prefer its declarations and packaged guides over newer source on `main`.
|
|
195
|
+
|
|
196
|
+
## Recolorable icons
|
|
197
|
+
|
|
198
|
+
Declare SDF defaults and optional stretch/content layout in `tileflow.icons.json` beside ordinary artwork. Preparation
|
|
199
|
+
verifies both densities and rejects mixed representations within one symbol layer, including
|
|
200
|
+
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.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -5,6 +5,29 @@ and fonts are owned and published by `@tileflow/maps`; `@tileflow/dev` does not
|
|
|
5
5
|
directory. Runtime dependencies are installed as separate npm packages, and their code and native
|
|
6
6
|
binaries are not copied into the dev package.
|
|
7
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
|
+
|
|
8
31
|
## Package-owned map fonts
|
|
9
32
|
|
|
10
33
|
The generic font preparation pipeline reads map-owned TTF, OTF, and WOFF2 directories; it does not
|
package/dist/artifacts.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TileflowBuildCatalog, TileflowBuildStyles, TileflowMapBuildManifestV1, TileflowStyleInspection, TileflowMapBuildProvenanceV1, TileflowPreparedMapAssets } from '@tileflow/core/build';
|
|
1
|
+
import { MapLibreStyle, TileflowViewConfig, TileflowStyleOptions } from '@tileflow/core';
|
|
2
|
+
import { TileflowBuildCatalog, TileflowBuildStyles, TileflowMapBuildManifestV1, TileflowRendererDeploymentArtifact, TileflowStyleInspection, TileflowMapBuildProvenanceV1, TileflowPreparedMapAssets } from '@tileflow/core/build';
|
|
3
3
|
import { TileflowRuntimeManifest } from '@tileflow/core/manifest';
|
|
4
|
-
import {
|
|
4
|
+
import { TileflowRenderer, TileflowNativeBuildRecord } from '@tileflow/core/native-profile';
|
|
5
|
+
import { TileflowBuildAsset, TileflowIconResolutionOptions, PreparedTileflowBuildCatalog, TileflowSourceCatalog, PreparedTileflowCatalog } from './icons.js';
|
|
5
6
|
export { defaultTileflowConfigPath } from './config.js';
|
|
6
7
|
|
|
7
8
|
type TileflowLocalTilesetFile = Readonly<{
|
|
@@ -28,6 +29,10 @@ type TileflowArtifactDiagnostic = {
|
|
|
28
29
|
message: string;
|
|
29
30
|
path: string;
|
|
30
31
|
phase?: string;
|
|
32
|
+
renderer?: 'native';
|
|
33
|
+
profile?: 'native-v1';
|
|
34
|
+
severity?: 'error';
|
|
35
|
+
suggestion?: string;
|
|
31
36
|
};
|
|
32
37
|
type TileflowArtifactSessionState = {
|
|
33
38
|
status: 'building';
|
|
@@ -67,6 +72,24 @@ type TileflowArtifactSession = {
|
|
|
67
72
|
};
|
|
68
73
|
declare function createTileflowArtifactDiagnostics(error: unknown, cwd: string): TileflowArtifactDiagnostic[];
|
|
69
74
|
|
|
75
|
+
type Input = Readonly<{
|
|
76
|
+
mapId: string;
|
|
77
|
+
buildManifest: TileflowMapBuildManifestV1;
|
|
78
|
+
styles: Readonly<Record<string, MapLibreStyle>>;
|
|
79
|
+
teamSources: Readonly<Record<string, Readonly<{
|
|
80
|
+
tileset: string;
|
|
81
|
+
type: 'raster' | 'vector';
|
|
82
|
+
}>>>;
|
|
83
|
+
assets: readonly TileflowBuildAsset[];
|
|
84
|
+
view?: TileflowViewConfig;
|
|
85
|
+
}>;
|
|
86
|
+
/**
|
|
87
|
+
* Prepare both representations from the same already compiled, asset-bound web family.
|
|
88
|
+
* This has no network or publication port. Call it before any authenticated remote operation.
|
|
89
|
+
* Logical Hosted placeholders are validated syntactically without granting delivery authority.
|
|
90
|
+
*/
|
|
91
|
+
declare function prepareTileflowHostedNativeDeployment(input: Input): Promise<TileflowRendererDeploymentArtifact>;
|
|
92
|
+
|
|
70
93
|
/** Normalize a development route base. This is a URL pathname, never a filesystem path. */
|
|
71
94
|
declare function normalizeTileflowBasePath(value?: string): string;
|
|
72
95
|
/**
|
|
@@ -105,6 +128,8 @@ type TileflowBuildArtifactsOptions = {
|
|
|
105
128
|
* offline behavior, trusted delivery origins and the transport used to hydrate exact pins.
|
|
106
129
|
*/
|
|
107
130
|
icons?: TileflowIconResolutionOptions;
|
|
131
|
+
/** Artifact renderer. Omission is identical to web; native uses a separate output directory. */
|
|
132
|
+
renderer?: TileflowRenderer;
|
|
108
133
|
/** Build a memory-only compiler sidecar for local authoring tools. */
|
|
109
134
|
inspection?: boolean;
|
|
110
135
|
styleBaseUrl?: string;
|
|
@@ -116,6 +141,8 @@ type TileflowBuildStyleInspections = Record<string, Record<string, TileflowStyle
|
|
|
116
141
|
type TileflowBuildArtifacts = {
|
|
117
142
|
assets: TileflowBuildAsset[];
|
|
118
143
|
buildManifest: TileflowMapBuildManifestV1;
|
|
144
|
+
/** Present only for native artifact preparation; never part of the runtime manifest. */
|
|
145
|
+
nativeBuild?: TileflowNativeBuildRecord;
|
|
119
146
|
/** Releases local immutable snapshot references owned by this artifact generation. */
|
|
120
147
|
dispose?: () => Promise<void>;
|
|
121
148
|
manifest: TileflowRuntimeManifest;
|
|
@@ -145,7 +172,7 @@ type TileflowArtifactPlan = TileflowBuildArtifacts & {
|
|
|
145
172
|
schemaVersion: typeof tileflowArtifactPlanSchemaVersion;
|
|
146
173
|
sourceProject: TileflowSourceCatalog;
|
|
147
174
|
};
|
|
148
|
-
type CreateTileflowArtifactPlanOptions = Pick<TileflowBuildArtifactsOptions, 'apiBaseUrl' | 'assetBaseUrl' | 'inspection' | 'styleBaseUrl' | 'target'> & {
|
|
175
|
+
type CreateTileflowArtifactPlanOptions = Pick<TileflowBuildArtifactsOptions, 'apiBaseUrl' | 'assetBaseUrl' | 'inspection' | 'renderer' | 'styleBaseUrl' | 'target'> & {
|
|
149
176
|
inputFiles?: readonly string[];
|
|
150
177
|
};
|
|
151
178
|
type WriteTileflowArtifactPlanOptions = {
|
|
@@ -195,4 +222,4 @@ declare function assertTileflowSelfHostedManifestTarget(manifestPath: string, op
|
|
|
195
222
|
overwriteHostedManifest?: boolean;
|
|
196
223
|
}): Promise<void>;
|
|
197
224
|
|
|
198
|
-
export { type CreateTileflowArtifactPlanOptions, PreparedTileflowBuildCatalog, PreparedTileflowCatalog, type TileflowArtifactAcquisition, type TileflowArtifactDiagnostic, type TileflowArtifactFile, type TileflowArtifactInputGraph, type TileflowArtifactPlan, type TileflowArtifactSession, type TileflowArtifactSessionOptions, type TileflowArtifactSessionState, type TileflowBuildArtifacts, type TileflowBuildArtifactsOptions, TileflowBuildAsset, type TileflowBuildStyleInspections, TileflowHostedManifestOverwriteError, TileflowIconResolutionOptions, type TileflowLocalTilesetFile, TileflowLocalTilesetProductionError, type TileflowManifestOptions, TileflowSourceCatalog, type WriteTileflowArtifactPlanOptions, type WriteTileflowBuildArtifactsOptions, assertNoLocalTilesetsForProduction, assertTileflowSelfHostedManifestTarget, createTileflowArtifactDiagnostics, createTileflowArtifactPlan, createTileflowArtifactSession, createTileflowBuildArtifacts, createTileflowBuildProvenance, createTileflowManifest, createTileflowStyle, createTileflowStyles, disposeTileflowBuildArtifacts, getTileflowArtifactFiles, getTileflowAssetBasePath, getTileflowAssetFileName, getTileflowWatchPaths, isTileflowArtifactInputPath, joinTileflowPublicUrl, normalizeTileflowBasePath, prepareTileflowLocalTilesets, refreshTileflowArtifactSession, resolveTileflowArtifactPublicUrls, tileflowArtifactInventoryFileName, tileflowArtifactPlanSchemaVersion, tileflowArtifactSessionSchemaVersion, writeTileflowArtifactPlan, writeTileflowBuildArtifacts };
|
|
225
|
+
export { type CreateTileflowArtifactPlanOptions, PreparedTileflowBuildCatalog, PreparedTileflowCatalog, type TileflowArtifactAcquisition, type TileflowArtifactDiagnostic, type TileflowArtifactFile, type TileflowArtifactInputGraph, type TileflowArtifactPlan, type TileflowArtifactSession, type TileflowArtifactSessionOptions, type TileflowArtifactSessionState, type TileflowBuildArtifacts, type TileflowBuildArtifactsOptions, TileflowBuildAsset, type TileflowBuildStyleInspections, TileflowHostedManifestOverwriteError, TileflowIconResolutionOptions, type TileflowLocalTilesetFile, TileflowLocalTilesetProductionError, type TileflowManifestOptions, TileflowSourceCatalog, type WriteTileflowArtifactPlanOptions, type WriteTileflowBuildArtifactsOptions, assertNoLocalTilesetsForProduction, assertTileflowSelfHostedManifestTarget, createTileflowArtifactDiagnostics, createTileflowArtifactPlan, createTileflowArtifactSession, createTileflowBuildArtifacts, createTileflowBuildProvenance, createTileflowManifest, createTileflowStyle, createTileflowStyles, disposeTileflowBuildArtifacts, getTileflowArtifactFiles, getTileflowAssetBasePath, getTileflowAssetFileName, getTileflowWatchPaths, isTileflowArtifactInputPath, joinTileflowPublicUrl, normalizeTileflowBasePath, prepareTileflowHostedNativeDeployment, prepareTileflowLocalTilesets, refreshTileflowArtifactSession, resolveTileflowArtifactPublicUrls, tileflowArtifactInventoryFileName, tileflowArtifactPlanSchemaVersion, tileflowArtifactSessionSchemaVersion, writeTileflowArtifactPlan, writeTileflowBuildArtifacts };
|
package/dist/artifacts.js
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
getTileflowArtifactFiles,
|
|
16
16
|
getTileflowWatchPaths,
|
|
17
17
|
isTileflowArtifactInputPath,
|
|
18
|
+
prepareTileflowHostedNativeDeployment,
|
|
18
19
|
prepareTileflowLocalTilesets,
|
|
19
20
|
refreshTileflowArtifactSession,
|
|
20
21
|
tileflowArtifactInventoryFileName,
|
|
@@ -22,7 +23,7 @@ import {
|
|
|
22
23
|
tileflowArtifactSessionSchemaVersion,
|
|
23
24
|
writeTileflowArtifactPlan,
|
|
24
25
|
writeTileflowBuildArtifacts
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QAMFAM3S.js";
|
|
26
27
|
import "./chunk-ONYQNLNA.js";
|
|
27
28
|
import {
|
|
28
29
|
getTileflowAssetBasePath,
|
|
@@ -31,7 +32,7 @@ import {
|
|
|
31
32
|
normalizeTileflowBasePath,
|
|
32
33
|
resolveTileflowArtifactPublicUrls
|
|
33
34
|
} from "./chunk-UTRO4IBQ.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-EJPVUSX4.js";
|
|
35
36
|
import "./chunk-7C4F6GAX.js";
|
|
36
37
|
import "./chunk-KDFTE4Q5.js";
|
|
37
38
|
import {
|
|
@@ -60,6 +61,7 @@ export {
|
|
|
60
61
|
isTileflowArtifactInputPath,
|
|
61
62
|
joinTileflowPublicUrl,
|
|
62
63
|
normalizeTileflowBasePath,
|
|
64
|
+
prepareTileflowHostedNativeDeployment,
|
|
63
65
|
prepareTileflowLocalTilesets,
|
|
64
66
|
refreshTileflowArtifactSession,
|
|
65
67
|
resolveTileflowArtifactPublicUrls,
|