Socket
Socket
Sign inDemoInstall

@blumjs/router

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blumjs/router - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

70

dist/index.js

@@ -1,2 +0,2 @@

import T, { useEffect as B } from "react";
import T, { useEffect as $ } from "react";
function Vt(e, t) {

@@ -16,4 +16,4 @@ for (let n in e)

k(e, (f) => f && D(a, f));
let l = { id: Bt(), seq: a, next: le(o), meta: y, scope: m, family: { type: p.type || "crosslink", links: d, owners: u } };
return k(d, (f) => D(Se(f), l)), k(u, (f) => D(ge(f), l)), k(c, (f) => D(f.next, l)), S && G && Pe(Z(G), [l]), l;
let l = { id: $t(), seq: a, next: le(o), meta: y, scope: m, family: { type: p.type || "crosslink", links: d, owners: u } };
return k(d, (f) => D(Se(f), l)), k(u, (f) => D(ge(f), l)), k(c, (f) => D(f.next, l)), S && G && Be(Z(G), [l]), l;
}

@@ -24,5 +24,5 @@ function te(e, t, n) {

for (let a = 0; a < e.length; a++)
$("pure", i, C(e[a]), s, t[a], o, r);
P("pure", i, C(e[a]), s, t[a], o, r);
else
$("pure", i, C(e), s, t, o, r);
P("pure", i, C(e), s, t, o, r);
if (n && !se)

@@ -97,8 +97,8 @@ return;

if (k(p.next, (h) => {
$("child", c, h, l, v, w);
P("child", c, h, l, v, w);
}), w) {
x(p, "needFxCounter") && $("child", c, w.fxCount, l, v, w), x(p, "storeChange") && $("child", c, w.storeChange, l, v, w), x(p, "warnSerialize") && $("child", c, w.warnSerializeNode, l, v, w);
x(p, "needFxCounter") && P("child", c, w.fxCount, l, v, w), x(p, "storeChange") && P("child", c, w.storeChange, l, v, w), x(p, "warnSerialize") && P("child", c, w.warnSerializeNode, l, v, w);
let h = w.additionalLinks[p.id];
h && k(h, (g) => {
$("child", c, g, l, v, w);
P("child", c, g, l, v, w);
});

@@ -132,3 +132,3 @@ }

for (u = M; u && u.template !== p; )
u = P(u);
u = B(u);
Qe(u);

@@ -138,3 +138,3 @@ let a = y.create(S, c);

})(r, i, o, m) : r.create(o, m)), i = lt(), s = Object.assign(r, { graphite: N({ meta: vt("event", r, n), regional: 1 }), create: (o) => (te({ target: r, params: o, scope: A }), o), watch: (o) => pt(r, o), map: (o) => Le(r, re, o, [q()]), filter: (o) => Le(r, "filter", o.fn ? o : o.fn, [q(ze, 1)]), filterMap: (o) => Le(r, "filterMap", o, [q(), F((m) => !j(m), 1)]), prepend(o) {
let m = R("* → " + r.shortName, { parent: P(r) });
let m = R("* → " + r.shortName, { parent: B(r) });
return X("eventPrepend", C(m)), Ge(m, r, [q()], "prepend", o), tr(r, m), m;

@@ -157,3 +157,3 @@ } });

for (; f && !f.reg[s]; )
f = P(f);
f = B(f);
f && (a = f);

@@ -173,3 +173,3 @@ }

}, watch(a, l) {
if (!l || !$e(a)) {
if (!l || !Pe(a)) {
let f = pt(o, a);

@@ -182,3 +182,3 @@ return X("storeWatch", r, a) || a(o.getState()), f;

let p = x(o, "serialize"), S = x(o, "derived"), c = p === "ignore", d = !p || c ? 0 : p, u = x(o, "sid");
return u && (c || ee(o, "storeChange", 1), r.sid = u, d && (r.meta = { ...r == null ? void 0 : r.meta, serialize: d })), u || c || S || ee(o, "warnSerialize", 1), I(S || !j(e), "current state can't be undefined, use null instead"), Pe(o, [i]), n != null && n.domain && n.domain.hooks.store(o), S || (o.reinit = R(), o.reset(o.reinit)), o;
return u && (c || ee(o, "storeChange", 1), r.sid = u, d && (r.meta = { ...r == null ? void 0 : r.meta, serialize: d })), u || c || S || ee(o, "warnSerialize", 1), I(S || !j(e), "current state can't be undefined, use null instead"), Be(o, [i]), n != null && n.domain && n.domain.hooks.store(o), S || (o.reinit = R(), o.reset(o.reinit)), o;
}

@@ -213,6 +213,6 @@ function Mt() {

i.scope.runner = S, D(i.seq, F((u, { runner: a }, l) => {
let f = P(l) ? { params: u, req: { rs(O) {
let f = B(l) ? { params: u, req: { rs(O) {
}, rj(O) {
} } } : u;
return l.meta || (l.meta = { fxID: Pt() }), te({ target: a, params: f, defer: 1, scope: H(l), meta: l.meta }), f.params;
return l.meta || (l.meta = { fxID: Bt() }), te({ target: a, params: f, defer: 1, scope: H(l), meta: l.meta }), f.params;
}, 0, 1)), r.create = (u) => {

@@ -232,8 +232,8 @@ let a = Mt(), l = { params: u, req: a };

let d = r.pending = c.map({ fn: (u) => u > 0, named: "pending" });
return Pe(r, [s, o, m, y, p, d, c]), n != null && n.domain && n.domain.hooks.effect(r), r;
return Be(r, [s, o, m, y, p, d, c]), n != null && n.domain && n.domain.hooks.effect(r), r;
}
let Tt = typeof Symbol < "u" && Symbol.observable || "@@observable", re = "map", ne = "stack", C = (e) => e.graphite || e, Se = (e) => e.family.owners, ge = (e) => e.family.links, ve = (e) => e.stateRef, Z = (e) => e.value, me = (e) => e.subscribers, P = (e) => e.parent, H = (e) => e.scope, x = (e, t) => C(e).meta[t], ee = (e, t, n) => C(e).meta[t] = n, Ct = (e) => e.compositeName, $e = (e) => (V(e) || z(e)) && "kind" in e;
const ue = (e) => (t) => $e(t) && t.kind === e;
let Be = ue("store"), Ht = ue("event"), Ke = ue("effect"), it = ue("domain"), It = ue("scope");
var Nt = { __proto__: null, unit: $e, store: Be, event: Ht, effect: Ke, domain: it, scope: It, attached: (e) => Ke(e) && x(e, "attached") == 1 };
let Tt = typeof Symbol < "u" && Symbol.observable || "@@observable", re = "map", ne = "stack", C = (e) => e.graphite || e, Se = (e) => e.family.owners, ge = (e) => e.family.links, ve = (e) => e.stateRef, Z = (e) => e.value, me = (e) => e.subscribers, B = (e) => e.parent, H = (e) => e.scope, x = (e, t) => C(e).meta[t], ee = (e, t, n) => C(e).meta[t] = n, Ct = (e) => e.compositeName, Pe = (e) => (V(e) || z(e)) && "kind" in e;
const ue = (e) => (t) => Pe(t) && t.kind === e;
let $e = ue("store"), Ht = ue("event"), Ke = ue("effect"), it = ue("domain"), It = ue("scope");
var Nt = { __proto__: null, unit: Pe, store: $e, event: Ht, effect: Ke, domain: it, scope: It, attached: (e) => Ke(e) && x(e, "attached") == 1 };
let ce = (e, t) => {

@@ -247,3 +247,3 @@ let n = e.indexOf(t);

};
let $t = _e(), ut = _e(), Bt = _e(), Pt = _e(), G = null, lt = () => G, zt = (e) => (e && G && G.sidRoot && (e = `${G.sidRoot}|${e}`), e), Pe = (e, t) => {
let Pt = _e(), ut = _e(), $t = _e(), Bt = _e(), G = null, lt = () => G, zt = (e) => (e && G && G.sidRoot && (e = `${G.sidRoot}|${e}`), e), Be = (e, t) => {
let n = C(e);

@@ -291,3 +291,3 @@ k(t, (r) => {

}
}, $ = (e, t, n, r, i, s, o) => Me(0, { a: null, b: null, node: n, parent: r, value: i, page: t, scope: s, meta: o }, e), Me = (e, t, n, r = 0) => {
}, P = (e, t, n, r, i, s, o) => Me(0, { a: null, b: null, node: n, parent: r, value: i, page: t, scope: s, meta: o }, e), Me = (e, t, n, r = 0) => {
let i = Te(n), s = We[i], o = { v: { idx: e, stack: t, type: n, id: r }, l: null, r: null };

@@ -321,3 +321,3 @@ i === 3 || i === 4 ? W = qe(W, o) : (s.size === 0 ? s.first = o : s.last.r = o, s.last = o), s.size += 1;

for (; e && !e.reg[t]; )
e = P(e);
e = B(e);
if (e)

@@ -384,3 +384,3 @@ return e;

let n = 0;
if (e.ownerSet && e.ownerSet.delete(e), Be(e))
if (e.ownerSet && e.ownerSet.delete(e), $e(e))
Q(me(e));

@@ -397,5 +397,5 @@ else if (it(e)) {

}, Ge = (e, t, n, r, i) => N({ node: n, parent: e, child: t, scope: { fn: i }, meta: { op: r }, family: { owners: [e, t], links: t }, regional: 1 }), pt = (e, t) => (I(V(t), ".watch argument should be a function"), dt(N({ scope: { fn: t }, node: [je({ fn: ze })], parent: e, meta: { op: "watch" }, family: { owners: e }, regional: 1 }))), tr = (e, t, n = "event") => {
P(e) && P(e).hooks[n](t);
B(e) && B(e).hooks[n](t);
}, vt = (e, t, n) => {
let r = U(n), i = e === "domain", s = $t(), { sid: o = null, named: m = null, domain: y = null, parent: p = y } = r, S = m || r.name || (i ? "" : s), c = Dt(S, p), d = { op: t.kind = e, name: t.shortName = S, sid: t.sid = zt(o), named: m, unitId: t.id = s, serialize: r.serialize, derived: r.derived, config: r };
let r = U(n), i = e === "domain", s = Pt(), { sid: o = null, named: m = null, domain: y = null, parent: p = y } = r, S = m || r.name || (i ? "" : s), c = Dt(S, p), d = { op: t.kind = e, name: t.shortName = S, sid: t.sid = zt(o), named: m, unitId: t.id = s, serialize: r.serialize, derived: r.derived, config: r };
return t.parent = p, t.compositeName = c, t.defaultConfig = r, t.thru = (u) => (oe(0, "thru", "js pipe"), u(t)), t.getType = () => c.fullName, !i && (t.subscribe = (u) => (jt(u), t.watch(V(u) ? u : (a) => u.next && u.next(a))), t[Tt] = () => t), d;

@@ -412,3 +412,3 @@ };

let m = [o, q(r)];
return X("storeOnMap", s, m, Be(e) && ve(e)), Ge(e, t, m, n, i);
return X("storeOnMap", s, m, $e(e) && ve(e)), Ge(e, t, m, n, i);
};

@@ -755,3 +755,3 @@ let rr = (e, t, n) => {

const { useSyncExternalStore: _r } = pr, yr = (e, t) => t ? t.getState(e) : e.getState(), wr = T.createContext(null), Er = (e, t, n) => {
B(() => {
$(() => {
const r = (i) => {

@@ -803,17 +803,17 @@ i instanceof KeyboardEvent && i.key === n ? t(i) : n || t(i);

const { activeView: n, activePanel: r, activeModal: i, activePopout: s, isRouteInit: o, isBackHandled: m } = br();
B(() => {
$(() => {
o || (Ot(e.view), Rt(e.panel), e.modal && bt(e.modal), e.popout && At(e.popout));
}, [o, e.view, e.panel, e.modal, e.popout]);
const { virtualView: y, virtualPanel: p, virtualModal: S, virtualPopout: c, notHandledRoutes: d, isRoutesHandled: u } = wt(Rr);
B(() => {
$(() => {
pe({ view: y, panel: p });
}, [y, p]), B(() => {
}, [y, p]), $(() => {
pe({ modal: S });
}, [S]), B(() => {
}, [S]), $(() => {
pe({ popout: c });
}, [c]), B(() => {
}, [c]), $(() => {
m && u && d.length > 0 && (console.log("routes quque", d), Ne(!1), d.forEach((a) => {
a.view && a.panel && St({ view: a.view, panel: a.panel }), a.modal && gt(a.modal), a.popout && _t(a.popout);
a != null && a.view && (a != null && a.panel) && St({ view: a.view, panel: a.panel }), a.hasOwnProperty("modal") && gt(a.modal), a.hasOwnProperty("popout") && _t(a.popout);
}), xt(d.length), Ne(!0), o || yt());
}, [m, o, d, u]), B(() => {
}, [m, o, d, u]), $(() => {
o && ht({

@@ -820,0 +820,0 @@ view: n,

{
"name": "@blumjs/router",
"version": "3.1.1",
"version": "3.1.2",
"description": "",

@@ -5,0 +5,0 @@ "exports": {

Sorry, the diff of this file is not supported yet

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