@dxtmisha/functional-basic 1.3.4 → 1.3.6
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 +30 -0
- package/ai-description.txt +7 -12
- package/ai-types.txt +104 -746
- package/dist/library.js +627 -624
- package/dist/src/classes/GeoInstance.d.ts +21 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
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
|
+
|
|
15
|
+
## [1.3.5] - 2026-06-05
|
|
16
|
+
|
|
17
|
+
### Changed / Improved
|
|
18
|
+
- **Maintenance**: Version bumped to `1.3.5` to synchronize package updates across the workspace.
|
|
19
|
+
|
|
20
|
+
## [1.3.4] - 2026-06-05
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- **GeoFlag**: Updated `GeoFlag.getList()` and `GeoFlag.getNational()` methods to accept an optional `sort` parameter (defaulting to `true`) for alphabetical sorting.
|
|
24
|
+
|
|
25
|
+
## [1.3.3] - 2026-06-02
|
|
26
|
+
|
|
27
|
+
### Changed / Improved
|
|
28
|
+
- **Maintenance**: Version bumped to `1.3.3` to align with monorepo release updates.
|
|
29
|
+
|
|
30
|
+
## [1.3.2] - 2026-05-27
|
|
31
|
+
|
|
32
|
+
### Changed / Improved
|
|
33
|
+
- **ApiHeaders**: Normalized HTTP header key merging to enforce lowercase keys (e.g. `content-type`), preventing duplicate casing mismatches.
|
|
34
|
+
|
|
5
35
|
## [1.3.1] - 2026-05-25
|
|
6
36
|
|
|
7
37
|
### Changed / Improved
|
package/ai-description.txt
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
Core Purpose
|
|
2
|
-
A comprehensive, framework-agnostic utility library designed to simplify common frontend development tasks, including HTTP API communication (with caching and SSR hydration), state management (cookies, local/session storage), internationalization (Geo, Datetime, Translation), and DOM/Event management.
|
|
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.
|
|
3
2
|
|
|
4
|
-
Usage Scenarios
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
4. Complex DOM/UI Logic: Managing event listeners with lifecycle auto-cleanup, scrollbar width calculations, and global loading state management.
|
|
10
|
-
5. Localization/I18n: Handling currency, date formatting, and translation file loading dynamically.
|
|
11
|
-
6. Search Functionality: Implementing client-side search with regex matching and highlight formatting for list data.
|
|
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).
|
|
12
8
|
|
|
13
|
-
Integration Context
|
|
14
|
-
This library acts as a foundational "glue" layer. It is built using native Web APIs (Fetch, BroadcastChannel, ResizeObserver, Intl) and is intended to be initialized globally. It provides abstract classes that can be extended or injected to fit various architectures (e.g., SSR frameworks like Nuxt or Next.js, or standard SPA setups). It centralizes configuration for API paths, translation endpoints, and geo-data, serving as a unified utility core for the application.
|
|
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.
|