@dazhicheng/ui 1.6.81 → 1.6.83

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,24 +1,34 @@
1
- import { getOpenModalOverlays as r, readOverlayZIndex as x } from "./resolve-modal-target.js";
2
- const a = 1, c = 2e3;
3
- let o = 0;
4
- function s() {
5
- return r().reduce((n, e) => Math.max(n, x(e)), 0);
1
+ import { getOpenModalOverlays as a, readOverlayZIndex as i } from "./resolve-modal-target.js";
2
+ const r = 1, x = 2e3;
3
+ let t = 0;
4
+ function l() {
5
+ return a().reduce((n, e) => Math.max(n, i(e)), 0);
6
6
  }
7
- function I(n, e) {
8
- const { currentZIndex: d, nextZIndex: l } = n;
9
- let t = 0;
10
- for (; d.value <= e && t < c; )
11
- l(), t += 1;
7
+ function o(n, e) {
8
+ if (!Number.isFinite(e) || e <= 0) return;
9
+ const { currentZIndex: s, nextZIndex: c } = n;
10
+ let u = 0;
11
+ for (; s.value <= e && u < x; )
12
+ c(), u += 1;
12
13
  }
13
- function u(n) {
14
+ function d(n) {
14
15
  const e = Math.max(
15
16
  n.nextZIndex(),
16
- s() + a,
17
- o + a
17
+ l() + r,
18
+ t + r
18
19
  );
19
- return o = e, I(n, e), e;
20
+ return t = e, o(n, e), e;
21
+ }
22
+ function m(n, e) {
23
+ e == null || !Number.isFinite(e) || (t = Math.max(t, e), o(n, e));
24
+ }
25
+ function E(n) {
26
+ o(n, l());
20
27
  }
21
28
  export {
22
- u as allocateModalZIndex,
23
- s as getOpenModalMaxZIndex
29
+ d as allocateModalZIndex,
30
+ E as ensureElementPlusAboveOpenModals,
31
+ l as getOpenModalMaxZIndex,
32
+ o as raiseElementPlusZIndexAbove,
33
+ m as syncElementPlusZIndexToOverlay
24
34
  };
@@ -1,4 +1,4 @@
1
- import { getClientDocument as b, isSameMicroAppScope as C, resolveScanDocument as A } from "./modal-scope.js";
1
+ import { resolveScanDocument as C, getClientDocument as b, isSameMicroAppScope as A } from "./modal-scope.js";
2
2
  import { getOpenModalUids as E } from "./modal-stack.js";
3
3
  const M = 48, y = 8, a = "tt-modal-overlay--contained", O = "tt-modal-overlay";
4
4
  function m(t) {
@@ -101,7 +101,7 @@ function S(t) {
101
101
  }
102
102
  function P(t) {
103
103
  const o = t ?? b();
104
- return o ? Array.from(A(o).querySelectorAll(`.${O}`)).filter(
104
+ return o ? Array.from(C(o).querySelectorAll(`.${O}`)).filter(
105
105
  (e) => e.isConnected && e.dataset.ttModalSuspended !== "1" && e.style.display !== "none"
106
106
  ) : [];
107
107
  }
@@ -111,7 +111,7 @@ function V(t, o, e) {
111
111
  const i = E().map((l) => `tt-id-${l}`), s = P(n).filter((l) => {
112
112
  if (t != null && l.classList.contains(`tt-id-${t}`) || !i.some((_) => l.classList.contains(_))) return !1;
113
113
  const u = l.parentElement;
114
- return !!u && C(u, r);
114
+ return !!u && A(u, r);
115
115
  });
116
116
  return s.length === 0 ? null : s.reduce((l, u) => S(u) >= S(l) ? u : l).parentElement;
117
117
  }