@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 +14 -0
- package/ai-description.txt +12 -7
- package/ai-types.txt +1170 -121
- package/dist/library.js +443 -382
- package/dist/src/classes/Geo.d.ts +7 -0
- package/dist/src/classes/GeoInstance.d.ts +12 -0
- package/dist/src/classes/UrlItem.d.ts +71 -0
- package/dist/src/library.d.ts +1 -0
- package/package.json +1 -1
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
|
package/ai-description.txt
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
4
|
-
|
|
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
|
-
|
|
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.
|