@dxtmisha/functional-basic 1.1.6 → 1.1.8

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,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.1.8] - 2026-05-12
6
+
7
+ ### Added
8
+ - **Api**: Added `isLocalhost()` static method to check if the environment is localhost.
9
+ - **Api**: Added static wrappers for `getOrigin()`, `setOrigin()`, and `getHydrationScript()`.
10
+ - **Api**: Added automatic URL replacement for localization markers: `{locale}`, `{country}`, and `{language}`.
11
+
12
+ ### Changed / Improved
13
+ - **Api**: Updated `setConfig()` to include `origin` and `devMode` support.
14
+ - **Api**: Modernized request timeout logic to use `AbortSignal.timeout` when available.
15
+ - **Documentation**: Comprehensive update of the `Api` documentation across all supported languages (RU/EN/VI).
16
+ - **Tests**: Expanded unit tests for the `Api` class to ensure full coverage of static methods.
17
+
5
18
  ## [1.1.6] - 2026-05-08
6
19
 
7
20
  ### Added
@@ -1 +1,5 @@
1
- This library is a high-level infrastructure and utility toolkit designed for isomorphic TypeScript applications. Its primary function is to provide structured abstractions for networking, state persistence, internationalization, and localized data formatting. The networking layer features an advanced Fetch API wrapper (Api, ApiInstance) with built-in support for singleton or isolated instances, automated retries with jitter, request/response interceptors, global status management, and SSR-to-client hydration (ApiHydration). Storage utilities encompass request-isolated ServerStorage for SSR, prefix-supported Local/Session storage (DataStorage), reactive URL Hash management (Hash), and standardized Cookie handling. The internationalization suite includes wrappers for the Intl API (GeoIntl) to handle complex formatting for currencies, dates, and plurals, alongside country-specific logic for phone masks (GeoPhone) and flag identification (GeoFlag). It also contains a specialized translation engine (Translate) supporting batch asynchronous loading and fallback mechanisms. Additionally, it provides advanced UI logic utilities like SearchList for regex-based filtering with text highlighting and EventItem for managed DOM event lifecycles. An AI should study this library when implementing robust API clients, managing cross-platform storage, handling multi-locale UI components, or developing isomorphic applications requiring data consistency between server and client. It integrates directly with standard web APIs (Fetch, Intl, BroadcastChannel, ResizeObserver) and provides a centralized error reporting system (ErrorCenter) and global loading state (Loading).
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.
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.
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.
package/ai-doc.ru.txt ADDED
@@ -0,0 +1,5 @@
1
+ Это базовая функциональная библиотека (@dxtmisha/functional-basic). Здесь собраны алгоритмы, утилиты и классы, независимые от фреймворка.
2
+
3
+ ВНИМАНИЕ ДЛЯ СРЕДЫ VUE:
4
+ Если вы разрабатываете под Vue, СНАЧАЛА всегда ищите нужный функционал (composables, реактивные классы) в библиотеке `@dxtmisha/functional`.
5
+ И ТОЛЬКО если там нет нужного реактивного/специфичного для Vue аналога, используйте функционал напрямую из этой библиотеки (@dxtmisha/functional-basic).
package/ai-doc.txt ADDED
@@ -0,0 +1,5 @@
1
+ This is the basic functional library (@dxtmisha/functional-basic). It contains framework-agnostic algorithms, utilities, and classes.
2
+
3
+ ATTENTION FOR VUE ENVIROMENT:
4
+ If you are developing in Vue, ALWAYS look for the required functionality (composables, reactive wrappers) inside the `@dxtmisha/functional` library FIRST.
5
+ And ONLY if there is no reactive or Vue-specific analog there, you may use the functionality directly from this library (@dxtmisha/functional-basic).