@dxtmisha/functional-basic 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.2.5] - 2026-05-17
6
+
7
+ ### Changed / Improved
8
+ - **AI Integration**: Updated the library's descriptive context (`ai-description.txt`) to better emphasize its isomorphic SSR architecture, centralized error management capabilities (`ErrorCenter`), and context-isolated storage abstractions.
9
+ - **AI Types**: Regenerated and expanded `ai-types.txt` to correctly map the recently introduced type architectures, including `ApiErrorStorageItem`, `ApiHeadersValue`, `ApiDefaultValue`, and updated Open Graph / Twitter Card meta tag enums. This ensures AI assistants have an accurate and up-to-date understanding of the core functional library.
10
+
11
+ ## [1.2.4] - 2026-05-16
12
+
13
+ ### Added
14
+ - **ApiError**: Introduced a comprehensive system for centralized API error identification and management, including `ApiError` (static utility), `ApiErrorStorage` (manager), and `ApiErrorItem` (data wrapper).
15
+ - **ApiError**: Added a static `add()` helper to simplify the registration of new error patterns directly through the primary utility class.
16
+
17
+ ### Changed / Improved
18
+ - **ApiInstance**: Integrated the new error handling system into the core request lifecycle. It now automatically identifies errors during failed requests and passes structured error data to downstream handlers.
19
+ - **ApiDataReturn**: Enhanced response processing to support the new error system. It now automatically extracts error metadata (code, message) from nested error objects and attaches the identified `ApiErrorItem` to the final result.
20
+ - **Api**: Updated the main API overview documentation to include detailed sections on Status tracking and Error identification.
21
+ - **Documentation**: Completed a full multilingual documentation cycle (EN, RU, VI) for the `ApiError` system and updated the core `Api` documentation to reflect new capabilities.
22
+ - **Types**: Standardized `setHeaders` and `setRequestDefault` in `ApiInstance` to use the new named types for better consistency.
23
+
5
24
  ## [1.2.3] - 2026-05-16
6
25
 
7
26
  ### Added
@@ -1,5 +1,5 @@
1
- This library is a high-level utility and abstraction framework designed for isomorphic (SSR/CSR) web application development. Its core purpose is to provide centralized, context-aware management for HTTP communication, localization (i18n), and browser environment abstractions. It encapsulates complex logic for API request lifecycle management including caching, retry jitter, and SSR hydration, comprehensive geographic data handling using Intl-based formatting, phone masking, and flag metadata, and reactive DOM state management for meta tags, global loaders, and scroll synchronization.
1
+ This library is a high-level isomorphic utility suite for frontend application development, specifically optimized for Server-Side Rendering (SSR) environments. Its core purpose is to provide a standardized, context-isolated architecture for HTTP transport, internationalization (i18n), error management, metadata control, and DOM state synchronization.
2
2
 
3
- An AI should study this API when implementing data-heavy interfaces that require complex localization (dates, currencies, plurals), when building SSR-compatible applications that need to isolate data per request through ServerStorage and CookieStorage, or when managing advanced DOM interactions like high-performance scroll/resize tracking and custom event dispatching. It is indispensable for projects requiring structured search/filtering logic with match highlighting or unified error handling across varied application modules.
3
+ Study this library's API when implementing standardized Fetch-based request logic featuring built-in caching, jittered retries, and automated SSR hydration; managing dynamic SEO metadata (Open Graph and Twitter Cards) with DOM-synchronization; or implementing complex locale-aware data formatting including currencies, relative times, and country-specific phone masks. It is indispensable for handling SSR data isolation via specialized storage abstractions (ServerStorage, DataStorage) and for executing high-performance client-side search with regex-based match highlighting. The library also provides advanced lifecycle management for DOM events, including specialized observers for element resizing and scroll-sync optimizations.
4
4
 
5
- The library integrates into the mid-to-lower tiers of a modern frontend stack, acting as a bridge between raw platform APIs (Fetch, Intl, BroadcastChannel, DOM) and application-level components. It relies on a singleton-pattern architecture for global states while allowing instance-based isolation for request-specific contexts, particularly during server-side rendering phases where data hydration between server and client is required.
5
+ Technically, it acts as an abstracted transport and utility layer between native Web APIs (Fetch, Intl, BroadcastChannel, ResizeObserver) and application-level logic. It facilitates data consistency between server and client through script-based hydration and provides a centralized ErrorCenter for standardized fault handling across disparate application modules.