@wovvmap/contracts 0.0.0-stage → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/catalog.d.ts +427 -0
  2. package/dist/catalog.d.ts.map +1 -0
  3. package/dist/catalog.js +21 -0
  4. package/dist/depthConfig.d.ts +112 -0
  5. package/dist/depthConfig.d.ts.map +1 -0
  6. package/dist/depthConfig.js +109 -0
  7. package/dist/discovery.d.ts +122 -0
  8. package/dist/discovery.d.ts.map +1 -0
  9. package/dist/discovery.js +91 -0
  10. package/dist/endpoints.d.ts +63 -0
  11. package/dist/endpoints.d.ts.map +1 -0
  12. package/dist/endpoints.js +61 -0
  13. package/dist/events.d.ts +198 -0
  14. package/dist/events.d.ts.map +1 -0
  15. package/dist/events.js +204 -0
  16. package/dist/geometry.d.ts +190 -0
  17. package/dist/geometry.d.ts.map +1 -0
  18. package/dist/geometry.js +6 -0
  19. package/dist/index.d.ts +26 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +24 -0
  22. package/dist/interaction.d.ts +37 -0
  23. package/dist/interaction.d.ts.map +1 -0
  24. package/dist/interaction.js +32 -0
  25. package/dist/interactionScope.d.ts +15 -0
  26. package/dist/interactionScope.d.ts.map +1 -0
  27. package/dist/interactionScope.js +30 -0
  28. package/dist/metadata.d.ts +217 -0
  29. package/dist/metadata.d.ts.map +1 -0
  30. package/dist/metadata.js +102 -0
  31. package/dist/multiFloor.d.ts +102 -0
  32. package/dist/multiFloor.d.ts.map +1 -0
  33. package/dist/multiFloor.js +30 -0
  34. package/dist/navigation/index.d.ts +17 -0
  35. package/dist/navigation/index.d.ts.map +1 -0
  36. package/dist/navigation/index.js +14 -0
  37. package/dist/navigation/navigationConfig.d.ts +21 -0
  38. package/dist/navigation/navigationConfig.d.ts.map +1 -0
  39. package/dist/navigation/navigationConfig.js +18 -0
  40. package/dist/navigation/offlineRecovery.d.ts +29 -0
  41. package/dist/navigation/offlineRecovery.d.ts.map +1 -0
  42. package/dist/navigation/offlineRecovery.js +47 -0
  43. package/dist/navigation/offlineRouteConfig.d.ts +17 -0
  44. package/dist/navigation/offlineRouteConfig.d.ts.map +1 -0
  45. package/dist/navigation/offlineRouteConfig.js +53 -0
  46. package/dist/navigation/resolveNavigationConfig.d.ts +6 -0
  47. package/dist/navigation/resolveNavigationConfig.d.ts.map +1 -0
  48. package/dist/navigation/resolveNavigationConfig.js +50 -0
  49. package/dist/navigation/routeArtifacts.d.ts +130 -0
  50. package/dist/navigation/routeArtifacts.d.ts.map +1 -0
  51. package/dist/navigation/routeArtifacts.js +1 -0
  52. package/dist/navigation/routeDelivery.d.ts +83 -0
  53. package/dist/navigation/routeDelivery.d.ts.map +1 -0
  54. package/dist/navigation/routeDelivery.js +22 -0
  55. package/dist/navigation/routeJourneyValidation.d.ts +5 -0
  56. package/dist/navigation/routeJourneyValidation.d.ts.map +1 -0
  57. package/dist/navigation/routeJourneyValidation.js +65 -0
  58. package/dist/navigation/routeOperations.d.ts +70 -0
  59. package/dist/navigation/routeOperations.d.ts.map +1 -0
  60. package/dist/navigation/routeOperations.js +22 -0
  61. package/dist/navigation/routePlayback.d.ts +98 -0
  62. package/dist/navigation/routePlayback.d.ts.map +1 -0
  63. package/dist/navigation/routePlayback.js +44 -0
  64. package/dist/navigation/routeResponseValidation.d.ts +10 -0
  65. package/dist/navigation/routeResponseValidation.d.ts.map +1 -0
  66. package/dist/navigation/routeResponseValidation.js +280 -0
  67. package/dist/navigation/routeSnapshot.d.ts +5 -0
  68. package/dist/navigation/routeSnapshot.d.ts.map +1 -0
  69. package/dist/navigation/routeSnapshot.js +145 -0
  70. package/dist/navigation/routeState.d.ts +105 -0
  71. package/dist/navigation/routeState.d.ts.map +1 -0
  72. package/dist/navigation/routeState.js +1 -0
  73. package/dist/navigation/routeSteps.d.ts +27 -0
  74. package/dist/navigation/routeSteps.d.ts.map +1 -0
  75. package/dist/navigation/routeSteps.js +1 -0
  76. package/dist/navigation/savedRoute.d.ts +156 -0
  77. package/dist/navigation/savedRoute.d.ts.map +1 -0
  78. package/dist/navigation/savedRoute.js +68 -0
  79. package/dist/navigation/savedRouteValidation.d.ts +5 -0
  80. package/dist/navigation/savedRouteValidation.d.ts.map +1 -0
  81. package/dist/navigation/savedRouteValidation.js +298 -0
  82. package/dist/nodeLine.d.ts +45 -0
  83. package/dist/nodeLine.d.ts.map +1 -0
  84. package/dist/nodeLine.js +44 -0
  85. package/dist/nodePoint.d.ts +111 -0
  86. package/dist/nodePoint.d.ts.map +1 -0
  87. package/dist/nodePoint.js +152 -0
  88. package/dist/offerValidity.d.ts +11 -0
  89. package/dist/offerValidity.d.ts.map +1 -0
  90. package/dist/offerValidity.js +27 -0
  91. package/dist/offline.d.ts +60 -0
  92. package/dist/offline.d.ts.map +1 -0
  93. package/dist/offline.js +47 -0
  94. package/dist/preparedMap.d.ts +186 -0
  95. package/dist/preparedMap.d.ts.map +1 -0
  96. package/dist/preparedMap.js +6 -0
  97. package/dist/preparedMapIdentity.d.ts +3 -0
  98. package/dist/preparedMapIdentity.d.ts.map +1 -0
  99. package/dist/preparedMapIdentity.js +30 -0
  100. package/dist/publicAssets.d.ts +11 -0
  101. package/dist/publicAssets.d.ts.map +1 -0
  102. package/dist/publicAssets.js +5 -0
  103. package/dist/taxonomy.d.ts +50 -0
  104. package/dist/taxonomy.d.ts.map +1 -0
  105. package/dist/taxonomy.js +10 -0
  106. package/dist/theme.d.ts +143 -0
  107. package/dist/theme.d.ts.map +1 -0
  108. package/dist/theme.js +141 -0
  109. package/dist/viewer.d.ts +333 -0
  110. package/dist/viewer.d.ts.map +1 -0
  111. package/dist/viewer.js +109 -0
  112. package/package.json +28 -3
  113. package/README.md +0 -3
@@ -0,0 +1,217 @@
1
+ /**
2
+ * @file metadata.ts
3
+ * @description Store metadata, business identifiers, operating hours, and promotional offers.
4
+ * Is file me dukan ki metadata, brand id, timing hours aur offers ke contracts hain.
5
+ */
6
+ import type { LocationName, PointImage } from './geometry.js';
7
+ /**
8
+ * Environment-specific brand identifier keys.
9
+ * SIT aur PROD environment ke brand IDs.
10
+ */
11
+ export interface BrandId {
12
+ /**
13
+ * SIT staging brand ID.
14
+ * Testing / SIT environment ki brand ID.
15
+ */
16
+ sit: string;
17
+ /**
18
+ * Production brand ID.
19
+ * Live / Production environment ki brand ID.
20
+ */
21
+ pro: string;
22
+ }
23
+ /**
24
+ * Contact and communication information for a store or facility.
25
+ * Dukan ya suvidha ki sampark jankari (phone, email, website, address).
26
+ */
27
+ export interface ContactInfo {
28
+ /**
29
+ * Descriptive summary of the store.
30
+ * Dukan ka vivaran.
31
+ */
32
+ description: string;
33
+ /**
34
+ * Primary contact telephone number.
35
+ * Sampark phone number.
36
+ */
37
+ phone_no: string;
38
+ /**
39
+ * Store or brand website URL.
40
+ * Official website ka link.
41
+ */
42
+ website: string;
43
+ /**
44
+ * Support or inquiry email address.
45
+ * Email address.
46
+ */
47
+ email: string;
48
+ /**
49
+ * Physical store address or unit address.
50
+ * Dukan ka pata.
51
+ */
52
+ address: string;
53
+ }
54
+ /**
55
+ * Visual and promotional assets associated with a map node.
56
+ * Node se jude visual assets jaise text label, shape image, logos aur brand images.
57
+ */
58
+ export interface Assets {
59
+ /**
60
+ * Primary text label displayed on the unit shape.
61
+ * Dukan ki shape par aane wala text label.
62
+ */
63
+ locationName: LocationName | null;
64
+ /**
65
+ * Image or logo displayed directly on the 3D unit shape.
66
+ * 3D shape par dikhne wala logo ya icon image.
67
+ */
68
+ pointImages: PointImage | null;
69
+ /**
70
+ * Standard unit logo URL.
71
+ * Dukan ka standard logo URL.
72
+ */
73
+ logo: string | null;
74
+ /**
75
+ * Brand logo URL.
76
+ * Brand ka logo URL.
77
+ */
78
+ brandLogo: string | null;
79
+ /**
80
+ * Gallery of brand promotional images.
81
+ * Brand ki promotional images ki list.
82
+ */
83
+ brandImages: string[];
84
+ }
85
+ /**
86
+ * Daily store operating schedule (opening and closing times).
87
+ * Ek din ke khulne aur band hone ka samay.
88
+ */
89
+ export type DayHours = {
90
+ /**
91
+ * Opening time string (e.g. "10:00 AM").
92
+ * Khulne ka samay.
93
+ */
94
+ open?: string;
95
+ /**
96
+ * Closing time string (e.g. "10:00 PM").
97
+ * Band hone ka samay.
98
+ */
99
+ close?: string;
100
+ };
101
+ /**
102
+ * Weekly store operating schedule.
103
+ * Pure hafte ka schedule (Sunday se Saturday).
104
+ */
105
+ export type WeeklyHours = {
106
+ sun?: DayHours;
107
+ mon?: DayHours;
108
+ tue?: DayHours;
109
+ wed?: DayHours;
110
+ thu?: DayHours;
111
+ fri?: DayHours;
112
+ sat?: DayHours;
113
+ };
114
+ /** Copy only the seven public day schedules and their open/close text.
115
+ * Hinglish: Sirf hafte ke saat din ka open/close copy hoga; source ke extra fields bahar nahi jayenge. */
116
+ export declare function toPublicWeeklyHours(source?: WeeklyHours | null): WeeklyHours | undefined;
117
+ /**
118
+ * Promotional offer or discount details associated with a store.
119
+ * Dukan par chal rahe discount ya promotional offer ki jankari.
120
+ */
121
+ export type NodePointOffer = {
122
+ /**
123
+ * Master offer identifier.
124
+ * Offer ki master ID.
125
+ */
126
+ 'offer_mst.id'?: string | number;
127
+ /**
128
+ * Offer title or name.
129
+ * Offer ka naam.
130
+ */
131
+ 'offer_mst.offer_name'?: string;
132
+ /**
133
+ * Offer remarks or terms.
134
+ * Offer par remarks ya shartein.
135
+ */
136
+ offer_remark?: string | null;
137
+ /**
138
+ * Brief summary of the offer.
139
+ * Offer ka chhota vivaran.
140
+ */
141
+ offer_short_desc?: string | null;
142
+ /**
143
+ * Validity start timestamp or date string.
144
+ * Offer shuru hone ki tareekh.
145
+ */
146
+ 'offer_mst.valid_from'?: number | string;
147
+ /**
148
+ * Validity expiration timestamp or date string.
149
+ * Offer samapt hone ki tareekh.
150
+ */
151
+ 'offer_mst.valid_to'?: number | string;
152
+ /**
153
+ * Brand logo asset URL for the offer.
154
+ * Offer ke sath dikhane wala brand logo.
155
+ */
156
+ brand_logo?: string;
157
+ /**
158
+ * Participating category code.
159
+ * Category code.
160
+ */
161
+ partyc_cat_code?: string | number;
162
+ /**
163
+ * Unique brand code.
164
+ * Brand code.
165
+ */
166
+ brand_code?: string | number;
167
+ /**
168
+ * Brand display name.
169
+ * Brand ka naam.
170
+ */
171
+ brand_name?: string;
172
+ };
173
+ /**
174
+ * Public promotional offer subset exposed to UI consumers, catalog pages, and selection payloads.
175
+ * Strictly allowlists business offer fields and never spreads internal node or geometry state.
176
+ *
177
+ * Hinglish: Public consumers aur catalog lists ko milne wala safe offer contract;
178
+ * isme sirf allowlisted business fields hoti hain, internal geometry ya raw node references nahi.
179
+ */
180
+ export interface PublicOfferData {
181
+ 'offer_mst.id'?: string | number;
182
+ 'offer_mst.offer_name'?: string;
183
+ offer_remark?: string | null;
184
+ offer_short_desc?: string | null;
185
+ 'offer_mst.valid_from'?: number | string;
186
+ 'offer_mst.valid_to'?: number | string;
187
+ brand_logo?: string;
188
+ partyc_cat_code?: string | number;
189
+ brand_code?: string | number;
190
+ brand_name?: string;
191
+ }
192
+ /**
193
+ * Normalized keyword-to-weight mapping for paid promotion ranking.
194
+ * Populated only when verified source promotion metadata (`paid_prmotion`) is present.
195
+ *
196
+ * Hinglish: Paid promotion ranking ke liye keyword aur uske positive weight ka normalized map;
197
+ * source data me promotion metadata na hone par ye absent rehta hai.
198
+ */
199
+ export type PaidPromotionKeywordWeights = Record<string, number>;
200
+ /**
201
+ * Projects a raw or canonical NodePointOffer into a fresh JSON-safe PublicOfferData object.
202
+ * Copies only explicitly allowlisted business fields so internal or unexpected keys never leak.
203
+ *
204
+ * Hinglish: NodePointOffer se sirf allowlisted public business fields ki fresh copy banata hai
205
+ * taaki koi internal field bahar leak na ho aur UI mutation se original node safe rahe.
206
+ */
207
+ export declare function toPublicOfferData(offer: NodePointOffer): PublicOfferData;
208
+ /**
209
+ * Projects a canonical paid-promotion keyword weight map into a fresh JSON-safe plain object.
210
+ * Retains only non-empty trimmed keyword keys whose values are finite positive numbers (`typeof weight === 'number' && weight > 0`).
211
+ * Never coerces booleans, arrays, or raw source strings; source-field normalization belongs to `@wovvmap/map-data`.
212
+ *
213
+ * Hinglish: Canonical paid promotion map ki fresh public copy banata hai (sirf finite positive `number` weights);
214
+ * boolean, array ya raw source field conversion yahan nahi hota (woh `@wovvmap/map-data` ka kaam hai).
215
+ */
216
+ export declare function toPublicPaidPromotion(source: PaidPromotionKeywordWeights | null | undefined): PaidPromotionKeywordWeights | undefined;
217
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * @file metadata.ts
3
+ * @description Store metadata, business identifiers, operating hours, and promotional offers.
4
+ * Is file me dukan ki metadata, brand id, timing hours aur offers ke contracts hain.
5
+ */
6
+ import { getOfferWindow } from './offerValidity.js';
7
+ /** Copy only the seven public day schedules and their open/close text.
8
+ * Hinglish: Sirf hafte ke saat din ka open/close copy hoga; source ke extra fields bahar nahi jayenge. */
9
+ export function toPublicWeeklyHours(source) {
10
+ if (!source || typeof source !== 'object' || Array.isArray(source))
11
+ return undefined;
12
+ const result = {};
13
+ let hasHours = false;
14
+ for (const day of ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']) {
15
+ const hours = source[day];
16
+ if (!hours || typeof hours !== 'object' || Array.isArray(hours))
17
+ continue;
18
+ const open = typeof hours.open === 'string' ? hours.open : undefined;
19
+ const close = typeof hours.close === 'string' ? hours.close : undefined;
20
+ if (open === undefined && close === undefined)
21
+ continue;
22
+ result[day] = {
23
+ ...(open !== undefined ? { open } : {}),
24
+ ...(close !== undefined ? { close } : {}),
25
+ };
26
+ hasHours = true;
27
+ }
28
+ return hasHours ? result : undefined;
29
+ }
30
+ /**
31
+ * Projects a raw or canonical NodePointOffer into a fresh JSON-safe PublicOfferData object.
32
+ * Copies only explicitly allowlisted business fields so internal or unexpected keys never leak.
33
+ *
34
+ * Hinglish: NodePointOffer se sirf allowlisted public business fields ki fresh copy banata hai
35
+ * taaki koi internal field bahar leak na ho aur UI mutation se original node safe rahe.
36
+ */
37
+ export function toPublicOfferData(offer) {
38
+ const result = {};
39
+ if (offer['offer_mst.id'] !== undefined) {
40
+ result['offer_mst.id'] = offer['offer_mst.id'];
41
+ }
42
+ if (offer['offer_mst.offer_name'] !== undefined) {
43
+ result['offer_mst.offer_name'] = offer['offer_mst.offer_name'];
44
+ }
45
+ if (offer.offer_remark !== undefined) {
46
+ result.offer_remark = offer.offer_remark;
47
+ }
48
+ if (offer.offer_short_desc !== undefined) {
49
+ result.offer_short_desc = offer.offer_short_desc;
50
+ }
51
+ const window = getOfferWindow(offer);
52
+ if (window) {
53
+ if (Number.isFinite(window.from))
54
+ result['offer_mst.valid_from'] = window.from;
55
+ if (Number.isFinite(window.to))
56
+ result['offer_mst.valid_to'] = window.to;
57
+ }
58
+ else {
59
+ // Keep invalid dates visibly invalid for standalone projections; never turn them into an open offer.
60
+ // Hinglish: Standalone invalid date ko hata kar unlimited offer na bana dein.
61
+ if (offer['offer_mst.valid_from'] !== undefined)
62
+ result['offer_mst.valid_from'] = offer['offer_mst.valid_from'];
63
+ if (offer['offer_mst.valid_to'] !== undefined)
64
+ result['offer_mst.valid_to'] = offer['offer_mst.valid_to'];
65
+ }
66
+ if (offer.brand_logo !== undefined) {
67
+ result.brand_logo = offer.brand_logo;
68
+ }
69
+ if (offer.partyc_cat_code !== undefined) {
70
+ result.partyc_cat_code = offer.partyc_cat_code;
71
+ }
72
+ if (offer.brand_code !== undefined) {
73
+ result.brand_code = offer.brand_code;
74
+ }
75
+ if (offer.brand_name !== undefined) {
76
+ result.brand_name = offer.brand_name;
77
+ }
78
+ return result;
79
+ }
80
+ /**
81
+ * Projects a canonical paid-promotion keyword weight map into a fresh JSON-safe plain object.
82
+ * Retains only non-empty trimmed keyword keys whose values are finite positive numbers (`typeof weight === 'number' && weight > 0`).
83
+ * Never coerces booleans, arrays, or raw source strings; source-field normalization belongs to `@wovvmap/map-data`.
84
+ *
85
+ * Hinglish: Canonical paid promotion map ki fresh public copy banata hai (sirf finite positive `number` weights);
86
+ * boolean, array ya raw source field conversion yahan nahi hota (woh `@wovvmap/map-data` ka kaam hai).
87
+ */
88
+ export function toPublicPaidPromotion(source) {
89
+ if (!source || typeof source !== 'object' || Array.isArray(source)) {
90
+ return undefined;
91
+ }
92
+ const cloned = {};
93
+ let hasEntries = false;
94
+ for (const [rawKey, weight] of Object.entries(source)) {
95
+ const key = rawKey.trim();
96
+ if (key.length > 0 && typeof weight === 'number' && Number.isFinite(weight) && weight > 0) {
97
+ cloned[key] = weight;
98
+ hasEntries = true;
99
+ }
100
+ }
101
+ return hasEntries ? cloned : undefined;
102
+ }
@@ -0,0 +1,102 @@
1
+ /**
2
+ * @file multiFloor.ts
3
+ * @description Multi-Floor and Stacked Maps contracts inspired by the Mappedin 3D architecture.
4
+ * Is file me Multi-Floor View aur Stacked 3D Building Maps ke contracts hain.
5
+ */
6
+ /**
7
+ * Display modes for multi-floor 3D building visualization.
8
+ * Multi-floor 3D view ka rendering mode:
9
+ * - "single": Sirf active floor solid dikhta hai, baaki floors hidden.
10
+ * - "multi": Active floor solid dikhta hai, niche ke floors semi-transparent ghost footprints dikhte hain.
11
+ * - "stacked": Saare floors vertically space hokar 3D building stack me khul jate hain.
12
+ */
13
+ export type MultiFloorDisplayMode = 'single' | 'multi' | 'stacked';
14
+ /**
15
+ * Configuration options for the MultiFloor / Stacked Maps engine.
16
+ * Multi-floor aur 3D building stack ke configuration options.
17
+ */
18
+ export interface MultiFloorViewOptions {
19
+ /**
20
+ * Whether multi-floor capability is enabled.
21
+ * Kya multi-floor view enabled hai.
22
+ */
23
+ enabled: boolean;
24
+ /**
25
+ * Vertical gap distance in 3D units between adjacent stacked floors (default: 10).
26
+ * Floors ke beech vertical doori / gap.
27
+ */
28
+ floorGap: number;
29
+ /**
30
+ * Whether camera elevation automatically aligns when the active floor changes.
31
+ * Active floor change hone par camera unchai automatically adapt kare ya nahi.
32
+ */
33
+ updateCameraElevationOnFloorChange: boolean;
34
+ /**
35
+ * Active visual representation mode.
36
+ * Current representation mode (single, multi, ya stacked).
37
+ */
38
+ mode?: MultiFloorDisplayMode;
39
+ }
40
+ /**
41
+ * Standard default configuration for multi-floor rendering.
42
+ * Default standard multi-floor options.
43
+ */
44
+ export declare const DEFAULT_MULTIFLOOR_OPTIONS: Readonly<MultiFloorViewOptions>;
45
+ /**
46
+ * Layer visibility toggles for a specific floor in a multi-floor stack.
47
+ * Kisi floor par alag-alag visual layers (labels, markers, images, etc.) ko on/off karne ke flags.
48
+ */
49
+ export interface FloorLayerVisibility {
50
+ labels?: boolean;
51
+ markers?: boolean;
52
+ images?: boolean;
53
+ paths?: boolean;
54
+ geometry?: boolean;
55
+ }
56
+ /**
57
+ * Runtime state representing a floor's vertical altitude and visibility in 3D space.
58
+ * 3D space me kisi ek floor ki vertical altitude, opacity aur visibility ki sthiti.
59
+ */
60
+ export interface FloorStackState {
61
+ /**
62
+ * Zero-based or integer floor index (e.g. 0 for Ground, 1 for First).
63
+ * Floor ka integer index number.
64
+ */
65
+ floorIndex: number;
66
+ /**
67
+ * Optional human-readable floor title.
68
+ * Floor ka naam (jaise "Ground Floor").
69
+ */
70
+ floorName?: string;
71
+ /**
72
+ * Vertical displacement altitude in 3D space.
73
+ * 3D space me vertical unchai (altitude = floorIndex * floorGap).
74
+ */
75
+ altitude: number;
76
+ /**
77
+ * Whether the floor geometry is rendered.
78
+ * Kya is floor ki geometry visible hai.
79
+ */
80
+ visible: boolean;
81
+ /**
82
+ * Transparency level (1.0 for solid active floor, 0.2 - 0.4 for ghosted footprints).
83
+ * Floor ki opacity (1.0 solid ke liye, kam value transparent ghost effect ke liye).
84
+ */
85
+ opacity: number;
86
+ /**
87
+ * Optional per-layer visibility flags for this floor level.
88
+ * Is floor ke specific layers ki visibility.
89
+ */
90
+ layers?: FloorLayerVisibility;
91
+ }
92
+ /**
93
+ * Calculates the vertical 3D altitude for a floor based on stacking configuration.
94
+ * Floor index aur floor gap ke aadhar par vertical 3D altitude calculate karein.
95
+ *
96
+ * @param floorIndex Integer index of the floor.
97
+ * @param floorGap Vertical distance between floors.
98
+ * @param isStacked Whether stacked exploded mode is active.
99
+ * @returns 3D vertical altitude offset.
100
+ */
101
+ export declare function calculateFloorAltitude(floorIndex: number, floorGap?: number, isStacked?: boolean): number;
102
+ //# sourceMappingURL=multiFloor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiFloor.d.ts","sourceRoot":"","sources":["../src/multiFloor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AAElE;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,kCAAkC,EAAE,OAAO,CAAA;IAE3C;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,CAAA;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,qBAAqB,CAKrE,CAAA;AAEF;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAA;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,QAAQ,GAAE,MAAW,EACrB,SAAS,GAAE,OAAe,GACzB,MAAM,CAKR"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @file multiFloor.ts
3
+ * @description Multi-Floor and Stacked Maps contracts inspired by the Mappedin 3D architecture.
4
+ * Is file me Multi-Floor View aur Stacked 3D Building Maps ke contracts hain.
5
+ */
6
+ /**
7
+ * Standard default configuration for multi-floor rendering.
8
+ * Default standard multi-floor options.
9
+ */
10
+ export const DEFAULT_MULTIFLOOR_OPTIONS = Object.freeze({
11
+ enabled: true,
12
+ floorGap: 10,
13
+ updateCameraElevationOnFloorChange: true,
14
+ mode: 'single',
15
+ });
16
+ /**
17
+ * Calculates the vertical 3D altitude for a floor based on stacking configuration.
18
+ * Floor index aur floor gap ke aadhar par vertical 3D altitude calculate karein.
19
+ *
20
+ * @param floorIndex Integer index of the floor.
21
+ * @param floorGap Vertical distance between floors.
22
+ * @param isStacked Whether stacked exploded mode is active.
23
+ * @returns 3D vertical altitude offset.
24
+ */
25
+ export function calculateFloorAltitude(floorIndex, floorGap = 10, isStacked = false) {
26
+ if (!isStacked) {
27
+ return 0;
28
+ }
29
+ return floorIndex * floorGap;
30
+ }
@@ -0,0 +1,17 @@
1
+ export { NavigationConfigValues, DEFAULT_NAVIGATION_CONFIG } from './navigationConfig.js';
2
+ export * from './routeArtifacts.js';
3
+ export * from './routeDelivery.js';
4
+ export * from './routeOperations.js';
5
+ export * from './routeSteps.js';
6
+ export * from './routePlayback.js';
7
+ export { freezeRouteState } from './routeSnapshot.js';
8
+ export type { NavigationConfigInput, ResolvedNavigationConfig } from './navigationConfig.js';
9
+ export type { RouteSelection, RouteEndpointSummary, RouteConnectorKind, RouteSummary, RouteSourceIdentity, RouteSetSummary, RouteState, RouteEventPayloadMap, } from './routeState.js';
10
+ export { resolveNavigationConfig } from './resolveNavigationConfig.js';
11
+ export * from './savedRoute.js';
12
+ export * from './offlineRouteConfig.js';
13
+ export * from './offlineRecovery.js';
14
+ export { validateSavedRouteDocument } from './savedRouteValidation.js';
15
+ export { validateRouteGeometry, validateRouteSummary, validateRouteSteps, validatePlaybackIndex, } from './routeResponseValidation.js';
16
+ export { validateRouteJourney } from './routeJourneyValidation.js';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACtF,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AACzF,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,oBAAoB,GACrB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAEnE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA"}
@@ -0,0 +1,14 @@
1
+ export { NavigationConfigValues, DEFAULT_NAVIGATION_CONFIG } from './navigationConfig.js';
2
+ export * from './routeArtifacts.js';
3
+ export * from './routeDelivery.js';
4
+ export * from './routeOperations.js';
5
+ export * from './routeSteps.js';
6
+ export * from './routePlayback.js';
7
+ export { freezeRouteState } from './routeSnapshot.js';
8
+ export { resolveNavigationConfig } from './resolveNavigationConfig.js';
9
+ export * from './savedRoute.js';
10
+ export * from './offlineRouteConfig.js';
11
+ export * from './offlineRecovery.js';
12
+ export { validateSavedRouteDocument } from './savedRouteValidation.js';
13
+ export { validateRouteGeometry, validateRouteSummary, validateRouteSteps, validatePlaybackIndex, } from './routeResponseValidation.js';
14
+ export { validateRouteJourney } from './routeJourneyValidation.js';
@@ -0,0 +1,21 @@
1
+ /** Portable choices have one definition for types, JSON validation and every SDK.
2
+ * Hinglish: Options ki ek hi list hai; React/Native apne alag enum/validation nahi banayenge. */
3
+ export declare const NavigationConfigValues: Readonly<{
4
+ routes: readonly ["single", "alternatives"];
5
+ activation: readonly ["manual", "automatic"];
6
+ pathAnimation: readonly ["off", "moving-arrows"];
7
+ simulation: readonly ["off", "manual", "on-start"];
8
+ steps: readonly ["off", "list", "interactive"];
9
+ }>;
10
+ /** All fields are resolved once at the shared configuration boundary.
11
+ * Hinglish: SDK ke andar missing defaults ya contradictory flags dobara resolve nahi honge. */
12
+ export type ResolvedNavigationConfig = {
13
+ readonly [K in keyof typeof NavigationConfigValues]: (typeof NavigationConfigValues)[K][number];
14
+ };
15
+ /** A replacement input; omitted fields use defaults, not values from the previous configuration.
16
+ * Hinglish: Partial object patch nahi hai; missing fields default par reset hote hain. */
17
+ export type NavigationConfigInput = Readonly<Partial<ResolvedNavigationConfig>>;
18
+ /** Static manual navigation is the default; these capabilities do not mount any UI or start a route.
19
+ * Hinglish: Default se hidden alternate solve, animation ya simulation start nahi hota. */
20
+ export declare const DEFAULT_NAVIGATION_CONFIG: ResolvedNavigationConfig;
21
+ //# sourceMappingURL=navigationConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigationConfig.d.ts","sourceRoot":"","sources":["../../src/navigation/navigationConfig.ts"],"names":[],"mappings":"AAAA;iGACiG;AACjG,eAAO,MAAM,sBAAsB;;;;;;EAMjC,CAAA;AAEF;+FAC+F;AAC/F,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,CAAC,IAAI,MAAM,OAAO,sBAAsB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;CAChG,CAAA;AAED;0FAC0F;AAC1F,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAA;AAE/E;2FAC2F;AAC3F,eAAO,MAAM,yBAAyB,EAAE,wBAMtC,CAAA"}
@@ -0,0 +1,18 @@
1
+ /** Portable choices have one definition for types, JSON validation and every SDK.
2
+ * Hinglish: Options ki ek hi list hai; React/Native apne alag enum/validation nahi banayenge. */
3
+ export const NavigationConfigValues = Object.freeze({
4
+ routes: Object.freeze(['single', 'alternatives']),
5
+ activation: Object.freeze(['manual', 'automatic']),
6
+ pathAnimation: Object.freeze(['off', 'moving-arrows']),
7
+ simulation: Object.freeze(['off', 'manual', 'on-start']),
8
+ steps: Object.freeze(['off', 'list', 'interactive']),
9
+ });
10
+ /** Static manual navigation is the default; these capabilities do not mount any UI or start a route.
11
+ * Hinglish: Default se hidden alternate solve, animation ya simulation start nahi hota. */
12
+ export const DEFAULT_NAVIGATION_CONFIG = Object.freeze({
13
+ routes: 'single',
14
+ activation: 'manual',
15
+ pathAnimation: 'off',
16
+ simulation: 'off',
17
+ steps: 'list',
18
+ });
@@ -0,0 +1,29 @@
1
+ import { type OfflineRouteConfig } from './offlineRouteConfig.js';
2
+ import type { SavedRouteDocument } from './savedRoute.js';
3
+ /** Reuse the signed directed references and captured public preferences; scope stays in OfflineRouteTarget.
4
+ * Hinglish: Group ka volatile viewer revision match identity nahi; membership certainty/policy alag verify honge.
5
+ * Omitted preferences retain their signed policy meaning; client must not infer private traversal defaults. */
6
+ export type OfflineRouteMatchIntent = Readonly<Pick<SavedRouteDocument, 'origin' | 'destination' | 'preferences'>>;
7
+ /** Adapter-owned facts, never a classification guessed from backend messages or a fetch TypeError.
8
+ * Hinglish: Transport adapter reason de; URL/token/message parse karke offline permission nahi banti. */
9
+ export type OfflineRecoveryFailure = {
10
+ readonly kind: 'transport';
11
+ } | {
12
+ readonly kind: 'http';
13
+ readonly status: number;
14
+ } | {
15
+ readonly kind: 'timeout' | 'cancelled' | 'invalid-response' | 'unavailable' | 'unknown';
16
+ };
17
+ /** Connectivity is a lifecycle hint, not authorization or a successful freshness probe.
18
+ * Hinglish: Offline signal saved approval ko extend nahi karta aur server denial ko override nahi karega. */
19
+ export type OfflineConnectivityHint = 'unknown' | 'online' | 'offline';
20
+ export type OfflineFallbackCheck = 'none' | 'offer-check' | 'preview-check';
21
+ /** Own the tiny JSON-safe fact; malformed/ambiguous inputs fail closed and diagnostics are discarded.
22
+ * Hinglish: Private message/extra fields copy nahi; HTTP status mile to transport label se mask nahi hoga. */
23
+ export declare function resolveOfflineRecoveryFailure(value: unknown): OfflineRecoveryFailure;
24
+ /** Preflight only: the existing signed loader must still prove exact intent, scope, expiry and complete parent.
25
+ * Hinglish: Result success/permission nahi; no match/invalid approval par original failure hi rahe.
26
+ * Future one-way/airport clearance remains backend policy; this helper never authorizes reverse/new travel.
27
+ * Hinglish: Previous/Replay ya offline hint se checkpoint pass/return ka right nahi milta. */
28
+ export declare function getOfflineFallbackCheck(config: OfflineRouteConfig, mapOfflineEnabled: boolean, failure: OfflineRecoveryFailure, connectivity?: OfflineConnectivityHint): OfflineFallbackCheck;
29
+ //# sourceMappingURL=offlineRecovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offlineRecovery.d.ts","sourceRoot":"","sources":["../../src/navigation/offlineRecovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEtD;;+GAE+G;AAC/G,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,aAAa,GAAG,aAAa,CAAC,CACnE,CAAA;AAED;yGACyG;AACzG,MAAM,MAAM,sBAAsB,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,kBAAkB,GAAG,aAAa,GAAG,SAAS,CAAA;CAAE,CAAA;AAE/F;6GAC6G;AAC7G,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AACtE,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,aAAa,GAAG,eAAe,CAAA;AAE3E;8GAC8G;AAC9G,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,CAwBpF;AAED;;;8FAG8F;AAC9F,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,iBAAiB,EAAE,OAAO,EAC1B,OAAO,EAAE,sBAAsB,EAC/B,YAAY,GAAE,uBAAmC,GAChD,oBAAoB,CActB"}
@@ -0,0 +1,47 @@
1
+ import { resolveOfflineRouteConfig } from './offlineRouteConfig.js';
2
+ /** Own the tiny JSON-safe fact; malformed/ambiguous inputs fail closed and diagnostics are discarded.
3
+ * Hinglish: Private message/extra fields copy nahi; HTTP status mile to transport label se mask nahi hoga. */
4
+ export function resolveOfflineRecoveryFailure(value) {
5
+ if (!value || typeof value !== 'object' || Array.isArray(value))
6
+ return Object.freeze({ kind: 'unknown' });
7
+ const fact = value;
8
+ const kind = fact.kind;
9
+ // Cancellation retires the intent even when an obsolete response already supplied headers.
10
+ // Hinglish: Cancel ko late HTTP status override na kare; offline fallback phir bhi blocked rahe.
11
+ if (kind === 'cancelled')
12
+ return Object.freeze({ kind: 'cancelled' });
13
+ const status = fact.status;
14
+ if (status !== undefined) {
15
+ return typeof status === 'number' && Number.isInteger(status) && status >= 100 && status <= 599
16
+ ? Object.freeze({ kind: 'http', status })
17
+ : Object.freeze({ kind: 'unknown' });
18
+ }
19
+ switch (kind) {
20
+ case 'transport':
21
+ case 'timeout':
22
+ case 'invalid-response':
23
+ case 'unavailable':
24
+ case 'unknown':
25
+ return Object.freeze({ kind });
26
+ default:
27
+ return Object.freeze({ kind: 'unknown' });
28
+ }
29
+ }
30
+ /** Preflight only: the existing signed loader must still prove exact intent, scope, expiry and complete parent.
31
+ * Hinglish: Result success/permission nahi; no match/invalid approval par original failure hi rahe.
32
+ * Future one-way/airport clearance remains backend policy; this helper never authorizes reverse/new travel.
33
+ * Hinglish: Previous/Replay ya offline hint se checkpoint pass/return ka right nahi milta. */
34
+ export function getOfflineFallbackCheck(config, mapOfflineEnabled, failure, connectivity = 'unknown') {
35
+ const current = resolveOfflineRouteConfig(config);
36
+ if (mapOfflineEnabled !== true ||
37
+ current.enabled !== true ||
38
+ !current.policyRevision ||
39
+ !Object.keys(current.trustedKeys ?? {}).length ||
40
+ resolveOfflineRecoveryFailure(failure).kind !== 'transport')
41
+ return 'none';
42
+ if (current.fallback === 'offer')
43
+ return 'offer-check';
44
+ if (current.fallback === 'automatic-on-offline')
45
+ return connectivity === 'offline' ? 'preview-check' : 'offer-check';
46
+ return 'none';
47
+ }
@@ -0,0 +1,17 @@
1
+ /** Candidate policy only; no approval, lookup or navigation is activated by this configuration.
2
+ * Hinglish: Flag sirf future saved-candidate check ke liye; signature/scope verify bina restore nahi. */
3
+ export type OfflineRouteFallbackMode = 'off' | 'offer' | 'automatic-on-offline';
4
+ /** Explicit mount-time opt-in and independently trusted public verification context.
5
+ * Hinglish: Map offline flag se routes enable nahi hon; private signing key kabhi host config mein nahi. */
6
+ export interface OfflineRouteConfig {
7
+ readonly enabled: boolean;
8
+ readonly policyRevision?: string;
9
+ readonly trustedKeys?: Readonly<Record<string, JsonWebKey>>;
10
+ /** Reserved reconnect policy, off when omitted; execution is introduced in later checkpoints.
11
+ * Hinglish: Abhi config validate/copy hota hai; reconnect ya automatic fallback start nahi hota. */
12
+ readonly fallback?: OfflineRouteFallbackMode;
13
+ }
14
+ /** Copy only JSON-safe public P-256 keys before either platform serializes initialization.
15
+ * Hinglish: Private d field aur malformed config reject ho; arbitrary caller object bridge par na jaye. */
16
+ export declare function resolveOfflineRouteConfig(value: OfflineRouteConfig | null | undefined): OfflineRouteConfig;
17
+ //# sourceMappingURL=offlineRouteConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offlineRouteConfig.d.ts","sourceRoot":"","sources":["../../src/navigation/offlineRouteConfig.ts"],"names":[],"mappings":"AAEA;yGACyG;AACzG,MAAM,MAAM,wBAAwB,GAAG,KAAK,GAAG,OAAO,GAAG,sBAAsB,CAAA;AAE/E;4GAC4G;AAC5G,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;IAC3D;wGACoG;IACpG,QAAQ,CAAC,QAAQ,CAAC,EAAE,wBAAwB,CAAA;CAC7C;AAED;2GAC2G;AAC3G,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,GAC3C,kBAAkB,CA+CpB"}