ryugi-artifacts 1.41.1 → 1.42.2

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.
@@ -154,16 +154,17 @@ var A = (e, t, n) => ({
154
154
  bottom: r + e.h * t.k
155
155
  };
156
156
  }, I = ({ left: e, top: t, right: n, bottom: r }, i) => Math.max(0, Math.min(n, i.width) - Math.max(e, 0)) * Math.max(0, Math.min(r, i.height) - Math.max(t, 0));
157
- function L({ boards: e, view: t, viewport: n, pinned: r, snapshots: i }) {
158
- let a = e.map((e) => {
157
+ function L({ boards: e, view: t, viewport: n, pinned: r, snapshots: i, hovered: a }) {
158
+ let o = e.map((e) => {
159
159
  let r = F(e, t), { left: i, top: a, right: o, bottom: s } = r, c = I(r, n), l = Math.hypot(Math.max(0, -o, i - n.width), Math.max(0, -s, a - n.height));
160
160
  return {
161
161
  id: e.id,
162
162
  area: c,
163
+ mostlyVisible: c * 2 > Math.min((o - i) * (s - a), n.width * n.height),
163
164
  distance: l
164
165
  };
165
- }), o = t.k >= .4 ? new Set(a.filter((e) => e.area > 0).sort((e, t) => t.area - e.area).slice(0, 4).map((e) => e.id)) : /* @__PURE__ */ new Set();
166
- return new Map(a.map(({ id: e, distance: t }) => r.has(e) || o.has(e) ? [e, "live"] : t > n.width ? [e, "empty"] : [e, i.has(e) ? "snapshot" : "placeholder"]));
166
+ }), s = a && !r.has(a) && o.some((e) => e.id === a) ? [a] : [], c = t.k >= .4 ? o.filter((e) => e.mostlyVisible && !r.has(e.id) && e.id !== a).sort((e, t) => t.area - e.area).map((e) => e.id) : [], l = new Set([...s, ...c].slice(0, 8));
167
+ return new Map(o.map(({ id: e, distance: t }) => r.has(e) || l.has(e) ? [e, "live"] : t > n.width ? [e, "empty"] : [e, i.has(e) ? "snapshot" : "placeholder"]));
167
168
  }
168
169
  function R({ boards: e, view: t, viewport: n }) {
169
170
  return new Map(e.map((e) => {
@@ -192,7 +193,7 @@ function V({ pageWindow: e, children: t }) {
192
193
  children: t
193
194
  });
194
195
  }
195
- var H = () => o(B) ?? window, U = a(() => import("./shims.js").then(() => import("./SnapshotDocument-De-tiDPI.js").then((e) => e.n))), W = a(() => import("./Canvas-BsBvccuh.js").then((e) => e.n).then(({ Canvas: e }) => ({ default: e }))), G = () => () => {}, K = () => {}, q = /* @__PURE__ */ new Set();
196
+ var H = () => o(B) ?? window, U = a(() => import("./shims.js").then(() => import("./SnapshotDocument-De-tiDPI.js").then((e) => e.n))), W = a(() => import("./Canvas-BdS1Xa5w.js").then((e) => e.n).then(({ Canvas: e }) => ({ default: e }))), G = () => () => {}, K = () => {}, q = /* @__PURE__ */ new Set();
196
197
  function J({ type: t, id: n, data: i, failed: a }) {
197
198
  let { t: o } = e(), [u, d] = c(() => ({
198
199
  width: innerWidth,