// Based on https://github.com/modulz/stitches // License MIT // eslint-disable @typescript-eslint/ban-types import type { Falsey, MatchResult } from './types' import { parse } from './parse' import { Layer } from './internal/precedence' import { escape, hash } from './utils' import { define } from './internal/define' export type StrictMorphVariant = T extends number ? `${T}` | T : T extends 'true' ? true | T : T extends 'false' ? false | T : T export type MorphVariant = T extends number ? `${T}` | T : T extends 'true' ? boolean | T : T extends 'false' ? boolean | T : T extends `${number}` ? number | T : T export type StyleTokenValue = string | Falsey // No support for thunks yet — these may use props that are not in the generated class name // and may therefore override each other export type StyleToken = StyleTokenValue /** * Allows to extract the supported properties of a style function. * * Here is an example for `react` * ```js * import { HTMLAttributes } from "react"; * import { style, PropsOf } from "@twind/core"; * const button = style({ ... }) * type ButtonProps = PropsOf * export const Button = (props: ButtonProps & HTMLAttributes) => { * return