/* * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ import { CoordinateSystem, SegmentConfig } from "./types.js"; //#region src/components/coordinate-field/segment-configs.d.ts /** The separator used for the logical field groups. */ declare const GROUP_SEPARATOR = ", "; /** * DD (Decimal Degrees) Segment Configuration * * Format: [lat_deg], [lon_deg] * Example: 89.765432, -123.456789 * * Segments: * - Latitude degrees: -90 to 90, allows negative sign, decimals, 0-9 * - Longitude degrees: -180 to 180, allows negative sign, decimals, 0-9 * * Total segments: 2 editable */ declare const ddSegmentConfigs: SegmentConfig[]; /** * DDM (Degrees Decimal Minutes) Segment Configuration * * Format: [lat_deg]° [lat_min]' [lat_dir], [lon_deg]° [lon_min]' [lon_dir] * Example: 89° 45.9259' N, 123° 27.4073' W * * Segments: * - Latitude degrees: 0-90, whole number only (no decimals) * - Latitude minutes: 0-59.9999, decimals allowed * - Latitude direction: N or S * - Longitude degrees: 0-180, whole number only (no decimals) * - Longitude minutes: 0-59.9999, decimals allowed * - Longitude direction: E or W * * Total segments: 6 editable */ declare const ddmSegmentConfigs: SegmentConfig[]; /** * DMS (Degrees Minutes Seconds) Segment Configuration * * Format: [lat_deg]° [lat_min]' [lat_sec]" [lat_dir], [lon_deg]° [lon_min]' [lon_sec]" [lon_dir] * Example: 89° 45' 55.56" N, 123° 27' 24.44" W * * Segments: * - Latitude degrees: 0-90, whole number only (no decimals) * - Latitude minutes: 0-59, whole number only (no decimals) * - Latitude seconds: 0-59.999, decimals allowed * - Latitude direction: N or S * - Longitude degrees: 0-180, whole number only (no decimals) * - Longitude minutes: 0-59, whole number only (no decimals) * - Longitude seconds: 0-59.999, decimals allowed * - Longitude direction: E or W * * Total segments: 8 editable */ declare const dmsSegmentConfigs: SegmentConfig[]; /** * MGRS (Military Grid Reference System) Segment Configuration * * Format: [zone][band] [grid_100km] [easting] [northing] * Example: 18T WM 12345 67890 * * Segments: * - Zone: 1-60, 2 digits * - Band: C-X (excluding I and O), 1 letter * - Grid 100km: 2 letters (A-Z excluding I and O) * - Easting: 5 digits (can be 1-5 based on precision) * - Northing: 5 digits (can be 1-5 based on precision) * * Total segments: 5 editable * * Reference: /packages/geo/src/coordinates/mgrs/parser.ts * Pattern: /^((?:..?)?)(\w?)\s*((?:\w{2})?)\s*(?:(\d+(?:\.\d*)?)?)\s*(?:(\d+(?:\.\d*)?)?)$/i */ declare const mgrsSegmentConfigs: SegmentConfig[]; /** * UTM (Universal Transverse Mercator) Segment Configuration * * Format: [zone][hemisphere] [easting] [northing] * Example: 18N 585628 4511644 * * Segments: * - Zone: 1-60, 2 digits * - Hemisphere: N or S, 1 letter * - Easting: 6-7 digits * - Northing: 7 digits * * Total segments: 4 editable * * Reference: /packages/geo/src/coordinates/utm/parser.ts * Pattern: /^((?:..)?)\s*(\w?)\s*(?:(\d+(?:\.\d*)?)?)\s*(?:(\d+(?:\.\d*)?)?)$/i */ declare const utmSegmentConfigs: SegmentConfig[]; /** * Get segment configurations for a specific coordinate system * * @param format - The coordinate system format * @returns Array of segment configurations for the specified format */ declare function getSegmentConfigs(format: CoordinateSystem): SegmentConfig[]; /** * Get format description with example * * Provides a user-friendly description of the coordinate format with an example value. * These descriptions can be used as helper text to guide users on the expected format. * * @param format - The coordinate system format * @returns Description string with format example */ declare function getFormatDescription(format: CoordinateSystem): string; /** * Get editable segment count for a format * * Returns the number of editable segments (excluding literal separators) for each format. * This is useful for initializing segment values and validation. * * @param format - The coordinate system format * @returns Number of editable segments */ declare function getEditableSegmentCount(format: CoordinateSystem): number; /** * Validate segment count for each format * * Expected editable segment counts: * - DD: 2 segments (lat, lon) * - DDM: 6 segments (lat_deg, lat_min, lat_dir, lon_deg, lon_min, lon_dir) * - DMS: 8 segments (lat_deg, lat_min, lat_sec, lat_dir, lon_deg, lon_min, lon_sec, lon_dir) * - MGRS: 5 segments (zone, band, grid, easting, northing) * - UTM: 4 segments (zone, hemisphere, easting, northing) */ declare const EXPECTED_SEGMENT_COUNTS: Record; /** * Get semantic accessibility label for a segment based on format and editable index * * Provides descriptive labels for screen readers (e.g., "Latitude degrees", "Longitude minutes") * to improve accessibility beyond generic "Coordinate segment 1" announcements. * * @param format - The coordinate system format * @param editableIndex - The index of the editable segment (0-based, excluding literals) * @returns Semantic label string for the segment */ declare function getSegmentLabel(format: CoordinateSystem, editableIndex: number): string; //#endregion export { EXPECTED_SEGMENT_COUNTS, GROUP_SEPARATOR, ddSegmentConfigs, ddmSegmentConfigs, dmsSegmentConfigs, getEditableSegmentCount, getFormatDescription, getSegmentConfigs, getSegmentLabel, mgrsSegmentConfigs, utmSegmentConfigs }; //# sourceMappingURL=segment-configs.d.ts.map