New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@virtuoso.dev/message-list

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@virtuoso.dev/message-list - npm Package Compare versions

Comparing version 1.8.0-alpha.3 to 1.8.0-alpha.4

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [1.8.0-alpha.4](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.3...v1.8.0-alpha.4) (2024-06-04)
### Features
* tree filtering ([b4efd6e](https://github.com/virtuoso-dev/message-list/commit/b4efd6e192d2b95735b527ebdfd5f63524d7135a))
# [1.8.0-alpha.3](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.2...v1.8.0-alpha.3) (2024-05-28)

@@ -2,0 +9,0 @@

295

dist/index.js
import { jsxs as At, jsx as y, Fragment as Hn } from "react/jsx-runtime";
import d from "react";
import { Cell as c, Signal as S, withLatestFrom as I, map as a, mapTo as B, delayWithMicrotask as ae, filter as v, throttleTime as le, onNext as Se, debounceTime as $e, scan as z, useRealm as St, useCellValue as F, Realm as On, RealmContext as Vn, useCellValues as Wn } from "@mdxeditor/gurx";
import { Cell as c, Signal as S, withLatestFrom as I, map as a, filter as v, mapTo as B, delayWithMicrotask as ae, throttleTime as le, onNext as Se, debounceTime as $e, scan as z, useRealm as St, useCellValue as F, Realm as On, RealmContext as Vn, useCellValues as Wn } from "@mdxeditor/gurx";
function re(e, t) {

@@ -298,42 +298,37 @@ const n = c(e, (o) => {

}
const He = c(null), Xn = c(!1), it = c(!0), Z = S((e) => {
e.link(Z, He), e.link(
e.pipe(
Z,
I(
Y,
xt,
ge,
q,
Je,
Me,
Ae,
de
),
a(
([
t,
n,
o,
s,
i,
l,
r,
u,
f
]) => Kt({
location: t,
totalHeight: f,
sizeTree: n,
offsetTree: o,
totalCount: s,
viewportHeight: i,
headerHeight: l,
stickyHeaderHeight: r,
stickyFooterHeight: u
})
)
const He = c(null), Xn = c(!1), it = c(!0), oe = S((e) => {
const t = e.pipe(
oe,
I(
Y,
xt,
ge,
q,
Je,
Me,
Ae,
de
),
he
), e.link(e.pipe(Z, B(!1)), it), e.link(e.pipe(Z, B(!1)), Xn), e.link(
a(
([n, o, s, i, l, r, u, f, g]) => {
try {
return Kt({
location: n,
totalHeight: g,
sizeTree: o,
offsetTree: s,
totalCount: i,
viewportHeight: l,
headerHeight: r,
stickyHeaderHeight: u,
stickyFooterHeight: f
});
} catch {
return null;
}
}
),
v((n) => n !== null)
);
e.link(oe, He), e.link(t, he), e.link(e.pipe(t, B(!1)), it), e.link(e.pipe(t, B(!1)), Xn), e.link(
e.pipe(

@@ -343,9 +338,9 @@ Y,

I(it, He),
v(([, t, n]) => !t && n !== null),
a(([, , t]) => t)
v(([, n, o]) => !n && o !== null),
a(([, , n]) => n)
),
Z
oe
), e.sub(e.pipe(Te, le(20)), () => {
const t = e.getValue(He);
t !== null && typeof t != "number" && t.done !== void 0 && t.done(), e.pubIn({
const n = e.getValue(He);
n !== null && typeof n != "number" && n.done !== void 0 && n.done(), e.pubIn({
[He]: null,

@@ -359,6 +354,6 @@ [it]: !0

ae(),
v((t) => t !== 0),
a((t) => ({ top: t }))
v((n) => n !== 0),
a((n) => ({ top: n }))
),
J
Z
), e.link(

@@ -388,6 +383,6 @@ e.pipe(

);
e.link(e.pipe(t, ae()), Z), e.link(
e.link(e.pipe(t, ae()), oe), e.link(
e.pipe(
t,
Se(e.pipe(Le, v(zt))),
Se(e.pipe(we, v(zt))),
B(null),

@@ -505,3 +500,3 @@ // unset the location after the scroll completes

return t;
const X = [], P = l - 1, W = 0, _ = Un(i, U, K, W);
const J = [], P = l - 1, W = 0, _ = Un(i, U, K, W);
let N = 0, Ce = 0, ve = !1;

@@ -512,20 +507,20 @@ for (const G of _) {

} = G;
let Q = G.start;
N = be, be < U && (Q += Math.floor((U - be) / A), N += (Q - G.start) * A), Q < W && (N += (W - Q) * A, Q = W);
let X = G.start;
N = be, be < U && (X += Math.floor((U - be) / A), N += (X - G.start) * A), X < W && (N += (W - X) * A, X = W);
const ot = Math.min(G.end, P);
for (let ee = Q; ee <= ot && !(N >= K); ee++) {
for (let Q = X; Q <= ot && !(N >= K); Q++) {
const m = {
data: u == null ? void 0 : u[ee],
prevData: (u == null ? void 0 : u[ee - 1]) ?? null,
nextData: (u == null ? void 0 : u[ee + 1]) ?? null,
data: u == null ? void 0 : u[Q],
prevData: (u == null ? void 0 : u[Q - 1]) ?? null,
nextData: (u == null ? void 0 : u[Q + 1]) ?? null,
height: A,
index: ee,
index: Q,
offset: N,
type: "flat"
};
ve || (ve = !0, Ce = N), X.push(m), N += A;
ve || (ve = !0, Ce = N), J.push(m), N += A;
}
}
const tt = r - N, nt = ((Be = X[0]) == null ? void 0 : Be.offset) || 0;
return { items: X, listBottom: N, listTop: Ce, offsetTree: i, paddingBottom: tt, paddingTop: nt, totalCount: l, data: u };
const tt = r - N, nt = ((Be = J[0]) == null ? void 0 : Be.offset) || 0;
return { items: J, listBottom: N, listTop: Ce, offsetTree: i, paddingBottom: tt, paddingTop: nt, totalCount: l, data: u };
},

@@ -556,3 +551,3 @@ Oe

}, so = 0, io = 4;
function wt(e) {
function Lt(e) {
return (t, n) => {

@@ -579,5 +574,5 @@ const o = n.signalInstance();

}), xe = c(!1, (e) => {
e.link(e.pipe(x, wt(1), B(!0)), xe), e.link(e.pipe(x, wt(1), B(!1), $e(100)), xe);
e.link(e.pipe(x, Lt(1), B(!0)), xe), e.link(e.pipe(x, Lt(1), B(!1), $e(100)), xe);
}), pt = c(!1, (e) => {
e.link(e.pipe(J, B(!0)), pt), e.link(e.pipe(J, B(!1), $e(200)), pt);
e.link(e.pipe(Z, B(!0)), pt), e.link(e.pipe(Z, B(!1), $e(200)), pt);
}), Gt = c(!1), Pe = c(

@@ -647,3 +642,3 @@ null,

(t) => {
t.delta && e.pub(J, { top: t.delta });
t.delta && e.pub(Z, { top: t.delta });
}

@@ -700,4 +695,4 @@ );

), e.link(e.pipe(x, le(50), B(no)), qe);
}), Lt = c(0, (e) => {
e.link(e.pipe(xe, v(zt), B(0)), Lt), e.link(
}), wt = c(0, (e) => {
e.link(e.pipe(xe, v(zt), B(0)), wt), e.link(
e.pipe(

@@ -711,3 +706,3 @@ x,

),
Lt
wt
);

@@ -729,3 +724,3 @@ }), H = c(!1), Ne = S((e) => {

v(([t]) => t !== 0),
I(x, qe, Le),
I(x, qe, we),
v(([, t, n, o]) => !o && t !== 0 && n === jt),

@@ -757,7 +752,7 @@ a(([[t]]) => t)

e.pub(H, !0), t < 0 ? requestAnimationFrame(() => {
e.pub(J, { top: -t, behavior: "instant" }), e.pub(O, 0), requestAnimationFrame(() => {
e.pub(Z, { top: -t, behavior: "instant" }), e.pub(O, 0), requestAnimationFrame(() => {
e.pub(H, !1);
});
}) : requestAnimationFrame(() => {
e.pub(J, { top: -t, behavior: "instant" }), e.pub(O, 0), requestAnimationFrame(() => {
e.pub(Z, { top: -t, behavior: "instant" }), e.pub(O, 0), requestAnimationFrame(() => {
e.pub(H, !1);

@@ -772,3 +767,3 @@ });

),
J
Z
);

@@ -784,8 +779,8 @@ }), ge = c(0), Ue = c(null), D = c(null, (e) => {

);
}), oe = S((e) => {
e.link(e.pipe(oe, B(!0)), j);
}), ne = S((e) => {
e.link(e.pipe(ne, B(!0)), j);
const t = Nt();
e.link(
e.pipe(
oe,
ne,
I(ue),

@@ -795,5 +790,5 @@ a(([n, o]) => o * n.length)

O
), e.link(e.pipe(oe, B(t)), H), e.sub(
), e.link(e.pipe(ne, B(t)), H), e.sub(
e.pipe(
oe,
ne,
I(ue),

@@ -808,3 +803,3 @@ a(([n, o]) => ({

e.pubIn({
[J]: n
[Z]: n
}), t ? setTimeout(() => {

@@ -816,5 +811,5 @@ e.pub(O, 0), e.pub(j, !1), e.pub(H, !1);

}
), e.changeWith(D, oe, (n, o) => n ? [...o, ...n] : o.slice()), e.link(
), e.changeWith(D, ne, (n, o) => n ? [...o, ...n] : o.slice()), e.link(
e.pipe(
oe,
ne,
I(Y, ue),

@@ -837,3 +832,3 @@ a(([n, o, s]) => {

),
we
Le
);

@@ -899,3 +894,3 @@ }), Ze = S((e) => {

),
Z
oe
);

@@ -905,3 +900,3 @@ }), ft = S((e) => {

}), ze = S((e) => {
e.changeWith(D, ze, (t, n) => t ? [...t.slice(0, n.offset), ...n.data, ...t.slice(n.offset)] : n.data.slice()), e.changeWith(ne, ze, ([t], n) => {
e.changeWith(D, ze, (t, n) => t ? [...t.slice(0, n.offset), ...n.data, ...t.slice(n.offset)] : n.data.slice()), e.changeWith(te, ze, ([t], n) => {
const s = se(t, n.offset, "k")[0], i = n.data.length;

@@ -911,3 +906,3 @@ return [_n(t, s, 1 / 0, (r, u) => [r + i, u]), s];

}), ht = S((e) => {
e.changeWith(D, ht, (t, { offset: n, count: o }) => t ? t.slice(0, n).concat(t.slice(n + o)) : []), e.changeWith(ne, ht, ([t], { offset: n, count: o }) => [Fn(t, n, o), n]);
e.changeWith(D, ht, (t, { offset: n, count: o }) => t ? t.slice(0, n).concat(t.slice(n + o)) : []), e.changeWith(te, ht, ([t], { offset: n, count: o }) => [Fn(t, n, o), n]);
}), Ye = S((e) => {

@@ -920,5 +915,5 @@ e.changeWith(D, Ye, (t, n) => n.data.slice()), e.link(

Ie
), e.link(e.pipe(Ye, ae(), B(Ge)), ne);
), e.link(e.pipe(Ye, ae(), B(Ge)), te);
}), Rt = S((e) => {
e.changeWith(D, Rt, (t, n) => t ? t.slice(n) : []), e.changeWith(ne, Rt, ([t], n) => [ie(t).reduce((s, { k: i, v: l }) => C(s, Math.max(0, i - n), l), ce()), 0]);
e.changeWith(D, Rt, (t, n) => t ? t.slice(n) : []), e.changeWith(te, Rt, ([t], n) => [ie(t).reduce((s, { k: i, v: l }) => C(s, Math.max(0, i - n), l), ce()), 0]);
}), Mt = S((e) => {

@@ -937,3 +932,3 @@ e.changeWith(D, Mt, (t, n) => t ? t.slice(0, t.length - n) : []), e.link(

),
we
Le
);

@@ -953,3 +948,3 @@ }), Jt = S((e) => {

);
e.changeWith(D, t, (n, o) => n ? n.filter((s, i) => !o.includes(i)) : []), e.changeWith(ne, t, ([n], o) => [Qn(n, o), 0]);
e.changeWith(D, t, (n, o) => n ? n.filter((s, i) => !o.includes(i)) : []), e.changeWith(te, t, ([n], o) => [Qn(n, o), 0]);
}), gt = S((e) => {

@@ -964,5 +959,5 @@ e.changeWith(D, gt, (t, { mapper: n }) => t ? t.map(n) : []), e.link(

),
Z
oe
);
}), we = S();
}), Le = S();
c([]);

@@ -974,6 +969,6 @@ c([]);

c(NaN);
const j = c(!1), ne = c(Ge, (e) => {
const j = c(!1), te = c(Ge, (e) => {
e.link(
e.pipe(
we,
Le,
v((t) => t.length > 0),

@@ -983,3 +978,3 @@ I(Y),

),
ne
te
);

@@ -989,3 +984,3 @@ }), Y = c(Ge[0], (e) => {

e.pipe(
ne,
te,
a(([t]) => t)

@@ -996,3 +991,3 @@ ),

e.pipe(
we,
Le,
I(Y),

@@ -1013,3 +1008,3 @@ z(

e.pipe(
ne,
te,
a(([, t]) => t)

@@ -1064,4 +1059,4 @@ ),

);
}), Le = S(), dt = c(!1), Te = S((e) => {
e.link(e.pipe(Te, B(!1)), Le);
}), we = S(), dt = c(!1), Te = S((e) => {
e.link(e.pipe(Te, B(!1)), we);
}), x = c(0), q = c(0), nn = c(0), Re = c(0), co = x, Ke = c(0), Me = c(0), De = c(0), Ae = c(0), Tt = c(0), vt = c(null), Je = re(0, (e) => e.pipe(

@@ -1107,3 +1102,3 @@ e.combine(Me, De),

),
Le
we
);

@@ -1169,3 +1164,3 @@ }), Qe = re(

);
}), J = S(), O = c(0), mt = c(0), rn = c("");
}), Z = S(), O = c(0), mt = c(0), rn = c("");
function po(e) {

@@ -1311,10 +1306,10 @@ const t = d.useRef(null), n = d.useRef(null), o = St(), s = d.useCallback(

o = R(
o = L(
o = L(
o = L(
o = L(
o = w(
o = w(
o = w(
o = w(
o = w(
o = w(
o = w(
o = w(
o = L(
o = L(
o = L(
o = L(
o = E(

@@ -1385,5 +1380,5 @@ o = E(

),
s = w(
s = L(
s,
i = w(i, n = w(n, o, s, i, e[l + 1], 5, -165796510), o, s, e[l + 6], 9, -1069501632),
i = L(i, n = L(n, o, s, i, e[l + 1], 5, -165796510), o, s, e[l + 6], 9, -1069501632),
n,

@@ -1401,5 +1396,5 @@ o,

),
s = w(
s = L(
s,
i = w(i, n = w(n, o, s, i, e[l + 5], 5, -701558691), o, s, e[l + 10], 9, 38016083),
i = L(i, n = L(n, o, s, i, e[l + 5], 5, -701558691), o, s, e[l + 10], 9, 38016083),
n,

@@ -1417,5 +1412,5 @@ o,

),
s = w(
s = L(
s,
i = w(i, n = w(n, o, s, i, e[l + 9], 5, 568446438), o, s, e[l + 14], 9, -1019803690),
i = L(i, n = L(n, o, s, i, e[l + 9], 5, 568446438), o, s, e[l + 14], 9, -1019803690),
n,

@@ -1433,5 +1428,5 @@ o,

),
s = w(
s = L(
s,
i = w(i, n = w(n, o, s, i, e[l + 13], 5, -1444681467), o, s, e[l + 2], 9, -51403784),
i = L(i, n = L(n, o, s, i, e[l + 13], 5, -1444681467), o, s, e[l + 2], 9, -51403784),
n,

@@ -1449,5 +1444,5 @@ o,

),
s = L(
s = w(
s,
i = L(i, n = L(n, o, s, i, e[l + 5], 4, -378558), o, s, e[l + 8], 11, -2022574463),
i = w(i, n = w(n, o, s, i, e[l + 5], 4, -378558), o, s, e[l + 8], 11, -2022574463),
n,

@@ -1465,5 +1460,5 @@ o,

),
s = L(
s = w(
s,
i = L(i, n = L(n, o, s, i, e[l + 1], 4, -1530992060), o, s, e[l + 4], 11, 1272893353),
i = w(i, n = w(n, o, s, i, e[l + 1], 4, -1530992060), o, s, e[l + 4], 11, 1272893353),
n,

@@ -1481,5 +1476,5 @@ o,

),
s = L(
s = w(
s,
i = L(i, n = L(n, o, s, i, e[l + 13], 4, 681279174), o, s, e[l + 0], 11, -358537222),
i = w(i, n = w(n, o, s, i, e[l + 13], 4, 681279174), o, s, e[l + 0], 11, -358537222),
n,

@@ -1497,5 +1492,5 @@ o,

),
s = L(
s = w(
s,
i = L(i, n = L(n, o, s, i, e[l + 9], 4, -640364487), o, s, e[l + 12], 11, -421815835),
i = w(i, n = w(n, o, s, i, e[l + 9], 4, -640364487), o, s, e[l + 12], 11, -421815835),
n,

@@ -1572,3 +1567,3 @@ o,

-343485551
), n = te(n, r), o = te(o, u), s = te(s, f), i = te(i, g);
), n = ee(n, r), o = ee(o, u), s = ee(s, f), i = ee(i, g);
}

@@ -1578,3 +1573,3 @@ return [n, o, s, i];

function et(e, t, n, o, s, i) {
return te(So(te(te(t, e), te(o, i)), s), n);
return ee(So(ee(ee(t, e), ee(o, i)), s), n);
}

@@ -1584,6 +1579,6 @@ function E(e, t, n, o, s, i, l) {

}
function w(e, t, n, o, s, i, l) {
function L(e, t, n, o, s, i, l) {
return et(t & o | n & ~o, e, t, s, i, l);
}
function L(e, t, n, o, s, i, l) {
function w(e, t, n, o, s, i, l) {
return et(t ^ n ^ o, e, t, s, i, l);

@@ -1594,3 +1589,3 @@ }

}
function te(e, t) {
function ee(e, t) {
const n = (65535 & e) + (65535 & t);

@@ -1627,7 +1622,7 @@ return (e >> 16) + (t >> 16) + (n >> 16) << 16 | 65535 & n;

watermarkMessage: "Your Virtuoso Message List license key is invalid"
}, wo = {
}, Lo = {
valid: !1,
consoleMessage: "Your annual license key to use Virtuoso Message List in non-production environments has expired. You can still use it in production. To keep using it in development, purchase a new key from https://virtuoso.dev/pricing/",
watermarkMessage: "Your annual license key to use Virtuoso Message List in non-production environments has expired. You can still use it in production. To keep using it in development, purchase a new key from https://virtuoso.dev/pricing/"
}, Lo = {
}, wo = {
valid: !1,

@@ -1645,5 +1640,5 @@ consoleMessage: "You have installed a version of `@virtuoso.dev/message-list` that is newer than the period of your license key. Either downgrade to a supported version, or purchase a new license from https://virtuoso.dev/pricing/",

if (s)
return Lo;
if (l.expiryDate.getTime() < o)
return wo;
if (l.expiryDate.getTime() < o)
return Lo;
}

@@ -1654,3 +1649,3 @@ } else

}
const wn = d.createContext(xo), Co = ({
const Ln = d.createContext(xo), Co = ({
licenseKey: e,

@@ -1663,12 +1658,12 @@ children: t

now: /* @__PURE__ */ new Date(),
packageTimestamp: 1716889474787
packageTimestamp: 1717495781855
});
return /* @__PURE__ */ y(wn.Provider, { value: n, children: t });
return /* @__PURE__ */ y(Ln.Provider, { value: n, children: t });
};
Co.displayName = Math.random().toString(36).slice(2, 8);
function Ln(e) {
function wn(e) {
return {
data: {
prepend: (t) => {
e.pub(oe, t);
e.pub(ne, t);
},

@@ -1716,3 +1711,3 @@ append: (t, n) => {

scrollToItem: (t) => {
e.pub(Z, t);
e.pub(oe, t);
},

@@ -1733,3 +1728,3 @@ scrollerElement: () => e.getValue(vt),

const e = St();
return d.useMemo(() => Ln(e), [e]);
return d.useMemo(() => wn(e), [e]);
}

@@ -1758,6 +1753,6 @@ let Dt = !1;

...K
}, X) => {
}, J) => {
const P = d.useMemo(() => {
const _ = new On();
return _.register(Ee), _.register(Le), _.register(Ne), _.register(Pe), _.pubIn({
return _.register(Ee), _.register(we), _.register(Ne), _.register(Pe), _.pubIn({
[D]: e.slice(),

@@ -1781,3 +1776,3 @@ [Ue]: n,

}, []);
d.useImperativeHandle(X, () => Ln(P), [P]), d.useEffect(() => {
d.useImperativeHandle(J, () => wn(P), [P]), d.useEffect(() => {
P.pubIn({

@@ -1788,3 +1783,3 @@ [Ue]: n,

});
const W = d.useContext(wn);
const W = d.useContext(Ln);
return d.useEffect(() => {

@@ -1837,3 +1832,3 @@ W.consoleMessage && (Dt || (Dt = !0, console.error(W.consoleMessage)));

n.pubIn({
[we]: Bn,
[Le]: Bn,
[x]: m.scrollTop,

@@ -1850,8 +1845,8 @@ [Re]: m.scrollHeight,

[n]
), { elRef: M, callbackRef: V, listCallbackRef: U, observer: K, scrollBy: X, scrollTo: P } = po(k), W = Ve(K), _ = Ve(K), N = Ve(K), Ce = Ve(K), { items: ve } = F(Ee);
), { elRef: M, callbackRef: V, listCallbackRef: U, observer: K, scrollBy: J, scrollTo: P } = po(k), W = Ve(K), _ = Ve(K), N = Ve(K), Ce = Ve(K), { items: ve } = F(Ee);
d.useLayoutEffect(() => {
const m = M.current;
m && k(m, "resize");
}, [ve, M, k, p]), d.useLayoutEffect(() => n.sub(he, P), [P, n]), d.useLayoutEffect(() => n.sub(J, X), [X, n]);
const tt = F(O), nt = F(H), Be = F(mt), G = F(Xe), be = F(rn), A = F(Ue), Q = F(an), ot = F(ge), ee = F(de);
}, [ve, M, k, p]), d.useLayoutEffect(() => n.sub(he, P), [P, n]), d.useLayoutEffect(() => n.sub(Z, J), [J, n]);
const tt = F(O), nt = F(H), Be = F(mt), G = F(Xe), be = F(rn), A = F(Ue), X = F(an), ot = F(ge), Q = F(de);
return /* @__PURE__ */ y(Hn, { children: /* @__PURE__ */ At(

@@ -1880,3 +1875,3 @@ $,

boxSizing: "content-box",
height: ee,
height: Q,
paddingBottom: G,

@@ -1902,3 +1897,3 @@ overflowAnchor: "none",

},
Q({ index: m.index, data: m.data, context: A })
X({ index: m.index, data: m.data, context: A })
))

@@ -1905,0 +1900,0 @@ }

@@ -23,3 +23,3 @@ {

},
"version": "1.8.0-alpha.3",
"version": "1.8.0-alpha.4",
"type": "module",

@@ -26,0 +26,0 @@ "module": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc