@homebound/truss 2.0.9 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -1208,6 +1208,7 @@ function generateStylexCssBuilder(config, sections) {
1208
1208
  // Target: stylex (build-time plugin)
1209
1209
 
1210
1210
  import * as stylex from "@stylexjs/stylex";
1211
+ import { trussProps } from "@homebound/truss/runtime";
1211
1212
 
1212
1213
  /** Given a type X, and the user's proposed type T, only allow keys in X and nothing else. */
1213
1214
  export type Only<X, T> = X & Record<Exclude<keyof T, keyof X>, never>;
@@ -1335,6 +1336,11 @@ class CssBuilder<T extends Properties> {
1335
1336
  return props;
1336
1337
  }
1337
1338
 
1339
+ /** Convert a style array into \`{ className, style }\` props for manual spreading into non-\`css=\` contexts. */
1340
+ props(styles: Properties): Record<string, unknown> {
1341
+ return trussProps(stylex, ...(Array.isArray(styles) ? styles : [styles]));
1342
+ }
1343
+
1338
1344
  private get rules(): T {
1339
1345
  return this.opts.rules;
1340
1346
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/config.ts","../src/methods.ts","../src/sections/tachyons/border.ts","../src/sections/tachyons/borderColors.ts","../src/sections/tachyons/borderRadius.ts","../src/sections/tachyons/borderStyles.ts","../src/sections/tachyons/borderWidths.ts","../src/sections/tachyons/boxShadow.ts","../src/sections/tachyons/coordinates.ts","../src/sections/tachyons/cursor.ts","../src/sections/tachyons/display.ts","../src/sections/tachyons/flexbox.ts","../src/sections/tachyons/floats.ts","../src/sections/tachyons/fontWeight.ts","../src/sections/tachyons/grid.ts","../src/sections/tachyons/heights.ts","../src/sections/tachyons/lineClamp.ts","../src/sections/tachyons/objectFit.ts","../src/sections/tachyons/outlines.ts","../src/sections/tachyons/overflow.ts","../src/sections/tachyons/position.ts","../src/utils.ts","../src/sections/tachyons/skins.ts","../src/sections/tachyons/spacing.ts","../src/sections/tachyons/textAlign.ts","../src/sections/tachyons/textDecoration.ts","../src/sections/tachyons/textTransform.ts","../src/sections/tachyons/typeScale.ts","../src/sections/tachyons/typography.ts","../src/sections/tachyons/userSelect.ts","../src/sections/tachyons/verticalAlign.ts","../src/sections/tachyons/visibility.ts","../src/sections/tachyons/whitespace.ts","../src/sections/tachyons/widths.ts","../src/sections/tachyons/wordBreak.ts","../src/sections/tachyons/zIndex.ts","../src/sections/tachyons/container.ts","../src/sections/tachyons/opacity.ts","../src/sections/tachyons/index.ts","../src/generate.ts","../src/breakpoints.ts","../src/sections/tachyons-rn/spacing.ts","../src/sections/tachyons-rn/index.ts"],"sourcesContent":["import { Properties } from \"csstype\";\nimport { Code } from \"ts-poet\";\n\n/**\n * A map from human name to font size, i.e. `f12` -> `12px`.\n *\n * Or a set of properties, i.e. `f12` -> `{ fontFamily: ..., fontWeight: ... }`.\n */\nexport type FontConfig = Record<string, string | Properties>;\n\n/**\n * Provides users with an easy way to configure the major/most-often configurable\n * aspect of a design system, i.e. the palette, fonts, and increments.\n *\n * Truss's built-in rules, i.e. `typeScale.ts` for fonts, `skins.ts` for colors,\n * will read these values to determine their output.\n *\n * Note that users can always override whole sections of Truss's default set\n * of rules by setting `methods[\"typeScale\"] = {}`, see the readme for more\n * information.\n */\nexport interface Config {\n /** The output path of the `Css.ts` file. */\n outputPath: string;\n\n /**\n * A map from the human/design system name to color value, i.e. `black` -> `#000000`.\n *\n * Design systems can use either physical names, i.e. `Sky50 -> #...`, or logical\n * names, i.e. `Primary -> #...`, where the logical names are more themeable, but\n * that's up to each design system to decide.\n */\n palette: Record<string, string>;\n\n /**\n * A map from human name to font size, i.e. `f12` -> `12px`.\n *\n * Or a set of properties, i.e. `f12` -> `{ fontFamily: ..., fontWeight: ... }`.\n */\n fonts: FontConfig;\n\n /** The design system's increment in pixels. */\n increment: number;\n\n /** The number of increments to generate for rules like `mt1`, `mt2`, etc. */\n numberOfIncrements: number;\n\n /** Short-hand aliases like `bodyText` --> `[\"f12\", \"black\"]`. */\n aliases?: Aliases;\n\n /** Type aliases for Only clauses, i.e. `Margin` --> `[\"marginTop\", ...]`. `Margin` and `Padding` are provided. */\n typeAliases?: Record<string, Array<keyof Properties>>;\n\n /** Breakpoints, i.e. `{ sm: 0, md: 500 }`. */\n breakpoints?: Record<string, number>;\n\n /**\n * Which default methods to include.\n *\n * Currently, we support either `tachyons`, `tachyons-rn`, or `none`.\n * Could eventually support `tailwinds` / `tailwinds-rn` as additional options.\n */\n defaultMethods?: \"tachyons\" | \"none\" | \"tachyons-rn\";\n\n /**\n * The target CSS runtime to generate for.\n *\n * - `\"stylex\"` (default): Generates a StyleX-friendly CssBuilder (for IDE autocomplete + types) plus a\n * `Css.json` mapping file consumed by the truss Vite plugin, which transforms\n * `Css.*.$` expressions into file-local `stylex.create()` + `stylex.props()` calls at build time.\n * - `\"react-native\"`: Generates a runtime CssBuilder that accumulates plain style objects,\n * intended for React Native usage.\n */\n target?: \"react-native\" | \"stylex\";\n\n /**\n * The output path for the truss mapping file (only used when target is \"stylex\").\n * Defaults to a `.json` sibling of `outputPath` (e.g. `./src/Css.json`).\n */\n mappingOutputPath?: string;\n\n /**\n * A map of \"section\" to list of rules to create application-specific\n * utility methods.\n *\n * I.e. \"borderColors\" -> () => [`get ml1() { ... }`].\n *\n * This can be used to either add new sections or override built-in sections.\n */\n sections?: Sections;\n\n /** Any extra chunks of code you want appended to the end of the file. */\n extras?: Array<string | Code>;\n}\n\n/**\n * A helper method to define config w/o a trailing cast.\n *\n * Based on `vite.config.ts`'s approach.\n *\n * We could eventually use this as a place to apply defaults, but currently\n * just return the passed in `config` object as-is.\n */\nexport function defineConfig(config: Config): Config {\n return config;\n}\n\n/**\n * A function takes the project's `Config` and produces a list of utility methods to\n * add to the generated `Css.ts` file.\n *\n * I.e. a return value might be:\n *\n * ```\n * [\n * \"get mb0() { return this.mb(0); }\",\n * \"get mb1() { return this.mb(1); }\",\n * ]\n * ```\n *\n * See the `newMethod` and `newParamMethod` functions for more easily\n * creating the `get ...() { ... }` output.\n */\nexport type CreateMethodsFn = (config: Config) => UtilityMethod[];\n\n/**\n * A type-alias to clarify strings that are meant to be abbreviation/utility names.\n */\nexport type UtilityName = string;\n\n/**\n * A type-alias to clarify which method returns types are utility methods.\n *\n * I.e. they should be a line of TypeScript code like `get abbr() { ... }`.\n *\n * See `newMethod` for a helper method to create the string.\n */\nexport type UtilityMethod = string;\n\n/** A type-alias to clarify groups of utility methods. */\nexport type SectionName = string;\n\n/** A type-alias for a group of utility methods. */\nexport type Sections = Record<SectionName, CreateMethodsFn>;\n\n/** A type-alias for aliasing existing utility methods as a new utility method. */\nexport type Aliases = Record<UtilityName, UtilityName[]>;\n","import { Aliases, Config, UtilityMethod, UtilityName } from \"src/config\";\nimport { Properties } from \"csstype\";\n\nexport type Prop = keyof Properties;\n\n// ── StyleX Collector ──────────────────────────────────────────────────\n// When stylex collection is enabled, each helper function pushes structured\n// metadata into this array as a side-effect. This lets the stylex code generator\n// reuse the existing section definitions without modifying any section files.\n\nexport interface StylexEntry {\n kind: \"static\" | \"param\" | \"increment-param\" | \"px-delegate\" | \"alias\" | \"cssvar\";\n abbr: string;\n /** For static: the CSS properties object, e.g. { display: \"flex\" } */\n defs?: Record<string, unknown>;\n /** For param/increment-param: the CSS property name(s) */\n props?: string[];\n /** For increment-param: whether to use maybeInc */\n usesMaybeInc?: boolean;\n /** For param methods: extra properties to set alongside the main prop */\n extraDefs?: Record<string, unknown>;\n /** For aliases: the list of chained abbreviations */\n aliasTargets?: string[];\n}\n\nlet _stylexCollector: StylexEntry[] | null = null;\n\n/** Start collecting StylexEntry metadata from method helpers. */\nexport function startStylexCollection(): void {\n _stylexCollector = [];\n}\n\n/** Stop collecting and return all accumulated entries. */\nexport function stopStylexCollection(): StylexEntry[] {\n const result = _stylexCollector!;\n _stylexCollector = null;\n return result;\n}\n\nfunction collect(entry: StylexEntry): void {\n if (_stylexCollector) _stylexCollector.push(entry);\n}\n\n/**\n * Given a single abbreviation (i.e. `mt0`) and multiple `{ prop: value }` CSS values, returns\n * the TypeScript code for a `mt0` utility method that sets those values.\n */\nexport function newMethod(abbr: UtilityName, defs: Properties): UtilityMethod {\n collect({ kind: \"static\", abbr, defs: { ...defs } });\n return `${comment(defs)} get ${abbr}() { return this${Object.entries(defs)\n .map(([prop, value]) => `.add(\"${prop}\", ${maybeWrap(value)})`)\n .join(\"\")}; }`;\n}\n\n/**\n * Given a single abbreviation (i.e. `mt`) and a property name (i.e. `marginTop`), returns the\n * TypeScript code for a `mt` utility method that accepts a user-provided value of the prop to set.\n * Use `extraProperties` for additional properties to set.\n *\n * I.e. `Css.mt(someValue).$`\n */\nexport function newParamMethod(\n abbr: UtilityName,\n prop: keyof Properties,\n extraProperties: Properties = {},\n): UtilityMethod {\n collect({\n kind: \"param\",\n abbr,\n props: [prop],\n extraDefs: Object.keys(extraProperties).length > 0 ? { ...extraProperties } : undefined,\n });\n const additionalDefs = Object.entries(extraProperties)\n .map(([prop, value]) => `.add(\"${prop}\", ${maybeWrap(value)})`)\n .join(\"\");\n return `${comment({\n [prop]: \"value\",\n })} ${abbr}(value: Properties[\"${prop}\"]) { return this.add(\"${prop}\", value)${additionalDefs}; }`;\n}\n\n/**\n * Given a prop to set (i.e. `marginTop`), and multiple abbr/value pairs (i.e. `{ mt0: \"0px\", mt1: \"4px\" }`),\n * returns a utility method for each abbr/value pair.\n *\n * I.e. `mt0() { ...add(\"marginTop\", \"0px\")... }`\n *\n * By default, we also generate a param method for `prop`, i.e. if `prop` is `marginTop`, we'll\n * make a `marginTop(value)` method for users to pass variable values. You can change the\n * name of this method by setting `baseName` or disable it completely by setting `baseName`\n * to `null`.\n *\n * @param prop the CSS property we're setting, i.e. `marginTop`\n * @param defs a map of abbreviation name --> value (a property value or an object of properties to set)\n * @param baseName the base name to use, i.e. `mt`\n * @param includePx generate an extra `${baseName}Px` method that calls the base method with a converted px value\n * @param baseDefs additional properties to set for the base method\n */\nexport function newMethodsForProp<P extends Prop>(\n prop: P,\n defs: Record<UtilityName, Properties[P] | Properties>,\n baseName: string | null = prop,\n includePx: boolean = false,\n valueMethodExtraProperties?: Omit<Properties, P>,\n): UtilityMethod[] {\n return [\n ...Object.entries(defs).map(([abbr, value]) =>\n newMethod(\n abbr,\n // If the value is an object, use it as the full defs, otherwise, use it as the prop value\n typeof value === \"object\" ? value : { [prop]: value },\n ),\n ),\n // Conditionally add a method that directly accepts a value for prop\n ...(baseName !== null ? [newParamMethod(baseName, prop, valueMethodExtraProperties)] : []),\n ...(baseName !== null && includePx ? [newPxMethod(baseName, prop)] : []),\n ];\n}\n\n/**\n * Given aliases, i.e. `{ bodyText: [\"f12\", \"bold\"] }`, returns a utility method\n * for each alias that calls its corresponding utility classes.\n */\nexport function newAliasesMethods(aliases: Aliases): UtilityMethod[] {\n return Object.entries(aliases).map(([abbr, values]) => {\n collect({ kind: \"alias\", abbr, aliasTargets: values });\n return `get ${abbr}() { return this${values.map((v) => `.${v}`).join(\"\")}; }`;\n });\n}\n\n/**\n * Makes a utility method that can set CSS custom variables.\n *\n * I.e. `newSetCssVariableMethod(\"dark\", { \"--Primary\": \"white\" })` will create a\n * utility method `Css.dark.$ that will set `--Primary` to `white`.\n *\n * Currently, this only supports compile-time/hard-coded values. I.e. we don't support\n * something like `Css.dark({ \"--Primary\", someRuntimeValue }).$` yet.\n *\n * TODO: Create a `Css.set(cssVars).$` method.\n */\nexport function newSetCssVariablesMethod(abbr: UtilityName, defs: Record<string, string>): UtilityMethod {\n collect({ kind: \"cssvar\", abbr, defs: { ...defs } });\n return `get ${abbr}() { return this${Object.entries(defs)\n .map(([prop, value]) => `.add(\"${prop}\" as any, \"${value}\")`)\n .join(\"\")}; }`;\n}\n\n/** An abbreviation and its single or multiple CSS properties to set. */\nexport type IncConfig = [string, Prop | Prop[]];\n\n/**\n * Makes [`mt0`, `mt1`, ...] utility methods for each configured increment\n * to set `prop` to that given increment's value in pixels.\n *\n * I.e. we assume `prop` is a CSS property like `margin` that accepts pixels as values,\n * and so convert each increment `x` (1, 2, 3) to pixels `Y` (8, 16, 24) and create\n * a utility method for each `x -> Y` pair, i.e. `mt0 = mt(px(0))`.\n *\n * We also create a final param method, i.e. `mt(number)`, for callers that\n * need to call `mt` with a conditional amount of increments.\n *\n * @param config the config\n * @param abbr the utility prefix, i.e. `mt`\n * @param props if a CSS prop like `marginTop`, we output \"mt0 --> marginTop: 0px\", if an array like\n * `[\"marginTop\", \"marginBottom\"]`, we output \"my0 --> marginTop: 0px, marginBottom: 0px\"\n * @param opts.auto if set to true, include an `a` suffix for auto values, i.e. `mta`\n */\nexport function newIncrementMethods(\n config: Config,\n abbr: UtilityName,\n prop: Prop | Prop[],\n opts: { auto?: boolean } = {},\n): UtilityMethod[] {\n // Create `m1`, `m2`, etc. that will call our main `m` method.\n const props = typeof prop === \"string\" ? [prop] : prop;\n const delegateMethods = newCoreIncrementMethods(config, abbr, props);\n\n const autoComment = comment(Object.fromEntries(props.map((p) => [p, \"auto\"])));\n const valueComment = comment(Object.fromEntries(props.map((p) => [p, \"v\"])));\n const pxComment = comment(Object.fromEntries(props.map((p) => [p, \"px\"])));\n\n // Collect auto entry\n if (opts.auto) {\n collect({ kind: \"static\", abbr: `${abbr}a`, defs: Object.fromEntries(props.map((p) => [p, \"auto\"])) });\n }\n // Collect increment-param entry (uses maybeInc)\n collect({ kind: \"increment-param\", abbr, props, usesMaybeInc: true });\n // Collect px-delegate entry\n collect({ kind: \"px-delegate\", abbr: `${abbr}Px`, props });\n\n return [\n ...delegateMethods,\n ...(opts.auto\n ? [`${autoComment} get ${abbr}a() { return this.${props.map((p) => `add(\"${p}\", \"auto\")`).join(\".\")}; }`]\n : []),\n `${valueComment} ${abbr}(v: number | string) { return this.${props\n .map((p) => `add(\"${p}\", maybeInc(v))`)\n .join(\".\")}; }`,\n `${pxComment} ${abbr}Px(px: number) { return this.${props.map((p) => `add(\"${p}\", \\`\\${px}px\\`)`).join(\".\")}; }`,\n ];\n}\n\n/**\n * Creates just the core `<abbr>X` utility methods that set `props` with each increment value.\n *\n * See `newIncrementMethods` for handling the `<abbr>Px`, `<abbr>a`, and `<attr>(value)` methods.\n */\nexport function newCoreIncrementMethods(config: Config, abbr: UtilityName, props: Prop[]): UtilityMethod[] {\n return zeroTo(config.numberOfIncrements).map((i) => {\n const px = `${i * config.increment}px`;\n const defs = Object.fromEntries(props.map((p) => [p, px]));\n collect({ kind: \"static\", abbr: `${abbr}${i}`, defs });\n const sets = props.map((p) => `add(\"${p}\", \"${px}\")`).join(\".\");\n return `${comment(defs)} get ${abbr}${i}() { return this.${sets}; }`;\n });\n}\n\nexport function newPxMethod(abbr: UtilityName, prop: Prop): UtilityMethod {\n collect({ kind: \"px-delegate\", abbr: `${abbr}Px`, props: [prop] });\n return `${comment({ [prop]: \"px\" })} ${abbr}Px(px: number) { return this.${abbr}(\\`\\${px}px\\`); }`;\n}\n\nexport function newPxMethods(abbr: UtilityName, props: Prop[]): UtilityMethod[] {\n const defs = Object.fromEntries(props.map((prop) => [prop, \"px\"]));\n collect({ kind: \"param\", abbr, props });\n collect({ kind: \"px-delegate\", abbr: `${abbr}Px`, props });\n return [\n `${comment(defs)} ${abbr}Px(px: number) { return this.${props.map((prop) => `add(\"${prop}\", \\`\\${px}px\\`)`).join(\".\")}; }`,\n ];\n}\n\nexport const zeroTo: (n: number) => number[] = (n) => [...Array(n + 1).keys()];\n\n/** Keeps numbers as literals, and wraps anything else with double quotes. */\nfunction maybeWrap(value: unknown): string {\n return typeof value === \"number\" ? String(value) : `\"${value}\"`;\n}\n\nexport function comment(defs: object): string {\n const paramNames = [\"value\", \"px\", \"inc\"];\n const values = Object.entries(defs)\n .map(([prop, value]) => `${prop}: ${paramNames.includes(value) ? value : maybeWrap(value)}`)\n .join(\"; \");\n return `/** Sets \\`${values}\\`. */\\n`;\n}\n","import { newMethod } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nconst borderDefs: [string, [string, string]][] = [\n [\"ba\", [\"borderStyle\", \"borderWidth\"]],\n [\"bt\", [\"borderTopStyle\", \"borderTopWidth\"]],\n [\"br\", [\"borderRightStyle\", \"borderRightWidth\"]],\n [\"bb\", [\"borderBottomStyle\", \"borderBottomWidth\"]],\n [\"bl\", [\"borderLeftStyle\", \"borderLeftWidth\"]],\n];\n\nexport const border: CreateMethodsFn = () => [\n ...borderDefs.map(([abbr, [style, width]]) => {\n return newMethod(abbr, { [style]: \"solid\", [width]: \"1px\" });\n }),\n newMethod(\"bn\", { borderStyle: \"none\", borderWidth: \"0\" }),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const borderColor: CreateMethodsFn = ({ palette }) => {\n const defs = Object.fromEntries(Object.entries(palette).map(([key, value]) => [`bc${key}`, value]));\n return newMethodsForProp(\"borderColor\", defs, \"bc\");\n};\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const borderRadius: CreateMethodsFn = () =>\n newMethodsForProp(\"borderRadius\", {\n br0: \"0\",\n br1: \".125rem\",\n br2: \".25rem\",\n br3: \".5rem\",\n br4: \"1rem\",\n br100: \"100%\",\n brPill: \"9999px\",\n });\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// http://tachyons.io/docs/themes/borders/\n// https://tailwindcss.com/docs/border-style/#app\nexport const borderStyle: CreateMethodsFn = () =>\n newMethodsForProp(\n \"borderStyle\",\n {\n bsDashed: \"dashed\",\n bsDotted: \"dotted\",\n bsn: \"none\",\n bss: \"solid\",\n },\n \"bs\",\n );\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// http://tachyons.io/docs/themes/borders/\nexport const borderWidth: CreateMethodsFn = () =>\n newMethodsForProp(\n \"borderWidth\",\n {\n bw1: \"1px\",\n bw2: \"2px\",\n },\n \"bw\"\n );\n","import { newMethod } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const boxShadow: CreateMethodsFn = () => [\n // bsn is taken by `borderStyle: none`.\n newMethod(\"shadowNone\", { boxShadow: \"none\" }),\n];\n","import { newIncrementMethods } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nconst directions = [\"top\", \"right\", \"bottom\", \"left\"] as const;\n\nexport const coordinates: CreateMethodsFn = (config) =>\n directions.flatMap((d) => {\n return newIncrementMethods(config, d, d);\n });\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const cursor: CreateMethodsFn = () => [\n ...newMethodsForProp(\"cursor\", {\n cursorPointer: \"pointer\",\n cursorNotAllowed: \"not-allowed\",\n }),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_display.css\nexport const display: CreateMethodsFn = () =>\n newMethodsForProp(\"display\", {\n dn: \"none\",\n db: \"block\",\n dib: \"inline-block\",\n dit: \"inline-table\",\n dt: \"table\",\n dtc: \"table-cell\",\n dtRow: \"table-row\",\n dtColumn: \"table-column\",\n dtColumnGroup: \"table-column-group\",\n // added\n dg: \"grid\",\n dig: \"inline-grid\",\n df: \"flex\",\n dif: \"inline-flex\",\n });\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp, newParamMethod } from \"src/methods\";\n\n// We originally used the tachyons mappings:\n// https://github.com/tachyons-css/tachyons/blob/master/src/_flexbox.css#L17\n//\n// But later shortened them with the rationale that, once we've all been writing\n// flex on a day-to-day basis, we don't need the longer \"not-Tachyons-ish\" names\n// that Tachyons originally picked (i.e. maybe because the flex properties were\n// \"too new/different\" at the time of adding them?).\nexport const flexbox: CreateMethodsFn = () => [\n ...newMethodsForProp(\n \"flex\",\n {\n fi: \"initial\",\n fa: \"auto\",\n fn: \"none\",\n f1: \"1\",\n f2: \"2\",\n f3: \"3\",\n f4: \"4\",\n f5: \"5\",\n },\n \"f\",\n ),\n ...newMethodsForProp(\n \"justifyContent\",\n {\n jcfs: \"flex-start\",\n jcfe: \"flex-end\",\n jcc: \"center\",\n jcsb: \"space-between\",\n jcsa: \"space-around\",\n jcse: \"space-evenly\",\n },\n \"jc\",\n ),\n\n ...newMethodsForProp(\n \"justifySelf\",\n {\n jsa: \"auto\",\n jsc: \"center\",\n jss: \"start\",\n jse: \"end\",\n },\n \"js\",\n ),\n\n ...newMethodsForProp(\n \"justifyItems\",\n {\n jifs: \"flex-start\",\n jife: \"flex-end\",\n jic: \"center\",\n jisb: \"space-between\",\n jisa: \"space-around\",\n jise: \"space-evenly\",\n },\n \"ji\",\n ),\n\n ...newMethodsForProp(\n \"alignSelf\",\n {\n asfs: \"flex-start\",\n asfe: \"flex-end\",\n asc: \"center\",\n asb: \"baseline\",\n asStretch: \"stretch\",\n },\n \"as\",\n ),\n\n ...newMethodsForProp(\n \"alignItems\",\n {\n aifs: \"flex-start\",\n aife: \"flex-end\",\n ais: \"start\",\n aie: \"end\",\n aic: \"center\",\n aib: \"baseline\",\n aiStretch: \"stretch\",\n },\n \"ai\",\n ),\n\n ...newMethodsForProp(\n \"placeSelf\",\n {\n psa: \"auto\",\n psc: \"center\",\n pss: \"start\",\n pse: \"end\",\n psfs: \"flex-start\",\n psfe: \"flex-end\",\n psStretch: \"stretch\",\n },\n \"ps\",\n ),\n\n ...newMethodsForProp(\n \"placeContent\",\n {\n pcc: \"center\",\n pcs: \"start\",\n pce: \"end\",\n pcsb: \"space-between\",\n pcsa: \"space-around\",\n pcse: \"space-evenly\",\n pcb: \"baseline\",\n pcStretch: \"stretch\",\n },\n \"pc\",\n ),\n\n ...newMethodsForProp(\n \"placeItems\",\n {\n pic: \"center\",\n pis: \"start\",\n pie: \"end\",\n pisb: \"space-between\",\n pisa: \"space-around\",\n pise: \"space-evenly\",\n pib: \"baseline\",\n piStretch: \"stretch\",\n },\n \"pi\",\n ),\n\n ...newMethodsForProp(\n \"flexBasis\",\n // https://github.com/tack-hammer/tailwind-plugin-flex-basis#usage\n {\n fb1: \"100%\",\n fb2: \"50%\",\n fb3: \"33.333333%\",\n fb4: \"25%\",\n fb5: \"20%\",\n fb6: \"16.666666%\",\n fb7: \"14.285714%\",\n fb0: \"12.5%\",\n },\n \"fb\",\n ),\n\n ...newMethodsForProp(\"flexGrow\", { fg0: 0, fg1: 1 }),\n ...newMethodsForProp(\"flexShrink\", { fs0: 0, fs1: 1 }),\n\n ...newMethodsForProp(\n \"flexDirection\",\n {\n fdr: \"row\",\n fdrr: \"row-reverse\",\n fdc: \"column\",\n fdcr: \"column-reverse\",\n },\n \"fd\",\n ),\n\n ...newMethodsForProp(\n \"flexWrap\",\n {\n fww: \"wrap\",\n fwr: \"wrap-reverse\",\n fwnw: \"nowrap\",\n },\n \"flexWrap\",\n ),\n\n newParamMethod(\"order\", \"order\"),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_floats.css\nexport const float: CreateMethodsFn = () =>\n newMethodsForProp(\n \"float\",\n {\n fl: \"left\",\n fr: \"right\",\n },\n \"float\"\n );\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const fontWeight: CreateMethodsFn = () =>\n newMethodsForProp(\n \"fontWeight\",\n {\n fwn: \"normal\",\n fwb: \"bold\",\n fw1: 100,\n fw2: 200,\n fw3: 300,\n fw4: 400,\n fw5: 500,\n fw6: 600,\n fw7: 700,\n fw8: 800,\n fw9: 900,\n },\n \"fw\",\n );\n","import { CreateMethodsFn } from \"src/config\";\nimport { newIncrementMethods, newParamMethod } from \"src/methods\";\n\nexport const grid: CreateMethodsFn = (config) => [\n newParamMethod(\"gtc\", \"gridTemplateColumns\"),\n newParamMethod(\"gtr\", \"gridTemplateRows\"),\n newParamMethod(\"gr\", \"gridRow\"),\n newParamMethod(\"gc\", \"gridColumn\"),\n newParamMethod(\"gar\", \"gridAutoRows\"),\n newParamMethod(\"gac\", \"gridAutoColumns\"),\n ...newIncrementMethods(config, \"gap\", \"gap\"),\n ...newIncrementMethods(config, \"rg\", \"rowGap\"),\n ...newIncrementMethods(config, \"cg\", \"columnGap\"),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newIncrementMethods, newMethodsForProp, newPxMethods } from \"src/methods\";\n\nexport const height: CreateMethodsFn = (config) => [\n // https://github.com/tachyons-css/tachyons/blob/master/src/_heights.css\n\n // Technically h1 in tachyons is 1em and ours is 1 inc\n ...newIncrementMethods(config, \"h\", \"height\", { auto: true }),\n\n ...newMethodsForProp(\n \"height\",\n {\n h25: \"25%\",\n h50: \"50%\",\n h75: \"75%\",\n h100: \"100%\",\n vh25: \"25vh\",\n vh50: \"50vh\",\n vh75: \"75vh\",\n vh100: \"100vh\",\n hfc: \"fit-content\",\n hmaxc: \"max-content\",\n hminc: \"min-content\",\n },\n // Skip `h` here b/c it's created by newIncrementMethods below\n null,\n ),\n\n ...newMethodsForProp(\n \"minHeight\",\n {\n mh0: 0,\n mh25: \"25%\",\n mh50: \"50%\",\n mh75: \"75%\",\n mh100: \"100%\",\n mvh100: \"100vh\",\n },\n \"mh\",\n true,\n ),\n\n ...newMethodsForProp(\n \"maxHeight\",\n {\n maxh0: \"0\",\n maxh25: \"25%\",\n maxh50: \"50%\",\n maxh75: \"75%\",\n maxh100: \"100%\",\n },\n \"maxh\",\n true,\n ),\n ...newPxMethods(\"sq\", [\"height\", \"width\"]),\n];\n","import { Properties } from \"csstype\";\nimport { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nconst additionalDefs: Properties = {\n overflow: \"hidden\",\n display: \"-webkit-box\",\n // As of 11/28/2022, this is deprecated but still necessary for lineClamp to work:\n // https://github.com/tailwindlabs/tailwindcss-line-clamp/blob/master/src/index.js\n WebkitBoxOrient: \"vertical\",\n // tailwinds doesn't add this by default, but it seems like a good default for us.\n textOverflow: \"ellipsis\",\n}\n\n// https://github.com/tailwindlabs/tailwindcss-line-clamp/\nexport const lineClamp: CreateMethodsFn = () =>\n newMethodsForProp(\n \"WebkitLineClamp\",\n {\n lineClamp1: { ...additionalDefs, WebkitLineClamp: 1 },\n lineClamp2: { ...additionalDefs, WebkitLineClamp: 2 },\n lineClamp3: { ...additionalDefs, WebkitLineClamp: 3 },\n lineClamp4: { ...additionalDefs, WebkitLineClamp: 4 },\n lineClamp5: { ...additionalDefs, WebkitLineClamp: 5 },\n lineClamp6: { ...additionalDefs, WebkitLineClamp: 6 },\n lineClampNone: { WebkitLineClamp: \"unset\" },\n },\n \"lineClamp\",\n false,\n additionalDefs\n);","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://tailwindcss.com/docs/object-fit\nexport const objectFit: CreateMethodsFn = () =>\n newMethodsForProp(\"objectFit\", {\n objectContain: \"contain\",\n objectCover: \"cover\",\n objectFill: \"fill\",\n objectNone: \"none\",\n objectScaleDown: \"scale-down\",\n });\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const outline: CreateMethodsFn = () =>\n newMethodsForProp(\"outline\", {\n outline1: \"1px solid\",\n outlineTransparent: \"1px solid transparent\",\n outline0: \"0\",\n });\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons-overflow/blob/master/src/tachyons-overflow.css\nexport const overflow: CreateMethodsFn = () => {\n return [\n ...newMethodsForProp(\"overflow\", {\n ov: \"visible\",\n oh: \"hidden\",\n os: \"scroll\",\n oa: \"auto\",\n }),\n ...newMethodsForProp(\"overflowY\", {\n oyv: \"visible\",\n oyh: \"hidden\",\n oys: \"scroll\",\n oya: \"auto\",\n }),\n ...newMethodsForProp(\"overflowX\", {\n oxv: \"visible\",\n oxh: \"hidden\",\n oxs: \"scroll\",\n oxa: \"auto\",\n }),\n ];\n};\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_position.css\nexport const position: CreateMethodsFn = () =>\n newMethodsForProp(\"position\", {\n absolute: \"absolute\",\n fixed: \"fixed\",\n static: \"static\",\n relative: \"relative\",\n // added\n sticky: \"sticky\",\n });\n","export function lowerCaseFirst(s: string): string {\n return s.charAt(0).toLowerCase() + s.substr(1);\n}\n\nexport function quote(s: string): string {\n return `\"${s}\"`;\n}\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\nimport { lowerCaseFirst } from \"src/utils\";\n\nexport const skins: CreateMethodsFn = (config) => {\n const { palette } = config;\n\n const colors = newMethodsForProp(\n \"color\",\n Object.fromEntries(\n Object.entries(palette).map(([key, value]) => [\n lowerCaseFirst(key),\n value,\n ])\n )\n );\n\n const backgroundColors = newMethodsForProp(\n \"backgroundColor\",\n Object.fromEntries(\n Object.entries(palette).map(([key, value]) => [`bg${key}`, value])\n ),\n \"bgColor\"\n );\n\n const fillColors = newMethodsForProp(\n \"fill\",\n Object.fromEntries(\n Object.entries(palette).map(([key, value]) => [`f${key}`, value])\n )\n );\n\n return [...colors, ...backgroundColors, ...fillColors];\n};\n","import { CreateMethodsFn } from \"src/config\";\nimport { IncConfig, newIncrementMethods } from \"src/methods\";\n\nexport const spacing: CreateMethodsFn = (config) => {\n const marginDefs: IncConfig[] = [\n [\"mt\", \"marginTop\"],\n [\"mr\", \"marginRight\"],\n [\"mb\", \"marginBottom\"],\n [\"ml\", \"marginLeft\"],\n [\"mx\", [\"marginLeft\", \"marginRight\"]],\n [\"my\", [\"marginTop\", \"marginBottom\"]],\n [\"m\", [\"marginTop\", \"marginBottom\", \"marginRight\", \"marginLeft\"]],\n ];\n const margins = [...marginDefs.map(([abbr, conf]) => newIncrementMethods(config, abbr, conf, { auto: true })).flat()];\n\n const paddingDefs: IncConfig[] = [\n [\"pt\", \"paddingTop\"],\n [\"pr\", \"paddingRight\"],\n [\"pb\", \"paddingBottom\"],\n [\"pl\", \"paddingLeft\"],\n [\"px\", [\"paddingLeft\", \"paddingRight\"]],\n [\"py\", [\"paddingTop\", \"paddingBottom\"]],\n [\"p\", [\"paddingTop\", \"paddingBottom\", \"paddingRight\", \"paddingLeft\"]],\n ];\n const paddings = paddingDefs.map(([abbr, conf]) => newIncrementMethods(config, abbr, conf)).flat();\n\n return [...margins, ...paddings];\n};\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_text-align.css\nexport const textAlign: CreateMethodsFn = () =>\n newMethodsForProp(\n \"textAlign\",\n {\n tal: \"left\",\n tac: \"center\",\n tar: \"right\",\n taj: \"justify\",\n },\n \"ta\"\n );\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const textDecoration: CreateMethodsFn = () =>\n newMethodsForProp(\"textDecoration\", {\n tdn: \"none\",\n tdlt: \"line-through\",\n tdu: \"underline\",\n });\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_text-transform.css\nexport const textTransform: CreateMethodsFn = () =>\n newMethodsForProp(\n \"textTransform\",\n {\n ttc: \"capitalize\",\n ttl: \"lowercase\",\n ttu: \"uppercase\",\n ttn: \"none\",\n },\n \"tt\"\n );\n","import { newMethod, newMethodsForProp, newParamMethod } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n/** Adds abbreviations like `tiny` -> `12px` or `tiny` -> `{ fontSize: 12px, fontWeight: ... }`. */\nexport const typeScale: CreateMethodsFn = ({ fonts }) => [\n ...Object.entries(fonts).map(([abbr, defs]) => {\n if (typeof defs === \"string\") {\n return newMethod(abbr, { fontSize: defs });\n }\n return newMethod(abbr, defs);\n }),\n];\n","import { newMethod, newMethodsForProp, newParamMethod } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// See typeScale for the FontConfig.fonts handling\n\nexport const typography: CreateMethodsFn = () => [\n newMethod(\"measure\", { maxWidth: \"30em\" }),\n newMethod(\"measureWide\", { maxWidth: \"34em\" }),\n newMethod(\"measureNarrow\", { maxWidth: \"20em\" }),\n newMethod(\"indent\", {\n textIndent: \"1em\",\n marginTop: 0,\n marginBottom: 0,\n }),\n newMethod(\"smallCaps\", { fontVariant: \"small-caps\" }),\n newMethod(\"truncate\", {\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }),\n // Include `fs(...)` & `fsPx(...)` for one-off font-sizes. We technically also have\n // `fs0` and `fs1` for `flexShrink`, but this seems fine.\n ...newMethodsForProp(\"fontSize\", {}, \"fs\", true),\n ...newMethodsForProp(\"lineHeight\", {}, \"lh\", true),\n];\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://tailwindcss.com/docs/user-select/\nexport const userSelect: CreateMethodsFn = () =>\n newMethodsForProp(\n \"userSelect\",\n {\n usn: \"none\",\n ust: \"text\",\n usAll: \"all\",\n usAuto: \"auto\",\n },\n \"select\",\n );\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const verticalAlign: CreateMethodsFn = () =>\n newMethodsForProp(\n \"verticalAlign\",\n {\n vaBaseline: \"baseline\",\n vam: \"middle\",\n vat: \"top\",\n vaBottom: \"bottom\",\n },\n \"va\",\n );\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://tailwindcss.com/docs/visibility/\nexport const visibility: CreateMethodsFn = () =>\n newMethodsForProp(\"visibility\", {\n vv: \"visible\",\n vh: \"hidden\",\n });\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const whitespace: CreateMethodsFn = () =>\n newMethodsForProp(\"whiteSpace\", {\n wsp: \"pre\",\n wsn: \"normal\",\n wsnw: \"nowrap\",\n wsbs: \"break-spaces\",\n wspw: \"pre-wrap\",\n wspl: \"pre-line\",\n });\n","import { newIncrementMethods, newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const width: CreateMethodsFn = (config) => [\n ...newMethodsForProp(\n \"width\",\n {\n w25: \"25%\",\n w50: \"50%\",\n w75: \"75%\",\n w100: \"100%\",\n wfc: \"fit-content\",\n wmaxc: \"max-content\",\n wminc: \"min-content\",\n },\n // Skip `w` here b/c it's created by newIncrementMethods below\n null,\n ),\n\n ...newMethodsForProp(\n \"minWidth\",\n {\n mw0: 0,\n mw25: \"25%\",\n mw50: \"50%\",\n mw75: \"75%\",\n mw100: \"100%\",\n mwfc: \"fit-content\",\n mwminc: \"min-content\",\n mwmaxc: \"max-content\",\n },\n \"mw\",\n true,\n ),\n\n ...newMethodsForProp(\n \"maxWidth\",\n {\n maxw0: \"0\",\n maxw25: \"25%\",\n maxw50: \"50%\",\n maxw75: \"75%\",\n maxw100: \"100%\",\n maxwfc: \"fit-content\",\n maxwminc: \"min-content\",\n maxwmaxc: \"max-content\",\n },\n \"maxw\",\n true,\n ),\n\n ...newIncrementMethods(config, \"w\", \"width\", { auto: true }),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons-word-break/blob/master/src/tachyons-word-break.css\nexport const wordBreak: CreateMethodsFn = () =>\n newMethodsForProp(\"wordBreak\", {\n wbn: \"normal\",\n wbba: \"break-all\",\n wbka: \"keep-all\",\n wbbw: \"break-word\",\n });\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://github.com/tachyons-css/tachyons-z-index/blob/master/src/tachyons-z-index.css\nexport const zIndex: CreateMethodsFn = (config) => [\n // Even though we define const z0/z1/etc indexes to follow Tachyons, ideally applications\n // should define their own application-specific indexes, i.e.:\n //\n // export const zIndexes = {\n // ourModals: 10,\n // ourLabels: 12,\n // }\n //\n // And then use `Css.z(zIndexes.ourModals).$` to get better documentation and maintainability\n // then just using the zN abbreviations.\n ...newMethodsForProp(\n \"zIndex\",\n {\n z0: 0,\n z1: 1,\n z2: 2,\n z3: 3,\n z4: 4,\n z5: 5,\n z999: 999,\n z9999: 9999,\n zInherit: \"inherit\",\n zInitial: \"initial\",\n zUnset: \"unset\",\n },\n \"z\"\n ),\n];\n","import { newMethod, newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const container: CreateMethodsFn = () => [\n ...newMethodsForProp(\n \"containerType\",\n {\n cts: \"size\",\n ctis: \"inline-size\",\n ctn: \"normal\",\n },\n \"ct\",\n ),\n ...newMethodsForProp(\"containerName\", {}, \"cn\"),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const opacity: CreateMethodsFn = () => [\n ...newMethodsForProp(\n \"opacity\",\n {\n o0: \"0\",\n o25: \"0.25\",\n o50: \"0.5\",\n o75: \"0.75\",\n o100: \"1\",\n },\n \"o\",\n ),\n];\n","import { border } from \"src/sections/tachyons/border\";\nimport { borderColor } from \"src/sections/tachyons/borderColors\";\nimport { borderRadius } from \"src/sections/tachyons/borderRadius\";\nimport { borderStyle } from \"src/sections/tachyons/borderStyles\";\nimport { borderWidth } from \"src/sections/tachyons/borderWidths\";\nimport { boxShadow } from \"src/sections/tachyons/boxShadow\";\nimport { coordinates } from \"src/sections/tachyons/coordinates\";\nimport { cursor } from \"src/sections/tachyons/cursor\";\nimport { display } from \"src/sections/tachyons/display\";\nimport { flexbox } from \"src/sections/tachyons/flexbox\";\nimport { float } from \"src/sections/tachyons/floats\";\nimport { fontWeight } from \"src/sections/tachyons/fontWeight\";\nimport { grid } from \"src/sections/tachyons/grid\";\nimport { height } from \"src/sections/tachyons/heights\";\nimport { lineClamp } from \"src/sections/tachyons/lineClamp\";\nimport { objectFit } from \"src/sections/tachyons/objectFit\";\nimport { outline } from \"src/sections/tachyons/outlines\";\nimport { overflow } from \"src/sections/tachyons/overflow\";\nimport { position } from \"src/sections/tachyons/position\";\nimport { skins } from \"src/sections/tachyons/skins\";\nimport { spacing } from \"src/sections/tachyons/spacing\";\nimport { textAlign } from \"src/sections/tachyons/textAlign\";\nimport { textDecoration } from \"src/sections/tachyons/textDecoration\";\nimport { textTransform } from \"src/sections/tachyons/textTransform\";\nimport { typeScale } from \"src/sections/tachyons/typeScale\";\nimport { typography } from \"src/sections/tachyons/typography\";\nimport { userSelect } from \"src/sections/tachyons/userSelect\";\nimport { verticalAlign } from \"src/sections/tachyons/verticalAlign\";\nimport { visibility } from \"src/sections/tachyons/visibility\";\nimport { whitespace } from \"src/sections/tachyons/whitespace\";\nimport { width } from \"src/sections/tachyons/widths\";\nimport { wordBreak } from \"src/sections/tachyons/wordBreak\";\nimport { zIndex } from \"src/sections/tachyons/zIndex\";\nimport { container } from \"src/sections/tachyons/container\";\nimport { opacity } from \"src/sections/tachyons/opacity\";\n\nexport const defaultSections = {\n border,\n borderColor,\n borderRadius,\n borderStyle,\n borderWidth,\n boxShadow,\n container,\n coordinates,\n cursor,\n display,\n flexbox,\n float,\n fontWeight,\n grid,\n height,\n lineClamp,\n objectFit,\n opacity,\n outline,\n overflow,\n position,\n skins,\n spacing,\n textAlign,\n textDecoration,\n textTransform,\n typeScale,\n typography,\n userSelect,\n verticalAlign,\n visibility,\n whitespace,\n width,\n wordBreak,\n zIndex,\n} as const;\n","import { Properties } from \"csstype\";\nimport { promises as fs } from \"fs\";\nimport { code, Code, def, imp } from \"ts-poet\";\nimport { makeBreakpoints } from \"src/breakpoints\";\nimport { Config, SectionName, Sections, UtilityMethod } from \"src/config\";\nimport { newAliasesMethods, startStylexCollection, stopStylexCollection, StylexEntry } from \"src/methods\";\nimport { defaultSections } from \"src/sections/tachyons\";\nimport { quote } from \"src/utils\";\nimport { pascalCase } from \"change-case\";\nimport { reactNativeSections } from \"src/sections/tachyons-rn\";\n\nconst CssProperties = imp(\"Properties@csstype\");\n\nexport const defaultTypeAliases: Record<string, Array<keyof Properties>> = {\n Margin: [\"margin\", \"marginTop\", \"marginRight\", \"marginBottom\", \"marginLeft\"],\n Padding: [\"padding\", \"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\"],\n};\n\nexport async function generate(config: Config): Promise<void> {\n const { outputPath } = config;\n const target: string = config.target ?? \"stylex\";\n if (target === \"stylex\") {\n const { sections, entries } = collectStylexGenerationData(config);\n // For stylex target: generate a stylex-friendly CssBuilder (for types/IDE) + a mapping JSON\n const cssOutput = generateStylexCssBuilder(config, sections).toString();\n await fs.writeFile(outputPath, cssOutput);\n const mappingPath = config.mappingOutputPath || outputPath.replace(/\\.ts$/, \".json\");\n const mapping = generateTrussMapping(config, entries);\n await fs.writeFile(mappingPath, condensedJson(mapping) + \"\\n\");\n return;\n }\n\n if (target === \"react-native\") {\n const output = generateCssBuilder(config).toString();\n await fs.writeFile(outputPath, output);\n return;\n }\n\n throw new Error(`Unsupported truss target \"${target}\". Use \"stylex\" (default) or \"react-native\".`);\n}\n\nfunction generateCssBuilder(config: Config): Code {\n const { fonts, increment, extras, typeAliases, breakpoints = {}, palette } = config;\n const sections = generateSections(config);\n\n const lines = Object.entries(sections)\n .map(([name, value]) => [`// ${name}`, ...value, \"\"])\n .flat();\n\n const typeAliasCode = Object.entries({\n ...defaultTypeAliases,\n ...typeAliases,\n }).map(([name, props]) => {\n return `export type ${name} = ${props.map(quote).join(\" | \")};\\n\\n`;\n });\n\n const typographyType = code`\n export type ${def(\"Typography\")} = ${Object.keys(fonts).map(quote).join(\" | \")};\n `;\n\n const genBreakpoints = makeBreakpoints(breakpoints);\n\n const breakpointCode = [\n `export type Breakpoint = ${Object.keys(genBreakpoints).map(quote).join(\" | \")};`,\n `export enum Breakpoints {\n ${Object.entries(genBreakpoints).map(([name, value]) => `${name} = \"${value}\"`)}\n };`,\n ];\n\n const breakpointIfs = Object.entries(genBreakpoints).map(([name, value]) => {\n return code`\n get if${pascalCase(name)}() {\n return this.newCss({ selector: ${quote(value)} });\n }`;\n });\n\n const containerQueriesCode = code`\n /**\n * Utility to help write \\`@container\\` queries\n *\n * @param name - The name of the container.\n * @param lt - The maximum width of the container inclusive.\n * @param gt - The minimum width of the container exclusive.\n */\n type ContainerProps = { name?: string } & ({ lt: number } | { gt: number } | { lt: number; gt: number });\n export function Container(props: ContainerProps) {\n const { name = \"\" } = props;\n const lt = \"lt\" in props ? props.lt : undefined;\n const gt = \"gt\" in props ? props.gt : undefined;\n\n const ltQuery = lt !== undefined ? \\`(max-width: \\${lt}px)\\` : \"\";\n const gtQuery = gt !== undefined ? \\`(min-width: \\${gt + 1}px)\\` : \"\";\n const query = [ltQuery, gtQuery].filter(Boolean).join(\" and \");\n\n return \\`@container \\${name} \\${query}\\`;\n }`;\n\n return code`\n// This file is auto-generated by truss: https://github.com/homebound-team/truss.\n// See your project's \\`truss-config.ts\\` to make configuration changes (fonts, increments, etc).\n\n/** Given a type X, and the user's proposed type T, only allow keys in X and nothing else. */\nexport type Only<X, T> = X & Record<Exclude<keyof T, keyof X>, never>;\n\nexport type ${def(\"Properties\")} = ${CssProperties}<string | 0, string>;\n\n${typographyType}\n\ntype Opts<T> = {\n rules: T,\n enabled: boolean,\n important: boolean,\n selector: string | undefined\n};\n\nclass CssBuilder<T extends Properties> {\n constructor(private opts: Opts<T>) {}\n\n private get rules(): T { return this.opts.rules };\n private get enabled(): boolean { return this.opts.enabled };\n private get selector(): string | undefined { return this.opts.selector };\n private newCss(opts: Partial<Opts<T>>): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, ...opts });\n }\n\n ${lines.join(\"\\n \").replace(/ +\\n/g, \"\\n\")}\n \n get $(): T { return maybeImportant(sortObject(this.rules), this.opts.important); }\n\n if(bp: Breakpoint): CssBuilder<T>;\n if(cond: boolean): CssBuilder<T>;\n if(attr: string, value: boolean | string): CssBuilder<T>;\n if(arg: boolean | Breakpoint | string, value?: boolean | string): CssBuilder<T> {\n if (value !== undefined) {\n return this.newCss({ selector: \\`[\\${arg}='\\${value}']\\` });\n } else if (typeof arg === \"boolean\") {\n return this.newCss({ enabled: arg });\n } else {\n return this.newCss({ selector: Breakpoints[arg as Breakpoint] });\n }\n }\n\n get onHover() {\n return this.newCss({ selector: \":hover\" });\n }\n \n ifContainer(props: ContainerProps) {\n return this.newCss({ selector: Container(props) });\n }\n \n ${breakpointIfs}\n\n typography(key: Typography): CssBuilder<T> {\n return (this as any)[key];\n }\n\n get else() {\n if (this.selector !== undefined) {\n if (this.selector.includes(\"not\")) {\n throw new Error(\"else was already called\");\n } else {\n return this.newCss({ selector: this.selector.replace(\"@media\", \"@media not\") });\n }\n }\n return this.newCss({ enabled: !this.enabled });\n }\n\n get important() { return this.newCss({ important: true }); }\n\n /** Adds new properties, either a specific key/value or a Properties object, to the current css. */\n add<P extends Properties>(props: P): CssBuilder<T & P>;\n add<K extends keyof Properties>(prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n add<K extends keyof Properties>(propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n if (!this.enabled) return this;\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n const rules = this.selector\n ? { ...this.rules, [this.selector]: { ...(this.rules as any)[this.selector], ...newRules } }\n : { ...this.rules, ...newRules };\n return this.newCss({ rules: rules as any });\n }\n\n /** Adds new properties, either a specific key/value or a Properties object, to a nested selector. */\n addIn<P extends Properties>(selector: string, props: P | undefined): CssBuilder<T & P>;\n addIn<K extends keyof Properties>(selector: string, prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n addIn<K extends keyof Properties>(selector: string, propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n if (!this.enabled) return this;\n if (newRules === undefined) {\n return this;\n }\n const rules = { ...this.rules, [selector]: { ...(this.rules as any)[selector], ...newRules } };\n return this.newCss({ rules: rules as any });\n }\n\n /** Marker helper for legacy object-spread composition. */\n spread<P extends object>(props: P): P {\n return props;\n }\n}\n\n/** Sort keys so equivalent rule objects have deterministic shape. */\nfunction sortObject<T extends object>(obj: T): T {\n return Object.keys(obj)\n .sort()\n .reduce((acc, key) => {\n acc[key as keyof T] = obj[key as keyof T];\n return acc;\n }, ({} as any) as T) as T;\n}\n\n/** Conditionally adds \\`important!\\` to everything. */\nfunction maybeImportant<T extends object>(obj: T, important: boolean): T {\n if (important) {\n Object.keys(obj).forEach(key => {\n (obj as any)[key] = \\`\\${(obj as any)[key]} !important\\`;\n });\n }\n return obj;\n}\n\n/** Converts \\`inc\\` into pixels value with a \\`px\\` suffix. */\nexport function maybeInc(inc: number | string): string {\n return typeof inc === \"string\" ? inc : \\`\\${increment(inc)}px\\`;\n}\n\n/** Converts \\`inc\\` into pixels. */\nexport function increment(inc: number): number {\n return inc * ${increment};\n}\n\n/** Convert \\`pixels\\` to a \\`px\\` units string so it's not ambiguous. */\nexport function px(pixels: number): string {\n return \\`\\${pixels}px\\`;\n}\n\nexport enum Palette {\n ${Object.entries(palette).map(([name, value]) => {\n return `${name} = \"${value}\",`;\n })}\n}\n\n/** A shortcut for defining Xss types. */\nexport type Xss<P extends keyof Properties> = Pick<Properties, P>;\n\n/** An entry point for Css expressions. CssBuilder is immutable so this is safe to share. */\nexport const Css = new CssBuilder({ rules: {}, enabled: true, important: false, selector: undefined });\n\n${typeAliasCode}\n\n${breakpointCode}\n\n${containerQueriesCode}\n\n${extras || \"\"}\n `;\n}\n\n/** Invokes all of the `MethodFns` to create actual `UtilityMethod`s. */\nfunction generateMethods(config: Config, methodFns: Sections): Record<SectionName, UtilityMethod[]> {\n return Object.fromEntries(Object.entries(methodFns).map(([name, fn]) => [name, fn(config)]));\n}\n\n/** Returns all utility sections configured for this project. */\nfunction generateSections(config: Config): Record<string, UtilityMethod[]> {\n const { aliases, defaultMethods = \"tachyons\", sections: customSections } = config;\n return {\n ...(defaultMethods === \"tachyons\"\n ? generateMethods(config, defaultSections)\n : defaultMethods === \"tachyons-rn\"\n ? generateMethods(config, reactNativeSections)\n : {}),\n ...(customSections ? generateMethods(config, customSections) : {}),\n ...(aliases && { aliases: newAliasesMethods(aliases) }),\n };\n}\n\n/** Runs section generation once with collection enabled for stylex outputs. */\nfunction collectStylexGenerationData(config: Config): {\n sections: Record<string, UtilityMethod[]>;\n entries: StylexEntry[];\n} {\n startStylexCollection();\n try {\n const sections = generateSections(config);\n const entries = stopStylexCollection();\n return { sections, entries };\n } catch (error) {\n stopStylexCollection();\n throw error;\n }\n}\n\n// ── StyleX Code Generator ─────────────────────────────────────────────\n\n/**\n * For the \"stylex\" target, we generate a stylex-friendly CssBuilder whose public\n * TypeScript surface matches the runtime targets: `.$` is typed as the accumulated\n * style object shape, even though the build-time plugin later rewrites it to StyleX refs.\n *\n * The actual StyleX transformation happens at build time via the truss Vite plugin,\n * which reads the companion `Css.json` to understand what each abbreviation\n * produces, and rewrites `Css.*.$` into file-local `stylex.create()` + `stylex.props()` calls.\n */\nfunction generateStylexCssBuilder(config: Config, sections: Record<string, UtilityMethod[]>): Code {\n const { fonts, increment, extras, typeAliases, palette, breakpoints = {} } = config;\n\n const lines = Object.entries(sections)\n .map(([name, value]) => [`// ${name}`, ...value, \"\"])\n .flat();\n\n const typeAliasCode = Object.entries({\n ...defaultTypeAliases,\n ...typeAliases,\n }).map(([name, props]) => {\n return `export type ${name} = ${props.map(quote).join(\" | \")};\\n\\n`;\n });\n\n const genBreakpointsMap = makeBreakpoints(breakpoints);\n\n const breakpointIfs = Object.entries(genBreakpointsMap).map(([name, value]) => {\n return code`\n get if${pascalCase(name)}() {\n return this.newCss({ selector: ${quote(value)} });\n }`;\n });\n\n const breakpointCode = [\n `export type Breakpoint = ${Object.keys(genBreakpointsMap).map(quote).join(\" | \")};`,\n `export enum Breakpoints {`,\n ...Object.entries(genBreakpointsMap).map(([name, value]) => ` ${name} = \"${value}\",`),\n `}`,\n ];\n\n const typographyType = code`\n export type ${def(\"Typography\")} = ${Object.keys(fonts).map(quote).join(\" | \")};\n `;\n\n return code`\n// This file is auto-generated by truss: https://github.com/homebound-team/truss.\n// See your project's \\`truss-config.ts\\` to make configuration changes (fonts, increments, etc).\n// Target: stylex (build-time plugin)\n\nimport * as stylex from \"@stylexjs/stylex\";\n\n/** Given a type X, and the user's proposed type T, only allow keys in X and nothing else. */\nexport type Only<X, T> = X & Record<Exclude<keyof T, keyof X>, never>;\n\nexport type ${def(\"Properties\")} = ${CssProperties}<string | 0, string>;\n\n/** A marker returned by \\`stylex.defineMarker()\\`, used with \\`when\\`/\\`markerOf\\` etc. */\nexport type Marker = ReturnType<typeof stylex.defineMarker>;\n\n${typographyType}\n\n// Augment React types so JSX elements accept the \\`css\\` prop\ndeclare module \"react\" {\n interface HTMLAttributes<T> {\n css?: Properties;\n }\n interface SVGAttributes<T> {\n css?: Properties;\n }\n}\n\ntype Opts<T> = {\n rules: T;\n enabled: boolean;\n selector: string | undefined;\n};\n\nclass CssBuilder<T extends Properties> {\n constructor(private opts: Opts<T>) {}\n\n ${lines.join(\"\\n \").replace(/ +\\n/g, \"\\n\")}\n\n get $(): T {\n return this.rules as any;\n }\n\n get onHover() {\n return this.newCss({ selector: \":hover\" });\n }\n get onFocus() {\n return this.newCss({ selector: \":focus\" });\n }\n get onFocusVisible() {\n return this.newCss({ selector: \":focus-visible\" });\n }\n get onActive() {\n return this.newCss({ selector: \":active\" });\n }\n get onDisabled() {\n return this.newCss({ selector: \":disabled\" });\n }\n\n /** Marks this element as a default hover marker (for ancestor pseudo selectors). */\n get marker(): CssBuilder<T> {\n return this;\n }\n\n /** Marks this element with a user-defined marker (return value of stylex.defineMarker()). */\n markerOf(_marker: Marker): CssBuilder<T> {\n return this;\n }\n\n typography(key: Typography): CssBuilder<T> {\n return (this as any)[key];\n }\n\n /**\n * Styles after this \\`when\\` are applied based on a relationship + pseudo selector.\n *\n * \\`when(\"ancestor\", \":hover\")\\` — react to ancestor hover\n * \\`when(\"descendant\", \":focus\")\\` — react to descendant focus\n * \\`when(\"siblingAfter\", \":hover\")\\` — react to a following sibling's hover\n */\n when(relationship: \"ancestor\" | \"descendant\" | \"anySibling\" | \"siblingBefore\" | \"siblingAfter\", pseudo: string): CssBuilder<T>;\n /**\n * Styles after this \\`when\\` are applied based on a relationship-to-marker + pseudo selector.\n *\n * \\`when(\"ancestor\", marker, \":hover\")\\` — react to a specific ancestor's hover\n */\n when(relationship: \"ancestor\" | \"descendant\" | \"anySibling\" | \"siblingBefore\" | \"siblingAfter\", marker: Marker, pseudo: string): CssBuilder<T>;\n when(_relationship: string, _pseudoOrMarker: string | Marker, _pseudo?: string): CssBuilder<T> {\n return this;\n }\n\n ifContainer(_props: { name?: string; lt?: number; gt?: number }) {\n return this;\n }\n\n /** Apply styles within a pseudo-element (e.g. \\`\"::placeholder\"\\`, \\`\"::selection\"\\`). */\n element(_pseudoElement: string): CssBuilder<T> {\n return this;\n }\n\n ${breakpointIfs}\n\n /** Conditionally apply styles when \\`cond\\` is true. */\n if(cond: boolean): CssBuilder<T>;\n /** Apply styles within a media query (e.g. \\`Breakpoints.sm\\` or a raw \\`@media\\` string). */\n if(mediaQuery: string): CssBuilder<T>;\n if(condOrMediaQuery: boolean | string): CssBuilder<T> {\n if (typeof condOrMediaQuery === \"boolean\") {\n return new CssBuilder({ ...this.opts, enabled: condOrMediaQuery });\n }\n return this.newCss({ selector: condOrMediaQuery });\n }\n\n get else(): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, enabled: !this.enabled });\n }\n\n add<P extends Properties>(props: P): CssBuilder<T & P>;\n add<K extends keyof Properties>(prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n add<K extends keyof Properties>(propOrStyles: K | Properties, value?: Properties[K]): CssBuilder<any> {\n if (!this.enabled) return this;\n\n const newRules = typeof propOrStyles === \"string\" ? { [propOrStyles]: value } : propOrStyles;\n const rules = this.selector\n ? { ...this.rules, [this.selector]: { ...(this.rules as any)[this.selector], ...newRules } }\n : { ...this.rules, ...newRules };\n return this.newCss({ rules: rules as any });\n }\n\n /** Marker helper for legacy object-spread composition. */\n spread<P extends object>(props: P): P {\n return props;\n }\n\n private get rules(): T {\n return this.opts.rules;\n }\n private get enabled(): boolean {\n return this.opts.enabled;\n }\n private get selector(): string | undefined {\n return this.opts.selector;\n }\n private newCss(opts: Partial<Opts<T>>): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, ...opts });\n }\n}\n\n/** Converts \\`inc\\` into pixels value with a \\`px\\` suffix. */\nexport function maybeInc(inc: number | string): string {\n return typeof inc === \"string\" ? inc : \\`\\${inc * ${increment}}px\\`;\n}\n\n/** Converts \\`inc\\` into pixels. */\nexport function increment(inc: number): number {\n return inc * ${increment};\n}\n\n/** Convert \\`pixels\\` to a \\`px\\` units string so it's not ambiguous. */\nexport function px(pixels: number): string {\n return \\`\\${pixels}px\\`;\n}\n\nexport enum Palette {\n ${Object.entries(palette).map(([name, value]) => {\n return `${name} = \"${value}\",`;\n })}\n}\n\n/** A shortcut for defining Xss types. */\nexport type Xss<P extends keyof Properties> = Pick<Properties, P>;\n\n/** An entry point for Css expressions. CssBuilder is immutable so this is safe to share. */\nexport const Css = new CssBuilder({ rules: {}, enabled: true, selector: undefined });\n\n${typeAliasCode}\n\n${breakpointCode}\n\n${extras || \"\"}\n `;\n}\n\n// ── Truss Mapping Generator ──────────────────────────────────────────\n\n/** The shape of the Css.json mapping file consumed by the Vite plugin. */\nexport interface TrussMapping {\n increment: number;\n breakpoints?: Record<string, string>;\n typography?: string[];\n abbreviations: Record<string, TrussMappingEntry>;\n}\n\nexport type TrussMappingEntry =\n | { kind: \"static\"; defs: Record<string, unknown> }\n | { kind: \"dynamic\"; props: string[]; incremented: boolean; extraDefs?: Record<string, unknown> }\n | { kind: \"delegate\"; target: string }\n | { kind: \"alias\"; chain: string[] };\n\n/**\n * Generates the truss mapping JSON that the Vite plugin uses to resolve\n * Css abbreviation chains into CSS properties at build time.\n */\nfunction generateTrussMapping(config: Config, entries: StylexEntry[]): TrussMapping {\n const { breakpoints = {} } = config;\n\n const abbreviations: Record<string, TrussMappingEntry> = {};\n\n for (const entry of entries) {\n switch (entry.kind) {\n case \"static\":\n case \"cssvar\":\n abbreviations[entry.abbr] = { kind: \"static\", defs: entry.defs || {} };\n break;\n case \"param\":\n abbreviations[entry.abbr] = {\n kind: \"dynamic\",\n props: entry.props || [],\n incremented: false,\n extraDefs: entry.extraDefs,\n };\n break;\n case \"increment-param\":\n abbreviations[entry.abbr] = {\n kind: \"dynamic\",\n props: entry.props || [],\n incremented: true,\n extraDefs: entry.extraDefs,\n };\n break;\n case \"px-delegate\":\n // The target is the abbreviation without the Px suffix\n abbreviations[entry.abbr] = {\n kind: \"delegate\",\n target: entry.abbr.replace(/Px$/, \"\"),\n };\n break;\n case \"alias\":\n abbreviations[entry.abbr] = {\n kind: \"alias\",\n chain: entry.aliasTargets || [],\n };\n break;\n }\n }\n\n // Generate breakpoint mapping: { ifSm: \"@media ...\", ifMd: \"@media ...\", ... }\n const genBreakpointsMap = makeBreakpoints(breakpoints);\n const breakpointEntries: Record<string, string> = {};\n for (const [name, mediaQuery] of Object.entries(genBreakpointsMap)) {\n breakpointEntries[`if${pascalCase(name)}`] = mediaQuery;\n }\n\n return {\n increment: config.increment,\n ...(Object.keys(breakpointEntries).length > 0 ? { breakpoints: breakpointEntries } : {}),\n ...(Object.keys(config.fonts).length > 0 ? { typography: Object.keys(config.fonts) } : {}),\n abbreviations,\n };\n}\n\n/** Produce compact JSON with one line per abbreviation entry. */\nfunction condensedJson(mapping: TrussMapping): string {\n const lines: string[] = [];\n lines.push(\"{\");\n lines.push(` \"increment\": ${mapping.increment},`);\n if (mapping.breakpoints && Object.keys(mapping.breakpoints).length > 0) {\n lines.push(` \"breakpoints\": ${JSON.stringify(mapping.breakpoints)},`);\n }\n if (mapping.typography && mapping.typography.length > 0) {\n lines.push(` \"typography\": ${JSON.stringify(mapping.typography)},`);\n }\n lines.push(` \"abbreviations\": {`);\n const entries = Object.entries(mapping.abbreviations);\n for (let i = 0; i < entries.length; i++) {\n const [key, value] = entries[i];\n const comma = i < entries.length - 1 ? \",\" : \"\";\n lines.push(` ${JSON.stringify(key)}: ${JSON.stringify(value)}${comma}`);\n }\n lines.push(\" }\");\n lines.push(\"}\");\n return lines.join(\"\\n\");\n}\n","/**\n * Turns a high-level `{ sm: 0, md: 200 }` breakpoint config into a continuous set of media queries.\n *\n * Note that these are not utility methods directly, but are used to generate the breakpoint\n * selectors that we pass to CSS-in-JS frameworks.\n */\nexport function makeBreakpoints(breakpoints: Record<string, number>): Record<string, string> {\n const r: Record<string, string> = {\n print: \"@media print\",\n };\n const bps = Object.keys(breakpoints);\n Object.entries(breakpoints).forEach(([bp, px], i) => {\n const isFirst = i === 0;\n const isLast = i === bps.length - 1;\n // Calc this breakpoint's min/max, which is its px --> the next bp's px - 1\n const min = !isFirst ? `${px}px` : \"0\";\n const max = !isLast ? `${breakpoints[bps[i + 1]] - 1}px` : \"0\";\n\n // Make a rule for exactly this breakpoint, i.e. \"just sm\" or \"just md\".\n if (isFirst) {\n // Don't bother with min-width on the smallest bp\n r[bp] = `@media (max-width: ${max})`;\n } else if (isLast) {\n // Don't bother with max-width on the largest bp\n r[bp] = `@media (min-width: ${min})`;\n } else {\n r[bp] = `@media (min-width: ${min}) and (max-width: ${max})`;\n }\n\n // Make combinations of neighbors, i.e. smOrMd or mdOrLg. We could go further, like smOrMdOrLg, but that seems excessive.\n if (!isFirst) {\n const isSecond = i === 1;\n const prevBp = bps[i - 1];\n const name = `${prevBp}Or${capitalize(bp)}`;\n const parts: string[] = [];\n // If we're the `firstOrSecond` combination, we can skip min-width.\n if (!isSecond) {\n const prevMin = breakpoints[bps[i - 1]];\n parts.push(`(min-width: ${prevMin}px)`);\n }\n // If we're the `secondToLastOrLast` combination, we can skip max-width.\n if (!isLast) {\n parts.push(`(max-width: ${max})`);\n }\n r[name] = `@media ${parts.join(\" and \")}`;\n }\n\n // Make up/down variants for any \"middle\" breakpoints, i.e. `smUp` is \"everything\" and\n // `smDown` is \"just sm\", so skip both of those, and same for largest `lgUp`/`lgDown` bp.\n if (!isFirst && !isLast) {\n r[`${bp}AndUp`] = `@media (min-width: ${min})`;\n r[`${bp}AndDown`] = `@media (max-width: ${max})`;\n }\n });\n return r;\n}\n\nfunction capitalize(s: string): string {\n return `${s[0].toUpperCase()}${s.substring(1)}`;\n}\n","import { CreateMethodsFn } from \"src/config\";\nimport { IncConfig, newIncrementMethods } from \"src/methods\";\n\nexport const spacing: CreateMethodsFn = (config) => {\n const marginDefs: IncConfig[] = [\n [\"mt\", \"marginTop\"],\n [\"mr\", \"marginRight\"],\n [\"mb\", \"marginBottom\"],\n [\"ml\", \"marginLeft\"],\n [\"mx\", [\"marginLeft\", \"marginRight\"]],\n [\"my\", [\"marginTop\", \"marginBottom\"]],\n [\"m\", [\"marginTop\", \"marginBottom\", \"marginRight\", \"marginLeft\"]],\n ];\n const margins = [...marginDefs.map(([abbr, conf]) => newIncrementMethods(config, abbr, conf, { auto: true })).flat()];\n\n const paddingDefs: IncConfig[] = [\n [\"pt\", \"paddingTop\"],\n [\"pr\", \"paddingRight\"],\n [\"pb\", \"paddingBottom\"],\n [\"pl\", \"paddingLeft\"],\n [\"px\", [\"paddingLeft\", \"paddingRight\"]],\n [\"py\", [\"paddingTop\", \"paddingBottom\"]],\n [\"p\", [\"paddingTop\", \"paddingBottom\", \"paddingRight\", \"paddingLeft\"]],\n ];\n const paddings = paddingDefs.map(([abbr, conf]) => newIncrementMethods(config, abbr, conf)).flat();\n\n return [...margins, ...paddings];\n};\n","import { spacing } from \"src/sections/tachyons-rn/spacing\";\n\nexport const reactNativeSections = {\n spacing,\n} as const;\n"],"mappings":";AAuGO,SAAS,aAAa,QAAwB;AACnD,SAAO;AACT;;;AChFA,IAAI,mBAAyC;AAGtC,SAAS,wBAA8B;AAC5C,qBAAmB,CAAC;AACtB;AAGO,SAAS,uBAAsC;AACpD,QAAM,SAAS;AACf,qBAAmB;AACnB,SAAO;AACT;AAEA,SAAS,QAAQ,OAA0B;AACzC,MAAI,iBAAkB,kBAAiB,KAAK,KAAK;AACnD;AAMO,SAAS,UAAU,M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1
+ {"version":3,"sources":["../src/config.ts","../src/methods.ts","../src/sections/tachyons/border.ts","../src/sections/tachyons/borderColors.ts","../src/sections/tachyons/borderRadius.ts","../src/sections/tachyons/borderStyles.ts","../src/sections/tachyons/borderWidths.ts","../src/sections/tachyons/boxShadow.ts","../src/sections/tachyons/coordinates.ts","../src/sections/tachyons/cursor.ts","../src/sections/tachyons/display.ts","../src/sections/tachyons/flexbox.ts","../src/sections/tachyons/floats.ts","../src/sections/tachyons/fontWeight.ts","../src/sections/tachyons/grid.ts","../src/sections/tachyons/heights.ts","../src/sections/tachyons/lineClamp.ts","../src/sections/tachyons/objectFit.ts","../src/sections/tachyons/outlines.ts","../src/sections/tachyons/overflow.ts","../src/sections/tachyons/position.ts","../src/utils.ts","../src/sections/tachyons/skins.ts","../src/sections/tachyons/spacing.ts","../src/sections/tachyons/textAlign.ts","../src/sections/tachyons/textDecoration.ts","../src/sections/tachyons/textTransform.ts","../src/sections/tachyons/typeScale.ts","../src/sections/tachyons/typography.ts","../src/sections/tachyons/userSelect.ts","../src/sections/tachyons/verticalAlign.ts","../src/sections/tachyons/visibility.ts","../src/sections/tachyons/whitespace.ts","../src/sections/tachyons/widths.ts","../src/sections/tachyons/wordBreak.ts","../src/sections/tachyons/zIndex.ts","../src/sections/tachyons/container.ts","../src/sections/tachyons/opacity.ts","../src/sections/tachyons/index.ts","../src/generate.ts","../src/breakpoints.ts","../src/sections/tachyons-rn/spacing.ts","../src/sections/tachyons-rn/index.ts"],"sourcesContent":["import { Properties } from \"csstype\";\nimport { Code } from \"ts-poet\";\n\n/**\n * A map from human name to font size, i.e. `f12` -> `12px`.\n *\n * Or a set of properties, i.e. `f12` -> `{ fontFamily: ..., fontWeight: ... }`.\n */\nexport type FontConfig = Record<string, string | Properties>;\n\n/**\n * Provides users with an easy way to configure the major/most-often configurable\n * aspect of a design system, i.e. the palette, fonts, and increments.\n *\n * Truss's built-in rules, i.e. `typeScale.ts` for fonts, `skins.ts` for colors,\n * will read these values to determine their output.\n *\n * Note that users can always override whole sections of Truss's default set\n * of rules by setting `methods[\"typeScale\"] = {}`, see the readme for more\n * information.\n */\nexport interface Config {\n /** The output path of the `Css.ts` file. */\n outputPath: string;\n\n /**\n * A map from the human/design system name to color value, i.e. `black` -> `#000000`.\n *\n * Design systems can use either physical names, i.e. `Sky50 -> #...`, or logical\n * names, i.e. `Primary -> #...`, where the logical names are more themeable, but\n * that's up to each design system to decide.\n */\n palette: Record<string, string>;\n\n /**\n * A map from human name to font size, i.e. `f12` -> `12px`.\n *\n * Or a set of properties, i.e. `f12` -> `{ fontFamily: ..., fontWeight: ... }`.\n */\n fonts: FontConfig;\n\n /** The design system's increment in pixels. */\n increment: number;\n\n /** The number of increments to generate for rules like `mt1`, `mt2`, etc. */\n numberOfIncrements: number;\n\n /** Short-hand aliases like `bodyText` --> `[\"f12\", \"black\"]`. */\n aliases?: Aliases;\n\n /** Type aliases for Only clauses, i.e. `Margin` --> `[\"marginTop\", ...]`. `Margin` and `Padding` are provided. */\n typeAliases?: Record<string, Array<keyof Properties>>;\n\n /** Breakpoints, i.e. `{ sm: 0, md: 500 }`. */\n breakpoints?: Record<string, number>;\n\n /**\n * Which default methods to include.\n *\n * Currently, we support either `tachyons`, `tachyons-rn`, or `none`.\n * Could eventually support `tailwinds` / `tailwinds-rn` as additional options.\n */\n defaultMethods?: \"tachyons\" | \"none\" | \"tachyons-rn\";\n\n /**\n * The target CSS runtime to generate for.\n *\n * - `\"stylex\"` (default): Generates a StyleX-friendly CssBuilder (for IDE autocomplete + types) plus a\n * `Css.json` mapping file consumed by the truss Vite plugin, which transforms\n * `Css.*.$` expressions into file-local `stylex.create()` + `stylex.props()` calls at build time.\n * - `\"react-native\"`: Generates a runtime CssBuilder that accumulates plain style objects,\n * intended for React Native usage.\n */\n target?: \"react-native\" | \"stylex\";\n\n /**\n * The output path for the truss mapping file (only used when target is \"stylex\").\n * Defaults to a `.json` sibling of `outputPath` (e.g. `./src/Css.json`).\n */\n mappingOutputPath?: string;\n\n /**\n * A map of \"section\" to list of rules to create application-specific\n * utility methods.\n *\n * I.e. \"borderColors\" -> () => [`get ml1() { ... }`].\n *\n * This can be used to either add new sections or override built-in sections.\n */\n sections?: Sections;\n\n /** Any extra chunks of code you want appended to the end of the file. */\n extras?: Array<string | Code>;\n}\n\n/**\n * A helper method to define config w/o a trailing cast.\n *\n * Based on `vite.config.ts`'s approach.\n *\n * We could eventually use this as a place to apply defaults, but currently\n * just return the passed in `config` object as-is.\n */\nexport function defineConfig(config: Config): Config {\n return config;\n}\n\n/**\n * A function takes the project's `Config` and produces a list of utility methods to\n * add to the generated `Css.ts` file.\n *\n * I.e. a return value might be:\n *\n * ```\n * [\n * \"get mb0() { return this.mb(0); }\",\n * \"get mb1() { return this.mb(1); }\",\n * ]\n * ```\n *\n * See the `newMethod` and `newParamMethod` functions for more easily\n * creating the `get ...() { ... }` output.\n */\nexport type CreateMethodsFn = (config: Config) => UtilityMethod[];\n\n/**\n * A type-alias to clarify strings that are meant to be abbreviation/utility names.\n */\nexport type UtilityName = string;\n\n/**\n * A type-alias to clarify which method returns types are utility methods.\n *\n * I.e. they should be a line of TypeScript code like `get abbr() { ... }`.\n *\n * See `newMethod` for a helper method to create the string.\n */\nexport type UtilityMethod = string;\n\n/** A type-alias to clarify groups of utility methods. */\nexport type SectionName = string;\n\n/** A type-alias for a group of utility methods. */\nexport type Sections = Record<SectionName, CreateMethodsFn>;\n\n/** A type-alias for aliasing existing utility methods as a new utility method. */\nexport type Aliases = Record<UtilityName, UtilityName[]>;\n","import { Aliases, Config, UtilityMethod, UtilityName } from \"src/config\";\nimport { Properties } from \"csstype\";\n\nexport type Prop = keyof Properties;\n\n// ── StyleX Collector ──────────────────────────────────────────────────\n// When stylex collection is enabled, each helper function pushes structured\n// metadata into this array as a side-effect. This lets the stylex code generator\n// reuse the existing section definitions without modifying any section files.\n\nexport interface StylexEntry {\n kind: \"static\" | \"param\" | \"increment-param\" | \"px-delegate\" | \"alias\" | \"cssvar\";\n abbr: string;\n /** For static: the CSS properties object, e.g. { display: \"flex\" } */\n defs?: Record<string, unknown>;\n /** For param/increment-param: the CSS property name(s) */\n props?: string[];\n /** For increment-param: whether to use maybeInc */\n usesMaybeInc?: boolean;\n /** For param methods: extra properties to set alongside the main prop */\n extraDefs?: Record<string, unknown>;\n /** For aliases: the list of chained abbreviations */\n aliasTargets?: string[];\n}\n\nlet _stylexCollector: StylexEntry[] | null = null;\n\n/** Start collecting StylexEntry metadata from method helpers. */\nexport function startStylexCollection(): void {\n _stylexCollector = [];\n}\n\n/** Stop collecting and return all accumulated entries. */\nexport function stopStylexCollection(): StylexEntry[] {\n const result = _stylexCollector!;\n _stylexCollector = null;\n return result;\n}\n\nfunction collect(entry: StylexEntry): void {\n if (_stylexCollector) _stylexCollector.push(entry);\n}\n\n/**\n * Given a single abbreviation (i.e. `mt0`) and multiple `{ prop: value }` CSS values, returns\n * the TypeScript code for a `mt0` utility method that sets those values.\n */\nexport function newMethod(abbr: UtilityName, defs: Properties): UtilityMethod {\n collect({ kind: \"static\", abbr, defs: { ...defs } });\n return `${comment(defs)} get ${abbr}() { return this${Object.entries(defs)\n .map(([prop, value]) => `.add(\"${prop}\", ${maybeWrap(value)})`)\n .join(\"\")}; }`;\n}\n\n/**\n * Given a single abbreviation (i.e. `mt`) and a property name (i.e. `marginTop`), returns the\n * TypeScript code for a `mt` utility method that accepts a user-provided value of the prop to set.\n * Use `extraProperties` for additional properties to set.\n *\n * I.e. `Css.mt(someValue).$`\n */\nexport function newParamMethod(\n abbr: UtilityName,\n prop: keyof Properties,\n extraProperties: Properties = {},\n): UtilityMethod {\n collect({\n kind: \"param\",\n abbr,\n props: [prop],\n extraDefs: Object.keys(extraProperties).length > 0 ? { ...extraProperties } : undefined,\n });\n const additionalDefs = Object.entries(extraProperties)\n .map(([prop, value]) => `.add(\"${prop}\", ${maybeWrap(value)})`)\n .join(\"\");\n return `${comment({\n [prop]: \"value\",\n })} ${abbr}(value: Properties[\"${prop}\"]) { return this.add(\"${prop}\", value)${additionalDefs}; }`;\n}\n\n/**\n * Given a prop to set (i.e. `marginTop`), and multiple abbr/value pairs (i.e. `{ mt0: \"0px\", mt1: \"4px\" }`),\n * returns a utility method for each abbr/value pair.\n *\n * I.e. `mt0() { ...add(\"marginTop\", \"0px\")... }`\n *\n * By default, we also generate a param method for `prop`, i.e. if `prop` is `marginTop`, we'll\n * make a `marginTop(value)` method for users to pass variable values. You can change the\n * name of this method by setting `baseName` or disable it completely by setting `baseName`\n * to `null`.\n *\n * @param prop the CSS property we're setting, i.e. `marginTop`\n * @param defs a map of abbreviation name --> value (a property value or an object of properties to set)\n * @param baseName the base name to use, i.e. `mt`\n * @param includePx generate an extra `${baseName}Px` method that calls the base method with a converted px value\n * @param baseDefs additional properties to set for the base method\n */\nexport function newMethodsForProp<P extends Prop>(\n prop: P,\n defs: Record<UtilityName, Properties[P] | Properties>,\n baseName: string | null = prop,\n includePx: boolean = false,\n valueMethodExtraProperties?: Omit<Properties, P>,\n): UtilityMethod[] {\n return [\n ...Object.entries(defs).map(([abbr, value]) =>\n newMethod(\n abbr,\n // If the value is an object, use it as the full defs, otherwise, use it as the prop value\n typeof value === \"object\" ? value : { [prop]: value },\n ),\n ),\n // Conditionally add a method that directly accepts a value for prop\n ...(baseName !== null ? [newParamMethod(baseName, prop, valueMethodExtraProperties)] : []),\n ...(baseName !== null && includePx ? [newPxMethod(baseName, prop)] : []),\n ];\n}\n\n/**\n * Given aliases, i.e. `{ bodyText: [\"f12\", \"bold\"] }`, returns a utility method\n * for each alias that calls its corresponding utility classes.\n */\nexport function newAliasesMethods(aliases: Aliases): UtilityMethod[] {\n return Object.entries(aliases).map(([abbr, values]) => {\n collect({ kind: \"alias\", abbr, aliasTargets: values });\n return `get ${abbr}() { return this${values.map((v) => `.${v}`).join(\"\")}; }`;\n });\n}\n\n/**\n * Makes a utility method that can set CSS custom variables.\n *\n * I.e. `newSetCssVariableMethod(\"dark\", { \"--Primary\": \"white\" })` will create a\n * utility method `Css.dark.$ that will set `--Primary` to `white`.\n *\n * Currently, this only supports compile-time/hard-coded values. I.e. we don't support\n * something like `Css.dark({ \"--Primary\", someRuntimeValue }).$` yet.\n *\n * TODO: Create a `Css.set(cssVars).$` method.\n */\nexport function newSetCssVariablesMethod(abbr: UtilityName, defs: Record<string, string>): UtilityMethod {\n collect({ kind: \"cssvar\", abbr, defs: { ...defs } });\n return `get ${abbr}() { return this${Object.entries(defs)\n .map(([prop, value]) => `.add(\"${prop}\" as any, \"${value}\")`)\n .join(\"\")}; }`;\n}\n\n/** An abbreviation and its single or multiple CSS properties to set. */\nexport type IncConfig = [string, Prop | Prop[]];\n\n/**\n * Makes [`mt0`, `mt1`, ...] utility methods for each configured increment\n * to set `prop` to that given increment's value in pixels.\n *\n * I.e. we assume `prop` is a CSS property like `margin` that accepts pixels as values,\n * and so convert each increment `x` (1, 2, 3) to pixels `Y` (8, 16, 24) and create\n * a utility method for each `x -> Y` pair, i.e. `mt0 = mt(px(0))`.\n *\n * We also create a final param method, i.e. `mt(number)`, for callers that\n * need to call `mt` with a conditional amount of increments.\n *\n * @param config the config\n * @param abbr the utility prefix, i.e. `mt`\n * @param props if a CSS prop like `marginTop`, we output \"mt0 --> marginTop: 0px\", if an array like\n * `[\"marginTop\", \"marginBottom\"]`, we output \"my0 --> marginTop: 0px, marginBottom: 0px\"\n * @param opts.auto if set to true, include an `a` suffix for auto values, i.e. `mta`\n */\nexport function newIncrementMethods(\n config: Config,\n abbr: UtilityName,\n prop: Prop | Prop[],\n opts: { auto?: boolean } = {},\n): UtilityMethod[] {\n // Create `m1`, `m2`, etc. that will call our main `m` method.\n const props = typeof prop === \"string\" ? [prop] : prop;\n const delegateMethods = newCoreIncrementMethods(config, abbr, props);\n\n const autoComment = comment(Object.fromEntries(props.map((p) => [p, \"auto\"])));\n const valueComment = comment(Object.fromEntries(props.map((p) => [p, \"v\"])));\n const pxComment = comment(Object.fromEntries(props.map((p) => [p, \"px\"])));\n\n // Collect auto entry\n if (opts.auto) {\n collect({ kind: \"static\", abbr: `${abbr}a`, defs: Object.fromEntries(props.map((p) => [p, \"auto\"])) });\n }\n // Collect increment-param entry (uses maybeInc)\n collect({ kind: \"increment-param\", abbr, props, usesMaybeInc: true });\n // Collect px-delegate entry\n collect({ kind: \"px-delegate\", abbr: `${abbr}Px`, props });\n\n return [\n ...delegateMethods,\n ...(opts.auto\n ? [`${autoComment} get ${abbr}a() { return this.${props.map((p) => `add(\"${p}\", \"auto\")`).join(\".\")}; }`]\n : []),\n `${valueComment} ${abbr}(v: number | string) { return this.${props\n .map((p) => `add(\"${p}\", maybeInc(v))`)\n .join(\".\")}; }`,\n `${pxComment} ${abbr}Px(px: number) { return this.${props.map((p) => `add(\"${p}\", \\`\\${px}px\\`)`).join(\".\")}; }`,\n ];\n}\n\n/**\n * Creates just the core `<abbr>X` utility methods that set `props` with each increment value.\n *\n * See `newIncrementMethods` for handling the `<abbr>Px`, `<abbr>a`, and `<attr>(value)` methods.\n */\nexport function newCoreIncrementMethods(config: Config, abbr: UtilityName, props: Prop[]): UtilityMethod[] {\n return zeroTo(config.numberOfIncrements).map((i) => {\n const px = `${i * config.increment}px`;\n const defs = Object.fromEntries(props.map((p) => [p, px]));\n collect({ kind: \"static\", abbr: `${abbr}${i}`, defs });\n const sets = props.map((p) => `add(\"${p}\", \"${px}\")`).join(\".\");\n return `${comment(defs)} get ${abbr}${i}() { return this.${sets}; }`;\n });\n}\n\nexport function newPxMethod(abbr: UtilityName, prop: Prop): UtilityMethod {\n collect({ kind: \"px-delegate\", abbr: `${abbr}Px`, props: [prop] });\n return `${comment({ [prop]: \"px\" })} ${abbr}Px(px: number) { return this.${abbr}(\\`\\${px}px\\`); }`;\n}\n\nexport function newPxMethods(abbr: UtilityName, props: Prop[]): UtilityMethod[] {\n const defs = Object.fromEntries(props.map((prop) => [prop, \"px\"]));\n collect({ kind: \"param\", abbr, props });\n collect({ kind: \"px-delegate\", abbr: `${abbr}Px`, props });\n return [\n `${comment(defs)} ${abbr}Px(px: number) { return this.${props.map((prop) => `add(\"${prop}\", \\`\\${px}px\\`)`).join(\".\")}; }`,\n ];\n}\n\nexport const zeroTo: (n: number) => number[] = (n) => [...Array(n + 1).keys()];\n\n/** Keeps numbers as literals, and wraps anything else with double quotes. */\nfunction maybeWrap(value: unknown): string {\n return typeof value === \"number\" ? String(value) : `\"${value}\"`;\n}\n\nexport function comment(defs: object): string {\n const paramNames = [\"value\", \"px\", \"inc\"];\n const values = Object.entries(defs)\n .map(([prop, value]) => `${prop}: ${paramNames.includes(value) ? value : maybeWrap(value)}`)\n .join(\"; \");\n return `/** Sets \\`${values}\\`. */\\n`;\n}\n","import { newMethod } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nconst borderDefs: [string, [string, string]][] = [\n [\"ba\", [\"borderStyle\", \"borderWidth\"]],\n [\"bt\", [\"borderTopStyle\", \"borderTopWidth\"]],\n [\"br\", [\"borderRightStyle\", \"borderRightWidth\"]],\n [\"bb\", [\"borderBottomStyle\", \"borderBottomWidth\"]],\n [\"bl\", [\"borderLeftStyle\", \"borderLeftWidth\"]],\n];\n\nexport const border: CreateMethodsFn = () => [\n ...borderDefs.map(([abbr, [style, width]]) => {\n return newMethod(abbr, { [style]: \"solid\", [width]: \"1px\" });\n }),\n newMethod(\"bn\", { borderStyle: \"none\", borderWidth: \"0\" }),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const borderColor: CreateMethodsFn = ({ palette }) => {\n const defs = Object.fromEntries(Object.entries(palette).map(([key, value]) => [`bc${key}`, value]));\n return newMethodsForProp(\"borderColor\", defs, \"bc\");\n};\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const borderRadius: CreateMethodsFn = () =>\n newMethodsForProp(\"borderRadius\", {\n br0: \"0\",\n br1: \".125rem\",\n br2: \".25rem\",\n br3: \".5rem\",\n br4: \"1rem\",\n br100: \"100%\",\n brPill: \"9999px\",\n });\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// http://tachyons.io/docs/themes/borders/\n// https://tailwindcss.com/docs/border-style/#app\nexport const borderStyle: CreateMethodsFn = () =>\n newMethodsForProp(\n \"borderStyle\",\n {\n bsDashed: \"dashed\",\n bsDotted: \"dotted\",\n bsn: \"none\",\n bss: \"solid\",\n },\n \"bs\",\n );\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// http://tachyons.io/docs/themes/borders/\nexport const borderWidth: CreateMethodsFn = () =>\n newMethodsForProp(\n \"borderWidth\",\n {\n bw1: \"1px\",\n bw2: \"2px\",\n },\n \"bw\"\n );\n","import { newMethod } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const boxShadow: CreateMethodsFn = () => [\n // bsn is taken by `borderStyle: none`.\n newMethod(\"shadowNone\", { boxShadow: \"none\" }),\n];\n","import { newIncrementMethods } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nconst directions = [\"top\", \"right\", \"bottom\", \"left\"] as const;\n\nexport const coordinates: CreateMethodsFn = (config) =>\n directions.flatMap((d) => {\n return newIncrementMethods(config, d, d);\n });\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const cursor: CreateMethodsFn = () => [\n ...newMethodsForProp(\"cursor\", {\n cursorPointer: \"pointer\",\n cursorNotAllowed: \"not-allowed\",\n }),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_display.css\nexport const display: CreateMethodsFn = () =>\n newMethodsForProp(\"display\", {\n dn: \"none\",\n db: \"block\",\n dib: \"inline-block\",\n dit: \"inline-table\",\n dt: \"table\",\n dtc: \"table-cell\",\n dtRow: \"table-row\",\n dtColumn: \"table-column\",\n dtColumnGroup: \"table-column-group\",\n // added\n dg: \"grid\",\n dig: \"inline-grid\",\n df: \"flex\",\n dif: \"inline-flex\",\n });\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp, newParamMethod } from \"src/methods\";\n\n// We originally used the tachyons mappings:\n// https://github.com/tachyons-css/tachyons/blob/master/src/_flexbox.css#L17\n//\n// But later shortened them with the rationale that, once we've all been writing\n// flex on a day-to-day basis, we don't need the longer \"not-Tachyons-ish\" names\n// that Tachyons originally picked (i.e. maybe because the flex properties were\n// \"too new/different\" at the time of adding them?).\nexport const flexbox: CreateMethodsFn = () => [\n ...newMethodsForProp(\n \"flex\",\n {\n fi: \"initial\",\n fa: \"auto\",\n fn: \"none\",\n f1: \"1\",\n f2: \"2\",\n f3: \"3\",\n f4: \"4\",\n f5: \"5\",\n },\n \"f\",\n ),\n ...newMethodsForProp(\n \"justifyContent\",\n {\n jcfs: \"flex-start\",\n jcfe: \"flex-end\",\n jcc: \"center\",\n jcsb: \"space-between\",\n jcsa: \"space-around\",\n jcse: \"space-evenly\",\n },\n \"jc\",\n ),\n\n ...newMethodsForProp(\n \"justifySelf\",\n {\n jsa: \"auto\",\n jsc: \"center\",\n jss: \"start\",\n jse: \"end\",\n },\n \"js\",\n ),\n\n ...newMethodsForProp(\n \"justifyItems\",\n {\n jifs: \"flex-start\",\n jife: \"flex-end\",\n jic: \"center\",\n jisb: \"space-between\",\n jisa: \"space-around\",\n jise: \"space-evenly\",\n },\n \"ji\",\n ),\n\n ...newMethodsForProp(\n \"alignSelf\",\n {\n asfs: \"flex-start\",\n asfe: \"flex-end\",\n asc: \"center\",\n asb: \"baseline\",\n asStretch: \"stretch\",\n },\n \"as\",\n ),\n\n ...newMethodsForProp(\n \"alignItems\",\n {\n aifs: \"flex-start\",\n aife: \"flex-end\",\n ais: \"start\",\n aie: \"end\",\n aic: \"center\",\n aib: \"baseline\",\n aiStretch: \"stretch\",\n },\n \"ai\",\n ),\n\n ...newMethodsForProp(\n \"placeSelf\",\n {\n psa: \"auto\",\n psc: \"center\",\n pss: \"start\",\n pse: \"end\",\n psfs: \"flex-start\",\n psfe: \"flex-end\",\n psStretch: \"stretch\",\n },\n \"ps\",\n ),\n\n ...newMethodsForProp(\n \"placeContent\",\n {\n pcc: \"center\",\n pcs: \"start\",\n pce: \"end\",\n pcsb: \"space-between\",\n pcsa: \"space-around\",\n pcse: \"space-evenly\",\n pcb: \"baseline\",\n pcStretch: \"stretch\",\n },\n \"pc\",\n ),\n\n ...newMethodsForProp(\n \"placeItems\",\n {\n pic: \"center\",\n pis: \"start\",\n pie: \"end\",\n pisb: \"space-between\",\n pisa: \"space-around\",\n pise: \"space-evenly\",\n pib: \"baseline\",\n piStretch: \"stretch\",\n },\n \"pi\",\n ),\n\n ...newMethodsForProp(\n \"flexBasis\",\n // https://github.com/tack-hammer/tailwind-plugin-flex-basis#usage\n {\n fb1: \"100%\",\n fb2: \"50%\",\n fb3: \"33.333333%\",\n fb4: \"25%\",\n fb5: \"20%\",\n fb6: \"16.666666%\",\n fb7: \"14.285714%\",\n fb0: \"12.5%\",\n },\n \"fb\",\n ),\n\n ...newMethodsForProp(\"flexGrow\", { fg0: 0, fg1: 1 }),\n ...newMethodsForProp(\"flexShrink\", { fs0: 0, fs1: 1 }),\n\n ...newMethodsForProp(\n \"flexDirection\",\n {\n fdr: \"row\",\n fdrr: \"row-reverse\",\n fdc: \"column\",\n fdcr: \"column-reverse\",\n },\n \"fd\",\n ),\n\n ...newMethodsForProp(\n \"flexWrap\",\n {\n fww: \"wrap\",\n fwr: \"wrap-reverse\",\n fwnw: \"nowrap\",\n },\n \"flexWrap\",\n ),\n\n newParamMethod(\"order\", \"order\"),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_floats.css\nexport const float: CreateMethodsFn = () =>\n newMethodsForProp(\n \"float\",\n {\n fl: \"left\",\n fr: \"right\",\n },\n \"float\"\n );\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const fontWeight: CreateMethodsFn = () =>\n newMethodsForProp(\n \"fontWeight\",\n {\n fwn: \"normal\",\n fwb: \"bold\",\n fw1: 100,\n fw2: 200,\n fw3: 300,\n fw4: 400,\n fw5: 500,\n fw6: 600,\n fw7: 700,\n fw8: 800,\n fw9: 900,\n },\n \"fw\",\n );\n","import { CreateMethodsFn } from \"src/config\";\nimport { newIncrementMethods, newParamMethod } from \"src/methods\";\n\nexport const grid: CreateMethodsFn = (config) => [\n newParamMethod(\"gtc\", \"gridTemplateColumns\"),\n newParamMethod(\"gtr\", \"gridTemplateRows\"),\n newParamMethod(\"gr\", \"gridRow\"),\n newParamMethod(\"gc\", \"gridColumn\"),\n newParamMethod(\"gar\", \"gridAutoRows\"),\n newParamMethod(\"gac\", \"gridAutoColumns\"),\n ...newIncrementMethods(config, \"gap\", \"gap\"),\n ...newIncrementMethods(config, \"rg\", \"rowGap\"),\n ...newIncrementMethods(config, \"cg\", \"columnGap\"),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newIncrementMethods, newMethodsForProp, newPxMethods } from \"src/methods\";\n\nexport const height: CreateMethodsFn = (config) => [\n // https://github.com/tachyons-css/tachyons/blob/master/src/_heights.css\n\n // Technically h1 in tachyons is 1em and ours is 1 inc\n ...newIncrementMethods(config, \"h\", \"height\", { auto: true }),\n\n ...newMethodsForProp(\n \"height\",\n {\n h25: \"25%\",\n h50: \"50%\",\n h75: \"75%\",\n h100: \"100%\",\n vh25: \"25vh\",\n vh50: \"50vh\",\n vh75: \"75vh\",\n vh100: \"100vh\",\n hfc: \"fit-content\",\n hmaxc: \"max-content\",\n hminc: \"min-content\",\n },\n // Skip `h` here b/c it's created by newIncrementMethods below\n null,\n ),\n\n ...newMethodsForProp(\n \"minHeight\",\n {\n mh0: 0,\n mh25: \"25%\",\n mh50: \"50%\",\n mh75: \"75%\",\n mh100: \"100%\",\n mvh100: \"100vh\",\n },\n \"mh\",\n true,\n ),\n\n ...newMethodsForProp(\n \"maxHeight\",\n {\n maxh0: \"0\",\n maxh25: \"25%\",\n maxh50: \"50%\",\n maxh75: \"75%\",\n maxh100: \"100%\",\n },\n \"maxh\",\n true,\n ),\n ...newPxMethods(\"sq\", [\"height\", \"width\"]),\n];\n","import { Properties } from \"csstype\";\nimport { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nconst additionalDefs: Properties = {\n overflow: \"hidden\",\n display: \"-webkit-box\",\n // As of 11/28/2022, this is deprecated but still necessary for lineClamp to work:\n // https://github.com/tailwindlabs/tailwindcss-line-clamp/blob/master/src/index.js\n WebkitBoxOrient: \"vertical\",\n // tailwinds doesn't add this by default, but it seems like a good default for us.\n textOverflow: \"ellipsis\",\n}\n\n// https://github.com/tailwindlabs/tailwindcss-line-clamp/\nexport const lineClamp: CreateMethodsFn = () =>\n newMethodsForProp(\n \"WebkitLineClamp\",\n {\n lineClamp1: { ...additionalDefs, WebkitLineClamp: 1 },\n lineClamp2: { ...additionalDefs, WebkitLineClamp: 2 },\n lineClamp3: { ...additionalDefs, WebkitLineClamp: 3 },\n lineClamp4: { ...additionalDefs, WebkitLineClamp: 4 },\n lineClamp5: { ...additionalDefs, WebkitLineClamp: 5 },\n lineClamp6: { ...additionalDefs, WebkitLineClamp: 6 },\n lineClampNone: { WebkitLineClamp: \"unset\" },\n },\n \"lineClamp\",\n false,\n additionalDefs\n);","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://tailwindcss.com/docs/object-fit\nexport const objectFit: CreateMethodsFn = () =>\n newMethodsForProp(\"objectFit\", {\n objectContain: \"contain\",\n objectCover: \"cover\",\n objectFill: \"fill\",\n objectNone: \"none\",\n objectScaleDown: \"scale-down\",\n });\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const outline: CreateMethodsFn = () =>\n newMethodsForProp(\"outline\", {\n outline1: \"1px solid\",\n outlineTransparent: \"1px solid transparent\",\n outline0: \"0\",\n });\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons-overflow/blob/master/src/tachyons-overflow.css\nexport const overflow: CreateMethodsFn = () => {\n return [\n ...newMethodsForProp(\"overflow\", {\n ov: \"visible\",\n oh: \"hidden\",\n os: \"scroll\",\n oa: \"auto\",\n }),\n ...newMethodsForProp(\"overflowY\", {\n oyv: \"visible\",\n oyh: \"hidden\",\n oys: \"scroll\",\n oya: \"auto\",\n }),\n ...newMethodsForProp(\"overflowX\", {\n oxv: \"visible\",\n oxh: \"hidden\",\n oxs: \"scroll\",\n oxa: \"auto\",\n }),\n ];\n};\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_position.css\nexport const position: CreateMethodsFn = () =>\n newMethodsForProp(\"position\", {\n absolute: \"absolute\",\n fixed: \"fixed\",\n static: \"static\",\n relative: \"relative\",\n // added\n sticky: \"sticky\",\n });\n","export function lowerCaseFirst(s: string): string {\n return s.charAt(0).toLowerCase() + s.substr(1);\n}\n\nexport function quote(s: string): string {\n return `\"${s}\"`;\n}\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\nimport { lowerCaseFirst } from \"src/utils\";\n\nexport const skins: CreateMethodsFn = (config) => {\n const { palette } = config;\n\n const colors = newMethodsForProp(\n \"color\",\n Object.fromEntries(\n Object.entries(palette).map(([key, value]) => [\n lowerCaseFirst(key),\n value,\n ])\n )\n );\n\n const backgroundColors = newMethodsForProp(\n \"backgroundColor\",\n Object.fromEntries(\n Object.entries(palette).map(([key, value]) => [`bg${key}`, value])\n ),\n \"bgColor\"\n );\n\n const fillColors = newMethodsForProp(\n \"fill\",\n Object.fromEntries(\n Object.entries(palette).map(([key, value]) => [`f${key}`, value])\n )\n );\n\n return [...colors, ...backgroundColors, ...fillColors];\n};\n","import { CreateMethodsFn } from \"src/config\";\nimport { IncConfig, newIncrementMethods } from \"src/methods\";\n\nexport const spacing: CreateMethodsFn = (config) => {\n const marginDefs: IncConfig[] = [\n [\"mt\", \"marginTop\"],\n [\"mr\", \"marginRight\"],\n [\"mb\", \"marginBottom\"],\n [\"ml\", \"marginLeft\"],\n [\"mx\", [\"marginLeft\", \"marginRight\"]],\n [\"my\", [\"marginTop\", \"marginBottom\"]],\n [\"m\", [\"marginTop\", \"marginBottom\", \"marginRight\", \"marginLeft\"]],\n ];\n const margins = [...marginDefs.map(([abbr, conf]) => newIncrementMethods(config, abbr, conf, { auto: true })).flat()];\n\n const paddingDefs: IncConfig[] = [\n [\"pt\", \"paddingTop\"],\n [\"pr\", \"paddingRight\"],\n [\"pb\", \"paddingBottom\"],\n [\"pl\", \"paddingLeft\"],\n [\"px\", [\"paddingLeft\", \"paddingRight\"]],\n [\"py\", [\"paddingTop\", \"paddingBottom\"]],\n [\"p\", [\"paddingTop\", \"paddingBottom\", \"paddingRight\", \"paddingLeft\"]],\n ];\n const paddings = paddingDefs.map(([abbr, conf]) => newIncrementMethods(config, abbr, conf)).flat();\n\n return [...margins, ...paddings];\n};\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_text-align.css\nexport const textAlign: CreateMethodsFn = () =>\n newMethodsForProp(\n \"textAlign\",\n {\n tal: \"left\",\n tac: \"center\",\n tar: \"right\",\n taj: \"justify\",\n },\n \"ta\"\n );\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const textDecoration: CreateMethodsFn = () =>\n newMethodsForProp(\"textDecoration\", {\n tdn: \"none\",\n tdlt: \"line-through\",\n tdu: \"underline\",\n });\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://github.com/tachyons-css/tachyons/blob/master/src/_text-transform.css\nexport const textTransform: CreateMethodsFn = () =>\n newMethodsForProp(\n \"textTransform\",\n {\n ttc: \"capitalize\",\n ttl: \"lowercase\",\n ttu: \"uppercase\",\n ttn: \"none\",\n },\n \"tt\"\n );\n","import { newMethod, newMethodsForProp, newParamMethod } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n/** Adds abbreviations like `tiny` -> `12px` or `tiny` -> `{ fontSize: 12px, fontWeight: ... }`. */\nexport const typeScale: CreateMethodsFn = ({ fonts }) => [\n ...Object.entries(fonts).map(([abbr, defs]) => {\n if (typeof defs === \"string\") {\n return newMethod(abbr, { fontSize: defs });\n }\n return newMethod(abbr, defs);\n }),\n];\n","import { newMethod, newMethodsForProp, newParamMethod } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// See typeScale for the FontConfig.fonts handling\n\nexport const typography: CreateMethodsFn = () => [\n newMethod(\"measure\", { maxWidth: \"30em\" }),\n newMethod(\"measureWide\", { maxWidth: \"34em\" }),\n newMethod(\"measureNarrow\", { maxWidth: \"20em\" }),\n newMethod(\"indent\", {\n textIndent: \"1em\",\n marginTop: 0,\n marginBottom: 0,\n }),\n newMethod(\"smallCaps\", { fontVariant: \"small-caps\" }),\n newMethod(\"truncate\", {\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }),\n // Include `fs(...)` & `fsPx(...)` for one-off font-sizes. We technically also have\n // `fs0` and `fs1` for `flexShrink`, but this seems fine.\n ...newMethodsForProp(\"fontSize\", {}, \"fs\", true),\n ...newMethodsForProp(\"lineHeight\", {}, \"lh\", true),\n];\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://tailwindcss.com/docs/user-select/\nexport const userSelect: CreateMethodsFn = () =>\n newMethodsForProp(\n \"userSelect\",\n {\n usn: \"none\",\n ust: \"text\",\n usAll: \"all\",\n usAuto: \"auto\",\n },\n \"select\",\n );\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const verticalAlign: CreateMethodsFn = () =>\n newMethodsForProp(\n \"verticalAlign\",\n {\n vaBaseline: \"baseline\",\n vam: \"middle\",\n vat: \"top\",\n vaBottom: \"bottom\",\n },\n \"va\",\n );\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://tailwindcss.com/docs/visibility/\nexport const visibility: CreateMethodsFn = () =>\n newMethodsForProp(\"visibility\", {\n vv: \"visible\",\n vh: \"hidden\",\n });\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const whitespace: CreateMethodsFn = () =>\n newMethodsForProp(\"whiteSpace\", {\n wsp: \"pre\",\n wsn: \"normal\",\n wsnw: \"nowrap\",\n wsbs: \"break-spaces\",\n wspw: \"pre-wrap\",\n wspl: \"pre-line\",\n });\n","import { newIncrementMethods, newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const width: CreateMethodsFn = (config) => [\n ...newMethodsForProp(\n \"width\",\n {\n w25: \"25%\",\n w50: \"50%\",\n w75: \"75%\",\n w100: \"100%\",\n wfc: \"fit-content\",\n wmaxc: \"max-content\",\n wminc: \"min-content\",\n },\n // Skip `w` here b/c it's created by newIncrementMethods below\n null,\n ),\n\n ...newMethodsForProp(\n \"minWidth\",\n {\n mw0: 0,\n mw25: \"25%\",\n mw50: \"50%\",\n mw75: \"75%\",\n mw100: \"100%\",\n mwfc: \"fit-content\",\n mwminc: \"min-content\",\n mwmaxc: \"max-content\",\n },\n \"mw\",\n true,\n ),\n\n ...newMethodsForProp(\n \"maxWidth\",\n {\n maxw0: \"0\",\n maxw25: \"25%\",\n maxw50: \"50%\",\n maxw75: \"75%\",\n maxw100: \"100%\",\n maxwfc: \"fit-content\",\n maxwminc: \"min-content\",\n maxwmaxc: \"max-content\",\n },\n \"maxw\",\n true,\n ),\n\n ...newIncrementMethods(config, \"w\", \"width\", { auto: true }),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\n// https://github.com/tachyons-css/tachyons-word-break/blob/master/src/tachyons-word-break.css\nexport const wordBreak: CreateMethodsFn = () =>\n newMethodsForProp(\"wordBreak\", {\n wbn: \"normal\",\n wbba: \"break-all\",\n wbka: \"keep-all\",\n wbbw: \"break-word\",\n });\n","import { newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\n// https://github.com/tachyons-css/tachyons-z-index/blob/master/src/tachyons-z-index.css\nexport const zIndex: CreateMethodsFn = (config) => [\n // Even though we define const z0/z1/etc indexes to follow Tachyons, ideally applications\n // should define their own application-specific indexes, i.e.:\n //\n // export const zIndexes = {\n // ourModals: 10,\n // ourLabels: 12,\n // }\n //\n // And then use `Css.z(zIndexes.ourModals).$` to get better documentation and maintainability\n // then just using the zN abbreviations.\n ...newMethodsForProp(\n \"zIndex\",\n {\n z0: 0,\n z1: 1,\n z2: 2,\n z3: 3,\n z4: 4,\n z5: 5,\n z999: 999,\n z9999: 9999,\n zInherit: \"inherit\",\n zInitial: \"initial\",\n zUnset: \"unset\",\n },\n \"z\"\n ),\n];\n","import { newMethod, newMethodsForProp } from \"src/methods\";\nimport { CreateMethodsFn } from \"src/config\";\n\nexport const container: CreateMethodsFn = () => [\n ...newMethodsForProp(\n \"containerType\",\n {\n cts: \"size\",\n ctis: \"inline-size\",\n ctn: \"normal\",\n },\n \"ct\",\n ),\n ...newMethodsForProp(\"containerName\", {}, \"cn\"),\n];\n","import { CreateMethodsFn } from \"src/config\";\nimport { newMethodsForProp } from \"src/methods\";\n\nexport const opacity: CreateMethodsFn = () => [\n ...newMethodsForProp(\n \"opacity\",\n {\n o0: \"0\",\n o25: \"0.25\",\n o50: \"0.5\",\n o75: \"0.75\",\n o100: \"1\",\n },\n \"o\",\n ),\n];\n","import { border } from \"src/sections/tachyons/border\";\nimport { borderColor } from \"src/sections/tachyons/borderColors\";\nimport { borderRadius } from \"src/sections/tachyons/borderRadius\";\nimport { borderStyle } from \"src/sections/tachyons/borderStyles\";\nimport { borderWidth } from \"src/sections/tachyons/borderWidths\";\nimport { boxShadow } from \"src/sections/tachyons/boxShadow\";\nimport { coordinates } from \"src/sections/tachyons/coordinates\";\nimport { cursor } from \"src/sections/tachyons/cursor\";\nimport { display } from \"src/sections/tachyons/display\";\nimport { flexbox } from \"src/sections/tachyons/flexbox\";\nimport { float } from \"src/sections/tachyons/floats\";\nimport { fontWeight } from \"src/sections/tachyons/fontWeight\";\nimport { grid } from \"src/sections/tachyons/grid\";\nimport { height } from \"src/sections/tachyons/heights\";\nimport { lineClamp } from \"src/sections/tachyons/lineClamp\";\nimport { objectFit } from \"src/sections/tachyons/objectFit\";\nimport { outline } from \"src/sections/tachyons/outlines\";\nimport { overflow } from \"src/sections/tachyons/overflow\";\nimport { position } from \"src/sections/tachyons/position\";\nimport { skins } from \"src/sections/tachyons/skins\";\nimport { spacing } from \"src/sections/tachyons/spacing\";\nimport { textAlign } from \"src/sections/tachyons/textAlign\";\nimport { textDecoration } from \"src/sections/tachyons/textDecoration\";\nimport { textTransform } from \"src/sections/tachyons/textTransform\";\nimport { typeScale } from \"src/sections/tachyons/typeScale\";\nimport { typography } from \"src/sections/tachyons/typography\";\nimport { userSelect } from \"src/sections/tachyons/userSelect\";\nimport { verticalAlign } from \"src/sections/tachyons/verticalAlign\";\nimport { visibility } from \"src/sections/tachyons/visibility\";\nimport { whitespace } from \"src/sections/tachyons/whitespace\";\nimport { width } from \"src/sections/tachyons/widths\";\nimport { wordBreak } from \"src/sections/tachyons/wordBreak\";\nimport { zIndex } from \"src/sections/tachyons/zIndex\";\nimport { container } from \"src/sections/tachyons/container\";\nimport { opacity } from \"src/sections/tachyons/opacity\";\n\nexport const defaultSections = {\n border,\n borderColor,\n borderRadius,\n borderStyle,\n borderWidth,\n boxShadow,\n container,\n coordinates,\n cursor,\n display,\n flexbox,\n float,\n fontWeight,\n grid,\n height,\n lineClamp,\n objectFit,\n opacity,\n outline,\n overflow,\n position,\n skins,\n spacing,\n textAlign,\n textDecoration,\n textTransform,\n typeScale,\n typography,\n userSelect,\n verticalAlign,\n visibility,\n whitespace,\n width,\n wordBreak,\n zIndex,\n} as const;\n","import { Properties } from \"csstype\";\nimport { promises as fs } from \"fs\";\nimport { code, Code, def, imp } from \"ts-poet\";\nimport { makeBreakpoints } from \"src/breakpoints\";\nimport { Config, SectionName, Sections, UtilityMethod } from \"src/config\";\nimport { newAliasesMethods, startStylexCollection, stopStylexCollection, StylexEntry } from \"src/methods\";\nimport { defaultSections } from \"src/sections/tachyons\";\nimport { quote } from \"src/utils\";\nimport { pascalCase } from \"change-case\";\nimport { reactNativeSections } from \"src/sections/tachyons-rn\";\n\nconst CssProperties = imp(\"Properties@csstype\");\n\nexport const defaultTypeAliases: Record<string, Array<keyof Properties>> = {\n Margin: [\"margin\", \"marginTop\", \"marginRight\", \"marginBottom\", \"marginLeft\"],\n Padding: [\"padding\", \"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\"],\n};\n\nexport async function generate(config: Config): Promise<void> {\n const { outputPath } = config;\n const target: string = config.target ?? \"stylex\";\n if (target === \"stylex\") {\n const { sections, entries } = collectStylexGenerationData(config);\n // For stylex target: generate a stylex-friendly CssBuilder (for types/IDE) + a mapping JSON\n const cssOutput = generateStylexCssBuilder(config, sections).toString();\n await fs.writeFile(outputPath, cssOutput);\n const mappingPath = config.mappingOutputPath || outputPath.replace(/\\.ts$/, \".json\");\n const mapping = generateTrussMapping(config, entries);\n await fs.writeFile(mappingPath, condensedJson(mapping) + \"\\n\");\n return;\n }\n\n if (target === \"react-native\") {\n const output = generateCssBuilder(config).toString();\n await fs.writeFile(outputPath, output);\n return;\n }\n\n throw new Error(`Unsupported truss target \"${target}\". Use \"stylex\" (default) or \"react-native\".`);\n}\n\nfunction generateCssBuilder(config: Config): Code {\n const { fonts, increment, extras, typeAliases, breakpoints = {}, palette } = config;\n const sections = generateSections(config);\n\n const lines = Object.entries(sections)\n .map(([name, value]) => [`// ${name}`, ...value, \"\"])\n .flat();\n\n const typeAliasCode = Object.entries({\n ...defaultTypeAliases,\n ...typeAliases,\n }).map(([name, props]) => {\n return `export type ${name} = ${props.map(quote).join(\" | \")};\\n\\n`;\n });\n\n const typographyType = code`\n export type ${def(\"Typography\")} = ${Object.keys(fonts).map(quote).join(\" | \")};\n `;\n\n const genBreakpoints = makeBreakpoints(breakpoints);\n\n const breakpointCode = [\n `export type Breakpoint = ${Object.keys(genBreakpoints).map(quote).join(\" | \")};`,\n `export enum Breakpoints {\n ${Object.entries(genBreakpoints).map(([name, value]) => `${name} = \"${value}\"`)}\n };`,\n ];\n\n const breakpointIfs = Object.entries(genBreakpoints).map(([name, value]) => {\n return code`\n get if${pascalCase(name)}() {\n return this.newCss({ selector: ${quote(value)} });\n }`;\n });\n\n const containerQueriesCode = code`\n /**\n * Utility to help write \\`@container\\` queries\n *\n * @param name - The name of the container.\n * @param lt - The maximum width of the container inclusive.\n * @param gt - The minimum width of the container exclusive.\n */\n type ContainerProps = { name?: string } & ({ lt: number } | { gt: number } | { lt: number; gt: number });\n export function Container(props: ContainerProps) {\n const { name = \"\" } = props;\n const lt = \"lt\" in props ? props.lt : undefined;\n const gt = \"gt\" in props ? props.gt : undefined;\n\n const ltQuery = lt !== undefined ? \\`(max-width: \\${lt}px)\\` : \"\";\n const gtQuery = gt !== undefined ? \\`(min-width: \\${gt + 1}px)\\` : \"\";\n const query = [ltQuery, gtQuery].filter(Boolean).join(\" and \");\n\n return \\`@container \\${name} \\${query}\\`;\n }`;\n\n return code`\n// This file is auto-generated by truss: https://github.com/homebound-team/truss.\n// See your project's \\`truss-config.ts\\` to make configuration changes (fonts, increments, etc).\n\n/** Given a type X, and the user's proposed type T, only allow keys in X and nothing else. */\nexport type Only<X, T> = X & Record<Exclude<keyof T, keyof X>, never>;\n\nexport type ${def(\"Properties\")} = ${CssProperties}<string | 0, string>;\n\n${typographyType}\n\ntype Opts<T> = {\n rules: T,\n enabled: boolean,\n important: boolean,\n selector: string | undefined\n};\n\nclass CssBuilder<T extends Properties> {\n constructor(private opts: Opts<T>) {}\n\n private get rules(): T { return this.opts.rules };\n private get enabled(): boolean { return this.opts.enabled };\n private get selector(): string | undefined { return this.opts.selector };\n private newCss(opts: Partial<Opts<T>>): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, ...opts });\n }\n\n ${lines.join(\"\\n \").replace(/ +\\n/g, \"\\n\")}\n \n get $(): T { return maybeImportant(sortObject(this.rules), this.opts.important); }\n\n if(bp: Breakpoint): CssBuilder<T>;\n if(cond: boolean): CssBuilder<T>;\n if(attr: string, value: boolean | string): CssBuilder<T>;\n if(arg: boolean | Breakpoint | string, value?: boolean | string): CssBuilder<T> {\n if (value !== undefined) {\n return this.newCss({ selector: \\`[\\${arg}='\\${value}']\\` });\n } else if (typeof arg === \"boolean\") {\n return this.newCss({ enabled: arg });\n } else {\n return this.newCss({ selector: Breakpoints[arg as Breakpoint] });\n }\n }\n\n get onHover() {\n return this.newCss({ selector: \":hover\" });\n }\n \n ifContainer(props: ContainerProps) {\n return this.newCss({ selector: Container(props) });\n }\n \n ${breakpointIfs}\n\n typography(key: Typography): CssBuilder<T> {\n return (this as any)[key];\n }\n\n get else() {\n if (this.selector !== undefined) {\n if (this.selector.includes(\"not\")) {\n throw new Error(\"else was already called\");\n } else {\n return this.newCss({ selector: this.selector.replace(\"@media\", \"@media not\") });\n }\n }\n return this.newCss({ enabled: !this.enabled });\n }\n\n get important() { return this.newCss({ important: true }); }\n\n /** Adds new properties, either a specific key/value or a Properties object, to the current css. */\n add<P extends Properties>(props: P): CssBuilder<T & P>;\n add<K extends keyof Properties>(prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n add<K extends keyof Properties>(propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n if (!this.enabled) return this;\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n const rules = this.selector\n ? { ...this.rules, [this.selector]: { ...(this.rules as any)[this.selector], ...newRules } }\n : { ...this.rules, ...newRules };\n return this.newCss({ rules: rules as any });\n }\n\n /** Adds new properties, either a specific key/value or a Properties object, to a nested selector. */\n addIn<P extends Properties>(selector: string, props: P | undefined): CssBuilder<T & P>;\n addIn<K extends keyof Properties>(selector: string, prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n addIn<K extends keyof Properties>(selector: string, propOrProperties: K | Properties, value?: Properties[K]): CssBuilder<any> {\n const newRules = typeof propOrProperties === \"string\" ? { [propOrProperties]: value } : propOrProperties;\n if (!this.enabled) return this;\n if (newRules === undefined) {\n return this;\n }\n const rules = { ...this.rules, [selector]: { ...(this.rules as any)[selector], ...newRules } };\n return this.newCss({ rules: rules as any });\n }\n\n /** Marker helper for legacy object-spread composition. */\n spread<P extends object>(props: P): P {\n return props;\n }\n}\n\n/** Sort keys so equivalent rule objects have deterministic shape. */\nfunction sortObject<T extends object>(obj: T): T {\n return Object.keys(obj)\n .sort()\n .reduce((acc, key) => {\n acc[key as keyof T] = obj[key as keyof T];\n return acc;\n }, ({} as any) as T) as T;\n}\n\n/** Conditionally adds \\`important!\\` to everything. */\nfunction maybeImportant<T extends object>(obj: T, important: boolean): T {\n if (important) {\n Object.keys(obj).forEach(key => {\n (obj as any)[key] = \\`\\${(obj as any)[key]} !important\\`;\n });\n }\n return obj;\n}\n\n/** Converts \\`inc\\` into pixels value with a \\`px\\` suffix. */\nexport function maybeInc(inc: number | string): string {\n return typeof inc === \"string\" ? inc : \\`\\${increment(inc)}px\\`;\n}\n\n/** Converts \\`inc\\` into pixels. */\nexport function increment(inc: number): number {\n return inc * ${increment};\n}\n\n/** Convert \\`pixels\\` to a \\`px\\` units string so it's not ambiguous. */\nexport function px(pixels: number): string {\n return \\`\\${pixels}px\\`;\n}\n\nexport enum Palette {\n ${Object.entries(palette).map(([name, value]) => {\n return `${name} = \"${value}\",`;\n })}\n}\n\n/** A shortcut for defining Xss types. */\nexport type Xss<P extends keyof Properties> = Pick<Properties, P>;\n\n/** An entry point for Css expressions. CssBuilder is immutable so this is safe to share. */\nexport const Css = new CssBuilder({ rules: {}, enabled: true, important: false, selector: undefined });\n\n${typeAliasCode}\n\n${breakpointCode}\n\n${containerQueriesCode}\n\n${extras || \"\"}\n `;\n}\n\n/** Invokes all of the `MethodFns` to create actual `UtilityMethod`s. */\nfunction generateMethods(config: Config, methodFns: Sections): Record<SectionName, UtilityMethod[]> {\n return Object.fromEntries(Object.entries(methodFns).map(([name, fn]) => [name, fn(config)]));\n}\n\n/** Returns all utility sections configured for this project. */\nfunction generateSections(config: Config): Record<string, UtilityMethod[]> {\n const { aliases, defaultMethods = \"tachyons\", sections: customSections } = config;\n return {\n ...(defaultMethods === \"tachyons\"\n ? generateMethods(config, defaultSections)\n : defaultMethods === \"tachyons-rn\"\n ? generateMethods(config, reactNativeSections)\n : {}),\n ...(customSections ? generateMethods(config, customSections) : {}),\n ...(aliases && { aliases: newAliasesMethods(aliases) }),\n };\n}\n\n/** Runs section generation once with collection enabled for stylex outputs. */\nfunction collectStylexGenerationData(config: Config): {\n sections: Record<string, UtilityMethod[]>;\n entries: StylexEntry[];\n} {\n startStylexCollection();\n try {\n const sections = generateSections(config);\n const entries = stopStylexCollection();\n return { sections, entries };\n } catch (error) {\n stopStylexCollection();\n throw error;\n }\n}\n\n// ── StyleX Code Generator ─────────────────────────────────────────────\n\n/**\n * For the \"stylex\" target, we generate a stylex-friendly CssBuilder whose public\n * TypeScript surface matches the runtime targets: `.$` is typed as the accumulated\n * style object shape, even though the build-time plugin later rewrites it to StyleX refs.\n *\n * The actual StyleX transformation happens at build time via the truss Vite plugin,\n * which reads the companion `Css.json` to understand what each abbreviation\n * produces, and rewrites `Css.*.$` into file-local `stylex.create()` + `stylex.props()` calls.\n */\nfunction generateStylexCssBuilder(config: Config, sections: Record<string, UtilityMethod[]>): Code {\n const { fonts, increment, extras, typeAliases, palette, breakpoints = {} } = config;\n\n const lines = Object.entries(sections)\n .map(([name, value]) => [`// ${name}`, ...value, \"\"])\n .flat();\n\n const typeAliasCode = Object.entries({\n ...defaultTypeAliases,\n ...typeAliases,\n }).map(([name, props]) => {\n return `export type ${name} = ${props.map(quote).join(\" | \")};\\n\\n`;\n });\n\n const genBreakpointsMap = makeBreakpoints(breakpoints);\n\n const breakpointIfs = Object.entries(genBreakpointsMap).map(([name, value]) => {\n return code`\n get if${pascalCase(name)}() {\n return this.newCss({ selector: ${quote(value)} });\n }`;\n });\n\n const breakpointCode = [\n `export type Breakpoint = ${Object.keys(genBreakpointsMap).map(quote).join(\" | \")};`,\n `export enum Breakpoints {`,\n ...Object.entries(genBreakpointsMap).map(([name, value]) => ` ${name} = \"${value}\",`),\n `}`,\n ];\n\n const typographyType = code`\n export type ${def(\"Typography\")} = ${Object.keys(fonts).map(quote).join(\" | \")};\n `;\n\n return code`\n// This file is auto-generated by truss: https://github.com/homebound-team/truss.\n// See your project's \\`truss-config.ts\\` to make configuration changes (fonts, increments, etc).\n// Target: stylex (build-time plugin)\n\nimport * as stylex from \"@stylexjs/stylex\";\nimport { trussProps } from \"@homebound/truss/runtime\";\n\n/** Given a type X, and the user's proposed type T, only allow keys in X and nothing else. */\nexport type Only<X, T> = X & Record<Exclude<keyof T, keyof X>, never>;\n\nexport type ${def(\"Properties\")} = ${CssProperties}<string | 0, string>;\n\n/** A marker returned by \\`stylex.defineMarker()\\`, used with \\`when\\`/\\`markerOf\\` etc. */\nexport type Marker = ReturnType<typeof stylex.defineMarker>;\n\n${typographyType}\n\n// Augment React types so JSX elements accept the \\`css\\` prop\ndeclare module \"react\" {\n interface HTMLAttributes<T> {\n css?: Properties;\n }\n interface SVGAttributes<T> {\n css?: Properties;\n }\n}\n\ntype Opts<T> = {\n rules: T;\n enabled: boolean;\n selector: string | undefined;\n};\n\nclass CssBuilder<T extends Properties> {\n constructor(private opts: Opts<T>) {}\n\n ${lines.join(\"\\n \").replace(/ +\\n/g, \"\\n\")}\n\n get $(): T {\n return this.rules as any;\n }\n\n get onHover() {\n return this.newCss({ selector: \":hover\" });\n }\n get onFocus() {\n return this.newCss({ selector: \":focus\" });\n }\n get onFocusVisible() {\n return this.newCss({ selector: \":focus-visible\" });\n }\n get onActive() {\n return this.newCss({ selector: \":active\" });\n }\n get onDisabled() {\n return this.newCss({ selector: \":disabled\" });\n }\n\n /** Marks this element as a default hover marker (for ancestor pseudo selectors). */\n get marker(): CssBuilder<T> {\n return this;\n }\n\n /** Marks this element with a user-defined marker (return value of stylex.defineMarker()). */\n markerOf(_marker: Marker): CssBuilder<T> {\n return this;\n }\n\n typography(key: Typography): CssBuilder<T> {\n return (this as any)[key];\n }\n\n /**\n * Styles after this \\`when\\` are applied based on a relationship + pseudo selector.\n *\n * \\`when(\"ancestor\", \":hover\")\\` — react to ancestor hover\n * \\`when(\"descendant\", \":focus\")\\` — react to descendant focus\n * \\`when(\"siblingAfter\", \":hover\")\\` — react to a following sibling's hover\n */\n when(relationship: \"ancestor\" | \"descendant\" | \"anySibling\" | \"siblingBefore\" | \"siblingAfter\", pseudo: string): CssBuilder<T>;\n /**\n * Styles after this \\`when\\` are applied based on a relationship-to-marker + pseudo selector.\n *\n * \\`when(\"ancestor\", marker, \":hover\")\\` — react to a specific ancestor's hover\n */\n when(relationship: \"ancestor\" | \"descendant\" | \"anySibling\" | \"siblingBefore\" | \"siblingAfter\", marker: Marker, pseudo: string): CssBuilder<T>;\n when(_relationship: string, _pseudoOrMarker: string | Marker, _pseudo?: string): CssBuilder<T> {\n return this;\n }\n\n ifContainer(_props: { name?: string; lt?: number; gt?: number }) {\n return this;\n }\n\n /** Apply styles within a pseudo-element (e.g. \\`\"::placeholder\"\\`, \\`\"::selection\"\\`). */\n element(_pseudoElement: string): CssBuilder<T> {\n return this;\n }\n\n ${breakpointIfs}\n\n /** Conditionally apply styles when \\`cond\\` is true. */\n if(cond: boolean): CssBuilder<T>;\n /** Apply styles within a media query (e.g. \\`Breakpoints.sm\\` or a raw \\`@media\\` string). */\n if(mediaQuery: string): CssBuilder<T>;\n if(condOrMediaQuery: boolean | string): CssBuilder<T> {\n if (typeof condOrMediaQuery === \"boolean\") {\n return new CssBuilder({ ...this.opts, enabled: condOrMediaQuery });\n }\n return this.newCss({ selector: condOrMediaQuery });\n }\n\n get else(): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, enabled: !this.enabled });\n }\n\n add<P extends Properties>(props: P): CssBuilder<T & P>;\n add<K extends keyof Properties>(prop: K, value: Properties[K]): CssBuilder<T & { [U in K]: Properties[K] }>;\n add<K extends keyof Properties>(propOrStyles: K | Properties, value?: Properties[K]): CssBuilder<any> {\n if (!this.enabled) return this;\n\n const newRules = typeof propOrStyles === \"string\" ? { [propOrStyles]: value } : propOrStyles;\n const rules = this.selector\n ? { ...this.rules, [this.selector]: { ...(this.rules as any)[this.selector], ...newRules } }\n : { ...this.rules, ...newRules };\n return this.newCss({ rules: rules as any });\n }\n\n /** Marker helper for legacy object-spread composition. */\n spread<P extends object>(props: P): P {\n return props;\n }\n\n /** Convert a style array into \\`{ className, style }\\` props for manual spreading into non-\\`css=\\` contexts. */\n props(styles: Properties): Record<string, unknown> {\n return trussProps(stylex, ...(Array.isArray(styles) ? styles : [styles]));\n }\n\n private get rules(): T {\n return this.opts.rules;\n }\n private get enabled(): boolean {\n return this.opts.enabled;\n }\n private get selector(): string | undefined {\n return this.opts.selector;\n }\n private newCss(opts: Partial<Opts<T>>): CssBuilder<T> {\n return new CssBuilder({ ...this.opts, ...opts });\n }\n}\n\n/** Converts \\`inc\\` into pixels value with a \\`px\\` suffix. */\nexport function maybeInc(inc: number | string): string {\n return typeof inc === \"string\" ? inc : \\`\\${inc * ${increment}}px\\`;\n}\n\n/** Converts \\`inc\\` into pixels. */\nexport function increment(inc: number): number {\n return inc * ${increment};\n}\n\n/** Convert \\`pixels\\` to a \\`px\\` units string so it's not ambiguous. */\nexport function px(pixels: number): string {\n return \\`\\${pixels}px\\`;\n}\n\nexport enum Palette {\n ${Object.entries(palette).map(([name, value]) => {\n return `${name} = \"${value}\",`;\n })}\n}\n\n/** A shortcut for defining Xss types. */\nexport type Xss<P extends keyof Properties> = Pick<Properties, P>;\n\n/** An entry point for Css expressions. CssBuilder is immutable so this is safe to share. */\nexport const Css = new CssBuilder({ rules: {}, enabled: true, selector: undefined });\n\n${typeAliasCode}\n\n${breakpointCode}\n\n${extras || \"\"}\n `;\n}\n\n// ── Truss Mapping Generator ──────────────────────────────────────────\n\n/** The shape of the Css.json mapping file consumed by the Vite plugin. */\nexport interface TrussMapping {\n increment: number;\n breakpoints?: Record<string, string>;\n typography?: string[];\n abbreviations: Record<string, TrussMappingEntry>;\n}\n\nexport type TrussMappingEntry =\n | { kind: \"static\"; defs: Record<string, unknown> }\n | { kind: \"dynamic\"; props: string[]; incremented: boolean; extraDefs?: Record<string, unknown> }\n | { kind: \"delegate\"; target: string }\n | { kind: \"alias\"; chain: string[] };\n\n/**\n * Generates the truss mapping JSON that the Vite plugin uses to resolve\n * Css abbreviation chains into CSS properties at build time.\n */\nfunction generateTrussMapping(config: Config, entries: StylexEntry[]): TrussMapping {\n const { breakpoints = {} } = config;\n\n const abbreviations: Record<string, TrussMappingEntry> = {};\n\n for (const entry of entries) {\n switch (entry.kind) {\n case \"static\":\n case \"cssvar\":\n abbreviations[entry.abbr] = { kind: \"static\", defs: entry.defs || {} };\n break;\n case \"param\":\n abbreviations[entry.abbr] = {\n kind: \"dynamic\",\n props: entry.props || [],\n incremented: false,\n extraDefs: entry.extraDefs,\n };\n break;\n case \"increment-param\":\n abbreviations[entry.abbr] = {\n kind: \"dynamic\",\n props: entry.props || [],\n incremented: true,\n extraDefs: entry.extraDefs,\n };\n break;\n case \"px-delegate\":\n // The target is the abbreviation without the Px suffix\n abbreviations[entry.abbr] = {\n kind: \"delegate\",\n target: entry.abbr.replace(/Px$/, \"\"),\n };\n break;\n case \"alias\":\n abbreviations[entry.abbr] = {\n kind: \"alias\",\n chain: entry.aliasTargets || [],\n };\n break;\n }\n }\n\n // Generate breakpoint mapping: { ifSm: \"@media ...\", ifMd: \"@media ...\", ... }\n const genBreakpointsMap = makeBreakpoints(breakpoints);\n const breakpointEntries: Record<string, string> = {};\n for (const [name, mediaQuery] of Object.entries(genBreakpointsMap)) {\n breakpointEntries[`if${pascalCase(name)}`] = mediaQuery;\n }\n\n return {\n increment: config.increment,\n ...(Object.keys(breakpointEntries).length > 0 ? { breakpoints: breakpointEntries } : {}),\n ...(Object.keys(config.fonts).length > 0 ? { typography: Object.keys(config.fonts) } : {}),\n abbreviations,\n };\n}\n\n/** Produce compact JSON with one line per abbreviation entry. */\nfunction condensedJson(mapping: TrussMapping): string {\n const lines: string[] = [];\n lines.push(\"{\");\n lines.push(` \"increment\": ${mapping.increment},`);\n if (mapping.breakpoints && Object.keys(mapping.breakpoints).length > 0) {\n lines.push(` \"breakpoints\": ${JSON.stringify(mapping.breakpoints)},`);\n }\n if (mapping.typography && mapping.typography.length > 0) {\n lines.push(` \"typography\": ${JSON.stringify(mapping.typography)},`);\n }\n lines.push(` \"abbreviations\": {`);\n const entries = Object.entries(mapping.abbreviations);\n for (let i = 0; i < entries.length; i++) {\n const [key, value] = entries[i];\n const comma = i < entries.length - 1 ? \",\" : \"\";\n lines.push(` ${JSON.stringify(key)}: ${JSON.stringify(value)}${comma}`);\n }\n lines.push(\" }\");\n lines.push(\"}\");\n return lines.join(\"\\n\");\n}\n","/**\n * Turns a high-level `{ sm: 0, md: 200 }` breakpoint config into a continuous set of media queries.\n *\n * Note that these are not utility methods directly, but are used to generate the breakpoint\n * selectors that we pass to CSS-in-JS frameworks.\n */\nexport function makeBreakpoints(breakpoints: Record<string, number>): Record<string, string> {\n const r: Record<string, string> = {\n print: \"@media print\",\n };\n const bps = Object.keys(breakpoints);\n Object.entries(breakpoints).forEach(([bp, px], i) => {\n const isFirst = i === 0;\n const isLast = i === bps.length - 1;\n // Calc this breakpoint's min/max, which is its px --> the next bp's px - 1\n const min = !isFirst ? `${px}px` : \"0\";\n const max = !isLast ? `${breakpoints[bps[i + 1]] - 1}px` : \"0\";\n\n // Make a rule for exactly this breakpoint, i.e. \"just sm\" or \"just md\".\n if (isFirst) {\n // Don't bother with min-width on the smallest bp\n r[bp] = `@media (max-width: ${max})`;\n } else if (isLast) {\n // Don't bother with max-width on the largest bp\n r[bp] = `@media (min-width: ${min})`;\n } else {\n r[bp] = `@media (min-width: ${min}) and (max-width: ${max})`;\n }\n\n // Make combinations of neighbors, i.e. smOrMd or mdOrLg. We could go further, like smOrMdOrLg, but that seems excessive.\n if (!isFirst) {\n const isSecond = i === 1;\n const prevBp = bps[i - 1];\n const name = `${prevBp}Or${capitalize(bp)}`;\n const parts: string[] = [];\n // If we're the `firstOrSecond` combination, we can skip min-width.\n if (!isSecond) {\n const prevMin = breakpoints[bps[i - 1]];\n parts.push(`(min-width: ${prevMin}px)`);\n }\n // If we're the `secondToLastOrLast` combination, we can skip max-width.\n if (!isLast) {\n parts.push(`(max-width: ${max})`);\n }\n r[name] = `@media ${parts.join(\" and \")}`;\n }\n\n // Make up/down variants for any \"middle\" breakpoints, i.e. `smUp` is \"everything\" and\n // `smDown` is \"just sm\", so skip both of those, and same for largest `lgUp`/`lgDown` bp.\n if (!isFirst && !isLast) {\n r[`${bp}AndUp`] = `@media (min-width: ${min})`;\n r[`${bp}AndDown`] = `@media (max-width: ${max})`;\n }\n });\n return r;\n}\n\nfunction capitalize(s: string): string {\n return `${s[0].toUpperCase()}${s.substring(1)}`;\n}\n","import { CreateMethodsFn } from \"src/config\";\nimport { IncConfig, newIncrementMethods } from \"src/methods\";\n\nexport const spacing: CreateMethodsFn = (config) => {\n const marginDefs: IncConfig[] = [\n [\"mt\", \"marginTop\"],\n [\"mr\", \"marginRight\"],\n [\"mb\", \"marginBottom\"],\n [\"ml\", \"marginLeft\"],\n [\"mx\", [\"marginLeft\", \"marginRight\"]],\n [\"my\", [\"marginTop\", \"marginBottom\"]],\n [\"m\", [\"marginTop\", \"marginBottom\", \"marginRight\", \"marginLeft\"]],\n ];\n const margins = [...marginDefs.map(([abbr, conf]) => newIncrementMethods(config, abbr, conf, { auto: true })).flat()];\n\n const paddingDefs: IncConfig[] = [\n [\"pt\", \"paddingTop\"],\n [\"pr\", \"paddingRight\"],\n [\"pb\", \"paddingBottom\"],\n [\"pl\", \"paddingLeft\"],\n [\"px\", [\"paddingLeft\", \"paddingRight\"]],\n [\"py\", [\"paddingTop\", \"paddingBottom\"]],\n [\"p\", [\"paddingTop\", \"paddingBottom\", \"paddingRight\", \"paddingLeft\"]],\n ];\n const paddings = paddingDefs.map(([abbr, conf]) => newIncrementMethods(config, abbr, conf)).flat();\n\n return [...margins, ...paddings];\n};\n","import { spacing } from \"src/sections/tachyons-rn/spacing\";\n\nexport const reactNativeSections = {\n spacing,\n} as const;\n"],"mappings":";AAuGO,SAAS,aAAa,QAAwB;AACnD,SAAO;AACT;;;AChFA,IAAI,mBAAyC;AAGtC,SAAS,wBAA8B;AAC5C,qBAAmB,CAAC;AACtB;AAGO,SAAS,uBAAsC;AACpD,QAAM,SAAS;AACf,qBAAmB;AACnB,SAAO;AACT;AAEA,SAAS,QAAQ,OAA0B;AACzC,MAAI,iBAAkB,kBAAiB,KAAK,KAAK;AACnD;AAMO,SAAS,UAAU,MAAmB,MAAiC;AAC5E,UAAQ,EAAE,MAAM,UAAU,MAAM,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;AACnD,SAAO,GAAG,QAAQ,IAAI,CAAC,QAAQ,IAAI,mBAAmB,OAAO,QAAQ,IAAI,EACtE,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,SAAS,IAAI,MAAM,UAAU,KAAK,CAAC,GAAG,EAC7D,KAAK,EAAE,CAAC;AACb;AASO,SAAS,eACd,MACA,MACA,kBAA8B,CAAC,GAChB;AACf,UAAQ;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA,OAAO,CAAC,IAAI;AAAA,IACZ,WAAW,OAAO,KAAK,eAAe,EAAE,SAAS,IAAI,EAAE,GAAG,gBAAgB,IAAI;AAAA,EAChF,CAAC;AACD,QAAMA,kB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AACd,QAAM,KAAK,kBAAkB,QAAQ,SAAS,GAAG;AACjD,MAAI,QAAQ,eAAe,OAAO,KAAK,QAAQ,WAAW,EAAE,SAAS,GAAG;AACtE,UAAM,KAAK,oBAAoB,KAAK,UAAU,QAAQ,WAAW,CAAC,GAAG;AAAA,EACvE;AACA,MAAI,QAAQ,cAAc,QAAQ,WAAW,SAAS,GAAG;AACvD,UAAM,KAAK,mBAAmB,KAAK,UAAU,QAAQ,UAAU,CAAC,GAAG;AAAA,EACrE;AACA,QAAM,KAAK,sBAAsB;AACjC,QAAM,UAAU,OAAO,QAAQ,QAAQ,aAAa;AACpD,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,UAAM,CAAC,KAAK,KAAK,IAAI,QAAQ,CAAC;AAC9B,UAAM,QAAQ,IAAI,QAAQ,SAAS,IAAI,MAAM;AAC7C,UAAM,KAAK,OAAO,KAAK,UAAU,GAAG,CAAC,KAAK,KAAK,UAAU,KAAK,CAAC,GAAG,KAAK,EAAE;AAAA,EAC3E;AACA,QAAM,KAAK,KAAK;AAChB,QAAM,KAAK,GAAG;AACd,SAAO,MAAM,KAAK,IAAI;AACxB;","names":["additionalDefs","prop","width","spacing","spacing"]}
@@ -1266,6 +1266,7 @@ function rewriteExpressionSites(options) {
1266
1266
  }
1267
1267
  site.path.replaceWith(buildStyleArrayExpression(propsArgs, site.path.node.loc?.start.line ?? null, options));
1268
1268
  }
1269
+ rewriteCssPropsCalls(options);
1269
1270
  rewriteCssSpreadCalls(
1270
1271
  options.ast,
1271
1272
  options.cssBindingName,
@@ -1609,6 +1610,18 @@ function rewriteCssSpreadCalls(ast, cssBindingName, asStyleArrayHelperName, need
1609
1610
  }
1610
1611
  });
1611
1612
  }
1613
+ function rewriteCssPropsCalls(options) {
1614
+ traverse(options.ast, {
1615
+ CallExpression(path) {
1616
+ if (!isCssPropsCall(path.node, options.cssBindingName)) return;
1617
+ const arg = path.node.arguments[0];
1618
+ if (!arg || t3.isSpreadElement(arg) || !t3.isExpression(arg) || path.node.arguments.length !== 1) return;
1619
+ const propsArgs = [t3.spreadElement(arg)];
1620
+ const line = path.node.loc?.start.line ?? null;
1621
+ path.replaceWith(buildPropsCall(propsArgs, line, options));
1622
+ }
1623
+ });
1624
+ }
1612
1625
  function flattenStyleObject(expr, path, asStyleArrayHelperName, needsAsStyleArrayHelper) {
1613
1626
  const elements = [];
1614
1627
  const droppedPropertyKeys = [];
@@ -1736,6 +1749,9 @@ function normalizeStyleBranch(expr) {
1736
1749
  }
1737
1750
  return normalizeStyleExpression(expr);
1738
1751
  }
1752
+ function isCssPropsCall(expr, cssBindingName) {
1753
+ return t3.isMemberExpression(expr.callee) && !expr.callee.computed && t3.isIdentifier(expr.callee.object, { name: cssBindingName }) && t3.isIdentifier(expr.callee.property, { name: "props" });
1754
+ }
1739
1755
  function isCssSpreadCall(expr, cssBindingName) {
1740
1756
  return t3.isMemberExpression(expr.callee) && !expr.callee.computed && t3.isIdentifier(expr.callee.object, { name: cssBindingName }) && t3.isIdentifier(expr.callee.property, { name: "spread" });
1741
1757
  }