@dxtmisha/functional-basic 1.10.0 → 1.10.1

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/ai-types.md CHANGED
@@ -1,2 +1,2581 @@
1
- All these methods are in the @dxtmisha/functional-basic (v1.10.0) library.
1
+ All these methods are in the @dxtmisha/functional-basic (v1.10.1) library.
2
2
 
3
+ /** Class for managing HTTP requests and global API configuration. @keywords api, http, request, fetch */
4
+ export declare class Api {
5
+ /** Checks if the current server environment is running on localhost. @keywords localhost, environment, check */
6
+ static isLocalhost(): boolean;
7
+ /** Returns the singleton instance of the ApiInstance class. @keywords singleton, instance */
8
+ static getItem(): ApiInstance;
9
+ /** Returns the status handler for the last executed request. @keywords status, response_status */
10
+ static getStatus(): ApiStatus;
11
+ /** Returns the response processor and handler instance. @keywords response, handler */
12
+ static getResponse(): ApiResponse;
13
+ /** Returns the API hydration handler. @keywords hydration, ssr */
14
+ static getHydration(): ApiHydration;
15
+ /** Returns a serialized HTML script tag containing client hydration data. @keywords hydration_script, ssr, script */
16
+ static getHydrationScript(): string;
17
+ /** Returns the base origin URL combined with the API path. @keywords origin, base_url, endpoint */
18
+ static getOrigin(): string;
19
+ /** Returns the full URL for a given script path. @keywords url, endpoint, path */
20
+ static getUrl(path: string, api?: boolean): string;
21
+ /** Formats and retrieves request body data for non-GET requests. @keywords body, payload, form_data */
22
+ static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
23
+ /** Builds a query string or appended URL for GET requests. @keywords query_string, get_params, url_query */
24
+ static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
25
+ /** Updates default global HTTP request headers. @keywords headers, default_headers, config */
26
+ static setHeaders(headers: ApiHeadersValue): void;
27
+ /** Sets default request parameter values. @keywords defaults, request_defaults */
28
+ static setRequestDefault(request: ApiDefaultValue): void;
29
+ /** Sets the default base script URL path. @keywords base_url, path, endpoint */
30
+ static setUrl(url: string): void;
31
+ /** Sets a hook callback to be executed before executing requests. @keywords preparation, interceptor, pre_request */
32
+ static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): void;
33
+ /** Sets a hook callback to be executed after receiving a response. @keywords post_request, response_interceptor, end_hook */
34
+ static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): void;
35
+ /** Sets global request timeout in milliseconds. @keywords timeout, request_timeout */
36
+ static setTimeout(timeout: number): void;
37
+ /** Sets the base origin protocol and domain. @keywords origin, domain, host */
38
+ static setOrigin(origin: string): void;
39
+ /** Sets a custom execution wrapper around requests. @keywords wrapper, middleware, interceptor */
40
+ static setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): void;
41
+ /** Applies multiple API configuration options at once. @keywords config, options, setup */
42
+ static setConfig(config?: ApiConfig): void;
43
+ /** Executes an HTTP request using a path string or request config. @keywords request, http, fetch */
44
+ static request<T>(pathRequest: string | ApiFetch): Promise<T>;
45
+ /** Sends a GET HTTP request. @keywords get, fetch */
46
+ static get<T>(request: ApiFetch): Promise<T>;
47
+ /** Sends a POST HTTP request. @keywords post, fetch */
48
+ static post<T>(request: ApiFetch): Promise<T>;
49
+ /** Sends a PUT HTTP request. @keywords put, fetch */
50
+ static put<T>(request: ApiFetch): Promise<T>;
51
+ /** Sends a PATCH HTTP request. @keywords patch, fetch */
52
+ static patch<T>(request: ApiFetch): Promise<T>;
53
+ /** Sends a DELETE HTTP request. @keywords delete, fetch */
54
+ static delete<T>(request: ApiFetch): Promise<T>;
55
+ }
56
+
57
+ /** Handles caching of API responses. @keywords api cache, response caching, cache storage */
58
+ export declare class ApiCache {
59
+ /** Initializes cache storage mechanism and cleanup settings. @keywords init, cache storage, listeners */
60
+ static init(getListener: (key: string) => Promise<ApiCacheItem | undefined>, setListener: (key: string, value: ApiCacheItem) => Promise<boolean>, removeListener: (key: string) => Promise<boolean>, cacheStepAgeClearOld?: number): void;
61
+ /** Resets the cache by clearing in-memory items and resetting listeners. @keywords reset, clear cache */
62
+ static reset(): void;
63
+ /** Retrieves cached data by key. @keywords get, fetch cache, cache item */
64
+ static get<T>(key: string): Promise<T | undefined>;
65
+ /** Retrieves cached data based on fetch request configuration. @keywords get by fetch, api request cache */
66
+ static getByFetch<T>(fetch: ApiFetch): Promise<T | undefined>;
67
+ /** Stores data in the cache with optional TTL. @keywords set, save cache, store item */
68
+ static set<T>(key: string, value: T, age?: number): Promise<void>;
69
+ /** Stores data in cache using fetch request configuration. @keywords set by fetch, cache api response */
70
+ static setByFetch<T>(fetch: ApiFetch, value: T): Promise<void>;
71
+ /** Deletes an item from the cache by key. @keywords remove, delete cache, invalidate */
72
+ static remove(key: string): Promise<void>;
73
+ }
74
+
75
+ /** Handles and processes data returned from an API request. @keywords api, response, data handler, parser */
76
+ export declare class ApiDataReturn<T = any> {
77
+ /** Initializes the API data return handler instance. @keywords constructor, api data */
78
+ constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd, error?: ApiErrorItem | undefined);
79
+ /** Initializes instance by reading data from the response. @keywords init, parse, read response */
80
+ init(): Promise<this>;
81
+ /** Retrieves processed API response data. @keywords get, data, payload */
82
+ get(): ApiData<T>;
83
+ /** Retrieves processed data along with the status object. @keywords get, status, api data */
84
+ getAndStatus(status: ApiStatus): ApiData<T>;
85
+ /** Retrieves raw data received from the API. @keywords raw data, get */
86
+ getData(): ApiData<T> | undefined;
87
+ }
88
+
89
+ /** Class for managing default API request data. @keywords api default request */
90
+ export declare class ApiDefault {
91
+ /** Checks if default request data exists. @keywords is check default */
92
+ is(): boolean;
93
+ /** Gets the default request data. @keywords get default data */
94
+ get(): Record<string, any> | undefined;
95
+ /** Merges default data into the provided request data. @keywords request merge default */
96
+ request(request: ApiFetch['request']): ApiFetch['request'];
97
+ /** Sets the default request data. @keywords set default data */
98
+ set(request: ApiDefaultValue): this;
99
+ }
100
+
101
+ /** Utility class for managing API error storage and resolving structured error items. @keywords api, error, error-storage, response-handling */
102
+ export declare class ApiError {
103
+ /** Retrieves the singleton instance of the API error storage. @keywords storage, singleton, instance */
104
+ static getStorage(): ApiErrorStorage;
105
+ /** Adds error items to the storage matching optional URL and HTTP method criteria. @keywords add, register, error-item, filter */
106
+ static add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): void;
107
+ /** Creates an ApiErrorItem by matching the response against stored error criteria. @keywords get-item, match, parse-error, response */
108
+ static getItem(method: ApiMethodItem, response: Response): Promise<ApiErrorItem>;
109
+ }
110
+
111
+ /** Manages and extracts error codes, messages, and status from API error responses. @keywords api error response handler parser */
112
+ export declare class ApiErrorItem {
113
+ /** Initializes an ApiErrorItem instance. @keywords constructor init */
114
+ constructor(method: ApiMethodItem, response: Response, error: ApiErrorStorageItem);
115
+ /** Retrieves the HTTP method used for the request. @keywords method http */
116
+ getMethod(): ApiMethodItem;
117
+ /** Retrieves the raw Fetch response object. @keywords response fetch raw */
118
+ getResponse(): Response;
119
+ /** Retrieves the matched error storage item. @keywords error item storage */
120
+ getError(): ApiErrorStorageItem;
121
+ /** Retrieves the error code from storage or the response body. @keywords code error */
122
+ getCode(): string | undefined;
123
+ /** Retrieves the error message from storage, response body, or status text. @keywords message error */
124
+ getMessage(): string | undefined;
125
+ /** Retrieves the HTTP status code of the response. @keywords status http code */
126
+ getStatus(): number;
127
+ }
128
+
129
+ /** Centralized storage and matcher for identifying API error states based on response criteria. @keywords api error storage matcher status handler */
130
+ export declare class ApiErrorStorage {
131
+ /** Finds a matching error item in storage by analyzing the API method and response. @keywords find match error response */
132
+ find(method: ApiMethodItem, response: Response): Promise<ApiErrorStorageItem>;
133
+ /** Adds one or more API error items or patterns to the internal storage. @keywords add register error rule pattern */
134
+ add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): this;
135
+ }
136
+
137
+ /** Class for managing and resolving HTTP request headers. @keywords http headers, request headers, api headers */
138
+ export declare class ApiHeaders {
139
+ /** Resolves and merges HTTP request headers with optional Content-Type. @keywords get headers, merge headers, content-type */
140
+ get(value?: Record<string, string> | null, type?: string | undefined | null): Record<string, string> | undefined;
141
+ /** Resolves headers tailored to the specific request configuration. @keywords headers by request, request headers */
142
+ getByRequest(request: ApiFetch['request'], value?: Record<string, string> | null, type?: string): Record<string, string> | undefined;
143
+ /** Sets the default headers. @keywords default headers, set headers */
144
+ set(headers: ApiHeadersValue): this;
145
+ }
146
+
147
+ /** Collects API data during SSR for client-side hydration. @keywords ssr hydration api data transfer */
148
+ export declare class ApiHydration {
149
+ /** Initializes the API response with hydration payload. @keywords ssr init response hydration */
150
+ initResponse(response: ApiResponse): void;
151
+ /** Saves an API response for client-side hydration. @keywords ssr cache response hydration state */
152
+ toClient<T>(apiFetch: ApiFetch, response: T): void;
153
+ /** Serializes hydration data into a string for client injection. @keywords serialize hydration string ssr */
154
+ toString(): string;
155
+ }
156
+
157
+ /** Options for configuring an ApiInstance. @keywords api, options, config */
158
+ export type ApiInstanceOptions = {
159
+ headersClass?: typeof ApiHeaders;
160
+ requestDefaultClass?: typeof ApiDefault;
161
+ statusClass?: typeof ApiStatus;
162
+ responseClass?: typeof ApiResponse;
163
+ preparationClass?: typeof ApiPreparation;
164
+ loadingClass?: LoadingInstance;
165
+ errorCenterClass?: ErrorCenterInstance;
166
+ hydrationClass?: typeof ApiHydration;
167
+ wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
168
+ };
169
+ /** Core class for managing HTTP requests using the Fetch API. @keywords api, fetch, http, client */
170
+ export declare class ApiInstance {
171
+ /** Creates an ApiInstance with an optional base URL and configuration options. @keywords constructor, init */
172
+ constructor(url?: string, options?: ApiInstanceOptions);
173
+ /** Checks if the server is running on localhost. @keywords localhost, environment, host */
174
+ isLocalhost(): boolean;
175
+ /** Returns the status handler of the last request. @keywords status, state */
176
+ getStatus(): ApiStatus;
177
+ /** Gets the response handler instance. @keywords response, handler */
178
+ getResponse(): ApiResponse;
179
+ /** Gets the hydration handler instance. @keywords hydration, ssr */
180
+ getHydration(): ApiHydration;
181
+ /** Gets the base origin URL combined with the API path. @keywords origin, url, base */
182
+ getOrigin(): string;
183
+ /** Gets the full URL path for a request script. @keywords url, endpoint, path */
184
+ getUrl(path: string, api?: boolean): string;
185
+ /** Serializes request data into a body payload or FormData. @keywords body, payload, formdata */
186
+ getBody(request?: ApiFetch['request'], method?: ApiMethod): string | FormData | undefined;
187
+ /** Generates a formatted query string for GET requests. @keywords query, search_params, url_params */
188
+ getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethod): string;
189
+ /** Returns a script tag string containing client hydration data. @keywords hydration, script, ssr */
190
+ getHydrationScript(): string;
191
+ /** Updates default headers applied to requests. @keywords headers, config */
192
+ setHeaders(headers: ApiHeadersValue): this;
193
+ /** Updates default request configuration parameters. @keywords default, config, options */
194
+ setRequestDefault(request: ApiDefaultValue): this;
195
+ /** Sets the base script path. @keywords url, endpoint, base */
196
+ setUrl(url: string): this;
197
+ /** Sets an interceptor callback to run before request execution. @keywords interceptor, preparation, middleware */
198
+ setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): this;
199
+ /** Sets an interceptor callback to run after request completion. @keywords interceptor, response, callback */
200
+ setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
201
+ /** Sets the default request timeout in milliseconds. @keywords timeout, delay */
202
+ setTimeout(timeout: number): this;
203
+ /** Sets the base origin protocol and domain. @keywords origin, domain, host */
204
+ setOrigin(origin: string): this;
205
+ /** Sets a wrapper function wrapping request execution. @keywords wrapper, middleware */
206
+ setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): this;
207
+ /** Executes an HTTP request with the given path or configuration. @keywords request, fetch, http */
208
+ request<T>(pathRequest: string | ApiFetch): Promise<T>;
209
+ /** Sends an HTTP GET request. @keywords get, fetch, query */
210
+ get<T>(request: ApiFetch): Promise<T>;
211
+ /** Sends an HTTP POST request. @keywords post, submit, mutation */
212
+ post<T>(request: ApiFetch): Promise<T>;
213
+ /** Sends an HTTP PUT request. @keywords put, update */
214
+ put<T>(request: ApiFetch): Promise<T>;
215
+ /** Sends an HTTP PATCH request. @keywords patch, update */
216
+ patch<T>(request: ApiFetch): Promise<T>;
217
+ /** Sends an HTTP DELETE request. @keywords delete, remove */
218
+ delete<T>(request: ApiFetch): Promise<T>;
219
+ }
220
+
221
+ /** Handles pre-request preparation and post-request analysis hooks. @keywords api preparation, interceptor, request lifecycle */
222
+ export declare class ApiPreparation {
223
+ /** Executes pre-request preparation logic if active. @keywords pre-request, prepare */
224
+ make(active: boolean, apiFetch: ApiFetch): Promise<void>;
225
+ /** Analyzes and processes response data after request execution. @keywords post-request, response interceptor */
226
+ makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
227
+ /** Registers the pre-request callback hook. @keywords pre-request hook, interceptor */
228
+ set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
229
+ /** Registers the post-request callback hook. @keywords post-request hook, response handler */
230
+ setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
231
+ }
232
+
233
+ /** Manages cached API responses, mocking, and request emulation. @keywords api response cache emulator mock */
234
+ export declare class ApiResponse {
235
+ /** Initializes API response manager with default request configuration. @keywords constructor init */
236
+ constructor(requestDefault: ApiDefault);
237
+ /** Retrieves a matching cached API response if available. @keywords get cache lookup */
238
+ get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
239
+ /** Returns all locally cached API response items. @keywords list items cache */
240
+ getList(): (ApiResponseItem & Record<string, any>)[];
241
+ /** Adds one or multiple cached API response entries. @keywords add register cache */
242
+ add(response: ApiResponseItem | ApiResponseItem[]): this;
243
+ /** Enables or disables developer mode. @keywords dev mode toggle */
244
+ setDevMode(devMode: boolean): this;
245
+ /** Asynchronously executes mock or emulated API response handler. @keywords emulator mock async request */
246
+ emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
247
+ /** Synchronously executes mock or emulated API response handler. @keywords emulator mock sync request */
248
+ emulatorAsync<T>(apiFetch: ApiFetch): T | undefined;
249
+ }
250
+
251
+ /** Class for managing API request status. @keywords api, status, request, response */
252
+ export declare class ApiStatus {
253
+ /** Returns the last status item data. @keywords status item, state */
254
+ get(): ApiStatusItem | undefined;
255
+ /** Returns the HTTP execution status code. @keywords http status, status code */
256
+ getStatus(): number | undefined;
257
+ /** Returns the execution status text. @keywords status text, http message */
258
+ getStatusText(): string | undefined;
259
+ /** Returns the last status type. @keywords status type, state */
260
+ getStatusType(): ApiStatusType | undefined;
261
+ /** Returns the execution status code from the response. @keywords code, response code */
262
+ getCode(): string | undefined;
263
+ /** Returns the script execution error message. @keywords error, failure */
264
+ getError(): string | undefined;
265
+ /** Returns the data of the last request response. @keywords response, payload, data */
266
+ getResponse<T>(): T | undefined;
267
+ /** Returns messages from the last request. @keywords message, response message */
268
+ getMessage(): string;
269
+ /** Sets the status item data. @keywords set status, state */
270
+ set(data: ApiStatusItem): this;
271
+ /** Sets the status code and optional status text. @keywords set status, http code */
272
+ setStatus(status?: number, statusText?: string): this;
273
+ /** Sets the error message. @keywords set error, failure */
274
+ setError(error?: string): this;
275
+ /** Sets last response data and auto-extracts status or message. @keywords set response, payload */
276
+ setLastResponse(response?: any): this;
277
+ /** Sets the last status type. @keywords set status, status type */
278
+ setLastStatus(status?: ApiStatusType): this;
279
+ /** Sets the last execution status code. @keywords set code, status code */
280
+ setLastCode(code?: string): this;
281
+ /** Sets messages from the last request. @keywords set message */
282
+ setLastMessage(message?: string): this;
283
+ }
284
+
285
+ /** Manages cross-context messaging using the BroadcastChannel API. @keywords broadcast channel, messaging, cross-tab, communication */
286
+ export declare class BroadcastMessage<Message = any> {
287
+ /** Initializes the broadcast channel with handlers. @keywords broadcast, channel, init */
288
+ constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
289
+ /** Gets the underlying BroadcastChannel instance if available. @keywords broadcast channel, instance */
290
+ getChannel(): BroadcastChannel | undefined;
291
+ /** Sends a message through the broadcast channel. @keywords post message, broadcast, send */
292
+ post(message: Message): this;
293
+ /** Sets the message reception callback handler. @keywords onmessage, listener, callback */
294
+ setCallback(callback: (event: MessageEvent<Message>) => void): this;
295
+ /** Sets the message error callback handler. @keywords onmessageerror, error handler */
296
+ setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
297
+ /** Closes the broadcast channel and stops listening for messages. @keywords destroy, close, cleanup */
298
+ destroy(): this;
299
+ }
300
+
301
+ /** In-memory key-value cache with dependency-based invalidation. @keywords cache, memoize, storage, in-memory */
302
+ export declare class Cache {
303
+ /** Retrieves or computes a cached value by key with optional invalidation dependencies. @keywords cache get, memoize, compute */
304
+ get<T>(name: string, callback: () => T, comparison?: any[]): T;
305
+ /** Asynchronously retrieves or computes a cached value by key with optional invalidation dependencies. @keywords async cache, memoize promise, async storage */
306
+ getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
307
+ }
308
+
309
+ /** Manages a single cached value with dependency tracking for invalidation. @keywords cache memoize dependency invalidation */
310
+ export declare class CacheItem<T> {
311
+ /** Creates a CacheItem with a value computation callback. @keywords cache construct */
312
+ constructor(callback: () => T);
313
+ /** Returns cached value, recomputing if dependency array changes. @keywords get cache memoize */
314
+ getCache(comparison: any[]): T;
315
+ /** Returns previous cached value before last recalculation. @keywords previous cache history */
316
+ getCacheOld(): T | undefined;
317
+ /** Asynchronously returns cached value, recomputing if dependency array changes. @keywords async cache memoize */
318
+ getCacheAsync(comparison: any[]): Promise<T>;
319
+ }
320
+
321
+ /** Static cache utility using ServerStorage for persistent application-wide caching. @warning Obsolete. @keywords cache static server storage memoize */
322
+ export declare class CacheStatic {
323
+ /** Gets a cached value by key, or computes and caches the result using the callback. @keywords cache memoize get */
324
+ static get<T>(name: string, callback: () => T, comparison?: any[]): T;
325
+ /** Asynchronously gets a cached value by key, or computes and caches the result using the callback. @keywords async cache memoize getAsync */
326
+ static getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
327
+ }
328
+
329
+ /** Cookie management utility. @keywords cookie, storage, browser */
330
+ export declare class Cookie<T> {
331
+ /** Gets a Cookie instance by name. @keywords cookie, getInstance, singleton */
332
+ static getInstance<T>(name: string): Cookie<T>;
333
+ /** Creates a new Cookie instance. @keywords cookie, constructor */
334
+ constructor(name: string);
335
+ /** Gets cookie data or initializes with default value if absent. @keywords cookie, get, read */
336
+ get(defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): string | T | undefined;
337
+ /** Updates the cookie value. @keywords cookie, set, write */
338
+ set(value?: T | string | (() => (T | string)), options?: CookieOptions): void;
339
+ /** Deletes the cookie. @keywords cookie, remove, delete */
340
+ remove(): void;
341
+ }
342
+
343
+ /** Manages cookie access block status. @keywords cookie, block, access */
344
+ export declare class CookieBlock {
345
+ /** Returns a request-isolated CookieBlockInstance. @keywords cookie, instance, isolated */
346
+ static getItem(): CookieBlockInstance;
347
+ /** Retrieves the current cookie block status. @keywords cookie, block, status, get */
348
+ static get(): boolean;
349
+ /** Sets the cookie block status. @keywords cookie, block, status, set */
350
+ static set(value: boolean): void;
351
+ }
352
+
353
+ /** Manages cookie access blocking status. @keywords cookie block status access */
354
+ export declare class CookieBlockInstance {
355
+ /** Gets the current cookie block status. @keywords get cookie block status */
356
+ get(): boolean;
357
+ /** Sets the cookie block status. @keywords set cookie block status */
358
+ set(value: boolean): void;
359
+ }
360
+
361
+ export type CookieSameSite = 'strict' | 'lax';
362
+
363
+ /** Options for setting and configuring cookies. @keywords cookie, options, samesite, secure */
364
+ export type CookieOptions = {
365
+ age?: number;
366
+ sameSite?: CookieSameSite;
367
+ path?: string;
368
+ domain?: string;
369
+ secure?: boolean;
370
+ httpOnly?: boolean;
371
+ partitioned?: boolean;
372
+ arguments?: string[] | Record<string, string | number | boolean>;
373
+ };
374
+
375
+ /** Manages cookie storage with custom listeners across DOM and SSR environments. @keywords cookie, storage, ssr, browser, persistence */
376
+ export declare class CookieStorage {
377
+ /** Initializes cookie storage with custom getter and setter listeners. @keywords init, listener, ssr */
378
+ static init(getListener?: (key: string) => any | undefined, getListenerRaw?: () => string, setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void): void;
379
+ /** Resets the storage by clearing all in-memory items and resetting listeners. @keywords reset, clear */
380
+ static reset(): void;
381
+ /** Retrieves a typed cookie value from storage or returns a default fallback. @keywords get, read, retrieve */
382
+ static get<T>(name: string, defaultValue?: T | (() => T)): T | undefined;
383
+ /** Saves a value to cookie storage with configurable options. @keywords set, write, store */
384
+ static set<T>(name: string, value: T | (() => T), options?: CookieOptions): T;
385
+ /** Removes a cookie by name from storage. @keywords remove, delete, clear */
386
+ static remove(name: string): void;
387
+ /** Synchronizes and updates in-memory storage cache from current cookies. @keywords update, sync, refresh */
388
+ static update(): void;
389
+ }
390
+
391
+ /** Storage wrapper for localStorage and sessionStorage with prefix, TTL expiration, and SSR isolation. @keywords storage, localStorage, sessionStorage, cache, ssr */
392
+ export declare class DataStorage<T> {
393
+ /** Sets global key prefix for storage items. @keywords prefix, key, storage */
394
+ static setPrefix(newPrefix: string): void;
395
+ /** Initializes storage instance for a named key. @keywords storage, constructor, session */
396
+ constructor(name: string, isSession?: boolean, errorCenter?: ErrorCenterInstance);
397
+ /** Retrieves stored item value or fallback default value with optional cache expiration. @keywords get, retrieve, cache, ttl */
398
+ get(defaultValue?: T | (() => T), cache?: number): T | undefined;
399
+ /** Sets or updates stored item value. @keywords set, save, update, store */
400
+ set(value?: T | (() => T)): T | undefined;
401
+ /** Removes item from storage. @keywords remove, delete, clear */
402
+ remove(): this;
403
+ /** Synchronizes data from underlying storage. @keywords update, sync, refresh */
404
+ update(): this;
405
+ }
406
+
407
+ /**
408
+ * Utility class for date manipulation, calculation, and localization.
409
+ * @remarks Creating a `Datetime` instance without a specific date (using the current time) for SSR rendering may lead to hydration mismatches due to server/client timezone differences.
410
+ * @keywords datetime date time calendar localization
411
+ */
412
+ export declare class Datetime {
413
+ /** Creates a Datetime instance. @keywords constructor datetime */
414
+ constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
415
+ /** Returns the GeoIntl formatting instance. @keywords intl format */
416
+ getIntl(): GeoIntl;
417
+ /** Returns the underlying native Date object. @keywords date native */
418
+ getDate(): Date;
419
+ /** Returns the configured date display format type. @keywords type format */
420
+ getType(): GeoDate;
421
+ /** Returns the hour format type. @keywords hours format */
422
+ getHoursType(): GeoHours;
423
+ /** Returns whether 24-hour time format is enabled. @keywords 24-hour format */
424
+ getHour24(): boolean;
425
+ /** Returns the time zone offset in minutes relative to UTC. @keywords timezone offset utc */
426
+ getTimeZoneOffset(): number;
427
+ /** Returns the time zone string. @keywords timezone */
428
+ getTimeZone(style?: GeoTimeZoneStyle): string;
429
+ /** Returns the code of the first day of the week for the current locale. @keywords first day weekday */
430
+ getFirstDayCode(): GeoFirstDay;
431
+ /** Returns the four-digit year according to local time. @keywords year local */
432
+ getYear(): number;
433
+ /** Returns the 1-based month index (1-12) according to local time. @keywords month local */
434
+ getMonth(): number;
435
+ /** Returns the day of the month (1-31) according to local time. @keywords day month local */
436
+ getDay(): number;
437
+ /** Returns the hour (0-23) according to local time. @keywords hour local */
438
+ getHour(): number;
439
+ /** Returns the minute (0-59) according to local time. @keywords minute local */
440
+ getMinute(): number;
441
+ /** Returns the second (0-59) according to local time. @keywords second local */
442
+ getSecond(): number;
443
+ /** Returns the total number of days (28-31) in the current month. @keywords days in month max day */
444
+ getMaxDay(): number;
445
+ /** Formats the date and time according to the current locale. @keywords locale format intl */
446
+ locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): string;
447
+ /** Formats the year according to the current locale. @keywords locale year format */
448
+ localeYear(style?: Intl.DateTimeFormatOptions['year']): string;
449
+ /** Formats the month according to the current locale. @keywords locale month format */
450
+ localeMonth(style?: Intl.DateTimeFormatOptions['month']): string;
451
+ /** Formats the day according to the current locale. @keywords locale day format */
452
+ localeDay(style?: Intl.DateTimeFormatOptions['day']): string;
453
+ /** Formats the hour according to the current locale. @keywords locale hour format */
454
+ localeHour(style?: Intl.DateTimeFormatOptions['hour']): string;
455
+ /** Formats the minute according to the current locale. @keywords locale minute format */
456
+ localeMinute(style?: Intl.DateTimeFormatOptions['minute']): string;
457
+ /** Formats the second according to the current locale. @keywords locale second format */
458
+ localeSecond(style?: Intl.DateTimeFormatOptions['second']): string;
459
+ /** Returns the date in standard ISO-like format. @keywords standard format iso */
460
+ standard(timeZone?: boolean): string;
461
+ /** Sets the date value from a number, string, or Date instance. @keywords set date */
462
+ setDate(value: NumberOrStringOrDate): this;
463
+ /** Sets the date display format type. @keywords set format type */
464
+ setType(value: GeoDate): this;
465
+ /** Sets whether to use 24-hour time format. @keywords set 24-hour format */
466
+ setHour24(value: boolean): this;
467
+ /** Sets the country and language locale code. @keywords set locale code */
468
+ setCode(code: string): this;
469
+ /** Registers a callback invoked when the date value is updated. @keywords watch listener callback */
470
+ setWatch(watch: (date: Date, type: GeoDate, hour24: boolean) => void): this;
471
+ /** Sets the full year according to local time. @keywords set year */
472
+ setYear(value: number): this;
473
+ /** Sets the 1-based month (1-12) according to local time. @keywords set month */
474
+ setMonth(value: number): this;
475
+ /** Sets the day of the month (1-31) according to local time. @keywords set day */
476
+ setDay(value: number): this;
477
+ /** Sets the hour (0-23) according to local time. @keywords set hour */
478
+ setHour(value: number): this;
479
+ /** Sets the minute (0-59) according to local time. @keywords set minute */
480
+ setMinute(value: number): this;
481
+ /** Sets the second (0-59) according to local time. @keywords set second */
482
+ setSecond(value: number): this;
483
+ /** Shifts the date by the specified number of years. @keywords move shift year */
484
+ moveByYear(value: number): this;
485
+ /** Shifts the date by the specified number of months. @keywords move shift month */
486
+ moveByMonth(value: number): this;
487
+ /** Shifts the date by the specified number of days. @keywords move shift day */
488
+ moveByDay(value: number): this;
489
+ /** Shifts the date by the specified number of hours. @keywords move shift hour */
490
+ moveByHour(value: number): this;
491
+ /** Shifts the date by the specified number of minutes. @keywords move shift minute */
492
+ moveByMinute(value: number): this;
493
+ /** Shifts the date by the specified number of seconds. @keywords move shift second */
494
+ moveBySecond(value: number): this;
495
+ /** Sets the month to January. @keywords january first month */
496
+ moveMonthFirst(): this;
497
+ /** Sets the month to December. @keywords december last month */
498
+ moveMonthLast(): this;
499
+ /** Advances the date to the first day of the next month. @keywords next month */
500
+ moveMonthNext(): this;
501
+ /** Moves the date to the first day of the previous month. @keywords previous month */
502
+ moveMonthPrevious(): this;
503
+ /** Moves the date to the first day of the current week. @keywords first weekday week start */
504
+ moveWeekdayFirst(): this;
505
+ /** Moves the date to the last day of the current week. @keywords last weekday week end */
506
+ moveWeekdayLast(): this;
507
+ /** Moves the date to the first day of the month's first week. @keywords month first weekday */
508
+ moveWeekdayFirstByMonth(): this;
509
+ /** Moves the date to the first day of the next month's first full week. @keywords month last weekday */
510
+ moveWeekdayLastByMonth(): this;
511
+ /** Advances the date by one week. @keywords next week */
512
+ moveWeekdayNext(): this;
513
+ /** Moves the date back by one week. @keywords previous week */
514
+ moveWeekdayPrevious(): this;
515
+ /** Moves the date to the first day of the current month. @keywords first day month start */
516
+ moveDayFirst(): this;
517
+ /** Moves the date to the last day of the current month. @keywords last day month end */
518
+ moveDayLast(): this;
519
+ /** Advances the date to the next day. @keywords next day tomorrow */
520
+ moveDayNext(): this;
521
+ /** Moves the date to the previous day. @keywords previous day yesterday */
522
+ moveDayPrevious(): this;
523
+ /** Creates a clone of the underlying native Date object. @keywords clone date */
524
+ clone(): Date;
525
+ /** Creates a clone of this Datetime instance. @keywords clone datetime */
526
+ cloneClass(): Datetime;
527
+ /** Clones the Datetime instance with month set to January. @keywords clone january */
528
+ cloneMonthFirst(): Datetime;
529
+ /** Clones the Datetime instance with month set to December. @keywords clone december */
530
+ cloneMonthLast(): Datetime;
531
+ /** Clones the Datetime instance and advances it by one month. @keywords clone next month */
532
+ cloneMonthNext(): Datetime;
533
+ /** Clones the Datetime instance and moves it back by one month. @keywords clone previous month */
534
+ cloneMonthPrevious(): Datetime;
535
+ /** Clones the Datetime instance set to the first day of the current week. @keywords clone week start */
536
+ cloneWeekdayFirst(): Datetime;
537
+ /** Clones the Datetime instance set to the last day of the current week. @keywords clone week end */
538
+ cloneWeekdayLast(): Datetime;
539
+ /** Clones the Datetime instance set to the first day of the month's first week. @keywords clone month week start */
540
+ cloneWeekdayFirstByMonth(): Datetime;
541
+ /** Clones the Datetime instance set to the last day of the month's last week. @keywords clone month week end */
542
+ cloneWeekdayLastByMonth(): Datetime;
543
+ /** Clones the Datetime instance advanced by one week. @keywords clone next week */
544
+ cloneWeekdayNext(): Datetime;
545
+ /** Clones the Datetime instance moved back by one week. @keywords clone previous week */
546
+ cloneWeekdayPrevious(): Datetime;
547
+ /** Clones the Datetime instance set to the first day of the month. @keywords clone month start */
548
+ cloneDayFirst(): Datetime;
549
+ /** Clones the Datetime instance set to the last day of the month. @keywords clone month end */
550
+ cloneDayLast(): Datetime;
551
+ /** Clones the Datetime instance advanced by one day. @keywords clone next day */
552
+ cloneDayNext(): Datetime;
553
+ /** Clones the Datetime instance moved back by one day. @keywords clone previous day */
554
+ cloneDayPrevious(): Datetime;
555
+ }
556
+
557
+ /** Error management and handling center. @keywords error, handler, registry, storage */
558
+ export declare class ErrorCenter {
559
+ /** Returns request-isolated ErrorCenter instance. @keywords instance, singleton, context */
560
+ static getItem(): ErrorCenterInstance;
561
+ /** Checks if an error cause exists by code and optional group. @keywords exists, check, has */
562
+ static has(code: string, group?: string): boolean;
563
+ /** Retrieves an error cause item by code and group. @keywords get, find, cause */
564
+ static get(code: string, group?: string): ErrorCenterCauseItem | undefined;
565
+ /** Registers an error cause. @keywords add, register, cause */
566
+ static add(cause: ErrorCenterCauseItem): void;
567
+ /** Registers multiple error causes. @keywords addList, batch, causes */
568
+ static addList(causes: ErrorCenterCauseList): void;
569
+ /** Registers an error handler for a specific group. @keywords handler, group, listen */
570
+ static addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): void;
571
+ /** Registers multiple error handlers. @keywords handlers, list, batch */
572
+ static addHandlerList(handlers: ErrorCenterHandlerList): void;
573
+ /** Registers a global callback executed on any error. @keywords callback, global, hook */
574
+ static addCallback(callback: ErrorCenterHandlerCallback): void;
575
+ /** Configures console output logging or filter. @keywords console, log, filter */
576
+ static setIsConsole(isConsole: ErrorCenterHandlerIsConsole): void;
577
+ /** Triggers error handling workflow for an error cause. @keywords trigger, dispatch, emit */
578
+ static on(cause: ErrorCenterCauseItem): void;
579
+ }
580
+
581
+ /** Manages and triggers error handlers by group or globally. @keywords error center, handler, error handling */
582
+ export declare class ErrorCenterHandler {
583
+ /** Initializes the error center handler manager. @keywords constructor, init */
584
+ constructor(handlers?: ErrorCenterHandlerList, isConsole?: ErrorCenterHandlerIsConsole);
585
+ /** Checks if handlers exist for a specific error group. @keywords has, error group, check */
586
+ has(group: ErrorCenterGroup): boolean;
587
+ /** Retrieves handlers associated with an error group. @keywords get, handler item */
588
+ get(group: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
589
+ /** Registers an error handler callback for a specific group. @keywords add, register, error handler */
590
+ add(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
591
+ /** Registers a list of group-based error handlers. @keywords add list, batch register */
592
+ addList(handlers: ErrorCenterHandlerList): this;
593
+ /** Registers a global callback executed on any error. @keywords add callback, global handler */
594
+ addCallback(callback: ErrorCenterHandlerCallback): this;
595
+ /** Sets the console logging flag or filter predicate. @keywords console output, logging, filter */
596
+ setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
597
+ /** Dispatches error handlers matching the cause and handles console logging. @keywords dispatch, trigger, handle error */
598
+ on(cause: ErrorCenterCauseItem): this;
599
+ }
600
+
601
+ /** Manages error storage and handling within an instance. @keywords error center, error manager, error storage */
602
+ export declare class ErrorCenterInstance {
603
+ /** Initializes the error center instance with optional causes and handler. @keywords constructor, error center */
604
+ constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
605
+ /** Checks if an error cause exists by code and optional group. @keywords error check, has cause */
606
+ has(code: string, group?: string): boolean;
607
+ /** Retrieves an error cause item by code and optional group. @keywords get error, find cause */
608
+ get(code: string, group?: string): ErrorCenterCauseItem | undefined;
609
+ /** Adds an error cause item to storage. @keywords add error, register cause */
610
+ add(cause: ErrorCenterCauseItem): this;
611
+ /** Adds a list of error causes to storage. @keywords add error list, batch causes */
612
+ addList(causes: ErrorCenterCauseList): this;
613
+ /** Registers an error handler callback for a specific group. @keywords add handler, register callback */
614
+ addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
615
+ /** Registers multiple error handlers from a list. @keywords add handlers, batch handlers */
616
+ addHandlerList(handlers: ErrorCenterHandlerList): this;
617
+ /** Registers a global callback executed on any error. @keywords error callback, global listener */
618
+ addCallback(callback: ErrorCenterHandlerCallback): this;
619
+ /** Sets console logging behavior or filter function. @keywords console logging, debug output */
620
+ setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
621
+ /** Triggers error handling for an error cause item. @keywords trigger error, dispatch cause */
622
+ on(cause: ErrorCenterCauseItem): this;
623
+ }
624
+
625
+ /**
626
+ * Advanced wrapper for managing DOM event listeners with lifecycle control, safety checks, and optimizations.
627
+ * @keywords event listener, dom events, resize observer, scroll sync, event item
628
+ */
629
+ export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
630
+ /** Creates an EventItem instance. @keywords event item, constructor */
631
+ constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
632
+ /** Checks whether event listening is active. @keywords is active, listening status */
633
+ isActive(): boolean;
634
+ /** Returns the target DOM element or window. @keywords get element, target */
635
+ getElement(): E | undefined;
636
+ /** Sets the target DOM element or selector for event listening. @keywords set element, target */
637
+ setElement(elementSelector?: ElementOrString<E>): this;
638
+ /** Sets the control element for DOM safety checks. @keywords element control, dom safety */
639
+ setElementControl<EC extends HTMLElement>(elementSelector?: ElementOrString<EC>): this;
640
+ /** Sets the handled event type or types. @keywords set type, event type */
641
+ setType(type: string | string[]): this;
642
+ /** Sets the event handler listener function. @keywords set listener, handler */
643
+ setListener(listener: EventListenerDetail<O, D>): this;
644
+ /** Sets the event listener options. @keywords set options, event options */
645
+ setOptions(options?: EventOptions): this;
646
+ /** Sets custom detail data passed to the listener or dispatch. @keywords set detail, custom data */
647
+ setDetail(detail?: D): this;
648
+ /** Dispatches a CustomEvent on the target element with optional detail data. @keywords dispatch, trigger event, custom event */
649
+ dispatch(detail?: D | undefined): this;
650
+ /** Starts listening to configured events. @keywords start, add event listener, attach */
651
+ start(): this;
652
+ /** Stops listening to events. @keywords stop, remove event listener, detach */
653
+ stop(): this;
654
+ /** Toggles event listening state based on the provided active flag. @keywords toggle, enable, disable */
655
+ toggle(activity: boolean): this;
656
+ /** Restarts active event listeners. @keywords reset, restart listener, reload */
657
+ reset(): this;
658
+ }
659
+
660
+ /** Formats a list or single data item based on provided column formatting options. @keywords format, list, data, options */
661
+ export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
662
+ /** Initializes the formatters instance with options and optional list data. @keywords constructor, init, setup */
663
+ constructor(options: Options, list?: List | undefined);
664
+ /** Checks if the list data is set. @keywords check, is set, exists */
665
+ is(): boolean;
666
+ /** Type guard checking if the list data is an array. @keywords isArray, type guard */
667
+ isArray(): this is this & {
668
+ list: FormattersList<Item>;
669
+ };
670
+ /** Returns the number of records in the list. @keywords count, length, size */
671
+ length(): number;
672
+ /** Returns the current list of items as an array. @keywords getList, items, array */
673
+ getList(): FormattersList<Item>;
674
+ /** Returns the current formatting options configuration. @keywords getOptions, configuration, settings */
675
+ getOptions(): Options;
676
+ /** Sets the list of data to be formatted. @keywords setList, update, list */
677
+ setList(list?: List): this;
678
+ /** Formats the entire list or single item, appending formatted values with 'Format' suffixes. @keywords to, format, transform */
679
+ to(): FormattersReturn<List, Options>;
680
+ }
681
+
682
+ /** Static utility class for managing geographical data, locale, country, and time zone. @keywords geo, locale, country, timezone */
683
+ export declare class Geo {
684
+ /** Returns a request-isolated instance of GeoInstance. @keywords geo, instance, isolate */
685
+ static getObject(): GeoInstance;
686
+ /** Returns information about the current country and language. @keywords current, geo, locale */
687
+ static get(): GeoItemFull;
688
+ /** Returns the 2-letter code of the current country. @keywords country, code, iso */
689
+ static getCountry(): string;
690
+ /** Returns the 2-letter code of the current language. @keywords language, code, iso */
691
+ static getLanguage(): string;
692
+ /** Returns the combined locale string in standard format (e.g., 'en-US'). @keywords locale, standard, format */
693
+ static getStandard(): string;
694
+ /** Returns the code for the first day of the week for the current locale. @keywords first-day, week, calendar */
695
+ static getFirstDay(): string;
696
+ /** Returns the current location string. @keywords location, current */
697
+ static getLocation(): string;
698
+ /** Returns the country code extracted from the location string. @keywords location, country, code */
699
+ static getLocationCountry(): string;
700
+ /** Returns the language code extracted from the location string. @keywords location, language, code */
701
+ static getLocationLanguage(): string;
702
+ /** Returns fully processed geo data updated with the current language. @keywords geo, item, processed */
703
+ static getItem(): GeoItemFull;
704
+ /** Returns the complete list of available countries and regions. @keywords list, countries, regions */
705
+ static getList(): GeoItem[];
706
+ /** Returns geo data by country or language code from the global database. @keywords search, code, lookup */
707
+ static getByCode(code?: string): GeoItemFull;
708
+ /** Returns exact geo data by searching for full locale match (e.g., 'en-US'). @keywords full, locale, lookup */
709
+ static getByCodeFull(code: string): GeoItem | undefined;
710
+ /** Returns geo data for a specific country by its code. @keywords country, lookup */
711
+ static getByCountry(country: string): GeoItem | undefined;
712
+ /** Returns geo data for a specific language by its code. @keywords language, lookup */
713
+ static getByLanguage(language: string): GeoItem | undefined;
714
+ /** Returns the time zone offset in minutes for the current context. @keywords timezone, offset, minutes */
715
+ static getTimezone(): number;
716
+ /** Returns the formatted time zone string (e.g., '+00:00') for the current context. @keywords timezone, format, offset */
717
+ static getTimezoneFormat(): string;
718
+ /** Finds or determines the geo data for a given code (alias for getByCode). @keywords find, search, geo */
719
+ static find(code: string): GeoItemFull;
720
+ /** Returns a standard concatenated string for a geo item (e.g., 'en-US'). @keywords standard, format, locale */
721
+ static toStandard(item: GeoItem): string;
722
+ /** Sets the current geographical location and updates instance state. @keywords set, location, state */
723
+ static set(code: string, save?: boolean): void;
724
+ /** Sets a custom time zone offset in minutes for the current context. @keywords set, timezone, offset */
725
+ static setTimezone(timezone: number): void;
726
+ /** Sets the default value or resolver function for the country code. @keywords default, country, fallback */
727
+ static setValueDefault(code?: string | (() => string)): void;
728
+ /** Adds or updates country geo data and merges with existing entries. @keywords add, country, merge */
729
+ static add(country: string, item: Partial<GeoItem>): GeoInstance;
730
+ /** Adds or updates multiple countries in the geo list. @keywords add, batch, list */
731
+ static addList(list: Record<string, Partial<GeoItem>>): GeoInstance;
732
+ }
733
+
734
+ export declare const GEO_FLAG_ICON_NAME = "f";
735
+ /** Handles flags, country names, languages, and geographic metadata. @keywords geo, flag, country, language, locale */
736
+ export declare class GeoFlag {
737
+ /** Mapping of country codes to flag icon names. @keywords flags, country codes, icon map */
738
+ static flags: Record<string, string>;
739
+ /** Initializes GeoFlag with an optional country/language code. @keywords geo flag, constructor, locale */
740
+ constructor(code?: string);
741
+ /** Retrieves country information and flag data by country code. @keywords country, flag, metadata */
742
+ get(code?: string): GeoFlagItem | undefined;
743
+ /** Retrieves language information and associated flag by code. @keywords language, flag, metadata */
744
+ getLanguage(code?: string): GeoFlagItem | undefined;
745
+ /** Returns the active country code. @keywords get code, country code, locale */
746
+ getCode(): string;
747
+ /** Returns the flag icon identifier for a given country code. @keywords flag icon, icon id */
748
+ getFlag(code?: string): string | undefined;
749
+ /** Retrieves a list of countries for specified codes or all available countries. @keywords country list, countries */
750
+ getList(codes?: string[], sort?: boolean): GeoFlagItem[];
751
+ /** Retrieves a list of languages for specified codes or all available languages. @keywords language list, languages */
752
+ getListLanguage(codes?: string[], sort?: boolean): GeoFlagItem[];
753
+ /** Retrieves a list of countries with names in their native languages. @keywords national countries, native names */
754
+ getNational(codes?: string[], sort?: boolean): GeoFlagNational[];
755
+ /** Retrieves a list of languages with their native names. @keywords national languages, native names */
756
+ getNationalLanguage(codes?: string[], sort?: boolean): GeoFlagNational[];
757
+ /** Updates the current country/language code. @keywords set code, update locale */
758
+ setCode(code: string): this;
759
+ }
760
+
761
+ /** Cookie key for storing the geo code. @keywords cookie, geo_key */
762
+ export declare const UI_GEO_COOKIE_KEY = "ui-geo-code";
763
+ /** Base class for managing geographic data, location, language, and timezone settings. @keywords geo, location, language, timezone */
764
+ export declare class GeoInstance {
765
+ /** Initializes the geographic instance and resolves default location data. @keywords constructor, geo, init */
766
+ constructor();
767
+ /** Retrieves full geographic data for the current country. @keywords current, country, geo */
768
+ get(): GeoItemFull;
769
+ /** Retrieves the current country code. @keywords country, code */
770
+ getCountry(): string;
771
+ /** Retrieves the current language code. @keywords language, code */
772
+ getLanguage(): string;
773
+ /** Retrieves the standardized locale string (language-country). @keywords standard, locale, language, country */
774
+ getStandard(): string;
775
+ /** Retrieves the first day of the week for the current country. @keywords first_day, week, calendar */
776
+ getFirstDay(): string;
777
+ /** Retrieves the current raw location string. @keywords location */
778
+ getLocation(): string;
779
+ /** Extracts the country code from the current location. @keywords location, country */
780
+ getLocationCountry(): string;
781
+ /** Extracts the language code from the current location. @keywords location, language */
782
+ getLocationLanguage(): string;
783
+ /** Retrieves processed geographic item data including active language. @keywords item, language, geo */
784
+ getItem(): GeoItemFull;
785
+ /** Retrieves the complete list of available country geo records. @keywords list, countries */
786
+ getList(): GeoItem[];
787
+ /** Retrieves full geographic data by locale, country, or language code. @keywords by_code, search, locale */
788
+ getByCode(code?: string): GeoItemFull;
789
+ /** Retrieves geographic data matching an exact language-country standard code. @keywords by_code_full, lookup */
790
+ getByCodeFull(code: string): GeoItem | undefined;
791
+ /** Retrieves geographic data by country code. @keywords by_country, lookup */
792
+ getByCountry(country: string): GeoItem | undefined;
793
+ /** Retrieves geographic data by language code. @keywords by_language, lookup */
794
+ getByLanguage(language: string): GeoItem | undefined;
795
+ /** Retrieves the current timezone offset in minutes. @keywords timezone, offset, minutes */
796
+ getTimezone(): number;
797
+ /** Retrieves the formatted timezone offset string (e.g. '+03:00'). @keywords timezone, format */
798
+ getTimezoneFormat(): string;
799
+ /** Finds country geo data by code or name. @keywords find, search, country */
800
+ find(code: string): GeoItemFull;
801
+ /** Formats a geo item into a standard locale string. @keywords to_standard, format, locale */
802
+ toStandard(item: GeoItem, language?: string): string;
803
+ /** Sets the active location code and optionally persists it to storage. @keywords set, location, save */
804
+ set(code: string, save?: boolean): void;
805
+ /** Sets the default timezone offset in minutes. @keywords set_timezone, offset */
806
+ setTimezone(timezone: number): void;
807
+ /** Sets the default country code or dynamic resolver. @keywords default_value, country */
808
+ setValueDefault(code?: string | (() => string)): void;
809
+ /** Adds or merges geographic data for a specific country code. @keywords add, country, merge */
810
+ add(country: string, item: Partial<GeoItem>): this;
811
+ /** Adds or merges multiple country geographic records. @keywords add_list, countries, batch */
812
+ addList(list: Record<string, Partial<GeoItem>>): this;
813
+ }
814
+
815
+ /** Internationalization and localization utility providing language-sensitive formatting and comparison. @keywords intl localization i18n formatter */
816
+ export declare class GeoIntl {
817
+ /** Checks if an instance exists for the specified country or locale code. @keywords localization check locale */
818
+ static isItem(code?: string): boolean;
819
+ /** Resolves and returns the standard location/locale code. @keywords locale location standard code */
820
+ static getLocation(code?: string): string;
821
+ /** Returns a cached or new GeoIntl instance for the specified locale code. @keywords singleton instance factory */
822
+ static getInstance(code?: string): GeoIntl;
823
+ /** Creates a new GeoIntl instance for internationalization formatting. @keywords intl constructor init */
824
+ constructor(code?: string, errorCenter?: ErrorCenterInstance);
825
+ /** Gets the current country and language locale code. @keywords locale location code */
826
+ getLocation(): string;
827
+ /** Returns the first day of the week for the current locale. @keywords first day week calendar */
828
+ getFirstDay(): string;
829
+ /** Formats display names for languages, regions, scripts, or currencies. @keywords display names translation region */
830
+ display(value?: string, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): string;
831
+ /** Gets the localized display name of a language. @keywords language name locale */
832
+ languageName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
833
+ /** Gets the localized display name of a country or region. @keywords country name region */
834
+ countryName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
835
+ /** Formats a full person name according to locale conventions. @keywords person full name formatting */
836
+ fullName(last: string, first: string, surname?: string, short?: boolean): string;
837
+ /** Formats numbers, strings, or bigints with localized numeric formatting. @keywords number format numeric */
838
+ number(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
839
+ /** Gets the localized decimal separator symbol. @keywords decimal separator point */
840
+ decimal(): string;
841
+ /** Formats numbers as localized currency strings. @keywords currency money format */
842
+ currency(value: NumberOrString, currencyOptions?: string | Intl.NumberFormatOptions, numberOnly?: boolean): string;
843
+ /** Returns the currency symbol or code for a given currency. @keywords currency symbol sign */
844
+ currencySymbol(currency: string, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): string;
845
+ /** Formats a number with localized measurement units. @keywords unit measure format */
846
+ unit(value: NumberOrString, unitOptions?: string | Intl.NumberFormatOptions): string;
847
+ /** Formats digital file sizes into localized unit strings. @keywords file size byte format */
848
+ sizeFile(value: NumberOrString, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): string;
849
+ /** Formats a ratio value (e.g. 0.5) as a localized percentage. @keywords percent percentage format */
850
+ percent(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
851
+ /** Formats a 0-100 numeric value as a localized percentage. @keywords percentage percent 100 */
852
+ percentBy100(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
853
+ /** Formats pluralized words matching locale rules (format: one|two|few|many|other|zero). @keywords plural pluralization words */
854
+ plural(value: NumberOrString, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): string;
855
+ /** Formats date and time values according to locale rules. @keywords date time format */
856
+ date(value: NumberOrStringOrDate, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): string;
857
+ /** Formats language-sensitive relative time strings (e.g. 'yesterday', 'in 2 days'). @keywords relative time format ago */
858
+ relative(value: NumberOrStringOrDate, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): string;
859
+ /** Formats relative time with a day limit, falling back to absolute date formatting. @keywords relative limit fallback time */
860
+ relativeLimit(value: NumberOrStringOrDate, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): string;
861
+ /** Formats an explicit numeric difference and time unit into relative time. @keywords relative by value time unit */
862
+ relativeByValue(value: NumberOrString, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): string;
863
+ /** Gets the localized month name for a given date. @keywords month name calendar */
864
+ month(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['month']): string;
865
+ /** Returns an array of localized month names (1-12). @keywords months list options select */
866
+ months(style?: Intl.DateTimeFormatOptions['month']): ItemValue<number | undefined>[];
867
+ /** Gets the localized weekday name for a given date. @keywords weekday name day */
868
+ weekday(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['weekday']): string;
869
+ /** Returns an array of localized weekday names (0-6). @keywords weekdays list options select */
870
+ weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ItemValue<number | undefined>[];
871
+ /** Formats the time portion of a date according to locale conventions. @keywords time format clock */
872
+ time(value: NumberOrStringOrDate): string;
873
+ /** Sorts string items or objects locale-sensitively using Intl.Collator. @keywords sort collator locale */
874
+ sort<T>(data: T[], compareFn?: (a: T, b: T) => [string, string]): T[];
875
+ }
876
+
877
+ /** Class for storing and processing phone number masks and country dialing codes. @keywords phone, mask, country code, dialing */
878
+ export declare class GeoPhone {
879
+ /** Retrieves phone code and country information by country code. @keywords phone info, country code */
880
+ static get(code: string): GeoPhoneValue | undefined;
881
+ /** Retrieves country and mask information from a phone number. @keywords parse phone, phone lookup */
882
+ static getByPhone(phone: string): GeoPhoneMapInfo;
883
+ /** Retrieves complete phone mask data by country code. @keywords mask by code, country mask */
884
+ static getByCode(code: string): GeoPhoneMap | undefined;
885
+ /** Returns a list of all phone country codes and metadata. @keywords phone list, country codes */
886
+ static getList(): GeoPhoneValue[];
887
+ /** Returns a map tree of phone data indexed by country code. @keywords phone map, dial tree */
888
+ static getMap(): Record<string, GeoPhoneMap>;
889
+ /** Formats a phone number according to provided or matched masks. @keywords format phone, apply mask */
890
+ static toMask(phone: string, masks?: string[]): string | undefined;
891
+ /** Removes country prefixes or trunk zeroes from an input phone number. @keywords clean phone, strip prefix */
892
+ static removeZero(phone: string): string;
893
+ }
894
+
895
+ /** Localized unit formatting and automatic conversions based on locale. @keywords unit measurement locale conversion format */
896
+ export declare class GeoUnit {
897
+ /** Gets an isolated or cached GeoUnit instance by country or language code. @keywords instance singleton cache factory */
898
+ static getInstance(code?: string): GeoUnit;
899
+ /** Creates a GeoUnit instance for a country or language code. @keywords constructor init */
900
+ constructor(code?: string);
901
+ /** Gets the standard location code. @keywords location locale country */
902
+ getLocation(): string;
903
+ /** Formats millimeter value, converting to inches for imperial locales. @keywords millimeter mm inch */
904
+ millimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
905
+ /** Formats centimeter value, converting to inches for imperial locales. @keywords centimeter cm inch */
906
+ centimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
907
+ /** Formats meter value, converting to feet for imperial locales. @keywords meter m foot feet */
908
+ meter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
909
+ /** Formats kilometer value, converting to miles for imperial locales. @keywords kilometer km mile */
910
+ kilometer(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
911
+ /** Formats square meter value, converting to square feet for imperial locales. @keywords square meter m2 sqft */
912
+ squareMeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
913
+ /** Formats hectare value, converting to acres for imperial locales. @keywords hectare ha acre */
914
+ hectare(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
915
+ /** Formats gram value, converting to ounces for imperial locales. @keywords gram g ounce oz */
916
+ gram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
917
+ /** Formats kilogram value, converting to pounds for imperial locales. @keywords kilogram kg pound lb */
918
+ kilogram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
919
+ /** Formats metric tonne value, converting to short tons for imperial locales. @keywords tonne ton */
920
+ tonne(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
921
+ /** Formats milliliter value, converting to fluid ounces for imperial locales. @keywords milliliter ml floz */
922
+ milliliter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
923
+ /** Formats liter value, converting to gallons for imperial locales. @keywords liter l gallon gal */
924
+ liter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
925
+ /** Formats Celsius value, converting to Fahrenheit for imperial locales. @keywords celsius fahrenheit temperature */
926
+ celsius(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
927
+ /** Formats speed in km/h, converting to mph for imperial locales. @keywords kmh mph speed */
928
+ kilometerPerHour(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
929
+ /** Formats a numeric value for the specified unit according to locale settings. @keywords format unit locale convert */
930
+ format(value: NumberOrString, unit: string, options?: Intl.NumberFormatOptions): string;
931
+ }
932
+
933
+ /** Static utility class for storing and retrieving application-wide global data. @keywords global state storage data */
934
+ export declare class Global {
935
+ /** Returns global data storage instance. @keywords global storage data */
936
+ static getItem(): Record<string, any>;
937
+ /** Returns a value by its property name. @keywords get global value property */
938
+ static get<R = any>(name: string): R;
939
+ /** Adds global data (works only once). @keywords add set global data init */
940
+ static add(data: Record<string, any>): void;
941
+ }
942
+
943
+ /** Static interface for managing URL hash state via HashInstance. @keywords url hash, router state, hash params */
944
+ export declare class Hash {
945
+ /** Returns a request-isolated HashInstance. @keywords instance, singleton, context */
946
+ static getItem(): HashInstance;
947
+ /** Retrieves a value from the URL hash. @keywords hash get, read url param */
948
+ static get<T>(name: string, defaultValue?: T | (() => T)): T;
949
+ /** Sets or updates a value in the URL hash. @keywords hash set, update url param */
950
+ static set<T>(name: string, callback: T | (() => T)): void;
951
+ /** Subscribes a listener callback to changes for a specific hash variable. @keywords watch, subscribe, listener, observe */
952
+ static addWatch<T>(name: string, callback: (value: T) => void): void;
953
+ /** Unsubscribes a listener callback from hash variable changes. @keywords unwatch, unsubscribe, remove listener */
954
+ static removeWatch<T>(name: string, callback: (value: T) => void): void;
955
+ /** Reloads and synchronizes hash variables from the current URL string. @keywords reload, refresh, sync url */
956
+ static reload(): void;
957
+ }
958
+
959
+ /** Class for managing and synchronizing data stored in the URL hash. @keywords url hash, location hash, hash state, url parameters */
960
+ export declare class HashInstance extends UrlInstanceAbstract {
961
+ }
962
+
963
+ export type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);
964
+ export type IconsConfig = {
965
+ url?: string;
966
+ list?: Record<string, IconsItem>;
967
+ };
968
+ /** Icon manager utility for registering and loading icons. @keywords icons, icon-loader, assets */
969
+ export declare class Icons {
970
+ /** Checks if an icon is registered. @keywords icons, has-icon, exists */
971
+ static is(index: string): boolean;
972
+ /** Retrieves icon content or path asynchronously. @keywords get-icon, async-icon, fetch-icon */
973
+ static get(index: string, url?: string, wait?: number): Promise<string>;
974
+ /** Synchronously returns an icon if loaded or string-based. @keywords get-sync, cached-icon */
975
+ static getAsync(index: string, url?: string): string;
976
+ /** Retrieves a list of all registered icon names. @keywords icon-list, names */
977
+ static getNameList(): string[];
978
+ /** Retrieves the global icon storage URL. @keywords global-url, base-url */
979
+ static getUrlGlobal(): string;
980
+ /** Registers a custom icon definition. @keywords register-icon, add-icon */
981
+ static add(index: string, file: IconsItem): void;
982
+ /** Registers an icon in pending loading state. @keywords add-loading, placeholder */
983
+ static addLoad(index: string): void;
984
+ /** Registers a global icon path. @keywords add-global, icon-url */
985
+ static addGlobal(index: string, file: string): void;
986
+ /** Registers multiple icons from a key-value record. @keywords batch-register, icon-list */
987
+ static addByList(list: Record<string, IconsItem>): void;
988
+ /** Sets the base icon storage URL. @keywords set-url, icon-path */
989
+ static setUrl(url: string): void;
990
+ /** Updates the icon configuration. @keywords config, setup */
991
+ static setConfig(config: IconsConfig): void;
992
+ }
993
+
994
+ /** Class for managing global loading state. @keywords loading, loader, spinner, global */
995
+ export declare class Loading {
996
+ /** Checks if the loader is currently active. @keywords is loading, active */
997
+ static is(): boolean;
998
+ /** Gets the current loading count or value. @keywords loading count, status */
999
+ static get(): number;
1000
+ /** Returns a request-isolated instance of LoadingInstance. @keywords loading instance, isolated */
1001
+ static getItem(): LoadingInstance;
1002
+ /** Shows the loader. @keywords show loader, start loading */
1003
+ static show(): void;
1004
+ /** Hides the loader. @keywords hide loader, stop loading */
1005
+ static hide(): void;
1006
+ /** Registers an event listener for loading state changes. @keywords loading event, add listener */
1007
+ static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
1008
+ /** Unregisters a loading state event listener. @keywords remove listener, unsubscribe */
1009
+ static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
1010
+ }
1011
+
1012
+ export type LoadingDetail = {
1013
+ loading: boolean;
1014
+ };
1015
+
1016
+ export type LoadingRegistrationItem = {
1017
+ item: EventItem<Window, CustomEvent, LoadingDetail>;
1018
+ listener: EventListenerDetail<CustomEvent, LoadingDetail>;
1019
+ element?: ElementOrString<HTMLElement>;
1020
+ };
1021
+
1022
+ /** Manages global loading state counters and event notifications. @keywords loading, state, loader, progress */
1023
+ export declare class LoadingInstance {
1024
+ /** Initializes the loading tracker. @param eventName Name of the event to broadcast loading state @keywords init, constructor */
1025
+ constructor(eventName?: string);
1026
+ /** Checks whether the loader is currently active. @keywords is, status, active */
1027
+ is(): boolean;
1028
+ /** Gets the current loading count value. @keywords get, count, counter */
1029
+ get(): number;
1030
+ /** Increments loading counter and activates loader. @keywords show, start, display */
1031
+ show(): void;
1032
+ /** Decrements loading counter and hides loader when count reaches zero. @keywords hide, stop, dismiss */
1033
+ hide(): void;
1034
+ /** Registers an event listener for loading state changes. @param listener Event listener callback @param element Target DOM element @keywords register, listener, subscribe */
1035
+ registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
1036
+ /** Unregisters a loading state event listener. @param listener Event listener callback @param element Target DOM element @keywords unregister, unsubscribe, remove */
1037
+ unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
1038
+ }
1039
+
1040
+ /** Unified manager for standard HTML, Open Graph, and Twitter Card meta tags. @keywords meta, tags, head, html, seo */
1041
+ export declare class Meta extends MetaManager<MetaTag[]> {
1042
+ /** Creates an instance of Meta with integrated Open Graph and Twitter Card support. @keywords constructor, init */
1043
+ constructor();
1044
+ /** Gets the MetaOg instance for Open Graph operations. @keywords og, opengraph */
1045
+ getOg(): MetaOg;
1046
+ /** Gets the MetaTwitter instance for Twitter Card operations. @keywords twitter, card */
1047
+ getTwitter(): MetaTwitter;
1048
+ /** Gets the page title without suffix. @keywords title, get */
1049
+ getTitle(): string;
1050
+ /** Gets the keywords meta tag content. @keywords keywords, get */
1051
+ getKeywords(): string;
1052
+ /** Gets the description meta tag content. @keywords description, get */
1053
+ getDescription(): string;
1054
+ /** Gets the Open Graph image URL. @keywords image, og, get */
1055
+ getImage(): string;
1056
+ /** Gets the canonical URL. @keywords canonical, url, get */
1057
+ getCanonical(): string;
1058
+ /** Gets the robots meta tag directive. @keywords robots, crawler, get */
1059
+ getRobots(): MetaRobots;
1060
+ /** Gets the author meta tag content. @keywords author, get */
1061
+ getAuthor(): string;
1062
+ /** Gets the Open Graph site name. @keywords site_name, og, get */
1063
+ getSiteName(): string;
1064
+ /** Gets the Open Graph locale. @keywords locale, og, get */
1065
+ getLocale(): string;
1066
+ /** Sets the page title with suffix and updates Open Graph and Twitter Card titles. @keywords title, set */
1067
+ setTitle(title: string): this;
1068
+ /** Sets the keywords meta tag. @keywords keywords, set */
1069
+ setKeywords(keywords: string | string[]): this;
1070
+ /** Sets the description meta tag. @keywords description, set */
1071
+ setDescription(description: string): this;
1072
+ /** Sets the image for Open Graph and Twitter Card. @keywords image, og, twitter, set */
1073
+ setImage(image: string): this;
1074
+ /** Sets the canonical URL and updates Open Graph and Twitter Card URLs. @keywords canonical, url, set */
1075
+ setCanonical(canonical: string): this;
1076
+ /** Sets the robots meta tag directive. @keywords robots, indexing, set */
1077
+ setRobots(robots: MetaRobots): this;
1078
+ /** Sets the author meta tag. @keywords author, set */
1079
+ setAuthor(author: string): this;
1080
+ /** Sets the site name for Open Graph and Twitter Card. @keywords site_name, og, set */
1081
+ setSiteName(siteName: string): this;
1082
+ /** Sets the Open Graph locale. @keywords locale, og, set */
1083
+ setLocale(locale: string): this;
1084
+ /** Sets the suffix to append to page title. @keywords suffix, title, set */
1085
+ setSuffix(suffix?: string): void;
1086
+ /** Generates the complete HTML string for all meta tags. @keywords html, render, serialize */
1087
+ html(): string;
1088
+ /** Generates the title as an HTML-safe string. @keywords title, html, render */
1089
+ htmlTitle(): string;
1090
+ }
1091
+
1092
+ type MetaList<T extends readonly string[]> = {
1093
+ [K in T[number]]?: string;
1094
+ };
1095
+ /** Manages HTML meta tag creation, retrieval, and rendering. @keywords meta, head, seo, html, tags */
1096
+ export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
1097
+ /** Initializes manager with meta tag names and optional property attribute mode. @keywords meta, init, head */
1098
+ constructor(listMeta: T, isProperty?: boolean);
1099
+ /** Returns managed meta tag names list. @keywords meta, list, names */
1100
+ getListMeta(): T;
1101
+ /** Gets content of specified meta tag by name. @keywords meta, get, value, content */
1102
+ get(name: Key): string;
1103
+ /** Returns all configured meta tag key-value pairs. @keywords meta, items, dictionary, all */
1104
+ getItems(): MetaList<T>;
1105
+ /** Renders all meta tags as an HTML string. @keywords html, render, markup, meta */
1106
+ html(): string;
1107
+ /** Sets content for a specific meta tag. @keywords meta, set, update */
1108
+ set(name: Key, content: string): this;
1109
+ /** Sets multiple meta tags from a dictionary object. @keywords meta, batch, set, dictionary */
1110
+ setByList(metaList: MetaList<T>): this;
1111
+ }
1112
+
1113
+ /** Manages Open Graph meta tags. @keywords meta open graph og seo tags */
1114
+ export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
1115
+ /** Initializes a new MetaOg instance. @keywords constructor og */
1116
+ constructor();
1117
+ /** Gets the Open Graph title (`og:title`). @keywords og title */
1118
+ getTitle(): string;
1119
+ /** Gets the Open Graph type (`og:type`). @keywords og type */
1120
+ getType(): MetaOpenGraphType;
1121
+ /** Gets the Open Graph URL (`og:url`). @keywords og url */
1122
+ getUrl(): string;
1123
+ /** Gets the Open Graph image URL (`og:image`). @keywords og image */
1124
+ getImage(): string;
1125
+ /** Gets the Open Graph description (`og:description`). @keywords og description */
1126
+ getDescription(): string;
1127
+ /** Gets the Open Graph locale (`og:locale`). @keywords og locale */
1128
+ getLocale(): string;
1129
+ /** Gets the Open Graph site name (`og:site_name`). @keywords og site name */
1130
+ getSiteName(): string;
1131
+ /** Sets the Open Graph title (`og:title`). @keywords og title */
1132
+ setTitle(title: string): this;
1133
+ /** Sets the Open Graph type (`og:type`). @keywords og type */
1134
+ setType(type: MetaOpenGraphType): this;
1135
+ /** Sets the Open Graph URL (`og:url`). @keywords og url */
1136
+ setUrl(url: string): this;
1137
+ /** Sets the Open Graph image URL (`og:image`). @keywords og image */
1138
+ setImage(url: string): this;
1139
+ /** Sets the Open Graph description (`og:description`). @keywords og description */
1140
+ setDescription(description: string): this;
1141
+ /** Sets the Open Graph locale (`og:locale`, e.g. 'en_US'). @keywords og locale */
1142
+ setLocale(locale: string): this;
1143
+ /** Sets the Open Graph site name (`og:site_name`). @keywords og site name */
1144
+ setSiteName(siteName: string): this;
1145
+ }
1146
+
1147
+ /** Static helper for managing meta tags, Open Graph, and Twitter Cards. @keywords meta, tags, head, seo */
1148
+ export declare class MetaStatic {
1149
+ /** Returns singleton instance of Meta. @keywords instance, singleton, meta */
1150
+ static getItem(): Meta;
1151
+ /** Returns MetaOg instance for Open Graph tags. @keywords og, open graph, social */
1152
+ static getOg(): MetaOg;
1153
+ /** Returns MetaTwitter instance for Twitter Card tags. @keywords twitter, twitter card, social */
1154
+ static getTwitter(): MetaTwitter;
1155
+ /** Gets page title without suffix. @keywords title, get, seo */
1156
+ static getTitle(): string;
1157
+ /** Gets keywords meta tag content. @keywords keywords, meta, seo */
1158
+ static getKeywords(): string;
1159
+ /** Gets description meta tag content. @keywords description, meta, seo */
1160
+ static getDescription(): string;
1161
+ /** Gets Open Graph image URL. @keywords image, og, preview */
1162
+ static getImage(): string;
1163
+ /** Gets canonical URL. @keywords canonical, url, link */
1164
+ static getCanonical(): string;
1165
+ /** Gets robots meta directive. @keywords robots, crawler, indexing */
1166
+ static getRobots(): MetaRobots;
1167
+ /** Gets author meta tag value. @keywords author, meta */
1168
+ static getAuthor(): string;
1169
+ /** Gets Open Graph site name. @keywords siteName, og, name */
1170
+ static getSiteName(): string;
1171
+ /** Gets Open Graph locale. @keywords locale, language, og */
1172
+ static getLocale(): string;
1173
+ /** Sets page title and synchronizes Open Graph and Twitter Card titles. @keywords setTitle, title, seo */
1174
+ static setTitle(title: string): typeof MetaStatic;
1175
+ /** Sets keywords meta tag. @keywords setKeywords, keywords, seo */
1176
+ static setKeywords(keywords: string | string[]): typeof MetaStatic;
1177
+ /** Sets description meta tag. @keywords setDescription, description, seo */
1178
+ static setDescription(description: string): typeof MetaStatic;
1179
+ /** Sets preview image for Open Graph and Twitter Card. @keywords setImage, image, og, twitter */
1180
+ static setImage(image: string): typeof MetaStatic;
1181
+ /** Sets canonical URL and updates Open Graph and Twitter Card URLs. @keywords setCanonical, canonical, url */
1182
+ static setCanonical(canonical: string): typeof MetaStatic;
1183
+ /** Sets robots meta tag directive. @keywords setRobots, robots, crawler */
1184
+ static setRobots(robots: MetaRobots): typeof MetaStatic;
1185
+ /** Sets author meta tag. @keywords setAuthor, author */
1186
+ static setAuthor(author: string): typeof MetaStatic;
1187
+ /** Sets site name for Open Graph and Twitter Card. @keywords setSiteName, siteName, og */
1188
+ static setSiteName(siteName: string): typeof MetaStatic;
1189
+ /** Sets locale for Open Graph. @keywords setLocale, locale, lang */
1190
+ static setLocale(locale: string): typeof MetaStatic;
1191
+ /** Sets suffix appended to page title. @keywords setSuffix, suffix, title */
1192
+ static setSuffix(suffix?: string): typeof MetaStatic;
1193
+ /** Renders complete HTML string for all meta, Open Graph, and Twitter Card tags. @keywords html, render, tags */
1194
+ static html(): string;
1195
+ /** Renders page title tag as HTML-safe string. @keywords htmlTitle, title, render */
1196
+ static htmlTitle(): string;
1197
+ }
1198
+
1199
+ /** Manages Twitter Card meta tags. @keywords twitter card, meta tags, social share */
1200
+ export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
1201
+ /** Initializes the MetaTwitter instance. @keywords constructor, init */
1202
+ constructor();
1203
+ /** Gets the Twitter Card type. @keywords twitter card, type, get */
1204
+ getCard(): MetaTwitterCard;
1205
+ /** Gets the website or brand @username. @keywords twitter site, username, get */
1206
+ getSite(): string;
1207
+ /** Gets the content creator @username. @keywords twitter creator, author, get */
1208
+ getCreator(): string;
1209
+ /** Gets the page URL. @keywords twitter url, get */
1210
+ getUrl(): string;
1211
+ /** Gets the card title. @keywords twitter title, get */
1212
+ getTitle(): string;
1213
+ /** Gets the card description. @keywords twitter description, get */
1214
+ getDescription(): string;
1215
+ /** Gets the card image URL. @keywords twitter image, get */
1216
+ getImage(): string;
1217
+ /** Sets the Twitter Card type. @keywords twitter card, type, set */
1218
+ setCard(card: MetaTwitterCard): this;
1219
+ /** Sets the website or brand @username. @keywords twitter site, username, set */
1220
+ setSite(site: string): this;
1221
+ /** Sets the content creator @username. @keywords twitter creator, author, set */
1222
+ setCreator(creator: string): this;
1223
+ /** Sets the page URL. @keywords twitter url, set */
1224
+ setUrl(url: string): this;
1225
+ /** Sets the card title. @keywords twitter title, set */
1226
+ setTitle(title: string): this;
1227
+ /** Sets the card description. @keywords twitter description, set */
1228
+ setDescription(description: string): this;
1229
+ /** Sets the card image URL. @keywords twitter image, set */
1230
+ setImage(image: string): this;
1231
+ }
1232
+
1233
+ /** Static facade for managing URL query parameters. @keywords url, query params, search params, routing */
1234
+ export declare class Query {
1235
+ /** Returns a request-isolated QueryInstance. @keywords instance, query instance, singleton */
1236
+ static getItem(): QueryInstance;
1237
+ /** Retrieves a parameter value from the query string with an optional default. @keywords get query, query parameter, read url */
1238
+ static get<T>(name: string, defaultValue?: T | (() => T)): T;
1239
+ /** Sets or updates a parameter in the URL query string. @keywords set query, update query, write url */
1240
+ static set<T>(name: string, callback: T | (() => T)): void;
1241
+ /** Subscribes a listener to changes for a specific query parameter. @keywords watch, query listener, observer, event */
1242
+ static addWatch<T>(name: string, callback: (value: T) => void): void;
1243
+ /** Unsubscribes a listener from changes for a specific query parameter. @keywords unwatch, remove listener, unsubscribe */
1244
+ static removeWatch<T>(name: string, callback: (value: T) => void): void;
1245
+ /** Synchronizes query state with the current URL search string. @keywords reload query, sync url, refresh query */
1246
+ static reload(): void;
1247
+ }
1248
+
1249
+ /** Manages data stored in URL query parameters. @keywords query, url, searchParams, parameters */
1250
+ export declare class QueryInstance extends UrlInstanceAbstract {
1251
+ }
1252
+
1253
+ /** Timer that can be paused, resumed, reset, and cleared. @keywords timer, pause, resume, timeout, delay */
1254
+ export declare class ResumableTimer {
1255
+ /** Creates a resumable timer instance. @param blockStart If true, timer will not start immediately. @keywords timer, init */
1256
+ constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
1257
+ /** Resumes the timer if paused, or starts it. @keywords resume, start, continue */
1258
+ resume(): this;
1259
+ /** Pauses the timer and tracks remaining time. @keywords pause, stop, hold */
1260
+ pause(): this;
1261
+ /** Resets and restarts the timer with the original delay. @keywords reset, restart */
1262
+ reset(): this;
1263
+ /** Completely clears and cancels the timer. @keywords clear, cancel, destroy */
1264
+ clear(): this;
1265
+ }
1266
+
1267
+ /** Utility class for calculating and managing scrollbar width. @keywords scrollbar, scroll width, layout, measurement */
1268
+ export declare class ScrollbarWidth {
1269
+ /** Checks whether scrollbar hiding should be enabled. @keywords scrollbar, visibility, check, hide */
1270
+ static is(): Promise<boolean>;
1271
+ /** Computes and returns the scrollbar width in pixels. @keywords scrollbar, width, measure, pixels */
1272
+ static get(): Promise<number>;
1273
+ /** Returns the storage instance holding the cached scrollbar width. @keywords scrollbar, storage, cache */
1274
+ static getStorage(): DataStorage<number>;
1275
+ /** Checks if scrollbar width calculation is currently in progress. @keywords scrollbar, calculate, state, status */
1276
+ static getCalculate(): boolean;
1277
+ }
1278
+
1279
+ /** Manages searchable lists, coordinating options, item state, matching logic, and storage. @keywords search, list, filter, data */
1280
+ export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
1281
+ /** Initializes a new SearchList instance. @keywords search list, constructor */
1282
+ constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
1283
+ /** Gets the search data management instance. @keywords search data, storage */
1284
+ getData(): SearchListData<T, K>;
1285
+ /** Gets the current list of items. @keywords list, items, search list */
1286
+ getList(): SearchListValue<T>;
1287
+ /** Gets the active search columns. @keywords columns, fields, search columns */
1288
+ getColumns(): K | undefined;
1289
+ /** Gets the search item instance. @keywords item, search item */
1290
+ getItem(): SearchListItem;
1291
+ /** Gets the current search query value. @keywords query, search value */
1292
+ getValue(): string | undefined;
1293
+ /** Gets the search options manager instance. @keywords options, configuration, search options */
1294
+ getOptions(): SearchListOptions;
1295
+ /** Sets a new list of items and resets the cache. @keywords set list, update items */
1296
+ setList(list: SearchListValue<T>): this;
1297
+ /** Sets target search columns and resets the cache. @keywords set columns, search fields */
1298
+ setColumns(columns?: K): this;
1299
+ /** Sets the search query value and updates the matcher. @keywords set value, search query */
1300
+ setValue(value?: string): this;
1301
+ /** Sets search options and updates the matcher. @keywords set options, configuration */
1302
+ setOptions(options: SearchOptions): this;
1303
+ /** Processes and returns the formatted list based on the current search state. @keywords format, process, filter results */
1304
+ to(): SearchFormatList<T, K>;
1305
+ }
1306
+
1307
+ /** Manages and formats search data list and item cache. @keywords search, list, cache, format */
1308
+ export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
1309
+ /** Creates an instance of SearchListData. @keywords constructor, init */
1310
+ constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
1311
+ /** Checks if both list and columns are provided for column-based search. @keywords type guard, check, columns */
1312
+ is(): this is this & {
1313
+ list: T[];
1314
+ columns: string[];
1315
+ };
1316
+ /** Checks if the search list is provided. @keywords type guard, check, list */
1317
+ isList(): this is this & {
1318
+ list: T[];
1319
+ };
1320
+ /** Returns the original list. @keywords get list, source */
1321
+ getList(): SearchListValue<T>;
1322
+ /** Returns search columns. @keywords get columns, keys */
1323
+ getColumns(): K | undefined;
1324
+ /** Sets a new list and updates the cache. @keywords set list, cache */
1325
+ setList(list: SearchListValue<T>): this;
1326
+ /** Sets search columns and updates the cache. @keywords set columns, cache */
1327
+ setColumns(columns?: SearchColumns<T>): this;
1328
+ /** Finds a cached item for the given original item. @keywords find, cache, lookup */
1329
+ findCacheItem(item: T): SearchCacheItem<T> | undefined;
1330
+ /** Iterates over cached items and applies a formatting callback. @keywords iterate, format, callback */
1331
+ forEach(callback: (item: SearchCacheItem<T>['item'], value: SearchCacheItem<T>['value']) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
1332
+ /** Formats an item, optionally highlighting matching search terms. @keywords format item, highlight, match */
1333
+ toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
1334
+ }
1335
+
1336
+ /** Manages search item value and query state. @keywords search item value query state */
1337
+ export declare class SearchListItem {
1338
+ /** Initializes a new SearchListItem instance. @keywords search item constructor init */
1339
+ constructor(value: string | undefined, options: SearchListOptions);
1340
+ /** Checks whether the search value is defined. @keywords check value exists defined */
1341
+ is(): this is this & {
1342
+ value: string;
1343
+ };
1344
+ /** Checks if the search value length meets the minimum limit. @keywords search threshold limit length */
1345
+ isSearch(): boolean;
1346
+ /** Gets the current search string value. @keywords get search query string */
1347
+ get(): string;
1348
+ /** Sets the search string value. @keywords set search query update */
1349
+ set(value?: string): this;
1350
+ }
1351
+
1352
+ /** Matches search values against list data using regular expressions. @keywords search matcher regex pattern */
1353
+ export declare class SearchListMatcher {
1354
+ /** Initializes the search matcher with item and options. @keywords constructor init */
1355
+ constructor(item: SearchListItem, options: SearchListOptions);
1356
+ /** Checks if the matcher is active or initialized. @keywords is initialized check active */
1357
+ is(): boolean;
1358
+ /** Checks if the given value matches the current search expression. @keywords test match selection */
1359
+ isSelection(value: SearchCacheItem<any>['value']): boolean;
1360
+ /** Gets the compiled regular expression matcher. @keywords regex pattern get */
1361
+ get(): RegExp | undefined;
1362
+ /** Updates the regex matcher from current item value and options. @keywords update refresh compile */
1363
+ update(): void;
1364
+ }
1365
+
1366
+ /** Manages search list options and configuration settings. @keywords search, options, list, config */
1367
+ export declare class SearchListOptions {
1368
+ /** Initializes search list options. @keywords constructor, init */
1369
+ constructor(options?: SearchOptions | undefined);
1370
+ /** Retrieves current search options. @keywords get, options, search */
1371
+ getOptions(): SearchOptions;
1372
+ /** Retrieves the minimum character length required to trigger search. @keywords limit, min, length, trigger */
1373
+ getLimit(): number;
1374
+ /** Checks if all items are returned regardless of search match. @keywords return, all, match, filter */
1375
+ getReturnEverything(): boolean;
1376
+ /** Retrieves search debounce delay in milliseconds. @keywords delay, debounce, time */
1377
+ getDelay(): number;
1378
+ /** Checks whether exact match searching is enabled. @keywords exact, match, strict */
1379
+ getFindExactMatch(): boolean;
1380
+ /** Retrieves the CSS class name used for highlighting matches. @keywords class, highlight, css */
1381
+ getClassName(): string;
1382
+ /** Updates search options. @keywords set, options, update */
1383
+ setOptions(options: SearchOptions): this;
1384
+ }
1385
+
1386
+ type ServerStorageItem = {
1387
+ value: any;
1388
+ hydration: boolean;
1389
+ };
1390
+ type ServerStorageList = Record<string, ServerStorageItem>;
1391
+ /** Manages isolated data storage during SSR across parallel requests. @keywords ssr, storage, isolation, context */
1392
+ export declare class ServerStorage {
1393
+ /** Initializes storage with a request context listener function. @keywords init, context, ssr */
1394
+ static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
1395
+ /** Resets the storage state. @keywords reset, clear */
1396
+ static reset(): void;
1397
+ /** Checks if a value exists in storage by key. @keywords has, exists, key */
1398
+ static has(key: string): boolean;
1399
+ /** Retrieves a value or creates it using a factory function with optional hydration. @keywords get, hydration, cache */
1400
+ static get<T = any>(key: string, defaultValue?: () => T, hydration?: boolean): T;
1401
+ /** Stores a value from a factory function with optional hydration. @keywords set, store, hydration */
1402
+ static set<T = any>(key: string, value: () => T, hydration?: boolean, storageList?: ServerStorageList): T;
1403
+ /** Sets whether error messages should be hidden or shown. @keywords error, status, logging */
1404
+ static setErrorStatus(hide: boolean): void;
1405
+ /** Removes a value from storage by key. @keywords remove, delete */
1406
+ static remove(key: string): void;
1407
+ /** Serializes the hydration storage into an executable script tag string. @keywords hydration, serialize, toString */
1408
+ static toString(): string;
1409
+ }
1410
+ export {};
1411
+
1412
+ /** Manages storage callback lists and execution state. @keywords storage callback subscriber listener */
1413
+ export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
1414
+ /** Gets a StorageCallback singleton instance by name and group. @keywords singleton instance storage */
1415
+ static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
1416
+ /** Initializes a new StorageCallback instance. @keywords constructor init */
1417
+ constructor(name: string, group?: string);
1418
+ /** Checks whether storage is currently in a loading state. @keywords loading state check */
1419
+ isLoading(): boolean;
1420
+ /** Gets the storage identifier name. @keywords name identifier */
1421
+ getName(): string;
1422
+ /** Gets the current loading state value. @keywords loading status */
1423
+ getLoading(): boolean;
1424
+ /** Subscribes a callback function to storage events. @keywords subscribe listener add once */
1425
+ addCallback(callback: Callback, isOnce?: boolean): this;
1426
+ /** Unsubscribes a callback function from storage events. @keywords unsubscribe listener remove */
1427
+ removeCallback(callback: Callback): this;
1428
+ /** Prepares storage callback state prior to execution. @keywords prepare init state */
1429
+ preparation(): this;
1430
+ /** Executes all registered callbacks asynchronously with the provided value. @keywords trigger emit execute dispatch */
1431
+ run(value: T): Promise<this>;
1432
+ }
1433
+
1434
+ /** Translation service for loading and resolving localized texts. @keywords translate, i18n, localization, dictionary */
1435
+ export declare class Translate {
1436
+ /** Asynchronously retrieves translation text by code with optional replacements. @keywords translate, get, async, i18n */
1437
+ static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
1438
+ /** Returns a request-isolated TranslateInstance. @keywords translate, instance, context */
1439
+ static getItem(): TranslateInstance;
1440
+ /** Synchronously retrieves translation text by code with optional replacements. @keywords translate, sync, lookup */
1441
+ static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
1442
+ /** Asynchronously retrieves multiple translations by key list. @keywords translate, list, batch, async */
1443
+ static getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
1444
+ /** Synchronously retrieves multiple translations by key list. @keywords translate, list, sync */
1445
+ static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
1446
+ /** Asynchronously loads translated texts for specified codes. @keywords translate, add, load, async */
1447
+ static add(names: string | string[]): Promise<void>;
1448
+ /** Synchronously registers a dictionary of key-value translations. @keywords translate, addSync, register, dictionary */
1449
+ static addSync(data: Record<string, string>): void;
1450
+ /** Adds translation data via request or directly depending on environment. @keywords translate, add, hybrid */
1451
+ static addNormalOrSync(data: Record<string, string>): Promise<void>;
1452
+ /** Synchronously registers translations grouped by location. @keywords translate, location, namespace */
1453
+ static addSyncByLocation(data: Record<string, Record<string, string>>): void;
1454
+ /** Synchronously registers translations from a structured translation file. @keywords translate, file, import */
1455
+ static addSyncByFile(data: TranslateDataFile): void;
1456
+ /** Sets the endpoint URL for translation requests. @keywords translate, url, endpoint */
1457
+ static setUrl(url: string): void;
1458
+ /** Sets the property name used to resolve translations. @keywords translate, property, config */
1459
+ static setPropsName(name: string): void;
1460
+ /** Toggles the API read mode for fetching translations. @keywords translate, api, mode */
1461
+ static setReadApi(value: boolean): void;
1462
+ /** Applies translation service configuration. @keywords translate, config, options */
1463
+ static setConfig(config: TranslateConfig): void;
1464
+ }
1465
+
1466
+ /** Manages translation file loading and resolution based on language and location. @keywords translation, localization, i18n, files, translate */
1467
+ export declare class TranslateFile {
1468
+ /** Creates an instance of TranslateFile. @keywords constructor, init */
1469
+ constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
1470
+ /** Checks if translation files exist for the current location or language. @keywords isFile, check, exists */
1471
+ isFile(): boolean;
1472
+ /** Retrieves the current location identifier. @keywords getLocation, location, path */
1473
+ getLocation(): string;
1474
+ /** Retrieves the current active language code. @keywords getLanguage, language, locale, i18n */
1475
+ getLanguage(): string;
1476
+ /** Loads and returns the translation data list for the current location. @keywords getList, load, translations, async */
1477
+ getList(): Promise<TranslateDataFileList | undefined>;
1478
+ /** Registers additional translation file data sources. @keywords add, register, files */
1479
+ add(data: TranslateDataFile): void;
1480
+ }
1481
+
1482
+ /** Translation management instance for fetching and resolving localized strings. @keywords translate, i18n, localization, locale */
1483
+ export declare class TranslateInstance {
1484
+ /** Initializes a new translation instance with optional endpoint and files. @keywords init, translate */
1485
+ constructor(url?: string, propsName?: string, files?: TranslateFile);
1486
+ /** Fetches translation text asynchronously by code with optional replacements. @keywords get, translate, async */
1487
+ get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
1488
+ /** Gets translation text synchronously by code with optional fallback and replacements. @keywords getSync, translate, sync */
1489
+ getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
1490
+ /** Fetches multiple translations asynchronously by code array. @keywords getList, batch, translate */
1491
+ getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
1492
+ /** Gets multiple translations synchronously by code array. @keywords getListSync, batch, sync */
1493
+ getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
1494
+ /** Adds translation codes to be loaded. @keywords add, load, translations */
1495
+ add(names: string | string[]): Promise<void>;
1496
+ /** Adds translation key-value pairs synchronously. @keywords addSync, register, dictionary */
1497
+ addSync(data: Record<string, string>): void;
1498
+ /** Adds translations via network request or directly depending on runtime environment. @keywords addNormalOrSync, environment */
1499
+ addNormalOrSync(data: Record<string, string>): Promise<void>;
1500
+ /** Adds translations grouped by location synchronously. @keywords addSyncByLocation, locale, location */
1501
+ addSyncByLocation(data: Record<string, Record<string, string>>): void;
1502
+ /** Adds translations synchronously from a file data object. @keywords addSyncByFile, file, import */
1503
+ addSyncByFile(data: TranslateDataFile): void;
1504
+ /** Sets the API URL endpoint for fetching translations. @keywords setUrl, config, endpoint */
1505
+ setUrl(url: string): this;
1506
+ /** Sets the property name used for translation lookups. @keywords setPropsName, property, config */
1507
+ setPropsName(name: string): this;
1508
+ /** Toggles the translation API read mode. @keywords setReadApi, mode, config */
1509
+ setReadApi(value: boolean): this;
1510
+ }
1511
+
1512
+ /** Abstract base class managing URL-based state storage and synchronization. @keywords url, hash, query, state */
1513
+ export declare abstract class UrlInstanceAbstract {
1514
+ /** Retrieves stored URL state value or falls back to a default value or factory. @keywords get, url state, read */
1515
+ get<T>(name: string, defaultValue?: T | (() => T)): T;
1516
+ /** Updates URL state variable with a value or transformation callback. @keywords set, update, url state */
1517
+ set<T>(name: string, callback: T | (() => T)): this;
1518
+ /** Subscribes a listener callback to variable change events. @keywords watch, observe, listener, subscribe */
1519
+ addWatch<T>(name: string, callback: (value: T) => void): this;
1520
+ /** Unsubscribes a listener callback from variable change events. @keywords unwatch, unsubscribe, listener */
1521
+ removeWatch<T>(name: string, callback: (value: T) => void): this;
1522
+ /** Reloads and syncs state variables directly from the current URL. @keywords reload, sync, refresh */
1523
+ reload(): this;
1524
+ }
1525
+
1526
+ /** Isomorphic utility class for URL parsing, manipulation, and query parameter management. @keywords url, parser, query, uri */
1527
+ export declare class UrlItem {
1528
+ /** Returns a request-isolated instance of UrlItem. @keywords singleton, instance, request, isolated */
1529
+ static getInstance(): UrlItem;
1530
+ /** Constructs a new UrlItem instance. @param url URL string or URL object @keywords constructor, create, init */
1531
+ constructor(url?: string | URL);
1532
+ /** Full URL string representation. @keywords href, url, link */
1533
+ get href(): string;
1534
+ /** Protocol scheme including trailing colon. @keywords protocol, scheme, http, https */
1535
+ get protocol(): string;
1536
+ /** Username component of URL credentials. @keywords username, auth, credentials */
1537
+ get username(): string;
1538
+ /** Password component of URL credentials. @keywords password, auth, credentials */
1539
+ get password(): string;
1540
+ /** Host containing hostname and port. @keywords host, domain, port */
1541
+ get host(): string;
1542
+ /** Hostname excluding port number. @keywords hostname, domain */
1543
+ get hostname(): string;
1544
+ /** Port number string. @keywords port, network */
1545
+ get port(): string;
1546
+ /** URL path component starting with slash. @keywords pathname, path, route */
1547
+ get pathname(): string;
1548
+ /** Query string including leading question mark. @keywords search, querystring, query */
1549
+ get search(): string;
1550
+ /** Read-only URLSearchParams query parameters object. @keywords searchParams, query, params */
1551
+ get searchParams(): URLSearchParams;
1552
+ /** Fragment identifier including leading hash sign. @keywords hash, fragment, anchor */
1553
+ get hash(): string;
1554
+ /** Read-only origin of the URL (scheme + host). @keywords origin, domain, base */
1555
+ get origin(): string;
1556
+ /** Checks if the specified query parameter exists. @param name Parameter name @keywords hasParam, query, exists, search */
1557
+ hasParam(name: string): boolean;
1558
+ /** Gets the value of a specific query parameter. @param name Parameter name @keywords getParam, query, parameter */
1559
+ getParam(name: string): string | undefined;
1560
+ /** Returns all query parameters as an object with transformed types. @keywords getParams, query, search, dictionary */
1561
+ getParams(): Record<string, any>;
1562
+ /** Updates the URL value and reinitializes state. @param url URL string or URL instance @keywords set, update, parse */
1563
+ set(url?: string | URL): this;
1564
+ /** Sets or updates the value of a query parameter. @param name Parameter name @param value Parameter value @keywords setParam, query, update */
1565
+ setParam(name: string, value: string): this;
1566
+ /** Replaces all query parameters with the provided key-value object. @param params Key-value parameter object @keywords setParams, query, batch */
1567
+ setParams(params: Record<string, any>): this;
1568
+ /** Deletes a query parameter by name. @param name Parameter name @keywords deleteParam, remove, query */
1569
+ deleteParam(name: string): this;
1570
+ /** Serializes the URL instance to its full string representation. @keywords toString, serialize, string */
1571
+ toString(): string;
1572
+ /** Serializes the URL instance to a JSON string representation. @keywords toJSON, serialize, json */
1573
+ toJSON(): string;
1574
+ }
1575
+
1576
+ /** Wraps matched search substrings with an HTML highlight tag. @keywords highlight match search replace tag html */
1577
+ export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
1578
+
1579
+ /** Converts any value to a string with optional array formatting and trimming. @keywords anyToString, stringify, to string, convert, cast */
1580
+ export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
1581
+
1582
+ /** Replaces template placeholder keys in square or curly brackets with values from a replacement object or array. @keywords template, string interpolation, placeholder, replace */
1583
+ export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
1584
+
1585
+ /** Creates an array of specified length filled with the given value. @keywords array, fill, repeat, populate, initialize */
1586
+ export declare function arrFill<T>(value: T, count: number): T[];
1587
+
1588
+ /** Converts a Blob to a Base64 string, optionally stripping the data URL prefix. @param clean If true, removes the data URL prefix. @keywords blob, base64, encode, convert */
1589
+ export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
1590
+
1591
+ /** Capitalizes the first letter of a string. @keywords capitalize, uppercase, first letter, string */
1592
+ export declare function capitalize(value: string, isLocale?: boolean): string;
1593
+
1594
+ /** Creates a deep copy of an object to prevent unwanted mutations. @keywords deep copy, clone, duplicate */
1595
+ export declare function copyObject<T>(value: T): T;
1596
+
1597
+ /** Copies a simple object with optional additional source properties. @keywords copy, clone, shallow copy, object clone */
1598
+ export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
1599
+
1600
+ /**
1601
+ * Creates an HTML element, applies properties or a setup callback, and inserts it into the DOM.
1602
+ * @remarks Returns `undefined` during SSR. Call within client-only lifecycle hooks (e.g., `onMounted`, `useEffect`) to prevent hydration mismatches.
1603
+ * @keywords createElement, create dom element, html node, ssr safe
1604
+ */
1605
+ export declare function createElement<T extends HTMLElement>(parentElement?: HTMLElement, tagName?: string, options?: Partial<T> | Record<keyof T, T[keyof T]> | ((element: T) => void), referenceElement?: HTMLElement): T | undefined;
1606
+
1607
+ /** Executes a callback when the DOM is ready or immediately if already loaded. @keywords dom, ready, domcontentloaded, lifecycle, event */
1608
+ export declare function domContentLoaded<T = void>(callback: () => T | Promise<T>): Promise<T>;
1609
+
1610
+ /** Selects the first element matching specified CSS selectors. @keywords dom, querySelector, element, find, select */
1611
+ export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
1612
+
1613
+ /** Selects all elements matching the specified selectors. @keywords dom, querySelectorAll, query, selector, elements */
1614
+ export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
1615
+
1616
+ /** Encodes special characters in a string for safe use in HTML attributes. @keywords html attribute encode escape sanitize */
1617
+ export declare function encodeAttribute(text: string): string;
1618
+
1619
+ /** Encodes special characters in a string for safe use in HTML attributes. @keywords html attribute encode sanitize escape */
1620
+ export declare function encodeLiteAttribute(text: string): string;
1621
+
1622
+ /** Resizes an image if it exceeds the maximum size, returning base64 data. @keywords image resize compress max-size base64 */
1623
+ export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
1624
+
1625
+ /** Escapes special regex characters in a string for safe use in a RegExp. @keywords regex, escape, sanitize, regexp */
1626
+ export declare function escapeExp(value: string): string;
1627
+
1628
+ /** Prevents further propagation of the given event in the DOM. @keywords event, stopPropagation, prevent bubbling */
1629
+ export declare function eventStopPropagation(event: Event): void;
1630
+
1631
+ /** Executes callback with args if it is a function, otherwise returns value as is. @keywords execute, invoke, call, callback, function, resolve */
1632
+ export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
1633
+
1634
+ /** Safely executes a sync/async function or resolves a static value in a Promise with provided arguments. @keywords execute, promise, async, runner, callback */
1635
+ export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
1636
+
1637
+ /** Iterates over items in an array, record, Map, or Set, executing a callback and returning an array of results. @keywords forEach, iterate, map, loop, collection, transform */
1638
+ export declare function forEach<T, R, D extends T[] | Record<string, T> | Map<string, T> | Set<T> = T[] | Record<string, T> | Map<string, T> | Set<T>, K = D extends T[] ? number : string>(data: D & (T[] | Record<string, T> | Map<string, T> | Set<T>), callback: (item: T, key: K, dataMain: typeof data) => R, saveUndefined?: boolean): R[];
1639
+
1640
+ /** Cyclically executes a callback via requestAnimationFrame while next returns true, then calls end. @keywords animation, requestAnimationFrame, raf loop, frame */
1641
+ export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
1642
+
1643
+ /** Splits a string into segments to highlight search matches. @keywords highlight, match, search, split, text */
1644
+ export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
1645
+
1646
+ /** Retrieves all attributes from the specified DOM element as a key-value map. @keywords get attributes, element attributes, dom attributes */
1647
+ export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
1648
+
1649
+ /** Retrieves text data from a clipboard event or the clipboard. @keywords clipboard, paste, copy, read text */
1650
+ export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
1651
+
1652
+ /** Extracts an array of values for a specific property or column from an array of objects. @keywords column, pluck, extract, values, property */
1653
+ export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
1654
+
1655
+ /**
1656
+ * Returns the current date in the specified format.
1657
+ * @remarks Using for SSR rendering may lead to hydration mismatches due to timezone differences. Use within client-side hooks.
1658
+ * @keywords current date, today, now, format, ssr
1659
+ */
1660
+ export declare function getCurrentDate(format?: GeoDate): string;
1661
+
1662
+ /**
1663
+ * Returns the current time in milliseconds.
1664
+ * @remarks Warning (SSR): Using this function during SSR rendering can cause hydration mismatches due to server/client timestamp differences.
1665
+ * @keywords current time, timestamp, now, milliseconds, epoch
1666
+ */
1667
+ export declare function getCurrentTime(): number;
1668
+
1669
+ /** Returns the first Element matching the specified selector or the element itself. @keywords getElement, querySelector, dom, selector */
1670
+ export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
1671
+
1672
+ /** Returns the element ID or generates a new unique ID if missing. @keywords element id, generate id, get id, dom id */
1673
+ export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
1674
+ /**
1675
+ * Initializes the element ID generator listener for SSR context synchronization.
1676
+ * @warning Initialization is mandatory for correct functioning of SSR on both server and client sides.
1677
+ * @example
1678
+ * ```typescript
1679
+ * import { useId } from 'vue'
1680
+ * import { initGetElementId } from '@dxtmisha/functional-basic'
1681
+ *
1682
+ * initGetElementId(() => useId())
1683
+ * ```
1684
+ * @keywords init id, ssr id listener, setup getElementId
1685
+ */
1686
+ export declare function initGetElementId(newListener: () => string | number): void;
1687
+
1688
+ /** Resolves an HTMLImageElement from an image element or source URL string. @keywords image, html image, img element, source */
1689
+ export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
1690
+
1691
+ /** Retrieves an element property value by key with an optional fallback. @keywords element, get, property, item, value */
1692
+ export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
1693
+
1694
+ /** Returns the window or DOM element matching a selector or element reference. @keywords get element, window, dom selector, element or window */
1695
+ export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
1696
+
1697
+ /** Generates a safe script tag for data hydration. @keywords safe script tag, data hydration, html script */
1698
+ export declare function getElementSafeScript(id: string, data: any): string;
1699
+
1700
+ /** Creates a case-insensitive regular expression for an exact match of a phrase without anchors. @keywords regex, regular expression, exact match, search pattern */
1701
+ export declare function getExactSearchExp(search: string): RegExp;
1702
+
1703
+ /** Creates a RegExp object substituting :value in the pattern with the provided value. @keywords regex regexp pattern match getExp */
1704
+ export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
1705
+
1706
+ /** Returns the first element of an array, object, or single value. @keywords first, head, initial, array, object */
1707
+ export declare function getFirst<T>(value: T | T[] | Record<string, T>): T | undefined;
1708
+
1709
+ /** Retrieves and parses JSON hydration data from a DOM script element. @keywords hydration, json, script tag, dom, parse, ssr */
1710
+ export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
1711
+
1712
+ /** Returns the source URL string from an HTMLImageElement or string. @keywords image, src, url, source, element */
1713
+ export declare function getImageSrc(image?: HTMLImageElement | string): string;
1714
+
1715
+ /** Retrieves a nested value from an object by its path. @keywords get, path, nested, object, property */
1716
+ export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
1717
+
1718
+ /** Returns the pressed key from a keyboard event. @keywords keyboard, key, event, pressed key */
1719
+ export declare function getKey(event: KeyboardEvent): string | number | undefined;
1720
+
1721
+ /** Returns the last element of an array or object. @keywords last, tail, array, object */
1722
+ export declare function getLast<T>(value: T | T[] | Record<string, T>): T | undefined;
1723
+
1724
+ /** Returns the length or size of an Array, Object, Map, Set, or String, returning 0 for unsupported or nullish types. @keywords length, size, count, array, object, map, set, string */
1725
+ export declare function getLength(value: any): number;
1726
+
1727
+ /** Returns the lengths of all string elements in an array or object. @keywords length, count, elements, array, string length */
1728
+ export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
1729
+
1730
+ /** Finds the length of the longest string in an array or object. @keywords max length, longest string, array, object */
1731
+ export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
1732
+
1733
+ /** Returns the length of the shortest string in an array or object. @keywords shortest string, min length, minimum string length */
1734
+ export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
1735
+
1736
+ /** Retrieves the position of the mouse cursor or touch point from an event. @keywords mouse touch coordinates client position cursor */
1737
+ export declare function getMouseClient(event: MouseEvent | TouchEvent): ImageCoordinator;
1738
+
1739
+ /** Returns the mouse cursor or touch clientX coordinate. @keywords mouse, touch, clientX, cursor position, coordinates */
1740
+ export declare function getMouseClientX(event: MouseEvent | TouchEvent): number;
1741
+
1742
+ /** Returns the vertical client coordinate (Y) of a mouse or touch event. @keywords mouse, touch, clientY, cursor position, Y coordinate */
1743
+ export declare function getMouseClientY(event: MouseEvent | TouchEvent): number;
1744
+
1745
+ /** Creates a new object containing only the specified keys from the source object. @keywords pick, filter keys, subset, extract properties */
1746
+ export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
1747
+
1748
+ /** Removes all properties matching an exception value from an object. @keywords object filter remove undefined clean */
1749
+ export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
1750
+
1751
+ /** Returns the object if its values are defined, otherwise an empty object. @keywords object fallback default getObjectOrNone */
1752
+ export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
1753
+
1754
+ /** Strips special characters, returning only alphanumeric characters and spaces. @keywords sanitize, clean, alphanumeric, strip, text */
1755
+ export declare function getOnlyText(text: any): string;
1756
+
1757
+ /** Returns a random element from an array, object, or value, or undefined if empty. @keywords random, item, sample, choice, array, object */
1758
+ export declare function getRandomItem<T>(value?: T | T[] | Record<string, T>): T | undefined;
1759
+
1760
+ /** Generates random text with configurable word count and word length constraints. @keywords random text generator words string placeholder */
1761
+ export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
1762
+
1763
+ /** Serializes an object or array into a delimited key-value query string. @keywords serialize, query string, key-value, url params */
1764
+ export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
1765
+
1766
+ /** Builds a case-insensitive RegExp matching strings containing all space-separated search words in any order. @keywords regex, search, multi-word, lookahead, filter, match */
1767
+ export declare function getSearchExp(search: string, limit?: number): RegExp;
1768
+
1769
+ /** Creates a case-insensitive regular expression for space-separated word search. @keywords regex, search, pattern, word matching */
1770
+ export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
1771
+
1772
+ /** Calculates the step value as a percentage within a min-max range. @keywords step, percent, range, slider, scale */
1773
+ export declare function getStepPercent(min: number | undefined, max: number): number;
1774
+
1775
+ /** Calculates the step value unit relative to the given min and max range. @keywords step, step value, range, interval */
1776
+ export declare function getStepValue(min: number | undefined, max: number): number;
1777
+
1778
+ /** Scrolls a container element to a target element with optional centering. @keywords scroll, scroll-to, element, center */
1779
+ export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
1780
+
1781
+ /** Smoothly scrolls the viewport to the specified HTML element with an optional offset. @keywords scroll, smooth, scrollIntoView, viewport, offset */
1782
+ export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
1783
+
1784
+ /** Scrolls the container to make the target element visible. @keywords scroll, scrollTo, scrollIntoView, dom */
1785
+ export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
1786
+
1787
+ /** Invokes the native sharing mechanism via the Web Share API. @keywords share, web share api, navigator share, device share */
1788
+ export declare function handleShare(data: ShareData): Promise<boolean>;
1789
+
1790
+ /** Checks if a value exists within the specified array. @keywords inArray, array, includes, contains, search */
1791
+ export declare function inArray<T>(array: T[], value: T): boolean;
1792
+
1793
+ /** Initializes data for scrollbar offset and scroll control. @keywords scrollbar, offset, scroll control, initialize */
1794
+ export declare function initScrollbarOffset(): Promise<void>;
1795
+
1796
+ /** Computes the key-based intersection between two objects. @keywords intersect, intersection, key comparison, object keys */
1797
+ export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
1798
+
1799
+ /** Checks if an API response is successful. @keywords api, response, success, check, validate */
1800
+ export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
1801
+
1802
+ /** Checks if a value is an array. @keywords isArray, array, type guard, validation */
1803
+ export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
1804
+
1805
+ /** Checks if the values of two objects are different. @keywords compare, difference, object, equality */
1806
+ export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
1807
+
1808
+ /** Checks if the current environment is a data URL. @keywords isDomData, dom, data url, environment */
1809
+ export declare function isDomData(): boolean;
1810
+
1811
+ /** Checks if the code is running in a DOM / browser environment where the `window` object is available. @keywords dom runtime browser window environment check */
1812
+ export declare function isDomRuntime(): boolean;
1813
+
1814
+ /** Checks if an element is visible in the DOM and not hidden by CSS (can be off-screen). @keywords element, dom, visible, visibility, is-visible, display, css */
1815
+ export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
1816
+
1817
+ /** Checks if the pressed key is Enter or Space. @keywords enter, space, keydown, keyboard event, key check */
1818
+ export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
1819
+
1820
+ /** Checks if a value is filled and not empty. @param zeroTrue Treats 0 or '0' as filled if true @keywords isFilled, filled, empty check, validation, presence */
1821
+ export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
1822
+
1823
+ /** Checks if the value is an integer or floating-point number. @keywords isFloat, float, number, numeric, check */
1824
+ export declare function isFloat(value: any): boolean;
1825
+
1826
+ /** Checks if the value is a callable function. @keywords isFunction, callback, function, type guard, callable */
1827
+ export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
1828
+
1829
+ /** Checks if an element or selector is attached to the DOM tree. @keywords dom, attached, is connected, element in dom, is in document */
1830
+ export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
1831
+
1832
+ /** Checks if the element is an input field or editable. @keywords isInput, input, textarea, editable, form */
1833
+ export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
1834
+
1835
+ /** Checks if a value is between integers relative to a rounding step. @keywords isIntegerBetween, integer, between, range, bounds */
1836
+ export declare function isIntegerBetween(value: number, between: number): boolean;
1837
+
1838
+ /** Checks if a keyboard event has active modifier or meta keys pressed. @keywords keyboard, event, modifier, meta, ctrl, alt, shift, cmd */
1839
+ export declare const isMetaKey: (event: KeyboardEvent) => boolean;
1840
+
1841
+ /** Checks if a value is null or undefined. @keywords isNull, isNil, null, undefined, check */
1842
+ export declare function isNull<T>(value: T): value is Extract<T, Undefined>;
1843
+
1844
+ /** Checks if the value is a number. @keywords isNumber, number, numeric, check, type guard */
1845
+ export declare function isNumber(value: any): value is number;
1846
+
1847
+ /** Checks if a value is an object. @keywords isObject, object check, type guard, validation */
1848
+ export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
1849
+
1850
+ /** Checks if the value is an object and not an array. @keywords isObjectNotArray, is object, not array, type guard */
1851
+ export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
1852
+
1853
+ /** Check if the device is currently online. @keywords online, network, connectivity, internet */
1854
+ export declare function isOnLine(): boolean;
1855
+
1856
+ /** Checks if a value matches or is included within the selected value or array. @keywords is selected, check selected, match selection, contains */
1857
+ export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
1858
+
1859
+ /** Checks if all items in a list are present in the selected values. @keywords isSelectedByList, selection, contains all, match list */
1860
+ export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
1861
+
1862
+ /** Checks if the Web Share API is supported in the current environment. @keywords web share, navigator.share, share api, support check */
1863
+ export declare function isShare(): boolean;
1864
+
1865
+ /** Checks if a value is of type string. @keywords isString, string, type guard, validation */
1866
+ export declare function isString<T>(value: T): value is Extract<T, string>;
1867
+
1868
+ /** Checks if the pressed key in a keyboard event is Tab. @keywords keyboard event, tab key, keydown, keypress */
1869
+ export declare const isTab: (event: KeyboardEvent) => boolean;
1870
+
1871
+ /** Checks if the given object is a Window instance. @keywords window, isWindow, dom, type guard */
1872
+ export declare function isWindow<E>(element: E): element is Extract<E, Window>;
1873
+
1874
+ /** Generates a random integer within a specified range. @keywords random integer number math range */
1875
+ export declare function random(min: number, max: number): number;
1876
+
1877
+ /** Removes the common prefix from the main string. @keywords string, prefix, remove, strip, trim */
1878
+ export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
1879
+
1880
+ /** Replaces the component name in the text with a new component name. @keywords replace component name, rename, string replace */
1881
+ export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
1882
+
1883
+ /** Recursively replaces or merges elements of objects or arrays into the target. @keywords replace recursive, merge recursive, deep merge, object replace */
1884
+ export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
1885
+
1886
+ /** Replaces placeholders in a template string with values or function returns from a map. @keywords replace template placeholder interpolation substitute */
1887
+ export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
1888
+
1889
+ /** Asynchronously resizes an image to fit within maximum dimension constraints. @keywords resize, image, scale, canvas, thumbnail, base64 */
1890
+ export declare function resizeImage(image: HTMLImageElement | string, maxSize?: number, typeData?: string): Promise<string>;
1891
+
1892
+ type ResizeImageByMaxType = 'auto' | 'width' | 'height';
1893
+ /** Resizes an image to fit within a maximum dimension constraint. @keywords image, resize, scale, dimension, max-size */
1894
+ export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;
1895
+
1896
+ /** Converts seconds into a formatted time string (e.g. HH:MM:SS or MM:SS). @keywords time, format, seconds, duration, timestamp, clock */
1897
+ export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
1898
+
1899
+ /** Sets or updates a property value on a DOM element or window. @keywords set element item, update property, dom mutate */
1900
+ export declare function setElementItem<E extends ElementOrWindow, K extends keyof E, V extends E[K] = E[K]>(element: ElementOrString<E>, index: K, value: V | Record<string, V>): E | undefined;
1901
+
1902
+ /** Modifies and updates values according to type and configuration settings. @keywords set values, update selection, multiple, maxlength */
1903
+ export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
1904
+ multiple?: boolean | undefined;
1905
+ maxlength?: number | undefined;
1906
+ alwaysChange?: boolean | undefined;
1907
+ notEmpty?: boolean | undefined;
1908
+ }): T | T[] | undefined;
1909
+
1910
+ /** Pauses execution for the specified number of milliseconds. @keywords sleep, delay, wait, pause, timeout */
1911
+ export declare function sleep(ms: number): Promise<void>;
1912
+
1913
+ /** Sorts an array of items by column sorting specifications or a custom comparison function. @keywords sort, order, multi-column, comparator */
1914
+ export declare function sortList<T = any>(list: T[], sortColumns: SortColumnItem[], customSort?: SortFunction<T>): T[];
1915
+
1916
+ /** Copies enumerable own properties from a source to a target object according to priority list. @keywords splice, copy, assign, merge, object */
1917
+ export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
1918
+
1919
+ /** Creates a string of the specified length filled with the given character. @keywords string fill repeat pad */
1920
+ export declare function strFill(value: string, count: number): string;
1921
+
1922
+ /** Splits a string by separator, placing the remainder in the last element if limit is set. @keywords string, split, separator, limit */
1923
+ export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
1924
+
1925
+ /** Converts a value to an array, returning it as is if already an array or wrapping it in an array. @keywords toArray, cast array, wrap array, normalize array */
1926
+ export declare function toArray<T>(value: T): T extends any[] ? T : [T];
1927
+
1928
+ /** Converts a string to upper camel case (PascalCase). @keywords camelCase, pascalCase, string conversion, casing */
1929
+ export declare function toCamelCase(value: string): string;
1930
+
1931
+ /** Converts a string to PascalCase (CamelCase with capitalized first letter). @keywords camelCase pascalCase string transform format */
1932
+ export declare function toCamelCaseFirst(value: string): string;
1933
+
1934
+ /** Converts a Date, timestamp, or date string into a Date object. @keywords date, parse date, to date, convert date */
1935
+ export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
1936
+
1937
+ /** Converts a string to kebab-case format by lowercasing letters and replacing delimiters with hyphens. @keywords kebab-case, slugify, string, transform, dashes */
1938
+ export declare function toKebabCase(value: string): string;
1939
+
1940
+ /**
1941
+ * Converts a string or number to a finite floating-point number, handling various separators and stripping non-numeric characters.
1942
+ * @keywords toNumber, parse float, string to number, sanitize number, numeric conversion
1943
+ * @example
1944
+ * toNumber("1 234,56") // 1234.56
1945
+ * toNumber("1,234.56") // 1234.56
1946
+ * toNumber("1,234") // 1.234
1947
+ */
1948
+ export declare function toNumber(value?: NumberOrString): number;
1949
+
1950
+ /** Converts a value to a number clamped to a maximum allowed value, with optional locale formatting. @keywords toNumberByMax, clamp, max, number conversion, formatting */
1951
+ export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
1952
+
1953
+ /** Converts a value to a positive finite number (> 0), or returns a default fallback value. @keywords positive number, parse number, finite number, toNumberPositive */
1954
+ export declare function toNumberPositive(value?: number | string | null, defaultValue?: number): number;
1955
+
1956
+ /** Converts a value to a percentage relative to a maximum value. @keywords percentage, percent, ratio, calculate, convert */
1957
+ export declare function toPercent(maxValue: number, value: number): number;
1958
+
1959
+ /** Converts a value to a percentage scaled by 100 relative to a maximum value. @keywords percent, percentage, ratio, scale, math */
1960
+ export declare function toPercentBy100(maxValue: number, value: number): number;
1961
+
1962
+ /** Converts a value to a string, returning an empty string for null or undefined. @keywords stringify, convert, format, serialize */
1963
+ export declare function toString<T>(value: T): string;
1964
+
1965
+ /** Transforms a string into its corresponding data type (`undefined`, `null`, boolean, object, number, or function). @keywords transform parse convert cast deserialize @param isFunction Flag to check for function in global window object */
1966
+ export declare function transformation(value: any, isFunction?: boolean): any;
1967
+
1968
+ /** Converts a Uint8Array to a base64-encoded string. @keywords base64, uint8array, encode, binary, string */
1969
+ export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
1970
+
1971
+ /** Removes duplicate elements from an array. @keywords unique, deduplicate, distinct, array, filter */
1972
+ export declare function uniqueArray<T>(value: T[]): T[];
1973
+
1974
+ /** Writes text data to the system clipboard. @keywords clipboard, copy, write, buffer */
1975
+ export declare function writeClipboardData(text: string): Promise<void>;
1976
+
1977
+ /** Default list of predefined error causes and messages for ErrorCenter. @keywords error_causes error_list error_center */
1978
+ export declare const errorCauseList: ErrorCenterCauseList;
1979
+
1980
+ /** HTTP methods for API requests @keywords http method get post put patch delete */
1981
+ export declare enum ApiMethodItem {
1982
+ delete = "DELETE",
1983
+ get = "GET",
1984
+ post = "POST",
1985
+ put = "PUT",
1986
+ patch = "PATCH"
1987
+ }
1988
+ /** Cached API response entry @keywords cache store item */
1989
+ export type ApiCacheItem<T = any> = {
1990
+ value: T;
1991
+ age?: number;
1992
+ cacheAge: number;
1993
+ };
1994
+ export type ApiCacheList = Record<string, ApiCacheItem>;
1995
+ /** Global API client configuration options @keywords api config options fetch */
1996
+ export type ApiConfig = {
1997
+ urlRoot?: string;
1998
+ origin?: string;
1999
+ headers?: ApiHeadersValue;
2000
+ requestDefault?: ApiDefaultValue;
2001
+ preparation?: (apiFetch: ApiFetch) => Promise<void>;
2002
+ end?: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>;
2003
+ timeout?: number;
2004
+ devMode?: boolean;
2005
+ wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
2006
+ };
2007
+ export type ApiData<T = any> = T extends any[] ? T : ApiDataItem<T>;
2008
+ /** API response validation result structure @keywords validation response status */
2009
+ export type ApiDataValidation = {
2010
+ status?: ApiStatusType;
2011
+ code?: string | number;
2012
+ message?: string;
2013
+ error?: {
2014
+ code?: string | number;
2015
+ message?: string;
2016
+ };
2017
+ };
2018
+ /** API response payload and metadata wrapper @keywords response payload data */
2019
+ export type ApiDataItem<T = any> = T & ApiDataValidation & {
2020
+ data?: T;
2021
+ success?: boolean;
2022
+ statusObject?: ApiStatusItem;
2023
+ errorObject?: ApiErrorItem;
2024
+ };
2025
+ export type ApiHeadersValue = Record<string, string> | (() => Record<string, string>);
2026
+ export type ApiDefaultValue = Record<string, any> | (() => Record<string, any>);
2027
+ /** API request execution options and parameters @keywords fetch request options query */
2028
+ export type ApiFetch = {
2029
+ api?: boolean;
2030
+ path?: string;
2031
+ pathFull?: string;
2032
+ method?: ApiMethod;
2033
+ request?: FormData | Record<string, any> | string;
2034
+ auth?: boolean;
2035
+ headers?: Record<string, string> | null;
2036
+ type?: string;
2037
+ toData?: boolean;
2038
+ global?: boolean;
2039
+ devMode?: boolean;
2040
+ hideError?: boolean;
2041
+ hideLoading?: boolean;
2042
+ retry?: number;
2043
+ retryDelay?: number;
2044
+ queryReturn?: (query: Response) => Promise<any | ApiDataValidation>;
2045
+ globalPreparation?: boolean;
2046
+ globalEnd?: boolean;
2047
+ init?: RequestInit;
2048
+ initError?: boolean;
2049
+ timeout?: number;
2050
+ controller?: AbortController;
2051
+ cache?: number;
2052
+ enableClientCache?: boolean;
2053
+ cacheId?: number | string;
2054
+ endResetLimit?: number;
2055
+ wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
2056
+ };
2057
+ /** Preloaded hydration data for API response matching @keywords hydration preload ssr */
2058
+ export type ApiHydrationItem = {
2059
+ path: string;
2060
+ method: ApiMethod;
2061
+ request?: ApiFetch['request'];
2062
+ response: any;
2063
+ };
2064
+ export type ApiHydrationList = ApiHydrationItem[];
2065
+ /** API error mapping and interception configuration @keywords error storage interceptor */
2066
+ export type ApiErrorStorageItem = Record<string, any> & {
2067
+ url: string | RegExp;
2068
+ method: ApiMethodItem;
2069
+ code?: string;
2070
+ status?: number;
2071
+ validation?: (response: Response) => boolean;
2072
+ message?: string | ((response?: Response) => string);
2073
+ };
2074
+ export type ApiErrorStorageList = ApiErrorStorageItem[];
2075
+ export type ApiMethod = string | ApiMethodItem;
2076
+ /** Global preparation and teardown hook execution result @keywords hook lifecycle reset */
2077
+ export type ApiPreparationEnd = {
2078
+ reset?: boolean;
2079
+ data?: any;
2080
+ };
2081
+ /** Mock API response descriptor and matching rules @keywords mock response stub */
2082
+ export type ApiResponseItem = {
2083
+ path: string | RegExp;
2084
+ method: ApiMethod;
2085
+ request?: ApiFetch['request'] | '*any';
2086
+ response: any | ((request?: ApiFetch['request']) => any);
2087
+ disable?: any;
2088
+ isForGlobal?: boolean;
2089
+ lag?: any;
2090
+ };
2091
+ /** API request status and error tracking descriptor @keywords status tracker state */
2092
+ export type ApiStatusItem = {
2093
+ status?: number;
2094
+ statusText?: string;
2095
+ error?: string;
2096
+ lastResponse?: any;
2097
+ lastStatus?: ApiStatusType;
2098
+ lastCode?: string;
2099
+ lastMessage?: string;
2100
+ };
2101
+ export type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
2102
+
2103
+ export type Undefined = undefined | null;
2104
+ /** Union of nullish, falsy values and their string representations. @keywords empty, falsy, nullish */
2105
+ export type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';
2106
+ export type NumberOrString = number | string;
2107
+ export type NumberOrStringOrBoolean = number | string | boolean;
2108
+ export type NumberOrStringOrDate = NumberOrString | Date;
2109
+ export type NormalOrArray<T = NumberOrString> = T | T[];
2110
+ export type NormalOrPromise<T> = T | Promise<T>;
2111
+ export type ObjectItem<T = any> = Record<string, T>;
2112
+ export type ObjectOrArray<T = any> = T[] | ObjectItem<T>;
2113
+ /** Extracts item type from an array or returns the type itself. @keywords array, item, unwrap */
2114
+ export type ArrayToItem<T> = T extends any[] ? T[number] : T;
2115
+ export type FunctionReturn<R = any> = () => R;
2116
+ export type FunctionVoid = () => void;
2117
+ export type FunctionArgs<T, R> = (...args: T[]) => R;
2118
+ export type FunctionAnyType<T = any, R = any> = (...args: T[]) => R;
2119
+ export type ItemList<T = any> = Record<string, T>;
2120
+ export type Item<V> = {
2121
+ index: string;
2122
+ value: V;
2123
+ };
2124
+ export type ItemValue<V> = {
2125
+ label: string;
2126
+ value: V;
2127
+ };
2128
+ export type ItemName<V> = {
2129
+ name: string | number;
2130
+ value: V;
2131
+ };
2132
+ export type ElementOrWindow = HTMLElement | Window;
2133
+ export type ElementOrString<E extends ElementOrWindow> = E | string;
2134
+ export type EventOptions = AddEventListenerOptions | boolean | undefined;
2135
+ /** Event listener callback with optional detail payload. @keywords event, listener, detail */
2136
+ export type EventListenerDetail<O extends Event, D extends Record<string, any>> = (event: O, detail?: D) => void;
2137
+ /** Tracks active DOM event listeners and ResizeObservers. @keywords event, listener, observer, activity */
2138
+ export type EventActivityItem<E extends ElementOrWindow> = {
2139
+ element: E | undefined;
2140
+ type: string;
2141
+ listener?: (event: any | Event) => void;
2142
+ observer?: ResizeObserver;
2143
+ };
2144
+ export type ImageCoordinator = {
2145
+ x: number;
2146
+ y: number;
2147
+ };
2148
+
2149
+ export type ErrorCenterGroup = string | undefined;
2150
+
2151
+ /** Error item descriptor with metadata and custom payload details. @keywords error cause item */
2152
+ export type ErrorCenterCauseItem<D = any> = {
2153
+ group?: ErrorCenterGroup;
2154
+ code: string;
2155
+ priority?: number;
2156
+ label?: string;
2157
+ message?: string;
2158
+ details?: D;
2159
+ };
2160
+
2161
+ export type ErrorCenterCauseList = ErrorCenterCauseItem[];
2162
+
2163
+ /** Callback function for processing error items. @keywords error handler callback */
2164
+ export type ErrorCenterHandlerCallback = (cause: ErrorCenterCauseItem) => void;
2165
+
2166
+ /** Error handler registration entry mapped to an optional error group. @keywords error handler item */
2167
+ export type ErrorCenterHandlerItem = {
2168
+ group?: ErrorCenterGroup;
2169
+ handlers: ErrorCenterHandlerCallback[];
2170
+ };
2171
+
2172
+ export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
2173
+
2174
+ /** Predicate determining whether an error should be logged to the console. @keywords error console filter */
2175
+ export type ErrorCenterHandlerIsConsoleCallback = (cause: ErrorCenterCauseItem) => boolean;
2176
+
2177
+ /** Console logging configuration flag or dynamic predicate. @keywords error console logging */
2178
+ export type ErrorCenterHandlerIsConsole = boolean | ErrorCenterHandlerIsConsoleCallback;
2179
+
2180
+ /** Supported formatter types. @keywords formatter, types, formatting */
2181
+ export declare enum FormattersType {
2182
+ currency = "currency",
2183
+ date = "date",
2184
+ name = "name",
2185
+ number = "number",
2186
+ plural = "plural",
2187
+ unit = "unit"
2188
+ }
2189
+ export type FormattersOptionsCurrency = {
2190
+ currencyPropName?: string;
2191
+ options?: string | Intl.NumberFormatOptions;
2192
+ numberOnly?: boolean;
2193
+ };
2194
+ export type FormattersOptionsDate = {
2195
+ type?: GeoDate;
2196
+ options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions;
2197
+ hour24?: boolean;
2198
+ };
2199
+ export type FormattersOptionsName = {
2200
+ lastPropName?: string;
2201
+ firstPropName?: string;
2202
+ surname?: string;
2203
+ short?: boolean;
2204
+ };
2205
+ export type FormattersOptionsNumber = {
2206
+ options?: Intl.NumberFormatOptions;
2207
+ };
2208
+ export type FormattersOptionsPlural = {
2209
+ words: string;
2210
+ options?: Intl.PluralRulesOptions;
2211
+ optionsNumber?: Intl.NumberFormatOptions;
2212
+ };
2213
+ export type FormattersOptionsUnit = {
2214
+ unit: string | Intl.NumberFormatOptions;
2215
+ };
2216
+ /** Resolves option configuration type based on formatter type. @keywords options, type mapping */
2217
+ export type FormattersOptionsInformation<Type extends FormattersType> = Type extends FormattersType.currency ? FormattersOptionsCurrency : Type extends FormattersType.date ? FormattersOptionsDate : Type extends FormattersType.name ? FormattersOptionsName : Type extends FormattersType.number ? FormattersOptionsNumber : Type extends FormattersType.plural ? FormattersOptionsPlural : Type extends FormattersType.unit ? FormattersOptionsUnit : Record<string, any>;
2218
+ /** Single property formatter configuration. @keywords formatter, item, configuration */
2219
+ export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = {
2220
+ type?: Type;
2221
+ transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R;
2222
+ options?: FormattersOptionsInformation<Type>;
2223
+ };
2224
+ export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
2225
+ export type FormattersListItem = Record<string, any>;
2226
+ export type FormattersList<Item extends FormattersListItem> = Item[];
2227
+ /** Capitalizes dot-notated property paths into camelCase. @keywords capitalize, path, utility */
2228
+ export type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
2229
+ export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
2230
+ export type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
2231
+ /** Appends formatted string properties to an item type. @keywords data item, format */
2232
+ export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = {
2233
+ [K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string;
2234
+ };
2235
+ export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
2236
+ export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
2237
+ export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
2238
+ export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
2239
+ export type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
2240
+ /** Resulting formatted list or item preserving input collection shape. @keywords return type, formatters */
2241
+ export type FormattersReturn<List extends FormattersListProp, Options extends FormattersOptionsList = FormattersOptionsList, Item extends FormattersItemProp<List> = FormattersItemProp<List>> = List extends any[] ? FormattersListColumns<Item, Options> : (FormattersListColumnItem<Item, Options> | undefined);
2242
+
2243
+ export type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
2244
+ export type GeoFirstDay = 1 | 6 | 0;
2245
+ export type GeoHours = '12' | '24';
2246
+ export type GeoTimeZoneStyle = 'minute' | 'hour' | 'ISO8601' | 'RFC';
2247
+
2248
+ /** Geographic configuration item containing country, language, and locale formatting rules @keywords geo, locale, country, language */
2249
+ export interface GeoItem {
2250
+ country: string;
2251
+ countryAlternative?: string[];
2252
+ language: string;
2253
+ languageAlternative?: string[];
2254
+ firstDay?: string | null;
2255
+ zone?: string | null;
2256
+ phoneCode?: string;
2257
+ phoneWithin?: string;
2258
+ phoneMask?: string | string[];
2259
+ nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
2260
+ unit?: {
2261
+ 'millimeter'?: string;
2262
+ 'centimeter'?: string;
2263
+ 'meter'?: string;
2264
+ 'kilometer'?: string;
2265
+ 'square-meter'?: string;
2266
+ 'hectare'?: string;
2267
+ 'gram'?: string;
2268
+ 'kilogram'?: string;
2269
+ 'tonne'?: string;
2270
+ 'milliliter'?: string;
2271
+ 'liter'?: string;
2272
+ 'celsius'?: string;
2273
+ 'kilometer-per-hour'?: string;
2274
+ };
2275
+ }
2276
+
2277
+ /** Extended geographic item with resolved required locale fields @keywords geo, locale, full */
2278
+ export interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
2279
+ standard: string;
2280
+ firstDay: string;
2281
+ location: string;
2282
+ locationCountry: string;
2283
+ locationLanguage: string;
2284
+ }
2285
+
2286
+ /** Geographic flag and country display metadata @keywords flag, country, language */
2287
+ export interface GeoFlagItem {
2288
+ language: string;
2289
+ languageCode: string;
2290
+ country: string;
2291
+ countryCode: string;
2292
+ standard: string;
2293
+ icon?: string;
2294
+ label: string;
2295
+ value: string;
2296
+ phoneCode?: string;
2297
+ }
2298
+
2299
+ /** Geographic flag item with localized native language descriptions @keywords flag, national, localized */
2300
+ export interface GeoFlagNational extends GeoFlagItem {
2301
+ description: string;
2302
+ nationalLanguage: string;
2303
+ nationalCountry: string;
2304
+ }
2305
+
2306
+ /** Country phone prefix and mask pattern metadata @keywords phone, mask, countryCode */
2307
+ export interface GeoPhoneValue {
2308
+ phone: number;
2309
+ within: number;
2310
+ mask: string[];
2311
+ value: string;
2312
+ }
2313
+
2314
+ /** Prefix tree node for phone code lookup and mask formatting @keywords phone, trie, prefix, mask */
2315
+ export interface GeoPhoneMap {
2316
+ items: GeoPhoneValue[];
2317
+ info: GeoPhoneValue | undefined;
2318
+ value: string | undefined;
2319
+ mask: string[];
2320
+ maskFull: string[];
2321
+ next: Record<string, GeoPhoneMap>;
2322
+ }
2323
+
2324
+ /** Result of a phone number lookup against the prefix tree @keywords phone, lookup, result */
2325
+ export interface GeoPhoneMapInfo {
2326
+ item?: GeoPhoneMap;
2327
+ phone?: string;
2328
+ }
2329
+
2330
+ export declare enum MetaTag {
2331
+ title = "title",
2332
+ description = "description",
2333
+ keywords = "keywords",
2334
+ canonical = "canonical",
2335
+ robots = "robots",
2336
+ author = "author"
2337
+ }
2338
+ export declare enum MetaRobots {
2339
+ indexFollow = "index, follow",
2340
+ noIndexFollow = "noindex, follow",
2341
+ indexNoFollow = "index, nofollow",
2342
+ noIndexNoFollow = "noindex, nofollow",
2343
+ noArchive = "noarchive",
2344
+ noSnippet = "nosnippet",
2345
+ noImageIndex = "noimageindex",
2346
+ images = "images",
2347
+ noTranslate = "notranslate",
2348
+ noPreview = "nopreview",
2349
+ textOnly = "textonly",
2350
+ noIndexSubpages = "noindex, noarchive",
2351
+ none = "none"
2352
+ }
2353
+ export declare enum MetaOpenGraphTag {
2354
+ title = "og:title",
2355
+ type = "og:type",
2356
+ url = "og:url",
2357
+ image = "og:image",
2358
+ description = "og:description",
2359
+ locale = "og:locale",
2360
+ siteName = "og:site_name",
2361
+ localeAlternate = "og:locale:alternate",
2362
+ imageUrl = "og:image:url",
2363
+ imageSecureUrl = "og:image:secure_url",
2364
+ imageType = "og:image:type",
2365
+ imageWidth = "og:image:width",
2366
+ imageHeight = "og:image:height",
2367
+ imageAlt = "og:image:alt",
2368
+ video = "og:video",
2369
+ videoUrl = "og:video:url",
2370
+ videoSecureUrl = "og:video:secure_url",
2371
+ videoType = "og:video:type",
2372
+ videoWidth = "og:video:width",
2373
+ videoHeight = "og:video:height",
2374
+ audio = "og:audio",
2375
+ audioSecureUrl = "og:audio:secure_url",
2376
+ audioType = "og:audio:type",
2377
+ articlePublishedTime = "article:published_time",
2378
+ articleModifiedTime = "article:modified_time",
2379
+ articleExpirationTime = "article:expiration_time",
2380
+ articleAuthor = "article:author",
2381
+ articleSection = "article:section",
2382
+ articleTag = "article:tag",
2383
+ bookAuthor = "book:author",
2384
+ bookIsbn = "book:isbn",
2385
+ bookReleaseDate = "book:release_date",
2386
+ bookTag = "book:tag",
2387
+ musicDuration = "music:duration",
2388
+ musicAlbum = "music:album",
2389
+ musicAlbumDisc = "music:album:disc",
2390
+ musicAlbumTrack = "music:album:track",
2391
+ musicMusician = "music:musician",
2392
+ musicSong = "music:song",
2393
+ musicSongDisc = "music:song:disc",
2394
+ musicSongTrack = "music:song:track",
2395
+ musicReleaseDate = "music:release_date",
2396
+ musicCreator = "music:creator",
2397
+ videoActor = "video:actor",
2398
+ videoActorRole = "video:actor:role",
2399
+ videoDirector = "video:director",
2400
+ videoWriter = "video:writer",
2401
+ videoDuration = "video:duration",
2402
+ videoReleaseDate = "video:release_date",
2403
+ videoTag = "video:tag",
2404
+ videoSeries = "video:series",
2405
+ profileFirstName = "profile:first_name",
2406
+ profileLastName = "profile:last_name",
2407
+ profileUsername = "profile:username",
2408
+ profileGender = "profile:gender",
2409
+ productBrand = "product:brand",
2410
+ productAvailability = "product:availability",
2411
+ productCondition = "product:condition",
2412
+ productPriceAmount = "product:price:amount",
2413
+ productPriceCurrency = "product:price:currency",
2414
+ productRetailerItemId = "product:retailer_item_id",
2415
+ productCategory = "product:category",
2416
+ productEan = "product:ean",
2417
+ productIsbn = "product:isbn",
2418
+ productMfrPartNo = "product:mfr_part_no",
2419
+ productUpc = "product:upc",
2420
+ productWeightValue = "product:weight:value",
2421
+ productWeightUnits = "product:weight:units",
2422
+ productColor = "product:color",
2423
+ productMaterial = "product:material",
2424
+ productPattern = "product:pattern",
2425
+ productAgeGroup = "product:age_group",
2426
+ productGender = "product:gender"
2427
+ }
2428
+ export declare enum MetaOpenGraphType {
2429
+ website = "website",
2430
+ article = "article",
2431
+ video = "video.other",
2432
+ videoTvShow = "video.tv_show",
2433
+ videoEpisode = "video.episode",
2434
+ videoMovie = "video.movie",
2435
+ musicAlbum = "music.album",
2436
+ musicPlaylist = "music.playlist",
2437
+ musicSong = "music.song",
2438
+ musicRadioStation = "music.radio_station",
2439
+ app = "app",
2440
+ product = "product",
2441
+ business = "business.business",
2442
+ place = "place",
2443
+ event = "event",
2444
+ profile = "profile",
2445
+ book = "book"
2446
+ }
2447
+ export declare enum MetaOpenGraphAvailability {
2448
+ inStock = "in stock",
2449
+ outOfStock = "out of stock",
2450
+ preorder = "preorder",
2451
+ backorder = "backorder",
2452
+ discontinued = "discontinued",
2453
+ pending = "pending"
2454
+ }
2455
+ export declare enum MetaOpenGraphCondition {
2456
+ new = "new",
2457
+ used = "used",
2458
+ refurbished = "refurbished"
2459
+ }
2460
+ export declare enum MetaOpenGraphAge {
2461
+ newborn = "newborn",
2462
+ infant = "infant",
2463
+ toddler = "toddler",
2464
+ kids = "kids",
2465
+ adult = "adult"
2466
+ }
2467
+ export declare enum MetaOpenGraphGender {
2468
+ female = "female",
2469
+ male = "male",
2470
+ unisex = "unisex"
2471
+ }
2472
+ export declare enum MetaTwitterTag {
2473
+ card = "twitter:card",
2474
+ site = "twitter:site",
2475
+ creator = "twitter:creator",
2476
+ url = "twitter:url",
2477
+ title = "twitter:title",
2478
+ description = "twitter:description",
2479
+ image = "twitter:image",
2480
+ imageAlt = "twitter:image:alt",
2481
+ imageSrc = "twitter:image:src",
2482
+ imageWidth = "twitter:image:width",
2483
+ imageHeight = "twitter:image:height",
2484
+ label1 = "twitter:label1",
2485
+ data1 = "twitter:data1",
2486
+ label2 = "twitter:label2",
2487
+ data2 = "twitter:data2",
2488
+ appNameIphone = "twitter:app:name:iphone",
2489
+ appIdIphone = "twitter:app:id:iphone",
2490
+ appUrlIphone = "twitter:app:url:iphone",
2491
+ appNameIpad = "twitter:app:name:ipad",
2492
+ appIdIpad = "twitter:app:id:ipad",
2493
+ appUrlIpad = "twitter:app:url:ipad",
2494
+ appNameGooglePlay = "twitter:app:name:googleplay",
2495
+ appIdGooglePlay = "twitter:app:id:googleplay",
2496
+ appUrlGooglePlay = "twitter:app:url:googleplay",
2497
+ player = "twitter:player",
2498
+ playerWidth = "twitter:player:width",
2499
+ playerHeight = "twitter:player:height",
2500
+ playerStream = "twitter:player:stream",
2501
+ playerStreamContentType = "twitter:player:stream:content_type"
2502
+ }
2503
+ export declare enum MetaTwitterCard {
2504
+ summary = "summary",
2505
+ summaryLargeImage = "summary_large_image",
2506
+ app = "app",
2507
+ player = "player",
2508
+ product = "product",
2509
+ gallery = "gallery",
2510
+ photo = "photo",
2511
+ leadGeneration = "lead_generation",
2512
+ audio = "audio",
2513
+ poll = "poll"
2514
+ }
2515
+
2516
+ export type SearchItem = Record<string, any>;
2517
+ export type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
2518
+ /** Resolves flat and nested dot-notated property paths for an item. @keywords search column path */
2519
+ export type SearchColumn<T extends SearchItem> = {
2520
+ [K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K;
2521
+ }[keyof T];
2522
+ export type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
2523
+ export type SearchFormatCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<SearchFormatCapitalize<Rest>>}` : K;
2524
+ export type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
2525
+ /** Formats search item with search keys and active status. @keywords search format item */
2526
+ export type SearchFormatItem<T extends SearchItem, KT extends string[]> = {
2527
+ [K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string;
2528
+ } & {
2529
+ searchActive?: boolean;
2530
+ };
2531
+ export type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
2532
+ export type SearchListValue<T extends SearchItem> = T[] | undefined;
2533
+ /** Search configuration options. @keywords search options config */
2534
+ export type SearchOptions = {
2535
+ limit?: number;
2536
+ returnEverything?: boolean;
2537
+ delay?: number;
2538
+ findExactMatch?: boolean;
2539
+ classSearchName?: string;
2540
+ };
2541
+ export type SearchCacheItem<T extends SearchItem> = {
2542
+ item: T;
2543
+ value: string;
2544
+ };
2545
+ export type SearchCache<T extends SearchItem> = SearchCacheItem<T>[];
2546
+ export type HighlightMatchItem = {
2547
+ text: string;
2548
+ isMatch: boolean;
2549
+ };
2550
+
2551
+ export type SortDir = 'asc' | 'desc';
2552
+ export type SortColumnItem = {
2553
+ column?: string;
2554
+ dir?: SortDir;
2555
+ };
2556
+ /** Custom comparison function for sorting items. @keywords sort, comparator, order */
2557
+ export type SortFunction<T = any> = (a: T, b: T, column?: string, dir?: SortDir) => number;
2558
+
2559
+ /** Translation plugin configuration options @keywords i18n, translate, config, options */
2560
+ export type TranslateConfig = {
2561
+ url?: string;
2562
+ propsName?: string;
2563
+ readApi?: boolean;
2564
+ };
2565
+ /** Translation code or list of translation codes @keywords i18n, key, code */
2566
+ export type TranslateCode = string | string[];
2567
+ /** Map of translation keys to resolved translated strings @keywords i18n, list, dictionary */
2568
+ export type TranslateList<T extends TranslateCode[]> = {
2569
+ [K in T[number] as K extends readonly string[] ? K[0] : K]: string;
2570
+ };
2571
+ /** Conditional translation result resolving to an object for multiple keys or a string for single key @keywords i18n, translate, resolver */
2572
+ export type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
2573
+ export type TranslateDataFileList = Record<string, string>;
2574
+ /** Asynchronous loader function for translation data @keywords i18n, loader, async */
2575
+ export type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
2576
+ /** Mapping of locale identifiers to translation file loaders @keywords i18n, locale, dictionary */
2577
+ export type TranslateDataFile = Record<string, TranslateDataFileItem>;
2578
+ /** Prefix identifier for global translations @keywords i18n, global, prefix */
2579
+ export declare const TRANSLATE_GLOBAL_PREFIX = "global";
2580
+ /** Batch loading request timeout in milliseconds @keywords i18n, timeout, batch */
2581
+ export declare const TRANSLATE_TIME_OUT = 160;