@dxtmisha/functional-basic 1.8.5 → 1.8.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/ai-description.md +12 -3
  3. package/ai-mcp-resources.json +20 -0
  4. package/ai-resources/prompts.json +8 -0
  5. package/ai-types.md +3066 -1360
  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/library.js +26 -26
  46. package/package.json +6 -6
  47. package/ai-mcp.json +0 -20
  48. /package/{ai-prompts → ai-resources}/api-reference.md +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.8.7] - 2026-08-12
6
+
7
+ ### Changed
8
+ - **toNumber**: Refactored `toNumber` utility function to use primitive helper functions (`isFilled`, `isString`) for safer type coercion and input handling.
9
+ - **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.
10
+ - **Scripts**: Updated `types` script in `package.json` to execute `library` and `build` before `dxt-types`.
11
+
12
+ ## [1.8.6] - 2026-08-10
13
+
14
+ ### Changed
15
+ - **AI Resources**: Renamed `ai-prompts/` directory to `ai-resources/` and `ai-mcp.json` to `ai-mcp-resources.json` across package metadata and configuration.
16
+ - **Package Metadata**: Updated `package.json` `files` list to include `ai-resources` and `ai-mcp-resources.json`.
17
+
5
18
  ## [1.8.5] - 2026-08-05
6
19
 
7
20
  ### Changed
package/ai-description.md CHANGED
@@ -1,4 +1,13 @@
1
- The library provides an isomorphic suite of client- and server-side utilities designed for web application infrastructure, state management, internationalization, and network communication, serving as a unified foundation for API lifecycle management, SSR hydration, browser storage, and data transformation across JavaScript runtimes. API and network utilities streamline HTTP fetch requests with configurable defaults, automatic retries with jitter, response caching, error classification, and SSR client hydration script generation. Storage and state management modules supply 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. Localization and geographic tools provide automated country and language detection, phone number mask matching, metric-to-imperial unit conversion, pluralization, currency formatting, and asynchronous multi-language translation resolution. Search and data handling capabilities enable multi-column list searching, search match highlighting, fuzzy and exact regular expression matching, multi-field array sorting, and recursive object template replacement. UI, DOM, and event helpers deliver 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. 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. 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.
1
+ This package is a comprehensive utility library providing robust tools for API requests, data caching, localization, formatting, and state management. Study it to understand enterprise-grade frontend architecture, robust error handling, SSR-compatible data hydration, and advanced internationalization primitives.
2
+
3
+ API Integration
4
+ State Management
5
+ Caching
6
+ Internationalization
7
+ Localization
8
+ URL Routing
9
+ Event Handling
10
+ Meta Tags
2
11
  ## Mandatory Rules
3
- Read the corresponding file ONLY when working on a task related to (even if not working directly with this package):
4
- - 'node_modules/@dxtmisha/functional-basic/ai-prompts/api-reference.md': HTTP client caching, storage management, geolocation localization, and DOM utility helpers
12
+ 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:
13
+ - '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.
@@ -0,0 +1,20 @@
1
+ [
2
+ {
3
+ "uri": "@dxtmisha/functional-basic/ai-types.md",
4
+ "name": "Type Definitions (@dxtmisha/functional-basic)",
5
+ "mimeType": "text/markdown",
6
+ "description": "TypeScript type definitions and signatures for AI coding assistant."
7
+ },
8
+ {
9
+ "uri": "@dxtmisha/functional-basic/ai-description.md",
10
+ "name": "Project Overview (@dxtmisha/functional-basic)",
11
+ "mimeType": "text/markdown",
12
+ "description": "Project overview, usage guidelines, and mandatory prompt rules for AI coding assistant."
13
+ },
14
+ {
15
+ "uri": "@dxtmisha/functional-basic/ai-resources/api-reference.md",
16
+ "name": "API Reference and Examples (@dxtmisha/functional-basic)",
17
+ "mimeType": "text/markdown",
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
+ }
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
+ ]