gtfs-garage-web 0.0.1 → 0.0.2

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/dist/dataset.js CHANGED
@@ -1,4 +1,4 @@
1
- import { m as h, p as L } from "./mount-Bpr3Nw4_.js";
1
+ import { m as h, p as L } from "./mount-CHJb5mxA.js";
2
2
  function P(e, s) {
3
3
  const { description: a, canPrepare: n, asked: c, phrase: f } = s;
4
4
  switch (e.state) {
package/dist/dom.d.ts CHANGED
@@ -3,9 +3,8 @@
3
3
  * Element lookup scoped to one viewer.
4
4
  *
5
5
  * Every lookup goes through a root rather than `document`, so two viewers can
6
- * exist on one page without reaching into each other's markup. That is what a
7
- * host embedding this needs: the UI used to resolve 37 fixed ids against the
8
- * whole document, which silently assumed it was the only thing on the page.
6
+ * exist on one page without reaching into each other's markup, and a viewer
7
+ * embedded in a host cannot match the host's own elements.
9
8
  */
10
9
  export interface Dom {
11
10
  el<T extends HTMLElement = HTMLElement>(name: string): T;
package/dist/map.js CHANGED
@@ -187,9 +187,9 @@ class w {
187
187
  center: [0, 20],
188
188
  zoom: 1,
189
189
  attributionControl: { compact: !0 },
190
- // `buildStyle` composes the style from the basemap and this viewer's own
191
- // layers and is covered by layers.test.ts; it is typed as a plain record
192
- // rather than against MapLibre, which until now was an untyped global.
190
+ // `buildStyle` composes the basemap with this viewer's own layers and is
191
+ // covered by layers.test.ts; it is typed as a plain record, not against
192
+ // MapLibre.
193
193
  style: a
194
194
  }), this.map.addControl(new this.maplibregl.NavigationControl(), "top-right"), this.map.addControl(new this.maplibregl.ScaleControl()), this.map.on("click", "stops", (o) => {
195
195
  const s = o.features[0].properties;
@@ -465,9 +465,8 @@ class ge {
465
465
  /**
466
466
  * Poll the server for the load's phase until it is told to stop.
467
467
  *
468
- * Only answerable at all because the load runs in a worker thread; while it
469
- * sat on the event loop no other request could be served, which is why a big
470
- * feed looked like a hung page.
468
+ * Only answerable because the load runs in a worker thread: on the event
469
+ * loop it would block every other request, including this poll.
471
470
  */
472
471
  pollProgress(e) {
473
472
  let t = !1;
@@ -789,10 +788,9 @@ function Ue(n, e) {
789
788
  case "FLOAT":
790
789
  case "CURRENCY_AMOUNT":
791
790
  return _e(n, E(e), e);
792
- // TIME has a pattern and so is checked above, but is deliberately not
793
- // reformatted: GTFS times legitimately exceed 24:00:00 for trips running
794
- // past midnight, and a formatter that "corrected" 25:30:00 would be worse
795
- // than none.
791
+ // TIME is checked by its pattern above but never reformatted: GTFS times
792
+ // legitimately exceed 24:00:00 for trips running past midnight, so
793
+ // 25:30:00 is correct as written.
796
794
  default:
797
795
  return y(n);
798
796
  }
package/dist/mount.js CHANGED
@@ -1,4 +1,4 @@
1
- import { R as s, b as a, a as e, m } from "./mount-Bpr3Nw4_.js";
1
+ import { R as s, b as a, a as e, m } from "./mount-CHJb5mxA.js";
2
2
  export {
3
3
  s as RestSource,
4
4
  a as browserHistory,
package/dist/parquet.js CHANGED
@@ -128,10 +128,8 @@ class O {
128
128
  /**
129
129
  * The table list an exported dataset carries, if it carries one.
130
130
  *
131
- * `gtfs-garage --export` writes a manifest beside the Parquet so a reader
132
- * need not guess. Without it the only fallback is trying all 32 tables GTFS
133
- * defines, which for a seven-table feed measured at 123 requests before the
134
- * first row appeared.
131
+ * `gtfs-garage --export` writes it beside the Parquet. Absent, the only
132
+ * fallback is probing every table GTFS defines.
135
133
  */
136
134
  async fromManifest() {
137
135
  const i = performance.now();
package/dist/react.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
2
  import { useRef as c, useEffect as i } from "react";
3
3
  import { mountDataset as m } from "./dataset.js";
4
- import { m as d } from "./mount-Bpr3Nw4_.js";
4
+ import { m as d } from "./mount-CHJb5mxA.js";
5
5
  function p({ className: l, style: u, ...e }) {
6
6
  const o = c(null), n = c(e);
7
7
  return n.current = e, i(() => {
@@ -61,10 +61,8 @@ export declare class ParquetSource implements ViewerSource {
61
61
  /**
62
62
  * The table list an exported dataset carries, if it carries one.
63
63
  *
64
- * `gtfs-garage --export` writes a manifest beside the Parquet so a reader
65
- * need not guess. Without it the only fallback is trying all 32 tables GTFS
66
- * defines, which for a seven-table feed measured at 123 requests before the
67
- * first row appeared.
64
+ * `gtfs-garage --export` writes it beside the Parquet. Absent, the only
65
+ * fallback is probing every table GTFS defines.
68
66
  */
69
67
  private fromManifest;
70
68
  /**
@@ -132,9 +132,9 @@ export interface LoadMetrics {
132
132
  }[];
133
133
  /**
134
134
  * The fields below describe a server load, and are absent for a source that
135
- * did not perform one. A browser reading Parquet never downloaded, unzipped
136
- * or converted anything, and a zero here would claim the work took no time
137
- * rather than that it never happened - which is what `phases` exists for.
135
+ * did not perform one. A browser reading Parquet never downloads, unzips or
136
+ * converts, and a zero would say that work took no time instead of that it
137
+ * did not happen. Such a source reports `phases` above.
138
138
  */
139
139
  kind?: "path" | "upload" | "folder" | "download";
140
140
  /** Downloading or receiving the upload; null for a local path. */
@@ -26,9 +26,8 @@ export declare class FeedLoader {
26
26
  /**
27
27
  * Poll the server for the load's phase until it is told to stop.
28
28
  *
29
- * Only answerable at all because the load runs in a worker thread; while it
30
- * sat on the event loop no other request could be served, which is why a big
31
- * feed looked like a hung page.
29
+ * Only answerable because the load runs in a worker thread: on the event
30
+ * loop it would block every other request, including this poll.
32
31
  */
33
32
  private pollProgress;
34
33
  private load;
@@ -24,17 +24,16 @@ export interface FileRow {
24
24
  stored: string;
25
25
  /**
26
26
  * What this file cost: converting it, or counting it when the feed was left
27
- * as CSV. One number rather than two, because the two the report used to show
28
- * were measured against different storage - the header read happens on the
29
- * CSV before conversion and the row count on the Parquet after it - so
30
- * reading them side by side told you nothing.
27
+ * as CSV. One number, not both: the header read happens on the CSV before
28
+ * conversion and the row count on the Parquet after it, so they are measured
29
+ * against different storage and do not compare.
31
30
  */
32
31
  costMs: string;
33
32
  rows: string;
34
33
  columns: number;
35
34
  }
36
35
  /**
37
- * Largest file first: the point of the report is to name the file that
36
+ * Largest file first, so the report names the file that
38
37
  * dominated the load, and on a real feed that is almost always stop_times.txt.
39
38
  */
40
39
  export declare function fileRows(metrics: LoadMetrics): FileRow[];
@@ -41,8 +41,8 @@ export declare function browserHistory(): HistoryPort;
41
41
  /**
42
42
  * A back stack the viewer keeps to itself, for an embedded one.
43
43
  *
44
- * Nothing here touches the URL or `window`, which is the point: the host stays
45
- * in charge of its own address bar, and can still mirror the view there by
46
- * listening for view changes if it wants to.
44
+ * Nothing here touches the URL or `window`, so the host keeps control of its
45
+ * own address bar, and can still mirror the view there by listening for view
46
+ * changes.
47
47
  */
48
48
  export declare function memoryHistory(initial?: View | null): HistoryPort;
@@ -14,9 +14,8 @@
14
14
  * to rendering rather than to loading.
15
15
  *
16
16
  * 2. **A feed is untrusted input.** Only `http:`, `https:` and `mailto:` ever
17
- * become a link; anything else is text. Before this module, no feed value
18
- * was ever used as an `href`, so links are a new attack surface and
19
- * `javascript:` in a URL field must not survive it.
17
+ * become a link; anything else is text. A feed value reaching an `href` is
18
+ * an attack surface, so `javascript:` in a URL field must not survive it.
20
19
  */
21
20
  import type { ColumnInfo } from "../sources/types";
22
21
  export interface Rendered {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtfs-garage-web",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Browse a GTFS feed: a mountable viewer with a table, filters and a map.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",