✨ MAJOR FEATURES: • Auto-zoom intelligence với smart bounds fitting • Enhanced 3D GPS markers với pulsing effects • Professional route display với 6-layer rendering • Status-based parking icons với availability indicators • Production-ready build optimizations 🗺️ AUTO-ZOOM FEATURES: • Smart bounds fitting cho GPS + selected parking • Adaptive padding (50px) cho visual balance • Max zoom control (level 16) để tránh quá gần • Dynamic centering khi không có selection 🎨 ENHANCED VISUALS: • 3D GPS marker với multi-layer pulse effects • Advanced parking icons với status colors • Selection highlighting với animation • Dimming system cho non-selected items 🛣️ ROUTE SYSTEM: • OpenRouteService API integration • Multi-layer route rendering (glow, shadow, main, animated) • Real-time distance & duration calculation • Visual route info trong popup 📱 PRODUCTION READY: • SSR safe với dynamic imports • Build errors resolved • Global deployment via Vercel • Optimized performance 🌍 DEPLOYMENT: • Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app • Bundle size: 22.8 kB optimized • Global CDN distribution • HTTPS enabled 💾 VERSION CONTROL: • MapView-v2.0.tsx backup created • MAPVIEW_VERSIONS.md documentation • Full version history tracking
81 lines
3.0 KiB
TypeScript
81 lines
3.0 KiB
TypeScript
import { type Token, TokenKind } from './Token';
|
|
import { TokenSequence } from './TokenSequence';
|
|
import type { ParserContext } from './ParserContext';
|
|
/**
|
|
* Manages a stream of tokens that are read by the parser.
|
|
*
|
|
* @remarks
|
|
* Use TokenReader.readToken() to read a token and advance the stream pointer.
|
|
* Use TokenReader.peekToken() to preview the next token.
|
|
* Use TokenReader.createMarker() and backtrackToMarker() to rewind to an earlier point.
|
|
* Whenever readToken() is called, the token is added to an accumulated TokenSequence
|
|
* that can be extracted by calling extractAccumulatedSequence().
|
|
*/
|
|
export declare class TokenReader {
|
|
readonly tokens: ReadonlyArray<Token>;
|
|
private readonly _parserContext;
|
|
private _readerStartIndex;
|
|
private _readerEndIndex;
|
|
private _currentIndex;
|
|
private _accumulatedStartIndex;
|
|
constructor(parserContext: ParserContext, embeddedTokenSequence?: TokenSequence);
|
|
/**
|
|
* Extracts and returns the TokenSequence that was accumulated so far by calls to readToken().
|
|
* The next call to readToken() will start a new accumulated sequence.
|
|
*/
|
|
extractAccumulatedSequence(): TokenSequence;
|
|
/**
|
|
* Returns true if the accumulated sequence has any tokens yet. This will be false
|
|
* when the TokenReader starts, and it will be false immediately after a call
|
|
* to extractAccumulatedSequence(). Otherwise, it will become true whenever readToken()
|
|
* is called.
|
|
*/
|
|
isAccumulatedSequenceEmpty(): boolean;
|
|
/**
|
|
* Like extractAccumulatedSequence(), but returns undefined if nothing has been
|
|
* accumulated yet.
|
|
*/
|
|
tryExtractAccumulatedSequence(): TokenSequence | undefined;
|
|
/**
|
|
* Asserts that isAccumulatedSequenceEmpty() should return false. If not, an exception
|
|
* is throw indicating a parser bug.
|
|
*/
|
|
assertAccumulatedSequenceIsEmpty(): void;
|
|
/**
|
|
* Returns the next token that would be returned by _readToken(), without
|
|
* consuming anything.
|
|
*/
|
|
peekToken(): Token;
|
|
/**
|
|
* Returns the TokenKind for the next token that would be returned by _readToken(), without
|
|
* consuming anything.
|
|
*/
|
|
peekTokenKind(): TokenKind;
|
|
/**
|
|
* Like peekTokenKind(), but looks ahead two tokens.
|
|
*/
|
|
peekTokenAfterKind(): TokenKind;
|
|
/**
|
|
* Like peekTokenKind(), but looks ahead three tokens.
|
|
*/
|
|
peekTokenAfterAfterKind(): TokenKind;
|
|
/**
|
|
* Extract the next token from the input stream and return it.
|
|
* The token will also be appended to the accumulated sequence, which can
|
|
* later be accessed via extractAccumulatedSequence().
|
|
*/
|
|
readToken(): Token;
|
|
/**
|
|
* Returns the kind of the token immediately before the current token.
|
|
*/
|
|
peekPreviousTokenKind(): TokenKind;
|
|
/**
|
|
* Remembers the current position in the stream.
|
|
*/
|
|
createMarker(): number;
|
|
/**
|
|
* Rewinds the stream pointer to a previous position in the stream.
|
|
*/
|
|
backtrackToMarker(marker: number): void;
|
|
}
|
|
//# sourceMappingURL=TokenReader.d.ts.map
|