feat(dees-geo-map): Add voice-guided navigation with TTS, navigation guide controller and mock GPS simulator

This commit is contained in:
2026-02-05 17:50:45 +00:00
parent 428e0546bd
commit 50b5c9325c
23 changed files with 2860 additions and 7 deletions

View File

@@ -1378,3 +1378,331 @@ export const trafficStyles = css`
color: ${cssManager.bdTheme('rgba(0, 0, 0, 0.4)', 'rgba(255, 255, 255, 0.4)')};
}
`;
/**
* MapLibre marker styles - CRITICAL for correct marker positioning
* MapLibre markers use CSS transforms for positioning, which requires position: absolute
*/
export const maplibreMarkerStyles = css`
.maplibregl-marker {
position: absolute;
top: 0;
left: 0;
will-change: transform;
}
`;
/**
* Navigation guidance styles for GPS tracking and voice guidance
*/
export const guidanceStyles = css`
/* GPS Position Marker */
.gps-position-marker {
width: 32px;
height: 32px;
cursor: default;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
/* Guidance Panel - shown during active navigation */
.guidance-panel {
position: absolute;
top: 12px;
left: 50%;
transform: translateX(-50%);
background: ${cssManager.bdTheme('rgba(255, 255, 255, 0.98)', 'rgba(30, 30, 30, 0.95)')};
border: 1px solid ${cssManager.bdTheme('rgba(0, 0, 0, 0.1)', 'rgba(255, 255, 255, 0.1)')};
border-radius: 12px;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
padding: 16px 24px;
min-width: 280px;
max-width: 400px;
z-index: 15;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.guidance-maneuver {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 8px;
}
.guidance-maneuver-icon {
display: flex;
align-items: center;
justify-content: center;
width: 56px;
height: 56px;
background: var(--geo-tool-active, #0084ff);
border-radius: 12px;
font-size: 28px;
color: #fff;
flex-shrink: 0;
}
.guidance-maneuver-distance {
font-size: 36px;
font-weight: 700;
color: ${cssManager.bdTheme('#1a1a1a', '#ffffff')};
line-height: 1;
}
.guidance-instruction {
font-size: 16px;
font-weight: 500;
color: ${cssManager.bdTheme('#1a1a1a', '#ffffff')};
margin-bottom: 12px;
line-height: 1.4;
}
.guidance-remaining {
font-size: 13px;
color: ${cssManager.bdTheme('rgba(0, 0, 0, 0.5)', 'rgba(255, 255, 255, 0.6)')};
padding-top: 8px;
border-top: 1px solid ${cssManager.bdTheme('rgba(0, 0, 0, 0.1)', 'rgba(255, 255, 255, 0.1)')};
}
.guidance-off-route {
margin-top: 12px;
padding: 10px 12px;
background: rgba(239, 68, 68, 0.15);
border: 1px solid rgba(239, 68, 68, 0.3);
border-radius: 8px;
color: ${cssManager.bdTheme('#dc2626', '#fca5a5')};
font-size: 13px;
font-weight: 500;
text-align: center;
}
/* Simulation Controls Panel */
.simulation-panel {
background: ${cssManager.bdTheme('rgba(255, 255, 255, 0.98)', 'rgba(30, 30, 30, 0.95)')};
border: 1px solid ${cssManager.bdTheme('rgba(0, 0, 0, 0.1)', 'rgba(255, 255, 255, 0.1)')};
border-radius: 8px;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
padding: 12px;
}
.simulation-panel-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 12px;
padding-bottom: 8px;
border-bottom: 1px solid ${cssManager.bdTheme('rgba(0, 0, 0, 0.1)', 'rgba(255, 255, 255, 0.1)')};
}
.simulation-panel-header-icon {
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
color: var(--geo-tool-active, #0084ff);
}
.simulation-panel-header-icon svg {
width: 18px;
height: 18px;
}
.simulation-panel-header-title {
font-size: 13px;
font-weight: 600;
color: ${cssManager.bdTheme('#1a1a1a', '#ffffff')};
}
.simulation-controls {
display: flex;
gap: 8px;
margin-bottom: 12px;
}
.simulation-btn {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
padding: 0;
border: 1px solid ${cssManager.bdTheme('rgba(0, 0, 0, 0.15)', 'rgba(255, 255, 255, 0.15)')};
border-radius: 8px;
background: ${cssManager.bdTheme('rgba(0, 0, 0, 0.03)', 'rgba(0, 0, 0, 0.2)')};
color: ${cssManager.bdTheme('#1a1a1a', '#ffffff')};
cursor: pointer;
transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.simulation-btn:hover:not(:disabled) {
background: ${cssManager.bdTheme('rgba(0, 0, 0, 0.08)', 'rgba(255, 255, 255, 0.1)')};
border-color: ${cssManager.bdTheme('rgba(0, 0, 0, 0.25)', 'rgba(255, 255, 255, 0.25)')};
}
.simulation-btn.active {
background: var(--geo-tool-active, #0084ff);
border-color: var(--geo-tool-active, #0084ff);
color: #fff;
}
.simulation-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.simulation-btn svg {
width: 18px;
height: 18px;
}
.simulation-btn.play svg {
width: 16px;
height: 16px;
}
/* Speed selector */
.simulation-speed {
margin-bottom: 12px;
}
.simulation-speed-label {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
color: ${cssManager.bdTheme('rgba(0, 0, 0, 0.5)', 'rgba(255, 255, 255, 0.5)')};
margin-bottom: 6px;
}
.simulation-speed-label svg {
width: 12px;
height: 12px;
}
.simulation-speed-select {
width: 100%;
height: 36px;
padding: 0 12px;
border: 1px solid ${cssManager.bdTheme('rgba(0, 0, 0, 0.15)', 'rgba(255, 255, 255, 0.15)')};
border-radius: 6px;
background: ${cssManager.bdTheme('rgba(0, 0, 0, 0.03)', 'rgba(0, 0, 0, 0.2)')};
color: ${cssManager.bdTheme('#1a1a1a', '#ffffff')};
font-size: 13px;
font-family: inherit;
cursor: pointer;
outline: none;
transition: border-color 0.15s ease;
}
.simulation-speed-select:focus {
border-color: var(--geo-tool-active, #0084ff);
}
/* Voice toggle */
.simulation-voice {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
padding: 8px 0;
border-bottom: 1px solid ${cssManager.bdTheme('rgba(0, 0, 0, 0.1)', 'rgba(255, 255, 255, 0.1)')};
}
.simulation-voice-label {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: ${cssManager.bdTheme('rgba(0, 0, 0, 0.7)', 'rgba(255, 255, 255, 0.8)')};
}
.simulation-voice-label svg {
width: 16px;
height: 16px;
color: var(--geo-tool-active, #0084ff);
}
.simulation-voice-toggle {
position: relative;
width: 40px;
height: 22px;
border: none;
border-radius: 11px;
background: ${cssManager.bdTheme('rgba(0, 0, 0, 0.15)', 'rgba(255, 255, 255, 0.2)')};
cursor: pointer;
transition: background-color 0.2s ease;
padding: 0;
}
.simulation-voice-toggle.active {
background: var(--geo-tool-active, #0084ff);
}
.simulation-voice-toggle-thumb {
position: absolute;
top: 2px;
left: 2px;
width: 18px;
height: 18px;
background: #fff;
border-radius: 50%;
transition: transform 0.2s ease;
}
.simulation-voice-toggle.active .simulation-voice-toggle-thumb {
transform: translateX(18px);
}
/* Progress bar */
.simulation-progress {
margin-bottom: 8px;
}
.simulation-progress-label {
display: flex;
justify-content: space-between;
font-size: 11px;
color: ${cssManager.bdTheme('rgba(0, 0, 0, 0.5)', 'rgba(255, 255, 255, 0.5)')};
margin-bottom: 4px;
}
.simulation-progress-bar {
width: 100%;
height: 6px;
background: ${cssManager.bdTheme('rgba(0, 0, 0, 0.1)', 'rgba(255, 255, 255, 0.1)')};
border-radius: 3px;
overflow: hidden;
}
.simulation-progress-fill {
height: 100%;
background: var(--geo-tool-active, #0084ff);
border-radius: 3px;
transition: width 0.3s ease;
}
/* Status text */
.simulation-status {
font-size: 12px;
color: ${cssManager.bdTheme('rgba(0, 0, 0, 0.5)', 'rgba(255, 255, 255, 0.5)')};
text-align: center;
padding-top: 8px;
}
.simulation-status.running {
color: #22c55e;
}
.simulation-status.paused {
color: #f59e0b;
}
.simulation-status.completed {
color: var(--geo-tool-active, #0084ff);
}
`;