@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.
- package/LICENSE +201 -0
- package/README.md +201 -5
- package/THIRD_PARTY_NOTICES.md +87 -0
- package/dist/artifacts.d.ts +265 -0
- package/dist/artifacts.js +81 -0
- package/dist/chunk-2QXKVQ6O.js +3062 -0
- package/dist/chunk-7C4F6GAX.js +170 -0
- package/dist/chunk-AQUGMUZW.js +324 -0
- package/dist/chunk-D4OE4ITL.js +13 -0
- package/dist/chunk-IR22ZTQW.js +2392 -0
- package/dist/chunk-KDFTE4Q5.js +156 -0
- package/dist/chunk-ONYQNLNA.js +1108 -0
- package/dist/chunk-UTRO4IBQ.js +671 -0
- package/dist/chunk-XHJBCVBB.js +241 -0
- package/dist/config.d.ts +33 -0
- package/dist/config.js +27 -0
- package/dist/fonts.d.ts +47 -0
- package/dist/fonts.js +16 -0
- package/dist/icons.d.ts +339 -0
- package/dist/icons.js +39 -0
- package/dist/inspect.d.ts +149 -0
- package/dist/inspect.js +805 -0
- package/dist/preview-assets-MVUJJ5XR.js +148 -0
- package/dist/preview.d.ts +71 -0
- package/dist/preview.js +2574 -0
- package/dist/server.d.ts +82 -0
- package/dist/server.js +2094 -0
- package/dist/tilesets.d.ts +89 -0
- package/dist/tilesets.js +6 -0
- package/dist/validation.d.ts +65 -0
- package/dist/validation.js +24 -0
- package/docs/artifact-lifecycle.md +152 -0
- package/docs/bounded-pmtiles-resource-inspection.md +21 -0
- package/docs/bounded-vector-feature-inspection.md +100 -0
- package/docs/local-comparison-workbench-and-compiler-inspection.md +227 -0
- package/docs/native-artifacts.md +285 -0
- package/docs/native-icons.md +129 -0
- package/docs/structured-config-inspection-and-diagnostics.md +39 -0
- package/package.json +77 -13
- package/dist/index.d.ts +0 -54
- package/dist/index.js +0 -314
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { TileflowArtifactSession, TileflowArtifactSessionState, TileflowArtifactDiagnostic } from './artifacts.js';
|
|
2
|
+
export { TileflowArtifactAcquisition, TileflowArtifactSessionOptions, createTileflowArtifactDiagnostics, getTileflowAssetBasePath, getTileflowAssetFileName, joinTileflowPublicUrl, normalizeTileflowBasePath, resolveTileflowArtifactPublicUrls, tileflowArtifactSessionSchemaVersion } from './artifacts.js';
|
|
3
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
4
|
+
import '@tileflow/core';
|
|
5
|
+
import '@tileflow/core/build';
|
|
6
|
+
import '@tileflow/core/manifest';
|
|
7
|
+
import '@tileflow/core/native-profile';
|
|
8
|
+
import './icons.js';
|
|
9
|
+
import './config.js';
|
|
10
|
+
|
|
11
|
+
declare const tileflowComparisonSchemaVersion: 1;
|
|
12
|
+
type TileflowComparisonRequestHandler = (request: Request) => Promise<Response> | Response;
|
|
13
|
+
type TileflowComparisonSide = {
|
|
14
|
+
/** Route base owned by this side's existing Tileflow dev handler. */
|
|
15
|
+
basePath: string;
|
|
16
|
+
/** Optional safe cwd-relative config argument used by Copy command. */
|
|
17
|
+
captureConfig?: string;
|
|
18
|
+
handler: TileflowComparisonRequestHandler;
|
|
19
|
+
/** Human-readable local label. It is never interpreted as HTML. */
|
|
20
|
+
label: string;
|
|
21
|
+
/** Optional compiler-inspection sidecar exposed by the owning handler. */
|
|
22
|
+
sidecarUrl?: string;
|
|
23
|
+
/** Same-origin preview URL below basePath, including its map/theme query. */
|
|
24
|
+
previewUrl: string;
|
|
25
|
+
};
|
|
26
|
+
type TileflowComparisonMode = 'blink' | 'overlay' | 'side-by-side' | 'split';
|
|
27
|
+
type TileflowComparisonOptions = {
|
|
28
|
+
basePath?: string;
|
|
29
|
+
initialMode?: TileflowComparisonMode;
|
|
30
|
+
left: TileflowComparisonSide;
|
|
31
|
+
right: TileflowComparisonSide;
|
|
32
|
+
title?: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Compose two existing Tileflow dev handlers behind one same-origin comparison shell.
|
|
36
|
+
*
|
|
37
|
+
* The side handlers retain ownership of styles, sprites, fonts, generations, live
|
|
38
|
+
* events, and last-known-good behavior. This router owns only the shell document and
|
|
39
|
+
* deterministic dispatch by route prefix.
|
|
40
|
+
*/
|
|
41
|
+
declare function createTileflowComparisonRequestHandler(options: TileflowComparisonOptions): (request: Request) => Promise<Response>;
|
|
42
|
+
|
|
43
|
+
type TileflowDevRequestHandlerOptions = {
|
|
44
|
+
apiBaseUrl?: string;
|
|
45
|
+
basePath?: string;
|
|
46
|
+
config?: string;
|
|
47
|
+
cwd?: string;
|
|
48
|
+
inspection?: boolean;
|
|
49
|
+
map?: string;
|
|
50
|
+
onError?: (error: unknown) => void;
|
|
51
|
+
scene?: string;
|
|
52
|
+
session?: TileflowArtifactSession;
|
|
53
|
+
styleBaseUrl?: string;
|
|
54
|
+
theme?: string;
|
|
55
|
+
};
|
|
56
|
+
type TileflowDevRequestHandler = ((request: Request) => Promise<Response>) & {
|
|
57
|
+
close(): Promise<void>;
|
|
58
|
+
refresh(): Promise<void>;
|
|
59
|
+
};
|
|
60
|
+
declare function getTileflowStyleSelection(path: string): {
|
|
61
|
+
mapName: string;
|
|
62
|
+
themeName: string;
|
|
63
|
+
} | undefined;
|
|
64
|
+
declare function getTileflowStyleInspectionSelection(path: string): {
|
|
65
|
+
mapName: string;
|
|
66
|
+
themeName: string;
|
|
67
|
+
} | undefined;
|
|
68
|
+
declare function isTileflowRequestUrl(url: string | undefined, basePath: string): boolean;
|
|
69
|
+
/** Match and strip the configured route base using the same route table as the request handler. */
|
|
70
|
+
declare function getTileflowRequestPath(url: string | undefined, basePath: string): string | null;
|
|
71
|
+
declare function createTileflowNodeRequest(request: IncomingMessage): Request;
|
|
72
|
+
declare function writeTileflowNodeResponse(response: ServerResponse, tileflowResponse: Response): Promise<void>;
|
|
73
|
+
declare function createTileflowDevRequestHandler(options?: TileflowDevRequestHandlerOptions): TileflowDevRequestHandler;
|
|
74
|
+
declare function createTileflowArtifactStatus(state: TileflowArtifactSessionState): {
|
|
75
|
+
schemaVersion: 1;
|
|
76
|
+
generation: number;
|
|
77
|
+
status: "building" | "invalid" | "ready";
|
|
78
|
+
lastGoodGeneration?: number | undefined;
|
|
79
|
+
diagnostics?: TileflowArtifactDiagnostic[] | undefined;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export { TileflowArtifactDiagnostic, TileflowArtifactSession, TileflowArtifactSessionState, type TileflowComparisonMode, type TileflowComparisonOptions, type TileflowComparisonRequestHandler, type TileflowComparisonSide, type TileflowDevRequestHandler, type TileflowDevRequestHandlerOptions, createTileflowArtifactStatus, createTileflowComparisonRequestHandler, createTileflowDevRequestHandler, createTileflowNodeRequest, getTileflowRequestPath, getTileflowStyleInspectionSelection, getTileflowStyleSelection, isTileflowRequestUrl, tileflowComparisonSchemaVersion, writeTileflowNodeResponse };
|