@dxtmisha/functional-basic 1.3.6 → 1.3.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,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.3.8] - 2026-06-16
6
+
7
+ ### Added
8
+ - **UrlItem**: Introduced a new isomorphic utility class for parsing, inspecting, and modifying URLs. It provides read-only getters for standard URL parts (`href`, `protocol`, `pathname`, `hash`, etc.), a single `set()` method to update the URL value, and a static `getInstance()` method to retrieve a request-isolated instance from `ServerStorage`.
9
+ - **Tests**: Created a comprehensive test suite `UrlItem.test.ts` to verify parsing fallbacks in SSR/DOM environments, property values, and `getInstance` request-isolation behavior.
10
+
11
+ ## [1.3.7] - 2026-06-16
12
+
13
+ ### Added
14
+ - **Geo**: Added static `setValueDefault` method to configure the default country/language code.
15
+
16
+ ### Changed / Improved
17
+ - **GeoInstance**: Updated `setValueDefault` to dynamically re-evaluate and update the active location, item, and language properties when a new default code is assigned.
18
+
5
19
  ## [1.3.6] - 2026-06-16
6
20
 
7
21
  ### Added
@@ -1,9 +1,14 @@
1
- Core Purpose: This library is a comprehensive, SSR-compatible utility suite for frontend applications, providing centralized management for HTTP requests (Fetch API), localized data formatting (Intl), state/storage management (cookies, local/session storage), and meta-tag manipulation. It acts as a foundational framework for handling API communication, multi-language support, and persistent application state across client and server environments.
1
+ The library is a comprehensive, isomorphic utility suite for web applications, providing structured abstractions for network communication, state and storage management, and internationalization.
2
2
 
3
- Usage Scenarios: You should study this library when:
4
- - Implementing or refactoring an API communication layer: The library provides robust handling of requests, response caching, error storage, and hydration across SSR/Client boundaries via classes like ApiInstance, ApiCache, and ApiResponse.
5
- - Managing internationalization (i18n): Use its localization utilities (Geo, GeoIntl, Translate, Datetime) for date/time formatting, currency handling, and phone number masking.
6
- - Handling complex state and storage: Its specialized storage wrappers (DataStorage, CookieStorage, ServerStorage) are indispensable for maintaining consistency between server-rendered HTML and client-side hydrations.
7
- - Implementing UI-dependent logic: It provides optimized event listeners (EventItem), loading state management (Loading, LoadingInstance), and reactive URL hash management (Hash, HashInstance).
3
+ Core Purpose:
4
+ It serves as a unified SDK for managing API interaction, client/server-side data storage, application state, and localization in a framework-agnostic manner.
8
5
 
9
- Integration Context: The library is designed to be environment-agnostic but is particularly effective in SSR-heavy stacks (like Vue or React SSR). It manages the transition from server-rendered state to client-side interactivity using hydration helpers. It operates as a set of singleton or instance-based controllers that can be initialized at the application entry point to provide global, consistent interfaces for network requests, localization, and data persistence.
6
+ Usage Scenarios:
7
+ - API Orchestration: Use the Api class and its associated helpers for centralized HTTP requests, response handling, error management, and request lifecycle hooks (preparation/end).
8
+ - Data Persistence: Utilize wrappers for browser storage (LocalStorage/SessionStorage), Cookies, and URL state (Hash), including SSR-safe data synchronization.
9
+ - Localization: Implement translation management (Translate) and internationalization (Geo, Datetime) for formatting dates, numbers, and currencies based on user locale.
10
+ - DOM and Event Management: Use EventItem for lifecycle-aware event listeners (with built-in performance optimizations like resize and scroll-sync) and Loading/Icons modules for UI state management.
11
+ - Meta Tag Management: Handle SEO and Open Graph/Twitter meta tags dynamically.
12
+
13
+ Integration Context:
14
+ The library is designed for modular inclusion in web stacks. It is particularly valuable for applications requiring SSR (Server-Side Rendering) as it provides hydration helpers (ApiHydration, ServerStorage) and DOM-agnostic fallbacks. Its classes are often singleton-based, meaning it acts as a global or request-scoped controller for infrastructure tasks that would otherwise require manual implementation of boilerplate logic. An AI should study its API when implementing data-fetching services, global configuration providers, or cross-browser storage layers.