@dxtmisha/functional-basic 1.3.5 → 1.3.7
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 +10 -0
- package/ai-description.txt +21 -7
- package/ai-types.txt +686 -103
- package/dist/library.js +633 -624
- package/dist/src/classes/Geo.d.ts +7 -0
- package/dist/src/classes/GeoInstance.d.ts +33 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.3.6] - 2026-06-16
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **GeoInstance**: Integrated cookie storage persistence/hydration fallback: now attempts to retrieve the geo code from the `ui-geo-code` cookie (via `UI_GEO_COOKIE_KEY`) during initialization if DOM storage is unavailable.
|
|
9
|
+
|
|
10
|
+
### Changed / Improved
|
|
11
|
+
- **GeoInstance**: Refactored `findLocation()` to extract DOM-specific checks into `findLocationDom()`, improving architecture and separation of concerns.
|
|
12
|
+
- **GeoInstance**: Updated `set()` to store the updated geo code in the cookie when `save = true`.
|
|
13
|
+
- **ApiHeaders**: Fixed and updated unit tests in `ApiHeaders.test.ts` to align with the normalized lowercase HTTP header key merging behavior.
|
|
14
|
+
|
|
5
15
|
## [1.3.5] - 2026-06-05
|
|
6
16
|
|
|
7
17
|
### Changed / Improved
|
package/ai-description.txt
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
This library is a comprehensive, SSR-compatible utility collection for TypeScript/JavaScript web applications, providing a standardized interface for common web development tasks. It functions as a modular framework rather than a single-purpose library, offering unified management for data persistence, HTTP requests, UI state, and localization.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Core components include:
|
|
4
|
+
1. HTTP API Management: A centralized `ApiInstance` supporting request/response interception, auto-hydration for SSR, caching, and structured error handling via `ApiErrorStorage`.
|
|
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.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
The library is indispensable for enterprise-scale applications requiring:
|
|
11
|
+
- Seamless SSR hydration for API data and global states.
|
|
12
|
+
- Standardized error reporting and centralized API/translation configuration.
|
|
13
|
+
- Consistent formatting (dates, currency, units) across varied geographic locales.
|
|
14
|
+
- Managed event lifecycle and DOM interaction in complex, dynamic interfaces.
|
|
15
|
+
|
|
16
|
+
An AI coding assistant should study this library when tasked with:
|
|
17
|
+
- Implementing or refactoring data fetching and API communication layers.
|
|
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.
|