@dxtmisha/functional-basic 1.8.6 → 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 (46) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/ai-description.md +12 -20
  3. package/ai-mcp-resources.json +5 -5
  4. package/ai-resources/prompts.json +8 -0
  5. package/ai-types.md +1720 -1042
  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 +9 -7
  46. package/package.json +4 -4
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,21 +1,13 @@
1
- # Package Overview & Rules (@dxtmisha/functional-basic)
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.
18
-
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
19
11
  ## 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
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.
@@ -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
+ ]