mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
feat(voice): add reusable geometry actions
- turn named places and mapped landmarks into reusable bounded areas - count loaded records inside resolved, drawn and annotated geometry - find recent imagery for an area, the view or the pointer snapshot - keep osm place search behind an operator-configured overpass endpoint - preserve cancellation, ownership and follow-up memory across every action - cover geometry, provider lifecycle, cache isolation and voice routing
This commit is contained in:
1 parent
01979bba1e
commit
b234d7b427
84 files changed
+14262
-1681
No files matched your search
@@ -0,0 +1,20 @@
|
||||
/** Shared producer/consumer contract for `resolve_area.candidateId`. */
|
||||
|
||||
/** Room for every currently emitted bundled candidate (observed maximum: 45). */
|
||||
export const MAX_AREA_CANDIDATE_ID_LENGTH = 80;
|
||||
|
||||
/** JSON Schema-compatible grammar for bundled candidate handles. */
|
||||
export const AREA_CANDIDATE_ID_PATTERN =
|
||||
'^ne:(?:country|state|county):[\\p{L}\\p{M}\\p{N}]+(?:-[\\p{L}\\p{M}\\p{N}]+)*$';
|
||||
|
||||
const AREA_CANDIDATE_ID_RE =
|
||||
/^ne:(?:country|state|county):[\p{L}\p{M}\p{N}]+(?:-[\p{L}\p{M}\p{N}]+)*$/u;
|
||||
|
||||
export function isAreaCandidateId(value) {
|
||||
const candidateId = String(value || '');
|
||||
return (
|
||||
candidateId.length > 0 &&
|
||||
candidateId.length <= MAX_AREA_CANDIDATE_ID_LENGTH &&
|
||||
AREA_CANDIDATE_ID_RE.test(candidateId)
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user