@ally-ui/solid
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -1,3 +0,2 @@ | ||
declare type CallbackRef<TInstance> = (instance: TInstance) => void; | ||
import type { CallbackRef } from './types'; | ||
export declare function combinedRef<TInstance>(...refs: (CallbackRef<TInstance> | undefined)[]): (instance: TInstance) => void; | ||
export {}; |
@@ -1,4 +0,6 @@ | ||
export { combinedRef } from './combinedRef'; | ||
export { createBindRef, createDelayedBindRef } from './createBindRef'; | ||
export { createSyncedOption } from './createSyncedOption'; | ||
export { forwardEvent } from './forwardEvent'; | ||
export * from './combinedRef'; | ||
export * from './createBindRef'; | ||
export * from './createSyncedOption'; | ||
export * from './forwardEvent'; | ||
export * from './Slot'; | ||
export * from './types'; |
@@ -1,44 +0,68 @@ | ||
import { onCleanup as r, createEffect as n, untrack as d } from "solid-js"; | ||
function E(...u) { | ||
return (t) => u.forEach((i) => i == null ? void 0 : i(t)); | ||
import { onCleanup as m, createEffect as f, untrack as d, createMemo as a, splitProps as s } from "solid-js"; | ||
function O(...e) { | ||
return (t) => e.forEach((i) => i == null ? void 0 : i(t)); | ||
} | ||
function s(u, t) { | ||
return r(() => { | ||
u(null); | ||
}), t !== void 0 && n(() => { | ||
t() || u(null); | ||
function b(e, t) { | ||
return m(() => { | ||
e(null); | ||
}), t !== void 0 && f(() => { | ||
t() || e(null); | ||
}), (i) => { | ||
u(i); | ||
e(i); | ||
}; | ||
} | ||
function O(u, t) { | ||
return s((i) => { | ||
setTimeout(() => u(i)); | ||
function R(e, t) { | ||
return b((i) => { | ||
setTimeout(() => e(i)); | ||
}, t); | ||
} | ||
function R({ | ||
option: u, | ||
function k({ | ||
option: e, | ||
internal: t, | ||
onOptionChange: i, | ||
onInternalChange: c | ||
onInternalChange: n | ||
}) { | ||
const e = d(u); | ||
e !== void 0 && e !== d(t) && i(e); | ||
let o = e; | ||
n(function() { | ||
const f = u(); | ||
f !== void 0 && f !== o && (o = f, i(f)); | ||
}, [u]), n(function() { | ||
c == null || c(t()); | ||
const u = d(e); | ||
u !== void 0 && u !== d(t) && i(u); | ||
let r = u; | ||
f(function() { | ||
const c = e(); | ||
c !== void 0 && c !== r && (r = c, i(c)); | ||
}, [e]), f(function() { | ||
n == null || n(t()); | ||
}, [t]); | ||
} | ||
function k(u, t) { | ||
t instanceof Function ? t(u) : t !== void 0 && t[0](t[1], u); | ||
function y(e, t) { | ||
t instanceof Function ? t(e) : t !== void 0 && t[0](t[1], e); | ||
} | ||
function o(e, t) { | ||
return a(e, void 0, t ? void 0 : { | ||
equals: t | ||
}); | ||
} | ||
function B(e) { | ||
if (e.props.asChild) { | ||
const n = () => ({ | ||
ref: e.ref, | ||
...e.attributes | ||
}); | ||
return o(() => e.props.children(n)); | ||
} | ||
const [, t] = s(e.props, ["asChild", "children"]), i = () => ({ | ||
...e.attributes, | ||
...t | ||
}); | ||
return o(() => e.children({ | ||
ref: e.ref, | ||
attributes: i, | ||
children: e.props.children | ||
})); | ||
} | ||
export { | ||
E as combinedRef, | ||
s as createBindRef, | ||
O as createDelayedBindRef, | ||
R as createSyncedOption, | ||
k as forwardEvent | ||
B as Slot, | ||
O as combinedRef, | ||
b as createBindRef, | ||
R as createDelayedBindRef, | ||
k as createSyncedOption, | ||
y as forwardEvent | ||
}; |
{ | ||
"name": "@ally-ui/solid", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"scripts": { | ||
@@ -39,3 +39,3 @@ "example": "vite", | ||
}, | ||
"gitHead": "12d062887b6076c076a431fb779dcdd4d66ef079" | ||
"gitHead": "0698874cf6570ddc02b4730b2579103f84a65fb0" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8927
11
178