@wovvmap/ui-headless 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 (92) hide show
  1. package/README.md +24 -2
  2. package/dist/HeaderInfoController.d.ts +44 -0
  3. package/dist/HeaderInfoController.d.ts.map +1 -0
  4. package/dist/HeaderInfoController.js +112 -0
  5. package/dist/appearance.d.ts +26 -0
  6. package/dist/appearance.d.ts.map +1 -0
  7. package/dist/appearance.js +117 -0
  8. package/dist/classic/ClassicController.d.ts +124 -0
  9. package/dist/classic/ClassicController.d.ts.map +1 -0
  10. package/dist/classic/ClassicController.js +1131 -0
  11. package/dist/classic/classic.types.d.ts +111 -0
  12. package/dist/classic/classic.types.d.ts.map +1 -0
  13. package/dist/classic/classic.types.js +1 -0
  14. package/dist/classic/index.d.ts +3 -0
  15. package/dist/classic/index.d.ts.map +1 -0
  16. package/dist/classic/index.js +2 -0
  17. package/dist/components.d.ts +253 -0
  18. package/dist/components.d.ts.map +1 -0
  19. package/dist/components.js +30 -0
  20. package/dist/directions/DirectionController.d.ts +76 -0
  21. package/dist/directions/DirectionController.d.ts.map +1 -0
  22. package/dist/directions/DirectionController.js +467 -0
  23. package/dist/directions/direction.types.d.ts +81 -0
  24. package/dist/directions/direction.types.d.ts.map +1 -0
  25. package/dist/directions/direction.types.js +1 -0
  26. package/dist/directions/directionPresentation.d.ts +17 -0
  27. package/dist/directions/directionPresentation.d.ts.map +1 -0
  28. package/dist/directions/directionPresentation.js +34 -0
  29. package/dist/flow/DiscoveryFlowController.d.ts +36 -0
  30. package/dist/flow/DiscoveryFlowController.d.ts.map +1 -0
  31. package/dist/flow/DiscoveryFlowController.js +162 -0
  32. package/dist/flow/FlowHistoryController.d.ts +14 -0
  33. package/dist/flow/FlowHistoryController.d.ts.map +1 -0
  34. package/dist/flow/FlowHistoryController.js +31 -0
  35. package/dist/flow/index.d.ts +3 -0
  36. package/dist/flow/index.d.ts.map +1 -0
  37. package/dist/flow/index.js +2 -0
  38. package/dist/gallery/PromotionGalleryController.d.ts +32 -0
  39. package/dist/gallery/PromotionGalleryController.d.ts.map +1 -0
  40. package/dist/gallery/PromotionGalleryController.js +80 -0
  41. package/dist/gallery/index.d.ts +2 -0
  42. package/dist/gallery/index.d.ts.map +1 -0
  43. package/dist/gallery/index.js +1 -0
  44. package/dist/headerInfo.d.ts +27 -0
  45. package/dist/headerInfo.d.ts.map +1 -0
  46. package/dist/headerInfo.js +70 -0
  47. package/dist/index.d.ts +32 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +24 -0
  50. package/dist/presentation.d.ts +49 -0
  51. package/dist/presentation.d.ts.map +1 -0
  52. package/dist/presentation.js +116 -0
  53. package/dist/routes/RoutePreviewController.d.ts +61 -0
  54. package/dist/routes/RoutePreviewController.d.ts.map +1 -0
  55. package/dist/routes/RoutePreviewController.js +321 -0
  56. package/dist/routes/playback/RoutePlaybackController.d.ts +26 -0
  57. package/dist/routes/playback/RoutePlaybackController.d.ts.map +1 -0
  58. package/dist/routes/playback/RoutePlaybackController.js +115 -0
  59. package/dist/routes/routePlayback.types.d.ts +38 -0
  60. package/dist/routes/routePlayback.types.d.ts.map +1 -0
  61. package/dist/routes/routePlayback.types.js +1 -0
  62. package/dist/routes/routePreview.types.d.ts +71 -0
  63. package/dist/routes/routePreview.types.d.ts.map +1 -0
  64. package/dist/routes/routePreview.types.js +1 -0
  65. package/dist/routes/routePreviewPresentation.d.ts +8 -0
  66. package/dist/routes/routePreviewPresentation.d.ts.map +1 -0
  67. package/dist/routes/routePreviewPresentation.js +26 -0
  68. package/dist/routes/routeStepIcons.d.ts +15 -0
  69. package/dist/routes/routeStepIcons.d.ts.map +1 -0
  70. package/dist/routes/routeStepIcons.js +102 -0
  71. package/dist/routes/routeStepPresentation.d.ts +5 -0
  72. package/dist/routes/routeStepPresentation.d.ts.map +1 -0
  73. package/dist/routes/routeStepPresentation.js +15 -0
  74. package/dist/routes/routeSteps.types.d.ts +51 -0
  75. package/dist/routes/routeSteps.types.d.ts.map +1 -0
  76. package/dist/routes/routeSteps.types.js +1 -0
  77. package/dist/routes/steps/RouteStepsController.d.ts +49 -0
  78. package/dist/routes/steps/RouteStepsController.d.ts.map +1 -0
  79. package/dist/routes/steps/RouteStepsController.js +312 -0
  80. package/dist/saved-routes/SavedRoutesController.d.ts +76 -0
  81. package/dist/saved-routes/SavedRoutesController.d.ts.map +1 -0
  82. package/dist/saved-routes/SavedRoutesController.js +366 -0
  83. package/dist/storeHours.d.ts +19 -0
  84. package/dist/storeHours.d.ts.map +1 -0
  85. package/dist/storeHours.js +155 -0
  86. package/dist/storeList.d.ts +19 -0
  87. package/dist/storeList.d.ts.map +1 -0
  88. package/dist/storeList.js +21 -0
  89. package/dist/theme.d.ts +42 -0
  90. package/dist/theme.d.ts.map +1 -0
  91. package/dist/theme.js +56 -0
  92. package/package.json +32 -3
@@ -0,0 +1,38 @@
1
+ import type { RouteOperations, RoutePlaybackOptions, RoutePlaybackState, RoutePlaybackProgress } from '@wovvmap/contracts';
2
+ import type { UIBaseProps } from '../components.js';
3
+ export type RoutePlaybackCommand = 'startRoutePlayback' | 'pauseRoutePlayback' | 'resumeRoutePlayback' | 'stopRoutePlayback' | 'replayRoutePlayback' | 'updateRoutePlaybackOptions';
4
+ export type RoutePlaybackBindings = Partial<{
5
+ [K in RoutePlaybackCommand]: (...args: Parameters<RouteOperations[K]>) => ReturnType<RouteOperations[K]> | Promise<Awaited<ReturnType<RouteOperations[K]>>>;
6
+ }>;
7
+ /** Accepted compact state plus local button feedback; no UI clock or optimistic playback preferences.
8
+ * Hinglish: Same model dono platform par; cursor/run data UI ko nahi milega. */
9
+ export interface RoutePlaybackSnapshot {
10
+ readonly enabled: boolean;
11
+ readonly state: Readonly<RoutePlaybackState> | null;
12
+ readonly pending: RoutePlaybackCommand | null;
13
+ readonly error: string | null;
14
+ }
15
+ export interface RoutePlaybackProgressSource {
16
+ getProgress?: () => RoutePlaybackProgress | null | undefined;
17
+ subscribeProgress?: (listener: () => void) => () => void;
18
+ }
19
+ export interface RoutePlaybackActions extends RoutePlaybackProgressSource {
20
+ play(): void;
21
+ pause(): void;
22
+ resume(): void;
23
+ stop(): void;
24
+ replay(): void;
25
+ updateOptions(options: RoutePlaybackOptions): void;
26
+ }
27
+ export interface RoutePlaybackProps extends UIBaseProps {
28
+ compact?: boolean;
29
+ readonly progress?: RoutePlaybackProgress | null;
30
+ readonly showProgress?: boolean;
31
+ readonly showFollowControl?: boolean;
32
+ readonly showStepSyncControl?: boolean;
33
+ readonly model: RoutePlaybackSnapshot;
34
+ readonly actions: RoutePlaybackActions;
35
+ readonly showModePicker?: boolean;
36
+ readonly showSpeedPicker?: boolean;
37
+ }
38
+ //# sourceMappingURL=routePlayback.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routePlayback.types.d.ts","sourceRoot":"","sources":["../../src/routes/routePlayback.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD,MAAM,MAAM,oBAAoB,GAC5B,oBAAoB,GACpB,oBAAoB,GACpB,qBAAqB,GACrB,mBAAmB,GACnB,qBAAqB,GACrB,4BAA4B,CAAA;AAChC,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC;KACzC,CAAC,IAAI,oBAAoB,GAAG,CAC3B,GAAG,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KACpC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACvF,CAAC,CAAA;AACF;gFACgF;AAChF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,E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ferences } from '@wovvmap/contracts';
2
+ import type { UIBaseProps } from '../components.js';
3
+ import type { RoutePlaybackActions, RoutePlaybackBindings, RoutePlaybackProgressSource, RoutePlaybackSnapshot } from './routePlayback.types.js';
4
+ import type { RouteStepsActions, RouteStepsSnapshot } from './routeSteps.types.js';
5
+ /** The adapter supplies the same commands and compact events; the UI never receives route buffers.
6
+ * Hinglish: Direct aur WebView dono wahi commands dein; graph/geometry UI tak nahi aati. */
7
+ export type RoutePreviewBindings = RoutePlaybackBindings & RoutePlaybackProgressSource & {
8
+ [K in 'getRoute' | 'generateRoute' | 'selectRoute' | 'startRoute' | 'stopRoute' | 'clearRoute']: (...args: Parameters<RouteOperations[K]>) => ReturnType<RouteOperations[K]> | Promise<Awaited<ReturnType<RouteOperations[K]>>>;
9
+ } & {
10
+ getRouteSteps?: RouteOperations['getRouteSteps'];
11
+ selectRouteStep?: RouteOperations['selectRouteStep'];
12
+ nextRouteStep?: RouteOperations['nextRouteStep'];
13
+ previousRouteStep?: RouteOperations['previousRouteStep'];
14
+ finishRouteSteps?: RouteOperations['finishRouteSteps'];
15
+ subscribe: (listener: (state: RouteState) => void) => () => void;
16
+ getEndpoints: () => EndpointState | null;
17
+ };
18
+ /** Read-only domain projection plus local command feedback, never an optimistic route store.
19
+ * Hinglish: Accepted route event se aaye; pending/error sirf button presentation ke liye hain. */
20
+ export interface RoutePreviewSnapshot {
21
+ /** Draft intent; accepted path/transport summaries remain SDK-owned.
22
+ * Hinglish: UI preference draft hai; accepted route ka duplicate store nahi. */
23
+ readonly preferences?: Readonly<RoutePreferences>;
24
+ /** Single-route instructions precede map preview; this is UI presentation, not navigation state.
25
+ * Hinglish: Ek route par pehle input screen ki list; guidance abhi start nahi hoti. */
26
+ readonly reviewing?: boolean;
27
+ readonly playback?: RoutePlaybackSnapshot;
28
+ readonly steps?: RouteStepsSnapshot;
29
+ readonly route: RouteState | null;
30
+ readonly ready: boolean;
31
+ readonly canGenerate: boolean;
32
+ readonly pending: 'generate' | 'select' | 'start' | 'stop' | 'clear' | null;
33
+ readonly error: string | null;
34
+ }
35
+ /** Named user intents only; rendering and card selection never auto-activate guidance.
36
+ * Hinglish: Button intents common hain; render ya route choose se automatic Start nahi hoga. */
37
+ export interface RoutePreviewActions {
38
+ setPreferences?: (preferences: RoutePreferences) => void;
39
+ /** Explicit manual-steps intent pauses simulation; hiding the list never resumes it.
40
+ * Hinglish: Show steps se playback pause ho; Hide se khud Resume nahi chale. */
41
+ toggleSteps?: () => void;
42
+ /** Show the accepted route on the map without activating guidance or simulation.
43
+ * Hinglish: Start Navigation sirf preview khole; actual Start alag intent rahe. */
44
+ viewRoute?: () => void;
45
+ reviewRoute?: () => void;
46
+ readonly playback?: RoutePlaybackActions;
47
+ readonly steps?: RouteStepsActions;
48
+ generate: () => void;
49
+ select: (selection: RouteSelection) => void;
50
+ start: (selection: RouteSelection) => void;
51
+ stop: () => void;
52
+ clear: () => void;
53
+ }
54
+ /** Omit the component for a custom template; manual activation never depends on mounting this UI.
55
+ * Hinglish: Template apna chooser rakh sakta hai; component mount se route start nahi hoga. */
56
+ export interface RoutePreviewProps extends UIBaseProps {
57
+ /** Templates choose a staged panel; standalone consumers retain the full composition.
58
+ * Hinglish: Classic mein ek waqt par ek kaam dikhe; dusra template full/custom UI rakh sake. */
59
+ presentation?: 'full' | 'staged';
60
+ model: RoutePreviewSnapshot;
61
+ actions: RoutePreviewActions;
62
+ showControls?: boolean;
63
+ showPlaybackControls?: boolean;
64
+ }
65
+ /** Optional controlled transport selector; this emits intent and never performs routing.
66
+ * Hinglish: Component sirf preference bheje; permissions aur fallback backend hi decide kare. */
67
+ export interface RoutePreferencesProps extends UIBaseProps {
68
+ preferences?: RoutePreferences;
69
+ onChange: (preferences: RoutePreferences) => void;
70
+ }
71
+ //# sourceMappingURL=routePreview.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routePreview.types.d.ts","sourceRoot":"","sources":["../../src/routes/routePreview.types.ts"],"names":[],"mappings":"AAA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,CAAA;IAChC,KAAK,EAAE,oBAAoB,CAAA;IAC3B,OAAO,EAAE,mBAAmB,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED;iGACiG;AACjG,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9B,QAAQ,EAAE,CAAC,WAAW,EAAE,gBAAgB,KAAK,IAAI,CAAA;CAClD"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { RouteSummary } from '@wovvmap/contracts';
2
+ /** Format backend-calibrated display values only; never infer metrics from graph cost or geometry.
3
+ * Hinglish: Server ki distance/time hi dikhayein; missing value ko fake zero na banayein. */
4
+ export declare function getRoutePreviewMetrics(route: RouteSummary): string;
5
+ /** Show the selected backend result, not an assumed connector from the user's preference.
6
+ * Hinglish: Mixed route/fallback mein actual connectors batayein; hard ban ko UI relax na kare. */
7
+ export declare function getRouteConnectorText(route: RouteSummary): string | null;
8
+ //# sourceMappingURL=routePreviewPresentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routePreviewPresentation.d.ts","sourceRoot":"","sources":["../../src/routes/routePreviewPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD;6FAC6F;AAC7F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAQlE;AAED;mGACmG;AACnG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,CAaxE"}
@@ -0,0 +1,26 @@
1
+ /** Format backend-calibrated display values only; never infer metrics from graph cost or geometry.
2
+ * Hinglish: Server ki distance/time hi dikhayein; missing value ko fake zero na banayein. */
3
+ export function getRoutePreviewMetrics(route) {
4
+ const distance = route.distanceMeters === null ? 'Distance unavailable' : `${Math.round(route.distanceMeters)} m`;
5
+ const duration = route.estimatedDurationSeconds === null
6
+ ? 'Time unavailable'
7
+ : `${Math.ceil(route.estimatedDurationSeconds / 60)} min`;
8
+ return `${duration} · ${distance}`;
9
+ }
10
+ /** Show the selected backend result, not an assumed connector from the user's preference.
11
+ * Hinglish: Mixed route/fallback mein actual connectors batayein; hard ban ko UI relax na kare. */
12
+ export function getRouteConnectorText(route) {
13
+ if (!route.connectors.length)
14
+ return null;
15
+ const names = {
16
+ elevator: 'Elevator',
17
+ escalator: 'Escalator',
18
+ stairs: 'Stairs',
19
+ connection: 'Floor connection',
20
+ };
21
+ const via = route.connectors.map((kind) => names[kind]).join(' + ');
22
+ const preferred = route.fallbackUsed === 'escalator_to_elevator' ? 'Escalator' : 'Elevator';
23
+ return route.fallbackUsed
24
+ ? `${preferred}-preferred route was unavailable. Alternative uses ${via}.`
25
+ : `Via ${via}`;
26
+ }
@@ -0,0 +1,15 @@
1
+ import type { RouteStepAction } from '@wovvmap/contracts';
2
+ /** Portable vector data shared by Web SVG and Native SVG adapters.
3
+ * Hinglish: Old step-icon ke paths ek owner mein hain; platform sirf render karta hai. */
4
+ export interface RouteStepIconData {
5
+ readonly viewBox: string;
6
+ readonly paths: readonly {
7
+ readonly d: string;
8
+ readonly transform?: string;
9
+ readonly fillRule?: 'evenodd' | 'nonzero';
10
+ }[];
11
+ }
12
+ /** Preserve connector type and direction; unknown/stairs actions keep the existing symbol fallback.
13
+ * Hinglish: Elevator ko escalator ya down ko up mat dikhayein; generic actions ka fallback alag rahe. */
14
+ export declare function getRouteStepIcon(action: RouteStepAction): RouteStepIconData | undefined;
15
+ //# sourceMappingURL=routeStepIcons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routeStepIcons.d.ts","sourceRoot":"","sources":["../../src/routes/routeStepIcons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD;0FAC0F;AAC1F,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS;QACvB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;QAClB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;QAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;KAC1C,EAAE,CAAA;CACJ;AAmGD;yGACyG;AACzG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,GAAG,SAAS,CAQvF"}
@@ -0,0 +1,102 @@
1
+ // Copied from the reference frontend's assets/step-icon; colors come from the consuming theme.
2
+ // Hinglish: Shape old jaisi rahe; hard-coded black ke bajay selected/theme color use ho.
3
+ const exitIcon = {
4
+ viewBox: '0 0 500 500',
5
+ paths: [
6
+ {
7
+ d: 'm233.02 587.81c-8.31 2e-5 -15 6.69-15 15v300.56l-72.657-72.683c-2.9375-2.9385-6.7595-4.4062-10.594-4.4062s-7.6557 1.4682-10.594 4.4062l-24 24c-5.8761 5.8761-5.8761 15.343 0 21.219l100.5 100.5 16.094 16.125c0.0314 0.031 0.0627 0.062 0.0937 0.094 0.0311 0.031 0.0619 0.063 0.0937 0.094l16.5 16.5s7.5805 7.7035 16.531 7.7035c8.8715 0 16.594-7.7973 16.594-7.7973l16.625-16.594 116.62-116.62c5.8761-5.8761 5.8761-15.343 0-21.219l-24-24c-5.8761-5.8761-15.311-5.8761-21.188 0l-72.683 72.683v-300.56c0-8.31-6.69-15-15-15z',
8
+ transform: 'translate(0 -552.36) matrix(1.1974 0 0 1.1974 -95.185 -154.13) matrix(0 -.55235 .55235 0 99.37 938.33) translate(0 -552.36)',
9
+ },
10
+ {
11
+ d: 'm283.19 87.562c-15.264 0-27.531 12.298-27.531 27.562v7.75h152.56c7.8141 0 14.094 6.3109 14.094 14.125v218.94c0 7.8141-6.2796 14.125-14.094 14.125h-152.56v7.75c0 15.264 12.267 27.562 27.531 27.562h146.88c15.264 0 27.562-12.298 27.562-27.562v-262.69c0-15.264-12.298-27.562-27.562-27.562h-146.88z',
12
+ transform: 'translate(0 -552.36) matrix(1.1974 0 0 1.1974 -95.185 -154.13) translate(0 552.36)',
13
+ },
14
+ ],
15
+ };
16
+ const icons = {
17
+ take_elevator_up: {
18
+ viewBox: '0 0 40 40',
19
+ paths: [
20
+ {
21
+ d: 'M24.75 6.74999C24.45 7.04999 24.05 7.14999 23.65 7.14999C23.25 7.14999 22.85 6.94999 22.55 6.74999L21.35 5.54999V9.54999C21.35 10.35 20.65 11.05 19.85 11.05C19.05 11.05 18.35 10.35 18.35 9.54999V5.54999L17.35 6.64999C16.75 7.24999 15.85 7.24999 15.25 6.64999C14.65 6.04999 14.65 5.14999 15.25 4.54999L18.55 1.24999C18.85 0.849994 19.45 0.649994 19.95 0.649994C20.45 0.649994 21.05 0.849994 21.45 1.24999L24.75 4.64999C25.35 5.24999 25.35 6.14999 24.75 6.74999ZM17.55 20.25C17.55 21.3546 16.6546 22.25 15.55 22.25C14.4454 22.25 13.55 21.3546 13.55 20.25C13.55 19.1454 14.4454 18.25 15.55 18.25C16.6546 18.25 17.55 19.1454 17.55 20.25ZM14.55 23.25C13.45 23.25 12.55 24.15 12.55 25.25V27.25C12.55 27.95 12.95 28.65 13.55 28.95V33.25C13.55 33.85 13.95 34.25 14.55 34.25C15.15 34.25 15.55 33.85 15.55 33.25C15.55 33.85 15.95 34.25 16.55 34.25C17.15 34.25 17.55 33.85 17.55 33.25V28.95C18.15 28.65 18.55 27.95 18.55 27.25V25.25C18.55 24.15 17.65 23.25 16.55 23.25H14.55ZM24.55 22.25C25.6546 22.25 26.55 21.3546 26.55 20.25C26.55 19.1454 25.6546 18.25 24.55 18.25C23.4454 18.25 22.55 19.1454 22.55 20.25C22.55 21.3546 23.4454 22.25 24.55 22.25ZM21.55 25.25C21.55 24.15 22.45 23.25 23.55 23.25H25.55C26.65 23.25 27.55 24.15 27.55 25.25V27.25C27.55 27.95 27.15 28.65 26.55 28.95V33.25C26.55 33.85 26.15 34.25 25.55 34.25C24.95 34.25 24.55 33.85 24.55 33.25C24.55 33.85 24.15 34.25 23.55 34.25C22.95 34.25 22.55 33.85 22.55 33.25V28.95C21.95 28.65 21.55 27.95 21.55 27.25V25.25ZM27.65 16.05C29.35 16.05 30.65 17.35 30.65 19.05V33.45C30.65 35.15 29.35 36.45 27.65 36.45H12.35C10.65 36.45 9.34998 35.15 9.34998 33.45V19.05C9.34998 17.35 10.65 16.05 12.35 16.05H27.65ZM27.65 13.05H12.35C9.04998 13.05 6.34998 15.75 6.34998 19.05V33.45C6.34998 36.75 9.04998 39.45 12.35 39.45H27.65C30.95 39.45 33.65 36.75 33.65 33.45V19.05C33.65 15.75 30.95 13.05 27.65 13.05ZM38.05 25.25C38.8784 25.25 39.55 24.5784 39.55 23.75C39.55 22.9216 38.8784 22.25 38.05 22.25C37.2216 22.25 36.55 22.9216 36.55 23.75C36.55 24.5784 37.2216 25.25 38.05 25.25ZM38.05 30.25C38.8784 30.25 39.55 29.5784 39.55 28.75C39.55 27.9216 38.8784 27.25 38.05 27.25C37.2216 27.25 36.55 27.9216 36.55 28.75C36.55 29.5784 37.2216 30.25 38.05 30.25Z',
22
+ fillRule: 'evenodd',
23
+ },
24
+ ],
25
+ },
26
+ take_elevator_down: {
27
+ viewBox: '0 0 40 40',
28
+ paths: [
29
+ {
30
+ d: 'M24.85 7.10001L21.55 10.4C21.15 10.8 20.65 11 20.05 11C19.45 11 18.95 10.8 18.55 10.4L15.25 7.00001C14.65 6.40001 14.65 5.50001 15.25 4.90001C15.85 4.30001 16.75 4.30001 17.35 4.90001L18.55 6.10001V2.10001C18.55 1.30001 19.25 0.600006 20.05 0.600006C20.85 0.600006 21.55 1.30001 21.55 2.10001V6.10001L22.65 5.00001C23.25 4.40001 24.15 4.40001 24.75 5.00001C25.35 5.60001 25.35 6.50001 24.85 7.10001ZM17.55 20.2C17.55 21.3046 16.6546 22.2 15.55 22.2C14.4454 22.2 13.55 21.3046 13.55 20.2C13.55 19.0954 14.4454 18.2 15.55 18.2C16.6546 18.2 17.55 19.0954 17.55 20.2ZM14.55 23.2C13.45 23.2 12.55 24.1 12.55 25.2V27.2C12.55 27.9 12.95 28.6 13.55 28.9V33.2C13.55 33.8 13.95 34.2 14.55 34.2C15.15 34.2 15.55 33.8 15.55 33.2C15.55 33.8 15.95 34.2 16.55 34.2C17.15 34.2 17.55 33.8 17.55 33.2V28.9C18.15 28.6 18.55 27.9 18.55 27.2V25.2C18.55 24.1 17.65 23.2 16.55 23.2H14.55ZM24.55 22.2C25.6546 22.2 26.55 21.3046 26.55 20.2C26.55 19.0954 25.6546 18.2 24.55 18.2C23.4454 18.2 22.55 19.0954 22.55 20.2C22.55 21.3046 23.4454 22.2 24.55 22.2ZM21.55 25.2C21.55 24.1 22.45 23.2 23.55 23.2H25.55C26.65 23.2 27.55 24.1 27.55 25.2V27.2C27.55 27.9 27.15 28.6 26.55 28.9V33.2C26.55 33.8 26.15 34.2 25.55 34.2C24.95 34.2 24.55 33.8 24.55 33.2C24.55 33.8 24.15 34.2 23.55 34.2C22.95 34.2 22.55 33.8 22.55 33.2V28.9C21.95 28.6 21.55 27.9 21.55 27.2V25.2ZM27.65 16C29.35 16 30.65 17.3 30.65 19V33.4C30.65 35.1 29.35 36.4 27.65 36.4H12.35C10.65 36.4 9.34998 35.1 9.34998 33.4V19C9.34998 17.3 10.65 16 12.35 16H27.65ZM27.65 13H12.35C9.04998 13 6.34998 15.7 6.34998 19V33.4C6.34998 36.7 9.04998 39.4 12.35 39.4H27.65C30.95 39.4 33.65 36.7 33.65 33.4V19C33.65 15.7 30.95 13 27.65 13ZM38.05 25.2C38.8784 25.2 39.55 24.5284 39.55 23.7C39.55 22.8716 38.8784 22.2 38.05 22.2C37.2216 22.2 36.55 22.8716 36.55 23.7C36.55 24.5284 37.2216 25.2 38.05 25.2ZM38.05 30.2C38.8784 30.2 39.55 29.5284 39.55 28.7C39.55 27.8716 38.8784 27.2 38.05 27.2C37.2216 27.2 36.55 27.8716 36.55 28.7C36.55 29.5284 37.2216 30.2 38.05 30.2Z',
31
+ fillRule: 'evenodd',
32
+ },
33
+ ],
34
+ },
35
+ take_escalator_up: {
36
+ viewBox: '0 0 40 40',
37
+ paths: [
38
+ {
39
+ d: 'M14 6.5C14 8.4 15.6 10 17.5 10C19.4 10 21 8.4 21 6.5C21 4.6 19.4 3 17.5 3C15.6 3 14 4.6 14 6.5ZM14 14.6C14 13.2 15.2 12 16.7 12H18.3C19.8 12 21 13.2 21 14.6V15.7L22.4 14.4C24 12.8 26.1 12 28.3 12H32.4C35.6 12 38.1 14.5 38.1 17.6C38.1 20.7 35.5 23.2 32.4 23.2H29.5L17.7 34.6C16.1 36.2 14 37 11.8 37H7.7C4.5 37 2 34.5 2 31.3C2 28.2 4.6 25.7 7.7 25.7H10.6L14 22.4V14.6ZM28.3 15.2C26.9 15.2 25.7 15.8 24.7 16.7L11.9 29H7.7C6.4 29 5.3 30.1 5.3 31.4C5.3 32.7 6.4 33.8 7.7 33.8H11.7C13.1 33.8 14.3 33.2 15.3 32.3L28.2 20H32.4C33.7 20 34.8 18.9 34.8 17.6C34.8 16.3 33.7 15.2 32.4 15.2H28.3ZM36.2 35.2V29.4C36.2 28.3 35.3 27.4 34 27.4H28.4C27.6 27.4 26.9 28.1 26.9 28.9C26.9 29.7 27.6 30.4 28.4 30.4H31L27.2 34.2C26.6 34.8 26.6 35.7 27.2 36.3C27.5 36.6 27.9 36.7 28.3 36.7C28.7 36.7 29.1 36.6 29.4 36.3L33.2 32.5V35.2C33.2 36 33.9 36.7 34.7 36.7C35.5 36.7 36.2 36 36.2 35.2Z',
40
+ fillRule: 'evenodd',
41
+ },
42
+ ],
43
+ },
44
+ take_escalator_down: {
45
+ viewBox: '0 0 40 40',
46
+ paths: [
47
+ {
48
+ d: 'M26 6.5C26 8.4 24.4 10 22.5 10C20.6 10 19 8.4 19 6.5C19 4.6 20.6 3 22.5 3C24.4 3 26 4.6 26 6.5ZM26 14.6C26 13.2 24.8 12 23.3 12H21.8C20.3 12 19.1 13.2 19.1 14.6V15.7L17.7 14.4C16.1 12.8 14 12 11.8 12H7.7C4.5 12 2 14.4 2 17.5C2 20.6 4.6 23.1 7.7 23.1H10.6L22.3 34.5C23.9 36.1 26 36.9 28.2 36.9H32.3C35.5 36.9 38 34.4 38 31.3C38 28.2 35.4 25.7 32.3 25.7H29.4L26 22.4V14.6ZM15.3 16.6L28.1 28.9H32.3C33.6 28.9 34.7 30 34.7 31.3C34.7 32.6 33.6 33.7 32.3 33.7H28.2C26.8 33.7 25.6 33.2 24.6 32.3L11.9 20H7.7C6.4 20 5.3 18.9 5.3 17.6C5.3 16.3 6.4 15.2 7.7 15.2H11.7C13.1 15.2 14.3 15.7 15.3 16.6ZM11.7 34.7V29.1C11.7 28.3 10.9 27.6 10.1 27.6C9.3 27.6 8.6 28.3 8.6 29.1V31.7L4.8 27.9C4.2 27.3 3.3 27.3 2.7 27.9C2.1 28.5 2.1 29.4 2.7 30L6.5 33.8H3.8C3 33.8 2.3 34.5 2.3 35.3C2.3 36.1 3 36.8 3.8 36.8H9.6C10.8 36.8 11.7 35.8 11.7 34.7Z',
49
+ fillRule: 'evenodd',
50
+ },
51
+ ],
52
+ },
53
+ exit_elevator: exitIcon,
54
+ exit_escalator: exitIcon,
55
+ straight: {
56
+ viewBox: '0 0 40 40',
57
+ paths: [
58
+ {
59
+ d: 'M23.0744754,10.6162558 L23.0744754,34.6162558 C23.0744754,35.7208253 22.1790449,36.6162558 21.0744754,36.6162558 L18.5744754,36.6162558 C17.4699059,36.6162558 16.5744754,35.7208253 16.5744754,34.6162558 L16.5744754,10.6162558 C16.5744754,9.51168627 17.4699059,8.61625577 18.5744754,8.61625577 L21.0744754,8.61625577 C22.1790449,8.61625577 23.0744754,9.51168627 23.0744754,10.6162558 Z',
60
+ },
61
+ {
62
+ d: 'M14.9158531,-0.186736399 L26.4710475,8.91427229 C26.8648671,9.22444927 26.9287172,9.79020676 26.6136608,10.177927 C26.5715341,10.2297697 26.5237041,10.2768588 26.4710458,10.3183329 L14.9159533,19.4192162 C14.5221329,19.7293922 13.9474755,19.6665296 13.6324201,19.2788086 C13.5028865,19.119399 13.4322125,18.9213339 13.4322125,18.7171902 L13.4322125,0.515298192 C13.4322125,0.0187735109 13.8410523,-0.383744228 14.3453879,-0.383744228 C14.5527472,-0.383744228 14.7539328,-0.314266745 14.9158531,-0.186736399 Z',
63
+ transform: 'translate(20.123007, 9.616256) rotate(-90.000000) translate(-20.123007, -9.616256)',
64
+ },
65
+ ],
66
+ },
67
+ turn_left: {
68
+ viewBox: '0 0 40 40',
69
+ paths: [
70
+ {
71
+ d: 'M22.8188941,3 C23.0048445,3 23.1852586,3.06252973 23.3304613,3.17730705 L33.6926339,11.3682149 C34.0457934,11.6473741 34.1030513,12.1565559 33.820523,12.5055041 C33.7827457,12.5521625 33.739854,12.5945427 33.6926324,12.6318694 L23.3305512,20.8226644 C22.977391,21.1018228 22.4620644,21.0452465 22.179537,20.6962975 C22.0633772,20.5528289 22,20.3745703 22,20.1908409 L22,15.352 L18.0882353,15.3529412 C13.350015,15.3529412 9.49290832,19.1254368 9.35666543,23.8306778 L9.35294118,24.0882353 L9.35294118,34 C9.35294118,35.1045695 8.45751068,36 7.35294118,36 L7.35294118,36 L5,36 C3.8954305,36 3,35.1045695 3,34 L3,34 L3,24.0882353 C3,15.755233 9.75523304,9 18.0882353,9 L18.0882353,9 L22,9 L22,3.80913818 C22,3.36226597 22.3666289,3 22.8188941,3 Z',
72
+ transform: 'translate(18.500000, 19.500000) scale(-1, 1) translate(-18.500000, -19.500000)',
73
+ },
74
+ ],
75
+ },
76
+ turn_right: {
77
+ viewBox: '0 0 40 40',
78
+ paths: [
79
+ {
80
+ d: 'M25.8188941,3 C26.0048445,3 26.1852586,3.06252973 26.3304613,3.17730705 L36.6926339,11.3682149 C37.0457934,11.6473741 37.1030513,12.1565559 36.820523,12.5055041 C36.7827457,12.5521625 36.739854,12.5945427 36.6926324,12.6318694 L26.3305512,20.8226644 C25.977391,21.1018228 25.4620644,21.0452465 25.179537,20.6962975 C25.0633772,20.5528289 25,20.3745703 25,20.1908409 L25,15.352 L21.0882353,15.3529412 C16.350015,15.3529412 12.4929083,19.1254368 12.3566654,23.8306778 L12.3529412,24.0882353 L12.3529412,34 C12.3529412,35.1045695 11.4575107,36 10.3529412,36 L10.3529412,36 L8,36 C6.8954305,36 6,35.1045695 6,34 L6,34 L6,24.0882353 C6,15.755233 12.755233,9 21.0882353,9 L21.0882353,9 L25,9 L25,3.80913818 C25,3.36226597 25.3666289,3 25.8188941,3 Z',
81
+ },
82
+ ],
83
+ },
84
+ arrive: {
85
+ viewBox: '0 0 40 40',
86
+ paths: [
87
+ {
88
+ d: 'M19.9921001,2 C20.4680244,2 20.9481198,2.02634775 21.4296345,2.07935093 C27.219228,2.7162249 31.8695025,7.41484877 32.42445,13.1748283 C32.7731216,16.7888956 31.5710211,20.2350892 29.1709692,22.8167083 C25.3235942,27.1178497 23.6204145,29.8073485 22.4198451,33.0703332 L22.2748565,33.4719935 L21.3411571,36.1799148 C21.1707318,36.6551981 21.0634646,36.9166401 20.8492699,37.4321382 C20.6931027,37.8078777 20.3886647,38 19.9921001,38 C19.5956382,38 19.2912267,37.8078733 19.134485,37.4310674 L18.8574987,36.7527638 C18.7783537,36.5515355 18.703795,36.3515278 18.6080305,36.081784 L17.7093437,33.4719935 C17.6603087,33.3336491 17.6126985,33.2017241 17.564355,33.0703332 L17.3533204,32.5161823 C16.1622595,29.4948511 14.4429326,26.8744572 10.8513217,22.8584816 C8.69398393,20.5372151 7.5,17.5672277 7.5,14.405478 C7.5,7.64560361 12.9468114,2.14272003 19.7272609,2.00273155 L19.9921001,2 Z M19.9920441,8.98408813 C16.95,8.98408813 14.4840881,11.45 14.4840881,14.4920441 C14.4840881,17.5340881 16.95,20 19.9920441,20 C23.0340881,20 25.5,17.5340881 25.5,14.4920441 C25.5,11.45 23.0340881,8.98408813 19.9920441,8.98408813 Z',
89
+ },
90
+ ],
91
+ },
92
+ };
93
+ /** Preserve connector type and direction; unknown/stairs actions keep the existing symbol fallback.
94
+ * Hinglish: Elevator ko escalator ya down ko up mat dikhayein; generic actions ka fallback alag rahe. */
95
+ export function getRouteStepIcon(action) {
96
+ const key = action === 'take_elevator'
97
+ ? 'take_elevator_up'
98
+ : action === 'take_escalator'
99
+ ? 'take_escalator_up'
100
+ : action;
101
+ return icons[key];
102
+ }
@@ -0,0 +1,5 @@
1
+ import type { RouteStepAction } from '@wovvmap/contracts';
2
+ /** Shared decorative direction glyphs; the complete instruction remains the accessible label.
3
+ * Hinglish: Web/Native ke icons same hon; meaning sirf icon ya rang par depend na kare. */
4
+ export declare function getRouteStepSymbol(action: RouteStepAction): string;
5
+ //# sourceMappingURL=routeStepPresentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routeStepPresentation.d.ts","sourceRoot":"","sources":["../../src/routes/routeStepPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD;2FAC2F;AAC3F,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAWlE"}
@@ -0,0 +1,15 @@
1
+ /** Shared decorative direction glyphs; the complete instruction remains the accessible label.
2
+ * Hinglish: Web/Native ke icons same hon; meaning sirf icon ya rang par depend na kare. */
3
+ export function getRouteStepSymbol(action) {
4
+ const basic = {
5
+ start: '●',
6
+ straight: '↑',
7
+ turn_left: '↰',
8
+ turn_right: '↱',
9
+ turn_around: '↶',
10
+ arrive: '⚑',
11
+ };
12
+ if (action in basic)
13
+ return basic[action];
14
+ return action.endsWith('_up') ? '⇧' : action.endsWith('_down') ? '⇩' : '↕';
15
+ }
@@ -0,0 +1,51 @@
1
+ import type { RoutePlaybackProgressSource } from './routePlayback.types.js';
2
+ import type { RouteStepDetails, RouteOperations, RouteSummary } from '@wovvmap/contracts';
3
+ import type { UIBaseProps } from '../components.js';
4
+ /** Read-only paged presentation; route identity/domain state remain owned by navigation.
5
+ * Hinglish: Sirf loaded display rows aur panel state yahan rahe; naya route store nahi. */
6
+ export interface RouteStepsSnapshot {
7
+ readonly enabled: boolean;
8
+ readonly expanded: boolean;
9
+ readonly loading: boolean;
10
+ readonly error: string | null;
11
+ readonly items: readonly RouteStepDetails[];
12
+ readonly total: number | null;
13
+ readonly nextOffset: number | null;
14
+ readonly summary: RouteSummary | null;
15
+ readonly interactive?: boolean;
16
+ readonly selectedStepIndex?: number | null;
17
+ readonly pendingStepIndex?: number | null;
18
+ readonly selectionError?: string | null;
19
+ readonly offset?: number;
20
+ readonly controls?: boolean;
21
+ readonly canPrevious?: boolean;
22
+ readonly canNext?: boolean;
23
+ readonly canFinish?: boolean;
24
+ readonly isLastStep?: boolean;
25
+ readonly pendingControl?: 'next' | 'previous' | 'finish' | null;
26
+ }
27
+ export interface RouteStepsActions {
28
+ /** Read the current instruction's bounded page without opening the full list or moving the camera.
29
+ * Hinglish: Top banner sirf current step ka page padhe; list ya camera khud na khole. */
30
+ observeCurrent?: (index: number | null) => void;
31
+ releaseCurrent?: () => void;
32
+ toggle: () => void;
33
+ loadMore: () => void;
34
+ retry: () => void;
35
+ select?: (stepIndex: number) => void;
36
+ next?: () => void;
37
+ previous?: () => void;
38
+ finish?: () => void;
39
+ }
40
+ export interface RouteStepsProps extends UIBaseProps {
41
+ onToggle?: () => void;
42
+ progressSource?: RoutePlaybackProgressSource;
43
+ activeStepIndex?: number | null;
44
+ model: RouteStepsSnapshot;
45
+ actions: RouteStepsActions;
46
+ /** Visibility only; omitting controls never changes navigation capabilities or selection.
47
+ * Hinglish: Buttons hide karne se route/selected step clear nahi honge. */
48
+ showControls?: boolean;
49
+ }
50
+ export type RouteStepsReader = RouteOperations['getRouteSteps'];
51
+ //# sourceMappingURL=routeSteps.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routeSteps.types.d.ts","sourceRoot":"","sources":["../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IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,IAAI,CAAA;CAChE;AACD,MAAM,WAAW,iBAAiB;IAChC;6FACyF;IACzF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC/C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IAC3B,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB;AACD,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,cAAc,CAAC,EAAE,2BAA2B,CAAA;IAC5C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,KAAK,EAAE,kBAAkB,CAAA;IACzB,OAAO,EAAE,iBAAiB,CAAA;IAC1B;+EAC2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AACD,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,eAAe,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,49 @@
1
+ import { type RouteState, type EndpointContext, type RouteOperations } from '@wovvmap/contracts';
2
+ import type { RouteStepsActions, RouteStepsReader, RouteStepsSnapshot } from '../routeSteps.types.js';
3
+ /** Explicit list/banner intents read bounded display pages; reads never Generate or move a camera.
4
+ * Hinglish: Dono UI ka same reader ho; band list/banner koi HTTP read na kare. */
5
+ export declare class RouteStepsController implements RouteStepsActions {
6
+ private readonly read;
7
+ private readonly context;
8
+ private readonly selectStep?;
9
+ private readonly controls?;
10
+ private readonly activePlaybackStep?;
11
+ private route;
12
+ private available;
13
+ private request;
14
+ private pausedRead;
15
+ private selectionRequest;
16
+ private currentVisible;
17
+ private currentIndex;
18
+ private readonly listeners;
19
+ private snapshot;
20
+ constructor(read: RouteStepsReader | undefined, context: () => EndpointContext | undefined, selectStep?: RouteOperations["selectRouteStep"] | undefined, controls?: Partial<Pick<RouteOperations, "nextRouteStep" | "previousRouteStep" | "finishRouteSteps">> | undefined, activePlaybackStep?: (() => number | null) | undefined);
21
+ getSnapshot: () => RouteStepsSnapshot;
22
+ subscribe: (listener: () => void) => (() => void);
23
+ /** A mounted instruction banner opts into bounded reads; the accepted route/cursor remain SDK-owned.
24
+ * Hinglish: Banner ka display index sirf page lookup hai; navigation ka dusra store nahi. */
25
+ observeCurrent: (index: number | null) => void;
26
+ releaseCurrent: () => void;
27
+ sync(route: RouteState | null, available: boolean): void;
28
+ toggle: () => void;
29
+ /** Reuse bounded pages for explicit instruction-review presentation without toggling from render hooks.
30
+ * Hinglish: Review screen wahi paged reader khole; naya store/read loop nahi. */
31
+ setExpanded(expanded: boolean): void;
32
+ retry: () => void;
33
+ /** Explicit Back/Stop/Clear retires unsent step intents before a delayed Native route event.
34
+ * Hinglish: Purana queued focus na bheje; sent work SDK cancel kare, accepted step/camera yahan na badle. */
35
+ dismissFeedback(): void;
36
+ /** UI feedback only; accepted row selection still comes from the SDK routeChanged event.
37
+ * Hinglish: Click se optimistic selected row nahi; real floor/focus success par SDK event aaye. */
38
+ select: (stepIndex: number) => void;
39
+ next: () => void;
40
+ previous: () => void;
41
+ finish: () => void;
42
+ /** Relative targets are never calculated from the UI's potentially delayed projection.
43
+ * Hinglish: Shared viewer current step jaanta hai; UI sirf intent aur local feedback bheje. */
44
+ private runControl;
45
+ private runIntent;
46
+ loadMore: () => void;
47
+ private update;
48
+ }
49
+ //# sourceMappingURL=RouteStepsController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version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