openskidata-format 0.14.0 → 1.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,12 +46,13 @@ 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[];
55
+ wikidata_id: string | null;
26
56
  };
27
57
  export declare enum LiftType {
28
58
  CableCar = "cable_car",
@@ -39,3 +69,4 @@ export declare enum LiftType {
39
69
  RackRailway = "rack_railway"
40
70
  }
41
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":";;;AAmDA,oDA2BC;AA1CD,IAAY,QAaX;AAbD,WAAY,QAAQ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f,KAAK,eAAM,CAAC,OAAO,CAAC;QACpB,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,IA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nB,OAAO,SAAS,CAAA;QAClB,KAAK,eAAQ,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,19 +55,17 @@ 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[];
68
+ wikidata_id: string | null;
32
69
  };
33
70
  export declare enum RunUse {
34
71
  Downhill = "downhill",
@@ -60,7 +97,7 @@ export declare enum RunDifficulty {
60
97
  FREERIDE = "freeride",
61
98
  EXTREME = "extreme"
62
99
  }
63
- export declare enum ColorName {
100
+ export declare enum RunColor {
64
101
  GREEN = "green",
65
102
  BLUE = "blue",
66
103
  RED = "red",
@@ -68,10 +105,44 @@ export declare enum ColorName {
68
105
  ORANGE = "orange",
69
106
  GREY = "grey"
70
107
  }
71
- 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
+ */
72
129
  EUROPE = "europe",
130
+ /**
131
+ * Japanese color convention:
132
+ * - Green: Novice/Easy
133
+ * - Red: Intermediate
134
+ * - Black: Advanced/Expert
135
+ * - Orange: Freeride/Extreme
136
+ */
73
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
+ */
74
145
  NORTH_AMERICA = "north_america"
75
146
  }
76
- export declare function getColorName(color: string): ColorName;
77
- export declare function getRunColor(convention: RunConvention, difficulty: RunDifficulty | null): string;
147
+ export declare function getColorValue(color: RunColor): RunColorValue;
148
+ export declare function getRunColor(convention: RunDifficultyConvention, difficulty: RunDifficulty | null): RunColor;
package/dist/Run.js CHANGED
@@ -1,8 +1,9 @@
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.RunColor = exports.RunDifficulty = exports.RunGrooming = exports.RunUse = void 0;
4
+ exports.getColorValue = getColorValue;
5
5
  exports.getRunColor = getRunColor;
6
+ const exhaustiveMatchingGuard_1 = require("./util/exhaustiveMatchingGuard");
6
7
  var RunUse;
7
8
  (function (RunUse) {
8
9
  RunUse["Downhill"] = "downhill";
@@ -36,97 +37,127 @@ var RunDifficulty;
36
37
  RunDifficulty["FREERIDE"] = "freeride";
37
38
  RunDifficulty["EXTREME"] = "extreme";
38
39
  })(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) {
40
+ var RunColor;
41
+ (function (RunColor) {
42
+ RunColor["GREEN"] = "green";
43
+ RunColor["BLUE"] = "blue";
44
+ RunColor["RED"] = "red";
45
+ RunColor["BLACK"] = "black";
46
+ RunColor["ORANGE"] = "orange";
47
+ RunColor["GREY"] = "grey";
48
+ })(RunColor || (exports.RunColor = RunColor = {}));
49
+ var RunColorValue;
50
+ (function (RunColorValue) {
51
+ RunColorValue["GREEN"] = "hsl(125, 100%, 33%)";
52
+ RunColorValue["BLUE"] = "hsl(208, 100%, 33%)";
53
+ RunColorValue["RED"] = "hsl(359, 94%, 53%)";
54
+ RunColorValue["BLACK"] = "hsl(0, 0%, 0%)";
55
+ RunColorValue["ORANGE"] = "hsl(34, 100%, 50%)";
56
+ RunColorValue["GREY"] = "hsl(0, 0%, 35%)";
57
+ })(RunColorValue || (exports.RunColorValue = RunColorValue = {}));
58
+ /**
59
+ * Run difficulty colors vary by region. This enum defines the color convention used for runs at a ski area.
60
+ * @enum {string}
61
+ */
62
+ var RunDifficultyConvention;
63
+ (function (RunDifficultyConvention) {
64
+ /**
65
+ * European color convention:
66
+ * - Green: Novice
67
+ * - Blue: Easy
68
+ * - Red: Intermediate
69
+ * - Black: Advanced/Expert
70
+ * - Orange: Freeride/Extreme
71
+ */
72
+ RunDifficultyConvention["EUROPE"] = "europe";
73
+ /**
74
+ * Japanese color convention:
75
+ * - Green: Novice/Easy
76
+ * - Red: Intermediate
77
+ * - Black: Advanced/Expert
78
+ * - Orange: Freeride/Extreme
79
+ */
80
+ RunDifficultyConvention["JAPAN"] = "japan";
81
+ /**
82
+ * North American color convention:
83
+ * - Green: Novice/Easy
84
+ * - Blue: Intermediate
85
+ * - Black: Advanced/Expert
86
+ * - Orange: Freeride/Extreme
87
+ */
88
+ RunDifficultyConvention["NORTH_AMERICA"] = "north_america";
89
+ })(RunDifficultyConvention || (exports.RunDifficultyConvention = RunDifficultyConvention = {}));
90
+ function getColorValue(color) {
62
91
  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;
92
+ case RunColor.GREEN:
93
+ return RunColorValue.GREEN;
94
+ case RunColor.BLUE:
95
+ return RunColorValue.BLUE;
96
+ case RunColor.RED:
97
+ return RunColorValue.RED;
98
+ case RunColor.BLACK:
99
+ return RunColorValue.BLACK;
100
+ case RunColor.ORANGE:
101
+ return RunColorValue.ORANGE;
102
+ case RunColor.GREY:
103
+ return RunColorValue.GREY;
75
104
  default:
76
- throw 'missing color';
105
+ throw 'invalid color';
77
106
  }
78
107
  }
79
108
  function getRunColor(convention, difficulty) {
80
109
  switch (convention) {
81
- case RunConvention.EUROPE:
110
+ case RunDifficultyConvention.EUROPE:
82
111
  switch (difficulty) {
83
112
  case RunDifficulty.NOVICE:
84
- return GREEN_COLOR;
113
+ return RunColor.GREEN;
85
114
  case RunDifficulty.EASY:
86
- return BLUE_COLOR;
115
+ return RunColor.BLUE;
87
116
  case RunDifficulty.INTERMEDIATE:
88
- return RED_COLOR;
117
+ return RunColor.RED;
89
118
  case RunDifficulty.ADVANCED:
90
119
  case RunDifficulty.EXPERT:
91
- return BLACK_COLOR;
120
+ return RunColor.BLACK;
92
121
  case RunDifficulty.FREERIDE:
93
122
  case RunDifficulty.EXTREME:
94
- return ORANGE_COLOR;
123
+ return RunColor.ORANGE;
95
124
  default:
96
- return GREY_COLOR;
125
+ return RunColor.GREY;
97
126
  }
98
- case RunConvention.JAPAN:
127
+ case RunDifficultyConvention.JAPAN:
99
128
  switch (difficulty) {
100
129
  case RunDifficulty.NOVICE:
101
130
  case RunDifficulty.EASY:
102
- return GREEN_COLOR;
131
+ return RunColor.GREEN;
103
132
  case RunDifficulty.INTERMEDIATE:
104
- return RED_COLOR;
133
+ return RunColor.RED;
105
134
  case RunDifficulty.ADVANCED:
106
135
  case RunDifficulty.EXPERT:
107
- return BLACK_COLOR;
136
+ return RunColor.BLACK;
108
137
  case RunDifficulty.FREERIDE:
109
138
  case RunDifficulty.EXTREME:
110
- return ORANGE_COLOR;
139
+ return RunColor.ORANGE;
111
140
  default:
112
- return GREY_COLOR;
141
+ return RunColor.GREY;
113
142
  }
114
- case RunConvention.NORTH_AMERICA:
143
+ case RunDifficultyConvention.NORTH_AMERICA:
115
144
  switch (difficulty) {
116
145
  case RunDifficulty.NOVICE:
117
146
  case RunDifficulty.EASY:
118
- return GREEN_COLOR;
147
+ return RunColor.GREEN;
119
148
  case RunDifficulty.INTERMEDIATE:
120
- return BLUE_COLOR;
149
+ return RunColor.BLUE;
121
150
  case RunDifficulty.ADVANCED:
122
151
  case RunDifficulty.EXPERT:
123
- return BLACK_COLOR;
152
+ return RunColor.BLACK;
124
153
  case RunDifficulty.FREERIDE:
125
154
  case RunDifficulty.EXTREME:
126
- return ORANGE_COLOR;
155
+ return RunColor.ORANGE;
127
156
  default:
128
- return GREY_COLOR;
157
+ return RunColor.GREY;
129
158
  }
159
+ default:
160
+ return (0, exhaustiveMatchingGuard_1.exhaustiveMatchingGuard)(convention);
130
161
  }
131
162
  }
132
163
  //# 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":";;;AA4FA,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,8BAAe,CAAA;IACf,oDAAqC,CAAA;IACrC,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;IACnB,0CAA2B,CAAA;AAC7B,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAED,IAAY,aAQX;AARD,WAAY,a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