@mailwoman/map-tui 9.4.0 → 10.1.0

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 (60) hide show
  1. package/README.md +5 -6
  2. package/{lib/cli-args.ts → cli/args.ts} +49 -28
  3. package/{lib/cli.ts → cli/main.ts} +13 -24
  4. package/lib/browser.ts +33 -76
  5. package/lib/frame.ts +50 -28
  6. package/lib/input.ts +46 -69
  7. package/lib/mercator.ts +13 -12
  8. package/lib/mvt.ts +2 -2
  9. package/lib/raster.ts +53 -27
  10. package/lib/renderer.ts +19 -38
  11. package/lib/style.ts +21 -15
  12. package/lib/tile-source.ts +30 -19
  13. package/out/browser.d.ts +24 -33
  14. package/out/browser.d.ts.map +1 -1
  15. package/out/browser.js +27 -72
  16. package/out/browser.js.map +1 -1
  17. package/out/{cli-args.d.ts → cli/args.d.ts} +19 -9
  18. package/out/cli/args.d.ts.map +1 -0
  19. package/out/{cli-args.js → cli/args.js} +42 -26
  20. package/out/cli/args.js.map +1 -0
  21. package/out/{cli.d.ts → cli/main.d.ts} +1 -1
  22. package/out/cli/main.d.ts.map +1 -0
  23. package/out/{cli.js → cli/main.js} +14 -25
  24. package/out/cli/main.js.map +1 -0
  25. package/out/cli/tsconfig.tsbuildinfo +1 -0
  26. package/out/frame.d.ts +40 -23
  27. package/out/frame.d.ts.map +1 -1
  28. package/out/frame.js +48 -26
  29. package/out/frame.js.map +1 -1
  30. package/out/input.d.ts +18 -36
  31. package/out/input.d.ts.map +1 -1
  32. package/out/input.js +37 -63
  33. package/out/input.js.map +1 -1
  34. package/out/mercator.d.ts +12 -11
  35. package/out/mercator.d.ts.map +1 -1
  36. package/out/mercator.js +4 -10
  37. package/out/mercator.js.map +1 -1
  38. package/out/mvt.js +2 -2
  39. package/out/raster.d.ts +45 -23
  40. package/out/raster.d.ts.map +1 -1
  41. package/out/raster.js +44 -22
  42. package/out/raster.js.map +1 -1
  43. package/out/renderer.d.ts +6 -7
  44. package/out/renderer.d.ts.map +1 -1
  45. package/out/renderer.js +13 -22
  46. package/out/renderer.js.map +1 -1
  47. package/out/style.d.ts +17 -11
  48. package/out/style.d.ts.map +1 -1
  49. package/out/style.js +11 -9
  50. package/out/style.js.map +1 -1
  51. package/out/tile-source.d.ts +12 -8
  52. package/out/tile-source.d.ts.map +1 -1
  53. package/out/tile-source.js +21 -14
  54. package/out/tile-source.js.map +1 -1
  55. package/out/tsconfig.test.tsbuildinfo +1 -1
  56. package/package.json +35 -83
  57. package/out/cli-args.d.ts.map +0 -1
  58. package/out/cli-args.js.map +0 -1
  59. package/out/cli.d.ts.map +0 -1
  60. package/out/cli.js.map +0 -1
package/out/browser.js CHANGED
@@ -3,21 +3,6 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  */
6
- /**
7
- * The interactive map browser — a full-screen, alternate-screen terminal app over `MapRenderer`.
8
- *
9
- * `MapBrowser` owns exactly three things the frame-first library deliberately does not: terminal MODE (alternate
10
- * screen, hidden cursor, raw stdin, mouse reporting), viewport STATE (center, zoom, drag anchor), and the write path.
11
- * Frames still come from `MapRenderer.renderFrame` as values; `blitFrame` copies one into an `AsciifyTerminal`, whose
12
- * damage diff decides what actually goes down the wire.
13
- *
14
- * The pane is the terminal minus its bottom row, which is the status bar. `AsciifyTerminal` is told that size and never
15
- * addresses a cell outside it, so the two writers never fight over a cell.
16
- *
17
- * Every mode change made in {@link MapBrowser.start} is undone by {@link MapBrowser.restore}, which is idempotent so a
18
- * signal handler, an `exit` hook and the normal path can all call it. A terminal left in raw mode with mouse reporting
19
- * on is not a recoverable shell, so restore is the one operation that must survive any exit path.
20
- */
21
6
  import { errorMessage } from "@mailwoman/core/errors/schema";
22
7
  import { clamp } from "@mailwoman/core/numeric";
23
8
  import { AsciifyTerminal, cursorTo, SGR_RESET } from "@sister.software/asciify/tui";
@@ -32,40 +17,28 @@ const CURSOR_SHOW = "\u001B[?25h";
32
17
  const CLEAR_SCREEN = "\u001B[2J";
33
18
  const CLEAR_LINE = "\u001B[2K";
34
19
  const REVERSE_VIDEO = "\u001B[7m";
35
- /**
36
- * Rows reserved at the bottom of the terminal for the status bar.
37
- */
38
20
  const STATUS_BAR_ROWS = 1;
39
- /**
40
- * Size assumed when the output reports none. A pty opened without a window size (util-linux `script`, some CI
41
- * harnesses) reports 0 columns and 0 rows, which is neither an error nor a usable grid.
42
- */
43
21
  const FALLBACK_COLUMNS = 80;
44
22
  const FALLBACK_ROWS = 24;
45
23
  /**
46
- * Floor on the pane's dimensions. Below this the renderer is being asked for a grid too small to mean anything, and a
47
- * zero-sized one would divide by zero in the projection.
24
+ * A zero-sized pane would divide by zero in the projection.
48
25
  */
49
26
  const MIN_COLUMNS = 4;
50
27
  const MIN_PANE_ROWS = 1;
51
- /**
52
- * How much of the pane one arrow-key press travels. An eighth is far enough to feel like progress at a keystroke and
53
- * short enough that the next frame still overlaps the last.
54
- */
55
28
  const PAN_FRACTION = 0.125;
56
- /**
57
- * Web-Mercator's latitude cutoff — the projection is undefined at the poles, and the square tile pyramid ends here.
58
- */
59
29
  const MERCATOR_LATITUDE_LIMIT = 85.05112878;
60
30
  const COORDINATE_DIGITS = 4;
61
31
  /**
62
- * Clips a string to a cell budget, counting codepoints — the status bar's arrows are one cell each but two UTF-16
63
- * units, and `String.prototype.slice` would split one in half.
32
+ * Code-point counts keep `slice` from splitting a surrogate pair.
64
33
  */
65
34
  function clipToCells(text, cells) {
66
35
  const codePoints = Array.from(text);
67
36
  return codePoints.length <= cells ? text : codePoints.slice(0, cells).join("");
68
37
  }
38
+ /**
39
+ * A full-screen terminal map browser built on `MapRenderer` that owns terminal modes,
40
+ * viewport state and output, leaving the bottom row as a status bar.
41
+ */
69
42
  export class MapBrowser {
70
43
  source;
71
44
  renderer;
@@ -85,9 +58,8 @@ export class MapBrowser {
85
58
  error = null;
86
59
  resolveExit = null;
87
60
  /**
88
- * The trailing bytes of the last chunk that could not be decoded yet — a sequence the kernel split across two reads.
89
- * Threading it back through `decodeInputChunk` is what keeps a split mouse report from being read as an Esc keypress
90
- * (which used to quit); the decoder itself stays pure.
61
+ * The next `decodeInputChunk` call receives trailing bytes from an incomplete escape sequence
62
+ * so a mouse report split across reads does not decode as an Esc keypress.
91
63
  */
92
64
  pendingInput = "";
93
65
  onData = (chunk) => {
@@ -118,8 +90,8 @@ export class MapBrowser {
118
90
  });
119
91
  }
120
92
  /**
121
- * Runs until the user quits, resolving with the process exit code (0 for a normal quit, 130 for Ctrl+C). The terminal
122
- * is restored before this resolves.
93
+ * Runs until the user quits, resolving with the exit code (0 for a normal quit, 130 for Ctrl+C)
94
+ * after the terminal is restored.
123
95
  */
124
96
  async run() {
125
97
  this.start();
@@ -130,8 +102,8 @@ export class MapBrowser {
130
102
  return code;
131
103
  }
132
104
  /**
133
- * Asks the browser to exit with a code. Safe to call from a signal handler, and a no-op once an exit is already under
134
- * way.
105
+ * Asks the browser to exit with a code, ignoring calls after the first
106
+ * so that a signal handler may call it.
135
107
  */
136
108
  requestExit(code) {
137
109
  const resolve = this.resolveExit;
@@ -140,9 +112,6 @@ export class MapBrowser {
140
112
  this.resolveExit = null;
141
113
  resolve(code);
142
114
  }
143
- /**
144
- * Enters the alternate screen and takes over input. Paired with {@link restore}.
145
- */
146
115
  start() {
147
116
  if (this.started)
148
117
  return;
@@ -156,10 +125,6 @@ export class MapBrowser {
156
125
  this.measure();
157
126
  this.scheduleRender();
158
127
  }
159
- /**
160
- * Puts the terminal back exactly as it was found. Idempotent: the normal exit path, a signal handler and a
161
- * process-level `exit` hook may each call it.
162
- */
163
128
  restore() {
164
129
  if (!this.started || this.restored)
165
130
  return;
@@ -197,8 +162,8 @@ export class MapBrowser {
197
162
  this.scheduleRender();
198
163
  }
199
164
  /**
200
- * Moves the center by a cell delta, through world pixels so the step is the same distance on screen at every latitude
201
- * — the naive degrees-per-keypress version crawls at the equator and sprints near the poles.
165
+ * Moves the center by a cell delta in world pixels, so one step covers the
166
+ * same screen distance at every latitude.
202
167
  */
203
168
  panByCells(columns, rows) {
204
169
  const center = lonLatToWorldPx(this.centerLon, this.centerLat, this.zoom);
@@ -209,9 +174,6 @@ export class MapBrowser {
209
174
  this.centerLon = wrapLongitude(lon);
210
175
  this.centerLat = clamp(lat, -MERCATOR_LATITUDE_LIMIT, MERCATOR_LATITUDE_LIMIT);
211
176
  }
212
- /**
213
- * Longitude/latitude at the center of a pane cell.
214
- */
215
177
  cellToLonLat(column, row) {
216
178
  const center = lonLatToWorldPx(this.centerLon, this.centerLat, this.zoom);
217
179
  const originX = center.x - (this.columns * SUBPIXEL_COLUMNS_PER_CELL) / 2;
@@ -219,8 +181,7 @@ export class MapBrowser {
219
181
  return worldPxToLonLat(originX + column * SUBPIXEL_COLUMNS_PER_CELL + SUBPIXEL_COLUMNS_PER_CELL / 2, originY + row * SUBPIXEL_ROWS_PER_CELL + SUBPIXEL_ROWS_PER_CELL / 2, this.zoom);
220
182
  }
221
183
  /**
222
- * Zooms one or more whole levels. With an anchor cell (the wheel's pointer), the center shifts so whatever was under
223
- * the pointer stays under it; without one, the pane center holds.
184
+ * Zooms by whole levels, shifting the center so the point under an anchor cell stays under it.
224
185
  */
225
186
  zoomBy(delta, anchor) {
226
187
  const next = clamp(this.zoom + delta, this.source.minZoom, this.source.maxZoom);
@@ -257,8 +218,8 @@ export class MapBrowser {
257
218
  };
258
219
  }
259
220
  /**
260
- * Pans relative to where the drag STARTED, not the previous motion report. Accumulating per-report deltas would
261
- * drift, since each one is rounded to a whole cell.
221
+ * Pans relative to the drag's starting point, because summing per-report deltas
222
+ * would drift as each report is rounded to a whole cell.
262
223
  */
263
224
  continueDrag(column, row) {
264
225
  const anchor = this.drag;
@@ -271,27 +232,22 @@ export class MapBrowser {
271
232
  this.scheduleRender();
272
233
  }
273
234
  /**
274
- * A press and release with no motion between them is a click, which centers the map — mapscii's behavior, and the
275
- * reason centering waits for the release rather than acting on the press.
235
+ * A press and release without motion counts as a click that centers the map on the clicked cell.
276
236
  */
277
237
  endDrag() {
278
238
  const anchor = this.drag;
279
239
  this.drag = null;
280
240
  if (!anchor || anchor.moved)
281
241
  return;
282
- // A wheel event between press and release moved the map out from under the click, so the cell no longer names
283
- // the place the user pointed at.
242
+ // A zoom between press and release means the cell no longer covers the point the user clicked.
284
243
  if (anchor.zoom !== this.zoom)
285
244
  return;
286
245
  const target = this.cellToLonLat(anchor.column, anchor.row);
287
246
  this.setCenter(target.lon, target.lat);
288
247
  this.scheduleRender();
289
248
  }
290
- /**
291
- * Reads the terminal's size and re-sizes the pane around the status bar.
292
- */
293
249
  measure() {
294
- // `||` and not `??`: a pty with no window size reports 0, which is as unusable as absent.
250
+ // The `||` operator also replaces the 0 that a pty without a window size reports.
295
251
  const columns = Math.floor(this.output.columns || FALLBACK_COLUMNS);
296
252
  const rows = Math.floor(this.output.rows || FALLBACK_ROWS);
297
253
  this.columns = Math.max(MIN_COLUMNS, columns);
@@ -299,8 +255,8 @@ export class MapBrowser {
299
255
  this.terminal.setSize(this.columns, this.paneRows);
300
256
  }
301
257
  /**
302
- * Requests a frame. Renders never overlap: a request arriving mid-render is coalesced into one more pass, so a held
303
- * arrow key queues a single redraw rather than a backlog of them.
258
+ * Requests a frame, collapsing requests that arrive during a render into one
259
+ * follow-up so renders never overlap.
304
260
  */
305
261
  scheduleRender() {
306
262
  if (this.renderInFlight) {
@@ -331,12 +287,10 @@ export class MapBrowser {
331
287
  };
332
288
  try {
333
289
  const frame = await this.renderer.renderFrame(viewport);
334
- // The terminal may have been restored while the tiles were in flight; writing then would paint over the
335
- // user's shell.
290
+ // A write after restore would draw over the user's shell.
336
291
  if (this.restored)
337
292
  return;
338
- // A resize between the request and now leaves the frame the wrong shape for the pane — drop it and let the
339
- // resize's own render answer instead.
293
+ // A resize during the render makes this frame the wrong shape and schedules its own render.
340
294
  if (frame.columns !== this.columns || frame.rows !== this.paneRows)
341
295
  return;
342
296
  this.error = null;
@@ -360,11 +314,12 @@ export class MapBrowser {
360
314
  if (!attribution.length)
361
315
  return status;
362
316
  const credited = `${status} © ${attribution}`;
363
- // Attribution is a courtesy to the tile source, never a reason to push the controls off the bar.
317
+ // The attribution is dropped when it would push the controls off the bar.
364
318
  return Array.from(credited).length < this.columns ? credited : status;
365
319
  }
366
320
  drawStatusBar(attribution) {
367
- // One cell short of the width: writing the bottom-right cell leaves some terminals in a pending-wrap state.
321
+ // The line stops one cell short because writing the bottom-right cell leaves
322
+ // some terminals in a pending-wrap state.
368
323
  const width = Math.max(0, this.columns - 1);
369
324
  const line = clipToCells(this.statusText(attribution), width).padEnd(width);
370
325
  this.output.write(`${cursorTo(0, this.paneRows)}${CLEAR_LINE}${REVERSE_VIDEO}${line}${SGR_RESET}`);
@@ -1 +1 @@
1
- {"version":3,"file":"browser.js","sourceRoot":"","sources":["../lib/browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAEnF,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAoB,aAAa,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACxF,OAAO,EACN,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACtB,eAAe,EACf,aAAa,GACb,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAGvC,MAAM,gBAAgB,GAAG,eAAe,CAAA;AACxC,MAAM,eAAe,GAAG,eAAe,CAAA;AACvC,MAAM,WAAW,GAAG,aAAa,CAAA;AACjC,MAAM,WAAW,GAAG,aAAa,CAAA;AACjC,MAAM,YAAY,GAAG,WAAW,CAAA;AAChC,MAAM,UAAU,GAAG,WAAW,CAAA;AAC9B,MAAM,aA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C,KAAK;YAAE,OAAO,KAAK,IAAI,CAAC,KAAK,UAAU,CAAA;QAEhD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;QACrD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;QACrD,MAAM,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,IAAI,CAAC,IAAI,8BAA8B,CAAA;QAExE,IAAI,CAAC,WAAW,CAAC,MAAM;YAAE,OAAO,MAAM,CAAA;QAEtC,MAAM,QAAQ,GAAG,GAAG,MAAM,OAAO,WAAW,EAAE,CAAA;QAE9C,0EAA0E;QAC1E,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAA;IACtE,CAAC;IAEO,aAAa,CAAC,WAAmB;QACxC,6EAA6E;QAC7E,0CAA0C;QAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAA;QAC3C,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAE3E,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,UAAU,GAAG,aAAa,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,CAAA;IACnG,CAAC;CACD"}
@@ -10,8 +10,10 @@ export interface BrowseArgs {
10
10
  lat: number;
11
11
  lon: number;
12
12
  /**
13
- * Integer zoom level. The renderer draws whole tile-pyramid levels, so a fractional flag value is rounded here rather
14
- * than carried as a lie through the viewport.
13
+ * Integer zoom level.
14
+ *
15
+ * The renderer draws whole tile-pyramid levels, so a fractional flag value is rounded here
16
+ * rather than preserved as a lie through the viewport.
15
17
  */
16
18
  zoom: number;
17
19
  }
@@ -21,27 +23,35 @@ export type CLIArgs = {
21
23
  mode: "version";
22
24
  } | BrowseArgs;
23
25
  /**
24
- * A rejected command line. The message is user-facing: it says what was wrong AND what to pass instead, since the bin
25
- * prints it verbatim to stderr.
26
+ * A rejected command line.
27
+ *
28
+ * The message is user-facing: it explains what was wrong and what to pass instead,
29
+ * since the bin prints it verbatim to stderr.
26
30
  */
27
31
  export declare class CLIArgsError extends Error {
28
32
  name: string;
29
33
  }
30
34
  /**
31
- * Environment keys the CLI reads. Passed in rather than read here so the parser stays pure.
35
+ * Environment keys the CLI reads.
36
+ *
37
+ * Passed in rather than read here so the parser stays pure.
32
38
  */
33
39
  export interface CLIEnvironment {
34
40
  MAILWOMAN_TILES?: string | undefined;
35
41
  }
36
42
  /**
37
- * `--help` output. It doubles as the package's key reference, so the bindings listed here and the ones ./input.ts
38
- * decodes are the same list said twice — a key added there without a line here is a key nobody finds.
43
+ * `--help` output.
44
+ *
45
+ * It doubles as the package's key reference, so the bindings listed here
46
+ * and the ones ./input.ts decodes are the same list said twice.
47
+ * A key added there without a line here is missing from CLI help.
39
48
  */
40
49
  export declare const HELP_TEXT = "map-tui \u2014 the whole world in your terminal\n\nUsage\n npx @mailwoman/map-tui --tiles <archive.pmtiles> [options]\n\nOptions\n --tiles <path|url> PMTiles archive \u2014 local path or https:// URL (default: $MAILWOMAN_TILES)\n --lat <degrees> Initial center latitude, -90..90 (default: 0)\n --lon <degrees> Initial center longitude, -180..180 (default: 0)\n --zoom <level> Initial zoom, 0..24 (default: 2)\n -h, --help Print this help and exit\n -v, --version Print the package version and exit\n\nKeys\n arrows, hjkl Pan\n +, =, a Zoom in\n -, _, z Zoom out\n q, Esc, Ctrl+C Quit\n\nMouse\n Wheel zooms toward the pointer, drag pans, click centers.\n\nTiles are never bundled with this package. Download a planet or region\narchive from https://protomaps.com/downloads and point --tiles at it.\n";
41
50
  /**
42
51
  * Parses a `map-tui` command line.
43
52
  *
44
- * @throws {CLIArgsError} On an unknown flag, an unparseable or out-of-range number, or a missing archive path.
53
+ * @throws {CLIArgsError} On an unknown flag, an unparseable or out-of-range number,
54
+ * or a missing archive path.
45
55
  */
46
56
  export declare function parseCLIArgs(argv: readonly string[], environment?: CLIEnvironment): CLIArgs;
47
- //# sourceMappingURL=cli-args.d.ts.map
57
+ //# sourceMappingURL=args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../cli/args.ts"],"names":[],"mappings":"AA0DA;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,QAAQ,CAAA;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG,UAAU,CAAA;AAEzE;;;;;GAKG;AACH,qBAAa,YAAa,SAAQ,KAAK;IAC7B,IAAI,SAAiB;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,+1BAwBrB,CAAA;AA8FD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,WAAW,GAAE,cAAmB,GAAG,OAAO,CAuB/F"}
@@ -1,4 +1,5 @@
1
1
  import { errorMessage } from "@mailwoman/core/errors/schema";
2
+ import { stringifyJSON } from "@mailwoman/core/json";
2
3
  import { parseArguments } from "@mailwoman/core/scripting/arguments";
3
4
  /**
4
5
  * @copyright Sister Software.
@@ -8,9 +9,12 @@ import { parseArguments } from "@mailwoman/core/scripting/arguments";
8
9
  /**
9
10
  * Argument parsing for the `map-tui` bin.
10
11
  *
11
- * `parseCLIArgs` is pure: it takes the argv slice and an environment record, and answers with a discriminated result
12
- * (`help` / `version` / `browse`) or throws {@link CLIArgsError}. Reading `process.argv` / `process.env` is the bin's
13
- * job (./cli.ts), which keeps every rejection path testable without a subprocess.
12
+ * `parseCLIArgs` is pure.
13
+ * It takes the argv array and an environment record, then returns a discriminated
14
+ * result (`help` / `version` / `browse`) or throws {@link CLIArgsError}.
15
+ *
16
+ * The bin (`./cli.ts`) reads `process.argv` and `process.env`.
17
+ * This keeps every rejection path testable without a subprocess.
14
18
  */
15
19
  /**
16
20
  * Center longitude when `--lon` is omitted — the world view mapscii opens on.
@@ -21,8 +25,8 @@ const DEFAULT_LON = 0;
21
25
  */
22
26
  const DEFAULT_LAT = 0;
23
27
  /**
24
- * Zoom when `--zoom` is omitted. z2 shows a full hemisphere in a typical terminal, so a planet archive opens on
25
- * something recognizable rather than a single ocean tile.
28
+ * Zoom when `--zoom` is omitted. z2 shows a full hemisphere in a typical terminal,
29
+ * so a planet archive opens on something recognizable rather than a single ocean tile.
26
30
  */
27
31
  const DEFAULT_ZOOM = 2;
28
32
  /**
@@ -30,27 +34,34 @@ const DEFAULT_ZOOM = 2;
30
34
  */
31
35
  const MIN_ZOOM = 0;
32
36
  /**
33
- * Deepest zoom the Web-Mercator tile pyramid is defined for. The archive's own `maxZoom` clamps further at runtime;
34
- * this is only the range a flag value must fall inside to be meaningful at all.
37
+ * Deepest zoom the Web-Mercator tile pyramid is defined for.
38
+ *
39
+ * The archive's own `maxZoom` clamps further at runtime.
40
+ * This is only the range a flag value must fall inside to be meaningful at all.
35
41
  */
36
42
  const MAX_ZOOM = 24;
37
- // True geographic bounds, not Web-Mercator's ±85.05113: the flag accepts any real latitude, and the browser clamps
38
- // the CENTER to the projection's MERCATOR_LATITUDE_LIMIT itself (see ./browser.ts) — rejecting 87 here would refuse a
39
- // value the viewport handles fine.
43
+ // The flag accepts any real latitude.
44
+ // The browser clamps the center to the projection's MERCATOR_LATITUDE_LIMIT (see ./browser.ts) —
45
+ // rejecting 87 here would refuse a value the viewport handles fine.
40
46
  const MIN_LAT = -90;
41
47
  const MAX_LAT = 90;
42
48
  const MIN_LON = -180;
43
49
  const MAX_LON = 180;
44
50
  /**
45
- * A rejected command line. The message is user-facing: it says what was wrong AND what to pass instead, since the bin
46
- * prints it verbatim to stderr.
51
+ * A rejected command line.
52
+ *
53
+ * The message is user-facing: it explains what was wrong and what to pass instead,
54
+ * since the bin prints it verbatim to stderr.
47
55
  */
48
56
  export class CLIArgsError extends Error {
49
57
  name = "CLIArgsError";
50
58
  }
51
59
  /**
52
- * `--help` output. It doubles as the package's key reference, so the bindings listed here and the ones ./input.ts
53
- * decodes are the same list said twice — a key added there without a line here is a key nobody finds.
60
+ * `--help` output.
61
+ *
62
+ * It doubles as the package's key reference, so the bindings listed here
63
+ * and the ones ./input.ts decodes are the same list said twice.
64
+ * A key added there without a line here is missing from CLI help.
54
65
  */
55
66
  export const HELP_TEXT = `map-tui — the whole world in your terminal
56
67
 
@@ -78,15 +89,15 @@ Tiles are never bundled with this package. Download a planet or region
78
89
  archive from https://protomaps.com/downloads and point --tiles at it.
79
90
  `;
80
91
  /**
81
- * Reads one numeric flag, rejecting anything `Number` would quietly accept as garbage (empty string, whitespace,
82
- * `Infinity`) as well as out-of-range values.
92
+ * Reads one numeric flag, rejecting anything `Number` would quietly accept as garbage
93
+ * (empty string, whitespace, `Infinity`) as well as out-of-range values.
83
94
  */
84
95
  function numericFlag(name, raw, fallback, min, max) {
85
96
  if (raw == null)
86
97
  return fallback;
87
98
  const value = Number(raw.trim());
88
99
  if (!Number.isFinite(value) || !raw.trim().length) {
89
- throw new CLIArgsError(`--${name} expects a number, got ${JSON.stringify(raw)}`);
100
+ throw new CLIArgsError(`--${name} expects a number, got ${stringifyJSON(raw)}`);
90
101
  }
91
102
  if (value < min || value > max) {
92
103
  throw new CLIArgsError(`--${name} must be between ${min} and ${max}, got ${value}`);
@@ -94,16 +105,20 @@ function numericFlag(name, raw, fallback, min, max) {
94
105
  return value;
95
106
  }
96
107
  /**
97
- * Flags whose value is a number, and may therefore start with a dash.
108
+ * Flags with numeric values.
109
+ * Their values may start with a dash.
98
110
  */
99
111
  const NUMERIC_FLAGS = new Set(["--lat", "--lon", "--zoom"]);
100
112
  /**
101
113
  * Joins `--lon -122.6` into `--lon=-122.6` before `parseArgs` sees it.
102
114
  *
103
- * `node:util`'s parser refuses a separate value that starts with a dash — it cannot tell a negative number from a
104
- * mistyped flag, and says so ("argument is ambiguous"). Half the planet has a negative longitude, so the space-form has
105
- * to work. The join is conditional on the next token parsing as a finite number, which leaves a genuinely missing value
106
- * (`--lon --zoom 3`) to `parseArgs` and its own error.
115
+ * `node:util`'s parser refuses a separate value that starts with a dash.
116
+ * It reports "argument is ambiguous" because a negative number can resemble a mistyped flag.
117
+ *
118
+ * Half the planet has a negative longitude, so the space-form has to work.
119
+ *
120
+ * The join occurs only when the next token parses as a finite number.
121
+ * `parseArgs` then handles a missing value such as `--lon --zoom 3` and returns its own error.
107
122
  */
108
123
  function joinNegativeNumbers(argv) {
109
124
  const joined = [];
@@ -120,8 +135,8 @@ function joinNegativeNumbers(argv) {
120
135
  return joined;
121
136
  }
122
137
  /**
123
- * `node:util`'s own rejections (unknown flag, missing value) name the flag but not the remedy, so they're re-thrown as
124
- * a {@link CLIArgsError} pointing at `--help`.
138
+ * `node:util`'s own rejections (unknown flag, missing value) name the flag but not the action,
139
+ * so they're re-thrown as a {@link CLIArgsError} pointing at `--help`.
125
140
  */
126
141
  function readFlags(argv) {
127
142
  try {
@@ -147,7 +162,8 @@ function readFlags(argv) {
147
162
  /**
148
163
  * Parses a `map-tui` command line.
149
164
  *
150
- * @throws {CLIArgsError} On an unknown flag, an unparseable or out-of-range number, or a missing archive path.
165
+ * @throws {CLIArgsError} On an unknown flag, an unparseable or out-of-range number,
166
+ * or a missing archive path.
151
167
  */
152
168
  export function parseCLIArgs(argv, environment = {}) {
153
169
  const values = readFlags(argv);
@@ -168,4 +184,4 @@ export function parseCLIArgs(argv, environment = {}) {
168
184
  zoom: Math.round(numericFlag("zoom", values.zoom, DEFAULT_ZOOM, MIN_ZOOM, MAX_ZOOM)),
169
185
  };
170
186
  }
171
- //# sourceMappingURL=cli-args.js.map
187
+ //# sourceMappingURL=args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.js","sourceRoot":"","sources":["../../cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAEpE;;;;GAIG;AAEH;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,WAAW,GAAG,CAAC,CAAA;AAErB;;GAEG;AACH,MAAM,WAAW,GAAG,CAAC,CAAA;AAErB;;;GAGG;AACH,MAAM,YAAY,GAAG,CAAC,CAAA;AAEtB;;GAEG;AACH,MAAM,QAAQ,GAAG,CAAC,CAAA;AAElB;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,EAAE,CAAA;AAEnB,sCAAsC;AACtC,iGAAiG;AACjG,oEAAoE;AACpE,MAAM,OAAO,GAAG,CAAC,EAAE,CAAA;AACnB,MAAM,OAAO,GAAG,EAAE,CAAA;AAClB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAA;AACpB,MAAM,OAAO,GAAG,GAAG,CAAA;AAwBnB;;;;;GAKG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IAC7B,IAAI,GAAG,cAAc,CAAA;CAC9B;AAWD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;iEAOwC,WAAW;oEACR,WAAW;oCAC3C,QAAQ,KAAK,QAAQ,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AAM,EAAE,CAAA;IAExC,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;IAE9C,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,WAAW,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;IAExE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACnB,MAAM,IAAI,YAAY,CACrB,2EAA2E;YAC1E,6DAA6D,CAC9D,CAAA;IACF,CAAC;IAED,OAAO;QACN,IAAI,EAAE,QAAQ;QACd,KAAK;QACL,GAAG,EAAE,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC;QAClE,GAAG,EAAE,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC;QAClE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;KACpF,CAAA;AACF,CAAC"}
@@ -5,4 +5,4 @@
5
5
  * @author Teffen Ellis, et al.
6
6
  */
7
7
  export {};
8
- //# sourceMappingURL=cli.d.ts.map
8
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../cli/main.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}
@@ -5,33 +5,26 @@
5
5
  * @author Teffen Ellis, et al.
6
6
  */
7
7
  /**
8
- * The `map-tui` bin — `npx @mailwoman/map-tui` opens a PMTiles archive as a full-screen terminal map.
8
+ * Opens a PMTiles archive as a full-screen terminal map through the `map-tui` binary.
9
9
  *
10
- * This file owns everything process-shaped so the rest of the package stays testable without one: argv and the
11
- * environment (parsed by ./cli-args.ts), the archive handle, signal handlers, and the exit code. `MapBrowser` takes
12
- * streams rather than reaching for `process` itself, which is what lets the PTY smoke test drive the real bin and a
13
- * unit test drive the parser with neither.
14
- *
15
- * Signal handling is not optional here. This is a raw-mode app on the alternate screen with mouse reporting on, and
16
- * there is no framework underneath to put any of that back — a process killed between `start` and `restore` leaves the
17
- * user with an unusable shell. So `restore` is wired to SIGINT, SIGTERM and `exit`, and it is idempotent for exactly
18
- * that reason.
10
+ * This file is the only place in the package that touches `process`.
11
+ * It restores the terminal on SIGINT, SIGTERM and `exit`, because a process killed
12
+ * while in raw mode leaves the shell unusable.
19
13
  */
20
14
  import { errorMessage } from "@mailwoman/core/errors/schema";
21
15
  import { createRequire } from "@mailwoman/core/module/resolvers";
22
16
  import { MapBrowser } from "#browser";
23
- import { CLIArgsError, HELP_TEXT, parseCLIArgs } from "#cli-args";
17
+ import { CLIArgsError, HELP_TEXT, parseCLIArgs } from "#cli/args";
24
18
  import { TileSource } from "#tile-source";
25
19
  /**
26
20
  * Exit code for a command line that could not be parsed.
27
21
  */
28
22
  const EXIT_USAGE = 1;
29
23
  /**
30
- * Reads the package's own version.
24
+ * Reads the package version.
31
25
  *
32
- * Self-reference (`@mailwoman/map-tui/...`, which the package's `exports` publishes) rather than a path relative to
33
- * this file: the bin runs from `out/` when installed and from the workspace root in development, and only the package
34
- * graph knows which. `createRequire` parses the JSON itself, so no reader here has to.
26
+ * The package self-reference resolves correctly both from the installed `out/`
27
+ * directory and from the workspace.
35
28
  */
36
29
  function readVersion() {
37
30
  const require = createRequire(import.meta.url);
@@ -39,7 +32,7 @@ function readVersion() {
39
32
  return manifest.version ?? "0.0.0";
40
33
  }
41
34
  /**
42
- * Opens the archive, translating the filesystem's error into something that names the flag that was wrong.
35
+ * Opens the tile archive and reports a failure as a usage error that mentions `--tiles`.
43
36
  */
44
37
  async function openTiles(path) {
45
38
  try {
@@ -51,7 +44,7 @@ async function openTiles(path) {
51
44
  }
52
45
  }
53
46
  /**
54
- * Runs the interactive browser against an already-open archive, resolving with its exit code.
47
+ * Runs the interactive browser on an open archive and resolves with its exit code.
55
48
  */
56
49
  async function browse(source, args) {
57
50
  const browser = new MapBrowser({
@@ -80,11 +73,8 @@ async function browse(source, args) {
80
73
  async function main() {
81
74
  let args;
82
75
  try {
83
- /**
84
- * `parseCLIArgs` keeps argv and the environment read on this one line, and nowhere else in the package —
85
- * `@mailwoman/core/env`'s typed readers would pull core's data-backed environment schema behind a CLI whose whole
86
- * premise is `npx`, so the bin passes the raw records to the pure parser instead.
87
- */
76
+ // The bin reads raw argv and env here because `@mailwoman/core/env` depends on core's data-backed schema,
77
+ // Core's data-backed schema is too heavy for an `npx` entry point.
88
78
  // oxlint-disable-next-line sister-software/no-process-globals -- see above.
89
79
  args = parseCLIArgs(process.argv.slice(2), process.env);
90
80
  }
@@ -103,8 +93,7 @@ async function main() {
103
93
  return 0;
104
94
  }
105
95
  let opened;
106
- // A bad `--tiles` path is a usage error, not a crash — the guard stays around the open, and ownership passes to the
107
- // `using` declaration only once the open succeeded.
96
+ // The `using` declaration takes ownership only after the open succeeds.
108
97
  try {
109
98
  opened = await openTiles(args.tiles);
110
99
  }
@@ -116,4 +105,4 @@ async function main() {
116
105
  return await browse(source, args);
117
106
  }
118
107
  process.exitCode = await main();
119
- //# sourceMappingURL=cli.js.map
108
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../cli/main.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAgB,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;GAEG;AACH,M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