@dxtmisha/functional 1.10.4 → 1.11.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.txt ADDED
@@ -0,0 +1,746 @@
1
+ 1) All these methods are in the @dxtmisha/functional library.
2
+ 2) Everything that is exported can be used.
3
+ 3) Use what is in this library if it exists; do not use other libraries if there is an analogue here. Do not create new ones if an analogue already exists here.
4
+
5
+ The following is the content of "exports" from package.json:
6
+ {
7
+ ".": {
8
+ "import": "./dist/library.js",
9
+ "types": "./dist/library.d.ts"
10
+ },
11
+ "./flags": {
12
+ "import": "./dist/flags.js",
13
+ "types": "./dist/flags.d.ts"
14
+ },
15
+ "./types/*": "./dist/*"
16
+ }
17
+
18
+ // File: library.d.ts
19
+
20
+ /** Config for main GET request. */
21
+ export declare type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
22
+ /** API endpoint path */
23
+ path?: RefOrNormal<string | undefined>;
24
+ /** Additional request options */
25
+ options?: ApiOptions;
26
+ /** Enable reactive updates on path/options change */
27
+ reactivity?: boolean;
28
+ /** Request condition */
29
+ conditions?: RefType<boolean>;
30
+ /** Custom data transformation */
31
+ transformation?: (data: Type, isResponseContractValid?: ApiDataValidation) => ApiData<Return>;
32
+ /** Response contract validation */
33
+ validateResponseContract?: (data: Type) => ApiDataValidation;
34
+ /** Data validation function or class */
35
+ typeData?: ((data: Return) => boolean) | any;
36
+ /** Clear data on unmount */
37
+ unmounted?: boolean;
38
+ /** Loading skeleton data */
39
+ skeleton?: () => Return;
40
+ };
41
+
42
+ /** Config for mutation requests (POST, PUT, DELETE). */
43
+ export declare type ApiManagementRequest<T, Return extends ApiData<T> = ApiData<T>> = {
44
+ /** Target API endpoint path */
45
+ path?: RefOrNormal<string | undefined>;
46
+ /** Success callback */
47
+ action?: (data: Return | undefined) => Promise<void> | void;
48
+ /** Pre-send transformation */
49
+ transformation?: (data: T) => Return;
50
+ /** Wrap payload in 'data' property */
51
+ toData?: boolean;
52
+ /** Additional options */
53
+ options?: ApiOptions;
54
+ };
55
+
56
+ /** Config for client-side search. */
57
+ export declare type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
58
+ /** Columns to search through */
59
+ columns: K;
60
+ /** Reactive search query */
61
+ value?: Ref<string>;
62
+ /** Search algorithm options */
63
+ options?: SearchOptions;
64
+ };
65
+
66
+ /** Base type for API values. */
67
+ export declare type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
68
+
69
+ /** API request options. */
70
+ export declare type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
71
+
72
+ declare type BroadcastValueItem<T> = T | string | undefined;
73
+
74
+ /**
75
+ * Creates computed property for async getters.
76
+ * @param getter Sync/async function or value
77
+ * @param ignore Values to exclude
78
+ * @param debugOptions Vue debug options
79
+ */
80
+ export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
81
+
82
+ /**
83
+ * Computed property dependent on current language.
84
+ * @param getter Main language-dependent value
85
+ * @param getterNone Fallback value
86
+ * @param conditions Trigger conditions
87
+ * @param debugOptions Vue debug options
88
+ */
89
+ export declare function computedByLanguage<T, R extends (T | undefined) = T | undefined>(getter: ComputedGetter<R>, getterNone?: R | (() => R), conditions?: () => boolean, debugOptions?: DebuggerOptions): ComputedRef<R>;
90
+
91
+ /**
92
+ * Cached on-demand computed property. Persists for app lifetime.
93
+ * @param getter Function returning value or promise
94
+ */
95
+ export declare function computedEternity<T>(getter: () => Promise<T> | T): Ref<T, T>;
96
+
97
+ /** Constructor bind type with class/style support. */
98
+ export declare type ConstrBind<T> = T & Record<string, any> & {
99
+ key?: string;
100
+ class?: ConstrClass;
101
+ style?: ConstrStyles;
102
+ };
103
+
104
+ /** Constructor class type. */
105
+ export declare type ConstrClass = string | (string | ConstrClass | Undefined)[] | ConstrClassObject;
106
+
107
+ /** Constructor classes with main and additional list. */
108
+ export declare type ConstrClasses = {
109
+ main: ConstrClass;
110
+ } & ConstrClassList;
111
+
112
+ /** Class name mapping. */
113
+ export declare type ConstrClassList = Record<string, ConstrClass>;
114
+
115
+ /** CSS class object. */
116
+ export declare type ConstrClassObject = Record<string, boolean | undefined>;
117
+
118
+ /** Constructor component record. */
119
+ export declare type ConstrComponent = Record<string, any>;
120
+
121
+ /** Component modification type. */
122
+ export declare type ConstrComponentMod<P extends ConstrItem> = ConstrItem | {
123
+ [K in keyof P]?: RefOrNormal<P[K]>;
124
+ };
125
+
126
+ /** Constructor emit type. */
127
+ export declare type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToIntersection<ConstrEmitItem<{
128
+ [K in keyof T]: (evt: K, ...args: T[K]) => void;
129
+ }>>;
130
+
131
+ /** Extract emit item. */
132
+ export declare type ConstrEmitItem<T extends ConstrItem> = T[keyof T];
133
+
134
+ export declare type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & {
135
+ elementHtml?: ComputedRef<E | undefined>;
136
+ };
137
+
138
+ /** Link props. */
139
+ export declare type ConstrHrefProps = {
140
+ href?: string;
141
+ };
142
+
143
+ /** Generic constructor item. */
144
+ export declare type ConstrItem = Record<string, any>;
145
+
146
+ /** Component configuration options. */
147
+ export declare type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
148
+ components?: COMP;
149
+ compMod?: ConstrComponentMod<P>;
150
+ emits?: ConstrEmit<EMITS>;
151
+ classes?: RefType<ConstrClasses>;
152
+ styles?: RefType<ConstrStyles>;
153
+ };
154
+
155
+ /** Prop item definition. */
156
+ export declare type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
157
+
158
+ /** Vue prop options. */
159
+ export declare type ConstrPropItemOptions<T = any> = {
160
+ type?: PropType<T>;
161
+ required?: boolean;
162
+ default?: any;
163
+ validator?(value: any, props: any): boolean;
164
+ };
165
+
166
+ /** Component prop definitions. */
167
+ export declare type ConstrProps<P = Record<string, any>> = {
168
+ [K in keyof P]: ConstrPropItem<P[K]>;
169
+ };
170
+
171
+ /** Registration config. */
172
+ export declare type ConstrRegistration = {
173
+ flag?: boolean;
174
+ translate?: Record<string, string>;
175
+ };
176
+
177
+ /** Setup interface for component init. */
178
+ export declare type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP extends ConstrItem> = {
179
+ name: string;
180
+ element: Ref<E | undefined>;
181
+ classes: RefType<CLASSES>;
182
+ styles: RefType<ConstrStyles>;
183
+ } & SETUP;
184
+
185
+ /** Style definitions. */
186
+ export declare type ConstrStyles = Record<string, ConstrStylesItem> | ConstrStyles[];
187
+
188
+ /** Individual style property. */
189
+ export declare type ConstrStylesItem = string | null;
190
+
191
+ /** Value wrapper. */
192
+ export declare type ConstrValue<T = any> = {
193
+ value?: T;
194
+ };
195
+
196
+ /** Class for date processing. */
197
+ export declare class DatetimeRef {
198
+ /**
199
+ * @param date Date to process
200
+ * @param type Format type
201
+ * @param code Locale code
202
+ */
203
+ constructor(date: RefOrNormal<NumberOrStringOrDate>, type?: RefOrNormal<GeoDate>, code?: RefOrNormal<string>);
204
+ getItem(): Ref<NumberOrStringOrDate>;
205
+ getDate(): Ref<Date>;
206
+ getDatetime(): Datetime;
207
+ getHoursType(): ComputedRef<GeoHours>;
208
+ getFirstDayCode(): ComputedRef<GeoFirstDay>;
209
+ getYear(): ComputedRef<number>;
210
+ getMonth(): ComputedRef<number>;
211
+ getDay(): ComputedRef<number>;
212
+ getHour(): ComputedRef<number>;
213
+ getMinute(): ComputedRef<number>;
214
+ getSecond(): ComputedRef<number>;
215
+ getMaxDay(): ComputedRef<number>;
216
+ /**
217
+ * Language-sensitive formatting.
218
+ * @param type Output format
219
+ * @param styleOptions Month representation/options
220
+ */
221
+ locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): ComputedRef<string>;
222
+ /**
223
+ * Standard data output.
224
+ * @param timeZone Include timezone
225
+ */
226
+ standard(timeZone?: boolean): ComputedRef<string>;
227
+ }
228
+
229
+ /** Base design class. */
230
+ export declare abstract class DesignAbstract<T extends Record<string, any>, C extends Record<string, any>> {
231
+ constructor(props: T, callback?: ((event: C) => void) | undefined, changed?: string[]);
232
+ /** Triggers update. */
233
+ make(compelled?: boolean): this;
234
+ /** Triggers callback. */
235
+ makeCallback(compelled?: boolean): void;
236
+ }
237
+
238
+ /** Async base design class. */
239
+ export declare abstract class DesignAsyncAbstract<T extends Record<string, any>, C extends Record<string, any>> extends DesignAbstract<T, C> {
240
+ make(compelled?: boolean): this;
241
+ makeCallback(compelled?: boolean): Promise<void>;
242
+ }
243
+
244
+ /** Tracks edited values. */
245
+ export declare class DesignChanged<T extends Record<string, any>> {
246
+ constructor(props: T, watch?: string[]);
247
+ /** Check if specific property updated. */
248
+ is(name: string | string[]): boolean;
249
+ /** Check for any changes. */
250
+ isChanged(): boolean;
251
+ /** Update tracked values. */
252
+ update(): void;
253
+ }
254
+
255
+ export declare class DesignComp<COMP extends ConstrComponent, P extends ConstrItem> extends DesignComponents<COMP, P> {
256
+ }
257
+
258
+ /** Manages connected components. */
259
+ export declare class DesignComponents<COMP extends ConstrComponent, P extends ConstrItem> {
260
+ constructor(components?: COMP, modification?: ConstrComponentMod<P> | undefined);
261
+ /** Check component presence. */
262
+ is<K extends keyof COMP>(name: K): name is K;
263
+ /** Get component object. */
264
+ get<K extends keyof COMP>(name: K): COMP[K];
265
+ /** Get modified props for child component. */
266
+ getModification<K extends keyof P>(index?: K & string | string, props?: P[K] | Record<string, any>): Record<string, any> | undefined;
267
+ /** Render component in array. */
268
+ render<K extends keyof COMP, PK extends keyof P>(name: K & string, props?: P[PK] & ConstrItem | ConstrItem, children?: RawChildren | RawSlots, index?: PK & string | string): VNode[];
269
+ /** Render single component. */
270
+ renderOne<K extends keyof COMP, PK extends keyof P>(name: K & string, props?: P[PK] & ConstrItem | ConstrItem, children?: RawChildren | RawSlots, index?: PK & string | string): VNode | undefined;
271
+ /** Add rendered component to array. */
272
+ renderAdd<K extends keyof COMP, PK extends keyof P>(item: any[], name: K & string, props?: P[PK] & ConstrItem | ConstrItem, children?: RawChildren | RawSlots, index?: PK & string | string): this;
273
+ }
274
+
275
+ /** Main constructor for functional components. */
276
+ export declare abstract class DesignConstructorAbstract<E extends Element, COMP extends ConstrComponent, EMITS extends ConstrItem, EXPOSE extends ConstrItem, SLOTS extends ConstrItem, CLASSES extends ConstrClasses, P extends ConstrItem> {
277
+ protected constructor(name: string, props: Readonly<P>, options?: ConstrOptions<COMP, EMITS, P> | undefined);
278
+ getName(): string;
279
+ getDesign(): string;
280
+ getSubClass(name: string | string[]): string;
281
+ getStatusClass(name: string | string[]): string;
282
+ getStyle(name: string | string[]): string;
283
+ getAttrs(): ConstrItem;
284
+ expose(): ConstrExpose<E, EXPOSE>;
285
+ render(): () => VNode | (VNode | any)[] | undefined;
286
+ }
287
+
288
+ /**
289
+ * Vue plugin for global services.
290
+ * @example
291
+ * ```typescript
292
+ * app.use(dxtFunctionalPlugin, { api: { url: '...' }, router })
293
+ * ```
294
+ */
295
+ export declare const dxtFunctionalPlugin: Plugin_2;
296
+
297
+ /** Global effect scope utility. */
298
+ export declare class EffectScopeGlobal {
299
+ static run<T>(fn: () => T): T | undefined;
300
+ }
301
+
302
+ /** Event handler with reactive element. */
303
+ export declare class EventRef<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> extends EventItem<E, O, D> {
304
+ constructor(elementSelector?: RefOrNormal<ElementOrString<E> | undefined>, elementSelectorControl?: RefOrNormal<ElementOrString<HTMLElement>>, type?: string | string[], listener?: EventListenerDetail<O, D>, options?: EventOptions, detail?: D);
305
+ }
306
+
307
+ /**
308
+ * Managed singleton for state/API.
309
+ * @remarks Use for API clients, shared state, or SDKs.
310
+ * @example
311
+ * export const useUserApi = executeUseGlobal(() => useApiGet('/api/user'));
312
+ */
313
+ export declare function executeUse<R, O extends any[], RI extends ExecuteUseReturn<R> = ExecuteUseReturn<R>>(callback: (...args: O) => R, type?: ExecuteUseType): ((...args: O) => RI) | (() => RI);
314
+
315
+ /** Creates global singleton. */
316
+ export declare function executeUseGlobal<R>(callback: () => R): (() => ExecuteUseReturn<R>);
317
+
318
+ /** Inits global callbacks. */
319
+ export declare function executeUseGlobalInit(): void;
320
+
321
+ /** Creates local singleton in closure. */
322
+ export declare function executeUseLocal<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => ExecuteUseReturn<R>);
323
+
324
+ /** Creates provide/inject singleton. */
325
+ export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => ExecuteUseReturn<R>);
326
+
327
+ /** Factory return object. */
328
+ export declare type ExecuteUseReturn<R> = Readonly<R & {
329
+ init(): Readonly<R>;
330
+ destroyExecute?(): void;
331
+ }>;
332
+
333
+ /** Singleton strategies. */
334
+ export declare enum ExecuteUseType {
335
+ global = "global",
336
+ provide = "provide",
337
+ local = "local"
338
+ }
339
+
340
+ /** Plugin options interface. */
341
+ export declare interface FunctionalPluginOptions {
342
+ api?: ApiConfig;
343
+ translate?: TranslateConfig;
344
+ metaSuffix?: string;
345
+ icons?: IconsConfig;
346
+ router?: Router;
347
+ errorCauses?: ErrorCenterCauseList;
348
+ }
349
+
350
+ /** Country/flag utility. */
351
+ export declare class GeoFlagRef {
352
+ constructor(code?: RefOrNormal<string>);
353
+ getCode(): Ref<string>;
354
+ get(code?: string): ComputedRef<GeoFlagItem | undefined>;
355
+ getFlag(code?: string): ComputedRef<string | undefined>;
356
+ getList(codes?: string[]): ComputedRef<GeoFlagItem[]>;
357
+ getNational(codes?: string[]): ComputedRef<GeoFlagNational[]>;
358
+ }
359
+
360
+ /** Reactive numbers/dates formatting. */
361
+ export declare class GeoIntlRef {
362
+ constructor(code?: RefOrNormal<string>);
363
+ display(value?: RefOrNormal<string>, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): ComputedRef<string>;
364
+ languageName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
365
+ countryName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
366
+ number(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
367
+ decimal(): ComputedRef<string>;
368
+ currency(value: RefOrNormal<NumberOrString>, currencyOptions?: RefOrNormal<string | Intl.NumberFormatOptions>, numberOnly?: boolean): ComputedRef<string>;
369
+ currencySymbol(currency: RefOrNormal<string>, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): ComputedRef<string>;
370
+ unit(value: RefOrNormal<NumberOrString>, unitOptions?: string | Intl.NumberFormatOptions): ComputedRef<string>;
371
+ sizeFile(value: RefOrNormal<NumberOrString>, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): ComputedRef<string>;
372
+ percent(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
373
+ percentBy100(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
374
+ plural(value: RefOrNormal<NumberOrString>, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): ComputedRef<string>;
375
+ date(value: RefOrNormal<NumberOrStringOrDate>, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): ComputedRef<string>;
376
+ relative(value: RefOrNormal<NumberOrStringOrDate>, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): ComputedRef<string>;
377
+ relativeLimit(value: RefOrNormal<NumberOrStringOrDate>, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): ComputedRef<string>;
378
+ relativeByValue(value: RefOrNormal<NumberOrString>, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): ComputedRef<string>;
379
+ month(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['month']): ComputedRef<string>;
380
+ months(style?: Intl.DateTimeFormatOptions['month']): ComputedRef<ItemValue<number | undefined>[]>;
381
+ weekday(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<string>;
382
+ weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<ItemValue<number | undefined>[]>;
383
+ time(value: RefOrNormal<NumberOrStringOrDate>): ComputedRef<string>;
384
+ sort<T>(data: RefOrNormal<T[]>, compareFn?: (a: T, b: T) => [string, string]): ComputedRef<T[]>;
385
+ }
386
+
387
+ /** Global geographic data management. */
388
+ export declare class GeoRef {
389
+ static get(): Ref<GeoItemFull>;
390
+ static getCountry(): ComputedRef<string>;
391
+ static getLanguage(): ComputedRef<string>;
392
+ static getStandard(): ComputedRef<string>;
393
+ static getFirstDay(): ComputedRef<string>;
394
+ static set(code: string): void;
395
+ }
396
+
397
+ /** Generate subcomponent properties. */
398
+ export declare function getBind<T, R extends ItemList>(value: T | R | undefined | null, nameExtra?: ItemList | string, name?: string, except?: boolean): ConstrBind<R>;
399
+
400
+ /** Reactive subcomponent properties. */
401
+ export declare function getBindRef<T, R extends ItemList>(value: RefOrNormal<T | R> | undefined, nameExtra?: RefOrNormal<ItemList> | string, name?: string): ComputedRef<R>;
402
+
403
+ /** Get class name from props. */
404
+ export declare function getClassName<T extends ItemList>(props?: T): string | undefined;
405
+
406
+ /** Get/gen render index. */
407
+ export declare function getIndexForRender<T extends ItemList>(name: string | any, props?: T, index?: string): string | undefined;
408
+
409
+ /** Get API options. */
410
+ export declare const getOptions: (options?: ApiOptions) => RefOrNormal<ApiFetch>;
411
+
412
+ /** Unwrap ref value. */
413
+ export declare function getRef<T>(item: RefOrNormal<T>): T;
414
+
415
+ export declare type LazyItem = {
416
+ status: ShallowRef<boolean>;
417
+ ratio: ShallowRef<number>;
418
+ entry: ShallowRef<IntersectionObserverEntry | undefined>;
419
+ stopWatch: () => void;
420
+ };
421
+
422
+ export declare type LazyItemByMargin = {
423
+ rootMargin: string;
424
+ item: any;
425
+ };
426
+
427
+ export declare type LazyList = Record<string, LazyItem>;
428
+
429
+ /** Basic list item structure. */
430
+ export declare type ListDataBasic = {
431
+ label?: NumberOrString;
432
+ value?: any;
433
+ search?: string;
434
+ };
435
+
436
+ /** List items with state. */
437
+ export declare type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
438
+
439
+ /** List item state properties. */
440
+ export declare type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
441
+ focus: boolean;
442
+ highlight?: string;
443
+ selected: boolean;
444
+ disabled?: boolean;
445
+ };
446
+
447
+ /** Identified list item. */
448
+ export declare type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & {
449
+ parent?: string;
450
+ type: ListType;
451
+ index: string;
452
+ }>;
453
+
454
+ /** List data management class. */
455
+ export declare class ListDataRef {
456
+ constructor(list: RefOrNormal<ListListInput | undefined>, focus?: RefType<ListSelectedItem | undefined> | undefined, highlight?: RefType<string | undefined> | undefined, highlightLengthStart?: RefType<number | undefined> | undefined, filterMode?: RefType<boolean | undefined> | undefined, selected?: RefType<ListSelectedList | undefined> | undefined, keyValue?: RefType<string | undefined> | undefined, keyLabel?: RefType<string | undefined> | undefined, lite?: RefType<number | undefined> | undefined, min?: RefOrNormal<number | string | undefined>, max?: RefOrNormal<number | string | undefined>, parent?: string | undefined);
457
+ readonly data: ComputedRef<ListList>;
458
+ readonly liteData: ComputedRef<ListList>;
459
+ readonly fullData: ComputedRef<ListDataFull>;
460
+ readonly map: ComputedRef<ListList>;
461
+ readonly mapItems: ComputedRef<ListList>;
462
+ readonly items: ComputedRef<ListList>;
463
+ readonly highlightFirstItem: ComputedRef<number>;
464
+ readonly isSelected: ComputedRef<boolean>;
465
+ readonly isSelectedMin: ComputedRef<boolean>;
466
+ readonly isSelectedMax: ComputedRef<boolean>;
467
+ readonly selectedList: ComputedRef<ListList>;
468
+ readonly selectedListInGroup: ComputedRef<ListList>;
469
+ readonly selectedNames: ComputedRef<ListNames>;
470
+ readonly selectedValues: ComputedRef<any[]>;
471
+ isLite(): boolean;
472
+ isFocus(): boolean;
473
+ isHighlight(): boolean;
474
+ isHighlightActive(): boolean;
475
+ getLength(): number;
476
+ getLengthByMap(): number;
477
+ getLengthByItems(): number;
478
+ getFocus(): ListSelectedItem | undefined;
479
+ getHighlight(): string | undefined;
480
+ getHighlightLengthStart(): number;
481
+ getSelected(): ListSelectedList | undefined;
482
+ getSelectedByStep(step: number): ListSelectedItem | undefined;
483
+ getSelectedNext(): ListSelectedItem | undefined;
484
+ getSelectedPrev(): ListSelectedItem | undefined;
485
+ getItemByStep(item: ListDataItem, step: number): ListDataItem | undefined;
486
+ getItemNext(item: ListDataItem): ListDataItem | undefined;
487
+ getItemPrev(item: ListDataItem): ListDataItem | undefined;
488
+ getIndexByStep(index: string, step: number): ListDataItem | undefined;
489
+ getIndexNext(index: string): ListDataItem | undefined;
490
+ getIndexPrev(index: string): ListDataItem | undefined;
491
+ getItemByIndex(index?: string): { key: number; item: ListDataItem; } | undefined;
492
+ getItemByKey(key: number): ListDataItem | undefined;
493
+ getFirstItemByParent(parent: string | undefined): ListDataItem | undefined;
494
+ getLastItemByParent(parent: string | undefined): ListDataItem | undefined;
495
+ getSubList(item: ListDataItem): ListDataRef;
496
+ }
497
+
498
+ export declare type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
499
+ export declare type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
500
+ export declare type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
501
+ export declare type ListName = string | number | undefined;
502
+ export declare type ListNames = ListName[];
503
+ export declare type ListRecord<Item extends ListDataBasic = ListDataBasic> = ListList<Item> | Record<string, any>;
504
+ export declare type ListSelectedItem = NumberOrStringOrBoolean;
505
+ export declare type ListSelectedList = ListSelectedItem | ListSelectedItem[];
506
+ export declare type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
507
+
508
+ export declare type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);
509
+ export declare type RawSlots = { [name: string]: unknown; $stable?: boolean; };
510
+
511
+ export declare type RefOrNormal<T> = RefType<T> | T;
512
+ export declare type RefType<T> = ComputedRef<T> | Ref<T>;
513
+ export declare type RefUndefined<T> = RefType<T | undefined>;
514
+
515
+ /** Render cached/immutable data. */
516
+ export declare function render<T extends ItemList>(name: string | any, props?: T, children?: RawChildren | RawSlots, index?: string): VNode;
517
+
518
+ /** Router utilities. */
519
+ export declare class RouterItemRef {
520
+ static get(): Router;
521
+ static getLink(name: string, params?: any, query?: any): string | undefined;
522
+ static getHref(name?: string, params?: any, query?: any): ConstrHrefProps;
523
+ static push(to: string | RouteLocationRaw): void;
524
+ static set(router: Router): void;
525
+ static setOneTime(router: Router): void;
526
+ static rawToHref(to?: string | RouteLocationRaw): ConstrHrefProps;
527
+ }
528
+
529
+ /** Scrollbar width detector. */
530
+ export declare class ScrollbarWidthRef {
531
+ readonly item: Ref<boolean | undefined, boolean | undefined>;
532
+ readonly width: Ref<number, number>;
533
+ constructor();
534
+ readonly is: ComputedRef<boolean>;
535
+ }
536
+
537
+ export declare type SearchListInput<T extends SearchItem> = SearchListValueRef<T> | (() => SearchListValueRef<T>);
538
+ export declare type SearchListValueRef<T extends SearchItem> = RefOrNormal<SearchListValue<T>>;
539
+
540
+ /** Global API conditions. */
541
+ export declare const setApiRefGlobalConditions: (conditions: RefType<any>) => void;
542
+
543
+ /** Update reactive ref. */
544
+ export declare function setRef<T>(item: Ref<T>, value: T): void;
545
+
546
+ /** Shorthand for translation. */
547
+ export declare const t: <T extends string[]>(names: T) => ShallowRef<TranslateList<T>>;
548
+
549
+ /** Merge objects with class/style awareness. */
550
+ export declare function toBind<R extends ItemList = ItemList>(extra: ItemList, value: ItemList): ConstrBind<R>;
551
+ export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
552
+
553
+ /** Ensure value is Ref. */
554
+ export declare function toRefItem<T>(item: RefOrNormal<T>): Ref<T>;
555
+
556
+ export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
557
+
558
+ /** API DELETE request. */
559
+ export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
560
+ loading: Ref<boolean, boolean>;
561
+ send(request?: Request | undefined): Promise<Return | undefined>;
562
+ };
563
+
564
+ /** API GET request. */
565
+ export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
566
+ loading: Ref<boolean, boolean>;
567
+ send(request?: Request | undefined): Promise<Return | undefined>;
568
+ };
569
+
570
+ /**
571
+ * Advanced API orchestration (GET, List, Search, Mutations).
572
+ * @note Best used with `executeUse`.
573
+ * @example
574
+ * const products = useApiManagementRef({ path: '/api/v1/products' }, { price: (v) => `${v}$` });
575
+ */
576
+ export declare function useApiManagementRef<Return extends ApiManagementValue, FormattersOptions extends FormattersOptionsList, Post extends Record<string, any>, Put extends Record<string, any>, Delete extends Record<string, any>, Type extends ApiManagementValue = Return, Item extends ArrayToItem<Return> = ArrayToItem<Return>, ItemFormatters extends FormattersListColumns<Item, FormattersOptions>[number] = FormattersListColumns<Item, FormattersOptions>[number], Columns extends SearchColumns<ItemFormatters> = []>(propsGet: ApiManagementGet<Return, Type>, formattersOptions?: FormattersOptions, searchOptions?: ApiManagementSearch<Item, Columns>, postRequest?: ApiManagementRequest<Post>, putRequest?: ApiManagementRequest<Put>, deleteRequest?: ApiManagementRequest<Delete>, action?: () => Promise<void> | void, apiInstance?: ApiInstance): {
577
+ isValid: ComputedRef<boolean>;
578
+ list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
579
+ readonly data: ComputedRef<ApiData<Return> | undefined>;
580
+ readonly length: ComputedRef<number>;
581
+ lengthData: ComputedRef<number>;
582
+ starting: ComputedRef<boolean>;
583
+ reading: Ref<boolean, boolean>;
584
+ loading: Ref<boolean, boolean>;
585
+ loadingSearch: Ref<boolean, boolean> | undefined;
586
+ loadingPost: Ref<boolean, boolean> | undefined;
587
+ loadingPut: Ref<boolean, boolean> | undefined;
588
+ loadingDelete: Ref<boolean, boolean> | undefined;
589
+ isSearch: ComputedRef<boolean> | undefined;
590
+ search: Ref<string, string> | undefined;
591
+ reset: () => Promise<void>;
592
+ abort: () => void;
593
+ sendPost: (request?: ApiFetch["request"]) => Promise<ApiData<Post> | undefined>;
594
+ sendPut: (request?: ApiFetch["request"]) => Promise<ApiData<Put> | undefined>;
595
+ sendDelete: (request?: ApiFetch["request"]) => Promise<ApiData<Delete> | undefined>;
596
+ };
597
+
598
+ /** API POST request. */
599
+ export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
600
+ loading: Ref<boolean, boolean>;
601
+ send(request?: Request | undefined): Promise<Return | undefined>;
602
+ };
603
+
604
+ /** API PUT request. */
605
+ export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
606
+ loading: Ref<boolean, boolean>;
607
+ send(request?: Request | undefined): Promise<Return | undefined>;
608
+ };
609
+
610
+ /** useApiRef return interface. */
611
+ export declare interface UseApiRef<R> {
612
+ data: ComputedRef<ApiData<R> | undefined>;
613
+ item: Ref<ApiData<R> | undefined>;
614
+ isResponseContractValid: ComputedRef<boolean>;
615
+ responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
616
+ length: ComputedRef<number>;
617
+ starting: ComputedRef<boolean>;
618
+ loading: Ref<boolean>;
619
+ reading: Ref<boolean>;
620
+ isStarting(): boolean;
621
+ isLoading(): boolean;
622
+ isReading(): boolean;
623
+ getItem(): ApiData<R> | undefined;
624
+ init(): void;
625
+ reset(): Promise<void>;
626
+ stop(): void;
627
+ abort(): void;
628
+ }
629
+
630
+ /** Reactive request handling. */
631
+ export declare function useApiRef<R, T = R>(path?: RefOrNormal<string | undefined>, options?: ApiOptions, reactivity?: boolean, conditions?: RefType<boolean>, transformation?: (data: T, isResponseContractValid?: ApiDataValidation) => ApiData<R>, validateResponseContract?: (data: T) => ApiDataValidation, unmounted?: boolean, apiInstance?: ApiInstance): UseApiRef<R>;
632
+
633
+ /** Basic API request composable. */
634
+ export declare function useApiRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, method?: ApiMethodItem, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
635
+ loading: Ref<boolean, boolean>;
636
+ send(request?: Request): Promise<Return | undefined>;
637
+ };
638
+
639
+ /** Sync data between tabs. */
640
+ export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<BroadcastValueItem<T>>;
641
+
642
+ /** Manage cookies reactively. */
643
+ export declare function useCookieRef<T>(name: string, defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): Ref<T | string | undefined>;
644
+
645
+ /** Reactive list formatting. */
646
+ export declare function useFormattersRef<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp>(list: RefType<List | undefined>, options: Options): {
647
+ listFormat: ComputedRef<FormattersReturn<List, Options>>;
648
+ length: ComputedRef<number>;
649
+ };
650
+
651
+ export declare function useGeoIntlRef(): GeoIntlRef;
652
+
653
+ /** Reactive hash management. */
654
+ export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
655
+
656
+ /** Track element appearance by margin. */
657
+ export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin: string) => {
658
+ lazyItemStatus: any;
659
+ readonly lazyItem: any;
660
+ };
661
+
662
+ /** Element visibility tracking. */
663
+ export declare const useLazyRef: (options?: IntersectionObserverInit) => {
664
+ intersectionObserver: IntersectionObserver | undefined;
665
+ getItem(element: HTMLElement): LazyItem;
666
+ addLazyItem(element: Ref<HTMLElement | undefined>): ShallowRef<boolean, boolean>;
667
+ removeLazyItem: (element?: HTMLElement) => void;
668
+ disconnectLazy: () => void | undefined;
669
+ };
670
+
671
+ export declare function useLoadingRef(): ShallowRef<boolean, boolean>;
672
+
673
+ /** Global meta tag management. */
674
+ export declare const useMeta: () => Readonly<{
675
+ meta: Meta;
676
+ title: Ref<string, string>;
677
+ keyword: Ref<string, string>;
678
+ description: Ref<string, string>;
679
+ author: Ref<string, string>;
680
+ image: Ref<string, string>;
681
+ canonical: Ref<string, string>;
682
+ robots: Ref<MetaRobots, MetaRobots>;
683
+ siteName: Ref<string, string>;
684
+ getHtmlMeta: () => string;
685
+ setSuffix: (suffix: string) => void;
686
+ } & {
687
+ init(): Readonly<{
688
+ meta: Meta;
689
+ title: Ref<string, string>;
690
+ keyword: Ref<string, string>;
691
+ description: Ref<string, string>;
692
+ author: Ref<string, string>;
693
+ image: Ref<string, string>;
694
+ canonical: Ref<string, string>;
695
+ robots: Ref<MetaRobots, MetaRobots>;
696
+ siteName: Ref<string, string>;
697
+ getHtmlMeta: () => string;
698
+ setSuffix: (suffix: string) => void;
699
+ }>;
700
+ destroyExecute?(): void;
701
+ }>;
702
+
703
+ /** Router-linked list. */
704
+ export declare const useRouterList: <T extends ListDataBasic>(list: RefType<ConstrBind<T>[] | undefined>, selected?: Ref<string> | string, hasTo?: boolean) => {
705
+ item: ComputedRef<T | undefined>;
706
+ selected: Ref<string, string>;
707
+ label: ComputedRef<NumberOrString>;
708
+ list: ComputedRef<ConstrBind<T>[]>;
709
+ to: (name?: string) => void;
710
+ toMain(): void;
711
+ };
712
+
713
+ /** Reactive search logic. */
714
+ export declare function useSearchRef<T extends SearchItem, K extends SearchColumns<T>>(list: SearchListInput<T>, columns: K, value?: Ref<string>, options?: SearchOptions): {
715
+ isSearch: ComputedRef<boolean>;
716
+ search: Ref<string, string>;
717
+ loading: Ref<boolean, boolean>;
718
+ listSearch: ComputedRef<SearchFormatList<T, K>>;
719
+ length: ComputedRef<number>;
720
+ };
721
+
722
+ /** Search state with debounce. */
723
+ export declare function useSearchValueRef<T extends SearchItem, K extends SearchColumns<T>>(item: SearchList<T, K>, value?: Ref<string>): {
724
+ search: Ref<string, string>;
725
+ searchDelay: Ref<string, string>;
726
+ loading: Ref<boolean, boolean>;
727
+ };
728
+
729
+ /** Reactive session storage. */
730
+ export declare function useSessionRef<T>(name: string, defaultValue?: T | (() => T)): Ref<T | undefined>;
731
+
732
+ /** Reactive local storage. */
733
+ export declare function useStorageRef<T>(name: string, defaultValue?: T | (() => T), cache?: number): Ref<T | undefined>;
734
+
735
+ /**
736
+ * Reactive translation retrieval.
737
+ * @example
738
+ * const tr = useTranslateRef(['home.title'] as const);
739
+ */
740
+ export declare function useTranslateRef<T extends (string | string[])[]>(names: T, translateInstance?: TranslateInstance): ShallowRef<TranslateList<T>>;
741
+
742
+ export * from "@dxtmisha/functional-basic";
743
+
744
+ export { }
745
+
746
+ go!