openskidata-format 0.15.0 → 2.0.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.
@@ -1,4 +1,12 @@
1
- export interface ElevationProfile {
1
+ /**
2
+ * Represents an elevation profile with evenly distributed height measurements along a LineString.
3
+ *
4
+ * @property {number[]} heights - Array of height measurements in meters. These heights are sampled at regular intervals along the LineString,
5
+ * except for the final height which corresponds to the LineString endpoint and may have a different spacing.
6
+ * Height values can be mapped to geographical coordinates using Turf.js: `turf.lineChunk(geometry, resolution, {units: 'meters'})`.
7
+ * @property {number} resolution - The horizontal sampling distance in meters between consecutive height measurements.
8
+ */
9
+ export type ElevationProfile = {
2
10
  heights: number[];
3
11
  resolution: number;
4
- }
12
+ };
package/dist/Lift.d.ts CHANGED
@@ -1,15 +1,44 @@
1
- import { Location, SkiAreaFeature } from '.';
2
1
  import { FeatureType } from './FeatureType';
3
- import Source from './Source';
2
+ import { SkiAreaSummaryFeature } from './SkiArea';
3
+ import { Source } from './Source';
4
4
  import { Status } from './Status';
5
5
  export type LiftFeature = GeoJSON.Feature<LiftGeometry, LiftProperties>;
6
6
  export type LiftGeometry = GeoJSON.Point | GeoJSON.MultiPoint | GeoJSON.LineString | GeoJSON.MultiLineString | GeoJSON.Polygon | GeoJSON.MultiPolygon;
7
+ /**
8
+ * A feature representing a ski lift.
9
+ *
10
+ * Lifts are derived from OpenStreetMap aerialway/railway features that are commonly used for winter sports.
11
+ *
12
+ * Note:
13
+ * - Private lifts are not included in this dataset.
14
+ * - Rack railways are included only if they are part of a site=piste relation.
15
+ * - Some lifts included in the dataset may be for other purposes (amusement parks, etc).
16
+ *
17
+ * Properties:
18
+ * @property {FeatureType.Lift} type - The feature type, which is always 'Lift'.
19
+ * @property {string} id - Unique identifier for the lift. The ID is just a hash of the feature, so will change if the feature changes in any way.
20
+ * @property {LiftType} liftType - Type of lift (e.g. chair_lift, gondola). Derived from OpenStreetMap aerialway/railway tags.
21
+ * @property {Status} status - Operational status of the lift. Derived from OpenStreetMap lifecycle tags.
22
+ * @property {string | null} name - Name of the lift. Derived from the OpenStreetMap name tag.
23
+ * @property {string | null} ref - Reference code/number for the lift. Derived from the OpenStreetMap ref tag.
24
+ * @property {string | null} description - Description of the lift. Derived from the OpenStreetMap description tag.
25
+ * @property {boolean | null} oneway - Whether the lift allows riding only in one direction. Derived from the OpenStreetMap oneway tag.
26
+ * @property {number | null} occupancy - Number of people each carrier can transport. Derived from the OpenStreetMap aerialway:occupancy tag.
27
+ * @property {number | null} capacity - Transport capacity in persons/hour. Derived from the OpenStreetMap aerialway:capacity tag.
28
+ * @property {number | null} duration - Duration of lift ride in seconds. Derived from the OpenStreetMap aerialway:duration tag.
29
+ * @property {boolean | null} detachable - Whether the lift has detachable grips. Derived from the OpenStreetMap aerialway:detachable tag.
30
+ * @property {boolean | null} bubble - Whether the lift has bubbles/covers to protect from weather. Derived from the OpenStreetMap aerialway:bubble tag.
31
+ * @property {boolean | null} heating - Whether the lift has heated carriers/seats. Derived from the OpenStreetMap aerialway:heating tag.
32
+ * @property {SkiAreaSummaryFeature[]} skiAreas - Ski areas this lift is a part of.
33
+ * @property {Source[]} sources - Data sources for the feature.
34
+ * @property {string[]} websites - Websites associated with this lift. Derived from the OpenStreetMap website tag.
35
+ * @property {string | null} wikidata_id - Wikidata identifier. Derived from the OpenStreetMap wikidata tag.
36
+ */
7
37
  export type LiftProperties = {
8
38
  type: FeatureType.Lift;
9
39
  id: string;
10
40
  liftType: LiftType;
11
41
  status: Status;
12
- color: string;
13
42
  name: string | null;
14
43
  ref: string | null;
15
44
  description: string | null;
@@ -17,11 +46,11 @@ export type LiftProperties = {
17
46
  occupancy: number | null;
18
47
  capacity: number | null;
19
48
  duration: number | null;
49
+ detachable: boolean | null;
20
50
  bubble: boolean | null;
21
51
  heating: boolean | null;
22
- skiAreas: SkiAreaFeature[];
52
+ skiAreas: SkiAreaSummaryFeature[];
23
53
  sources: Source[];
24
- location: Location | null;
25
54
  websites: string[];
26
55
  wikidata_id: string | null;
27
56
  };
@@ -40,3 +69,4 @@ export declare enum LiftType {
40
69
  RackRailway = "rack_railway"
41
70
  }
42
71
  export declare function getFormattedLiftType(liftType: LiftType): string;
72
+ export declare function getLiftColor(status: Status): string;
package/dist/Lift.js CHANGED
@@ -2,6 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LiftType = void 0;
4
4
  exports.getFormattedLiftType = getFormattedLiftType;
5
+ exports.getLiftColor = getLiftColor;
6
+ const Status_1 = require("./Status");
7
+ const exhaustiveMatchingGuard_1 = require("./util/exhaustiveMatchingGuard");
5
8
  var LiftType;
6
9
  (function (LiftType) {
7
10
  LiftType["CableCar"] = "cable_car";
@@ -43,6 +46,24 @@ function getFormattedLiftType(liftType) {
43
46
  return 'Funicular';
44
47
  case LiftType.RackRailway:
45
48
  return 'Rack Railway';
49
+ default:
50
+ return (0, exhaustiveMatchingGuard_1.exhaustiveMatchingGuard)(liftType);
51
+ }
52
+ }
53
+ function getLiftColor(status) {
54
+ const BRIGHT_RED_COLOR = 'hsl(0, 82%, 42%)';
55
+ const DIM_RED_COLOR = 'hsl(0, 53%, 42%)';
56
+ switch (status) {
57
+ case Status_1.Status.Disused:
58
+ case Status_1.Status.Abandoned:
59
+ return DIM_RED_COLOR;
60
+ case Status_1.Status.Proposed:
61
+ case Status_1.Status.Planned:
62
+ case Status_1.Status.Construction:
63
+ case Status_1.Status.Operating:
64
+ return BRIGHT_RED_COLOR;
65
+ default:
66
+ return (0, exhaustiveMatchingGuard_1.exhaustiveMatchingGuard)(status);
46
67
  }
47
68
  }
48
69
  //# sourceMappingURL=Lift.js.map
package/dist/Lift.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Lift.js","sourceRoot":"","sources":["../src/Lift.ts"],"names":[],"mappings":";;;AAoDA,oDA2BC;AA1CD,IAAY,QAaX;AAbD,WAAY,QAAQ;IAClB,kCAAsB,CAAA;IACtB,+BAAmB,CA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KAAK,eAAM,CAAC,SAAS;YACnB,OAAO,aAAa,CAAA;QACtB,KAAK,eAAM,CAAC,QAAQ,CAAC;QACrB,KAAK,eAAM,CAAC,OAAO,CAAC;QACpB,KAAK,eAAM,CAAC,YAAY,CAAC;QACzB,KAAK,eAAM,CAAC,SAAS;YACnB,OAAO,gBAAgB,CAAA;QACzB;YACE,OAAO,IAAA,iDAAuB,EAAC,MAAM,CAAC,CAAA;IAC1C,CAAC;AACH,CAAC"}
@@ -1,2 +1,2 @@
1
- import { LiftProperties } from '.';
1
+ import { LiftProperties } from './Lift';
2
2
  export declare function getLiftNameAndType(properties: LiftProperties): string | null;
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLiftNameAndType = getLiftNameAndType;
4
- const _1 = require(".");
5
4
  const Lift_1 = require("./Lift");
6
5
  function getLiftNameAndType(properties) {
7
6
  const name = properties.name;
8
7
  const liftType = getAugmentedLiftType(properties);
9
8
  if (name && liftType) {
10
- return name + ' (' + liftType + ')';
9
+ return `${name} (${liftType})`;
11
10
  }
12
11
  else if (name) {
13
12
  return name;
@@ -24,8 +23,8 @@ function getAugmentedLiftType(properties) {
24
23
  components.push('Heated');
25
24
  }
26
25
  if (bubble === true &&
27
- properties.liftType !== _1.LiftType.CableCar &&
28
- properties.liftType !== _1.LiftType.Gondola) {
26
+ properties.liftType !== Lift_1.LiftType.CableCar &&
27
+ properties.liftType !== Lift_1.LiftType.Gondola) {
29
28
  components.push('Bubble');
30
29
  }
31
30
  if (!isOccupancyImplicit(properties) && properties.occupancy) {
@@ -45,19 +44,15 @@ function getAugmentedLiftType(properties) {
45
44
  return components.join(' ');
46
45
  }
47
46
  function formattedDuration(duration) {
48
- let minutes = Math.floor(duration / 60);
49
- let seconds = duration - minutes * 60;
50
- if (minutes < 10) {
51
- minutes = '0' + minutes;
52
- }
53
- if (seconds < 10) {
54
- seconds = '0' + seconds;
55
- }
56
- return minutes + ':' + seconds;
47
+ const minutes = Math.floor(duration / 60)
48
+ .toString()
49
+ .padStart(2, '0');
50
+ const seconds = (duration % 60).toString().padStart(2, '0');
51
+ return `${minutes}:${seconds}`;
57
52
  }
58
53
  function implicitOccupancyLiftType(properties) {
59
54
  const occupancy = properties.occupancy;
60
- if (properties.liftType === _1.LiftType.ChairLift) {
55
+ if (properties.liftType === Lift_1.LiftType.ChairLift) {
61
56
  switch (occupancy) {
62
57
  case 1:
63
58
  return 'Single';
@@ -72,15 +67,15 @@ function implicitOccupancyLiftType(properties) {
72
67
  }
73
68
  }
74
69
  switch (properties.liftType) {
75
- case _1.LiftType.TBar:
70
+ case Lift_1.LiftType.TBar:
76
71
  return 'T-bar';
77
- case _1.LiftType.JBar:
72
+ case Lift_1.LiftType.JBar:
78
73
  return 'J-bar';
79
- case _1.LiftType.Platter:
74
+ case Lift_1.LiftType.Platter:
80
75
  return 'Platter';
81
- case _1.LiftType.RopeTow:
76
+ case Lift_1.LiftType.RopeTow:
82
77
  return 'Ropetow';
83
- case _1.LiftType.MagicCarpet:
78
+ case Lift_1.LiftType.MagicCarpet:
84
79
  return 'Magic Carpet';
85
80
  }
86
81
  return null;
@@ -115,8 +110,8 @@ function containsAny(input, lowerCaseSearchList) {
115
110
  return false;
116
111
  }
117
112
  const lowerCaseInput = input.toLowerCase();
118
- return (lowerCaseSearchList.findIndex((searchItem) => {
113
+ return lowerCaseSearchList.some((searchItem) => {
119
114
  return lowerCaseInput.includes(searchItem);
120
- }) !== -1);
115
+ });
121
116
  }
122
117
  //# sourceMappingURL=LiftNameFormatter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LiftNameFormatter.js","sourceRoot":"","sources":["../src/LiftNameFormatter.ts"],"names":[],"mappings":";;AAGA,gDAYC;AAfD,wBAA4C;AAC5C,iCAA6C;AAE7C,SAAgB,kBAAkB,CAAC,UAA0B;IAC3D,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAA;IAE5B,MAAM,QAAQ,GAAG,oB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,CAAC,WAAW;YACvB,OAAO,cAAc,CAAA;IACzB,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,mBAAmB,CAAC,UAA0B;IACrD,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,UAAU,CAAC,CAAA;IAC9D,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,WAAW,CAAC,UAAU,CAAC,IAAI,EAAE;QAClC,OAAO;QACP,OAAO;QACP,SAAS;QACT,UAAU;QACV,SAAS;QACT,UAAU;QACV,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,MAAM;QACN,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAoB,EAAE,mBAA6B;IACtE,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,EAAE,CAAA;IAC1C,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;QAC7C,OAAO,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;AACJ,CAAC"}
package/dist/Run.d.ts CHANGED
@@ -1,12 +1,51 @@
1
1
  import * as GeoJSON from 'geojson';
2
2
  import { ElevationProfile } from './ElevationProfile';
3
3
  import { FeatureType } from './FeatureType';
4
- import { Location } from './Location';
5
- import { SkiAreaFeature } from './SkiArea';
6
- import Source from './Source';
4
+ import { SkiAreaSummaryFeature } from './SkiArea';
5
+ import { Source } from './Source';
7
6
  import { Status } from './Status';
8
7
  export type RunGeometry = GeoJSON.LineString | GeoJSON.Polygon;
8
+ /**
9
+ * Represents a segment of a ski run/trail.
10
+ *
11
+ * Runs are derived from OpenStreetMap pistes, which are defined as all ways/areas/relations containing a "piste:type" tag.
12
+ * Piste relations support is limited, it is only used to enhance the data of its member ways. There is no way to access the relation itself in the output data.
13
+ *
14
+ * A single run as marked on the mountain may be broken up into several run features, especially if the run has branches, or changes in tags (e.g. difficulty, use).
15
+ *
16
+ * In the future, there might be a "Route" entity introduced to represent a whole run, which would be composed of multiple run features.
17
+ *
18
+ * Note: winter hiking trails and trails of other winter sports disciplines are also included in this dataset.
19
+ *
20
+ * In postprocessing:
21
+ * - overlapping ways are merged into a single run feature with multiple uses.
22
+ * - connected run segments with the same properties are merged into a single run feature.
23
+ */
9
24
  export type RunFeature = GeoJSON.Feature<RunGeometry, RunProperties>;
25
+ /**
26
+ * Represents the properties of a ski run.
27
+ *
28
+ * Properties:
29
+ * @property {FeatureType.Run} type - The feature type, which is always 'Run'.
30
+ * @property {RunUse[]} uses - Use types for the run (e.g. downhill, nordic), derived from OpenStreetMap "piste:type" tags.
31
+ * @property {string} id - Unique identifier for the run. The ID is just a hash of the feature, so will change if the feature changes in any way.
32
+ * @property {string | null} name - Name of the run, if available
33
+ * @property {string | null} ref - Reference code/number for the run. Derived from the OpenStreetMap piste:ref and ref tags.
34
+ * @property {Status} status - Operational status. Note: as only operational runs are included in this dataset, this will always be 'operating'.
35
+ * @property {string | null} description - Description of the run, derived from the OpenStreetMap "piste:description" or "description" tag.
36
+ * @property {RunDifficulty | null} difficulty - Difficulty rating of the run, derived from the OpenStreetMap "piste:difficulty" tag
37
+ * @property {RunDifficultyConvention} difficultyConvention - Regional convention used for representing run difficulty. Derived from location.
38
+ * @property {boolean | null} oneway - Whether the run is one-way only, derived from the OpenStreetMap "piste:oneway" or "oneway" tag, in addition to defaults based on run use.
39
+ * @property {boolean | null} lit - Whether the run has lighting for night skiing, derived from the OpenStreetMap "piste:lit" or "lit" tag.
40
+ * @property {boolean | null} gladed - Whether the run is through gladed/tree terrain, derived from the OpenStreetMap "piste:gladed" or "gladed" tag.
41
+ * @property {boolean | null} patrolled - Whether the run is patrolled by ski patrol, derived from the OpenStreetMap "piste:patrolled" or "patrolled" tag.
42
+ * @property {RunGrooming | null} grooming - Grooming status/type of the run, derived from the OpenStreetMap "piste:grooming" tag. If not specified explicitly, for difficulties "expert", "freeride", and "extreme", grooming is assumed to be "backcountry".
43
+ * @property {SkiAreaSummaryFeature[]} skiAreas - Ski areas this run belongs to. Derived from the OpenStreetMap site=piste relation or landuse=winter_sports area and proximity to ski area features. Runs with "backcountry" grooming are not associated with ski areas unless they have a "piste:patrolled=yes" or "patrolled=yes" OpenStreetMap tag, or are part of a "site=piste" ski area relation.
44
+ * @property {ElevationProfile | null} elevationProfile - Elevation profile of the run, only available for runs with LineString geometry.
45
+ * @property {Source[]} sources - Data sources for this run's information
46
+ * @property {string[]} websites - Websites associated with this run, derived from the OpenStreetMap website tag
47
+ * @property {string | null} wikidata_id - Wikidata identifier, if available, derived from the OpenStreetMap wikidata tag
48
+ */
10
49
  export type RunProperties = {
11
50
  type: FeatureType.Run;
12
51
  uses: RunUse[];
@@ -16,18 +55,15 @@ export type RunProperties = {
16
55
  status: Status;
17
56
  description: string | null;
18
57
  difficulty: RunDifficulty | null;
19
- convention: RunConvention;
58
+ difficultyConvention: RunDifficultyConvention;
20
59
  oneway: boolean | null;
21
60
  lit: boolean | null;
22
61
  gladed: boolean | null;
23
62
  patrolled: boolean | null;
24
- color: string;
25
- colorName: ColorName;
26
63
  grooming: RunGrooming | null;
27
- skiAreas: SkiAreaFeature[];
64
+ skiAreas: SkiAreaSummaryFeature[];
28
65
  elevationProfile: ElevationProfile | null;
29
66
  sources: Source[];
30
- location: Location | null;
31
67
  websites: string[];
32
68
  wikidata_id: string | null;
33
69
  };
@@ -61,7 +97,7 @@ export declare enum RunDifficulty {
61
97
  FREERIDE = "freeride",
62
98
  EXTREME = "extreme"
63
99
  }
64
- export declare enum ColorName {
100
+ export declare enum RunColorName {
65
101
  GREEN = "green",
66
102
  BLUE = "blue",
67
103
  RED = "red",
@@ -69,10 +105,45 @@ export declare enum ColorName {
69
105
  ORANGE = "orange",
70
106
  GREY = "grey"
71
107
  }
72
- export declare enum RunConvention {
108
+ export declare enum RunColorValue {
109
+ GREEN = "hsl(125, 100%, 33%)",
110
+ BLUE = "hsl(208, 100%, 33%)",
111
+ RED = "hsl(359, 94%, 53%)",
112
+ BLACK = "hsl(0, 0%, 0%)",
113
+ ORANGE = "hsl(34, 100%, 50%)",
114
+ GREY = "hsl(0, 0%, 35%)"
115
+ }
116
+ /**
117
+ * Run difficulty colors vary by region. This enum defines the color convention used for runs at a ski area.
118
+ * @enum {string}
119
+ */
120
+ export declare enum RunDifficultyConvention {
121
+ /**
122
+ * European color convention:
123
+ * - Green: Novice
124
+ * - Blue: Easy
125
+ * - Red: Intermediate
126
+ * - Black: Advanced/Expert
127
+ * - Orange: Freeride/Extreme
128
+ */
73
129
  EUROPE = "europe",
130
+ /**
131
+ * Japanese color convention:
132
+ * - Green: Novice/Easy
133
+ * - Red: Intermediate
134
+ * - Black: Advanced/Expert
135
+ * - Orange: Freeride/Extreme
136
+ */
74
137
  JAPAN = "japan",
138
+ /**
139
+ * North American color convention:
140
+ * - Green: Novice/Easy
141
+ * - Blue: Intermediate
142
+ * - Black: Advanced/Expert
143
+ * - Orange: Freeride/Extreme
144
+ */
75
145
  NORTH_AMERICA = "north_america"
76
146
  }
77
- export declare function getColorName(color: string): ColorName;
78
- export declare function getRunColor(convention: RunConvention, difficulty: RunDifficulty | null): string;
147
+ export declare function getRunColor(convention: RunDifficultyConvention, difficulty: RunDifficulty | null): RunColorValue;
148
+ export declare function runColorNameToValue(color: RunColorName): RunColorValue;
149
+ export declare function getRunColorName(convention: RunDifficultyConvention, difficulty: RunDifficulty | null): RunColorName;
package/dist/Run.js CHANGED
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RunConvention = exports.ColorName = exports.RunDifficulty = exports.RunGrooming = exports.RunUse = void 0;
4
- exports.getColorName = getColorName;
3
+ exports.RunDifficultyConvention = exports.RunColorValue = exports.RunColorName = exports.RunDifficulty = exports.RunGrooming = exports.RunUse = void 0;
5
4
  exports.getRunColor = getRunColor;
5
+ exports.runColorNameToValue = runColorNameToValue;
6
+ exports.getRunColorName = getRunColorName;
7
+ const exhaustiveMatchingGuard_1 = require("./util/exhaustiveMatchingGuard");
6
8
  var RunUse;
7
9
  (function (RunUse) {
8
10
  RunUse["Downhill"] = "downhill";
@@ -36,97 +38,130 @@ var RunDifficulty;
36
38
  RunDifficulty["FREERIDE"] = "freeride";
37
39
  RunDifficulty["EXTREME"] = "extreme";
38
40
  })(RunDifficulty || (exports.RunDifficulty = RunDifficulty = {}));
39
- var ColorName;
40
- (function (ColorName) {
41
- ColorName["GREEN"] = "green";
42
- ColorName["BLUE"] = "blue";
43
- ColorName["RED"] = "red";
44
- ColorName["BLACK"] = "black";
45
- ColorName["ORANGE"] = "orange";
46
- ColorName["GREY"] = "grey";
47
- })(ColorName || (exports.ColorName = ColorName = {}));
48
- var RunConvention;
49
- (function (RunConvention) {
50
- RunConvention["EUROPE"] = "europe";
51
- RunConvention["JAPAN"] = "japan";
52
- RunConvention["NORTH_AMERICA"] = "north_america";
53
- })(RunConvention || (exports.RunConvention = RunConvention = {}));
54
- // When adding a new color, add a supplemental oneway icon on the map style
55
- const GREEN_COLOR = 'hsl(125, 100%, 33%)';
56
- const BLUE_COLOR = 'hsl(208, 100%, 33%)';
57
- const RED_COLOR = 'hsl(359, 94%, 53%)';
58
- const BLACK_COLOR = 'hsl(0, 0%, 0%)';
59
- const ORANGE_COLOR = 'hsl(34, 100%, 50%)';
60
- const GREY_COLOR = 'hsl(0, 0%, 35%)';
61
- function getColorName(color) {
41
+ var RunColorName;
42
+ (function (RunColorName) {
43
+ RunColorName["GREEN"] = "green";
44
+ RunColorName["BLUE"] = "blue";
45
+ RunColorName["RED"] = "red";
46
+ RunColorName["BLACK"] = "black";
47
+ RunColorName["ORANGE"] = "orange";
48
+ RunColorName["GREY"] = "grey";
49
+ })(RunColorName || (exports.RunColorName = RunColorName = {}));
50
+ var RunColorValue;
51
+ (function (RunColorValue) {
52
+ RunColorValue["GREEN"] = "hsl(125, 100%, 33%)";
53
+ RunColorValue["BLUE"] = "hsl(208, 100%, 33%)";
54
+ RunColorValue["RED"] = "hsl(359, 94%, 53%)";
55
+ RunColorValue["BLACK"] = "hsl(0, 0%, 0%)";
56
+ RunColorValue["ORANGE"] = "hsl(34, 100%, 50%)";
57
+ RunColorValue["GREY"] = "hsl(0, 0%, 35%)";
58
+ })(RunColorValue || (exports.RunColorValue = RunColorValue = {}));
59
+ /**
60
+ * Run difficulty colors vary by region. This enum defines the color convention used for runs at a ski area.
61
+ * @enum {string}
62
+ */
63
+ var RunDifficultyConvention;
64
+ (function (RunDifficultyConvention) {
65
+ /**
66
+ * European color convention:
67
+ * - Green: Novice
68
+ * - Blue: Easy
69
+ * - Red: Intermediate
70
+ * - Black: Advanced/Expert
71
+ * - Orange: Freeride/Extreme
72
+ */
73
+ RunDifficultyConvention["EUROPE"] = "europe";
74
+ /**
75
+ * Japanese color convention:
76
+ * - Green: Novice/Easy
77
+ * - Red: Intermediate
78
+ * - Black: Advanced/Expert
79
+ * - Orange: Freeride/Extreme
80
+ */
81
+ RunDifficultyConvention["JAPAN"] = "japan";
82
+ /**
83
+ * North American color convention:
84
+ * - Green: Novice/Easy
85
+ * - Blue: Intermediate
86
+ * - Black: Advanced/Expert
87
+ * - Orange: Freeride/Extreme
88
+ */
89
+ RunDifficultyConvention["NORTH_AMERICA"] = "north_america";
90
+ })(RunDifficultyConvention || (exports.RunDifficultyConvention = RunDifficultyConvention = {}));
91
+ function getRunColor(convention, difficulty) {
92
+ return runColorNameToValue(getRunColorName(convention, difficulty));
93
+ }
94
+ function runColorNameToValue(color) {
62
95
  switch (color) {
63
- case GREEN_COLOR:
64
- return ColorName.GREEN;
65
- case BLUE_COLOR:
66
- return ColorName.BLUE;
67
- case RED_COLOR:
68
- return ColorName.RED;
69
- case BLACK_COLOR:
70
- return ColorName.BLACK;
71
- case ORANGE_COLOR:
72
- return ColorName.ORANGE;
73
- case GREY_COLOR:
74
- return ColorName.GREY;
96
+ case RunColorName.GREEN:
97
+ return RunColorValue.GREEN;
98
+ case RunColorName.BLUE:
99
+ return RunColorValue.BLUE;
100
+ case RunColorName.RED:
101
+ return RunColorValue.RED;
102
+ case RunColorName.BLACK:
103
+ return RunColorValue.BLACK;
104
+ case RunColorName.ORANGE:
105
+ return RunColorValue.ORANGE;
106
+ case RunColorName.GREY:
107
+ return RunColorValue.GREY;
75
108
  default:
76
- throw 'missing color';
109
+ throw 'invalid color';
77
110
  }
78
111
  }
79
- function getRunColor(convention, difficulty) {
112
+ function getRunColorName(convention, difficulty) {
80
113
  switch (convention) {
81
- case RunConvention.EUROPE:
114
+ case RunDifficultyConvention.EUROPE:
82
115
  switch (difficulty) {
83
116
  case RunDifficulty.NOVICE:
84
- return GREEN_COLOR;
117
+ return RunColorName.GREEN;
85
118
  case RunDifficulty.EASY:
86
- return BLUE_COLOR;
119
+ return RunColorName.BLUE;
87
120
  case RunDifficulty.INTERMEDIATE:
88
- return RED_COLOR;
121
+ return RunColorName.RED;
89
122
  case RunDifficulty.ADVANCED:
90
123
  case RunDifficulty.EXPERT:
91
- return BLACK_COLOR;
124
+ return RunColorName.BLACK;
92
125
  case RunDifficulty.FREERIDE:
93
126
  case RunDifficulty.EXTREME:
94
- return ORANGE_COLOR;
127
+ return RunColorName.ORANGE;
95
128
  default:
96
- return GREY_COLOR;
129
+ return RunColorName.GREY;
97
130
  }
98
- case RunConvention.JAPAN:
131
+ case RunDifficultyConvention.JAPAN:
99
132
  switch (difficulty) {
100
133
  case RunDifficulty.NOVICE:
101
134
  case RunDifficulty.EASY:
102
- return GREEN_COLOR;
135
+ return RunColorName.GREEN;
103
136
  case RunDifficulty.INTERMEDIATE:
104
- return RED_COLOR;
137
+ return RunColorName.RED;
105
138
  case RunDifficulty.ADVANCED:
106
139
  case RunDifficulty.EXPERT:
107
- return BLACK_COLOR;
140
+ return RunColorName.BLACK;
108
141
  case RunDifficulty.FREERIDE:
109
142
  case RunDifficulty.EXTREME:
110
- return ORANGE_COLOR;
143
+ return RunColorName.ORANGE;
111
144
  default:
112
- return GREY_COLOR;
145
+ return RunColorName.GREY;
113
146
  }
114
- case RunConvention.NORTH_AMERICA:
147
+ case RunDifficultyConvention.NORTH_AMERICA:
115
148
  switch (difficulty) {
116
149
  case RunDifficulty.NOVICE:
117
150
  case RunDifficulty.EASY:
118
- return GREEN_COLOR;
151
+ return RunColorName.GREEN;
119
152
  case RunDifficulty.INTERMEDIATE:
120
- return BLUE_COLOR;
153
+ return RunColorName.BLUE;
121
154
  case RunDifficulty.ADVANCED:
122
155
  case RunDifficulty.EXPERT:
123
- return BLACK_COLOR;
156
+ return RunColorName.BLACK;
124
157
  case RunDifficulty.FREERIDE:
125
158
  case RunDifficulty.EXTREME:
126
- return ORANGE_COLOR;
159
+ return RunColorName.ORANGE;
127
160
  default:
128
- return GREY_COLOR;
161
+ return RunColorName.GREY;
129
162
  }
163
+ default:
164
+ return (0, exhaustiveMatchingGuard_1.exhaustiveMatchingGuard)(convention);
130
165
  }
131
166
  }
132
167
  //# sourceMappingURL=Run.js.map
package/dist/Run.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Run.js","sourceRoot":"","sources":["../src/Run.ts"],"names":[],"mappings":";;;AA6FA,oCAiBC;AAED,kCAuDC;AAlID,IAAY,MAYX;AAZD,WAAY,MAAM;IAChB,+BAAqB,CAAA;IACrB,2BAAiB,CAAA;IACjB,6BAAmB,CAAA;IACnB,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,2BAAiB,CAAA;IACjB,gCAAsB,CAAA;IACtB,gCAAsB,CAAA;IACtB,mCAAyB,CAAA;IACzB,mCAAyB,CAAA;IACzB,6BAAmB,CAAA;AACrB,CAAC,EAZW,MAAM,sBAAN,MAAM,QAYjB;AAED,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BA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