@dxtmisha/functional-basic 1.3.15 → 1.4.1
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.md +20 -13
- package/ai-types.md +642 -332
- package/dist/library.js +493 -400
- package/dist/src/classes/GeoFlag.d.ts +29 -1
- package/dist/src/classes/HashInstance.d.ts +8 -74
- package/dist/src/classes/Query.d.ts +57 -0
- package/dist/src/classes/QueryInstance.d.ts +29 -0
- package/dist/src/classes/UrlInstanceAbstract.d.ts +94 -0
- package/dist/src/classes/UrlItem.d.ts +48 -0
- package/dist/src/library.d.ts +3 -0
- package/dist/src/types/geoTypes.d.ts +4 -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.4.0] - 2026-06-22
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **UrlInstanceAbstract**: Created base abstract class managing shared reactive state properties and methods (`data`, `watch`, `block`, `time`, `get()`, `set()`, `addWatch()`, `removeWatch()`, `reload()`, `initData()`, `makeWatch()`) for URL-based state instances.
|
|
9
|
+
- **UrlItem**: Added `getParams()` to parse URL parameters into an object with type transformations, and `setParams(params)` to replace and filter empty, null, or undefined parameters.
|
|
10
|
+
- **UrlItem**: Added comprehensive unit tests in `UrlItem.test.ts` for verifying parameter retrieval and mutation logic.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **HashInstance**: Refactored to extend `UrlInstanceAbstract`, inheriting all core state management properties and handlers.
|
|
14
|
+
- **QueryInstance**: Refactored to extend `UrlInstanceAbstract` and delegate query parameter reading/writing to `UrlItem.getParams()` and `UrlItem.setParams()`, ensuring SSR compatibility.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- **QueryInstance**: Updated `QueryInstance.test.ts` to run under the `jsdom` test environment, fixing `window is not defined` execution errors, and enhanced mocking setup.
|
|
18
|
+
|
|
5
19
|
## [1.3.15] - 2026-06-19
|
|
6
20
|
|
|
7
21
|
### Added
|
package/ai-description.md
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
The provided library is a comprehensive isomorphic toolkit for managing frontend and SSR-compatible application states, including API requests, internationalization, data persistence, and UI utilities.
|
|
2
|
+
|
|
3
|
+
Core Purpose:
|
|
4
|
+
Facilitates full-stack state management and utility-based data handling, providing standardized interfaces for HTTP requests (with caching and error handling), localization (Geo/Translation), storage (Cookie/Storage/Hash/Query), and DOM event synchronization.
|
|
2
5
|
|
|
3
6
|
Key Expositions:
|
|
4
|
-
- Api:
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
7
|
+
- Api: Singleton-based HTTP client (supports fetch, caching, hydration, and error normalization via ApiErrorStorage).
|
|
8
|
+
- Geo & GeoIntl: Internationalization framework for locale-aware number, date, currency, and phone number formatting.
|
|
9
|
+
- Meta, MetaOg, MetaTwitter: Declarative meta-tag management for SEO and social sharing.
|
|
10
|
+
- DataStorage & CookieStorage: Persistent storage wrappers (LocalStorage/SessionStorage/Cookie) with SSR context isolation.
|
|
11
|
+
- EventItem: Reactive DOM event wrapper supporting ResizeObserver and scroll synchronization.
|
|
12
|
+
- Translate & TranslateFile: Asynchronous translation engine with support for dynamic loading and key replacement.
|
|
13
|
+
- SearchList: Logic for client-side search indexing, matching, and highlighting within data lists.
|
|
14
|
+
- Utils: A broad collection of pure functional utilities (e.g., `copyObject`, `toNumber`, `isFilled`, `sleep`, `frame`).
|
|
9
15
|
|
|
10
16
|
Triggers for Studying ai-types.md:
|
|
11
|
-
- When implementing API integration (Api,
|
|
12
|
-
- When configuring global error handling (ErrorCenter
|
|
13
|
-
- When
|
|
14
|
-
- When
|
|
15
|
-
- When
|
|
16
|
-
- When
|
|
17
|
+
- When implementing or debugging API integration (Api, ApiInstance, ApiResponse).
|
|
18
|
+
- When configuring global error handling (ErrorCenter).
|
|
19
|
+
- When standardizing data localization or date/time formatting (Geo, GeoIntl, Datetime).
|
|
20
|
+
- When managing complex SSR hydration patterns (ServerStorage, ApiHydration).
|
|
21
|
+
- When integrating deep-search components (SearchList).
|
|
22
|
+
- When developing custom UI components requiring lifecycle-safe event binding (EventItem).
|
|
17
23
|
|
|
18
|
-
Integration Context:
|
|
24
|
+
Integration Context:
|
|
25
|
+
Operates as a foundational layer in the stack, compatible with both browser and Node.js (SSR) environments. It acts as a dependency for managing global application state, handling data-driven side effects, and normalizing communication with backend services. It is designed to be injected into frameworks (Vue/React) via lifecycle hooks or custom configuration providers.
|