tileflow 0.1.0-alpha.16 → 0.1.0-alpha.18

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 CHANGED
@@ -23,7 +23,7 @@ executable. With another package manager, use its local-execution command and th
23
23
  do not add a second lockfile or rely on a globally installed CLI.
24
24
 
25
25
  `init` creates a singular `tileflow.config.ts` extending the official Streets map. `preview` opens
26
- Map DevTools with that map, live reload, rendered-feature inspection, compiler attribution, zoom
26
+ Inspector with that map, live reload, rendered-feature inspection, compiler attribution, zoom
27
27
  curves, a sprite atlas, scene selection, saved captures, and before/after review.
28
28
 
29
29
  Local validation, compilation, and asset preparation require no account or API key. Preview and
@@ -56,7 +56,7 @@ workspaces are advanced repository orchestration, not a second application autho
56
56
  Use `describe` for bounded language discovery (`describe themes --json` lists palette requirements
57
57
  and optional time-of-day composition), `inspect` for configuration and data, `capture`
58
58
  for reproducible evidence, and `compare` for saved captures, semantic edits, styles, references or
59
- baselines. `preview` opens Map DevTools. These tools work in independent projects with
59
+ baselines. `preview` opens Inspector. These tools work in independent projects with
60
60
  custom maps and data; official maps are optional.
61
61
 
62
62
  See the [map authoring workflow](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/docs/map-authoring.md)
@@ -69,31 +69,31 @@ it does not implicitly expose a public listener. `--theme <name>` selects a conc
69
69
  `--scene <name>` selects a committed standalone scene.
70
70
 
71
71
  Run `npx tileflow preview` from your project directory to load `tileflow.config.ts`, start the
72
- watched server, and automatically open Map DevTools in your default browser once the server is
72
+ watched server, and automatically open Inspector in your default browser once the server is
73
73
  listening. Use `--config <path>` for another config or `--no-open` to start without opening a tab.
74
74
  `--json` and `--renderer native` also keep the browser closed. The CLI always prints the local URL
75
75
  in ordinary web preview output, so you can open it manually if browser launch is unavailable.
76
76
 
77
- Opening Map DevTools through another loopback name, such as `localhost` instead of `127.0.0.1`,
77
+ Opening Inspector through another loopback name, such as `localhost` instead of `127.0.0.1`,
78
78
  redirects to the **Local** origin printed by the CLI, preserving camera and theme query parameters.
79
79
  This keeps the map, palette controls, and workbench API on the same origin.
80
80
 
81
81
  Run from the project directory and keep selected configs inside it, so capture commands copied from
82
- Map DevTools resolve the same files. The project itself can live anywhere, independently of this SDK.
82
+ Inspector resolve the same files. The project itself can live anywhere, independently of this SDK.
83
83
 
84
- The default is one Map DevTools pane, one watched artifact session, and one map renderer. Choose a
84
+ The default is one Inspector pane, one watched artifact session, and one map renderer. Choose a
85
85
  map, theme or configured scene in **Controls**. Map and theme pickers appear when there are multiple choices. **Compare → Compare live maps** adds a reference from the current
86
86
  project; `--against-*` also supports a reference from another config. The native renderer retains its assets-only
87
87
  preview endpoint.
88
88
 
89
- Compare two configs live in Map DevTools:
89
+ Compare two configs live in Inspector:
90
90
 
91
91
  ```sh
92
92
  npx tileflow preview --config candidate/tileflow.config.ts --against-config reference/tileflow.config.ts
93
93
  ```
94
94
 
95
- Map DevTools shares a camera across side-by-side, split, overlay, or blink views. Its inspector
96
- shows bounded feature and compiler information; invalid edits keep the last valid generation.
95
+ Inspector shares a camera across side-by-side, split, overlay, or blink views. Its inspection panels
96
+ show bounded feature and compiler information; invalid edits keep the last valid generation.
97
97
  **Capture as reference** saves a starting point. After editing, **Capture & compare** reuses its
98
98
  camera and frame to review the change. The selected reference lasts for this browser session.
99
99
 
@@ -112,7 +112,7 @@ npx tileflow inspect session --url http://127.0.0.1:3333 --json
112
112
 
113
113
  Use the origin printed by your running preview. This reads browser observations, including their
114
114
  age and stale flag; exact source lines and token ownership are not inferred. See the
115
- [Map DevTools workflow](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/docs/map-authoring.md#work-with-a-person-and-an-agent)
115
+ [Inspector workflow](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/docs/map-authoring.md#work-with-a-person-and-an-agent)
116
116
  for storage and context bounds.
117
117
 
118
118
  `--api-base-url` or `TILEFLOW_API_URL` changes the API origin used by the official preview sources.
package/dist/index.js CHANGED
@@ -7329,7 +7329,7 @@ function registerModelCommands(program2, dependencies) {
7329
7329
  return emitFailure(
7330
7330
  options.json,
7331
7331
  "no_building_models",
7332
- "No building models were found. A building model is a .glb whose materials name its parts: surface, secondary, glass, accent and roof."
7332
+ "No building models were found. A building model is a .glb whose materials name its parts, such as surface, glass, roof or water; one whose materials name only bark, leaves, fronds or stem is a tree."
7333
7333
  );
7334
7334
  }
7335
7335
  const authority = await resolveTeamAuthority(options, ["models:write"], dependencies);
@@ -7592,7 +7592,7 @@ async function prepareFromPaths(paths) {
7592
7592
  for (const name of selected)
7593
7593
  if (!prepared.buildings[name])
7594
7594
  throw new Error(
7595
- `${display}/${name}.glb is not a building model: its materials must name its parts (surface, secondary, glass, accent, roof).`
7595
+ `${display}/${name}.glb is not a building model: its materials must name its parts, such as surface, glass, roof or water, and not only a tree's.`
7596
7596
  );
7597
7597
  }
7598
7598
  }
@@ -9748,9 +9748,9 @@ function createWorkbenchService(options) {
9748
9748
  if (path === "/capture") {
9749
9749
  const { side: id, generation, name, definition } = captureInput.parse(input);
9750
9750
  if (definition.target?.kind === "application")
9751
- throw new Error("Map DevTools captures require a map scene.");
9751
+ throw new Error("Inspector captures require a map scene.");
9752
9752
  const side = options.sides[id];
9753
- if (!side) throw new Error("Unknown Map DevTools side.");
9753
+ if (!side) throw new Error("Unknown Inspector side.");
9754
9754
  const state = side.session.getState();
9755
9755
  if (state.status !== "ready" || state.generation !== generation)
9756
9756
  return json(
@@ -9807,10 +9807,10 @@ function createWorkbenchService(options) {
9807
9807
  const url = new URL(request.url);
9808
9808
  if (url.origin !== options.origin || request.headers.has("origin") && request.headers.get("origin") !== options.origin || request.headers.get("sec-fetch-site") === "cross-site")
9809
9809
  return json(
9810
- { code: "ORIGIN_MISMATCH", message: "Use Map DevTools from its local origin." },
9810
+ { code: "ORIGIN_MISMATCH", message: "Use Inspector from its local origin." },
9811
9811
  403
9812
9812
  );
9813
- if (closed) return json({ code: "SESSION_CLOSED", message: "Map DevTools has stopped." }, 503);
9813
+ if (closed) return json({ code: "SESSION_CLOSED", message: "Inspector has stopped." }, 503);
9814
9814
  const path = url.pathname.slice(prefix.length);
9815
9815
  try {
9816
9816
  if (request.method === "GET") {
@@ -9863,7 +9863,7 @@ function createWorkbenchService(options) {
9863
9863
  }
9864
9864
  });
9865
9865
  }
9866
- return json({ code: "NOT_FOUND", message: "Unknown Map DevTools endpoint." }, 404);
9866
+ return json({ code: "NOT_FOUND", message: "Unknown Inspector endpoint." }, 404);
9867
9867
  }
9868
9868
  if (request.method !== "POST")
9869
9869
  return json({ code: "METHOD_NOT_ALLOWED", message: "Use GET or POST." }, 405);
@@ -9875,14 +9875,14 @@ function createWorkbenchService(options) {
9875
9875
  const body = await readBody(request);
9876
9876
  if (path === "/context") {
9877
9877
  const { client, ...value } = contextInput.parse(body);
9878
- if (!options.sides[value.side]) throw new Error("Unknown Map DevTools side.");
9878
+ if (!options.sides[value.side]) throw new Error("Unknown Inspector side.");
9879
9879
  contexts.delete(client);
9880
9880
  contexts.set(client, { ...value, updatedAt: (/* @__PURE__ */ new Date()).toISOString() });
9881
9881
  if (contexts.size > 8) contexts.delete(contexts.keys().next().value);
9882
9882
  return json({ saved: true });
9883
9883
  }
9884
9884
  if (path !== "/capture" && path !== "/compare" && path !== "/captures/delete")
9885
- return json({ code: "NOT_FOUND", message: "Unknown Map DevTools action." }, 404);
9885
+ return json({ code: "NOT_FOUND", message: "Unknown Inspector action." }, 404);
9886
9886
  if (pending)
9887
9887
  return json(
9888
9888
  {
@@ -9898,7 +9898,7 @@ function createWorkbenchService(options) {
9898
9898
  pending = void 0;
9899
9899
  }
9900
9900
  } catch (error) {
9901
- const message = error instanceof Error ? error.message : "Map DevTools operation failed.";
9901
+ const message = error instanceof Error ? error.message : "Inspector operation failed.";
9902
9902
  return json({ code: "WORKBENCH_OPERATION_FAILED", message: message.slice(0, 1500) }, 400);
9903
9903
  }
9904
9904
  },
@@ -9922,7 +9922,7 @@ async function readBody(request) {
9922
9922
  bytes += value.byteLength;
9923
9923
  if (bytes > 64 * 1024) {
9924
9924
  await reader.cancel();
9925
- throw new Error("Map DevTools request exceeds 64 KiB.");
9925
+ throw new Error("Inspector request exceeds 64 KiB.");
9926
9926
  }
9927
9927
  chunks.push(value);
9928
9928
  }
@@ -9942,15 +9942,15 @@ function json(value, status = 200) {
9942
9942
  });
9943
9943
  }
9944
9944
  function registerWorkbenchInspection(inspect) {
9945
- inspect.command("session").description("Read the active local Map DevTools context and capabilities").option("--url <origin>", "local Map DevTools origin", "http://127.0.0.1:3333").option("--json", "print the versioned context document").action(async (options) => {
9945
+ inspect.command("session").description("Read the active local Inspector context and capabilities").option("--url <origin>", "local Inspector origin", "http://127.0.0.1:3333").option("--json", "print the versioned context document").action(async (options) => {
9946
9946
  try {
9947
9947
  const url = new URL(options.url);
9948
9948
  if (!["127.0.0.1", "localhost", "[::1]"].includes(url.hostname) || url.protocol !== "http:" || url.username || url.password)
9949
- throw new Error("--url must identify a local Map DevTools HTTP server.");
9949
+ throw new Error("--url must identify a local Inspector HTTP server.");
9950
9950
  const response = await fetch(new URL(`${prefix}/context`, url.origin), {
9951
9951
  signal: AbortSignal.timeout(5e3)
9952
9952
  });
9953
- if (!response.ok) throw new Error(`Map DevTools returned HTTP ${response.status}.`);
9953
+ if (!response.ok) throw new Error(`Inspector returned HTTP ${response.status}.`);
9954
9954
  const document = await response.json();
9955
9955
  console.log(
9956
9956
  JSON.stringify(
@@ -10291,7 +10291,7 @@ program.command("build").description("Generate static Tileflow styles").option("
10291
10291
  printKeyValue("Output", pathLabel(resolve12(process.cwd(), options.out)));
10292
10292
  }
10293
10293
  );
10294
- program.command("preview").description("Open Map DevTools with inspection and optional comparison").option("-c, --config <path>", "config path", defaultConfigPath).option("--against-config <path>", "second config for live comparison in Map DevTools").option("--against-map <name>", "map on the right; defaults to --map").option("--against-scene <name>", "committed standalone scene on the right").option("--against-theme <name>", "concrete theme on the right; defaults to --theme").option("--host <host>", "bind host: an explicit IP address or localhost", defaultTileflowDevHost).option("--map <name>", "preview one configured map").option("--theme <name>", "preview one concrete theme; defaults to the map default").option("--renderer <renderer>", "artifact renderer: web or native", "web").option("-p, --port <port>", "preview port", "3333").option("--no-open", "start Map DevTools without opening the browser").option("--scene <name>", "preview one committed standalone map scene").option(
10294
+ program.command("preview").description("Open Inspector with inspection and optional comparison").option("-c, --config <path>", "config path", defaultConfigPath).option("--against-config <path>", "second config for live comparison in Inspector").option("--against-map <name>", "map on the right; defaults to --map").option("--against-scene <name>", "committed standalone scene on the right").option("--against-theme <name>", "concrete theme on the right; defaults to --theme").option("--host <host>", "bind host: an explicit IP address or localhost", defaultTileflowDevHost).option("--map <name>", "preview one configured map").option("--theme <name>", "preview one concrete theme; defaults to the map default").option("--renderer <renderer>", "artifact renderer: web or native", "web").option("-p, --port <port>", "preview port", "3333").option("--no-open", "start Inspector without opening the browser").option("--scene <name>", "preview one committed standalone map scene").option(
10295
10295
  "--api-base-url <url>",
10296
10296
  "Tileflow API base URL used to resolve official map assets",
10297
10297
  process.env.TILEFLOW_API_URL ?? defaultApiUrl
@@ -10473,7 +10473,7 @@ program.command("preview").description("Open Map DevTools with inspection and op
10473
10473
  previewUrl: workbenchPreviewUrl(previewBasePath, options),
10474
10474
  sidecarUrl: `${previewBasePath}/__inspection/${selectedPreview?.mapName ?? "pending"}/${selectedPreview?.themeName ?? "pending"}.json`
10475
10475
  },
10476
- title: "Tileflow Map DevTools",
10476
+ title: "Tileflow Inspector",
10477
10477
  workbench
10478
10478
  });
10479
10479
  let invalidSinceLastReady = false;
@@ -10543,7 +10543,7 @@ program.command("preview").description("Open Map DevTools with inspection and op
10543
10543
  }
10544
10544
  logMuted("Metro remains the JavaScript development server. Press Ctrl+C to stop.");
10545
10545
  } else {
10546
- logSuccess("Tileflow Map DevTools is running and watching for changes.");
10546
+ logSuccess("Tileflow Inspector is running and watching for changes.");
10547
10547
  printKeyValue("Local", link(origin));
10548
10548
  printKeyValue("Config", pathLabel(options.config));
10549
10549
  if (options.map) printKeyValue("Map", options.map);
@@ -11301,7 +11301,7 @@ async function runTileflowComparisonPreview(options, address) {
11301
11301
  }),
11302
11302
  sidecarUrl: `${rightBasePath}/__inspection/${rightPreview.mapName}/${rightPreview.themeName}.json`
11303
11303
  },
11304
- title: "Tileflow Map DevTools"
11304
+ title: "Tileflow Inspector"
11305
11305
  });
11306
11306
  await new Promise((resolveListening, rejectListening) => {
11307
11307
  const createdServer = serve(
@@ -11317,7 +11317,7 @@ async function runTileflowComparisonPreview(options, address) {
11317
11317
  });
11318
11318
  serverStarted = true;
11319
11319
  if (!options.json) {
11320
- logSuccess("Tileflow Map DevTools is running and watching both configs.");
11320
+ logSuccess("Tileflow Inspector is running and watching both configs.");
11321
11321
  printKeyValue("Local", link(origin));
11322
11322
  printKeyValue("Left", `${leftPreview.label} \xB7 ${pathLabel(options.config)}`);
11323
11323
  printKeyValue("Right", `${rightPreview.label} \xB7 ${pathLabel(rightConfig)}`);
@@ -54,7 +54,7 @@ export default defineMap({
54
54
  cartographic compiler; tooling supplies the exported map ID when it normalizes a scene internally.
55
55
  Every scene stores a concrete theme; omission and browser-only `system` are invalid.
56
56
 
57
- ### Live comparison in Map DevTools
57
+ ### Live comparison in Inspector
58
58
 
59
59
  Use the ordinary preview server with a right-hand selection to compare two maps or themes while
60
60
  authoring:
@@ -71,7 +71,7 @@ npx tileflow preview \
71
71
  --against-config ./reference.config.ts --against-map reference
72
72
  ```
73
73
 
74
- Any `--against-*` option opens Map DevTools in comparison mode. Both previews remain same-origin and share
74
+ Any `--against-*` option opens Inspector in comparison mode. Both previews remain same-origin and share
75
75
  one synchronized camera. The toolbar switches between side-by-side, split, opacity overlay, and
76
76
  blink modes; the selected mode, camera, split, opacity, and active interaction side survive in the
77
77
  URL. Each config has its own watched, last-known-good session, so an invalid edit shows bounded
@@ -81,7 +81,7 @@ Enable **Inspect** and click a rendered feature to see its bounded feature data,
81
81
  zoom-curve samples, and compiler contribution sidecar. The sprite gallery shows the compiled atlas,
82
82
  not source directories. **Copy scene** produces a concrete-theme scene for the current camera and
83
83
  viewport; **Copy command** produces the corresponding capture command. The inspector sidecar exists
84
- only in memory in the local Map DevTools session and is not emitted by `tileflow build`.
84
+ only in memory in the local Inspector session and is not emitted by `tileflow build`.
85
85
 
86
86
  ### Reproducible two-style review
87
87
 
@@ -9,14 +9,14 @@ Discovery and saved-capture comparison also work without a config.
9
9
 
10
10
  Use four primary command groups for map development:
11
11
 
12
- | Command | Purpose |
13
- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |
14
- | `describe` | Discover the generated language and query one domain or schema fragment. |
15
- | `inspect` | Read resolved configuration; `compiled`, `features`, `icons`, and `tileset` inspect output/data; `session` reads Map DevTools context. |
16
- | `capture` | Render reproducible evidence and return a reusable capture ID. |
17
- | `compare` | Compare saved capture IDs; `configs`, `styles`, `reference`, and `baseline` cover other comparisons. |
18
-
19
- `preview` opens Map DevTools. `init`, `validate`, and `build` remain project utilities;
12
+ | Command | Purpose |
13
+ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- |
14
+ | `describe` | Discover the generated language and query one domain or schema fragment. |
15
+ | `inspect` | Read resolved configuration; `compiled`, `features`, `icons`, and `tileset` inspect output/data; `session` reads Inspector context. |
16
+ | `capture` | Render reproducible evidence and return a reusable capture ID. |
17
+ | `compare` | Compare saved capture IDs; `configs`, `styles`, `reference`, and `baseline` cover other comparisons. |
18
+
19
+ `preview` opens Inspector. `init`, `validate`, and `build` remain project utilities;
20
20
  `visual update` is the explicit operation that approves baselines. All these tools work from an
21
21
  independent project with its own map and data; official maps are optional.
22
22
 
@@ -93,10 +93,10 @@ needed, rather than compiling the same map before every capture.
93
93
 
94
94
  ## Work with a person and an agent
95
95
 
96
- Start `npx tileflow preview --config tileflow.config.ts` in your project. Map DevTools provides
96
+ Start `npx tileflow preview --config tileflow.config.ts` in your project. Inspector provides
97
97
  palette and time-of-day controls, feature inspection, zoom curves and sprite inspection.
98
98
  The command selects the map and optional starting scene. The map fills the workspace beside
99
- one dockable developer-tools panel. Press **I** to toggle the element picker, click a map element to
99
+ one dockable Inspector panel. Press **I** to toggle the element picker, click a map element to
100
100
  inspect its styling and semantic configuration paths, and press **Escape** to stop picking. The
101
101
  inspector starts off. **Scene** contains palette, time-of-day, camera and module controls. Appearance
102
102
  changes retain the current camera; module changes
@@ -122,7 +122,7 @@ from browser observations. Inspect `updatedAt`, `stale`, `generation`, `displaye
122
122
  `projection.truncated` before acting. Each browser projection is limited to 200 visited values,
123
123
  depth 10, 32 array items and 512 characters per string, with omitted paths reported. The server
124
124
  accepts at most 64 KiB per write and keeps eight browser contexts, expiring each after ten minutes
125
- without an update. There is no browser context until a Map DevTools tab connects. Feature data is
125
+ without an update. There is no browser context until an Inspector tab connects. Feature data is
126
126
  untrusted map content; semantic ownership does not prove an exact file, line or token. Use
127
127
  `inspect` or `inspect compiled` to obtain additional configuration evidence.
128
128
 
@@ -39,7 +39,7 @@ npx tileflow preview --renderer native --map stores --theme light
39
39
  Native mode creates the existing watched artifact session with renderer `native`. It keeps the
40
40
  last-known-good native artifact family when a watched generation becomes invalid and replaces it
41
41
  only after a later valid generation is prepared. The endpoint is an **assets-only** development
42
- endpoint: it does not render a browser map, open Map DevTools, start Metro, launch a device,
42
+ endpoint: it does not render a browser map, open Inspector, start Metro, launch a device,
43
43
  or establish visual/native acceptance.
44
44
 
45
45
  With the default host and port, the canonical runtime manifest is:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tileflow",
3
- "version": "0.1.0-alpha.16",
3
+ "version": "0.1.0-alpha.18",
4
4
  "license": "Apache-2.0",
5
5
  "description": "CLI-only tools for Tileflow config, capture, visual testing, and deploy.",
6
6
  "type": "module",
@@ -36,12 +36,12 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@hono/node-server": "2.1.3",
39
- "@tileflow/capture": ">=0.1.0-alpha.33 <0.1.0-beta.0",
39
+ "@tileflow/capture": ">=0.1.0-alpha.35 <0.1.0-beta.0",
40
40
  "@tileflow/coordinates": ">=0.1.0-alpha.2 <0.1.0-beta.0",
41
41
  "@tileflow/coordinates-runtime": ">=0.1.0-alpha.5 <0.1.0-beta.0",
42
- "@tileflow/core": ">=0.1.0-alpha.39 <0.1.0-beta.0",
43
- "@tileflow/dev": ">=0.1.0-alpha.36 <0.1.0-beta.0",
44
- "@tileflow/maps": ">=0.1.0-alpha.13 <0.1.0-beta.0",
42
+ "@tileflow/core": ">=0.1.0-alpha.41 <0.1.0-beta.0",
43
+ "@tileflow/dev": ">=0.1.0-alpha.38 <0.1.0-beta.0",
44
+ "@tileflow/maps": ">=0.1.0-alpha.15 <0.1.0-beta.0",
45
45
  "commander": "^15.0.0",
46
46
  "hono": "4.13.13",
47
47
  "picocolors": "^1.1.1",