ropegeo-common 1.20.2 → 1.21.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.
Files changed (31) hide show
  1. package/dist/models/betaSections/betaSection.d.ts +6 -0
  2. package/dist/models/betaSections/betaSection.d.ts.map +1 -1
  3. package/dist/models/betaSections/betaSection.js +15 -0
  4. package/dist/models/betaSections/betaSectionExcerpt.d.ts +12 -0
  5. package/dist/models/betaSections/betaSectionExcerpt.d.ts.map +1 -0
  6. package/dist/models/betaSections/betaSectionExcerpt.js +61 -0
  7. package/dist/models/index.d.ts +4 -0
  8. package/dist/models/index.d.ts.map +1 -1
  9. package/dist/models/index.js +10 -2
  10. package/dist/models/minimap/legend/abstract/legendItem.d.ts +5 -1
  11. package/dist/models/minimap/legend/abstract/legendItem.d.ts.map +1 -1
  12. package/dist/models/minimap/legend/abstract/legendItem.js +14 -1
  13. package/dist/models/minimap/legend/concrete/imageContext.d.ts +10 -0
  14. package/dist/models/minimap/legend/concrete/imageContext.d.ts.map +1 -0
  15. package/dist/models/minimap/legend/concrete/imageContext.js +38 -0
  16. package/dist/models/minimap/legend/concrete/lineLegendItem.d.ts +2 -1
  17. package/dist/models/minimap/legend/concrete/lineLegendItem.d.ts.map +1 -1
  18. package/dist/models/minimap/legend/concrete/lineLegendItem.js +5 -3
  19. package/dist/models/minimap/legend/concrete/measurementContext.d.ts +13 -0
  20. package/dist/models/minimap/legend/concrete/measurementContext.d.ts.map +1 -0
  21. package/dist/models/minimap/legend/concrete/measurementContext.js +56 -0
  22. package/dist/models/minimap/legend/concrete/pointLegendItem.d.ts +2 -1
  23. package/dist/models/minimap/legend/concrete/pointLegendItem.d.ts.map +1 -1
  24. package/dist/models/minimap/legend/concrete/pointLegendItem.js +5 -3
  25. package/dist/models/minimap/legend/concrete/polygonLegendItem.d.ts +2 -1
  26. package/dist/models/minimap/legend/concrete/polygonLegendItem.d.ts.map +1 -1
  27. package/dist/models/minimap/legend/concrete/polygonLegendItem.js +5 -3
  28. package/dist/models/minimap/legend/concrete/relevantContext.d.ts +15 -0
  29. package/dist/models/minimap/legend/concrete/relevantContext.d.ts.map +1 -0
  30. package/dist/models/minimap/legend/concrete/relevantContext.js +82 -0
  31. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import { FetchType } from '../fetchType';
2
+ import { BetaSectionExcerpt } from './betaSectionExcerpt';
2
3
  import { BetaSectionImage } from './betaSectionImage';
3
4
  export declare function registerBetaSectionParser(fetchType: FetchType, parse: (body: unknown) => BetaSection): void;
4
5
  export declare abstract class BetaSection {
@@ -8,6 +9,11 @@ export declare abstract class BetaSection {
8
9
  text: string;
9
10
  latestRevisionDate: Date;
10
11
  protected constructor(order: number, title: string, text: string, latestRevisionDate: Date);
12
+ /**
13
+ * Builds a {@link BetaSectionExcerpt} for a verbatim excerpt from this section's text.
14
+ * When the excerpt cannot be located, `start` and `end` are left undefined.
15
+ */
16
+ toExcerpt(excerptText: string, confidence: number): BetaSectionExcerpt;
11
17
  static fromResponseBody(body: unknown, fetchType?: FetchType): BetaSection;
12
18
  protected static assertNumber(obj: Record<string, unknown>, key: string): void;
13
19
  protected static assertString(obj: Record<string, unknown>, key: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"betaSection.d.ts","sourceRoot":"","sources":["../../../src/models/betaSections/betaSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD,wBAAgB,yBAAyB,CACrC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,WAAW,GACtC,IAAI,CAEN;AAED,8BAAsB,WAAW;IAC7B,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;I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X,iBAAiB,EAAE,SAAS,GAC7B,gBAAgB,EAAE;CAOxB"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BetaSection = void 0;
4
4
  exports.registerBetaSectionParser = registerBetaSectionParser;
5
+ const betaSectionExcerpt_1 = require("./betaSectionExcerpt");
5
6
  const betaSectionImage_1 = require("./betaSectionImage");
6
7
  const betaSectionParsers = new Map();
7
8
  function registerBetaSectionParser(fetchType, parse) {
@@ -14,6 +15,20 @@ class BetaSection {
14
15
  this.text = text;
15
16
  this.latestRevisionDate = new Date(latestRevisionDate);
16
17
  }
18
+ /**
19
+ * Builds a {@link BetaSectionExcerpt} for a verbatim excerpt from this section's text.
20
+ * When the excerpt cannot be located, `start` and `end` are left undefined.
21
+ */
22
+ toExcerpt(excerptText, confidence) {
23
+ if (excerptText.length === 0) {
24
+ return new betaSectionExcerpt_1.BetaSectionExcerpt(undefined, undefined, undefined, confidence);
25
+ }
26
+ const start = this.text.indexOf(excerptText);
27
+ if (start === -1) {
28
+ return new betaSectionExcerpt_1.BetaSectionExcerpt(excerptText, undefined, undefined, confidence);
29
+ }
30
+ return new betaSectionExcerpt_1.BetaSectionExcerpt(excerptText, start, start + excerptText.length, confidence);
31
+ }
17
32
  static fromResponseBody(body, fetchType) {
18
33
  if (body == null || typeof body !== 'object') {
19
34
  throw new Error('BetaSection body must be an object');
@@ -0,0 +1,12 @@
1
+ export declare class BetaSectionExcerpt {
2
+ readonly text?: string;
3
+ readonly start?: number;
4
+ readonly end?: number;
5
+ readonly confidence: number;
6
+ constructor(text: string | undefined, start: number | undefined, end: number | undefined, confidence: number);
7
+ toPlain(): Record<string, unknown>;
8
+ static fromResult(result: unknown): BetaSectionExcerpt;
9
+ private static assertConfidence;
10
+ private static assertNonNegativeInteger;
11
+ }
12
+ //# sourceMappingURL=betaSectionExcerpt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"betaSectionExcerpt.d.ts","sourceRoot":"","sources":["../../../src/models/betaSections/betaSectionExcerpt.ts"],"names":[],"mappings":"AAAA,qBAAa,kBAAkB;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAGxB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,UAAU,EAAE,MAAM;IAStB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAclC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB;IAgCtD,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAQ/B,OAAO,CAAC,MAAM,CAAC,wBAAwB;CAK1C"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BetaSectionExcerpt = void 0;
4
+ class BetaSectionExcerpt {
5
+ constructor(text, start, end, confidence) {
6
+ BetaSectionExcerpt.assertConfidence(confidence);
7
+ this.text = text;
8
+ this.start = start;
9
+ this.end = end;
10
+ this.confidence = confidence;
11
+ }
12
+ toPlain() {
13
+ const out = { confidence: this.confidence };
14
+ if (this.text !== undefined) {
15
+ out.text = this.text;
16
+ }
17
+ if (this.start !== undefined) {
18
+ out.start = this.start;
19
+ }
20
+ if (this.end !== undefined) {
21
+ out.end = this.end;
22
+ }
23
+ return out;
24
+ }
25
+ static fromResult(result) {
26
+ if (result == null || typeof result !== 'object' || Array.isArray(result)) {
27
+ throw new Error('BetaSectionExcerpt result must be an object');
28
+ }
29
+ const r = result;
30
+ BetaSectionExcerpt.assertConfidence(r.confidence);
31
+ let text;
32
+ if (r.text !== undefined) {
33
+ if (typeof r.text !== 'string') {
34
+ throw new Error(`BetaSectionExcerpt.text must be a string, got: ${typeof r.text}`);
35
+ }
36
+ text = r.text;
37
+ }
38
+ let start;
39
+ if (r.start !== undefined) {
40
+ BetaSectionExcerpt.assertNonNegativeInteger(r.start, 'BetaSectionExcerpt.start');
41
+ start = r.start;
42
+ }
43
+ let end;
44
+ if (r.end !== undefined) {
45
+ BetaSectionExcerpt.assertNonNegativeInteger(r.end, 'BetaSectionExcerpt.end');
46
+ end = r.end;
47
+ }
48
+ return new BetaSectionExcerpt(text, start, end, r.confidence);
49
+ }
50
+ static assertConfidence(value) {
51
+ if (typeof value !== 'number' || !Number.isFinite(value) || value < 0 || value > 1) {
52
+ throw new Error(`BetaSectionExcerpt.confidence must be a number from 0 to 1, got: ${JSON.stringify(value)}`);
53
+ }
54
+ }
55
+ static assertNonNegativeInteger(value, context) {
56
+ if (typeof value !== 'number' || !Number.isFinite(value) || value < 0 || !Number.isInteger(value)) {
57
+ throw new Error(`${context} must be a non-negative integer, got: ${JSON.stringify(value)}`);
58
+ }
59
+ }
60
+ }
61
+ exports.BetaSectionExcerpt = BetaSectionExcerpt;
@@ -56,6 +56,7 @@ export { OnlineBetaSectionImage } from './betaSections/onlineBetaSectionImage';
56
56
  export { OfflineBetaSectionImage } from './betaSections/offlineBetaSectionImage';
57
57
  export { DownloadBytes } from './betaSections/downloadBytes';
58
58
  export { BetaSection } from './betaSections/betaSection';
59
+ export { BetaSectionExcerpt } from './betaSections/betaSectionExcerpt';
59
60
  export { OnlineBetaSection } from './betaSections/onlineBetaSection';
60
61
  export { OfflineBetaSection } from './betaSections/offlineBetaSection';
61
62
  export { Bounds } from './minimap/bounds';
@@ -64,6 +65,9 @@ export { LegendItem, registerLegendItemParser } from './minimap/legend/abstract/
64
65
  export { PointLegendItem } from './minimap/legend/concrete/pointLegendItem';
65
66
  export { LineLegendItem } from './minimap/legend/concrete/lineLegendItem';
66
67
  export { PolygonLegendItem } from './minimap/legend/concrete/polygonLegendItem';
68
+ export { RelevantContext } from './minimap/legend/concrete/relevantContext';
69
+ export { MeasurementContext } from './minimap/legend/concrete/measurementContext';
70
+ export { ImageContext } from './minimap/legend/concrete/imageContext';
67
71
  export { MiniMapType } from './minimap/abstract/miniMapType';
68
72
  export type { OnlineMiniMap } from './minimap/abstract/onlineMiniMap';
69
73
  export type { OfflineMiniMap } from './minimap/abstract/offlineMiniMap';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,wCAAwC,CAAC;AAChD,OAAO,8CAA8C,CAAC;AACtD,OAAO,kDAAkD,CAAC;AAC1D,OAAO,8CAA8C,CAAC;AACtD,OAAO,2CAA2C,CAAC;AACnD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,qCAAqC,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACH,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,iCAAiC,GACpC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,4CAA4C;AAC5C,OAAO,EAAE,qBAAqB,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,wCAAwC;AACxC,OAAO,EAAE,iBAAiB,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClF,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAChF,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAChF,6CAA6C;AAC7C,OAAO,EAAE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E,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,YAAY,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EACH,SAAS,EACT,uBAAuB,EACvB,qCAAqC,EACrC,KAAK,oBAAoB,EACzB,KAAK,iCAAiC,GACzC,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Preview = exports.RopewikiVehicleType = exports.PermitStatus = exports.SavedFilters = exports.SavedPagesFilter = exports.SearchFilter = exports.RouteFilter = exports.RiskMinMax = exports.TimeMinMax = exports.WaterMinMax = exports.TechnicalMinMax = exports.AcaDifficultyFilterOptions = exports.registerDifficultyFilterOptionsParser = exports.DifficultyFilterOptions = exports.Q_ACA_RISK = exports.Q_ACA_TIME = exports.Q_ACA_WATER = exports.Q_ACA_TECHNICAL = exports.Q_DIFFICULTY_TYPE = exports.AcaDifficultyParams = exports.isDifficultyParamsActive = exports.registerDifficultyParamsQueryParser = exports.registerDifficultyParamsQueryInference = exports.DifficultyParams = exports.AcaRiskRating = exports.AcaTimeRating = exports.AcaWaterRating = exports.AcaTechnicalRating = exports.AcaDifficulty = exports.Difficulty = exports.DifficultyType = exports.DifficultyRisk = exports.DifficultyTime = exports.DifficultyWater = exports.DifficultyTechnical = exports.AcaDifficultyRating = exports.RISK_ORDER = exports.AcaWaterSubRating = exports.AcaTimeSubRating = exports.AcaTechnicalSubRating = exports.AcaRiskSubRating = exports.ACA_WATER_ORDER = exports.ACA_TIME_ORDER = exports.ACA_TECHNICAL_ORDER = exports.ACA_RISK_ORDER = exports.resolveDifficultyRatingFromRecord = exports.registerDifficultyParser = exports.DifficultyRating = exports.DifficultyRatingSystem = exports.PageDataSource = void 0;
4
- exports.MILES = exports.LengthMeasurement = exports.MinMax = exports.FREEDOM_MEASUREMENT_SYSTEM = exports.Measurement = exports.formatMeasurementValue = exports.OfflineRopewikiPageView = exports.OnlineRopewikiPageView = exports.BaseRopewikiPageView = exports.PageView = exports.PageViewType = exports.RopewikiPageViewResult = exports.RopewikiPageView = exports.OfflineCenteredRegionMiniMap = exports.OnlineCenteredRegionMiniMap = exports.OfflineRegionMiniMap = exports.OnlineRegionMiniMap = exports.OfflinePageMiniMap = exports.OnlinePageMiniMap = exports.CenteredRegionMiniMap = exports.PageMiniMap = exports.RegionMiniMap = exports.MiniMap = exports.MiniMapType = exports.PolygonLegendItem = exports.LineLegendItem = exports.PointLegendItem = exports.registerLegendItemParser = exports.LegendItem = exports.LEGEND_FEATURE_TYPES = exports.LegendFeatureType = exports.Bounds = exports.OfflineBetaSection = exports.OnlineBetaSection = exports.BetaSection = exports.DownloadBytes = exports.OfflineBetaSectionImage = exports.OnlineBetaSectionImage = exports.BetaSectionImage = exports.RoutesParams = exports.RouteResult = exports.RoutesGeojson = exports.RouteType = exports.RouteGeoJsonFeature = exports.Route = exports.RegionPreview = exports.OfflinePagePreview = exports.OnlinePagePreview = exports.PagePreview = exports.PreviewType = void 0;
5
- exports.DOWNLOADED_ROUTE_PREVIEWS_STORAGE_KEY = exports.SAVED_PAGES_STORAGE_KEY = exports.SavedPage = exports.ImageVersions = exports.VERSION_FORMAT = exports.ImageVersion = exports.RoutePreviewResult = exports.RopewikiRegionImagesResult = exports.RopewikiRegionImagesParams = exports.RopewikiRegionImageView = exports.RegionImagesCursor = exports.RopewikiRegionPreviewsResult = exports.RopewikiRegionPreviewsParams = exports.RegionPreviewsCursor = exports.RopewikiRegionViewResult = exports.RopewikiRegionView = exports.SearchResults = exports.SearchParams = exports.SearchCursor = exports.MapDataTileKeysResults = exports.registerPaginationParser = exports.PaginationResultType = exports.PaginationResults = exports.registerCursorPaginationParser = exports.CursorPaginationResultType = exports.CursorPaginationResults = exports.registerResultParser = exports.ResultType = exports.Result = exports.PaginationParams = exports.CursorPaginationParams = exports.CursorType = exports.Cursor = exports.RopewikiPageLinkPreviewResult = exports.LinkPreviewImage = exports.LinkPreview = exports.DAYS = exports.HOURS = exports.MINUTES = exports.TimeMeasurement = exports.FEET = void 0;
4
+ exports.Measurement = exports.formatMeasurementValue = exports.OfflineRopewikiPageView = exports.OnlineRopewikiPageView = exports.BaseRopewikiPageView = exports.PageView = exports.PageViewType = exports.RopewikiPageViewResult = exports.RopewikiPageView = exports.OfflineCenteredRegionMiniMap = exports.OnlineCenteredRegionMiniMap = exports.OfflineRegionMiniMap = exports.OnlineRegionMiniMap = exports.OfflinePageMiniMap = exports.OnlinePageMiniMap = exports.CenteredRegionMiniMap = exports.PageMiniMap = exports.RegionMiniMap = exports.MiniMap = exports.MiniMapType = exports.ImageContext = exports.MeasurementContext = exports.RelevantContext = exports.PolygonLegendItem = exports.LineLegendItem = exports.PointLegendItem = exports.registerLegendItemParser = exports.LegendItem = exports.LEGEND_FEATURE_TYPES = exports.LegendFeatureType = exports.Bounds = exports.OfflineBetaSection = exports.OnlineBetaSection = exports.BetaSectionExcerpt = exports.BetaSection = exports.DownloadBytes = exports.OfflineBetaSectionImage = exports.OnlineBetaSectionImage = exports.BetaSectionImage = exports.RoutesParams = exports.RouteResult = exports.RoutesGeojson = exports.RouteType = exports.RouteGeoJsonFeature = exports.Route = exports.RegionPreview = exports.OfflinePagePreview = exports.OnlinePagePreview = exports.PagePreview = exports.PreviewType = void 0;
5
+ exports.DOWNLOADED_ROUTE_PREVIEWS_STORAGE_KEY = exports.SAVED_PAGES_STORAGE_KEY = exports.SavedPage = exports.ImageVersions = exports.VERSION_FORMAT = exports.ImageVersion = exports.RoutePreviewResult = exports.RopewikiRegionImagesResult = exports.RopewikiRegionImagesParams = exports.RopewikiRegionImageView = exports.RegionImagesCursor = exports.RopewikiRegionPreviewsResult = exports.RopewikiRegionPreviewsParams = exports.RegionPreviewsCursor = exports.RopewikiRegionViewResult = exports.RopewikiRegionView = exports.SearchResults = exports.SearchParams = exports.SearchCursor = exports.MapDataTileKeysResults = exports.registerPaginationParser = exports.PaginationResultType = exports.PaginationResults = exports.registerCursorPaginationParser = exports.CursorPaginationResultType = exports.CursorPaginationResults = exports.registerResultParser = exports.ResultType = exports.Result = exports.PaginationParams = exports.CursorPaginationParams = exports.CursorType = exports.Cursor = exports.RopewikiPageLinkPreviewResult = exports.LinkPreviewImage = exports.LinkPreview = exports.DAYS = exports.HOURS = exports.MINUTES = exports.TimeMeasurement = exports.FEET = exports.MILES = exports.LengthMeasurement = exports.MinMax = exports.FREEDOM_MEASUREMENT_SYSTEM = void 0;
6
6
  require("./api/results/registerAllResultParsers");
7
7
  require("./difficulty/registerDifficultyRatingParsers");
8
8
  require("./filters/registerDifficultyFilterOptionsParsers");
@@ -127,6 +127,8 @@ var downloadBytes_1 = require("./betaSections/downloadBytes");
127
127
  Object.defineProperty(exports, "DownloadBytes", { enumerable: true, get: function () { return downloadBytes_1.DownloadBytes; } });
128
128
  var betaSection_1 = require("./betaSections/betaSection");
129
129
  Object.defineProperty(exports, "BetaSection", { enumerable: true, get: function () { return betaSection_1.BetaSection; } });
130
+ var betaSectionExcerpt_1 = require("./betaSections/betaSectionExcerpt");
131
+ Object.defineProperty(exports, "BetaSectionExcerpt", { enumerable: true, get: function () { return betaSectionExcerpt_1.BetaSectionExcerpt; } });
130
132
  var onlineBetaSection_1 = require("./betaSections/onlineBetaSection");
131
133
  Object.defineProperty(exports, "OnlineBetaSection", { enumerable: true, get: function () { return onlineBetaSection_1.OnlineBetaSection; } });
132
134
  var offlineBetaSection_1 = require("./betaSections/offlineBetaSection");
@@ -145,6 +147,12 @@ var lineLegendItem_1 = require("./minimap/legend/concrete/lineLegendItem");
145
147
  Object.defineProperty(exports, "LineLegendItem", { enumerable: true, get: function () { return lineLegendItem_1.LineLegendItem; } });
146
148
  var polygonLegendItem_1 = require("./minimap/legend/concrete/polygonLegendItem");
147
149
  Object.defineProperty(exports, "PolygonLegendItem", { enumerable: true, get: function () { return polygonLegendItem_1.PolygonLegendItem; } });
150
+ var relevantContext_1 = require("./minimap/legend/concrete/relevantContext");
151
+ Object.defineProperty(exports, "RelevantContext", { enumerable: true, get: function () { return relevantContext_1.RelevantContext; } });
152
+ var measurementContext_1 = require("./minimap/legend/concrete/measurementContext");
153
+ Object.defineProperty(exports, "MeasurementContext", { enumerable: true, get: function () { return measurementContext_1.MeasurementContext; } });
154
+ var imageContext_1 = require("./minimap/legend/concrete/imageContext");
155
+ Object.defineProperty(exports, "ImageContext", { enumerable: true, get: function () { return imageContext_1.ImageContext; } });
148
156
  var miniMapType_1 = require("./minimap/abstract/miniMapType");
149
157
  Object.defineProperty(exports, "MiniMapType", { enumerable: true, get: function () { return miniMapType_1.MiniMapType; } });
150
158
  var miniMap_1 = require("./minimap/abstract/miniMap");
@@ -1,4 +1,5 @@
1
1
  import { LegendFeatureType } from './legendFeatureType';
2
+ import { RelevantContext } from '../concrete/relevantContext';
2
3
  export declare function registerLegendItemParser(featureType: LegendFeatureType, parse: (result: unknown) => LegendItem): void;
3
4
  /**
4
5
  * Base type for page minimap legend entries. Use {@link LegendItem.fromResult} to parse API wire shapes.
@@ -7,7 +8,8 @@ export declare abstract class LegendItem {
7
8
  abstract readonly featureType: LegendFeatureType;
8
9
  readonly id: string;
9
10
  readonly name: string;
10
- protected constructor(id: string, name: string);
11
+ readonly relevantContext: RelevantContext | null;
12
+ protected constructor(id: string, name: string, relevantContext?: RelevantContext | null);
11
13
  /** Serialized shape suitable for JSON / offline persistence. */
12
14
  abstract toPlain(): Record<string, unknown>;
13
15
  /**
@@ -15,6 +17,8 @@ export declare abstract class LegendItem {
15
17
  */
16
18
  static fromResult(result: unknown): LegendItem;
17
19
  static assertNonEmptyString(value: unknown, context: string): string;
20
+ static parseOptionalRelevantContext(value: unknown): RelevantContext | null;
21
+ protected static appendRelevantContextToPlain(base: Record<string, unknown>, relevantContext: RelevantContext | null): void;
18
22
  /**
19
23
  * Parses an optional `legend` object keyed by arbitrary ids to {@link LegendItem} instances.
20
24
  */
@@ -1 +1 @@
1
- {"version":3,"file":"legendItem.d.ts","sourceRoot":"","sources":["../../../../../src/models/minimap/legend/abstract/legendItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAI9E,wBAAgB,wBAAwB,CACpC,WAAW,EAAE,iBAAiB,EAC9B,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,UAAU,GACvC,IAAI,CAEN;AAED;;GAEG;AACH,8BAAsB,UAAU;IAC5B,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACjD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;I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EG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU;IAkB9C,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAOpE,MAAM,CAAC,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI;IAO3E,SAAS,CAAC,MAAM,CAAC,4BAA4B,CACzC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,eAAe,EAAE,eAAe,GAAG,IAAI,GACxC,IAAI;IAMP;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;CAW7F"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LegendItem = void 0;
4
4
  exports.registerLegendItemParser = registerLegendItemParser;
5
5
  const legendFeatureType_1 = require("./legendFeatureType");
6
+ const relevantContext_1 = require("../concrete/relevantContext");
6
7
  const legendItemParsers = new Map();
7
8
  function registerLegendItemParser(featureType, parse) {
8
9
  legendItemParsers.set(featureType, parse);
@@ -11,11 +12,12 @@ function registerLegendItemParser(featureType, parse) {
11
12
  * Base type for page minimap legend entries. Use {@link LegendItem.fromResult} to parse API wire shapes.
12
13
  */
13
14
  class LegendItem {
14
- constructor(id, name) {
15
+ constructor(id, name, relevantContext = null) {
15
16
  LegendItem.assertNonEmptyString(id, 'LegendItem.id');
16
17
  LegendItem.assertNonEmptyString(name, 'LegendItem.name');
17
18
  this.id = id;
18
19
  this.name = name;
20
+ this.relevantContext = relevantContext;
19
21
  }
20
22
  /**
21
23
  * Validates `featureType` and delegates to the matching legend item parser.
@@ -41,6 +43,17 @@ class LegendItem {
41
43
  }
42
44
  return value;
43
45
  }
46
+ static parseOptionalRelevantContext(value) {
47
+ if (value === null || value === undefined) {
48
+ return null;
49
+ }
50
+ return relevantContext_1.RelevantContext.fromResult(value);
51
+ }
52
+ static appendRelevantContextToPlain(base, relevantContext) {
53
+ if (relevantContext != null) {
54
+ base.relevantContext = relevantContext.toPlain();
55
+ }
56
+ }
44
57
  /**
45
58
  * Parses an optional `legend` object keyed by arbitrary ids to {@link LegendItem} instances.
46
59
  */
@@ -0,0 +1,10 @@
1
+ export declare class ImageContext {
2
+ readonly id: string;
3
+ readonly confidence: number;
4
+ constructor(id: string, confidence: number);
5
+ toPlain(): Record<string, unknown>;
6
+ static fromResult(result: unknown): ImageContext;
7
+ private static assertNonEmptyString;
8
+ private static assertConfidence;
9
+ }
10
+ //# sourceMappingURL=imageContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageContext.d.ts","sourceRoot":"","sources":["../../../../../src/models/minimap/legend/concrete/imageContext.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAEhB,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAO1C,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY;IAUhD,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAOnC,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAOlC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageContext = void 0;
4
+ class ImageContext {
5
+ constructor(id, confidence) {
6
+ ImageContext.assertNonEmptyString(id, 'ImageContext.id');
7
+ ImageContext.assertConfidence(confidence);
8
+ this.id = id;
9
+ this.confidence = confidence;
10
+ }
11
+ toPlain() {
12
+ return {
13
+ id: this.id,
14
+ confidence: this.confidence,
15
+ };
16
+ }
17
+ static fromResult(result) {
18
+ if (result == null || typeof result !== 'object' || Array.isArray(result)) {
19
+ throw new Error('ImageContext result must be an object');
20
+ }
21
+ const r = result;
22
+ const id = ImageContext.assertNonEmptyString(r.id, 'ImageContext.id');
23
+ ImageContext.assertConfidence(r.confidence);
24
+ return new ImageContext(id, r.confidence);
25
+ }
26
+ static assertNonEmptyString(value, context) {
27
+ if (typeof value !== 'string' || value.trim().length === 0) {
28
+ throw new Error(`${context} must be a non-empty string`);
29
+ }
30
+ return value;
31
+ }
32
+ static assertConfidence(value) {
33
+ if (typeof value !== 'number' || !Number.isFinite(value) || value < 0 || value > 1) {
34
+ throw new Error(`ImageContext.confidence must be a number from 0 to 1, got: ${JSON.stringify(value)}`);
35
+ }
36
+ }
37
+ }
38
+ exports.ImageContext = ImageContext;
@@ -1,12 +1,13 @@
1
1
  import { Bounds } from '../../bounds';
2
2
  import { LegendFeatureType } from '../abstract/legendFeatureType';
3
3
  import { LegendItem } from '../abstract/legendItem';
4
+ import type { RelevantContext } from './relevantContext';
4
5
  export declare class LineLegendItem extends LegendItem {
5
6
  readonly featureType = LegendFeatureType.Line;
6
7
  bounds: Bounds;
7
8
  strokeColor?: string;
8
9
  strokeWidth?: string;
9
- constructor(id: string, name: string, bounds: Bounds, strokeColor?: string, strokeWidth?: string);
10
+ constructor(id: string, name: string, bounds: Bounds, strokeColor?: string, strokeWidth?: string, relevantContext?: RelevantContext | null);
10
11
  toPlain(): Record<string, unknown>;
11
12
  static fromResult(result: unknown): LineLegendItem;
12
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"lineLegendItem.d.ts","sourceRoot":"","sources":["../../../../../src/models/minimap/legend/concrete/lineLegendItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAA4B,MAAM,wBAAwB,CAAC;AAE9E,qBAAa,cAAe,SAAQ,UAAU;IAC1C,QAAQ,CAAC,WAAW,0BAA0B;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;gBAGjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM;IAQxB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAqBlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,cAAc;CA6BrD"}
1
+ {"version":3,"file":"lineLegendItem.d.ts","sourceRoot":"","sources":["../../../../../src/models/minimap/legend/concrete/lineLegendItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAA4B,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,qBAAa,cAAe,SAAQ,UAAU;IAC1C,QAAQ,CAAC,WAAW,0BAA0B;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;gBAGjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM,EACpB,eAAe,GAAE,eAAe,GAAG,IAAW;IAQlD,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAsBlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,cAAc;CA8BrD"}
@@ -5,8 +5,8 @@ const bounds_1 = require("../../bounds");
5
5
  const legendFeatureType_1 = require("../abstract/legendFeatureType");
6
6
  const legendItem_1 = require("../abstract/legendItem");
7
7
  class LineLegendItem extends legendItem_1.LegendItem {
8
- constructor(id, name, bounds, strokeColor, strokeWidth) {
9
- super(id, name);
8
+ constructor(id, name, bounds, strokeColor, strokeWidth, relevantContext = null) {
9
+ super(id, name, relevantContext);
10
10
  this.featureType = legendFeatureType_1.LegendFeatureType.Line;
11
11
  this.bounds = bounds;
12
12
  this.strokeColor = strokeColor;
@@ -30,6 +30,7 @@ class LineLegendItem extends legendItem_1.LegendItem {
30
30
  if (this.strokeWidth !== undefined) {
31
31
  base.strokeWidth = this.strokeWidth;
32
32
  }
33
+ legendItem_1.LegendItem.appendRelevantContextToPlain(base, this.relevantContext);
33
34
  return base;
34
35
  }
35
36
  static fromResult(result) {
@@ -57,7 +58,8 @@ class LineLegendItem extends legendItem_1.LegendItem {
57
58
  }
58
59
  strokeWidth = r.strokeWidth;
59
60
  }
60
- return new LineLegendItem(id, name, bounds, strokeColor, strokeWidth);
61
+ const relevantContext = legendItem_1.LegendItem.parseOptionalRelevantContext(r.relevantContext);
62
+ return new LineLegendItem(id, name, bounds, strokeColor, strokeWidth, relevantContext);
61
63
  }
62
64
  }
63
65
  exports.LineLegendItem = LineLegendItem;
@@ -0,0 +1,13 @@
1
+ import { Measurement } from '../../../measurements/measurement';
2
+ export declare class MeasurementContext {
3
+ readonly label: string;
4
+ readonly measurement: Measurement;
5
+ readonly confidence: number;
6
+ constructor(label: string, measurement: Measurement, confidence: number);
7
+ toPlain(): Record<string, unknown>;
8
+ static fromResult(result: unknown): MeasurementContext;
9
+ private static parseMeasurement;
10
+ private static assertNonEmptyString;
11
+ private static assertConfidence;
12
+ }
13
+ //# sourceMappingURL=measurementContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurementContext.d.ts","sourceRoot":"","sources":["../../../../../src/models/minimap/legend/concrete/measurementContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAGhE,qBAAa,kBAAkB;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAEhB,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM;IAQvE,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB;IAWtD,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAgB/B,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAOnC,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAOlC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MeasurementContext = void 0;
4
+ const lengthMeasurement_1 = require("../../../measurements/lengthMeasurement");
5
+ const timeMeasurement_1 = require("../../../measurements/timeMeasurement");
6
+ class MeasurementContext {
7
+ constructor(label, measurement, confidence) {
8
+ MeasurementContext.assertNonEmptyString(label, 'MeasurementContext.label');
9
+ MeasurementContext.assertConfidence(confidence);
10
+ this.label = label;
11
+ this.measurement = measurement;
12
+ this.confidence = confidence;
13
+ }
14
+ toPlain() {
15
+ return {
16
+ label: this.label,
17
+ measurement: this.measurement.toJSON(),
18
+ confidence: this.confidence,
19
+ };
20
+ }
21
+ static fromResult(result) {
22
+ if (result == null || typeof result !== 'object' || Array.isArray(result)) {
23
+ throw new Error('MeasurementContext result must be an object');
24
+ }
25
+ const r = result;
26
+ const label = MeasurementContext.assertNonEmptyString(r.label, 'MeasurementContext.label');
27
+ MeasurementContext.assertConfidence(r.confidence);
28
+ const measurement = MeasurementContext.parseMeasurement(r.measurement);
29
+ return new MeasurementContext(label, measurement, r.confidence);
30
+ }
31
+ static parseMeasurement(value) {
32
+ if (value == null || typeof value !== 'object') {
33
+ throw new Error('MeasurementContext.measurement must be an object');
34
+ }
35
+ const r = value;
36
+ if (r.measurementType === 'length') {
37
+ return lengthMeasurement_1.LengthMeasurement.fromResult(value);
38
+ }
39
+ if (r.measurementType === 'time') {
40
+ return timeMeasurement_1.TimeMeasurement.fromResult(value);
41
+ }
42
+ throw new Error(`MeasurementContext.measurement.measurementType must be "length" or "time", got: ${JSON.stringify(r.measurementType)}`);
43
+ }
44
+ static assertNonEmptyString(value, context) {
45
+ if (typeof value !== 'string' || value.trim().length === 0) {
46
+ throw new Error(`${context} must be a non-empty string`);
47
+ }
48
+ return value;
49
+ }
50
+ static assertConfidence(value) {
51
+ if (typeof value !== 'number' || !Number.isFinite(value) || value < 0 || value > 1) {
52
+ throw new Error(`MeasurementContext.confidence must be a number from 0 to 1, got: ${JSON.stringify(value)}`);
53
+ }
54
+ }
55
+ }
56
+ exports.MeasurementContext = MeasurementContext;
@@ -1,5 +1,6 @@
1
1
  import { LegendFeatureType } from '../abstract/legendFeatureType';
2
2
  import { LegendItem } from '../abstract/legendItem';
3
+ import type { RelevantContext } from './relevantContext';
3
4
  export declare class PointLegendItem extends LegendItem {
4
5
  readonly featureType = LegendFeatureType.Point;
5
6
  coordinates: {
@@ -10,7 +11,7 @@ export declare class PointLegendItem extends LegendItem {
10
11
  constructor(id: string, name: string, coordinates: {
11
12
  lat: number;
12
13
  lon: number;
13
- }, icon?: string);
14
+ }, icon?: string, relevantContext?: RelevantContext | null);
14
15
  toPlain(): Record<string, unknown>;
15
16
  static fromResult(result: unknown): PointLegendItem;
16
17
  private static assertNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"pointLegendItem.d.ts","sourceRoot":"","sources":["../../../../../src/models/minimap/legend/concrete/pointLegendItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAA4B,MAAM,wBAAwB,CAAC;AAE9E,qBAAa,eAAgB,SAAQ,UAAU;IAC3C,QAAQ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,OAAO,GAAG,eAAe;IAoCnD,OAAO,CAAC,MAAM,CAAC,YAAY;CAK9B"}
@@ -4,8 +4,8 @@ exports.PointLegendItem = void 0;
4
4
  const legendFeatureType_1 = require("../abstract/legendFeatureType");
5
5
  const legendItem_1 = require("../abstract/legendItem");
6
6
  class PointLegendItem extends legendItem_1.LegendItem {
7
- constructor(id, name, coordinates, icon) {
8
- super(id, name);
7
+ constructor(id, name, coordinates, icon, relevantContext = null) {
8
+ super(id, name, relevantContext);
9
9
  this.featureType = legendFeatureType_1.LegendFeatureType.Point;
10
10
  this.coordinates = coordinates;
11
11
  this.icon = icon;
@@ -20,6 +20,7 @@ class PointLegendItem extends legendItem_1.LegendItem {
20
20
  if (this.icon !== undefined) {
21
21
  base.icon = this.icon;
22
22
  }
23
+ legendItem_1.LegendItem.appendRelevantContextToPlain(base, this.relevantContext);
23
24
  return base;
24
25
  }
25
26
  static fromResult(result) {
@@ -46,7 +47,8 @@ class PointLegendItem extends legendItem_1.LegendItem {
46
47
  }
47
48
  icon = r.icon;
48
49
  }
49
- return new PointLegendItem(id, name, { lat: c.lat, lon: c.lon }, icon);
50
+ const relevantContext = legendItem_1.LegendItem.parseOptionalRelevantContext(r.relevantContext);
51
+ return new PointLegendItem(id, name, { lat: c.lat, lon: c.lon }, icon, relevantContext);
50
52
  }
51
53
  static assertNumber(value, context) {
52
54
  if (typeof value !== 'number' || Number.isNaN(value)) {
@@ -1,12 +1,13 @@
1
1
  import { Bounds } from '../../bounds';
2
2
  import { LegendFeatureType } from '../abstract/legendFeatureType';
3
3
  import { LegendItem } from '../abstract/legendItem';
4
+ import type { RelevantContext } from './relevantContext';
4
5
  export declare class PolygonLegendItem extends LegendItem {
5
6
  readonly featureType = LegendFeatureType.Polygon;
6
7
  bounds: Bounds;
7
8
  borderColor?: string;
8
9
  fillColor?: string;
9
- constructor(id: string, name: string, bounds: Bounds, borderColor?: string, fillColor?: string);
10
+ constructor(id: string, name: string, bounds: Bounds, borderColor?: string, fillColor?: string, relevantContext?: RelevantContext | null);
10
11
  toPlain(): Record<string, unknown>;
11
12
  static fromResult(result: unknown): PolygonLegendItem;
12
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"polygonLegendItem.d.ts","sourceRoot":"","sources":["../../../../../src/models/minimap/legend/concrete/polygonLegendItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAA4B,MAAM,wBAAwB,CAAC;AAE9E,qBAAa,iBAAkB,SAAQ,UAAU;IAC7C,QAAQ,CAAC,WAAW,6BAA6B;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;gBAGf,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM;IAQtB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAqBlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB;CA6BxD"}
1
+ {"version":3,"file":"polygonLegendItem.d.ts","sourceRoot":"","sources":["../../../../../src/models/minimap/legend/concrete/polygonLegendItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAA4B,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,qBAAa,iBAAkB,SAAQ,UAAU;IAC7C,QAAQ,CAAC,WAAW,6BAA6B;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;gBAGf,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,EAClB,eAAe,GAAE,eAAe,GAAG,IAAW;IAQlD,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAsBlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB;CA8BxD"}
@@ -5,8 +5,8 @@ const bounds_1 = require("../../bounds");
5
5
  const legendFeatureType_1 = require("../abstract/legendFeatureType");
6
6
  const legendItem_1 = require("../abstract/legendItem");
7
7
  class PolygonLegendItem extends legendItem_1.LegendItem {
8
- constructor(id, name, bounds, borderColor, fillColor) {
9
- super(id, name);
8
+ constructor(id, name, bounds, borderColor, fillColor, relevantContext = null) {
9
+ super(id, name, relevantContext);
10
10
  this.featureType = legendFeatureType_1.LegendFeatureType.Polygon;
11
11
  this.bounds = bounds;
12
12
  this.borderColor = borderColor;
@@ -30,6 +30,7 @@ class PolygonLegendItem extends legendItem_1.LegendItem {
30
30
  if (this.fillColor !== undefined) {
31
31
  base.fillColor = this.fillColor;
32
32
  }
33
+ legendItem_1.LegendItem.appendRelevantContextToPlain(base, this.relevantContext);
33
34
  return base;
34
35
  }
35
36
  static fromResult(result) {
@@ -57,7 +58,8 @@ class PolygonLegendItem extends legendItem_1.LegendItem {
57
58
  }
58
59
  fillColor = r.fillColor;
59
60
  }
60
- return new PolygonLegendItem(id, name, bounds, borderColor, fillColor);
61
+ const relevantContext = legendItem_1.LegendItem.parseOptionalRelevantContext(r.relevantContext);
62
+ return new PolygonLegendItem(id, name, bounds, borderColor, fillColor, relevantContext);
61
63
  }
62
64
  }
63
65
  exports.PolygonLegendItem = PolygonLegendItem;
@@ -0,0 +1,15 @@
1
+ import { BetaSectionExcerpt } from '../../../betaSections/betaSectionExcerpt';
2
+ import { ImageContext } from './imageContext';
3
+ import { MeasurementContext } from './measurementContext';
4
+ export declare class RelevantContext {
5
+ readonly measurements: MeasurementContext[];
6
+ readonly betaSectionExcerpts: Record<string, BetaSectionExcerpt[]>;
7
+ readonly images: Record<string, ImageContext[]>;
8
+ constructor(measurements: MeasurementContext[], betaSectionExcerpts: Record<string, BetaSectionExcerpt[]>, images: Record<string, ImageContext[]>);
9
+ toPlain(): Record<string, unknown>;
10
+ static fromResult(result: unknown): RelevantContext;
11
+ private static parseMeasurementsArray;
12
+ private static parseBetaSectionExcerptsRecord;
13
+ private static parseImagesRecord;
14
+ }
15
+ //# sourceMappingURL=relevantContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relevantContext.d.ts","sourceRoot":"","sources":["../../../../../src/models/minimap/legend/concrete/relevantContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,eAAe;IACxB,QAAQ,CAAC,YAAY,EAAE,kBAAkB,EAAE,CAAC;IAC5C,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACnE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;gBAG5C,YAAY,EAAE,kBAAkB,EAAE,EAClC,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,EACzD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC;IAO1C,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAkBlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,eAAe;IAenD,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAYrC,OAAO,CAAC,MAAM,CAAC,8BAA8B;IAwB7C,OAAO,CAAC,MAAM,CAAC,iBAAiB;CAmBnC"}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RelevantContext = void 0;
4
+ const betaSectionExcerpt_1 = require("../../../betaSections/betaSectionExcerpt");
5
+ const imageContext_1 = require("./imageContext");
6
+ const measurementContext_1 = require("./measurementContext");
7
+ class RelevantContext {
8
+ constructor(measurements, betaSectionExcerpts, images) {
9
+ this.measurements = measurements;
10
+ this.betaSectionExcerpts = betaSectionExcerpts;
11
+ this.images = images;
12
+ }
13
+ toPlain() {
14
+ const betaSectionExcerpts = {};
15
+ for (const [key, excerpts] of Object.entries(this.betaSectionExcerpts)) {
16
+ betaSectionExcerpts[key] = excerpts.map((excerpt) => excerpt.toPlain());
17
+ }
18
+ const images = {};
19
+ for (const [key, imageContexts] of Object.entries(this.images)) {
20
+ images[key] = imageContexts.map((image) => image.toPlain());
21
+ }
22
+ return {
23
+ measurements: this.measurements.map((measurement) => measurement.toPlain()),
24
+ betaSectionExcerpts,
25
+ images,
26
+ };
27
+ }
28
+ static fromResult(result) {
29
+ if (result == null || typeof result !== 'object' || Array.isArray(result)) {
30
+ throw new Error('RelevantContext result must be an object');
31
+ }
32
+ const r = result;
33
+ const measurements = RelevantContext.parseMeasurementsArray(r.measurements);
34
+ const betaSectionExcerpts = RelevantContext.parseBetaSectionExcerptsRecord(r.betaSectionExcerpts);
35
+ const images = RelevantContext.parseImagesRecord(r.images);
36
+ return new RelevantContext(measurements, betaSectionExcerpts, images);
37
+ }
38
+ static parseMeasurementsArray(value) {
39
+ if (value === undefined || value === null) {
40
+ return [];
41
+ }
42
+ if (!Array.isArray(value)) {
43
+ throw new Error(`RelevantContext.measurements must be an array, got: ${typeof value}`);
44
+ }
45
+ return value.map((entry) => measurementContext_1.MeasurementContext.fromResult(entry));
46
+ }
47
+ static parseBetaSectionExcerptsRecord(value) {
48
+ if (value === undefined || value === null) {
49
+ return {};
50
+ }
51
+ if (typeof value !== 'object' || Array.isArray(value)) {
52
+ throw new Error(`RelevantContext.betaSectionExcerpts must be an object, got: ${typeof value}`);
53
+ }
54
+ const raw = value;
55
+ const out = {};
56
+ for (const [key, excerpts] of Object.entries(raw)) {
57
+ if (!Array.isArray(excerpts)) {
58
+ throw new Error(`RelevantContext.betaSectionExcerpts["${key}"] must be an array, got: ${typeof excerpts}`);
59
+ }
60
+ out[key] = excerpts.map((entry) => betaSectionExcerpt_1.BetaSectionExcerpt.fromResult(entry));
61
+ }
62
+ return out;
63
+ }
64
+ static parseImagesRecord(value) {
65
+ if (value === undefined || value === null) {
66
+ return {};
67
+ }
68
+ if (typeof value !== 'object' || Array.isArray(value)) {
69
+ throw new Error(`RelevantContext.images must be an object, got: ${typeof value}`);
70
+ }
71
+ const raw = value;
72
+ const out = {};
73
+ for (const [key, imageContexts] of Object.entries(raw)) {
74
+ if (!Array.isArray(imageContexts)) {
75
+ throw new Error(`RelevantContext.images["${key}"] must be an array, got: ${typeof imageContexts}`);
76
+ }
77
+ out[key] = imageContexts.map((entry) => imageContext_1.ImageContext.fromResult(entry));
78
+ }
79
+ return out;
80
+ }
81
+ }
82
+ exports.RelevantContext = RelevantContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ropegeo-common",
3
- "version": "1.20.2",
3
+ "version": "1.21.0",
4
4
  "description": "Shared domain models and helpers for RopeGeo and WebScraper",
5
5
  "license": "ISC",
6
6
  "repository": {