@dxtmisha/functional-basic 1.10.1 → 1.11.0
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 +13 -0
- package/ai-description.md +5 -10
- package/ai-doc.md +1 -1
- package/ai-mcp-resources.json +5 -5
- package/ai-resources/design-config.md +7 -0
- package/ai-types.md +9 -6
- package/dist/library.d.ts +6 -0
- package/dist/library.js +842 -805
- package/package.json +2 -2
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.11.0] - 2026-09-07
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Configuration Types**:
|
|
9
|
+
- Added `DesignUiConfigPackagePrompt`, `promptInclude`, and `promptPackageOnly` type definitions to `src/types/basicTypes.ts`.
|
|
10
|
+
- Added AI resource documentation for `design-config.md` with prompt exclusion rules.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **Dependencies**:
|
|
14
|
+
- Updated workspace package dependencies to explicit `>=` semver ranges (`@dxtmisha/media >= 0.7.3`).
|
|
15
|
+
- **AI Documentation**:
|
|
16
|
+
- Refined descriptions and updated MD5 hashes in `ai-types-list/resources/` for `design-config.json` and `error-center.json`.
|
|
17
|
+
|
|
5
18
|
## [1.10.1] - 2026-08-30
|
|
6
19
|
|
|
7
20
|
### Added
|
package/ai-description.md
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
A comprehensive isomorphic utility framework providing client/SSR HTTP client management, locale-aware internationalization, data caching, storage abstraction, DOM event handling, search filtering, and SEO metadata orchestration.
|
|
1
|
+
This package provides a comprehensive isomorphic toolkit containing core services, state managers, and utilities for both browser and server-side runtimes. It includes integrated modules for HTTP requests with SSR hydration and caching, geographic localization, date and measurement unit formatting, dictionary translations, persistent storage, and URL state synchronization. An AI assistant should consult this package when implementing API integration layers, configuring SEO and social metadata, managing multi-locale formatting, or coordinating client-server storage and DOM utilities.
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
Study `ai-types.md` when configuring or executing HTTP requests, handling SSR hydration, setting up request/response interceptors or mock emulators (`Api`, `ApiFetch`, `ApiResponse`, `ApiPreparation`, `ApiHeaders`), managing persistent and session storage across DOM and server runtimes (`CookieStorage`, `DataStorage`, `ServerStorage`), implementing localized formatting for dates, currencies, numbers, units, or phone numbers (`Geo`, `GeoIntl`, `GeoUnit`, `GeoPhone`, `Datetime`), configuring i18n translation batching or file loaders (`Translate`, `TranslateFile`), setting up centralized error handling (`ErrorCenter`), binding resilient DOM listeners or resize/scroll observers (`EventItem`), building regex-based searchable lists and highlighted match views (`SearchList`, `Formatters`), managing Open Graph and Twitter Card SEO tags (`Meta`, `MetaOg`, `MetaTwitter`), or synchronizing state with URL hash and query parameters (`Query`, `Hash`, `UrlItem`).
|
|
6
|
-
|
|
7
|
-
### Key Capabilities
|
|
8
|
-
HTTP Client Integration, API Response Caching, SSR State Hydration, Isomorphic Cookie Storage, Web Storage Abstraction, Locale Internationalization, Datetime Manipulation, Multi Unit Conversion, Phone Number Masking, I18n Translation Management, Centralized Error Handling, DOM Event Management, Search Filtering, Match Highlighting, URL State Synchronization, SEO Meta Management, Cross Tab Messaging, Global Loading Tracking
|
|
3
|
+
Key Capabilities: API Client, Request Caching, SSR Hydration, API Mocking, Error Management, Geographic Localization, Locale Formatting, Translation Management, Phone Masking, Unit Conversion, DateTime Localization, Cookie Management, Server Storage, Browser Storage, URL State Sync, Broadcast Messaging, SEO Meta Management, Open Graph Metadata, Twitter Card Management, DOM Event Handling, Search List Filtering, Text Highlighting, Clipboard Utilities, Global Loading State
|
|
9
4
|
## Mandatory Rules
|
|
10
5
|
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:
|
|
11
|
-
- 'node_modules/@dxtmisha/functional-basic/ai-resources/api-reference.md':
|
|
12
|
-
- 'node_modules/@dxtmisha/functional-basic/ai-resources/design-config.md':
|
|
13
|
-
- 'node_modules/@dxtmisha/functional-basic/ai-resources/error-center.md':
|
|
6
|
+
- 'node_modules/@dxtmisha/functional-basic/ai-resources/api-reference.md': API reference and code examples for HTTP client, storage, localization, DOM, and utility functions.
|
|
7
|
+
- 'node_modules/@dxtmisha/functional-basic/ai-resources/design-config.md': Rules and schema for configuring design systems, TypeScript declaration scanning, AI generation, and package settings.
|
|
8
|
+
- 'node_modules/@dxtmisha/functional-basic/ai-resources/error-center.md': Standards and APIs for centralized error handling, routing exceptions via ErrorCenter without direct console logging.
|
package/ai-doc.md
CHANGED
|
@@ -2,7 +2,7 @@ Framework-agnostic utility library. **Vue developers MUST search `@dxtmisha/func
|
|
|
2
2
|
|
|
3
3
|
## Coding Standards & Conventions
|
|
4
4
|
|
|
5
|
-
- **Class Structure**: Properties/Variables (`public`->`protected`->`private`) -> Constructor -> Public Methods -> Protected Methods -> Private Methods. Within each method group, follow order: 1) `get`
|
|
5
|
+
- **Class Structure**: Properties/Variables (`public`->`protected`->`private`) -> Constructor -> Public Methods -> Protected Methods -> Private Methods. Within each method group, follow order: 1) `get` (getters), 2) `set` (setters), 3) `is...`, 4) `has...`, 5) `get...`, 6) `set...`, 7) `add...`, 8) `remove...`, 9) `update...`, 10) `reset...`, 11) 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
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
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
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.
|
package/ai-mcp-resources.json
CHANGED
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"uri": "@dxtmisha/functional-basic/ai-resources/api-reference.md",
|
|
16
16
|
"name": "Functional Basic API Reference (@dxtmisha/functional-basic)",
|
|
17
17
|
"mimeType": "text/markdown",
|
|
18
|
-
"description": "
|
|
18
|
+
"description": "API reference and code examples for HTTP client, storage, localization, DOM, and utility functions."
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"uri": "@dxtmisha/functional-basic/ai-resources/design-config.md",
|
|
22
|
-
"name": "Design
|
|
22
|
+
"name": "Design System Configuration Guide (@dxtmisha/functional-basic)",
|
|
23
23
|
"mimeType": "text/markdown",
|
|
24
|
-
"description": "
|
|
24
|
+
"description": "Rules and schema for configuring design systems, TypeScript declaration scanning, AI generation, and package settings."
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"uri": "@dxtmisha/functional-basic/ai-resources/error-center.md",
|
|
28
|
-
"name": "
|
|
28
|
+
"name": "ErrorCenter Handling Guide (@dxtmisha/functional-basic)",
|
|
29
29
|
"mimeType": "text/markdown",
|
|
30
|
-
"description": "
|
|
30
|
+
"description": "Standards and APIs for centralized error handling, routing exceptions via ErrorCenter without direct console logging."
|
|
31
31
|
}
|
|
32
32
|
]
|
|
@@ -28,6 +28,9 @@ Configuration specification for DXT UI packages and monorepo root.
|
|
|
28
28
|
- `distDir` (`string`, default: `'dist'`): Output directory path for compiled JavaScript files.
|
|
29
29
|
- `aiResourcesDir` (`string`, default: `'ai-resources'`): Directory path containing AI resource and prompt files.
|
|
30
30
|
- `promptScanDepth` (`number`, default: `6`): Maximum directory scan depth for collecting AI prompt packages.
|
|
31
|
+
- `promptExclude` (`string | string[]`): List of library names to exclude from the `ai-prompt.md` file (e.g. `["@dxtmisha/styles"]`).
|
|
32
|
+
- `promptInclude` (`string | string[]`): Whitelist of library names to include in the `ai-prompt.md` file; if specified, only these libraries will be included (e.g. `["@dxtmisha/d1", "@dxtmisha/constructor"]`).
|
|
33
|
+
- `promptPackageOnly` (`boolean`, default: `false`): When `true`, restricts `ai-prompt.md` package discovery to only libraries defined in the root `package.json` (`dependencies`, `devDependencies`, etc.).
|
|
31
34
|
- `separator` (`string`, default: `'/'`): Token path delimiter used when splitting design tokens into sub-branches.
|
|
32
35
|
- `separatorBasicName` (`string`): Base token name stripped during branch segmentation.
|
|
33
36
|
- `separatorLimit` (`number`): Maximum recursion depth for token key splitting.
|
|
@@ -73,6 +76,9 @@ Complete `design.config.json` incorporating all available configuration properti
|
|
|
73
76
|
"distDir": "dist",
|
|
74
77
|
"aiResourcesDir": "ai-resources",
|
|
75
78
|
"promptScanDepth": 6,
|
|
79
|
+
"promptExclude": [
|
|
80
|
+
"@dxtmisha/styles"
|
|
81
|
+
],
|
|
76
82
|
"separator": "/",
|
|
77
83
|
"separatorBasicName": "basic",
|
|
78
84
|
"separatorLimit": 3,
|
|
@@ -101,4 +107,5 @@ Complete `design.config.json` incorporating all available configuration properti
|
|
|
101
107
|
import { PropertiesConfig } from '../Properties/PropertiesConfig'
|
|
102
108
|
const isExcluded = PropertiesConfig.getTypesExclude()
|
|
103
109
|
const skipVue = PropertiesConfig.isTypesWithoutVue()
|
|
110
|
+
const promptExcluded = PropertiesConfig.getPromptExclude()
|
|
104
111
|
```
|
package/ai-types.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
All these methods are in the @dxtmisha/functional-basic (v1.
|
|
1
|
+
All these methods are in the @dxtmisha/functional-basic (v1.11.0) library.
|
|
2
2
|
|
|
3
|
+
```typescript
|
|
3
4
|
/** Class for managing HTTP requests and global API configuration. @keywords api, http, request, fetch */
|
|
4
5
|
export declare class Api {
|
|
5
6
|
/** Checks if the current server environment is running on localhost. @keywords localhost, environment, check */
|
|
@@ -2101,7 +2102,7 @@ export type ApiStatusItem = {
|
|
|
2101
2102
|
export type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
|
|
2102
2103
|
|
|
2103
2104
|
export type Undefined = undefined | null;
|
|
2104
|
-
/** Union of
|
|
2105
|
+
/** Union of empty or falsy values and their string equivalents @keywords empty, falsy, nullish, blank */
|
|
2105
2106
|
export type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';
|
|
2106
2107
|
export type NumberOrString = number | string;
|
|
2107
2108
|
export type NumberOrStringOrBoolean = number | string | boolean;
|
|
@@ -2110,8 +2111,9 @@ export type NormalOrArray<T = NumberOrString> = T | T[];
|
|
|
2110
2111
|
export type NormalOrPromise<T> = T | Promise<T>;
|
|
2111
2112
|
export type ObjectItem<T = any> = Record<string, T>;
|
|
2112
2113
|
export type ObjectOrArray<T = any> = T[] | ObjectItem<T>;
|
|
2113
|
-
/** Extracts
|
|
2114
|
+
/** Extracts the element type from an array type @keywords array, unwrap, element, infer */
|
|
2114
2115
|
export type ArrayToItem<T> = T extends any[] ? T[number] : T;
|
|
2116
|
+
export type FunctionOr<T = any> = T | FunctionReturn<T>;
|
|
2115
2117
|
export type FunctionReturn<R = any> = () => R;
|
|
2116
2118
|
export type FunctionVoid = () => void;
|
|
2117
2119
|
export type FunctionArgs<T, R> = (...args: T[]) => R;
|
|
@@ -2132,9 +2134,9 @@ export type ItemName<V> = {
|
|
|
2132
2134
|
export type ElementOrWindow = HTMLElement | Window;
|
|
2133
2135
|
export type ElementOrString<E extends ElementOrWindow> = E | string;
|
|
2134
2136
|
export type EventOptions = AddEventListenerOptions | boolean | undefined;
|
|
2135
|
-
/** Event listener callback with optional detail payload
|
|
2137
|
+
/** Event listener callback with optional custom detail payload @keywords event, listener, detail, callback */
|
|
2136
2138
|
export type EventListenerDetail<O extends Event, D extends Record<string, any>> = (event: O, detail?: D) => void;
|
|
2137
|
-
/**
|
|
2139
|
+
/** Active event listener or observer tracking entry @keywords event, listener, observer, activity */
|
|
2138
2140
|
export type EventActivityItem<E extends ElementOrWindow> = {
|
|
2139
2141
|
element: E | undefined;
|
|
2140
2142
|
type: string;
|
|
@@ -2578,4 +2580,5 @@ export type TranslateDataFile = Record<string, TranslateDataFileItem>;
|
|
|
2578
2580
|
/** Prefix identifier for global translations @keywords i18n, global, prefix */
|
|
2579
2581
|
export declare const TRANSLATE_GLOBAL_PREFIX = "global";
|
|
2580
2582
|
/** Batch loading request timeout in milliseconds @keywords i18n, timeout, batch */
|
|
2581
|
-
export declare const TRANSLATE_TIME_OUT = 160;
|
|
2583
|
+
export declare const TRANSLATE_TIME_OUT = 160;
|
|
2584
|
+
```
|
package/dist/library.d.ts
CHANGED
|
@@ -4101,6 +4101,12 @@ export declare type FunctionAnyType<T = any, R = any> = (...args: T[]) => R;
|
|
|
4101
4101
|
*/
|
|
4102
4102
|
export declare type FunctionArgs<T, R> = (...args: T[]) => R;
|
|
4103
4103
|
|
|
4104
|
+
/**
|
|
4105
|
+
* Generic type that can be either a direct value or a function returning that value/
|
|
4106
|
+
* Дженерик тип для прямого значения или функции, возвращающей это значение
|
|
4107
|
+
*/
|
|
4108
|
+
export declare type FunctionOr<T = any> = T | FunctionReturn<T>;
|
|
4109
|
+
|
|
4104
4110
|
/**
|
|
4105
4111
|
* Function type that returns a value of type R/
|
|
4106
4112
|
* Тип функции, возвращающей значение типа R
|