@dxtmisha/functional 1.15.2 → 1.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.15.3] - 2026-07-14
6
+
7
+ ### Changed
8
+ - **executeUse**: Refactored singleton lifecycle and cache management to use `ServerStorage` with key `__executeUse::${id}__` via a `storageKey` constant, replacing local closure variables and supporting clean instance removal.
9
+ - **useMeta**: Updated metadata initialization to reference `MetaStatic.getItem()` rather than using the class object itself.
10
+
11
+ ### Fixed
12
+ - **Tests**: Fixed the mock setup in `useMeta.test.ts` to include the `getItem` method on the mocked `MetaStatic` class.
13
+
5
14
  ## [1.15.0] - 2026-07-02
6
15
 
7
16
  ### Added
@@ -1,4 +1,4 @@
1
- import { MetaRobots, MetaStatic } from '@dxtmisha/functional-basic';
1
+ import { MetaRobots, Meta } from '@dxtmisha/functional-basic';
2
2
  import { Ref } from 'vue';
3
3
  /**
4
4
  * Vue composable for reactive meta tags management with automatic DOM synchronization.
@@ -8,7 +8,7 @@ import { Ref } from 'vue';
8
8
  * Использует паттерн singleton - все компоненты используют одно состояние мета-тегов.
9
9
  */
10
10
  export declare const useMeta: () => Readonly<{
11
- meta: typeof MetaStatic;
11
+ meta: Meta;
12
12
  /** Reactive page title (without suffix) / Реактивный заголовок страницы (без суффикса) */
13
13
  title: Ref<string, string>;
14
14
  /** Reactive keywords meta tag / Реактивный мета-тег keywords */
@@ -111,10 +111,10 @@ export declare const useMeta: () => Readonly<{
111
111
  * Устанавливает суффикс для заголовка страницы.
112
112
  * @param suffix Suffix to set / Суффикс для установки
113
113
  */
114
- setSuffix: (suffix: string) => typeof MetaStatic;
114
+ setSuffix: (suffix: string) => void;
115
115
  } & {
116
116
  init(): Readonly<{
117
- meta: typeof MetaStatic;
117
+ meta: Meta;
118
118
  /** Reactive page title (without suffix) / Реактивный заголовок страницы (без суффикса) */
119
119
  title: Ref<string, string>;
120
120
  /** Reactive keywords meta tag / Реактивный мета-тег keywords */
@@ -217,7 +217,7 @@ export declare const useMeta: () => Readonly<{
217
217
  * Устанавливает суффикс для заголовка страницы.
218
218
  * @param suffix Suffix to set / Суффикс для установки
219
219
  */
220
- setSuffix: (suffix: string) => typeof MetaStatic;
220
+ setSuffix: (suffix: string) => void;
221
221
  }>;
222
222
  destroyExecute?(): void;
223
223
  }>;
package/dist/library.js CHANGED
@@ -1181,7 +1181,7 @@ var dt = /* @__PURE__ */ function(e) {
1181
1181
  return e.global = "global", e.provide = "provide", e.local = "local", e;
1182
1182
  }({}), ft = 1, pt = re(1e5, 999999), mt = () => `__execute_use${pt}::${ft++}`, ht = () => x.get("__ui:execute-use-global__", () => []);
1183
1183
  function $(e, t = "provide") {
1184
- let n = mt(), r, i = (t) => {
1184
+ let n = mt(), r = `__executeUse::${n}__`, i = (t) => {
1185
1185
  let n = Object.freeze(e(...t));
1186
1186
  return {
1187
1187
  ...n,
@@ -1197,12 +1197,10 @@ function $(e, t = "provide") {
1197
1197
  return Object.freeze({
1198
1198
  ...t,
1199
1199
  destroyExecute() {
1200
- r = void 0;
1200
+ x.remove(r);
1201
1201
  }
1202
1202
  });
1203
- }, s = (...e) => t === "provide" ? de(n, void 0) || a(e) : (r || K.run(() => {
1204
- r = o(e);
1205
- }), r);
1203
+ }, s = (...e) => t === "provide" ? de(n, void 0) || a(e) : x.get(r, () => K.run(() => o(e)));
1206
1204
  return t === "global" && ht().push(s), s;
1207
1205
  }
1208
1206
  function gt(e) {
@@ -1220,7 +1218,7 @@ function yt() {
1220
1218
  //#endregion
1221
1219
  //#region src/composables/ref/useMeta.ts
1222
1220
  var bt = vt(() => {
1223
- let e = _, t = L(e.getTitle()), n = L(e.getKeywords()), r = L(e.getDescription()), i = L(e.getImage()), a = L(e.getCanonical()), o = L(e.getRobots()), s = L(e.getAuthor()), c = L(e.getSiteName()), l = () => e.html(), u = (e) => {
1221
+ let e = _.getItem(), t = L(e.getTitle()), n = L(e.getKeywords()), r = L(e.getDescription()), i = L(e.getImage()), a = L(e.getCanonical()), o = L(e.getRobots()), s = L(e.getAuthor()), c = L(e.getSiteName()), l = () => e.html(), u = (e) => {
1224
1222
  t.value = e, x();
1225
1223
  }, d = (e) => {
1226
1224
  n.value = e, x();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/functional",
3
3
  "private": false,
4
- "version": "1.15.2",
4
+ "version": "1.15.3",
5
5
  "type": "module",
6
6
  "description": "A comprehensive library of utilities, base classes, and Vue 3 composables for reactive web development. Extends @dxtmisha/functional-basic with Composition API.",
7
7
  "keywords": [