Ridiculous Type Kit
ridiculous/ridiculous-type-kitFreeUtility
Shared template-literal type machinery powering every ridiculous component. Provides char/number primitives, CSS dimension validators (IsLength/IsAngle/IsTime/…), DimensionOf, and paren-aware parser combinators.
Install it
npx shadcn@latest add http://ridiculous.turtlesocks.dev/r/ridiculous-type-kit.jsonSource
1// =====================================================================2// ridiculous-type-kit — shared template-literal type machinery.3//4// Pure types only (no runtime). Boolean predicates return `true`/`false`;5// compose with And/Or/Not then collapse with KeepIf<B, S> to build an6// `S | never` validator.7//8// CALL-SITE HELPER IDIOM (copy into each component's *.types.ts — cannot9// be factored into a runtime helper because TS has no higher-kinded types):10//11// export const cssThing = <S extends string>(v: S & CssThingLiteral<S>): S => v12// =====================================================================1314export type * from "./combinators"15export type * from "./dimensions"16export type * from "./primitives"
