Component checks
For a component library or a wrapper that handles Wardic's elements and props.
import { isValidWardicProp, isWardicComponent, unwrapWardicComponent, wardic } from "@wardic/solid" // or "@wardic/solid/unstable/v2"
isWardicComponent(wardic.div) // true
unwrapWardicComponent(wardic.div) // "div"
isValidWardicProp("animate") // true
isValidWardicProp("href") // falseisWardicComponent(component)is whether it's a Wardic element's component: onew.<tag>,wardic.<tag>orwardic.createmade, on either binding.unwrapWardicComponent(component)is what it wraps: its tag, or the component given towardic.create;undefinedfor anything else.isValidWardicProp(key)is whetherkeyis a motion prop, one a Wardic element takes for itself and keeps off its element. It's Wardic's own list, exactly:whileHoveris one,whileAnythingisn't. On Solid 2, the callbacks that are the DOM's own events there (onAnimationStart,onDrag…) aren't, as the element hands them on.
Coming from Motion
Motion's isMotionComponent, unwrapMotionComponent and isValidMotionProp. Motion's isValidMotionProp also takes props by their prefixes.