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

axii

Package Overview
Dependencies
Maintainers
0
Versions
291
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axii - npm Package Compare versions

Comparing version 2.6.50 to 2.6.51

2

dist/axii.d.ts

@@ -583,2 +583,4 @@ declare type AllowFixed<T> = T extends RxList<infer U> ? U[] | T : T extends RxMap<infer K, infer V> ? [K, V][] | T : T extends Atom<infer U> ? U | T : T;

export declare function jsxDEV(type: JSXElementType, { children, ...rawProps }: AttributesArg): ComponentNode | HTMLElement | DocumentFragment | SVGElement;
export declare type JSXElement = ComponentNode | HTMLElement | Comment | DocumentFragment | SVGElement | string | number | undefined | null;

@@ -585,0 +587,0 @@

404

dist/axii.js

@@ -43,3 +43,3 @@ import { isAtom as G, atom as Q, RxList as F, RxSet as ne, RxMap as se, arrayComputed as ie, TrackOpTypes as $, TriggerOpTypes as N, destroyComputed as _, reactive as xe, ReactiveEffect as Le, computed as pe, autorun as me, Notifier as oe, isReactive as ye } from "data0";

let Ee = "px";
function It(t) {
function Dt(t) {
Ee = t;

@@ -65,3 +65,3 @@ }

}
function Ie(t) {
function De(t) {
const e = this._captureListeners[t.type];

@@ -71,3 +71,3 @@ return Array.isArray(e) ? e.forEach((r) => r == null ? void 0 : r(t, ...this.listenerBoundArgs || [])) : e == null ? void 0 : e(t, ...this.listenerBoundArgs || []);

const X = /* @__PURE__ */ new WeakMap();
function De(t) {
function Ie(t) {
return t[0] === "o" && t[1] === "n";

@@ -77,3 +77,3 @@ }

function q(t, e, r, n) {
if (Array.isArray(r) && e !== "style" && e !== "className" && !De(e))
if (Array.isArray(r) && e !== "style" && e !== "className" && !Ie(e))
return q(t, e, r.at(-1), n);

@@ -88,6 +88,6 @@ if (e === "uuid") {

i === "change" && (i = "input");
const o = s ? Ie : we;
const o = s ? De : we;
r ? t.addEventListener(i, o, s) : t.removeEventListener(i, o, s);
const c = s ? t._captureListeners || (t._captureListeners = {}) : t._listeners || (t._listeners = {});
A((c == null ? void 0 : c[i]) === void 0, `${e} already listened`), c[i] = r;
const a = s ? t._captureListeners || (t._captureListeners = {}) : t._listeners || (t._listeners = {});
A((a == null ? void 0 : a[i]) === void 0, `${e} already listened`), a[i] = r;
return;

@@ -97,4 +97,4 @@ }

(!r || Array.isArray(r) && !r.length) && (t.style.cssText = r || ""), (Array.isArray(r) ? r : [r]).forEach((i) => {
typeof i == "string" ? t.style.cssText = i : typeof i == "object" ? He(i, (o, c) => {
t.style[c] = te(c, o);
typeof i == "string" ? t.style.cssText = i : typeof i == "object" ? He(i, (o, a) => {
t.style[a] = te(a, o);
}) : A(!1, "style can only be string or object.");

@@ -108,4 +108,4 @@ });

s.forEach((o) => {
typeof o == "object" ? Object.entries(o).forEach(([c, a]) => {
a && (i = `${i} ${c}`);
typeof o == "object" ? Object.entries(o).forEach(([a, c]) => {
c && (i = `${i} ${a}`);
}) : typeof o == "string" ? i = `${i} ${o}` : A(!1, "className can only be string or {[k:string]:boolean}");

@@ -139,3 +139,3 @@ }), t.setAttribute("class", i);

}
function E(t, e, ...r) {
function g(t, e, ...r) {
const { _isSVG: n, ...s } = e || {};

@@ -150,3 +150,3 @@ let i;

return { type: t, props: s, children: o };
const c = [], a = [], f = [], p = [];
const a = [], c = [], f = [], p = [];
o == null || o.forEach((l, h) => {

@@ -159,20 +159,20 @@ if (l != null)

const u = l, y = u.unhandledChildren || [];
a.push(...y.map((g) => ({ ...g, path: [h, ...g.path] })));
c.push(...y.map((E) => ({ ...E, path: [h, ...E.path] })));
const m = u.unhandledAttr || [];
c.push(...m.map((g) => ({ ...g, path: [h, ...g.path] })));
a.push(...m.map((E) => ({ ...E, path: [h, ...E.path] })));
const w = u.refHandles || [];
f.push(...w.map((g) => ({ ...g, path: [h, ...g.path] })));
f.push(...w.map((E) => ({ ...E, path: [h, ...E.path] })));
const x = u.detachStyledChildren || [];
p.push(...x.map((g) => ({ ...g, path: [h, ...g.path] }))), delete u.unhandledChildren, delete u.unhandledAttr, delete u.refHandles, delete u.detachStyledChildren;
p.push(...x.map((E) => ({ ...E, path: [h, ...E.path] }))), delete u.unhandledChildren, delete u.unhandledAttr, delete u.refHandles, delete u.detachStyledChildren;
} else {
const u = document.createComment("unhandledChild");
i.appendChild(u), a.push({ placeholder: u, child: l, path: [h] });
i.appendChild(u), c.push({ placeholder: u, child: l, path: [h] });
}
}), s && (s.ref && (f.push({ handle: s.ref, path: [], el: i }), delete s.ref), s.detachStyle && (p.push({ el: i, style: s.detachStyle, path: [] }), delete s.detachStyle), Object.entries(s).forEach(([l, h]) => {
E.isValidAttribute(l, h) ? q(i, l, h, n) : c.push({ el: i, key: l, value: h, path: [] });
g.isValidAttribute(l, h) ? q(i, l, h, n) : a.push({ el: i, key: l, value: h, path: [] });
}));
const d = i;
return a.length && (d.unhandledChildren = a), c && (d.unhandledAttr = c), f.length && (d.refHandles = f), p.length && (d.detachStyledChildren = p), i;
return c.length && (d.unhandledChildren = c), a && (d.unhandledAttr = a), f.length && (d.refHandles = f), p.length && (d.detachStyledChildren = p), i;
}
function ce(t) {
function ae(t) {
return typeof t == "string" || typeof t == "number" || t instanceof M;

@@ -182,11 +182,11 @@ }

return ee(t) && Object.entries(t).every(
([e, r]) => /[a-zA-Z\-]+/.test(e) && ce(r) || Array.isArray(r) && r.every(ce)
([e, r]) => /[a-zA-Z\-]+/.test(e) && ae(r) || Array.isArray(r) && r.every(ae)
);
}
E.isValidAttribute = function(t, e) {
return Array.isArray(e) ? e.every((r) => E.isValidAttribute(t, r)) : !!(typeof e != "object" && typeof e != "function" || t[0] === "o" && t[1] === "n" && typeof e == "function" || (ke(e) || typeof e == "string") && t === "style" || ee(e) && t === "className");
g.isValidAttribute = function(t, e) {
return Array.isArray(e) ? e.every((r) => g.isValidAttribute(t, r)) : !!(typeof e != "object" && typeof e != "function" || t[0] === "o" && t[1] === "n" && typeof e == "function" || (ke(e) || typeof e == "string") && t === "style" || ee(e) && t === "className");
};
E.attachRef = function(t, e) {
g.attachRef = function(t, e) {
if (Array.isArray(e)) {
e.forEach((r) => E.attachRef(t, r));
e.forEach((r) => g.attachRef(t, r));
return;

@@ -196,5 +196,5 @@ }

};
E.detachRef = function(t) {
g.detachRef = function(t) {
if (Array.isArray(t)) {
t.forEach((e) => E.detachRef(e));
t.forEach((e) => g.detachRef(e));
return;

@@ -214,7 +214,7 @@ }

}
function Dt(t, e, ...r) {
return E(t, { _isSVG: !0, ...e || {} }, r);
function It(t, e, ...r) {
return g(t, { _isSVG: !0, ...e || {} }, r);
}
function Ve(t, e, ...r) {
return E(t, { _isSVG: !0, ...e || {} }, r);
return g(t, { _isSVG: !0, ...e || {} }, r);
}

@@ -267,10 +267,13 @@ function Mt(t, e) {

function kt(t, { children: e, ...r }) {
return E(t, r, e);
return g(t, r, e);
}
function Vt(t, { children: e, ...r }) {
return E(t, r, [e]);
return g(t, r, [e]);
}
function jt(t, { children: e, ...r }) {
return Array.isArray(e) ? g(t, r, e) : g(t, r, e ? [e] : []);
}
function je() {
}
function ae(t) {
function ce(t) {
const e = typeof t;

@@ -282,7 +285,7 @@ return e === "string" || e === "number";

var s, i, o;
function n(c) {
var a;
if (!((a = n.check) != null && a.call(n, c))) return new Error("type check failed");
function n(a) {
var c;
if (!((c = n.check) != null && c.call(n, a))) return new Error("type check failed");
}
return n.argv = r, n.stringify = (s = t.stringify) == null ? void 0 : s.bind(n), n.parse = (i = t.parse) == null ? void 0 : i.bind(n), n.check = (o = t.check) == null ? void 0 : o.bind(n), n.is = t.is || ((c) => c === e), n.zeroValue = t.zeroValue, n.required = t.required, n.createDefaultValue = t.createDefaultValue, n.coerce = t.coerce, n.required || Object.defineProperty(n, "isRequired", {
return n.argv = r, n.stringify = (s = t.stringify) == null ? void 0 : s.bind(n), n.parse = (i = t.parse) == null ? void 0 : i.bind(n), n.check = (o = t.check) == null ? void 0 : o.bind(n), n.is = t.is || ((a) => a === e), n.zeroValue = t.zeroValue, n.required = t.required, n.createDefaultValue = t.createDefaultValue, n.coerce = t.coerce, n.required || Object.defineProperty(n, "isRequired", {
get() {

@@ -303,6 +306,6 @@ return P({

get() {
return (c) => P({
return (a) => P({
...t,
required: n.required,
createDefaultValue: c,
createDefaultValue: a,
is: n.is

@@ -322,9 +325,9 @@ })(...r);

...o
} = e, c = function(a) {
if (typeof t == "function" && !t(a))
return new Error(`${a} type check failed`);
if (typeof t == "string" && typeof a !== t)
return new Error(`${a} is not ${t}`);
} = e, a = function(c) {
if (typeof t == "function" && !t(c))
return new Error(`${c} type check failed`);
if (typeof t == "string" && typeof c !== t)
return new Error(`${c} is not ${t}`);
};
return c.stringify = r, c.parse = n, c.check = (a) => typeof t == "string" ? typeof a === t : t(a), c.is = s || ((a) => a === c), c.required = !!i, Object.assign(c, o), c.required || Object.defineProperty(c, "isRequired", {
return a.stringify = r, a.parse = n, a.check = (c) => typeof t == "string" ? typeof c === t : t(c), a.is = s || ((c) => c === a), a.required = !!i, Object.assign(a, o), a.required || Object.defineProperty(a, "isRequired", {
get() {

@@ -334,27 +337,27 @@ return T(t, {

required: !0,
is: c.is
is: a.is
});
}
}), c.createDefaultValue ? Object.defineProperty(c, "defaultValue", {
}), a.createDefaultValue ? Object.defineProperty(a, "defaultValue", {
get() {
if (c.createDefaultValue)
return c.createDefaultValue();
if (a.createDefaultValue)
return a.createDefaultValue();
}
}) : Object.defineProperty(c, "default", {
}) : Object.defineProperty(a, "default", {
get() {
return (a) => T(t, {
return (c) => T(t, {
...e,
required: c.required,
createDefaultValue: a,
is: c.is
required: a.required,
createDefaultValue: c,
is: a.is
});
}
}), c.valueType = {}, c;
}), a.valueType = {}, a;
}
const Fe = P({
stringify(t) {
return t === null ? "" : ae(this.argv[0][0]) ? t.toString() : JSON.stringify(t);
return t === null ? "" : ce(this.argv[0][0]) ? t.toString() : JSON.stringify(t);
},
parse(t) {
return ae(this.argv[0][0]) ? typeof this.argv[0][0] == "string" ? t : parseFloat(t) : JSON.parse(t);
return ce(this.argv[0][0]) ? typeof this.argv[0][0] == "string" ? t : parseFloat(t) : JSON.parse(t);
},

@@ -444,4 +447,4 @@ check(t) {

}
}), st = W, it = W, ot = W, ct = je;
function at() {
}), st = W, it = W, ot = W, at = je;
function ct() {
return P({

@@ -492,5 +495,5 @@ coerce: (t) => G(t) ? t : Q(t)

any: W,
checkPropTypes: ct,
checkPropTypes: at,
// reactive types
atom: at,
atom: ct,
rxList: lt,

@@ -528,4 +531,4 @@ rxSet: ht,

function(n, s) {
s.forEach(({ method: i, argv: o, result: c }) => {
var a, f, p;
s.forEach(({ method: i, argv: o, result: a }) => {
var c, f, p;
if (i === "push") {

@@ -544,8 +547,8 @@ const d = o.map(e.createPlaceholder);

n.splice(o[0], o[1], ...d);
} else if (!i && c)
(a = c.add) == null || a.forEach(({}) => {
} else if (!i && a)
(c = a.add) == null || c.forEach(({}) => {
throw new Error("can not use obj[key] = value to add item to reactive array, use push instead.");
}), (f = c.remove) == null || f.forEach(({}) => {
}), (f = a.remove) == null || f.forEach(({}) => {
throw new Error("can not use delete obj[key] to delete item, use splice instead.");
}), (p = c.update) == null || p.forEach(({ key: d, newValue: l }) => {
}), (p = a.update) == null || p.forEach(({ key: d, newValue: l }) => {
n[d] = e.createPlaceholder(l);

@@ -565,3 +568,3 @@ });

this.manualTrack(e.placeholderAndItemComputed, $.METHOD, N.METHOD), this.manualTrack(e.placeholderAndItemComputed, $.EXPLICIT_KEY_CHANGE, N.EXPLICIT_KEY_CHANGE);
const n = e.placeholderAndItemComputed.map(([o, c]) => R(o, c, { ...e.pathContext, hostPath: [...e.pathContext.hostPath, e] })), s = document.createDocumentFragment();
const n = e.placeholderAndItemComputed.map(([o, a]) => R(o, a, { ...e.pathContext, hostPath: [...e.pathContext.hostPath, e] })), s = document.createDocumentFragment();
return n.forEach((o) => {

@@ -572,4 +575,4 @@ s.appendChild(o.placeholder), o.render();

function(n, s) {
s.forEach(({ method: i, argv: o, result: c }) => {
var a, f, p, d;
s.forEach(({ method: i, argv: o, result: a }) => {
var c, f, p, d;
if (i === "push") {

@@ -598,10 +601,10 @@ const l = o.map(e.createHost), h = document.createDocumentFragment();

const u = ut(o, n.length);
S(l, ((a = n[o[0] + u]) == null ? void 0 : a.element) || e.placeholder), n.splice(o[0], u, ...h).forEach((m) => m.destroy());
S(l, ((c = n[o[0] + u]) == null ? void 0 : c.element) || e.placeholder), n.splice(o[0], u, ...h).forEach((m) => m.destroy());
}
} else if (!i && c)
(f = c.add) == null || f.forEach(({}) => {
} else if (!i && a)
(f = a.add) == null || f.forEach(({}) => {
throw new Error("should never occur");
}), (p = c.remove) == null || p.forEach(({}) => {
}), (p = a.remove) == null || p.forEach(({}) => {
throw new Error("should never occur");
}), (d = c.update) == null || d.forEach(({ key: l, newValue: h }) => {
}), (d = a.update) == null || d.forEach(({ key: l, newValue: h }) => {
var u;

@@ -658,15 +661,15 @@ n[l].destroy(), n[l] = e.createHost(h), S(n[l].placeholder, ((u = n[parseInt(l, 10) + 1]) == null ? void 0 : u.element) || e.placeholder), n[l].render();

constructor({ type: e, props: r = {}, children: n }, s, i) {
this.placeholder = s, this.pathContext = i, this.layoutEffects = /* @__PURE__ */ new Set(), this.effects = /* @__PURE__ */ new Set(), this.destroyCallback = /* @__PURE__ */ new Set(), this.layoutEffectDestroyHandles = /* @__PURE__ */ new Set(), this.refs = xe({}), this.itemConfig = {}, this.frame = [], this.exposed = {}, this.createHTMLOrSVGElement = (o, c, a, ...f) => {
var x, g, I, D;
const p = typeof c == "function", d = a == null ? void 0 : a.as;
if (a == null || delete a.as, A(d !== "self", '"self" is reserved, please use another element name.'), d && ((x = this.itemConfig[d]) != null && x.use) && ((g = this.itemConfig[d]) == null ? void 0 : g.use) instanceof Element)
this.placeholder = s, this.pathContext = i, this.layoutEffects = /* @__PURE__ */ new Set(), this.effects = /* @__PURE__ */ new Set(), this.destroyCallback = /* @__PURE__ */ new Set(), this.layoutEffectDestroyHandles = /* @__PURE__ */ new Set(), this.refs = xe({}), this.itemConfig = {}, this.frame = [], this.exposed = {}, this.createHTMLOrSVGElement = (o, a, c, ...f) => {
var x, E, D, I;
const p = typeof a == "function", d = c == null ? void 0 : c.as;
if (c == null || delete c.as, A(d !== "self", '"self" is reserved, please use another element name.'), d && ((x = this.itemConfig[d]) != null && x.use) && ((E = this.itemConfig[d]) == null ? void 0 : E.use) instanceof Element)
return this.itemConfig[d].use;
let l = f, { props: h, componentProps: u } = this.separateProps(a);
let l = f, { props: h, componentProps: u } = this.separateProps(c);
const y = this.itemConfig[d];
d && y && (y.props && (p ? h = { ...a, ...y.props } : h = gt(a, y.props)), y.propMergeHandles && Object.entries(y.propMergeHandles).forEach(([b, O]) => {
d && y && (y.props && (p ? h = { ...c, ...y.props } : h = gt(c, y.props)), y.propMergeHandles && Object.entries(y.propMergeHandles).forEach(([b, O]) => {
h[b] = O.reduce((Pe, Te) => Te(Pe, u), h[b]);
}), y.propsMergeHandle && (h = y.propsMergeHandle.reduce((b, O) => O(b, u), h)), y.children && (l = y.children));
const m = ((I = this.itemConfig[d]) == null ? void 0 : I.use) || c;
typeof m == "function" && !p && (u[wt] = h, h = u), typeof m == "function" && ((D = y == null ? void 0 : y.configProps) != null && D.length) && Object.assign(h, { [K]: y.configProps }), d && (h.ref = H(h.ref).concat((b) => this.refs[d] = b));
const w = o ? Ve(m, h, ...l) : E(m, h, ...l);
const m = ((D = this.itemConfig[d]) == null ? void 0 : D.use) || a;
typeof m == "function" && !p && (u[wt] = h, h = u), typeof m == "function" && ((I = y == null ? void 0 : y.configProps) != null && I.length) && Object.assign(h, { [K]: y.configProps }), d && (h.ref = H(h.ref).concat((b) => this.refs[d] = b));
const w = o ? Ve(m, h, ...l) : g(m, h, ...l);
if (typeof m != "function") {

@@ -677,20 +680,20 @@ const b = this.pathContext.hostPath.filter((O) => O instanceof L).map((O) => O.props).reverse();

return w;
}, this.createElement = this.createHTMLOrSVGElement.bind(this, !1), this.createSVGElement = this.createHTMLOrSVGElement.bind(this, !0), this.createPortal = (o, c) => E(pt, { container: c, content: o }), this.useLayoutEffect = (o) => {
}, this.createElement = this.createHTMLOrSVGElement.bind(this, !1), this.createSVGElement = this.createHTMLOrSVGElement.bind(this, !0), this.createPortal = (o, a) => g(pt, { container: a, content: o }), this.useLayoutEffect = (o) => {
this.layoutEffects.add(o);
}, this.useEffect = (o) => {
this.effects.add(o);
}, this.createRef = mt, this.createRxRef = yt, this.cleanupsOfExternalTarget = /* @__PURE__ */ new Set(), this.createStateFromRef = (o, c) => {
let a;
}, this.createRef = mt, this.createRxRef = yt, this.cleanupsOfExternalTarget = /* @__PURE__ */ new Set(), this.createStateFromRef = (o, a) => {
let c;
const f = (d) => {
c && a && this.cleanupsOfExternalTarget.delete(a), a == null || a(), d !== null ? (a = o(d, p), c && a && this.cleanupsOfExternalTarget.add(a)) : (a = void 0, p(null));
a && c && this.cleanupsOfExternalTarget.delete(c), c == null || c(), d !== null ? (c = o(d, p), a && c && this.cleanupsOfExternalTarget.add(c)) : (c = void 0, p(null));
}, p = new Proxy(Q(null), {
get: (d, l) => l === "ref" ? f : d[l]
});
return c && p.ref(c), p;
}, this.expose = (o, c) => (typeof o == "object" && c === void 0 ? Object.assign(this.exposed, o) : typeof c == "string" && (this.exposed[c] = o), o), this.onCleanup = (o) => {
return a && p.ref(a), p;
}, this.expose = (o, a) => (typeof o == "object" && a === void 0 ? Object.assign(this.exposed, o) : typeof a == "string" && (this.exposed[a] = o), o), this.onCleanup = (o) => {
this.destroyCallback.add(o);
}, this.runLayoutEffect = () => {
this.layoutEffects.forEach((o) => {
const c = o();
typeof c == "function" && this.layoutEffectDestroyHandles.add(c);
const a = o();
typeof a == "function" && this.layoutEffectDestroyHandles.add(a);
});

@@ -802,4 +805,4 @@ }, L.typeIds.has(e) || L.typeIds.set(e, L.typeIds.size), this.name = e.name, this.type = e, this.props = {}, this.refProp = r.ref, this.thisProp = r.__this, this.inputProps = r, this.children = n;

this.frame = e(), this.innerHost = R(i, this.placeholder, { ...this.pathContext, hostPath: [...this.pathContext.hostPath, this] }), this.innerHost.render(), this.refProp && this.attachRef(this.refProp), this.thisProp && this.attachThis(this.thisProp), this.effects.forEach((o) => {
const c = o();
typeof c == "function" && this.destroyCallback.add(c);
const a = o();
typeof a == "function" && this.destroyCallback.add(a);
}), this.pathContext.root.attached ? this.runLayoutEffect() : this.deleteLayoutEffectCallback = this.pathContext.root.on("attach", this.runLayoutEffect);

@@ -832,3 +835,3 @@ }

const wt = "__nativeAttrs";
function jt(t, e) {
function Ft(t, e) {
const r = t.bind(null);

@@ -901,4 +904,4 @@ return r.propTypes = t.propTypes, r.boundProps = H(r.boundProps).concat(e), r;

}
const bt = E.isValidAttribute;
E.isValidAttribute = function(t, e) {
const bt = g.isValidAttribute;
g.isValidAttribute = function(t, e) {
return t.startsWith("on") ? !0 : Array.isArray(e) && e.some(fe) || fe(e) ? !1 : bt(t, e);

@@ -934,12 +937,12 @@ };

if (n) {
const c = this.elToStyleId.get(n);
if (c)
return c;
const a = this.elToStyleId.get(n);
if (a)
return a;
{
const a = `gen-${Math.random().toString(36).slice(2)}`;
return this.elToStyleId.set(n, a), a;
const c = `gen-${Math.random().toString(36).slice(2)}`;
return this.elToStyleId.set(n, c), c;
}
}
const s = e.findLastIndex((c) => c instanceof k), i = s === -1 ? void 0 : e[s], o = s === -1 ? e : e.slice(s + 1);
return `gen-${(i == null ? void 0 : i.typeId) ?? "global"}-${o.map((c) => c.pathContext.elementPath.join("_")).join("-")}-${r.join("_")}`;
const s = e.findLastIndex((a) => a instanceof k), i = s === -1 ? void 0 : e[s], o = s === -1 ? e : e.slice(s + 1);
return `gen-${(i == null ? void 0 : i.typeId) ?? "global"}-${o.map((a) => a.pathContext.elementPath.join("_")).join("-")}-${r.join("_")}`;
}

@@ -952,16 +955,16 @@ stringifyStyleObject(e) {

const o = this.getStyleSheetId(e, r, i ? null : s);
let c = this.styleScripts.get(o);
c || (c = new CSSStyleSheet(), document.adoptedStyleSheets = [...document.adoptedStyleSheets, c], this.styleScripts.set(o, c)), s.classList.add(o);
const a = Array.isArray(n) ? n : [n];
c.replaceSync(this.generateStyleContent(`.${o}`, a[0]).join(`
let a = this.styleScripts.get(o);
a || (a = new CSSStyleSheet(), document.adoptedStyleSheets = [...document.adoptedStyleSheets, a], this.styleScripts.set(o, a)), s.classList.add(o);
const c = Array.isArray(n) ? n : [n];
a.replaceSync(this.generateStyleContent(`.${o}`, c[0]).join(`
`));
const f = U(a[0]);
return f.length && ue(s), Re(a.slice(1).map((p) => () => {
const f = U(c[0]);
return f.length && ue(s), Re(c.slice(1).map((p) => () => {
const [d, l, h] = this.separateStyleObject(p, f);
if (l && this.generateStyleContent(`.${o}`, l).forEach((u) => {
c.insertRule(u, c.cssRules.length);
a.insertRule(u, a.cssRules.length);
}), d) {
const u = U(d);
f.push(...u), this.generateStyleContent(`.${o}`, d).forEach((y) => {
c.insertRule(y, c.cssRules.length);
a.insertRule(y, a.cssRules.length);
});

@@ -1008,14 +1011,14 @@ }

const n = { ...r }, s = [], i = {};
for (const a in n)
a === "@keyframes" || a === "animation" ? (i[a] = n[a], delete n[a]) : this.isNestedStyleObject(a, n[a]) && (s.push([a, n[a]]), delete n[a]);
for (const c in n)
c === "@keyframes" || c === "animation" ? (i[c] = n[c], delete n[c]) : this.isNestedStyleObject(c, n[c]) && (s.push([c, n[c]]), delete n[c]);
const o = [`${e} {
${this.stringifyStyleObject(n)}
}`], c = this.generateInlineAnimationContent(e, i);
return o.push(...c), s.reduce((a, [f, p]) => {
}`], a = this.generateInlineAnimationContent(e, i);
return o.push(...a), s.reduce((c, [f, p]) => {
if (f.startsWith("@"))
return a.concat(`${f} {
return c.concat(`${f} {
${this.generateStyleContent(e, p)}
}`);
const d = /^(\s?)+&/.test(f) ? f.replace("&", e) : `${e} ${f}`;
return a.concat(this.generateStyleContent(d, p));
return c.concat(this.generateStyleContent(d, p));
}, o);

@@ -1029,3 +1032,3 @@ }

(s = this.refHandles) == null || s.forEach(({ handle: i, el: o }) => {
E.attachRef(o, i);
g.attachRef(o, i);
});

@@ -1057,5 +1060,5 @@ };

const r = e instanceof SVGElement, { unhandledAttr: n } = e;
this.attrAutoruns = [], n == null || n.forEach(({ el: s, key: i, value: o, path: c }) => {
this.attrAutoruns = [], n == null || n.forEach(({ el: s, key: i, value: o, path: a }) => {
i.includes(":") || this.attrAutoruns.push(me(() => {
this.updateAttribute(s, i, o, c, r);
this.updateAttribute(s, i, o, a, r);
}, !0));

@@ -1065,3 +1068,3 @@ });

updateAttribute(e, r, n, s, i) {
const o = Array.isArray(n) ? n.map((c) => V(c) ? c() : c) : V(n) ? n() : n;
const o = Array.isArray(n) ? n.map((a) => V(a) ? a() : a) : V(n) ? n() : n;
if (r === "style" && (be(o) || re(o) || Ae(o)))

@@ -1086,3 +1089,3 @@ return B.styleManager.update(this.pathContext.hostPath, s, o, e, !1);

r || (n = this.attrAutoruns) == null || n.forEach((o) => o()), (s = this.reactiveHosts) == null || s.forEach((o) => o.destroy(!0, r)), (i = this.refHandles) == null || i.forEach(({ handle: o }) => {
E.detachRef(o);
g.detachRef(o);
}), this.removeElements(e);

@@ -1099,8 +1102,8 @@ }

}), await Promise.all(((s = this.detachStyledChildren) == null ? void 0 : s.map(({ el: f, style: p, path: d }) => this.updateAttribute(f, "style", p, d, f instanceof SVGElement))) || []);
const c = Array.from(i), a = Array.from(o);
const a = Array.from(i), c = Array.from(o);
await Promise.all([
...c.map((f) => j(f, "transitionrun")),
...c.map((f) => j(f, "transitionend")),
...a.map((f) => j(f, "animationrun")),
...a.map((f) => j(f, "animationend"))
...a.map((f) => j(f, "transitionrun")),
...a.map((f) => j(f, "transitionend")),
...c.map((f) => j(f, "animationrun")),
...c.map((f) => j(f, "animationend"))
]);

@@ -1181,3 +1184,3 @@ }

function(n, s) {
s.forEach(({ method: i, argv: o, result: c, key: a, newValue: f, methodResult: p }, d) => {
s.forEach(({ method: i, argv: o, result: a, key: c, newValue: f, methodResult: p }, d) => {
var l;

@@ -1191,6 +1194,6 @@ if (i === "splice") {

p.forEach((m) => m.destroy());
} else if (i === void 0 && a !== void 0) {
} else if (i === void 0 && c !== void 0) {
const h = p;
h == null || h.destroy();
const u = a;
const u = c;
S(e.hosts.at(u).placeholder, ((l = e.hosts.at(u + 1)) == null ? void 0 : l.element) || e.placeholder), e.hosts.at(u).render();

@@ -1256,10 +1259,10 @@ } else

on(i, o) {
let c = r.get(i);
return c || r.set(i, c = /* @__PURE__ */ new Set()), c.add(o), () => {
c.delete(o);
let a = r.get(i);
return a || r.set(i, a = /* @__PURE__ */ new Set()), a.add(o), () => {
a.delete(o);
};
},
dispatch(i, o) {
var c;
(c = r.get(i)) == null || c.forEach((a) => a(o));
var a;
(a = r.get(i)) == null || a.forEach((c) => c(o));
}

@@ -1275,4 +1278,4 @@ };

}
const Ft = C((t) => t.key === "ArrowUp"), _t = C((t) => t.key === "ArrowDown"), zt = C((t) => t.key === "ArrowLeft"), Bt = C((t) => t.key === "ArrowRight"), Gt = C((t) => t.key === "Enter"), qt = C((t) => t.key === "Tab"), Wt = C((t) => t.key === "Escape"), Kt = C((t) => t.key === "Backspace"), Xt = C((t) => t.key === "Space"), Yt = C((t) => t.button === 0), Ut = C((t) => t.button === 2), Jt = C((t) => t.button === 1), Zt = (t, e) => C((r) => e != null && e.meta && !r.metaKey || e != null && e.ctrl && !r.ctrlKey || e != null && e.alt && !r.altKey || e != null && e.shift && !r.shiftKey ? !1 : r.key === t), Qt = C((t) => t.target === t.currentTarget);
function er(t) {
const _t = C((t) => t.key === "ArrowUp"), zt = C((t) => t.key === "ArrowDown"), Bt = C((t) => t.key === "ArrowLeft"), Gt = C((t) => t.key === "ArrowRight"), qt = C((t) => t.key === "Enter"), Wt = C((t) => t.key === "Tab"), Kt = C((t) => t.key === "Escape"), Xt = C((t) => t.key === "Backspace"), Yt = C((t) => t.key === "Space"), Ut = C((t) => t.button === 0), Jt = C((t) => t.button === 2), Zt = C((t) => t.button === 1), Qt = (t, e) => C((r) => e != null && e.meta && !r.metaKey || e != null && e.ctrl && !r.ctrlKey || e != null && e.alt && !r.altKey || e != null && e.shift && !r.shiftKey ? !1 : r.key === t), er = C((t) => t.target === t.currentTarget);
function tr(t) {
let e;

@@ -1300,3 +1303,3 @@ function r(s) {

}
function tr(t) {
function rr(t) {
return (e) => {

@@ -1308,3 +1311,3 @@ var n;

}
function rr(t) {
function nr(t) {
return (e) => {

@@ -1314,3 +1317,3 @@ e.preventDefault(), t(e);

}
function nr(t) {
function sr(t) {
return (e) => {

@@ -1320,3 +1323,3 @@ e.stopPropagation(), t(e);

}
function sr({ contextType: t, value: e, children: r }, { context: n }) {
function ir({ contextType: t, value: e, children: r }, { context: n }) {
return n.set(t, e), r;

@@ -1336,4 +1339,4 @@ }

function vt({ name: t, children: e, onChange: r, onSubmit: n, onClear: s, onReset: i, values: o }, {
createElement: c,
context: a
createElement: a,
context: c
}) {

@@ -1344,6 +1347,6 @@ const f = {}, p = (m, w, x) => {

if (x) {
const g = o.get(m), I = g.findIndex((b) => b === w.value);
I() > -1 && g.splice(I(), 1);
const D = f[m].findIndex((b) => b === w);
D > -1 && f[m].splice(D, 1);
const E = o.get(m), D = E.findIndex((b) => b === w.value);
D() > -1 && E.splice(D(), 1);
const I = f[m].findIndex((b) => b === w);
I > -1 && f[m].splice(I, 1);
} else

@@ -1364,3 +1367,3 @@ o.delete(m), delete f[m];

};
return a.set(Ot, { name: t, register: p, unregister: d, onChange: y, submit: l, reset: h, clear: u }), e;
return c.set(Ot, { name: t, register: p, unregister: d, onChange: y, submit: l, reset: h, clear: u }), e;
}

@@ -1376,4 +1379,4 @@ vt.propTypes = {

};
const ir = Symbol("ModalContext");
function or(t) {
const or = Symbol("ModalContext");
function ar(t) {
return (e, r) => {

@@ -1404,4 +1407,4 @@ if (e === window) {

return t.forEach((o) => {
const c = () => s();
o.target.addEventListener(o.event, c), i.push(() => o.target.removeEventListener(o.event, c));
const a = () => s();
o.target.addEventListener(o.event, a), i.push(() => o.target.removeEventListener(o.event, a));
}), () => {

@@ -1468,3 +1471,3 @@ i.forEach((o) => o());

}
function ar(t, e) {
function lr(t, e) {
const r = () => {

@@ -1480,8 +1483,8 @@ e(!0);

const $t = "dragmove";
function lr(t) {
function hr(t) {
const e = (t == null ? void 0 : t.container) || document.body, r = (t == null ? void 0 : t.customEventName) || $t;
return function(s) {
const i = (o) => {
const c = o.clientX, a = o.clientY;
let f = c, p = a;
const a = o.clientX, c = o.clientY;
let f = a, p = c;
const d = (l) => {

@@ -1491,4 +1494,4 @@ const h = {

clientY: l.clientY,
deltaXFromStart: l.clientX - c,
deltaYFromStart: l.clientY - a,
deltaXFromStart: l.clientX - a,
deltaYFromStart: l.clientY - c,
deltaX: l.clientX - f,

@@ -1508,3 +1511,3 @@ deltaY: l.clientY - p

}
function hr(t) {
function fr(t) {
return function(r, n) {

@@ -1514,12 +1517,12 @@ const s = (i) => {

return;
const o = { clientX: i.clientX, offsetX: 0, clientY: i.clientY, offsetY: 0 }, c = (a) => {
const o = { clientX: i.clientX, offsetX: 0, clientY: i.clientY, offsetY: 0 }, a = (c) => {
n({
clientX: a.clientX,
clientY: a.clientY,
offsetX: a.clientX - o.clientX,
offsetY: a.clientY - o.clientY
clientX: c.clientX,
clientY: c.clientY,
offsetX: c.clientX - o.clientX,
offsetY: c.clientY - o.clientY
});
};
r.addEventListener("mousemove", c), document.addEventListener("mouseup", () => {
n(null), r.removeEventListener("mousemove", c);
r.addEventListener("mousemove", a), document.addEventListener("mouseup", () => {
n(null), r.removeEventListener("mousemove", a);
}, { once: !0 });

@@ -1532,3 +1535,3 @@ };

}
function fr(t) {
function ur(t) {
return function(r, n) {

@@ -1545,3 +1548,3 @@ const s = (i) => {

}
function ur(t, e) {
function dr(t, e) {
const r = () => {

@@ -1561,3 +1564,3 @@ e({

k as ComponentHost,
sr as ContextProvider,
ir as ContextProvider,
$t as DEFAULT_DRAG_MOVE_EVENT,

@@ -1568,3 +1571,3 @@ Et as DataContext,

Ce as Fragment,
ir as ModalContext,
or as ModalContext,
wt as N_ATTR,

@@ -1575,12 +1578,12 @@ pt as Portal,

ve as autoUnit,
jt as bindProps,
Ft as bindProps,
Rt as createContext,
E as createElement,
Dt as createElementNS,
er as createEventTransfer,
g as createElement,
It as createElementNS,
tr as createEventTransfer,
R as createHost,
lr as createOnDragMove,
hr as createReactiveDragPosition,
fr as createReactiveDragTarget,
or as createReactivePosition,
hr as createOnDragMove,
fr as createReactiveDragPosition,
ur as createReactiveDragTarget,
ar as createReactivePosition,
mt as createRef,

@@ -1592,27 +1595,28 @@ Ht as createRoot,

Vt as jsx,
jt as jsxDEV,
kt as jsxs,
Y as mergeProp,
gt as mergeProps,
Kt as onBackspaceKey,
_t as onDownKey,
Wt as onESCKey,
Gt as onEnterKey,
Zt as onKey,
zt as onLeftKey,
Yt as onLeftMouseDown,
Jt as onMiddleMouseDown,
Bt as onRightKey,
Ut as onRightMouseDown,
Qt as onSelf,
Xt as onSpaceKey,
qt as onTabKey,
Ft as onUpKey,
ar as reactiveFocused,
ur as reactiveScrollPosition,
Xt as onBackspaceKey,
zt as onDownKey,
Kt as onESCKey,
qt as onEnterKey,
Qt as onKey,
Bt as onLeftKey,
Ut as onLeftMouseDown,
Zt as onMiddleMouseDown,
Gt as onRightKey,
Jt as onRightMouseDown,
er as onSelf,
Yt as onSpaceKey,
Wt as onTabKey,
_t as onUpKey,
lr as reactiveFocused,
dr as reactiveScrollPosition,
cr as reactiveSize,
It as setAutoUnitType,
tr as withCurrentRange,
rr as withPreventDefault,
nr as withStopPropagation
Dt as setAutoUnitType,
rr as withCurrentRange,
nr as withPreventDefault,
sr as withStopPropagation
};
//# sourceMappingURL=axii.js.map
{
"name": "axii",
"version": "2.6.50",
"version": "2.6.51",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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