marquee-selection 0.0.14 → 0.0.16

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.
@@ -85,7 +85,7 @@ function ye(Jt) {
85
85
  rt && (tt && tt !== t && tt.classList.remove(Ot), t && tt !== t && t.classList.add(Ot), tt = t);
86
86
  }, le = () => {
87
87
  const t = document.createElement("div");
88
- return t.style.position = "fixed", t.style.left = "0px", t.style.top = "0px", t.style.width = "0px", t.style.height = "0px", t.style.outline = "1px dashed #268aff", t.style.background = "rgba(38,138,255,0.12)", t.style.pointerEvents = "none", t.style.zIndex = "2147483647", t.style.boxSizing = "border-box", document.body.appendChild(t), t;
88
+ return t.style.position = "fixed", t.style.left = "0px", t.style.top = "0px", t.style.width = "0px", t.style.height = "0px", t.style.outline = "1px dashed #268aff", t.style.background = "rgba(38,138,255,0.12)", t.style.pointerEvents = "none", t.style.zIndex = "999999", t.style.boxSizing = "border-box", document.body.appendChild(t), t;
89
89
  }, ft = (t, e) => t.left < e.right && t.right > e.left && t.top < e.bottom && t.bottom > e.top, re = (t, e) => t.left <= e.left && t.right >= e.right && t.top <= e.top && t.bottom >= e.bottom, ie = (t, e) => {
90
90
  const r = Math.max(t.left, e.left), i = Math.min(t.right, e.right), c = Math.max(t.top, e.top), s = Math.min(t.bottom, e.bottom), n = Math.max(0, i - r), l = Math.max(0, s - c), f = n * l, u = Math.max(1, e.width * e.height);
91
91
  return f / u;
@@ -109,9 +109,9 @@ function ye(Jt) {
109
109
  const c = kt(r);
110
110
  if (!c) return;
111
111
  const s = H[i] || "rgba(255, 165, 0, 0.9)", n = document.createElement("div");
112
- n.style.position = "fixed", n.style.pointerEvents = "none", n.style.zIndex = "2147483646", n.style.left = `${c.left}px`, n.style.top = `${c.top}px`, n.style.width = `${c.width}px`, n.style.height = `${c.height}px`, n.style.boxSizing = "border-box", n.style.outline = `1px solid ${s}`, n.style.background = "transparent", document.body.appendChild(n);
112
+ n.style.position = "fixed", n.style.pointerEvents = "none", n.style.zIndex = "999990", n.style.left = `${c.left}px`, n.style.top = `${c.top}px`, n.style.width = `${c.width}px`, n.style.height = `${c.height}px`, n.style.boxSizing = "border-box", n.style.outline = `1px solid ${s}`, n.style.background = "transparent", document.body.appendChild(n);
113
113
  const l = document.createElement("div");
114
- l.style.position = "absolute", l.style.display = "inline-grid", l.style.gridTemplateColumns = "1fr 1fr 1fr", l.style.gap = "2px", l.style.minWidth = "max-content", l.style.padding = "3px 4px", l.style.fontSize = "11px", l.style.lineHeight = "14px", l.style.color = "#fff", l.style.background = s, l.style.borderRadius = "4px", l.style.pointerEvents = "auto", l.style.opacity = "0.35", l.style.transition = "opacity 0.15s ease";
114
+ l.style.position = "absolute", l.style.display = "inline-grid", l.style.gridTemplateColumns = "1fr 1fr 1fr", l.style.gap = "2px", l.style.minWidth = "max-content", l.style.padding = "3px 4px", l.style.fontSize = "11px", l.style.lineHeight = "14px", l.style.color = "#fff", l.style.background = s, l.style.borderRadius = "4px", l.style.pointerEvents = "auto", l.style.opacity = "0", l.style.transition = "opacity 0.15s ease";
115
115
  const f = document.createElement("span");
116
116
  f.textContent = `${i + 1}`, f.style.position = "absolute", f.style.left = "0", f.style.top = "0", f.style.fontSize = "9px", f.style.lineHeight = "14px", f.style.minWidth = "14px", f.style.textAlign = "center", f.style.padding = "0 3px", f.style.background = s, f.style.color = "#fff", f.style.borderRadius = "0 0 4px 0", f.style.fontWeight = "bold", f.style.pointerEvents = "none", n.appendChild(f);
117
117
  const u = document.createElement("button");
@@ -144,7 +144,7 @@ function ye(Jt) {
144
144
  const y = l.querySelector(".merge-panel");
145
145
  y && y.remove();
146
146
  const b = document.createElement("div");
147
- b.className = "merge-panel", b.style.position = "absolute", b.style.left = "0", b.style.top = "22px", b.style.minWidth = "160px", b.style.padding = "8px", b.style.background = "#fff", b.style.color = "#333", b.style.border = "1px solid rgba(0,0,0,0.15)", b.style.borderRadius = "6px", b.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)", b.style.pointerEvents = "auto", b.style.zIndex = "2147483647";
147
+ b.className = "merge-panel", b.style.position = "absolute", b.style.left = "0", b.style.top = "22px", b.style.minWidth = "160px", b.style.padding = "8px", b.style.background = "#fff", b.style.color = "#333", b.style.border = "1px solid rgba(0,0,0,0.15)", b.style.borderRadius = "6px", b.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)", b.style.pointerEvents = "auto", b.style.zIndex = "999999";
148
148
  const w = document.createElement("div");
149
149
  w.textContent = "选择要合并的组", w.style.fontSize = "12px", w.style.marginBottom = "6px", b.appendChild(w);
150
150
  const E = document.createElement("div");
@@ -274,12 +274,12 @@ function ye(Jt) {
274
274
  const x = () => {
275
275
  l.style.opacity = "1";
276
276
  }, X = () => {
277
- l.style.opacity = "0.35";
277
+ l.style.opacity = "0";
278
278
  };
279
279
  l.addEventListener("mouseenter", () => {
280
280
  x();
281
281
  try {
282
- it.forEach((v) => v.style.zIndex = "2147483646"), n.style.zIndex = "2147483647";
282
+ it.forEach((v) => v.style.zIndex = "999990"), n.style.zIndex = "999999";
283
283
  } catch {
284
284
  }
285
285
  }), l.addEventListener("mouseleave", X);
@@ -291,7 +291,7 @@ function ye(Jt) {
291
291
  });
292
292
  const L = (v) => {
293
293
  const o = document.createElement("div");
294
- o.style.position = "absolute", o.style.pointerEvents = "auto", o.style.background = "transparent", o.style.zIndex = "2147483647";
294
+ o.style.position = "absolute", o.style.pointerEvents = "auto", o.style.background = "transparent", o.style.zIndex = "999999";
295
295
  const h = 8;
296
296
  v === "top" ? (o.style.cursor = "ns-resize", o.style.left = "-4px", o.style.right = "-4px", o.style.top = `-${h / 2 | 0}px`, o.style.height = `${h}px`) : v === "bottom" ? (o.style.cursor = "ns-resize", o.style.left = "-4px", o.style.right = "-4px", o.style.bottom = `-${h / 2 | 0}px`, o.style.height = `${h}px`) : v === "left" ? (o.style.cursor = "ew-resize", o.style.top = "-4px", o.style.bottom = "-4px", o.style.left = `-${h / 2 | 0}px`, o.style.width = `${h}px`) : v === "right" ? (o.style.cursor = "ew-resize", o.style.top = "-4px", o.style.bottom = "-4px", o.style.right = `-${h / 2 | 0}px`, o.style.width = `${h}px`) : v === "nw" ? (o.style.cursor = "nwse-resize", o.style.left = `-${h / 2 | 0}px`, o.style.top = `-${h / 2 | 0}px`, o.style.width = `${h}px`, o.style.height = `${h}px`) : v === "ne" ? (o.style.cursor = "nesw-resize", o.style.right = `-${h / 2 | 0}px`, o.style.top = `-${h / 2 | 0}px`, o.style.width = `${h}px`, o.style.height = `${h}px`) : v === "sw" ? (o.style.cursor = "nesw-resize", o.style.left = `-${h / 2 | 0}px`, o.style.bottom = `-${h / 2 | 0}px`, o.style.width = `${h}px`, o.style.height = `${h}px`) : v === "se" && (o.style.cursor = "nwse-resize", o.style.right = `-${h / 2 | 0}px`, o.style.bottom = `-${h / 2 | 0}px`, o.style.width = `${h}px`, o.style.height = `${h}px`), o.onmousedown = (y) => {
297
297
  y.preventDefault(), y.stopPropagation();