gtfs-garage-web 0.0.1 → 0.0.3
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 +1 -1
- package/dist/dom.d.ts +2 -3
- package/dist/map.js +3 -3
- package/dist/{mount-Bpr3Nw4_.js → mount-CHJb5mxA.js} +5 -7
- package/dist/mount.js +1 -1
- package/dist/parquet.js +2 -4
- package/dist/react.js +1 -1
- package/dist/sources/parquet.d.ts +2 -4
- package/dist/sources/types.d.ts +3 -3
- package/dist/ui/feed-loader.d.ts +2 -3
- package/dist/ui/feed-metrics.d.ts +4 -5
- package/dist/ui/history.d.ts +3 -3
- package/dist/ui/values.d.ts +2 -3
- package/package.json +1 -1
package/dist/dataset.js
CHANGED
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
|
|
7
|
-
*
|
|
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
|
|
191
|
-
//
|
|
192
|
-
//
|
|
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
|
|
469
|
-
*
|
|
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
|
|
793
|
-
//
|
|
794
|
-
//
|
|
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
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
|
|
132
|
-
*
|
|
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-
|
|
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
|
|
65
|
-
*
|
|
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
|
/**
|
package/dist/sources/types.d.ts
CHANGED
|
@@ -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
|
|
136
|
-
*
|
|
137
|
-
*
|
|
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. */
|
package/dist/ui/feed-loader.d.ts
CHANGED
|
@@ -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
|
|
30
|
-
*
|
|
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
|
|
28
|
-
*
|
|
29
|
-
*
|
|
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
|
|
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[];
|
package/dist/ui/history.d.ts
CHANGED
|
@@ -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`,
|
|
45
|
-
*
|
|
46
|
-
*
|
|
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;
|
package/dist/ui/values.d.ts
CHANGED
|
@@ -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.
|
|
18
|
-
*
|
|
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 {
|