@dxtmisha/functional-basic 1.3.7 → 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 +11 -20
- package/ai-types.txt +552 -86
- package/dist/library.js +436 -381
- 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,23 +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
|
-
Core
|
|
4
|
-
|
|
5
|
-
2. Storage & State: Wrappers for `localStorage`, `sessionStorage` (`DataStorage`), `cookies` (`CookieStorage`), and a global data registry.
|
|
6
|
-
3. Localization: Extensive support for internationalization, including date/number/currency formatting (`GeoIntl`) and a translation system (`TranslateInstance`).
|
|
7
|
-
4. DOM/Utility Tools: Event listeners (`EventItem`) with SSR safety, scrollbar width detection, responsive image/file processing, and type-safe utilities for arrays, objects, and strings.
|
|
8
|
-
5. Meta Management: Structured handling of standard HTML, Open Graph, and Twitter meta tags.
|
|
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.
|
|
9
5
|
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
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.
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
- Standardizing internationalization (i18n) and data formatting logic.
|
|
19
|
-
- Managing persistent client-side storage with built-in SSR support.
|
|
20
|
-
- Orchestrating complex DOM events or managing high-frequency UI synchronization (e.g., scroll/resize).
|
|
21
|
-
- Implementing SEO metadata management across SSR pages.
|
|
22
|
-
|
|
23
|
-
The library integrates primarily with native Web APIs (Fetch, localStorage, etc.) and provides a consistent high-level abstraction layer, making it suitable for any framework-agnostic or framework-specific project (e.g., Vue or React) that requires robust state and IO management.
|
|
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.
|