1.3 KiB
1.3 KiB
CHANGELOG
[1.1.0] : Refactor and Optimization
Performance
- IntlCache: Implemented caching for
Intlobjects. Date formatting no longer creates new instances on every refresh. - Shared Styles: Used
adoptedStyleSheetsinstead of<style>tags. The browser parses CSS only once. - Date Math: Removed
whileloops for year/month calculations. Replaced them with faster O(1) mathematical formulas.
Stability and UI
- Layout Shift (CLS): Fixed content jumping on load. The component now has a default
min-height. - Initialization: Added a non-breaking space (
\u00A0) at start. This prevents zero height before the first render. - TickHub Safety: Iteration over subscribers now uses a copy. An error in one timer will not stop others.
Code Quality
- Private Fields: Changed
_variableconvention to native private fields#variable. Internal state is now fully protected. - Attribute Handling: Improved attribute update logic (
#isAttrUpdate). This eliminates unnecessary render cycles. - Auto-restart: The stopped timer restarts automatically if the target date changes to the future.
- Fallback: Added a safety check returning
00:00:00if formatting results in an empty string.