@dxtmisha/functional-basic 1.8.6 → 1.8.9

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/ai-description.md +14 -18
  3. package/ai-mcp-resources.json +5 -5
  4. package/ai-resources/prompts.json +8 -0
  5. package/ai-types.md +1720 -1045
  6. package/dist/classes/ApiCache.d.ts +2 -2
  7. package/dist/classes/ApiErrorStorage.d.ts +9 -1
  8. package/dist/classes/ApiHydration.d.ts +1 -0
  9. package/dist/classes/ApiInstance.d.ts +1 -0
  10. package/dist/classes/ApiStatus.d.ts +1 -0
  11. package/dist/classes/BroadcastMessage.d.ts +1 -0
  12. package/dist/classes/Cache.d.ts +1 -0
  13. package/dist/classes/CacheItem.d.ts +3 -0
  14. package/dist/classes/CookieBlock.d.ts +1 -1
  15. package/dist/classes/CookieBlockInstance.d.ts +2 -1
  16. package/dist/classes/CookieStorage.d.ts +2 -1
  17. package/dist/classes/DataStorage.d.ts +1 -1
  18. package/dist/classes/Datetime.d.ts +5 -4
  19. package/dist/classes/EventItem.d.ts +7 -28
  20. package/dist/classes/Formatters.d.ts +6 -10
  21. package/dist/classes/GeoFlag.d.ts +1 -1
  22. package/dist/classes/GeoInstance.d.ts +1 -0
  23. package/dist/classes/GeoIntl.d.ts +23 -36
  24. package/dist/classes/GeoPhone.d.ts +2 -0
  25. package/dist/classes/Global.d.ts +1 -1
  26. package/dist/classes/Hash.d.ts +1 -1
  27. package/dist/classes/Icons.d.ts +8 -8
  28. package/dist/classes/Loading.d.ts +8 -12
  29. package/dist/classes/LoadingInstance.d.ts +10 -22
  30. package/dist/classes/Meta.d.ts +4 -1
  31. package/dist/classes/MetaManager.d.ts +2 -0
  32. package/dist/classes/MetaOg.d.ts +7 -2
  33. package/dist/classes/MetaTwitter.d.ts +7 -2
  34. package/dist/classes/Query.d.ts +1 -1
  35. package/dist/classes/ResumableTimer.d.ts +4 -0
  36. package/dist/classes/ScrollbarWidth.d.ts +1 -0
  37. package/dist/classes/SearchList.d.ts +4 -0
  38. package/dist/classes/SearchListData.d.ts +3 -2
  39. package/dist/classes/SearchListMatcher.d.ts +3 -2
  40. package/dist/classes/ServerStorage.d.ts +5 -2
  41. package/dist/classes/StorageCallback.d.ts +2 -0
  42. package/dist/classes/Translate.d.ts +6 -8
  43. package/dist/classes/TranslateInstance.d.ts +4 -7
  44. package/dist/classes/UrlInstanceAbstract.d.ts +4 -0
  45. package/dist/functions/getMouseClient.d.ts +1 -1
  46. package/dist/functions/getMouseClientX.d.ts +1 -1
  47. package/dist/functions/getMouseClientY.d.ts +1 -1
  48. package/dist/library.js +11 -9
  49. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.8.9] - 2026-08-16
6
+
7
+ ### Added
8
+ - **LLM Configuration**: Added `llms.txt` configuration for package-level LLM context and documentation indexing.
9
+
10
+ ### Changed
11
+ - **AI Documentation & Types**: Regenerated package descriptions (`ai-description.md`) and updated AI type definitions.
12
+
13
+ ## [1.8.8] - 2026-08-15
14
+
15
+ ### Changed
16
+ - **getMouseClient / getMouseClientX / getMouseClientY**: Updated event parameter type definition from `MouseEvent & TouchEvent` to `MouseEvent | TouchEvent` and refactored coordinate resolution with explicit `'clientX' in event` and `'clientY' in event` property checks.
17
+ - **Tests & Documentation**: Updated unit test suites and wiki documentation files across all languages (ru, en, vi) to match the updated `MouseEvent | TouchEvent` event signature.
18
+
19
+ ## [1.8.7] - 2026-08-12
20
+
21
+ ### Changed
22
+ - **toNumber**: Refactored `toNumber` utility function to use primitive helper functions (`isFilled`, `isString`) for safer type coercion and input handling.
23
+ - **AI Documentation & Types**: Standardized bilingual JSDoc/TSDoc comments across library classes, functions, and type definitions; updated `ai-types.md` and `ai-types-list/` generated declaration files.
24
+ - **Scripts**: Updated `types` script in `package.json` to execute `library` and `build` before `dxt-types`.
25
+
26
+ ## [1.8.6] - 2026-08-10
27
+
28
+ ### Changed
29
+ - **AI Resources**: Renamed `ai-prompts/` directory to `ai-resources/` and `ai-mcp.json` to `ai-mcp-resources.json` across package metadata and configuration.
30
+ - **Package Metadata**: Updated `package.json` `files` list to include `ai-resources` and `ai-mcp-resources.json`.
31
+
5
32
  ## [1.8.5] - 2026-08-05
6
33
 
7
34
  ### Changed
package/ai-description.md CHANGED
@@ -1,21 +1,17 @@
1
- # Package Overview & Rules (@dxtmisha/functional-basic)
1
+ This package provides robust utility modules for HTTP API requests, caching, localization, state management, and DOM manipulation.
2
2
 
3
- ## Core Purpose
4
- This library provides an isomorphic suite of client- and server-side utilities designed for web application infrastructure, state management, internationalization, and network communication. It serves as a unified foundation for API lifecycle management, SSR hydration, browser storage, and data transformation across JavaScript runtimes.
5
-
6
- ## Key Capabilities & Groupings
7
- - **API & Network**: Streamlines HTTP fetch requests with configurable defaults, automatic retries with jitter, response caching, error classification, and SSR client hydration script generation.
8
- - **Storage & State Management**: Supplies request-isolated SSR storage contexts, type-safe cookie management, synchronized URL query and hash state, local and session storage with age-based expiration, and cross-tab broadcast messaging.
9
- - **Localization & Geographic Tools**: Provides automated country and language detection, phone number mask matching, metric-to-imperial unit conversion, pluralization, currency formatting, and asynchronous multi-language translation resolution.
10
- - **Search & Data Handling**: Enables multi-column list searching, search match highlighting, fuzzy and exact regular expression matching, multi-field array sorting, and recursive object template replacement.
11
- - **UI, DOM, & Event Helpers**: Delivers DOM element manipulation, ResizeObserver and scroll-sync event listeners, global loading indicators, icon registration, resumable timers, and isomorphic HTML meta tag management for standard SEO, Open Graph, and Twitter Cards.
12
-
13
- ## Triggers for Studying `ai-types.md`
14
- Studying type definitions in `ai-types.md` is mandatory when typing complex API request or response structures, configuring custom request wrappers, defining criteria for error storage items, specifying search column paths, setting up custom translation dictionaries, or implementing isolated server storage contexts during SSR.
15
-
16
- ## Integration Context
17
- This package connects with modern web frameworks and SSR environments by wrapping standard Web APIs, fetch interfaces, and DOM listeners with environment-agnostic abstractions and automated client-side hydration hooks.
3
+ Study "ai-types.md" when implementing or configuring features related to API clients, request/response caching, internationalization (Geo/Intl), translations, meta tags management, search filtering, or URL state synchronization.
18
4
 
5
+ API Integration
6
+ Error Handling
7
+ Cache Management
8
+ Cookie Storage
9
+ Geographic Localization
10
+ Internationalization
11
+ Data Formatting
12
+ Meta Tags
13
+ State Management
14
+ Search Matching
19
15
  ## Mandatory Rules
20
- Read the corresponding file ONLY when working on a task related to (even if not working directly with this package):
21
- - 'node_modules/@dxtmisha/functional-basic/ai-resources/api-reference.md': HTTP client caching, storage management, geolocation localization, and DOM utility helpers
16
+ You MUST evaluate whether your task relates to any of the following topics (even if not working directly with this package). If related material is present, you are strictly obligated to read and study the corresponding file before proceeding:
17
+ - 'node_modules/@dxtmisha/functional-basic/ai-resources/api-reference.md': Provides code examples and usage patterns for the @dxtmisha/functional-basic library modules including HTTP client, storage, geolocation, and DOM helpers. It helps AI agents understand how to correctly integrate and utilize utility functions for frontend and backend tasks.
@@ -3,18 +3,18 @@
3
3
  "uri": "@dxtmisha/functional-basic/ai-types.md",
4
4
  "name": "Type Definitions (@dxtmisha/functional-basic)",
5
5
  "mimeType": "text/markdown",
6
- "description": "Compressed and AI-optimized TypeScript declaration contracts for core utilities."
6
+ "description": "TypeScript type definitions and signatures for AI coding assistant."
7
7
  },
8
8
  {
9
9
  "uri": "@dxtmisha/functional-basic/ai-description.md",
10
- "name": "Package Overview & Rules (@dxtmisha/functional-basic)",
10
+ "name": "Project Overview (@dxtmisha/functional-basic)",
11
11
  "mimeType": "text/markdown",
12
- "description": "High-density project overview, key capabilities, and prompt trigger guidelines."
12
+ "description": "Project overview, usage guidelines, and mandatory prompt rules for AI coding assistant."
13
13
  },
14
14
  {
15
15
  "uri": "@dxtmisha/functional-basic/ai-resources/api-reference.md",
16
- "name": "API & Core Utilities (@dxtmisha/functional-basic)",
16
+ "name": "API Reference and Examples (@dxtmisha/functional-basic)",
17
17
  "mimeType": "text/markdown",
18
- "description": "HTTP client caching, storage management, geolocation localization, and DOM utility helpers."
18
+ "description": "Provides code examples and usage patterns for the @dxtmisha/functional-basic library modules including HTTP client, storage, geolocation, and DOM helpers. It helps AI agents understand how to correctly integrate and utilize utility functions for frontend and backend tasks."
19
19
  }
20
20
  ]
@@ -0,0 +1,8 @@
1
+ [
2
+ {
3
+ "path": "ai-resources/api-reference.md",
4
+ "md5": "5b6b7850a06fbe60c2ff108599c45dc3",
5
+ "name": "API Reference and Examples",
6
+ "description": "Provides code examples and usage patterns for the @dxtmisha/functional-basic library modules including HTTP client, storage, geolocation, and DOM helpers. It helps AI agents understand how to correctly integrate and utilize utility functions for frontend and backend tasks."
7
+ }
8
+ ]