@tangledwires/uk-station-data 1.0.4 → 1.2.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.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./line";
2
2
  export * from "./station";
3
+ export * from "./toc";
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./line";
2
2
  export * from "./station";
3
+ export * from "./toc";
package/dist/line.d.ts CHANGED
@@ -1,9 +1,11 @@
1
+ import { TOCId } from "./toc";
1
2
  /**
2
3
  * A train line
3
4
  */
4
5
  export type Line = {
5
6
  displayName: string;
6
7
  colour: string;
8
+ toc: TOCId;
7
9
  };
8
10
  /**
9
11
  * A list of all {@link Line}s
@@ -12,86 +14,112 @@ export declare const Lines: {
12
14
  readonly bakerloo: {
13
15
  readonly displayName: "Bakerloo";
14
16
  readonly colour: "#a45a2a";
17
+ readonly toc: "tfl";
15
18
  };
16
19
  readonly central: {
17
20
  readonly displayName: "Central";
18
21
  readonly colour: "#da291c";
22
+ readonly toc: "tfl";
19
23
  };
20
24
  readonly circle: {
21
25
  readonly displayName: "Circle";
22
26
  readonly colour: "#ffcd00";
27
+ readonly toc: "tfl";
23
28
  };
24
29
  readonly district: {
25
30
  readonly displayName: "District";
26
31
  readonly colour: "#007a33";
32
+ readonly toc: "tfl";
27
33
  };
28
34
  readonly hammersmithAndCity: {
29
35
  readonly displayName: "Hammersmith & City";
30
36
  readonly colour: "#e89cae";
37
+ readonly toc: "tfl";
31
38
  };
32
39
  readonly jubilee: {
33
40
  readonly displayName: "Jubilee";
34
41
  readonly colour: "#7c878e";
42
+ readonly toc: "tfl";
35
43
  };
36
44
  readonly metropolitan: {
37
45
  readonly displayName: "Metropolitan";
38
46
  readonly colour: "#840b55";
47
+ readonly toc: "tfl";
39
48
  };
40
49
  readonly northern: {
41
50
  readonly displayName: "Northern";
42
51
  readonly colour: "#000000";
52
+ readonly toc: "tfl";
43
53
  };
44
54
  readonly piccadilly: {
45
55
  readonly displayName: "Piccadilly";
46
56
  readonly colour: "#10069f";
57
+ readonly toc: "tfl";
47
58
  };
48
59
  readonly victoria: {
49
60
  readonly displayName: "Victoria";
50
61
  readonly colour: "#00a3e0";
62
+ readonly toc: "tfl";
51
63
  };
52
64
  readonly waterlooAndCity: {
53
65
  readonly displayName: "Waterloo & City";
54
66
  readonly colour: "#6eceb2";
67
+ readonly toc: "tfl";
55
68
  };
56
69
  readonly elizabeth: {
57
70
  readonly displayName: "Elizabeth Line";
58
71
  readonly colour: "#6950a1";
72
+ readonly toc: "tfl";
59
73
  };
60
74
  readonly dlr: {
61
75
  readonly displayName: "DLR";
62
76
  readonly colour: "#00afad";
77
+ readonly toc: "tfl";
63
78
  };
64
79
  readonly trams: {
65
80
  readonly displayName: "Trams";
66
81
  readonly colour: "#5fb526";
82
+ readonly toc: "tfl";
67
83
  };
68
84
  readonly cableCar: {
69
85
  readonly displayName: "IFS Cloud Cable Car";
70
86
  readonly colour: "#734fa0";
87
+ readonly toc: "tfl";
71
88
  };
72
89
  readonly liberty: {
73
90
  readonly displayName: "Liberty Line";
74
91
  readonly colour: "#5d6061";
92
+ readonly toc: "tfl";
75
93
  };
76
94
  readonly lioness: {
77
95
  readonly displayName: "Lioness Line";
78
96
  readonly colour: "#faa61a";
97
+ readonly toc: "tfl";
79
98
  };
80
99
  readonly mildmay: {
81
100
  readonly displayName: "Mildmay Line";
82
101
  readonly colour: "#0077ad";
102
+ readonly toc: "tfl";
83
103
  };
84
104
  readonly suffragette: {
85
105
  readonly displayName: "Suffragette Line";
86
106
  readonly colour: "#5bb972";
107
+ readonly toc: "tfl";
87
108
  };
88
109
  readonly weaver: {
89
110
  readonly displayName: "Weaver Line";
90
111
  readonly colour: "#823a62";
112
+ readonly toc: "tfl";
91
113
  };
92
114
  readonly windrush: {
93
115
  readonly displayName: "Windrush Line";
94
116
  readonly colour: "#ed1b00";
117
+ readonly toc: "tfl";
118
+ };
119
+ readonly thameslink: {
120
+ readonly displayName: "Thameslink";
121
+ readonly colour: "#ff5aa4";
122
+ readonly toc: "thameslink";
95
123
  };
96
124
  };
97
125
  export type LineId = keyof typeof Lines;
package/dist/line.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { TOCs } from "./toc";
1
2
  /**
2
3
  * A list of all {@link Line}s
3
4
  */
@@ -5,88 +6,115 @@ export const Lines = {
5
6
  bakerloo: {
6
7
  displayName: "Bakerloo",
7
8
  colour: "#a45a2a",
9
+ toc: "tfl",
8
10
  },
9
11
  central: {
10
12
  displayName: "Central",
11
13
  colour: "#da291c",
14
+ toc: "tfl",
12
15
  },
13
16
  circle: {
14
17
  displayName: "Circle",
15
18
  colour: "#ffcd00",
19
+ toc: "tfl",
16
20
  },
17
21
  district: {
18
22
  displayName: "District",
19
23
  colour: "#007a33",
24
+ toc: "tfl",
20
25
  },
21
26
  hammersmithAndCity: {
22
27
  displayName: "Hammersmith & City",
23
28
  colour: "#e89cae",
29
+ toc: "tfl",
24
30
  },
25
31
  jubilee: {
26
32
  displayName: "Jubilee",
27
- colour: "#7c878e"
33
+ colour: "#7c878e",
34
+ toc: "tfl",
28
35
  },
29
36
  metropolitan: {
30
37
  displayName: "Metropolitan",
31
- colour: "#840b55"
38
+ colour: "#840b55",
39
+ toc: "tfl",
32
40
  },
33
41
  northern: {
34
42
  displayName: "Northern",
35
- colour: "#000000"
43
+ colour: "#000000",
44
+ toc: "tfl",
36
45
  },
37
46
  piccadilly: {
38
47
  displayName: "Piccadilly",
39
- colour: "#10069f"
48
+ colour: "#10069f",
49
+ toc: "tfl",
40
50
  },
41
51
  victoria: {
42
52
  displayName: "Victoria",
43
- colour: "#00a3e0"
53
+ colour: "#00a3e0",
54
+ toc: "tfl",
44
55
  },
45
56
  waterlooAndCity: {
46
57
  displayName: "Waterloo & City",
47
- colour: "#6eceb2"
58
+ colour: "#6eceb2",
59
+ toc: "tfl",
48
60
  },
49
61
  // TfL services
50
62
  elizabeth: {
51
63
  displayName: "Elizabeth Line",
52
- colour: "#6950a1"
64
+ colour: "#6950a1",
65
+ toc: "tfl",
53
66
  },
54
67
  dlr: {
55
68
  displayName: "DLR",
56
- colour: "#00afad"
69
+ colour: "#00afad",
70
+ toc: "tfl",
57
71
  },
58
72
  trams: {
59
73
  displayName: "Trams",
60
- colour: "#5fb526"
74
+ colour: "#5fb526",
75
+ toc: "tfl",
61
76
  },
62
77
  cableCar: {
63
78
  displayName: "IFS Cloud Cable Car",
64
- colour: "#734fa0"
79
+ colour: "#734fa0",
80
+ toc: "tfl",
65
81
  },
66
82
  // Overground lines
67
83
  liberty: {
68
84
  displayName: "Liberty Line",
69
- colour: "#5d6061"
85
+ colour: "#5d6061",
86
+ toc: "tfl",
70
87
  },
71
88
  lioness: {
72
89
  displayName: "Lioness Line",
73
- colour: "#faa61a"
90
+ colour: "#faa61a",
91
+ toc: "tfl",
74
92
  },
75
93
  mildmay: {
76
94
  displayName: "Mildmay Line",
77
- colour: "#0077ad"
95
+ colour: "#0077ad",
96
+ toc: "tfl",
78
97
  },
79
98
  suffragette: {
80
99
  displayName: "Suffragette Line",
81
- colour: "#5bb972"
100
+ colour: "#5bb972",
101
+ toc: "tfl",
82
102
  },
83
103
  weaver: {
84
104
  displayName: "Weaver Line",
85
- colour: "#823a62"
105
+ colour: "#823a62",
106
+ toc: "tfl",
86
107
  },
87
108
  windrush: {
88
109
  displayName: "Windrush Line",
89
- colour: "#ed1b00"
110
+ colour: "#ed1b00",
111
+ toc: "tfl",
112
+ },
113
+ // Other TOCs
114
+ thameslink: {
115
+ displayName: TOCs.thameslink.displayName,
116
+ colour: TOCs.thameslink.colour,
117
+ toc: "thameslink"
90
118
  },
91
119
  };
92
120
  export const lineIds = Object.keys(Lines);