@dxtmisha/functional-basic 1.8.4 → 1.8.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 CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.8.5] - 2026-08-05
6
+
7
+ ### Changed
8
+ - **AI Documentation**: Updated JSDoc prompt rules, added MCP resource definitions (`ai-mcp.json`), removed redundant prompt files, and updated package metadata (`ai-description.md`, `ai-types.md`).
9
+
5
10
  ## [1.8.4] - 2026-08-05
6
11
 
7
12
  ### Changed
package/ai-description.md CHANGED
@@ -1,11 +1,21 @@
1
- This library serves as a comprehensive isomorphic runtime toolkit providing core utility primitives for HTTP networking, state persistence, internationalization, metadata management, DOM manipulation, and data transformation across browser and server-side rendering environments.
1
+ # Package Overview & Rules (@dxtmisha/functional-basic)
2
2
 
3
- Its main capabilities are organized into high-level functional groupings: API and network utilities handle HTTP request orchestration, response caching, structured error normalization, retry strategies, and SSR hydration script generation; storage utilities manage cookies, local and session storage, request-isolated server storage, and inter-tab broadcast messaging; internationalization and localization modules process geographic standards, timezone conversions, localized number/date/unit formatting, phone masking, and pluralization rules; DOM and event helpers provide lifecycle-managed event listeners, smooth scrolling, visibility checks, element creation, and global loading indicators; metadata modules provide a unified interface to generate and manage HTML, Open Graph, and Twitter Card tags; and data processing functions handle string transformations, deep copying, template replacement, fuzzy searching with query highlighting, and list sorting.
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.
4
5
 
5
- It is mandatory to study "ai-types.md" when configuring typed API request payloads and hooks, defining custom error center callbacks, constructing complex localized formatter options, implementing schema-driven search or sorting parameters, or working with environment-specific storage contracts.
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.
6
18
 
7
- The library integrates into modern web application stacks by offering framework-agnostic utilities that safely detect browser versus SSR runtimes while supporting seamless client hydration workflows.
8
19
  ## Mandatory Rules
9
- Read the corresponding file if your task relates to:
10
- - 'node_modules/@dxtmisha/functional-basic/ai-prompts/api-reference.md': HTTP client, caching, storage, geolocation, localization, formatting, DOM events, and utility helpers
11
- - 'node_modules/@dxtmisha/functional-basic/ai-prompts/coding-standards.md': Class structure, typing standards, SSR safety, and primitive helper functions
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
package/ai-doc.md CHANGED
@@ -1 +1,8 @@
1
- Framework-agnostic utility library. **Vue developers MUST search `@dxtmisha/functional` first**; use this ONLY if no reactive/Vue-specific analog exists.
1
+ Framework-agnostic utility library. **Vue developers MUST search `@dxtmisha/functional` first**; use this ONLY if no reactive/Vue-specific analog exists.
2
+
3
+ ## Coding Standards & Conventions
4
+
5
+ - **Class Structure**: Properties/Variables (`public`->`protected`->`private`) -> Constructor -> Public Methods -> Protected Methods -> Private Methods. Within each method group, follow order: 1) `get` / `set` (getters/setters), 2) `is...` / `has...`, 3) `get...` / `set...`, 4) `add...` / `remove...`, 5) `update...` / `reset...`, 6) remaining methods. Within each subgroup, methods are grouped semantically by logical pairs and rules (e.g., `min` / `max`, `width` / `height`, `x` / `y` / `z`), and remaining methods are sorted alphabetically.
6
+ - **Style/Types**: `PascalCase` classes, `camelCase` methods/props, `UPPER_SNAKE_CASE` constants. No `any` (use `unknown`/generics). Explicit return types for ALL methods. Export all interfaces. Type files: `*Types.ts`. Use `@effect/schema` for schemas.
7
+ - **SSR Safety**: Isomorphic code. Do NOT store request state in globals. Use `isDomRuntime()` before `window`/`document`. Use `ServerStorage.get('key', () => new Class())` for request-isolated singletons.
8
+ - **Utility & Primitive Functions**: ALWAYS use primitive helper functions from this package (e.g. `isFunction`, `executeFunction`, `isFilled`, `isObject`, `isString`, `isArray`, etc.) instead of writing custom inline checks or conditions.
@@ -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": "Compressed and AI-optimized TypeScript declaration contracts for core utilities."
7
+ },
8
+ {
9
+ "uri": "@dxtmisha/functional-basic/ai-description.md",
10
+ "name": "Package Overview & Rules (@dxtmisha/functional-basic)",
11
+ "mimeType": "text/markdown",
12
+ "description": "High-density project overview, key capabilities, and prompt trigger guidelines."
13
+ },
14
+ {
15
+ "uri": "@dxtmisha/functional-basic/ai-resources/api-reference.md",
16
+ "name": "API & Core Utilities (@dxtmisha/functional-basic)",
17
+ "mimeType": "text/markdown",
18
+ "description": "HTTP client caching, storage management, geolocation localization, and DOM utility helpers."
19
+ }
20
+ ]