@dxtmisha/functional 1.14.5 → 1.15.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/ai-description.md +22 -15
  3. package/ai-types.md +104 -36
  4. package/dist/classes/ref/GeoUnitRef.d.ts +153 -0
  5. package/dist/{src/classes → classes}/ref/RouterItemRef.d.ts +2 -2
  6. package/dist/composables/ref/useGeoUnitRef.d.ts +7 -0
  7. package/dist/{src/library.d.ts → library.d.ts} +2 -0
  8. package/dist/library.js +243 -185
  9. package/package.json +5 -6
  10. /package/dist/{src/classes → classes}/design/DesignAbstract.d.ts +0 -0
  11. /package/dist/{src/classes → classes}/design/DesignAsyncAbstract.d.ts +0 -0
  12. /package/dist/{src/classes → classes}/design/DesignChanged.d.ts +0 -0
  13. /package/dist/{src/classes → classes}/design/DesignComp.d.ts +0 -0
  14. /package/dist/{src/classes → classes}/design/DesignComponents.d.ts +0 -0
  15. /package/dist/{src/classes → classes}/design/DesignConstructorAbstract.d.ts +0 -0
  16. /package/dist/{src/classes → classes}/ref/DatetimeRef.d.ts +0 -0
  17. /package/dist/{src/classes → classes}/ref/EffectScopeGlobal.d.ts +0 -0
  18. /package/dist/{src/classes → classes}/ref/EventRef.d.ts +0 -0
  19. /package/dist/{src/classes → classes}/ref/GeoFlagRef.d.ts +0 -0
  20. /package/dist/{src/classes → classes}/ref/GeoIntlRef.d.ts +0 -0
  21. /package/dist/{src/classes → classes}/ref/GeoRef.d.ts +0 -0
  22. /package/dist/{src/classes → classes}/ref/ListDataRef.d.ts +0 -0
  23. /package/dist/{src/classes → classes}/ref/ScrollbarWidthRef.d.ts +0 -0
  24. /package/dist/{src/composables → composables}/ref/useApiAsyncRef.d.ts +0 -0
  25. /package/dist/{src/composables → composables}/ref/useApiDelete.d.ts +0 -0
  26. /package/dist/{src/composables → composables}/ref/useApiGet.d.ts +0 -0
  27. /package/dist/{src/composables → composables}/ref/useApiManagementAsyncRef.d.ts +0 -0
  28. /package/dist/{src/composables → composables}/ref/useApiManagementRef.d.ts +0 -0
  29. /package/dist/{src/composables → composables}/ref/useApiPost.d.ts +0 -0
  30. /package/dist/{src/composables → composables}/ref/useApiPut.d.ts +0 -0
  31. /package/dist/{src/composables → composables}/ref/useApiRef.d.ts +0 -0
  32. /package/dist/{src/composables → composables}/ref/useApiRequest.d.ts +0 -0
  33. /package/dist/{src/composables → composables}/ref/useBroadcastValueRef.d.ts +0 -0
  34. /package/dist/{src/composables → composables}/ref/useCookieRef.d.ts +0 -0
  35. /package/dist/{src/composables → composables}/ref/useFormattersRef.d.ts +0 -0
  36. /package/dist/{src/composables → composables}/ref/useGeoIntlRef.d.ts +0 -0
  37. /package/dist/{src/composables → composables}/ref/useHashRef.d.ts +0 -0
  38. /package/dist/{src/composables → composables}/ref/useLazyItemByMarginRef.d.ts +0 -0
  39. /package/dist/{src/composables → composables}/ref/useLazyRef.d.ts +0 -0
  40. /package/dist/{src/composables → composables}/ref/useLoadingRef.d.ts +0 -0
  41. /package/dist/{src/composables → composables}/ref/useMeta.d.ts +0 -0
  42. /package/dist/{src/composables → composables}/ref/useQueryRef.d.ts +0 -0
  43. /package/dist/{src/composables → composables}/ref/useRouterList.d.ts +0 -0
  44. /package/dist/{src/composables → composables}/ref/useSearchRef.d.ts +0 -0
  45. /package/dist/{src/composables → composables}/ref/useSearchValueRef.d.ts +0 -0
  46. /package/dist/{src/composables → composables}/ref/useSessionRef.d.ts +0 -0
  47. /package/dist/{src/composables → composables}/ref/useStorageRef.d.ts +0 -0
  48. /package/dist/{src/composables → composables}/ref/useTranslateRef.d.ts +0 -0
  49. /package/dist/{src/flags.d.ts → flags.d.ts} +0 -0
  50. /package/dist/{src/functions → functions}/basic.d.ts +0 -0
  51. /package/dist/{src/functions → functions}/computedAsync.d.ts +0 -0
  52. /package/dist/{src/functions → functions}/computedByLanguage.d.ts +0 -0
  53. /package/dist/{src/functions → functions}/computedEternity.d.ts +0 -0
  54. /package/dist/{src/functions → functions}/dxtFunctionalPlugin.d.ts +0 -0
  55. /package/dist/{src/functions → functions}/executeUse.d.ts +0 -0
  56. /package/dist/{src/functions → functions}/getInject.d.ts +0 -0
  57. /package/dist/{src/functions → functions}/getOptions.d.ts +0 -0
  58. /package/dist/{src/functions → functions}/ref/executeFunctionRef.d.ts +0 -0
  59. /package/dist/{src/functions → functions}/ref/getApiErrorRef.d.ts +0 -0
  60. /package/dist/{src/functions → functions}/ref/getBindRef.d.ts +0 -0
  61. /package/dist/{src/functions → functions}/ref/getRef.d.ts +0 -0
  62. /package/dist/{src/functions → functions}/ref/render.d.ts +0 -0
  63. /package/dist/{src/functions → functions}/ref/setRef.d.ts +0 -0
  64. /package/dist/{src/functions → functions}/ref/toRefItem.d.ts +0 -0
  65. /package/dist/{src/functions → functions}/render/getBind.d.ts +0 -0
  66. /package/dist/{src/functions → functions}/render/getClassName.d.ts +0 -0
  67. /package/dist/{src/functions → functions}/render/getIndexForRender.d.ts +0 -0
  68. /package/dist/{src/functions → functions}/toBind.d.ts +0 -0
  69. /package/dist/{src/functions → functions}/toBinds.d.ts +0 -0
  70. /package/dist/{src/types → types}/apiTypes.d.ts +0 -0
  71. /package/dist/{src/types → types}/constructorTypes.d.ts +0 -0
  72. /package/dist/{src/types → types}/listTypes.d.ts +0 -0
  73. /package/dist/{src/types → types}/refTypes.d.ts +0 -0
  74. /package/dist/{src/types → types}/searchTypes.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.15.0] - 2026-07-02
6
+
7
+ ### Added
8
+ - **GeoUnitRef**: Introduced a new reactive class wrapper `GeoUnitRef` that wraps the isomorphic `GeoUnit` class to support Vue 3 `Ref` values as input parameters, returning `ComputedRef<string>` values for all unit formatting methods.
9
+ - **useGeoUnitRef**: Added a new composable function `useGeoUnitRef()` to return a `GeoUnitRef` instance.
10
+ - **Tests**: Created comprehensive unit tests in `GeoUnitRef.test.ts` and `useGeoUnitRef.test.ts` to verify Vue reactivity integration.
11
+
5
12
  ## [1.14.5] - 2026-06-29
6
13
 
7
14
  ### Changed
package/ai-description.md CHANGED
@@ -1,18 +1,25 @@
1
- Core Purpose: A reactive framework for Vue 3 providing architectural abstractions for components, advanced API request orchestration with SSR support, internationalization (Intl), data list management, and global utility state synchronization.
1
+ ### Core Purpose
2
+ A high-level utility library designed for Vue 3 providing architectural abstractions for component design, reactive state management, sophisticated API orchestration with SSR support, and localized geographic/unit formatting.
2
3
 
3
- Key Expositions:
4
- - Component Architecture: `DesignConstructorAbstract`, `DesignComponents`, and `DesignAbstract` provide base classes for creating reactive functional components with automatic class/style/slot handling.
5
- - API Management: `useApiRef` (core), `useApiAsyncRef` (SSR-enabled), and `useApiManagementRef` (CRUD/list orchestration) manage requests, caching, validation (integration with `@effect/schema`), and automatic loading states.
6
- - Reactive Utilities: `DatetimeRef`, `GeoRef`, `GeoIntlRef`, `GeoFlagRef` for locale-aware data management; `ListDataRef` for complex list manipulation; `useMeta` for reactive document head management.
7
- - Singleton/State Factories: `executeUse` (global, provide, or local scopes) for managing shared state instances.
8
- - Primitive Wrappers: `useCookieRef`, `useStorageRef`, `useSessionRef`, `useQueryRef`, and `useHashRef` for reactive access to browser storage and URL state.
4
+ ### Key Expositions
5
+ * **Design Architecture:** `DesignConstructorAbstract`, `DesignComponents`, and `DesignAbstract` provide a structured class-based inheritance model for building complex, reactive functional components with automatic lifecycle handling, style/class management, and slotted rendering.
6
+ * **API Orchestration:**
7
+ * `useApiRef`: Centralized reactive API request handler with built-in SSR, caching, transformation, validation (supporting `@effect/schema`), and error handling.
8
+ * `useApiManagementRef` / `useApiManagementAsyncRef`: High-level orchestration for CRUD operations (GET/POST/PUT/DELETE) with client-side searching, list formatting, and atomic mutation state management.
9
+ * Standard wrappers: `useApiGet`, `useApiPost`, `useApiPut`, `useApiDelete` for cleaner endpoint interaction.
10
+ * **Reactive Utilities:**
11
+ * `executeUse`: A factory for creating managed singletons (`global`, `provide`, `local`) to ensure unified state across component trees.
12
+ * `useTranslateRef`, `useStorageRef`, `useCookieRef`, `useSessionRef`: Reactive bridges to local persistence and internationalization.
13
+ * `computedAsync`, `computedEternity`: Advanced reactive primitives for asynchronous data flow and on-demand caching.
14
+ * **Data Formatting:** `GeoIntlRef`, `GeoUnitRef`, and `useFormattersRef` provide reactive, localized formatting for numbers, currencies, units (metric/imperial conversion), and dates.
15
+ * **List & Search Logic:** `ListDataRef` and `useSearchRef` manage complex hierarchical or flat data structures with optimized search and filtering capabilities.
9
16
 
10
- Triggers for Studying ai-types.md:
11
- - When implementing complex component logic involving lifecycle-dependent design systems or custom Vue components using `DesignConstructorAbstract`.
12
- - When dealing with API state, validation contracts, or SSR pre-fetching logic (mandatory for `useApiAsyncRef` or `useApiManagementRef`).
13
- - When defining shared singleton services or managing complex reactive states that require specific injection or scope strategies (`executeUse`).
17
+ ### Triggers for Studying ai-types.md
18
+ Mandatory to review `ai-types.md` when:
19
+ 1. **System Integration:** You are implementing new API endpoints, configuring `dxtFunctionalPlugin`, or setting up global state providers (`executeUseProvide`).
20
+ 2. **Schema Validation:** You are utilizing `validateResponseContract` or `validateRequestContract` and require the expected structure for `ApiDataValidation` or error storage interfaces.
21
+ 3. **Component Construction:** You are extending `DesignConstructorAbstract` or implementing custom component modifications.
22
+ 4. **Type Mapping:** You encounter complex generic constraints in the `useApiManagementRef` signature or `Constr` prefixed utility types (e.g., `ConstrBind`, `ConstrOptions`, `ConstrEmit`).
14
23
 
15
- Integration Context:
16
- - Stack: Built for Vue 3 (Composition API).
17
- - Dependencies: Extends `vue`, `vue-router`, and relies heavily on `@dxtmisha/functional-basic` for underlying logic.
18
- - Infrastructure: Designed to be initialized via `dxtFunctionalPlugin` for global services (API, Translate, Meta, Router). Requires environment-aware implementation for SSR/hydration sequences.
24
+ ### Integration Context
25
+ The library acts as a foundational service layer in the system stack. It integrates directly with Vue 3's composition API, Vue Router for navigation, and `@dxtmisha/functional-basic` for core network and utility logic. It is intended to be used as a singleton-pattern service provider within an application's plugin system via `dxtFunctionalPlugin` to facilitate consistent SSR state hydration and global dependency injection.
package/ai-types.md CHANGED
@@ -19,7 +19,6 @@ export declare abstract class DesignAbstract<T extends Record<string, any>, C ex
19
19
  constructor(props: T, callback?: ((event: C) => void) | undefined, changed?: string[]);
20
20
  make(compelled?: boolean): this;
21
21
  makeCallback(compelled?: boolean): void;
22
- protected abstract initEvent(): void;
23
22
  }
24
23
 
25
24
  // File: src/classes/design/DesignAsyncAbstract.d.ts
@@ -27,7 +26,6 @@ import { DesignAbstract } from './DesignAbstract';
27
26
  export declare abstract class DesignAsyncAbstract<T extends Record<string, any>, C extends Record<string, any>> extends DesignAbstract<T, C> {
28
27
  make(compelled?: boolean): this;
29
28
  makeCallback(compelled?: boolean): Promise<void>;
30
- protected abstract initEvent(): Promise<void>;
31
29
  }
32
30
 
33
31
  // File: src/classes/design/DesignChanged.d.ts
@@ -49,7 +47,6 @@ import { ComputedRef, VNode } from 'vue';
49
47
  import { RawChildren, RawSlots } from '../../types/refTypes';
50
48
  import { ConstrComponent, ConstrComponentMod, ConstrItem } from '../../types/constructorTypes';
51
49
  export declare class DesignComponents<COMP extends ConstrComponent, P extends ConstrItem> {
52
- protected caching: Record<string, ComputedRef<any>>;
53
50
  constructor(components?: COMP, modification?: ConstrComponentMod<P> | undefined);
54
51
  is<K extends keyof COMP>(name: K): name is K;
55
52
  get<K extends keyof COMP>(name: K): COMP[K];
@@ -62,20 +59,8 @@ export declare class DesignComponents<COMP extends ConstrComponent, P extends Co
62
59
  // File: src/classes/design/DesignConstructorAbstract.d.ts
63
60
  import { ComputedRef, ToRefs, VNode, Ref } from 'vue';
64
61
  import { DesignComponents } from './DesignComponents';
65
- import { ConstrClass, ConstrClassObject, ConstrComponent, ConstrEmit, ConstrExpose, ConstrItem, ConstrOptions, ConstrStyles } from '../../types/constructorTypes';
62
+ import { ConstrClass, ConstrClasses, ConstrClassObject, ConstrComponent, ConstrEmit, ConstrExpose, ConstrItem, ConstrOptions, ConstrStyles } from '../../types/constructorTypes';
66
63
  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> {
67
- protected readonly props: Readonly<P>;
68
- protected readonly options?: ConstrOptions<COMP, EMITS, P> | undefined;
69
- protected readonly name: string[];
70
- protected readonly element: Ref<E | undefined, E | undefined>;
71
- protected readonly refs: ToRefs<P>;
72
- protected readonly components: DesignComponents<COMP, P>;
73
- protected readonly emits?: ConstrEmit<EMITS>;
74
- protected readonly classes?: ComputedRef<CLASSES>;
75
- protected readonly styles?: ComputedRef<ConstrStyles>;
76
- protected attrs?: ConstrItem;
77
- protected slots?: SLOTS;
78
- protected dataExpose?: EXPOSE;
79
64
  protected constructor(name: string, props: Readonly<P>, options?: ConstrOptions<COMP, EMITS, P> | undefined);
80
65
  protected init(): this;
81
66
  getName(): string;
@@ -86,10 +71,6 @@ export declare abstract class DesignConstructorAbstract<E extends Element, COMP
86
71
  getAttrs(): ConstrItem;
87
72
  expose(): ConstrExpose<E, EXPOSE>;
88
73
  render(): () => VNode | (VNode | any)[] | undefined;
89
- protected abstract initExpose(): EXPOSE;
90
- protected abstract initClasses(): Partial<CLASSES>;
91
- protected abstract initStyles(): ConstrStyles;
92
- protected abstract initRender(): VNode | (VNode | any)[] | undefined;
93
74
  protected initSlot<K extends keyof SLOTS>(name: K, children?: any[], props?: ConstrItem): VNode | undefined;
94
75
  protected toClass(classes?: ConstrClass): ConstrClassObject;
95
76
  protected toClassName<T extends ConstrItem>(classes?: ConstrItem): T;
@@ -131,7 +112,7 @@ export declare class EventRef<E extends ElementOrWindow, O extends Event, D exte
131
112
 
132
113
  // File: src/classes/ref/GeoFlagRef.d.ts
133
114
  import { ComputedRef } from 'vue';
134
- import { GeoFlagItem, GeoFlagNational } from '@dxtmisha/functional-basic';
115
+ import { GeoFlag, GeoFlagItem, GeoFlagNational } from '@dxtmisha/functional-basic';
135
116
  import { RefOrNormal } from '../../types/refTypes';
136
117
  export declare class GeoFlagRef {
137
118
  constructor(code?: RefOrNormal<string | undefined>);
@@ -191,9 +172,31 @@ export declare class GeoRef {
191
172
  static setValueDefault(code?: string | (() => string)): void;
192
173
  }
193
174
 
175
+ // File: src/classes/ref/GeoUnitRef.d.ts
176
+ import { ComputedRef, Ref } from 'vue';
177
+ import { GeoUnit, NumberOrString } from '@dxtmisha/functional-basic';
178
+ import { RefOrNormal } from '../../types/refTypes';
179
+ export declare class GeoUnitRef {
180
+ constructor(code?: RefOrNormal<string>);
181
+ getLocation(): ComputedRef<string>;
182
+ millimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
183
+ centimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
184
+ meter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
185
+ kilometer(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
186
+ squareMeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
187
+ hectare(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
188
+ gram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
189
+ kilogram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
190
+ tonne(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
191
+ milliliter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
192
+ liter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
193
+ celsius(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
194
+ kilometerPerHour(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
195
+ }
196
+
194
197
  // File: src/classes/ref/ListDataRef.d.ts
195
198
  import { RefOrNormal, RefType } from '../../types/refTypes';
196
- import { ListDataFull, ListDataItem, ListList, ListNames, ListSelectedItem, ListSelectedList } from '../../types/listTypes';
199
+ import { ListDataFull, ListDataItem, ListList, ListListInput, ListNames, ListSelectedItem, ListSelectedList } from '../../types/listTypes';
197
200
  import { ComputedRef } from 'vue';
198
201
  export declare class ListDataRef {
199
202
  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);
@@ -272,7 +275,8 @@ export declare function useApiAsyncRef<R, T = R>(path?: RefOrNormal<string | und
272
275
  import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
273
276
  import { UseApiRequestSetup } from './useApiRequest';
274
277
  import { Ref } from 'vue';
275
- export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
278
+ export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
279
+ }
276
280
  export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiDeleteSetup<T, Request, Return>): {
277
281
  loading: Ref<boolean, boolean>;
278
282
  send(request?: Request | undefined): Promise<Return | undefined>;
@@ -282,7 +286,8 @@ export declare function useApiDelete<T, Request extends ApiFetch['request'] = Ap
282
286
  import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
283
287
  import { UseApiRequestSetup } from './useApiRequest';
284
288
  import { Ref } from 'vue';
285
- export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
289
+ export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
290
+ }
286
291
  export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiGetSetup<T, Request, Return>): {
287
292
  loading: Ref<boolean, boolean>;
288
293
  send(request?: Request | undefined): Promise<Return | undefined>;
@@ -354,7 +359,8 @@ export declare function useApiManagementRef<Return extends ApiManagementValue, F
354
359
  import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
355
360
  import { UseApiRequestSetup } from './useApiRequest';
356
361
  import { Ref } from 'vue';
357
- export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
362
+ export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
363
+ }
358
364
  export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPostSetup<T, Request, Return>): {
359
365
  loading: Ref<boolean, boolean>;
360
366
  send(request?: Request | undefined): Promise<Return | undefined>;
@@ -364,7 +370,8 @@ export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiF
364
370
  import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
365
371
  import { UseApiRequestSetup } from './useApiRequest';
366
372
  import { Ref } from 'vue';
367
- export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
373
+ export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
374
+ }
368
375
  export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPutSetup<T, Request, Return>): {
369
376
  loading: Ref<boolean, boolean>;
370
377
  send(request?: Request | undefined): Promise<Return | undefined>;
@@ -422,7 +429,8 @@ export declare function useApiRequest<T, Request extends ApiFetch['request'] = A
422
429
 
423
430
  // File: src/composables/ref/useBroadcastValueRef.d.ts
424
431
  import { Ref } from 'vue';
425
- export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<T | string | undefined>;
432
+ type BroadcastValueItem<T> = T | string | undefined;
433
+ export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<BroadcastValueItem<T>>;
426
434
 
427
435
  // File: src/composables/ref/useCookieRef.d.ts
428
436
  import { Ref } from 'vue';
@@ -442,12 +450,17 @@ export declare function useFormattersRef<Options extends FormattersOptionsList =
442
450
  import { GeoIntlRef } from '../../classes/ref/GeoIntlRef';
443
451
  export declare function useGeoIntlRef(): GeoIntlRef;
444
452
 
453
+ // File: src/composables/ref/useGeoUnitRef.d.ts
454
+ import { GeoUnitRef } from '../../classes/ref/GeoUnitRef';
455
+ export declare function useGeoUnitRef(): GeoUnitRef;
456
+
445
457
  // File: src/composables/ref/useHashRef.d.ts
446
458
  import { ShallowRef } from 'vue';
447
459
  export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
448
460
 
449
461
  // File: src/composables/ref/useLazyItemByMarginRef.d.ts
450
462
  import { RefType } from '../../types/refTypes';
463
+ export type LazyItemByMargin = { rootMargin: string; item: any; };
451
464
  export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin: string) => {
452
465
  lazyItemStatus: any;
453
466
  readonly lazyItem: any;
@@ -455,9 +468,16 @@ export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | und
455
468
 
456
469
  // File: src/composables/ref/useLazyRef.d.ts
457
470
  import { Ref, ShallowRef } from 'vue';
471
+ export type LazyItem = {
472
+ status: ShallowRef<boolean>;
473
+ ratio: ShallowRef<number>;
474
+ entry: ShallowRef<IntersectionObserverEntry | undefined>;
475
+ stopWatch: () => void;
476
+ };
477
+ export type LazyList = Record<string, LazyItem>;
458
478
  export declare const useLazyRef: (options?: IntersectionObserverInit) => {
459
479
  intersectionObserver: IntersectionObserver | undefined;
460
- getItem(element: HTMLElement): any;
480
+ getItem(element: HTMLElement): LazyItem;
461
481
  addLazyItem(element: Ref<HTMLElement | undefined>): ShallowRef<boolean, boolean>;
462
482
  removeLazyItem: (element?: HTMLElement) => void;
463
483
  disconnectLazy: () => void | undefined;
@@ -493,10 +513,33 @@ export declare const useMeta: () => Readonly<{
493
513
  setRobots: (value: MetaRobots) => void;
494
514
  setSiteName: (value: string) => void;
495
515
  setSuffix: (suffix: string) => typeof MetaStatic;
496
- }> & {
497
- init(): any;
516
+ } & {
517
+ init(): Readonly<{
518
+ meta: typeof MetaStatic;
519
+ title: Ref<string, string>;
520
+ keyword: Ref<string, string>;
521
+ description: Ref<string, string>;
522
+ author: Ref<string, string>;
523
+ image: Ref<string, string>;
524
+ canonical: Ref<string, string>;
525
+ robots: Ref<MetaRobots, MetaRobots>;
526
+ siteName: Ref<string, string>;
527
+ getHtmlMeta: () => string;
528
+ sync: () => void;
529
+ update: () => void;
530
+ updateSsr: () => void;
531
+ setTitle: (value: string) => void;
532
+ setKeywords: (value: string) => void;
533
+ setDescription: (value: string) => void;
534
+ setAuthor: (value: string) => void;
535
+ setImage: (value: string) => void;
536
+ setCanonical: (value: string) => void;
537
+ setRobots: (value: MetaRobots) => void;
538
+ setSiteName: (value: string) => void;
539
+ setSuffix: (suffix: string) => typeof MetaStatic;
540
+ }>;
498
541
  destroyExecute?(): void;
499
- };
542
+ }>;
500
543
 
501
544
  // File: src/composables/ref/useQueryRef.d.ts
502
545
  import { ShallowRef } from 'vue';
@@ -685,6 +728,7 @@ export * from './classes/ref/EventRef';
685
728
  export * from './classes/ref/GeoFlagRef';
686
729
  export * from './classes/ref/GeoIntlRef';
687
730
  export * from './classes/ref/GeoRef';
731
+ export * from './classes/ref/GeoUnitRef';
688
732
  export * from './classes/ref/ListDataRef';
689
733
  export * from './classes/ref/RouterItemRef';
690
734
  export * from './classes/ref/ScrollbarWidthRef';
@@ -701,6 +745,7 @@ export * from './composables/ref/useBroadcastValueRef';
701
745
  export * from './composables/ref/useCookieRef';
702
746
  export * from './composables/ref/useFormattersRef';
703
747
  export * from './composables/ref/useGeoIntlRef';
748
+ export * from './composables/ref/useGeoUnitRef';
704
749
  export * from './composables/ref/useHashRef';
705
750
  export * from './composables/ref/useLazyItemByMarginRef';
706
751
  export * from './composables/ref/useLazyRef';
@@ -805,8 +850,17 @@ export type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP
805
850
  styles: RefType<ConstrStyles>;
806
851
  } & SETUP;
807
852
  export type ConstrRegistration = { flag?: boolean; translate?: Record<string, string>; };
808
- export type ConstrBind<T> = T & Record<string, any> & { key?: string; class?: ConstrClass; style?: ConstrStyles; };
809
- export type ConstrPropItemOptions<T = any> = { type?: PropType<T>; required?: boolean; default?: any; validator?(value: any, props: any): boolean; };
853
+ export type ConstrBind<T> = T & Record<string, any> & {
854
+ key?: string;
855
+ class?: ConstrClass;
856
+ style?: ConstrStyles;
857
+ };
858
+ export type ConstrPropItemOptions<T = any> = {
859
+ type?: PropType<T>;
860
+ required?: boolean;
861
+ default?: any;
862
+ validator?(value: any, props: any): boolean;
863
+ };
810
864
  export type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
811
865
  export type ConstrProps<P = Record<string, any>> = { [K in keyof P]: ConstrPropItem<P[K]>; };
812
866
  export type ConstrHrefProps = { href?: string; };
@@ -815,11 +869,25 @@ export type ConstrHrefProps = { href?: string; };
815
869
  import { NumberOrString, NumberOrStringOrBoolean } from '@dxtmisha/functional-basic';
816
870
  import { ConstrBind } from './constructorTypes';
817
871
  export type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
818
- export type ListDataBasic = { label?: NumberOrString; value?: any; search?: string; };
819
- export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & { parent?: string; type: ListType; index: string; disabled?: boolean; }>;
872
+ export type ListDataBasic = {
873
+ label?: NumberOrString;
874
+ value?: any;
875
+ search?: string;
876
+ };
877
+ export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & {
878
+ parent?: string;
879
+ type: ListType;
880
+ index: string;
881
+ disabled?: boolean;
882
+ }>;
820
883
  export type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
821
884
  export type ListRecord<Item extends ListDataBasic = ListDataBasic> = ListList<Item> | Record<string, any>;
822
- export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & { focus: boolean; highlight?: string; selected: boolean; disabled?: boolean; };
885
+ export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
886
+ focus: boolean;
887
+ highlight?: string;
888
+ selected: boolean;
889
+ disabled?: boolean;
890
+ };
823
891
  export type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
824
892
  export type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
825
893
  export type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
@@ -0,0 +1,153 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { GeoUnit, NumberOrString } from '@dxtmisha/functional-basic';
3
+ import { RefOrNormal } from '../../types/refTypes';
4
+ /**
5
+ * Reactive class for managing localized unit formatting and automatic conversions.
6
+ *
7
+ * Реактивный класс для управления локализованным форматированием единиц измерения и автоматической конвертацией.
8
+ */
9
+ export declare class GeoUnitRef {
10
+ /** Location reference / Ссылка на локацию */
11
+ protected location: Ref<string | undefined>;
12
+ /** Computed instance of GeoUnit / Вычисляемый экземпляр GeoUnit */
13
+ protected unitInstance: ComputedRef<GeoUnit>;
14
+ /**
15
+ * Constructor.
16
+ * @param code country code, full form language-country or one of them / код страны, полный вид язык-страна или один из них
17
+ */
18
+ constructor(code?: RefOrNormal<string>);
19
+ /**
20
+ * Returns the standard location code.
21
+ *
22
+ * Возвращает стандартный код местоположения.
23
+ * @returns standard location code / стандартный код местоположения
24
+ */
25
+ getLocation(): ComputedRef<string>;
26
+ /**
27
+ * Formats millimeter value, converting to inches if overridden by locale unit settings.
28
+ *
29
+ * Форматирует значение в миллиметрах, конвертируя в дюймы, если это переопределено настройками локали.
30
+ * @param value numeric value to format / числовое значение для форматирования
31
+ * @param options formatting options / параметры форматирования
32
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
33
+ */
34
+ millimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
35
+ /**
36
+ * Formats centimeter value, converting to inches if overridden by locale unit settings.
37
+ *
38
+ * Форматирует значение в сантиметрах, конвертируя в дюймы, если это переопределено настройками локали.
39
+ * @param value numeric value to format / числовое значение для форматирования
40
+ * @param options formatting options / параметры форматирования
41
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
42
+ */
43
+ centimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
44
+ /**
45
+ * Formats meter value, converting to feet if overridden by locale unit settings.
46
+ *
47
+ * Форматирует значение в метрах, конвертируя в футы, если это переопределено настройками локали.
48
+ * @param value numeric value to format / числовое значение для форматирования
49
+ * @param options formatting options / параметры форматирования
50
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
51
+ */
52
+ meter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
53
+ /**
54
+ * Formats kilometer value, converting to miles if overridden by locale unit settings.
55
+ *
56
+ * Форматирует значение в километрах, конвертируя в мили, если это переопределено настройками локали.
57
+ * @param value numeric value to format / числовое значение для форматирования
58
+ * @param options formatting options / параметры форматирования
59
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
60
+ */
61
+ kilometer(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
62
+ /**
63
+ * Formats square meter value, converting to square feet if overridden by locale unit settings.
64
+ *
65
+ * Форматирует значение в квадратных метрах, конвертируя в квадратные футы, если это переопределено настройками локали.
66
+ * @param value numeric value to format / числовое значение для форматирования
67
+ * @param options formatting options / параметры форматирования
68
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
69
+ */
70
+ squareMeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
71
+ /**
72
+ * Formats hectare value, converting to acres if overridden by locale unit settings.
73
+ *
74
+ * Форматирует значение в гектарах, конвертируя в акры, если это переопределено настройками локали.
75
+ * @param value numeric value to format / числовое значение для форматирования
76
+ * @param options formatting options / параметры форматирования
77
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
78
+ */
79
+ hectare(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
80
+ /**
81
+ * Formats gram value, converting to ounces if overridden by locale unit settings.
82
+ *
83
+ * Форматирует значение в граммах, конвертируя в унции, если это переопределено настройками локали.
84
+ * @param value numeric value to format / числовое значение для форматирования
85
+ * @param options formatting options / параметры форматирования
86
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
87
+ */
88
+ gram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
89
+ /**
90
+ * Formats kilogram value, converting to pounds if overridden by locale unit settings.
91
+ *
92
+ * Форматирует значение в килограммах, конвертируя в фунты, если это переопределено настройками локали.
93
+ * @param value numeric value to format / числовое значение для форматирования
94
+ * @param options formatting options / параметры форматирования
95
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
96
+ */
97
+ kilogram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
98
+ /**
99
+ * Formats tonne value, converting to short tons if overridden by locale unit settings.
100
+ *
101
+ * Форматирует значение в тоннах, конвертируя в короткие тонны, если это переопределено настройками локали.
102
+ * @param value numeric value to format / числовое значение для форматирования
103
+ * @param options formatting options / параметры форматирования
104
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
105
+ */
106
+ tonne(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
107
+ /**
108
+ * Formats milliliter value, converting to fluid ounces if overridden by locale unit settings.
109
+ *
110
+ * Форматирует значение в миллилитрах, конвертируя в жидкие унции, если это переопределено настройками локали.
111
+ * @param value numeric value to format / числовое значение для форматирования
112
+ * @param options formatting options / параметры форматирования
113
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
114
+ */
115
+ milliliter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
116
+ /**
117
+ * Formats liter value, converting to gallons if overridden by locale unit settings.
118
+ *
119
+ * Форматирует значение в литрах, конвертируя в галлоны, если это переопределено настройками локали.
120
+ * @param value numeric value to format / числовое значение для форматирования
121
+ * @param options formatting options / параметры форматирования
122
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
123
+ */
124
+ liter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
125
+ /**
126
+ * Formats celsius value, converting to fahrenheit if overridden by locale unit settings.
127
+ *
128
+ * Форматирует значение в градусах Цельсия, конвертируя в градусы Фаренгейта, если это переопределено настройками локали.
129
+ * @param value numeric value to format / числовое значение для форматирования
130
+ * @param options formatting options / параметры форматирования
131
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
132
+ */
133
+ celsius(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
134
+ /**
135
+ * Formats kilometer per hour value, converting to miles per hour if overridden by locale unit settings.
136
+ *
137
+ * Форматирует значение в километрах в час, конвертируя в мили в час, если это переопределено настройками локали.
138
+ * @param value numeric value to format / числовое значение для форматирования
139
+ * @param options formatting options / параметры форматирования
140
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
141
+ */
142
+ kilometerPerHour(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
143
+ /**
144
+ * Formats the value for the specified unit reactively, converting and formatting it according to the locale.
145
+ *
146
+ * Форматирует значение для указанной единицы измерения реактивно, преобразуя и форматируя его в соответствии с локалью.
147
+ * @param value numeric value to format / числовое значение для форматирования
148
+ * @param unit unit of measurement / единица измерения
149
+ * @param options formatting options / параметры форматирования
150
+ * @returns computed formatted unit string / вычисляемая отформатированная строка единицы измерения
151
+ */
152
+ format(value: RefOrNormal<NumberOrString>, unit: RefOrNormal<string>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
153
+ }
@@ -1,4 +1,4 @@
1
- import { RouteLocationRaw, Router } from 'vue-router';
1
+ import { RouteLocationRaw, Router, _RouterClassic } from 'vue-router';
2
2
  import { ConstrHrefProps } from '../../types/constructorTypes';
3
3
  /**
4
4
  * Router management class.
@@ -11,7 +11,7 @@ export declare class RouterItemRef {
11
11
  *
12
12
  * Получить экземпляр роутера.
13
13
  */
14
- static get(): Router;
14
+ static get(): _RouterClassic;
15
15
  /**
16
16
  * Returns the link by name.
17
17
  *
@@ -0,0 +1,7 @@
1
+ import { GeoUnitRef } from '../../classes/ref/GeoUnitRef';
2
+ /**
3
+ * Returns a class object for working with unit formatting and automatic conversions.
4
+ *
5
+ * Возвращает объект класса для работы с форматированием единиц измерения и автоматической конвертацией.
6
+ */
7
+ export declare function useGeoUnitRef(): GeoUnitRef;
@@ -10,6 +10,7 @@ export * from './classes/ref/EventRef';
10
10
  export * from './classes/ref/GeoFlagRef';
11
11
  export * from './classes/ref/GeoIntlRef';
12
12
  export * from './classes/ref/GeoRef';
13
+ export * from './classes/ref/GeoUnitRef';
13
14
  export * from './classes/ref/ListDataRef';
14
15
  export * from './classes/ref/RouterItemRef';
15
16
  export * from './classes/ref/ScrollbarWidthRef';
@@ -26,6 +27,7 @@ export * from './composables/ref/useBroadcastValueRef';
26
27
  export * from './composables/ref/useCookieRef';
27
28
  export * from './composables/ref/useFormattersRef';
28
29
  export * from './composables/ref/useGeoIntlRef';
30
+ export * from './composables/ref/useGeoUnitRef';
29
31
  export * from './composables/ref/useHashRef';
30
32
  export * from './composables/ref/useLazyItemByMarginRef';
31
33
  export * from './composables/ref/useLazyRef';