@dxtmisha/functional-basic 1.2.2 → 1.2.3

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,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.2.3] - 2026-05-16
6
+
7
+ ### Added
8
+ - **Api**: Enhanced `setHeaders` method to support dynamic header resolution via a callback function, allowing for reactive or contextual header updates.
9
+
10
+ ## [1.2.2] - 2026-05-16
11
+
12
+ ### Changed / Improved
13
+ - **Cookie**: Refined `getInstance` static method with explicit return type and type casting for better TypeScript compatibility.
14
+ - **Api**: Improved formatting of `ApiDataItem` type definition for better readability.
15
+ - **Maintenance**: Updated package versioning and synchronized with the new monorepo build and publish orchestration system.
16
+
5
17
  ## [1.2.0] - 2026-05-14
6
18
 
7
19
  ### Added
package/dist/library.js CHANGED
@@ -1158,7 +1158,8 @@ var Oe = class {
1158
1158
  return e instanceof FormData ? this.get(t, null) : this.get(t, n);
1159
1159
  }
1160
1160
  set(e) {
1161
- return n(e) && (this.headers = e), this;
1161
+ let t = x(e);
1162
+ return n(t) && (this.headers = t), this;
1162
1163
  }
1163
1164
  }, Ne = "__ui:api:hydration:id__", Pe = class {
1164
1165
  constructor() {
@@ -93,7 +93,7 @@ export declare class Api {
93
93
  * @param headers default headers / заголовки по умолчанию
94
94
  * @returns void / ничего не возвращает
95
95
  */
96
- static setHeaders(headers: Record<string, string>): void;
96
+ static setHeaders(headers: Record<string, string> | (() => Record<string, string>)): void;
97
97
  /**
98
98
  * Modifies the default request data.
99
99
  *
@@ -33,5 +33,5 @@ export declare class ApiHeaders {
33
33
  * @param headers list of default headers/ список заголовков по умолчанию
34
34
  * @returns this instance for chaining / текущий экземпляр для цепочки вызовов
35
35
  */
36
- set(headers: Record<string, string>): this;
36
+ set(headers: Record<string, string> | (() => Record<string, string>)): this;
37
37
  }
@@ -134,7 +134,7 @@ export declare class ApiInstance {
134
134
  * Изменяет данные заголовка по умолчанию.
135
135
  * @param headers default headers / заголовки по умолчанию
136
136
  */
137
- setHeaders(headers: Record<string, string>): this;
137
+ setHeaders(headers: Record<string, string> | (() => Record<string, string>)): this;
138
138
  /**
139
139
  * Modifies the default request data.
140
140
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/functional-basic",
3
3
  "private": false,
4
- "version": "1.2.2",
4
+ "version": "1.2.3",
5
5
  "type": "module",
6
6
  "description": "Foundational utility library for modern web development — HTTP client, geolocation, i18n, SEO meta tags, caching, storage, DOM utilities, and more. Framework-agnostic, zero dependencies, TypeScript-first.",
7
7
  "keywords": [