ropegeo-common 1.13.0 → 1.15.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/README.md CHANGED
@@ -178,7 +178,7 @@ Helper tables use columns **Name**, **Description**, **Import**. Model tables ad
178
178
  | Name | Base class | Description | Import |
179
179
  | --- | --- | --- | --- |
180
180
  | `RopewikiPageView` | `BaseRopewikiPageView` | Backward-compatible alias exported as the online page view class. | `import { RopewikiPageView } from 'ropegeo-common/models'` |
181
- | `BaseRopewikiPageView` | N/A | Abstract Ropewiki page view base with shared validation/fields. | `import { BaseRopewikiPageView } from 'ropegeo-common/models'` |
181
+ | `BaseRopewikiPageView` | N/A | Abstract Ropewiki page view base; includes optional `mapDataId` (vector tile record id) alongside shared validation/fields. | `import { BaseRopewikiPageView } from 'ropegeo-common/models'` |
182
182
  | `OnlineRopewikiPageView` | `BaseRopewikiPageView` | Online Ropewiki page view with API image URLs and online minimap variants. | `import { OnlineRopewikiPageView } from 'ropegeo-common/models'` |
183
183
  | `OfflineRopewikiPageView` | `BaseRopewikiPageView` | Offline Ropewiki page view with downloaded paths and offline minimap variants. | `import { OfflineRopewikiPageView } from 'ropegeo-common/models'` |
184
184
  | `OnlinePageView` | N/A | Interface for online page-view behavior (`toOffline`, `toSavedPage`, etc.). | `import type { OnlinePageView } from 'ropegeo-common/models'` |
@@ -254,9 +254,9 @@ Abstract classes live under `minimap/abstract/`, concrete under `minimap/concret
254
254
  | `RegionMiniMap` | `MiniMap` | Abstract region minimap (`miniMapType: region`); online/offline concrete subclasses. | `import { RegionMiniMap } from 'ropegeo-common/models'` |
255
255
  | `OnlineRegionMiniMap` | `RegionMiniMap` | API region routes (`routesParams`, `bounds` or null, `fetchType: "online"`). | `import { OnlineRegionMiniMap } from 'ropegeo-common/models'` |
256
256
  | `OfflineRegionMiniMap` | `RegionMiniMap` | Bundled region routes GeoJSON path (`downloadedGeojson`, `fetchType: "offline"`). | `import { OfflineRegionMiniMap } from 'ropegeo-common/models'` |
257
- | `PageMiniMap` | `MiniMap` | Abstract page minimap (`miniMapType: page`); online/offline tile templates and optional `legend`. | `import { PageMiniMap } from 'ropegeo-common/models'` |
258
- | `OnlinePageMiniMap` | `PageMiniMap` | API page tiles template (`onlineTilesTemplate`, `fetchType: "online"`). | `import { OnlinePageMiniMap } from 'ropegeo-common/models'` |
259
- | `OfflinePageMiniMap` | `PageMiniMap` | Persisted local tiles template (`offlineTilesTemplate`, `fetchType: "offline"`). | `import { OfflinePageMiniMap } from 'ropegeo-common/models'` |
257
+ | `PageMiniMap` | `MiniMap` | Abstract page minimap (`miniMapType: page`); MVT `polyLineLayerId` / `pointLayerId`, tile templates, optional `legend`. | `import { PageMiniMap } from 'ropegeo-common/models'` |
258
+ | `OnlinePageMiniMap` | `PageMiniMap` | API page tiles (`onlineTilesTemplate`, `fetchType: "online"`). | `import { OnlinePageMiniMap } from 'ropegeo-common/models'` |
259
+ | `OfflinePageMiniMap` | `PageMiniMap` | Local page tiles (`offlineTilesTemplate`, `fetchType: "offline"`). | `import { OfflinePageMiniMap } from 'ropegeo-common/models'` |
260
260
  | `CenteredRegionMiniMap` | `MiniMap` | Abstract centered-route minimap (`miniMapType: centeredRegion`). | `import { CenteredRegionMiniMap } from 'ropegeo-common/models'` |
261
261
  | `OnlineCenteredRegionMiniMap` | `CenteredRegionMiniMap` | API centered-route fallback (`routesParams`, `fetchType: "online"`). | `import { OnlineCenteredRegionMiniMap } from 'ropegeo-common/models'` |
262
262
  | `OfflineCenteredRegionMiniMap` | `CenteredRegionMiniMap` | Persisted local centered-route geojson (`downloadedGeojson`, `fetchType: "offline"`). | `import { OfflineCenteredRegionMiniMap } from 'ropegeo-common/models'` |
@@ -13,10 +13,13 @@ export declare function registerPageMiniMapParser(fetchType: FetchType, parse: (
13
13
  export declare abstract class PageMiniMap extends MiniMap {
14
14
  abstract readonly fetchType: FetchType;
15
15
  readonly miniMapType = MiniMapType.Page;
16
- layerId: string;
16
+ /** Vector tile source-layer id for line and polygon features. */
17
+ polyLineLayerId: string;
18
+ /** Vector tile source-layer id for point features. */
19
+ pointLayerId: string;
17
20
  bounds: Bounds;
18
21
  legend?: Record<string, LegendItem>;
19
- protected constructor(layerId: string, bounds: Bounds, title: string, legend?: Record<string, LegendItem>);
22
+ protected constructor(polyLineLayerId: string, pointLayerId: string, bounds: Bounds, title: string, legend?: Record<string, LegendItem>);
20
23
  static fromResult(result: unknown): PageMiniMap;
21
24
  protected static validateCommonFields(r: Record<string, unknown>, expectedFetchType: FetchType, context: string): void;
22
25
  protected static assertTemplate(value: unknown, keyName: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"pageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/abstract/pageMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,mCAAmC,CAAC;AAC3C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,wBAAgB,yBAAyB,CACrC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,WAAW,GACxC,IAAI,CAEN;AAED;;GAEG;AACH,8BAAsB,WAAY,SAAQ,OAAO;IAC7C,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IACvC,QAAQ,CAAC,WAAW,oBAAoB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAEpC,SAAS,aAAa,OAAO,EAAE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EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAEpC,SAAS,aACL,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IASvC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW;IAuB/C,SAAS,CAAC,MAAM,CAAC,oBAAoB,CACjC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1B,iBAAiB,EAAE,SAAS,EAC5B,OAAO,EAAE,MAAM,GAChB,IAAI;IA6BP,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;CAQzE"}
@@ -17,10 +17,11 @@ function registerPageMiniMapParser(fetchType, parse) {
17
17
  * Page minimap: vector tiles for a single route/page.
18
18
  */
19
19
  class PageMiniMap extends miniMap_1.MiniMap {
20
- constructor(layerId, bounds, title, legend) {
20
+ constructor(polyLineLayerId, pointLayerId, bounds, title, legend) {
21
21
  super(title);
22
22
  this.miniMapType = miniMapType_1.MiniMapType.Page;
23
- this.layerId = layerId;
23
+ this.polyLineLayerId = polyLineLayerId;
24
+ this.pointLayerId = pointLayerId;
24
25
  this.bounds = bounds;
25
26
  this.legend = legend;
26
27
  }
@@ -50,9 +51,13 @@ class PageMiniMap extends miniMap_1.MiniMap {
50
51
  throw new Error(`${context}.fetchType must be "${expectedFetchType}", got: ${JSON.stringify(r.fetchType)}`);
51
52
  }
52
53
  const title = miniMap_1.MiniMap.assertNonEmptyTitle(r.title, `${context}.title`);
53
- const layerId = r.layerId;
54
- if (typeof layerId !== 'string' || layerId.length === 0) {
55
- throw new Error(`${context}.layerId must be a non-empty string, got: ${typeof layerId}`);
54
+ const polyLineLayerId = r.polyLineLayerId;
55
+ if (typeof polyLineLayerId !== 'string' || polyLineLayerId.length === 0) {
56
+ throw new Error(`${context}.polyLineLayerId must be a non-empty string, got: ${typeof polyLineLayerId}`);
57
+ }
58
+ const pointLayerId = r.pointLayerId;
59
+ if (typeof pointLayerId !== 'string' || pointLayerId.length === 0) {
60
+ throw new Error(`${context}.pointLayerId must be a non-empty string, got: ${typeof pointLayerId}`);
56
61
  }
57
62
  r.title = title;
58
63
  r.bounds = bounds_1.Bounds.fromResult(r.bounds);
@@ -5,7 +5,7 @@ import type { LegendItem } from '../legend/abstract/legendItem';
5
5
  export declare class OfflinePageMiniMap extends PageMiniMap implements OfflineMiniMap {
6
6
  readonly fetchType: "offline";
7
7
  offlineTilesTemplate: string;
8
- constructor(layerId: string, offlineTilesTemplate: string, bounds: Bounds, title: string, legend?: Record<string, LegendItem>);
8
+ constructor(polyLineLayerId: string, pointLayerId: string, offlineTilesTemplate: string, bounds: Bounds, title: string, legend?: Record<string, LegendItem>);
9
9
  toPlain(): Record<string, unknown>;
10
10
  static fromResult(result: unknown): OfflinePageMiniMap;
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"offlinePageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/offlinePageMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,WAAW,EAA6B,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,qBAAa,kBAAmB,SAAQ,WAAY,YAAW,cAAc;IACzE,QAAQ,CAAC,SAAS,EAAG,SAAS,CAAU;IACxC,oBAAoB,EAAE,MAAM,CAAC;gBAGzB,OAAO,EAAE,MAAM,EACf,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAMvC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAsBlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB;CAUzD"}
1
+ {"version":3,"file":"offlinePageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/offlinePageMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,WAAW,EAA6B,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,qBAAa,kBAAmB,SAAQ,WAAY,YAAW,cAAc;IACzE,QAAQ,CAAC,SAAS,EAAG,SAAS,CAAU;IACxC,oBAAoB,EAAE,MAAM,CAAC;gBAGzB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAMvC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAuBlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB;CAUzD"}
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OfflinePageMiniMap = void 0;
4
4
  const pageMiniMap_1 = require("../abstract/pageMiniMap");
5
5
  class OfflinePageMiniMap extends pageMiniMap_1.PageMiniMap {
6
- constructor(layerId, offlineTilesTemplate, bounds, title, legend) {
7
- super(layerId, bounds, title, legend);
6
+ constructor(polyLineLayerId, pointLayerId, offlineTilesTemplate, bounds, title, legend) {
7
+ super(polyLineLayerId, pointLayerId, bounds, title, legend);
8
8
  this.fetchType = 'offline';
9
9
  this.offlineTilesTemplate = offlineTilesTemplate;
10
10
  }
@@ -12,7 +12,8 @@ class OfflinePageMiniMap extends pageMiniMap_1.PageMiniMap {
12
12
  const plain = {
13
13
  fetchType: this.fetchType,
14
14
  miniMapType: this.miniMapType,
15
- layerId: this.layerId,
15
+ polyLineLayerId: this.polyLineLayerId,
16
+ pointLayerId: this.pointLayerId,
16
17
  offlineTilesTemplate: this.offlineTilesTemplate,
17
18
  bounds: {
18
19
  north: this.bounds.north,
@@ -6,7 +6,7 @@ import { OfflinePageMiniMap } from './offlinePageMiniMap';
6
6
  export declare class OnlinePageMiniMap extends PageMiniMap implements OnlineMiniMap {
7
7
  readonly fetchType: "online";
8
8
  onlineTilesTemplate: string;
9
- constructor(layerId: string, onlineTilesTemplate: string, bounds: Bounds, title: string, legend?: Record<string, LegendItem>);
9
+ constructor(polyLineLayerId: string, pointLayerId: string, onlineTilesTemplate: string, bounds: Bounds, title: string, legend?: Record<string, LegendItem>);
10
10
  toOffline(offlineTilesTemplate: string): OfflinePageMiniMap;
11
11
  static fromResult(result: unknown): OnlinePageMiniMap;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"onlinePageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/onlinePageMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAA6B,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBAAkB,SAAQ,WAAY,YAAW,aAAa;IACvE,QAAQ,CAAC,SAAS,EAAG,QAAQ,CAAU;IACvC,mBAAmB,EAAE,MAAM,CAAC;gBAGxB,OAAO,EAAE,MAAM,EACf,mBAAmB,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAMvC,SAAS,CAAC,oBAAoB,EAAE,MAAM,GAAG,kBAAkB;IAI3D,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB;CAUxD"}
1
+ {"version":3,"file":"onlinePageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/onlinePageMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAA6B,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBAAkB,SAAQ,WAAY,YAAW,aAAa;IACvE,QAAQ,CAAC,SAAS,EAAG,QAAQ,CAAU;IACvC,mBAAmB,EAAE,MAAM,CAAC;gBAGxB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,mBAAmB,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAMvC,SAAS,CAAC,oBAAoB,EAAE,MAAM,GAAG,kBAAkB;IAW3D,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB;CAUxD"}
@@ -4,13 +4,13 @@ exports.OnlinePageMiniMap = void 0;
4
4
  const pageMiniMap_1 = require("../abstract/pageMiniMap");
5
5
  const offlinePageMiniMap_1 = require("./offlinePageMiniMap");
6
6
  class OnlinePageMiniMap extends pageMiniMap_1.PageMiniMap {
7
- constructor(layerId, onlineTilesTemplate, bounds, title, legend) {
8
- super(layerId, bounds, title, legend);
7
+ constructor(polyLineLayerId, pointLayerId, onlineTilesTemplate, bounds, title, legend) {
8
+ super(polyLineLayerId, pointLayerId, bounds, title, legend);
9
9
  this.fetchType = 'online';
10
10
  this.onlineTilesTemplate = onlineTilesTemplate;
11
11
  }
12
12
  toOffline(offlineTilesTemplate) {
13
- return new offlinePageMiniMap_1.OfflinePageMiniMap(this.layerId, offlineTilesTemplate, this.bounds, this.title, this.legend);
13
+ return new offlinePageMiniMap_1.OfflinePageMiniMap(this.polyLineLayerId, this.pointLayerId, offlineTilesTemplate, this.bounds, this.title, this.legend);
14
14
  }
15
15
  static fromResult(result) {
16
16
  if (result == null || typeof result !== 'object') {
@@ -29,7 +29,7 @@ export declare class OfflineRopewikiPageView extends RopewikiPageView implements
29
29
  } | number | null, exitTime: {
30
30
  min: number;
31
31
  max: number;
32
- } | number | null, approachElevGain: number | null, descentElevGain: number | null, exitElevGain: number | null, months: string[], latestRevisionDate: Date, bannerImage: OfflineBetaSectionImage | null, betaSections: OfflineBetaSection[], miniMap: OfflinePageMiniMap | OfflineCenteredRegionMiniMap | null, coordinates: {
32
+ } | number | null, approachElevGain: number | null, descentElevGain: number | null, exitElevGain: number | null, months: string[], latestRevisionDate: Date, bannerImage: OfflineBetaSectionImage | null, betaSections: OfflineBetaSection[], mapDataId: string | null, miniMap: OfflinePageMiniMap | OfflineCenteredRegionMiniMap | null, coordinates: {
33
33
  lat: number;
34
34
  lon: number;
35
35
  } | null);
@@ -1 +1 @@
1
- {"version":3,"file":"offlineRopewikiPageView.d.ts","sourceRoot":"","sources":["../../../src/models/pageViews/offlineRopewikiPageView.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC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,IAAI,EAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,WAAW,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,IAAI,EACzD,YAAY,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,IAAI,EAC1D,WAAW,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,IAAI,EACzD,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,IAAI,EACtD,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAC/B,eAAe,EAAE,MAAM,GAAG,IAAI,EAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,MAAM,EAAE,MAAM,EAAE,EAChB,kBAAkB,EAAE,IAAI,EACxB,WAAW,EAAE,uBAAuB,GAAG,IAAI,EAC3C,YAAY,EAAE,kBAAkB,EAAE,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,OAAO,EAAE,kBAAkB,GAAG,4BAA4B,GAAG,IAAI,EACjE,WAAW,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAuCpD,aAAa,IAAI,kBAAkB;IAqBnC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,uBAAuB;CAuC9D"}
@@ -10,8 +10,8 @@ const offlinePagePreview_1 = require("../previews/offlinePagePreview");
10
10
  const pageDataSource_1 = require("../pageDataSource");
11
11
  const ropewikiPageView_1 = require("./ropewikiPageView");
12
12
  class OfflineRopewikiPageView extends ropewikiPageView_1.RopewikiPageView {
13
- constructor(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, bannerImage, betaSections, miniMap, coordinates) {
14
- super(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, coordinates);
13
+ constructor(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, bannerImage, betaSections, mapDataId, miniMap, coordinates) {
14
+ super(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, mapDataId, coordinates);
15
15
  this.fetchType = 'offline';
16
16
  this.bannerImage = bannerImage;
17
17
  this.betaSections = betaSections;
@@ -19,7 +19,7 @@ class OfflineRopewikiPageView extends ropewikiPageView_1.RopewikiPageView {
19
19
  }
20
20
  toPagePreview() {
21
21
  const mapData = this.miniMap != null && this.miniMap.miniMapType === miniMapType_1.MiniMapType.Page
22
- ? this.miniMap.layerId
22
+ ? this.mapDataId
23
23
  : null;
24
24
  return new offlinePagePreview_1.OfflinePagePreview(this.id, pageDataSource_1.PageDataSource.Ropewiki, this.bannerImage?.downloadedBannerPath ?? null, this.quality, this.userVotes, this.name, this.regions.map((region) => region.name), this.aka, this.difficulty, mapData, this.url, this.permit);
25
25
  }
@@ -35,7 +35,7 @@ export declare class OnlineRopewikiPageView extends RopewikiPageView implements
35
35
  } | number | null, exitTime: {
36
36
  min: number;
37
37
  max: number;
38
- } | number | null, approachElevGain: number | null, descentElevGain: number | null, exitElevGain: number | null, months: string[], latestRevisionDate: Date, bannerImage: OnlineBetaSectionImage | null, betaSections: OnlineBetaSection[], miniMap: OnlinePageMiniMap | OnlineCenteredRegionMiniMap | null, coordinates: {
38
+ } | number | null, approachElevGain: number | null, descentElevGain: number | null, exitElevGain: number | null, months: string[], latestRevisionDate: Date, bannerImage: OnlineBetaSectionImage | null, betaSections: OnlineBetaSection[], mapDataId: string | null, miniMap: OnlinePageMiniMap | OnlineCenteredRegionMiniMap | null, coordinates: {
39
39
  lat: number;
40
40
  lon: number;
41
41
  } | null);
@@ -1 +1 @@
1
- {"version":3,"file":"onlineRopewikiPageView.d.ts","sourceRoot":"","sources":["../../../src/models/pageViews/onlineRopewikiPageView.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAgB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAkC,gBAAgB,EAAE,MAAM,oBAAoB,CAAC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GAAG,IAAI;IAuCpD,qBAAqB,IAAI,KAAK,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAkBvD,SAAS,CACL,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACtD,iBAAiB,CAAC,EAAE,kBAAkB,GAAG,4BAA4B,GAAG,IAAI,GAC7E,uBAAuB;IAwE1B,aAAa,IAAI,iBAAiB;IAqBlC,WAAW,IAAI,SAAS;IAIxB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,sBAAsB;CAuC7D"}
@@ -14,8 +14,8 @@ const pageDataSource_1 = require("../pageDataSource");
14
14
  const offlineRopewikiPageView_1 = require("./offlineRopewikiPageView");
15
15
  const ropewikiPageView_1 = require("./ropewikiPageView");
16
16
  class OnlineRopewikiPageView extends ropewikiPageView_1.RopewikiPageView {
17
- constructor(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, bannerImage, betaSections, miniMap, coordinates) {
18
- super(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, coordinates);
17
+ constructor(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, bannerImage, betaSections, mapDataId, miniMap, coordinates) {
18
+ super(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, mapDataId, coordinates);
19
19
  this.fetchType = 'online';
20
20
  this.bannerImage = bannerImage;
21
21
  this.betaSections = betaSections;
@@ -56,11 +56,11 @@ class OnlineRopewikiPageView extends ropewikiPageView_1.RopewikiPageView {
56
56
  }
57
57
  offlineMiniMap = downloadedMiniMap;
58
58
  }
59
- return new offlineRopewikiPageView_1.OfflineRopewikiPageView(this.id, this.routeType, this.name, this.aka, this.url, this.quality, this.userVotes, this.regions, this.difficulty, this.permit, this.rappelCount, this.jumps, this.vehicle, this.rappelLongest, this.shuttleTime, this.overallLength, this.descentLength, this.exitLength, this.approachLength, this.overallTime, this.approachTime, this.descentTime, this.exitTime, this.approachElevGain, this.descentElevGain, this.exitElevGain, this.months, this.latestRevisionDate, offlineBannerImage, offlineSections, offlineMiniMap, this.coordinates);
59
+ return new offlineRopewikiPageView_1.OfflineRopewikiPageView(this.id, this.routeType, this.name, this.aka, this.url, this.quality, this.userVotes, this.regions, this.difficulty, this.permit, this.rappelCount, this.jumps, this.vehicle, this.rappelLongest, this.shuttleTime, this.overallLength, this.descentLength, this.exitLength, this.approachLength, this.overallTime, this.approachTime, this.descentTime, this.exitTime, this.approachElevGain, this.descentElevGain, this.exitElevGain, this.months, this.latestRevisionDate, offlineBannerImage, offlineSections, this.mapDataId, offlineMiniMap, this.coordinates);
60
60
  }
61
61
  toPagePreview() {
62
62
  const mapData = this.miniMap != null && this.miniMap.miniMapType === miniMapType_1.MiniMapType.Page
63
- ? this.miniMap.layerId
63
+ ? this.mapDataId
64
64
  : null;
65
65
  return new onlinePagePreview_1.OnlinePagePreview(this.id, pageDataSource_1.PageDataSource.Ropewiki, this.bannerImage?.bannerUrl ?? null, this.quality, this.userVotes, this.name, this.regions.map((region) => region.name), this.aka, this.difficulty, mapData, this.url, this.permit);
66
66
  }
@@ -43,6 +43,8 @@ export declare abstract class RopewikiPageView {
43
43
  exitElevGain: number | null;
44
44
  months: string[];
45
45
  latestRevisionDate: Date;
46
+ /** Map data record id for vector tile fetches; null when no page map or only a region-style minimap. */
47
+ mapDataId: string | null;
46
48
  coordinates: {
47
49
  lat: number;
48
50
  lon: number;
@@ -50,7 +52,7 @@ export declare abstract class RopewikiPageView {
50
52
  protected constructor(id: string, routeType: RouteType, name: string, aka: string[], url: string, quality: number, userVotes: number, regions: {
51
53
  name: string;
52
54
  id: string;
53
- }[], difficulty: Difficulty, permit: PermitStatus | null, rappelCount: MinMax | number | null, jumps: number | null, vehicle: string | null, rappelLongest: number | null, shuttleTime: number | null, overallLength: number | null, descentLength: number | null, exitLength: number | null, approachLength: number | null, overallTime: MinMax | number | null, approachTime: MinMax | number | null, descentTime: MinMax | number | null, exitTime: MinMax | number | null, approachElevGain: number | null, descentElevGain: number | null, exitElevGain: number | null, months: string[], latestRevisionDate: Date, coordinates: {
55
+ }[], difficulty: Difficulty, permit: PermitStatus | null, rappelCount: MinMax | number | null, jumps: number | null, vehicle: string | null, rappelLongest: number | null, shuttleTime: number | null, overallLength: number | null, descentLength: number | null, exitLength: number | null, approachLength: number | null, overallTime: MinMax | number | null, approachTime: MinMax | number | null, descentTime: MinMax | number | null, exitTime: MinMax | number | null, approachElevGain: number | null, descentElevGain: number | null, exitElevGain: number | null, months: string[], latestRevisionDate: Date, mapDataId: string | null, coordinates: {
54
56
  lat: number;
55
57
  lon: number;
56
58
  } | null);
@@ -60,6 +62,7 @@ export declare abstract class RopewikiPageView {
60
62
  private static assertRouteType;
61
63
  protected static assertString(obj: Record<string, unknown>, key: string): void;
62
64
  protected static assertNullableString(obj: Record<string, unknown>, key: string): void;
65
+ private static assertNullableMapDataId;
63
66
  protected static parseCoordinateComponent(value: unknown): number | null;
64
67
  protected static assertNullableCoordinates(obj: Record<string, unknown>, key: string): void;
65
68
  protected static assertNumber(obj: Record<string, unknown>, key: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"ropewikiPageView.d.ts","sourceRoot":"","sources":["../../../src/models/pageViews/ropewikiPageView.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AAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAgB9E,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAC9B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,GAAG,EAAE,MAAM,GACZ,IAAI;IAwBP,SAAS,CAAC,MAAM,CAAC,oBAAoB,CACjC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,GAAG,EAAE,MAAM,GACZ,IAAI;IAIP,SAAS,CAAC,MAAM,CAAC,uBAAuB,CACpC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,GAAG,EAAE,MAAM,GACZ,IAAI;CAcV"}
@@ -12,7 +12,7 @@ function registerRopewikiPageViewParser(fetchType, parse) {
12
12
  ropewikiPageViewParsers.set(fetchType, parse);
13
13
  }
14
14
  class RopewikiPageView {
15
- constructor(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, coordinates) {
15
+ constructor(id, routeType, name, aka, url, quality, userVotes, regions, difficulty, permit, rappelCount, jumps, vehicle, rappelLongest, shuttleTime, overallLength, descentLength, exitLength, approachLength, overallTime, approachTime, descentTime, exitTime, approachElevGain, descentElevGain, exitElevGain, months, latestRevisionDate, mapDataId, coordinates) {
16
16
  this.pageViewType = pageViewType_1.PageViewType.Ropewiki;
17
17
  this.id = id;
18
18
  this.routeType = routeType;
@@ -42,6 +42,7 @@ class RopewikiPageView {
42
42
  this.exitElevGain = exitElevGain;
43
43
  this.months = Array.isArray(months) ? months.slice() : [];
44
44
  this.latestRevisionDate = new Date(latestRevisionDate);
45
+ this.mapDataId = mapDataId;
45
46
  this.coordinates =
46
47
  coordinates != null
47
48
  ? { lat: coordinates.lat, lon: coordinates.lon }
@@ -92,6 +93,7 @@ class RopewikiPageView {
92
93
  RopewikiPageView.assertNullableNumber(r, 'exitElevGain');
93
94
  RopewikiPageView.assertStringArray(r, 'months');
94
95
  RopewikiPageView.assertIso8601DateString(r, 'latestRevisionDate');
96
+ RopewikiPageView.assertNullableMapDataId(r, 'mapDataId');
95
97
  RopewikiPageView.assertNullableCoordinates(r, 'coordinates');
96
98
  if (r.fetchType !== expectedFetchType) {
97
99
  throw new Error(`${context}.fetchType must be "${expectedFetchType}", got: ${JSON.stringify(r.fetchType)}`);
@@ -123,6 +125,16 @@ class RopewikiPageView {
123
125
  throw new Error(`RopewikiPageView.${key} must be string or null, got: ${typeof v}`);
124
126
  }
125
127
  }
128
+ static assertNullableMapDataId(obj, key) {
129
+ const v = obj[key];
130
+ if (v === null || v === undefined) {
131
+ obj[key] = null;
132
+ return;
133
+ }
134
+ if (typeof v !== 'string' || v.length === 0) {
135
+ throw new Error(`RopewikiPageView.${key} must be a non-empty string or null, got: ${typeof v === 'string' ? 'empty string' : typeof v}`);
136
+ }
137
+ }
126
138
  static parseCoordinateComponent(value) {
127
139
  if (typeof value === 'number' && Number.isFinite(value)) {
128
140
  return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ropegeo-common",
3
- "version": "1.13.0",
3
+ "version": "1.15.0",
4
4
  "description": "Shared domain models and helpers for RopeGeo and WebScraper",
5
5
  "license": "ISC",
6
6
  "repository": {