@tileflow/dev 0.1.0-alpha.4 → 0.1.0-alpha.41

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 (45) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +264 -5
  3. package/THIRD_PARTY_NOTICES.md +309 -0
  4. package/dist/artifacts.d.ts +269 -0
  5. package/dist/artifacts.js +98 -0
  6. package/dist/chunk-AQUGMUZW.js +324 -0
  7. package/dist/chunk-C4VPHZ3F.js +4062 -0
  8. package/dist/chunk-D4OE4ITL.js +13 -0
  9. package/dist/chunk-FOMTSCOP.js +671 -0
  10. package/dist/chunk-GXLY73PD.js +3199 -0
  11. package/dist/chunk-KDFTE4Q5.js +156 -0
  12. package/dist/chunk-ONYQNLNA.js +1108 -0
  13. package/dist/chunk-RTU7TD4M.js +172 -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-BIHpw5Zy.d.ts +417 -0
  20. package/dist/icons.d.ts +3 -0
  21. package/dist/icons.js +41 -0
  22. package/dist/inspect.d.ts +149 -0
  23. package/dist/inspect.js +805 -0
  24. package/dist/inspector-browser.js +16955 -0
  25. package/dist/inspector-observer.js +95 -0
  26. package/dist/preview-assets-ATLLYY72.js +103 -0
  27. package/dist/preview.d.ts +31 -0
  28. package/dist/preview.js +1974 -0
  29. package/dist/server.d.ts +89 -0
  30. package/dist/server.js +3662 -0
  31. package/dist/tilesets.d.ts +89 -0
  32. package/dist/tilesets.js +6 -0
  33. package/dist/validation.d.ts +65 -0
  34. package/dist/validation.js +24 -0
  35. package/package.json +77 -13
  36. package/ui-fonts/hubot-sans-OFL.txt +93 -0
  37. package/ui-fonts/hubot-sans.woff2 +0 -0
  38. package/ui-fonts/inter-OFL.txt +92 -0
  39. package/ui-fonts/inter.woff2 +0 -0
  40. package/ui-fonts/jetbrains-mono-OFL.txt +93 -0
  41. package/ui-fonts/jetbrains-mono.woff2 +0 -0
  42. package/ui-fonts/mona-sans-OFL.txt +93 -0
  43. package/ui-fonts/mona-sans.woff2 +0 -0
  44. package/dist/index.d.ts +0 -54
  45. package/dist/index.js +0 -314
@@ -0,0 +1,89 @@
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-BIHpw5Zy.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 = 'single' | '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
+ /** Optional local workflow adapter supplied by the CLI or an embedding server. */
34
+ workbench?: {
35
+ url: string;
36
+ handle: TileflowComparisonRequestHandler;
37
+ };
38
+ };
39
+ /**
40
+ * Compose one or two existing Tileflow dev handlers behind the same-origin Inspector.
41
+ *
42
+ * The side handlers retain ownership of styles, sprites, fonts, generations, live
43
+ * events, and last-known-good behavior. This router owns only the shell document and
44
+ * deterministic dispatch by route prefix.
45
+ */
46
+ declare function createTileflowComparisonRequestHandler(options: TileflowComparisonOptions): (request: Request) => Promise<Response>;
47
+
48
+ type TileflowDevRequestHandlerOptions = {
49
+ apiBaseUrl?: string;
50
+ basePath?: string;
51
+ config?: string;
52
+ cwd?: string;
53
+ inspection?: boolean;
54
+ /** Fit scene previews to their pane; capture retains the declared scene frame. */
55
+ fitViewport?: boolean;
56
+ map?: string;
57
+ onError?: (error: unknown) => void;
58
+ scene?: string;
59
+ session?: TileflowArtifactSession;
60
+ styleBaseUrl?: string;
61
+ theme?: string;
62
+ };
63
+ type TileflowDevRequestHandler = ((request: Request) => Promise<Response>) & {
64
+ close(): Promise<void>;
65
+ refresh(): Promise<void>;
66
+ };
67
+ declare function getTileflowStyleSelection(path: string): {
68
+ mapName: string;
69
+ themeName: string;
70
+ } | undefined;
71
+ declare function getTileflowStyleInspectionSelection(path: string): {
72
+ mapName: string;
73
+ themeName: string;
74
+ } | undefined;
75
+ declare function isTileflowRequestUrl(url: string | undefined, basePath: string): boolean;
76
+ /** Match and strip the configured route base using the same route table as the request handler. */
77
+ declare function getTileflowRequestPath(url: string | undefined, basePath: string): string | null;
78
+ declare function createTileflowNodeRequest(request: IncomingMessage): Request;
79
+ declare function writeTileflowNodeResponse(response: ServerResponse, tileflowResponse: Response): Promise<void>;
80
+ declare function createTileflowDevRequestHandler(options?: TileflowDevRequestHandlerOptions): TileflowDevRequestHandler;
81
+ declare function createTileflowArtifactStatus(state: TileflowArtifactSessionState): {
82
+ schemaVersion: 1;
83
+ generation: number;
84
+ status: "building" | "invalid" | "ready";
85
+ lastGoodGeneration?: number | undefined;
86
+ diagnostics?: TileflowArtifactDiagnostic[] | undefined;
87
+ };
88
+
89
+ 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 };