@das-fed/utils 6.4.0-hot.3 → 6.4.0-hot.5

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.
@@ -1,13 +1,22 @@
1
- import { computed as n } from "vue";
2
- import { useZIndex as x } from "element-plus";
3
- const e = x(), I = () => {
4
- const t = n(() => e.initialZIndex.value), r = n(() => e.currentZIndex.value);
1
+ import { ref as I, getCurrentInstance as u, inject as s, computed as e, unref as i } from "vue";
2
+ const Z = (n) => typeof n == "number", c = I(0), l = 2e3, a = Symbol("zIndexContextKey"), v = (n) => {
3
+ const t = u() ? s(a, void 0) : void 0, r = e(() => {
4
+ const d = i(t);
5
+ return Z(d) ? d : l;
6
+ }), x = e(() => r.value + c.value);
5
7
  return {
6
- initialZIndex: t,
7
- currentZIndex: r,
8
- nextZIndex: () => e.nextZIndex()
8
+ initialZIndex: r,
9
+ currentZIndex: x,
10
+ nextZIndex: () => (c.value++, x.value)
11
+ };
12
+ }, o = v(), f = () => {
13
+ const n = e(() => o.initialZIndex.value), t = e(() => o.currentZIndex.value);
14
+ return {
15
+ initialZIndex: n,
16
+ currentZIndex: t,
17
+ nextZIndex: () => o.nextZIndex()
9
18
  };
10
19
  };
11
20
  export {
12
- I as useZIndex
21
+ f as useZIndex
13
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/utils",
3
- "version": "6.4.0-hot.3",
3
+ "version": "6.4.0-hot.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -9,7 +9,7 @@
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
11
  "@antv/x6": "^2.18.1",
12
- "@das-fed/utils": "6.4.0-hot.3",
12
+ "@das-fed/utils": "6.4.0-hot.5",
13
13
  "@vue/shared": "^3.4.21",
14
14
  "@vueuse/core": "^9.6.0",
15
15
  "axios": "^1.6.7",
@@ -21,7 +21,7 @@
21
21
  "vue": "^3.4.21"
22
22
  },
23
23
  "devDependencies": {
24
- "@das-fed/cli": "6.4.0-hot.3",
24
+ "@das-fed/cli": "6.4.0-hot.5",
25
25
  "@types/js-cookie": "^3.0.6",
26
26
  "@types/lodash-es": "^4.17.12",
27
27
  "@types/qs": "^6.9.15",