x-essential-lib 0.5.2 → 0.5.4

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/dist/index.js CHANGED
@@ -48,19 +48,28 @@ const ne = re(
48
48
  return e.value.find((_) => _ === u) !== void 0;
49
49
  }
50
50
  function o(u) {
51
- n(u), e.value.push(u);
51
+ e.value.push(u);
52
52
  }
53
53
  function n(u) {
54
54
  const _ = e.value.findIndex((v) => v === u);
55
- _ !== -1 && e.value.splice(_, 1);
55
+ _ !== -1 && e.value.splice(_, e.value.length - _);
56
56
  }
57
57
  function l() {
58
- e.value.pop();
58
+ console.assert(e.value.length > 0), e.value.pop();
59
59
  }
60
60
  function c() {
61
61
  e.value = [];
62
62
  }
63
- return { isEmpty: a, lastView: t, hasView: r, addView: o, delView: n, popView: l, clearViews: c };
63
+ return {
64
+ views: e,
65
+ isEmpty: a,
66
+ lastView: t,
67
+ hasView: r,
68
+ addView: o,
69
+ delView: n,
70
+ popView: l,
71
+ clearViews: c
72
+ };
64
73
  });
65
74
  /*! js-cookie v3.0.5 | MIT */
66
75
  function L(e) {
@@ -294,9 +303,9 @@ const Ae = [
294
303
  ];
295
304
  function N(e) {
296
305
  let a, t = 0;
297
- const r = e.split("/");
306
+ const r = e.split("/").filter((o) => o.trim() !== "");
298
307
  return Ae.forEach((o) => {
299
- const n = o.path.split("/");
308
+ const n = o.path.split("/").filter((c) => c.trim() !== "");
300
309
  let l = 0;
301
310
  for (let c = 0; c < r.length && !(c >= n.length || r[c] !== n[c]); c++)
302
311
  l++;
@@ -1,4 +1,5 @@
1
1
  export declare const useViewMgrStore: import("pinia").StoreDefinition<"viewMgr", import("pinia")._UnwrapAll<Pick<{
2
+ views: import("vue").Ref<string[]>;
2
3
  isEmpty: () => boolean;
3
4
  lastView: () => string | undefined;
4
5
  hasView: (name: string) => boolean;
@@ -6,7 +7,8 @@ export declare const useViewMgrStore: import("pinia").StoreDefinition<"viewMgr",
6
7
  delView: (name: string) => void;
7
8
  popView: () => void;
8
9
  clearViews: () => void;
9
- }, never>>, Pick<{
10
+ }, "views">>, Pick<{
11
+ views: import("vue").Ref<string[]>;
10
12
  isEmpty: () => boolean;
11
13
  lastView: () => string | undefined;
12
14
  hasView: (name: string) => boolean;
@@ -15,6 +17,7 @@ export declare const useViewMgrStore: import("pinia").StoreDefinition<"viewMgr",
15
17
  popView: () => void;
16
18
  clearViews: () => void;
17
19
  }, never>, Pick<{
20
+ views: import("vue").Ref<string[]>;
18
21
  isEmpty: () => boolean;
19
22
  lastView: () => string | undefined;
20
23
  hasView: (name: string) => boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.5.2",
4
+ "version": "0.5.4",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",