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.58 to 2.6.59

25

dist/axii.d.ts

@@ -1313,2 +1313,8 @@ 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;

/* Excluded from this release type: StaticHost */
export declare const StaticHostConfig: {
autoGenerateTestId: boolean;
};
export declare const STATUS_CLEAN = 3;

@@ -1324,2 +1330,21 @@

declare class StyleManager {
styleScripts: Map<string, CSSStyleSheet>;
elToStyleId: WeakMap<HTMLElement, string>;
getStyleSheetId(hostPath: Host[], elementPath: number[], el: ExtendedElement | null): string;
stringifyStyleObject(styleObject: {
[k: string]: any;
}): string;
update(hostPath: Host[], elementPath: number[], styleObject: StyleObject | StyleObject[], el: ExtendedElement, isStatic?: boolean): Promise<unknown>;
isNestedStyleObject(key: string, styleObject: any): boolean;
separateStyleObject(styleObject: StyleObject, transitionPropertyNames: string[]): [StyleObject?, StyleObject?, StyleObject?];
stringifyKeyFrameObject(keyframeObject: StyleObject): string;
generateInlineAnimationContent(selector: string, styleObject: StyleObject): string[];
generateStyleContent(selector: string, styleObject: StyleObject): string[];
}
declare type StyleObject = {
[k: string]: any;
};
/**

@@ -1326,0 +1351,0 @@ * @category Common Utility

434

dist/axii.js

@@ -1,4 +0,4 @@

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";
import { isAtom as q, atom as Q, RxList as _, RxSet as ne, RxMap as se, arrayComputed as ie, TrackOpTypes as I, TriggerOpTypes as $, destroyComputed as G, reactive as Le, ReactiveEffect as He, computed as pe, autorun as me, Notifier as oe, isReactive as ye } from "data0";
export * from "data0";
function He(t, e) {
function Re(t, e) {
for (let r in t)

@@ -32,3 +32,3 @@ e(t[r], r);

}
function Re(t) {
function Oe(t) {
return t.length ? new Promise((e) => {

@@ -42,8 +42,8 @@ let r = 0;

}
const Oe = /^(width|height|top|left|right|bottom|margin|padding|border|fontSize|maxWidth|maxHeight|minHeight|minWidth|gap|flexBasis|columnGap|rowGap)/;
const ve = /^(width|height|top|left|right|bottom|margin|padding|border|fontSize|maxWidth|maxHeight|minHeight|minWidth|gap|flexBasis|columnGap|rowGap)/;
let Ee = "px";
function Dt(t) {
function Mt(t) {
Ee = t;
}
function ve(t) {
function Ie(t) {
return typeof t == "string" ? t : `${t}${Ee}`;

@@ -53,3 +53,3 @@ }

function te(t, e) {
return e === void 0 ? "" : Array.isArray(e) ? $e.test(t) ? e.join(",") : e.map((r) => te(t, r)).join(" ") : typeof e == "number" && Oe.test(t) ? ve(e) : e.toString();
return e === void 0 ? "" : Array.isArray(e) ? $e.test(t) ? e.join(",") : e.map((r) => te(t, r)).join(" ") : typeof e == "number" && ve.test(t) ? Ie(e) : e.toString();
}

@@ -63,3 +63,3 @@ function Ne(t, e, r) {

}
function we(t) {
function Ce(t) {
const e = this._listeners[t.type];

@@ -73,9 +73,9 @@ 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 Ie(t) {
function Me(t) {
return t[0] === "o" && t[1] === "n";
}
const Me = /^(strokeWidth|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeDashoffset|strokeDasharray|strokeOpacity|fillOpacity|stopOpacity)/;
function q(t, e, r, n) {
if (Array.isArray(r) && e !== "style" && e !== "className" && !Ie(e))
return q(t, e, r.at(-1), n);
const ke = /^(strokeWidth|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeDashoffset|strokeDasharray|strokeOpacity|fillOpacity|stopOpacity)/;
function k(t, e, r, n) {
if (Array.isArray(r) && e !== "style" && e !== "className" && !Me(e))
return k(t, e, r.at(-1), n);
if (e === "uuid") {

@@ -89,3 +89,3 @@ t.setAttribute("data-uuid", r);

i === "change" && (i = "input");
const o = s ? De : we;
const o = s ? De : Ce;
r ? t.addEventListener(i, o, s) : t.removeEventListener(i, o, s);

@@ -98,3 +98,3 @@ const a = s ? t._captureListeners || (t._captureListeners = {}) : t._listeners || (t._listeners = {});

(!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, a) => {
typeof i == "string" ? t.style.cssText = i : typeof i == "object" ? Re(i, (o, a) => {
t.style[a] = te(a, o);

@@ -134,3 +134,3 @@ }) : A(!1, "style can only be string or object.");

else {
const i = n && Me.test(e) ? e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase() : e;
const i = n && ke.test(e) ? e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase() : e;
t.setAttribute(i, r);

@@ -144,3 +144,3 @@ }

const o = r.length ? r : s.children || [];
if (t === Ce)
if (t === we)
i = document.createDocumentFragment();

@@ -162,4 +162,4 @@ else if (typeof t == "string")

a.push(...m.map((E) => ({ ...E, path: [h, ...E.path] })));
const w = u.refHandles || [];
f.push(...w.map((E) => ({ ...E, path: [h, ...E.path] })));
const C = u.refHandles || [];
f.push(...C.map((E) => ({ ...E, path: [h, ...E.path] })));
const x = u.detachStyledChildren || [];

@@ -172,3 +172,3 @@ p.push(...x.map((E) => ({ ...E, path: [h, ...E.path] }))), delete u.unhandledChildren, delete u.unhandledAttr, delete u.refHandles, delete u.detachStyledChildren;

}), 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]) => {
g.isValidAttribute(l, h) ? q(i, l, h, n) : a.push({ el: i, key: l, value: h, path: [] });
g.isValidAttribute(l, h) ? k(i, l, h, n) : a.push({ el: i, key: l, value: h, path: [] });
}));

@@ -181,3 +181,3 @@ const d = i;

}
function ke(t) {
function Ve(t) {
return ee(t) && Object.entries(t).every(

@@ -188,3 +188,3 @@ ([e, r]) => /[a-zA-Z\-]+/.test(e) && ae(r) || Array.isArray(r) && r.every(ae)

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");
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" || (Ve(e) || typeof e == "string") && t === "style" || ee(e) && t === "className");
};

@@ -205,3 +205,3 @@ g.attachRef = function(t, e) {

};
function Ce() {
function we() {
}

@@ -216,10 +216,10 @@ function Se(t) {

}
function It(t, e, ...r) {
function kt(t, e, ...r) {
return g(t, { _isSVG: !0, ...e || {} }, r);
}
function Ve(t, e, ...r) {
function je(t, e, ...r) {
return g(t, { _isSVG: !0, ...e || {} }, r);
}
function Mt(t, e) {
return we.call(t, e);
function Vt(t, e) {
return Ce.call(t, e);
}

@@ -268,12 +268,12 @@ class M {

}
function kt(t, { children: e, ...r }) {
function jt(t, { children: e, ...r }) {
return g(t, r, e);
}
function Vt(t, { children: e, ...r }) {
function Ft(t, { children: e, ...r }) {
return g(t, r, [e]);
}
function jt(t, { children: e, ...r }) {
function _t(t, { children: e, ...r }) {
return Array.isArray(e) ? g(t, r, e) : g(t, r, e ? [e] : []);
}
function je() {
function Fe() {
}

@@ -355,3 +355,3 @@ function ce(t) {

}
const Fe = P({
const _e = P({
stringify(t) {

@@ -367,5 +367,5 @@ return t === null ? "" : ce(this.argv[0][0]) ? t.toString() : JSON.stringify(t);

zeroValue: []
}), _e = {
}), Ge = {
zeroValue: ""
}, ze = T("string", _e), Be = {
}, ze = T("string", Ge), Be = {
stringify(t) {

@@ -379,3 +379,3 @@ return t.toString();

zeroValue: 0
}, Ge = T("number", Be), qe = { zeroValue: null }, We = T((t) => typeof t == "object" && !Array.isArray(t), qe), Ke = T((t) => Array.isArray(t), {}), Xe = { zeroValue: !1 }, Ye = T("bool", Xe), Ue = {
}, qe = T("number", Be), We = { zeroValue: null }, Ke = T((t) => typeof t == "object" && !Array.isArray(t), We), Xe = T((t) => Array.isArray(t), {}), Ye = { zeroValue: !1 }, Ue = T("bool", Ye), Je = {
stringify(t) {

@@ -388,3 +388,3 @@ return t.toString();

}
}, Je = T("function", Ue), Ze = T("symbol", {}), Qe = {
}, Ze = T("function", Je), Qe = T("symbol", {}), et = {
stringify() {

@@ -399,3 +399,3 @@ throw new Error("type any can not stringify");

}
}, W = T(() => !0, Qe), et = P({
}, W = T(() => !0, et), tt = P({
check(t) {

@@ -420,3 +420,3 @@ return this.argv[0].some((e) => e.check(t));

}
}), tt = P({
}), rt = P({
check(t) {

@@ -430,3 +430,3 @@ return Array.isArray(t) ? t.every((e) => this.argv[0].check(e)) : !1;

zeroValue: []
}), rt = P({
}), nt = P({
check(t) {

@@ -439,3 +439,3 @@ return !0;

}
}), nt = P({
}), st = P({
check(t) {

@@ -453,14 +453,14 @@ return Object.entries(this.argv[0]).every(([e, r]) => r.check(t[e]));

}
}), st = W, it = W, ot = W, at = je;
function ct() {
}), it = W, ot = W, at = W, ct = Fe;
function lt() {
return P({
coerce: (t) => G(t) ? t : Q(t)
coerce: (t) => q(t) ? t : Q(t)
})();
}
function lt() {
function ht() {
return P({
coerce: (t) => t instanceof F ? t : new F(t)
coerce: (t) => t instanceof _ ? t : new _(t)
})();
}
function ht() {
function ft() {
return P({

@@ -470,3 +470,3 @@ coerce: (t) => t instanceof ne ? t : new ne(t)

}
function ft() {
function ut() {
return P({

@@ -478,38 +478,38 @@ coerce: (t) => t instanceof se ? t : new se(t)

string: ze,
number: Ge,
object: We,
array: Ke,
bool: Ye,
function: Je,
symbol: Ze,
node: st,
element: it,
elementType: ot,
number: qe,
object: Ke,
array: Xe,
bool: Ue,
function: Ze,
symbol: Qe,
node: it,
element: ot,
elementType: at,
// instanceOf
// 枚举值
oneOf: Fe,
oneOf: _e,
// 枚举类型
oneOfType: et,
oneOfType: tt,
// 数组类型,里面的值应该只能跟类型
arrayOf: tt,
arrayOf: rt,
// objectOf,
// 对象结构的嵌套类型。shape + arrayOf + oneOfType + any 可以描述任何 schema。
shapeOf: rt,
shapeOf: nt,
// map 类型,就是简单的 kv,应该是 shape 的子集。
map: nt,
map: st,
// exact,
// customProps/customArrayProps
any: W,
checkPropTypes: at,
checkPropTypes: ct,
// reactive types
atom: ct,
rxList: lt,
rxSet: ht,
rxMap: ft
atom: lt,
rxList: ht,
rxSet: ft,
rxMap: ut
};
function ut(t, e) {
function dt(t, e) {
const r = t[1] === void 0 ? t.length < 2 ? 1 / 0 : 0 : t[1], n = r < 0 ? 0 : r;
return n !== 1 / 0 ? n : e - t[0];
}
class dt {
class pt {
constructor(e, r, n) {

@@ -533,3 +533,3 @@ this.source = e, this.placeholder = r, this.pathContext = n, this.createHost = ([s, i]) => R(s, i, { ...this.pathContext, hostPath: [...this.pathContext.hostPath, this] });

function() {
if (this.manualTrack(e.source, $.METHOD, N.METHOD), this.manualTrack(e.source, $.EXPLICIT_KEY_CHANGE, N.EXPLICIT_KEY_CHANGE), e.hostsComputed)
if (this.manualTrack(e.source, I.METHOD, $.METHOD), this.manualTrack(e.source, I.EXPLICIT_KEY_CHANGE, $.EXPLICIT_KEY_CHANGE), e.hostsComputed)
throw new Error("should never recompute reactiveArray");

@@ -573,3 +573,3 @@ return e.source.map(e.createPlaceholder);

if ((i = e.hostsComputed) != null && i.length) throw new Error("hostsComputed should not recompute");
this.manualTrack(e.placeholderAndItemComputed, $.METHOD, N.METHOD), this.manualTrack(e.placeholderAndItemComputed, $.EXPLICIT_KEY_CHANGE, N.EXPLICIT_KEY_CHANGE);
this.manualTrack(e.placeholderAndItemComputed, I.METHOD, $.METHOD), this.manualTrack(e.placeholderAndItemComputed, I.EXPLICIT_KEY_CHANGE, $.EXPLICIT_KEY_CHANGE);
const n = e.placeholderAndItemComputed.map(([o, a]) => R(o, a, { ...e.pathContext, hostPath: [...e.pathContext.hostPath, e] })), s = document.createDocumentFragment();

@@ -605,3 +605,3 @@ return n.forEach((o) => {

} else {
const u = ut(o, n.length);
const u = dt(o, n.length);
S(l, ((c = n[o[0] + u]) == null ? void 0 : c.element) || e.placeholder), n.splice(o[0], u, ...h).forEach((m) => m.destroy());

@@ -626,9 +626,9 @@ }

destroy(e, r) {
r || (_(this.hostsComputed), _(this.placeholderAndItemComputed)), this.hostsComputed.forEach((n) => n.destroy(e)), e || this.placeholder.remove();
r || (G(this.hostsComputed), G(this.placeholderAndItemComputed)), this.hostsComputed.forEach((n) => n.destroy(e)), e || this.placeholder.remove();
}
}
const le = /* @__PURE__ */ new WeakSet();
function pt({ container: t, content: e, destroyOnUnmount: r }, { useEffect: n, pathContext: s }) {
function mt({ container: t, content: e, destroyOnUnmount: r }, { useEffect: n, pathContext: s }) {
typeof e != "function" && (le.has(e) && console.error("static portal content can only be rendered once. Use function content for content has reactive parts."), le.add(e));
const i = Ht(t, s);
const i = Ot(t, s);
return i.render(e), n(() => () => {

@@ -638,3 +638,3 @@ i.destroy();

}
function mt() {
function yt() {
return {

@@ -644,3 +644,3 @@ current: null

}
function yt() {
function gt() {
const t = Q(null);

@@ -658,3 +658,3 @@ return new Proxy({}, {

}
function gt(t, e) {
function Et(t, e) {
const r = { ...t };

@@ -670,4 +670,4 @@ return Object.entries(e).forEach(([n, s]) => {

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, a, c, ...f) => {
var x, E, D, 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 = Le({}), this.itemConfig = {}, this.frame = [], this.exposed = {}, this.createHTMLOrSVGElement = (o, a, c, ...f) => {
var x, E, N, D;
const p = typeof a == "function", d = c == null ? void 0 : c.as;

@@ -678,18 +678,18 @@ 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)

const y = this.itemConfig[d];
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]);
d && y && (y.props && (p ? h = { ...c, ...y.props } : h = Et(c, y.props)), y.propMergeHandles && Object.entries(y.propMergeHandles).forEach(([b, O]) => {
h[b] = O.reduce((Te, xe) => xe(Te, u), h[b]);
}), y.propsMergeHandle && (h = y.propsMergeHandle.reduce((b, O) => O(b, u), h)), y.children && (l = y.children));
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);
const m = ((N = this.itemConfig[d]) == null ? void 0 : N.use) || a;
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 C = o ? je(m, h, ...l) : g(m, h, ...l);
if (typeof m != "function") {
const b = this.pathContext.hostPath.filter((O) => O instanceof L).map((O) => O.props).reverse();
w.listenerBoundArgs = [b, u];
C.listenerBoundArgs = [b, u];
}
return w;
}, 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) => {
return C;
}, this.createElement = this.createHTMLOrSVGElement.bind(this, !1), this.createSVGElement = this.createHTMLOrSVGElement.bind(this, !0), this.createPortal = (o, a) => g(mt, { 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, a) => {
}, this.createRef = yt, this.createRxRef = gt, this.cleanupsOfExternalTarget = /* @__PURE__ */ new Set(), this.createStateFromRef = (o, a) => {
let c;

@@ -793,3 +793,3 @@ const f = (d) => {

this.element !== this.placeholder && A(!1, "should never rerender"), this.renderContext = {
Fragment: Ce,
Fragment: we,
createElement: this.createElement,

@@ -801,3 +801,3 @@ createSVGElement: this.createSVGElement,

pathContext: this.pathContext,
context: new Et(this.pathContext.hostPath),
context: new Ct(this.pathContext.hostPath),
createPortal: this.createPortal,

@@ -810,3 +810,3 @@ createRef: this.createRef,

};
const e = Le.collectEffect(), { props: r, itemConfig: n } = this.getFinalPropsAndItemConfig();
const e = He.collectEffect(), { props: r, itemConfig: n } = this.getFinalPropsAndItemConfig();
this.itemConfig = n, this.props = r;

@@ -829,4 +829,4 @@ const s = this.type.propTypes ? this.normalizePropsWithCoerceValue(this.type.propTypes, r) : r;

L.typeIds = /* @__PURE__ */ new Map();
let k = L;
class Et {
let V = L;
class Ct {
constructor(e) {

@@ -838,3 +838,3 @@ this.hostPath = e, this.valueByType = /* @__PURE__ */ new Map();

const n = this.hostPath[r];
if (n instanceof k && n.renderContext.context.valueByType.has(e))
if (n instanceof V && n.renderContext.context.valueByType.has(e))
return n.renderContext.context.valueByType.get(e);

@@ -848,3 +848,3 @@ }

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

@@ -856,3 +856,3 @@ return r.propTypes = t.propTypes, r.boundProps = H(r.boundProps).concat(e), r;

}
class Ct {
class St {
constructor(e, r, n) {

@@ -885,6 +885,6 @@ this.source = e, this.placeholder = r, this.pathContext = n, this.stopAutoRun = () => {

destroy(e, r) {
r || _(this.computed), e || (this.element.remove(), this.placeholder.remove());
r || G(this.computed), e || (this.element.remove(), this.placeholder.remove());
}
}
class St {
class bt {
constructor(e, r, n) {

@@ -919,11 +919,11 @@ this.source = e, this.placeholder = r, this.pathContext = n, this.fragmentParent = document.createDocumentFragment();

}
const bt = g.isValidAttribute;
const At = g.isValidAttribute;
g.isValidAttribute = function(t, e) {
return t.startsWith("on") ? !0 : Array.isArray(e) && e.some(fe) || fe(e) ? !1 : bt(t, e);
return t.startsWith("on") ? !0 : Array.isArray(e) && e.some(fe) || fe(e) ? !1 : At(t, e);
};
function fe(t) {
return ye(t) || G(t) || typeof t == "function";
return ye(t) || q(t) || typeof t == "function";
}
function V(t) {
return G(t) || typeof t == "function";
function j(t) {
return q(t) || typeof t == "function";
}

@@ -946,3 +946,7 @@ function be(t) {

}
class At {
function Pe(t, e) {
const r = t.findLastIndex((i) => i instanceof V), n = r === -1 ? void 0 : t[r], s = r === -1 ? t : t.slice(r + 1);
return `gen-${(n == null ? void 0 : n.typeId) ?? "global"}-${s.map((i) => i.pathContext.elementPath.join("_")).join("-")}-${e.join("_")}`;
}
class Pt {
constructor() {

@@ -953,12 +957,11 @@ this.styleScripts = /* @__PURE__ */ new Map(), this.elToStyleId = /* @__PURE__ */ new WeakMap();

if (n) {
const a = this.elToStyleId.get(n);
if (a)
return a;
const s = this.elToStyleId.get(n);
if (s)
return s;
{
const c = `gen-${Math.random().toString(36).slice(2)}`;
return this.elToStyleId.set(n, c), c;
const i = `gen-${Math.random().toString(36).slice(2)}`;
return this.elToStyleId.set(n, i), i;
}
}
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("_")}`;
return Pe(e, r);
}

@@ -977,3 +980,3 @@ stringifyStyleObject(e) {

const f = U(c[0]);
return f.length && ue(s), Re(c.slice(1).map((p) => () => {
return f.length && ue(s), Oe(c.slice(1).map((p) => () => {
const [d, l, h] = this.separateStyleObject(p, f);

@@ -988,3 +991,3 @@ if (l && this.generateStyleContent(`.${o}`, l).forEach((u) => {

}
h && q(s, "style", h), re(p) && ue(s);
h && k(s, "style", h), re(p) && ue(s);
}));

@@ -1043,3 +1046,5 @@ }

}
const B = class B {
const Tt = {
autoGenerateTestId: !1
}, B = class B {
constructor(e, r, n) {

@@ -1077,3 +1082,3 @@ this.source = e, this.placeholder = r, this.pathContext = n, this.forceHandleElement = !1, this.computed = void 0, this.element = this.placeholder, this.attachRefs = () => {

this.attrAutoruns = [], n == null || n.forEach(({ el: s, key: i, value: o, path: a }) => {
i.includes(":") || this.attrAutoruns.push(me(() => {
s.hasAttribute("data-testid") || this.generateTestId(s, a), i.includes(":") || this.attrAutoruns.push(me(() => {
this.updateAttribute(s, i, o, a, r);

@@ -1084,6 +1089,6 @@ }, !0));

updateAttribute(e, r, n, s, i) {
const o = Array.isArray(n) ? n.map((a) => V(a) ? a() : a) : V(n) ? n() : n;
const o = Array.isArray(n) ? n.map((a) => j(a) ? a() : a) : j(n) ? n() : n;
if (r === "style" && (be(o) || re(o) || Ae(o)))
return B.styleManager.update(this.pathContext.hostPath, s, o, e, !1);
q(e, r, o, i);
k(e, r, o, i);
}

@@ -1102,2 +1107,7 @@ collectRefHandles() {

}
generateTestId(e, r) {
if (!Tt.autoGenerateTestId) return;
const n = Pe(this.pathContext.hostPath, r);
k(e, "data-testid", n);
}
destroy(e, r) {

@@ -1115,3 +1125,3 @@ var n, s, i;

(n = this.detachStyledChildren) == null || n.forEach(({ el: f, style: p }) => {
const d = getComputedStyle(f).transitionProperty.split(",").map((y) => y.trim()), l = Array.isArray(p) ? Object.assign({}, ...p.map((y) => V(y) ? y() : y)) : V(p) ? p() : p, h = Object.keys(l);
const d = getComputedStyle(f).transitionProperty.split(",").map((y) => y.trim()), l = Array.isArray(p) ? Object.assign({}, ...p.map((y) => j(y) ? y() : y)) : j(p) ? p() : p, h = Object.keys(l);
(d.includes("all") || h.some((y) => d.includes(y))) && i.add(f), l.animation && o.add(f);

@@ -1121,6 +1131,6 @@ }), 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))) || []);

await Promise.all([
...a.map((f) => j(f, "transitionrun")),
...a.map((f) => j(f, "transitionend")),
...c.map((f) => j(f, "animationrun")),
...c.map((f) => j(f, "animationend"))
...a.map((f) => F(f, "transitionrun")),
...a.map((f) => F(f, "transitionend")),
...c.map((f) => F(f, "animationrun")),
...c.map((f) => F(f, "animationend"))
]);

@@ -1132,5 +1142,5 @@ }

};
B.styleManager = new At();
B.styleManager = new Pt();
let J = B;
function j(t, e) {
function F(t, e) {
return new Promise((r) => {

@@ -1140,3 +1150,3 @@ t.addEventListener(e, r, { once: !0 });

}
class Pt {
class xt {
constructor(e, r, n) {

@@ -1175,3 +1185,3 @@ this.source = e, this.placeholder = r, this.pathContext = n, this.computed = void 0, this.childHosts = [];

}
class Tt {
class Lt {
constructor(e, r, n) {

@@ -1201,3 +1211,3 @@ this.source = e, this.placeholder = r, this.pathContext = n;

function() {
return this.manualTrack(e.hosts, $.METHOD, N.METHOD), this.manualTrack(e.hosts, $.EXPLICIT_KEY_CHANGE, N.EXPLICIT_KEY_CHANGE), S(e.renderNewHosts(e.hosts), e.placeholder), null;
return this.manualTrack(e.hosts, I.METHOD, $.METHOD), this.manualTrack(e.hosts, I.EXPLICIT_KEY_CHANGE, $.EXPLICIT_KEY_CHANGE), S(e.renderNewHosts(e.hosts), e.placeholder), null;
},

@@ -1228,6 +1238,6 @@ function(n, s) {

var n;
r || ((n = this.hosts) == null || n.destroy(), _(this.hostRenderComputed)), this.hosts.forEach((s) => s.destroy(e)), e || this.placeholder.remove();
r || ((n = this.hosts) == null || n.destroy(), G(this.hostRenderComputed)), this.hosts.forEach((s) => s.destroy(e)), e || this.placeholder.remove();
}
}
class xt {
class Ht {
constructor(e, r) {

@@ -1244,3 +1254,3 @@ this.pathContext = e, this.placeholder = r, this.element = document.createComment("empty");

}
class Lt {
class Rt {
constructor(e, r, n) {

@@ -1259,5 +1269,5 @@ this.source = e, this.placeholder = r, this.pathContext = n, this.element = this.placeholder;

let n;
return t instanceof F ? n = new Tt(t, e, r) : Array.isArray(t) ? ye(t) ? n = new dt(t, e, r) : n = new Pt(t, e, r) : typeof t == "object" && typeof (t == null ? void 0 : t.type) == "function" ? n = new k(t, e, r) : G(t) ? n = new Ct(t, e, r) : typeof t == "function" ? n = new St(t, e, r) : t instanceof HTMLElement || t instanceof SVGElement || t instanceof DocumentFragment ? n = new J(t, e, r) : t == null ? n = new xt(r, e) : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? n = new Lt(t, e, r) : A(!1, `unknown child type ${t}`), n;
return t instanceof _ ? n = new Lt(t, e, r) : Array.isArray(t) ? ye(t) ? n = new pt(t, e, r) : n = new xt(t, e, r) : typeof t == "object" && typeof (t == null ? void 0 : t.type) == "function" ? n = new V(t, e, r) : q(t) ? n = new St(t, e, r) : typeof t == "function" ? n = new bt(t, e, r) : t instanceof HTMLElement || t instanceof SVGElement || t instanceof DocumentFragment ? n = new J(t, e, r) : t == null ? n = new Ht(r, e) : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? n = new Rt(t, e, r) : A(!1, `unknown child type ${t}`), n;
}
function Ht(t, e) {
function Ot(t, e) {
const r = /* @__PURE__ */ new Map(), n = e || {

@@ -1293,3 +1303,3 @@ hostPath: [],

}
function C(t) {
function w(t) {
return (e) => (r) => {

@@ -1300,4 +1310,4 @@ if (t(r))

}
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) {
const zt = w((t) => t.key === "ArrowUp"), Bt = w((t) => t.key === "ArrowDown"), qt = w((t) => t.key === "ArrowLeft"), Wt = w((t) => t.key === "ArrowRight"), Kt = w((t) => t.key === "Enter"), Xt = w((t) => t.key === "Tab"), Yt = w((t) => t.key === "Escape"), Ut = w((t) => t.key === "Backspace"), Jt = w((t) => t.key === "Space"), Zt = w((t) => t.button === 0), Qt = w((t) => t.button === 2), er = w((t) => t.button === 1), tr = (t, e) => w((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), rr = w((t) => t.target === t.currentTarget);
function nr(t) {
let e;

@@ -1325,3 +1335,3 @@ function r(s) {

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

@@ -1333,3 +1343,3 @@ var n;

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

@@ -1339,3 +1349,3 @@ e.preventDefault(), t(e);

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

@@ -1345,6 +1355,6 @@ e.stopPropagation(), t(e);

}
function ir({ contextType: t, value: e, children: r }, { context: n }) {
function ar({ contextType: t, value: e, children: r }, { context: n }) {
return n.set(t, e), r;
}
function Rt(t) {
function vt(t) {
const e = {

@@ -1359,15 +1369,15 @@ name: t,

}
const Ot = Rt("Form");
function vt({ name: t, children: e, onChange: r, onSubmit: n, onClear: s, onReset: i, values: o }, {
const It = vt("Form");
function $t({ name: t, children: e, onChange: r, onSubmit: n, onClear: s, onReset: i, values: o }, {
createElement: a,
context: c
}) {
const f = {}, p = (m, w, x) => {
x ? (o.get(m) || o.set(m, new F([])), f[m] || (f[m] = []), o.get(m).push(w.value)(f[m]).push(w)) : (o.set(m, w.value), f[m] = w);
}, d = (m, w, x) => {
const f = {}, p = (m, C, x) => {
x ? (o.get(m) || o.set(m, new _([])), f[m] || (f[m] = []), o.get(m).push(C.value)(f[m]).push(C)) : (o.set(m, C.value), f[m] = C);
}, d = (m, C, x) => {
if (x) {
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);
const E = o.get(m), N = E.findIndex((b) => b === C.value);
N() > -1 && E.splice(N(), 1);
const D = f[m].findIndex((b) => b === C);
D > -1 && f[m].splice(D, 1);
} else

@@ -1379,7 +1389,7 @@ o.delete(m), delete f[m];

Object.values(f).forEach((m) => {
Array.isArray(m) ? m.forEach((w) => w.reset()) : m.reset();
Array.isArray(m) ? m.forEach((C) => C.reset()) : m.reset();
}), i == null || i();
}, u = () => {
Object.values(f).forEach((m) => {
Array.isArray(m) ? m.forEach((w) => w.clear()) : m.clear();
Array.isArray(m) ? m.forEach((C) => C.clear()) : m.clear();
}), s == null || s();

@@ -1389,5 +1399,5 @@ }, y = () => {

};
return c.set(Ot, { name: t, register: p, unregister: d, onChange: y, submit: l, reset: h, clear: u }), e;
return c.set(It, { name: t, register: p, unregister: d, onChange: y, submit: l, reset: h, clear: u }), e;
}
vt.propTypes = {
$t.propTypes = {
name: v.string.isRequired,

@@ -1401,4 +1411,4 @@ values: v.rxMap(),

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

@@ -1469,3 +1479,3 @@ if (e === window) {

});
function cr(t, e) {
function hr(t, e) {
if (t === window) {

@@ -1493,3 +1503,3 @@ const r = () => {

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

@@ -1504,5 +1514,5 @@ e(!0);

}
const $t = "dragmove";
function hr(t) {
const e = (t == null ? void 0 : t.container) || document.body, r = (t == null ? void 0 : t.customEventName) || $t;
const Nt = "dragmove";
function ur(t) {
const e = (t == null ? void 0 : t.container) || document.body, r = (t == null ? void 0 : t.customEventName) || Nt;
return function(s) {

@@ -1532,3 +1542,3 @@ const i = (o) => {

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

@@ -1555,3 +1565,3 @@ const s = (i) => {

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

@@ -1568,3 +1578,3 @@ const s = (i) => {

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

@@ -1583,57 +1593,59 @@ e({

export {
k as ComponentHost,
ir as ContextProvider,
$t as DEFAULT_DRAG_MOVE_EVENT,
Et as DataContext,
vt as Form,
Ot as FormContext,
Ce as Fragment,
or as ModalContext,
V as ComponentHost,
ar as ContextProvider,
Nt as DEFAULT_DRAG_MOVE_EVENT,
Ct as DataContext,
$t as Form,
It as FormContext,
we as Fragment,
cr as ModalContext,
wt as N_ATTR,
pt as Portal,
mt as Portal,
v as PropTypes,
J as StaticHost,
Tt as StaticHostConfig,
M as StyleSize,
ve as autoUnit,
Ft as bindProps,
Rt as createContext,
Ie as autoUnit,
Gt as bindProps,
vt as createContext,
g as createElement,
It as createElementNS,
tr as createEventTransfer,
kt as createElementNS,
nr as createEventTransfer,
R as createHost,
hr as createOnDragMove,
fr as createReactiveDragPosition,
ur as createReactiveDragTarget,
ar as createReactivePosition,
mt as createRef,
Ht as createRoot,
yt as createRxRef,
Mt as dispatchEvent,
C as eventAlias,
Vt as jsx,
jt as jsxDEV,
kt as jsxs,
ur as createOnDragMove,
dr as createReactiveDragPosition,
pr as createReactiveDragTarget,
lr as createReactivePosition,
yt as createRef,
Ot as createRoot,
gt as createRxRef,
Vt as dispatchEvent,
w as eventAlias,
Ft as jsx,
_t as jsxDEV,
jt as jsxs,
Y as mergeProp,
gt as mergeProps,
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,
Dt as setAutoUnitType,
rr as withCurrentRange,
nr as withPreventDefault,
sr as withStopPropagation
Et as mergeProps,
Ut as onBackspaceKey,
Bt as onDownKey,
Yt as onESCKey,
Kt as onEnterKey,
tr as onKey,
qt as onLeftKey,
Zt as onLeftMouseDown,
er as onMiddleMouseDown,
Wt as onRightKey,
Qt as onRightMouseDown,
rr as onSelf,
Jt as onSpaceKey,
Xt as onTabKey,
zt as onUpKey,
fr as reactiveFocused,
mr as reactiveScrollPosition,
hr as reactiveSize,
Mt as setAutoUnitType,
sr as withCurrentRange,
ir as withPreventDefault,
or as withStopPropagation
};
//# sourceMappingURL=axii.js.map
{
"name": "axii",
"version": "2.6.58",
"version": "2.6.59",
"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