@dxtmisha/functional 1.11.1 → 1.11.7

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 (69) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/ai-description.txt +5 -0
  3. package/ai-types.txt +176 -138
  4. package/dist/classes/design/DesignAbstract.d.ts +61 -0
  5. package/dist/classes/design/DesignAsyncAbstract.d.ts +28 -0
  6. package/dist/classes/design/DesignChanged.d.ts +42 -0
  7. package/dist/classes/design/DesignComp.d.ts +4 -0
  8. package/dist/classes/design/DesignComponents.d.ts +81 -0
  9. package/dist/classes/design/DesignConstructorAbstract.d.ts +150 -0
  10. package/dist/classes/ref/DatetimeRef.d.ts +123 -0
  11. package/dist/classes/ref/EffectScopeGlobal.d.ts +22 -0
  12. package/dist/classes/ref/EventRef.d.ts +22 -0
  13. package/dist/classes/ref/GeoFlagRef.d.ts +51 -0
  14. package/dist/classes/ref/GeoIntlRef.d.ts +213 -0
  15. package/dist/classes/ref/GeoRef.d.ts +58 -0
  16. package/dist/classes/ref/ListDataRef.d.ts +359 -0
  17. package/dist/classes/ref/RouterItemRef.d.ts +61 -0
  18. package/dist/classes/ref/ScrollbarWidthRef.d.ts +22 -0
  19. package/dist/composables/ref/useApiAsyncRef.d.ts +18 -0
  20. package/dist/composables/ref/useApiDelete.d.ts +20 -0
  21. package/dist/composables/ref/useApiGet.d.ts +20 -0
  22. package/dist/composables/ref/useApiManagementAsyncRef.d.ts +49 -0
  23. package/dist/composables/ref/useApiManagementRef.d.ts +155 -0
  24. package/dist/composables/ref/useApiPost.d.ts +20 -0
  25. package/dist/composables/ref/useApiPut.d.ts +20 -0
  26. package/dist/composables/ref/useApiRef.d.ts +106 -0
  27. package/dist/composables/ref/useApiRequest.d.ts +28 -0
  28. package/dist/composables/ref/useBroadcastValueRef.d.ts +11 -0
  29. package/dist/composables/ref/useCookieRef.d.ts +11 -0
  30. package/dist/composables/ref/useFormattersRef.d.ts +21 -0
  31. package/dist/composables/ref/useGeoIntlRef.d.ts +7 -0
  32. package/dist/composables/ref/useHashRef.d.ts +9 -0
  33. package/dist/composables/ref/useLazyItemByMarginRef.d.ts +22 -0
  34. package/dist/composables/ref/useLazyRef.d.ts +42 -0
  35. package/dist/composables/ref/useLoadingRef.d.ts +7 -0
  36. package/dist/composables/ref/useMeta.d.ts +223 -0
  37. package/dist/composables/ref/useRouterList.d.ts +28 -0
  38. package/dist/composables/ref/useSearchRef.d.ts +36 -0
  39. package/dist/composables/ref/useSearchValueRef.d.ts +19 -0
  40. package/dist/composables/ref/useSessionRef.d.ts +9 -0
  41. package/dist/composables/ref/useStorageRef.d.ts +10 -0
  42. package/dist/composables/ref/useTranslateRef.d.ts +40 -0
  43. package/dist/flags.d.ts +1 -0
  44. package/dist/functions/basic.d.ts +1 -0
  45. package/dist/functions/computedAsync.d.ts +13 -0
  46. package/dist/functions/computedByLanguage.d.ts +15 -0
  47. package/dist/functions/computedEternity.d.ts +15 -0
  48. package/dist/functions/dxtFunctionalPlugin.d.ts +61 -0
  49. package/dist/functions/executeUse.d.ts +216 -0
  50. package/dist/functions/getInject.d.ts +7 -0
  51. package/dist/functions/getOptions.d.ts +10 -0
  52. package/dist/functions/ref/getBindRef.d.ts +13 -0
  53. package/dist/functions/ref/getRef.d.ts +8 -0
  54. package/dist/functions/ref/render.d.ts +13 -0
  55. package/dist/functions/ref/setRef.d.ts +9 -0
  56. package/dist/functions/ref/toRefItem.d.ts +9 -0
  57. package/dist/functions/render/getBind.d.ts +14 -0
  58. package/dist/functions/render/getClassName.d.ts +8 -0
  59. package/dist/functions/render/getIndexForRender.d.ts +10 -0
  60. package/dist/functions/toBind.d.ts +10 -0
  61. package/dist/functions/toBinds.d.ts +9 -0
  62. package/dist/library.d.ts +62 -2772
  63. package/dist/library.js +323 -262
  64. package/dist/types/apiTypes.d.ts +66 -0
  65. package/dist/types/constructorTypes.d.ts +126 -0
  66. package/dist/types/listTypes.d.ts +63 -0
  67. package/dist/types/refTypes.d.ts +36 -0
  68. package/dist/types/searchTypes.d.ts +6 -0
  69. package/package.json +7 -5
package/CHANGELOG.md ADDED
@@ -0,0 +1,79 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [1.11.6] - 2026-05-01
6
+
7
+ ### Added
8
+ - **useApiAsyncRef**: Introduced `useApiAsyncRef` for asynchronous API initialization within Vue async setup components.
9
+ - **useApiRef**: Added support for synchronous cache recovery via `recovery()`.
10
+ - **useApiRef**: Added support for server prefetching via `initSsr()` and Vue's `onServerPrefetch`.
11
+ - **getInject**: Moved utility to `@dxtmisha/functional` for wider availability and easier dependency injection.
12
+
13
+ ### Changed / Improved
14
+ - **useApiRef**: Enhanced with response contract validation and improved initialization logic.
15
+ - **useApiRef**: Optimized internals with new helpers like `isConditions` and `getApiFetch`.
16
+ - **SSR & Hydration**: Improved hydration stability by ensuring API data is available immediately upon client mount, preventing flickering and mismatches.
17
+
18
+ ## [1.1.5] - 2026-04-26
19
+
20
+ ### Added
21
+ - **Api**: Added `setOrigin()` and `getOrigin()` methods for managing the protocol and domain of the base URL.
22
+ - **Api**: Added `setConfig()` method for bulk configuration of API settings.
23
+ - **Api**: Added support for `endResetLimit` in `ApiFetch` to control recursive retries via `setEnd`.
24
+ - **Api**: Added support for jittered retry delays to prevent request thundering herds.
25
+ - **ServerStorage**: Added `remove()` method for deleting items from storage.
26
+ - **ServerStorage**: Added `setErrorStatus()` method to toggle visibility of context-missing errors.
27
+
28
+ ## [1.1.4] - 2026-04-25
29
+
30
+ ### Added
31
+ - **Meta**: Added `htmlTitle()` method to `Meta`, `MetaStatic`, and `MetaManager` classes for generating HTML-safe title strings.
32
+
33
+ ### Changed / Improved
34
+ - **MetaManager**: The `toHtml()` method now excludes the `<title>` tag, allowing for more flexible title management via `htmlTitle()`.
35
+ - **Package**: Added `CHANGELOG.md` to the list of files included in the package distribution.
36
+
37
+ ## [1.1.3] - 2026-04-24
38
+
39
+ ### Added
40
+ - **ResumableTimer**: Added a new class for managing timers with pause and resume functionality.
41
+ - **ApiDataReturn**: Implemented a class for standardizing API responses with support for descriptions and texts.
42
+ - **MetaStatic**: Added a class for managing static meta-data.
43
+ - **Datetime**: Added functionality for working with dates and times.
44
+ - **Translate**: Implemented a localization and translation system.
45
+ - **GeoInstance**: Added an instance for advanced geolocation data handling.
46
+ - **ApiHydration**: Added support for API data hydration for SSR.
47
+ - **StorageCallback**: Added a callback mechanism for tracking storage changes.
48
+ - **New Functions**:
49
+ - `getCurrentTime` — returns the current time.
50
+ - `getArrayHighlightMatch` — searches for and highlights matches in arrays.
51
+
52
+ ### Changed / Improved
53
+ - **Refactoring**: Major refactoring of the `functional-basic` package to improve architecture.
54
+ - **SSR**: Adapted the API and related modules for full Server-Side Rendering support.
55
+ - **API**:
56
+ - Improved the core `Api` class.
57
+ - Refined `ApiCache` and caching systems.
58
+ - **Cookie**:
59
+ - Completely redesigned the Cookie handling mechanics, including `CookieBlock` and `CookieStorage`.
60
+ - Added `getListenerRaw` support to `CookieStorage.init()` for initializing from raw cookie strings (essential for SSR).
61
+ - Extracted cookie parsing and formatting logic into protected `parse()` and `format()` methods.
62
+ - Expanded `CookieOptions` to support modern attributes: `path`, `domain`, `secure`, `httpOnly`, and `partitioned` (CHIPS).
63
+ - Updated `setListener` signature to include the fully formatted cookie string as a third parameter, facilitating easier SSR header management.
64
+ - **Function Optimization**:
65
+ - `getSearchExp` and `getSeparatingSearchExp` — refined search mechanisms.
66
+ - `getRequestString` — improved query string generation.
67
+ - `addTagHighlightMatch` — optimized tag highlighting.
68
+ - `applyTemplate` — expanded template support.
69
+ - `forEach`, `frame`, `blobToBase64`, `getElementId` — technical improvements and optimization.
70
+
71
+ ### Fixed
72
+ - **Testing**: Fixed and updated all unit tests (`vitest`) for stability and coverage.
73
+ - **Geo**: Fixed logic errors in geolocation functions and their tests.
74
+ - Fixed type definition errors and minor bugs in core functions.
75
+
76
+ ### Documentation
77
+ - **JSDoc**: Completed a full revision and standardization of JSDoc comments for all classes and functions.
78
+ - **ServerStorage**: Added detailed descriptions of methods and operating principles.
79
+ - Updated `ApiDataReturn` documentation.
@@ -0,0 +1,5 @@
1
+ A Vue 3-centric orchestration framework and utility library designed for reactive data management, API synchronization, and localized UI logic. Its primary function is providing high-level abstractions for network request life cycles, including integrated GET/mutation handling with skeleton support, and complex list state management covering focus, selection, and client-side filtering. It offers specialized reactive primitives such as asynchronous computed properties, demand-cached refs, and multi-strategy singleton management using Global, Local, and Provide/Inject patterns.
2
+
3
+ An AI should study this API when implementing robust API-to-UI orchestration involving data transformation and contract validation, or when developing UI components that require standardized class/style resolution through the library’s abstract design classes. It is indispensable for scenarios requiring multi-tab state synchronization via broadcast channels, cookie-backed reactive variables, and SSR-compatible SEO meta-tag management. The library's i18n and localization modules are critical for handling country-specific formatting for currencies, units, relative time, and geographical metadata.
4
+
5
+ The library is built upon the Vue 3 Composition API and @dxtmisha/functional-basic, integrating directly with Vue Router for navigation-aware data structures. It functions as a middleware layer between raw data sources and the presentation layer, requiring the dxtFunctionalPlugin for global service initialization including API clients, translation instances, and icon configurations.